Logo Search packages:      
Sourcecode: kcpuload version File versions  Download package

void KCPULoad::setSMP ( bool  set  )  [slot]

Slots for menu items.

Definition at line 58 of file kcpuload.cpp.

References StatPopup::cleanUpDock(), StatPopup::config, StatPopup::dock, StatPopup::isActive(), StatPopup::requestResize(), supportSMP, and StatPopup::takeReading().

Referenced by setupCustomActions().

                              {
    if (! supportSMP)
        return;

    if (set && ! dock[1]) {
        // Enable SMP.
        dock[1] = new KCPUDock(1, this);

        ((KCPUDock*)dock[0])->setCPULabel(1);
        ((KCPUDock*)dock[1])->setCPULabel(2);
    } else if ((! set) && dock[1]) {
        // Disable SMP.
        ((KCPUDock*)dock[0])->setCPULabel(0);

        cleanUpDock(1);
        delete dock[1];
        dock[1] = 0;
    }

    requestResize();
    if (isActive())
        takeReading();

    config->setGroup("General Options");
    config->writeEntry("SMP", set);
    config->sync();
}


Generated by  Doxygen 1.6.0   Back to index