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

void Module::save (  )

Overloading the KCModule save() function.

Saving a script file exporting QT_GRAPHICSSYSTEM to KDE's env directory which gets included by startkde at startup.

The file will only be created if: * A radio button is checked * The checked button is NOT the same as the one probed

See also:

If there is no button selected the script file will be removed.

Definition at line 101 of file Module.cpp.

References probedButton, scriptFile, and ui.

    scriptFile->open(QIODevice::WriteOnly | QIODevice::Text);
    if (ui->nativeButton->isChecked() && ui->nativeButton != probedButton) {
        scriptFile->write("export QT_GRAPHICSSYSTEM=native");
    } else if (ui->rasterButton->isChecked() && ui->rasterButton != probedButton) {
        scriptFile->write("export QT_GRAPHICSSYSTEM=raster");
    } else if (ui->openglButton->isChecked() && ui->openglButton != probedButton) {
        scriptFile->write("export QT_GRAPHICSSYSTEM=opengl");
    } else if (!ui->nativeButton->isChecked() &&
               !ui->rasterButton->isChecked() &&
               !ui->openglButton->isChecked()) {
        // User switched to defaults

Generated by  Doxygen 1.6.0   Back to index