summaryrefslogtreecommitdiffstats
path: root/displayconfig/energy.py
blob: 5c3f681983bf05cee64060c63db72013d4a2983c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'energy.ui'
#
# Created: Fri Jun 24 03:45:58 2005
#      by: The PyQt User Interface Compiler (pyuic) 3.14.1
#
# WARNING! All changes made in this file will be lost!


from qt import *

class DPMSTab(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

        if not name:
            self.setName("DPMSTab")


        DPMSTabLayout = QVBoxLayout(self,11,6,"DPMSTabLayout")

        titlelayout = QHBoxLayout(None,0,6,"titlelayout")
        topspacer = QSpacerItem(221,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        titlelayout.addItem(topspacer)

        self.energystarpix = QLabel(self,"energystarpix")
        self.energystarpix.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.energystarpix.sizePolicy().hasHeightForWidth()))
        self.energystarpix.setMinimumSize(QSize(150,77))
        self.energystarpix.setPixmap(QPixmap("energystar.png"))
        self.energystarpix.setScaledContents(1)
        titlelayout.addWidget(self.energystarpix)
        DPMSTabLayout.addLayout(titlelayout)

        self.screensavergroup = QGroupBox(self,"screensavergroup")
        self.screensavergroup.setCheckable(1)
        self.screensavergroup.setColumnLayout(0,Qt.Vertical)
        self.screensavergroup.layout().setSpacing(6)
        self.screensavergroup.layout().setMargin(11)
        screensavergroupLayout = QHBoxLayout(self.screensavergroup.layout())
        screensavergroupLayout.setAlignment(Qt.AlignTop)
        spacer4 = QSpacerItem(101,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        screensavergroupLayout.addItem(spacer4)

        self.screensavertext = QLabel(self.screensavergroup,"screensavertext")
        screensavergroupLayout.addWidget(self.screensavertext)

        self.screensavercombo = QComboBox(0,self.screensavergroup,"screensavercombo")
        screensavergroupLayout.addWidget(self.screensavercombo)
        DPMSTabLayout.addWidget(self.screensavergroup)

        self.dpmsgroup = QGroupBox(self,"dpmsgroup")
        self.dpmsgroup.setCheckable(1)
        self.dpmsgroup.setColumnLayout(0,Qt.Vertical)
        self.dpmsgroup.layout().setSpacing(6)
        self.dpmsgroup.layout().setMargin(11)
        dpmsgroupLayout = QHBoxLayout(self.dpmsgroup.layout())
        dpmsgroupLayout.setAlignment(Qt.AlignTop)
        spacer4_2 = QSpacerItem(244,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        dpmsgroupLayout.addItem(spacer4_2)

        self.dpmstext = QLabel(self.dpmsgroup,"dpmstext")
        dpmsgroupLayout.addWidget(self.dpmstext)

        self.dpmscombo = QComboBox(0,self.dpmsgroup,"dpmscombo")
        dpmsgroupLayout.addWidget(self.dpmscombo)
        DPMSTabLayout.addWidget(self.dpmsgroup)
        bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
        DPMSTabLayout.addItem(bottomspacer)

        self.languageChange()

        self.resize(QSize(508,372).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)


    def languageChange(self):
        self.setCaption(self.__tr("Display power saving"))
        self.screensavergroup.setTitle(self.__tr("Enable screensaver"))
        self.screensavertext.setText(self.__tr("Start screensaver after"))
        self.dpmsgroup.setTitle(self.__tr("Enable display powermanagement"))
        self.dpmstext.setText(self.__tr("Switch display off after"))


    def __tr(self,s,c = None):
        return qApp.translate("DPMSTab",s,c)