Logo Search packages:      
Sourcecode: guidance-power-manager version File versions

def guidance-power-manager::PowermanagerApp::slotCancel (   self  ) 

The Cancel button has been pressed, reset some values and hide dialogue. 

Definition at line 1065 of file guidance-power-manager.py.

01065                         :
        """ The Cancel button has been pressed, reset some values and hide dialogue. """
        # In case brightness has changed, we reset it to the configured value.
        if self.pmwidget.powermanager.hasBrightness:
            brightness_high = self.pmwidget.powermanager.brightness_levels
            if not self.pmwidget.powermanager.onBattery():
                poweredBrightness = self.pmwidget.config.readEntry("poweredBrightness", QVariant(brightness_high))
                level = poweredBrightness.toInt()
                level = level[0]
            else:
                batteryBrightness = self.pmwidget.config.readEntry("batteryBrightness", QVariant(int(brightness_high/2)))
                level = batteryBrightness.toInt()
                level = level[0]
            self.pmwidget.powermanager.adjustBrightness(level)
        self.pmwidget.configToUi()

    def slotUser1(self):


Generated by  Doxygen 1.6.0   Back to index