# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'guidance_power_manager_ui.ui' # # Created: Thu Apr 10 00:50:39 2008 # by: The PyQt User Interface Compiler (pyuic) 3.17.4 # # WARNING! All changes made in this file will be lost! import sys from qt import * from tdecore import KCmdLineArgs, KApplication from tdecore import i18n from tdeui import * class PowerManagerUI(QWidget): def __init__(self,parent = None,name = None,fl = 0): QWidget.__init__(self,parent,name,fl) if not name: self.setName("PowerManagerUI") self.setMouseTracking(1) PowerManagerUILayout = QVBoxLayout(self,11,6,"PowerManagerUILayout") self.GeneralSettingsBox = QGroupBox(self,"GeneralSettingsBox") self.GeneralSettingsBox.setColumnLayout(0,Qt.Vertical) self.GeneralSettingsBox.layout().setSpacing(6) self.GeneralSettingsBox.layout().setMargin(11) GeneralSettingsBoxLayout = QVBoxLayout(self.GeneralSettingsBox.layout()) GeneralSettingsBoxLayout.setAlignment(Qt.AlignTop) self.lockScreenOnResume = QCheckBox(self.GeneralSettingsBox,"lockScreenOnResume") GeneralSettingsBoxLayout.addWidget(self.lockScreenOnResume) PowerManagerUILayout.addWidget(self.GeneralSettingsBox) self.MainsPoweredBox = QGroupBox(self,"MainsPoweredBox") self.MainsPoweredBox.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Fixed,0,0,self.MainsPoweredBox.sizePolicy().hasHeightForWidth())) self.MainsPoweredBox.setColumnLayout(0,Qt.Vertical) self.MainsPoweredBox.layout().setSpacing(6) self.MainsPoweredBox.layout().setMargin(11) MainsPoweredBoxLayout = QVBoxLayout(self.MainsPoweredBox.layout()) MainsPoweredBoxLayout.setAlignment(Qt.AlignTop) layout17 = QHBoxLayout(None,0,6,"layout17") self.PoweredBrightnessLabel = QLabel(self.MainsPoweredBox,"PoweredBrightnessLabel") layout17.addWidget(self.PoweredBrightnessLabel) self.PoweredBrightnessSlider = QSlider(self.MainsPoweredBox,"PoweredBrightnessSlider") self.PoweredBrightnessSlider.setMouseTracking(1) self.PoweredBrightnessSlider.setAcceptDrops(1) self.PoweredBrightnessSlider.setMaxValue(7) self.PoweredBrightnessSlider.setLineStep(1) self.PoweredBrightnessSlider.setPageStep(1) self.PoweredBrightnessSlider.setOrientation(QSlider.Horizontal) self.PoweredBrightnessSlider.setTickmarks(QSlider.Both) self.PoweredBrightnessSlider.setTickInterval(0) layout17.addWidget(self.PoweredBrightnessSlider) MainsPoweredBoxLayout.addLayout(layout17) layout13 = QHBoxLayout(None,0,6,"layout13") spacer12_3_2_2 = QSpacerItem(200,20,QSizePolicy.Expanding,QSizePolicy.Minimum) layout13.addItem(spacer12_3_2_2) self.PoweredIdleLabel = QLabel(self.MainsPoweredBox,"PoweredIdleLabel") layout13.addWidget(self.PoweredIdleLabel) self.PoweredIdleTime = QSpinBox(self.MainsPoweredBox,"PoweredIdleTime") layout13.addWidget(self.PoweredIdleTime) self.PoweredIdleCombo = QComboBox(0,self.MainsPoweredBox,"PoweredIdleCombo") layout13.addWidget(self.PoweredIdleCombo) MainsPoweredBoxLayout.addLayout(layout13) layout13_2_2 = QHBoxLayout(None,0,6,"layout13_2_2") spacer12_3_2_2_3_2 = QSpacerItem(200,20,QSizePolicy.Expanding,QSizePolicy.Minimum) layout13_2_2.addItem(spacer12_3_2_2_3_2) self.PoweredFreqLabel = QLabel(self.MainsPoweredBox,"PoweredFreqLabel") layout13_2_2.addWidget(self.PoweredFreqLabel) self.PoweredFreqCombo = QComboBox(0,self.MainsPoweredBox,"PoweredFreqCombo") layout13_2_2.addWidget(self.PoweredFreqCombo) MainsPoweredBoxLayout.addLayout(layout13_2_2) PowerManagerUILayout.addWidget(self.MainsPoweredBox) self.BatteryBox = QGroupBox(self,"BatteryBox") self.BatteryBox.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Fixed,0,0,self.BatteryBox.sizePolicy().hasHeightForWidth())) self.BatteryBox.setColumnLayout(0,Qt.Vertical) self.BatteryBox.layout().setSpacing(6) self.BatteryBox.layout().setMargin(11) BatteryBoxLayout = QVBoxLayout(self.BatteryBox.layout()) BatteryBoxLayout.setAlignment(Qt.AlignTop) layout16 = QHBoxLayout(None,0,6,"layout16") self.BatteryBrightnessLabel = QLabel(self.BatteryBox,"BatteryBrightnessLabel") layout16.addWidget(self.BatteryBrightnessLabel) self.BatteryBrightnessSlider = QSlider(self.BatteryBox,"BatteryBrightnessSlider") self.BatteryBrightnessSlider.setMouseTracking(1) self.BatteryBrightnessSlider.setMaxValue(7) self.BatteryBrightnessSlider.setPageStep(1) self.BatteryBrightnessSlider.setOrientation(QSlider.Horizontal) self.BatteryBrightnessSlider.setTickmarks(QSlider.Both) layout16.addWidget(self.BatteryBrightnessSlider) BatteryBoxLayout.addLayout(layout16) layout14 = QGridLayout(None,1,1,0,6,"layout14") self.BatteryIdleCombo = QComboBox(0,self.BatteryBox,"BatteryIdleCombo") layout14.addWidget(self.BatteryIdleCombo,1,4) self.BatteryIdleLabel = QLabel(self.BatteryBox,"BatteryIdleLabel") layout14.addWidget(self.BatteryIdleLabel,1,2) self.BatteryCriticalCombo = QComboBox(0,self.BatteryBox,"BatteryCriticalCombo") layout14.addWidget(self.BatteryCriticalCombo,0,4) self.BatteryCriticalLabel = QLabel(self.BatteryBox,"BatteryCriticalLabel") layout14.addMultiCellWidget(self.BatteryCriticalLabel,0,0,1,2) self.BatteryIdleTime = QSpinBox(self.BatteryBox,"BatteryIdleTime") layout14.addWidget(self.BatteryIdleTime,1,3) self.CriticalRemainTime = QSpinBox(self.BatteryBox,"CriticalRemainTime") layout14.addWidget(self.CriticalRemainTime,0,3) spacer12_3 = QSpacerItem(28,20,QSizePolicy.Expanding,QSizePolicy.Minimum) layout14.addItem(spacer12_3,0,0) spacer12_3_2 = QSpacerItem(50,20,QSizePolicy.Expanding,QSizePolicy.Minimum) layout14.addMultiCell(spacer12_3_2,1,1,0,1) BatteryBoxLayout.addLayout(layout14) layout13_2 = QHBoxLayout(None,0,6,"layout13_2") spacer12_3_2_2_3 = QSpacerItem(200,20,QSizePolicy.Expanding,QSizePolicy.Minimum) layout13_2.addItem(spacer12_3_2_2_3) self.BatteryFreqLabel = QLabel(self.BatteryBox,"BatteryFreqLabel") layout13_2.addWidget(self.BatteryFreqLabel) self.BatteryFreqCombo = QComboBox(0,self.BatteryBox,"BatteryFreqCombo") layout13_2.addWidget(self.BatteryFreqCombo) BatteryBoxLayout.addLayout(layout13_2) PowerManagerUILayout.addWidget(self.BatteryBox) self.LaptopLidRadios = QButtonGroup(self,"LaptopLidRadios") self.LaptopLidRadios.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Fixed,0,0,self.LaptopLidRadios.sizePolicy().hasHeightForWidth())) self.LaptopLidRadios.setFrameShape(QButtonGroup.GroupBoxPanel) self.LaptopLidRadios.setColumnLayout(0,Qt.Vertical) self.LaptopLidRadios.layout().setSpacing(5) self.LaptopLidRadios.layout().setMargin(11) LaptopLidRadiosLayout = QHBoxLayout(self.LaptopLidRadios.layout()) LaptopLidRadiosLayout.setAlignment(Qt.AlignTop) self.laptopClosedNone = QRadioButton(self.LaptopLidRadios,"laptopClosedNone") LaptopLidRadiosLayout.addWidget(self.laptopClosedNone) self.laptopClosedBlank = QRadioButton(self.LaptopLidRadios,"laptopClosedBlank") LaptopLidRadiosLayout.addWidget(self.laptopClosedBlank) self.laptopClosedSuspend = QRadioButton(self.LaptopLidRadios,"laptopClosedSuspend") LaptopLidRadiosLayout.addWidget(self.laptopClosedSuspend) self.laptopClosedHibernate = QRadioButton(self.LaptopLidRadios,"laptopClosedHibernate") LaptopLidRadiosLayout.addWidget(self.laptopClosedHibernate) self.laptopClosedShutdown = QRadioButton(self.LaptopLidRadios,"laptopClosedShutdown") LaptopLidRadiosLayout.addWidget(self.laptopClosedShutdown) spacer12_2 = QSpacerItem(213,20,QSizePolicy.Expanding,QSizePolicy.Minimum) LaptopLidRadiosLayout.addItem(spacer12_2) PowerManagerUILayout.addWidget(self.LaptopLidRadios) spacer11 = QSpacerItem(31,80,QSizePolicy.Minimum,QSizePolicy.Expanding) PowerManagerUILayout.addItem(spacer11) self.languageChange() self.resize(QSize(505,374).expandedTo(self.minimumSizeHint())) self.clearWState(Qt.WState_Polished) def languageChange(self): self.setCaption(i18n("PowerManagerUI")) self.GeneralSettingsBox.setTitle(i18n("General Settings")) self.lockScreenOnResume.setText(i18n("Lock screen on resume")) self.MainsPoweredBox.setTitle(i18n("Mains Powered")) self.PoweredBrightnessLabel.setText(i18n("Brightness")) QWhatsThis.add(self.PoweredBrightnessSlider,i18n("With this slider you can set the brightness when the system is plugged into the socket outlet")) self.PoweredIdleLabel.setText(i18n("When the system is idle for more than")) self.PoweredIdleTime.setPrefix(QString.null) self.PoweredIdleTime.setSuffix(i18n(" min")) QWhatsThis.add(self.PoweredIdleTime,i18n("To prevent data loss or other damage, you can have the system suspend or hibernate, so you don't run accidentally out of battery power. Configure the number of minutes below which the machine will run the configured action.")) self.PoweredFreqLabel.setText(i18n("CPU frequency scaling policy")) self.BatteryBox.setTitle(i18n("Battery Powered")) self.BatteryBrightnessLabel.setText(i18n("Brightness")) QWhatsThis.add(self.BatteryBrightnessSlider,i18n("This slider controls the brightness when the system runs on batteries")) self.BatteryIdleLabel.setText(i18n("When the system is idle for more than")) self.BatteryCriticalLabel.setText(i18n("When battery remaining time drops below")) self.BatteryIdleTime.setPrefix(QString.null) self.BatteryIdleTime.setSuffix(i18n(" min")) QWhatsThis.add(self.BatteryIdleTime,i18n("To prevent data loss or other damage, you can have the system suspend or hibernate, so you don't run accidentally out of battery power. Configure the number of minutes below which the machine will run the configured action.")) self.CriticalRemainTime.setPrefix(QString.null) self.CriticalRemainTime.setSuffix(i18n(" min")) QWhatsThis.add(self.CriticalRemainTime,i18n("To prevent data loss or other damage, you can have the system suspend or hibernate, so you don't run accidentally out of battery power. Configure the number of minutes below which the machine will run the configured action.")) self.BatteryFreqLabel.setText(i18n("CPU frequency scaling policy")) self.LaptopLidRadios.setTitle(i18n("When Laptop Lid Closed")) self.laptopClosedNone.setText(i18n("Do nothing")) self.laptopClosedBlank.setText(i18n("Lock screen")) self.laptopClosedSuspend.setText(i18n("Suspend")) QToolTip.add(self.laptopClosedSuspend,i18n("Suspend to Memory")) QWhatsThis.add(self.laptopClosedSuspend,i18n("Suspend is a sleep state, the system will consume only very little energy when suspended")) self.laptopClosedHibernate.setText(i18n("Hibernate")) QToolTip.add(self.laptopClosedHibernate,i18n("Suspend to Disk")) QWhatsThis.add(self.laptopClosedHibernate,i18n("Hibernate or \"Suspend to Disk\" is a deep sleepstate, allowing the system to power off completely")) self.laptopClosedShutdown.setText(i18n("Shutdown")) QToolTip.add(self.laptopClosedShutdown,i18n("Halt the machine")) if __name__ == "__main__": appname = "" description = "" version = "" KCmdLineArgs.init (sys.argv, appname, description, version) a = KApplication () QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()")) w = PowerManagerUI() a.setMainWidget(w) w.show() a.exec_loop()