Logo Search packages:      
Sourcecode: kcm-qt-graphicssystem version File versions  Download package

void Module::load (  )

Overloading the KCModule load() function.

Definition at line 73 of file Module.cpp.

References scriptFile, setType(), and ui.

{
    if (!scriptFile->exists()) {
        // Trying to probe engine in use.
        EngineProbe *p = new EngineProbe(this);
        connect(p, SIGNAL(engineType(int)), SLOT(setType(int)));
        p->show();
        return;
    }

    if (!scriptFile->open(QIODevice::ReadOnly | QIODevice::Text)) {
        // Could not open file for whatever reason.
        return;
    }
    if (scriptFile->atEnd()) {
        // File is empty.
        return;
    }

    QString value(scriptFile->readLine().split('=').value(1));
    if (value == QLatin1String("raster")) {
        ui->rasterButton->setChecked(true);
    } else if (value == QLatin1String("opengl")) {
        ui->openglButton->setChecked(true);
    }
    scriptFile->close();
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index