34
34
QFrame.__init__(self, parent)
37
def initUi(self, systray_visible, polling, polling_interval, device_list, systray_messages):
37
def initUi(self, systray_visible, polling, polling_interval, device_list, systray_messages,upgrade_notify,
38
upgrade_postpone_time, upgrade_msg):
38
40
self.systray_visible = systray_visible
39
41
self.polling = polling
40
42
self.polling_interval = polling_interval
41
43
self.device_list = device_list
42
44
self.systray_messages = systray_messages
45
self.upgrade_notify = upgrade_notify
46
self.upgrade_postpone_time =upgrade_postpone_time
47
self.upgrade_msg = upgrade_msg
44
49
self.gridlayout = QGridLayout(self)
96
101
self.listWidget = QListWidget(self.MonitorGroupBox)
97
102
self.gridlayout4.addWidget(self.listWidget,1,0,1,1)
98
103
self.gridlayout1.addWidget(self.MonitorGroupBox,1,0,1,2)
106
#UpdategroupBox is same as "gridlayout5"
107
self.groupBox_4 = QGroupBox(self.frame)
108
self.UpdategroupBox = QGridLayout(self.groupBox_4)
109
self.UpdategroupBox.setObjectName("UpdategroupBox")
110
self.UpdatecheckBox = QCheckBox(self.groupBox_4)
111
self.UpdatecheckBox.setObjectName("UpdatecheckBox")
112
self.UpdategroupBox.addWidget(self.UpdatecheckBox,0,0,1,4)
113
self.label_5 = QLabel(self.groupBox_4)
114
self.label_5.setObjectName("label_5")
115
self.UpdategroupBox.addWidget(self.label_5, 1, 0, 1, 4)
116
self.textEdit = QTextEdit(self.groupBox_4)
117
self.textEdit.setObjectName("textEdit")
118
self.textEdit.setReadOnly(True)
119
self.UpdategroupBox.addWidget(self.textEdit, 2, 0, 1, 4)
120
self.gridlayout1.addWidget(self.groupBox_4,2,0,1,2)
99
122
self.gridlayout.addWidget(self.frame,0,0,1,1)
101
126
self.setWindowTitle(QApplication.translate("self", "self", None, QApplication.UnicodeUTF8))
102
127
self.groupBox_2.setTitle(QApplication.translate("self", "System tray icon visibility", None, QApplication.UnicodeUTF8))
107
132
self.label_2.setText(QApplication.translate("self", "Messages to show:", None, QApplication.UnicodeUTF8))
108
133
self.MonitorGroupBox.setTitle(QApplication.translate("self", "Monitor button presses on devices", None, QApplication.UnicodeUTF8))
109
134
self.label.setText(QApplication.translate("self", "Devices to monitor:", None, QApplication.UnicodeUTF8))
137
self.groupBox_4.setTitle(QApplication.translate("Dialog", "Update Settings", None, QApplication.UnicodeUTF8))
138
self.UpdatecheckBox.setText(QApplication.translate("Dialog", "Check and notify HPLIP updates", None, QApplication.UnicodeUTF8))
139
self.label_5.setText(QApplication.translate("Dialog", "Status:", None, QApplication.UnicodeUTF8))
140
self.textEdit.setPlainText(self.upgrade_msg)
111
143
self.connect(self.ShowAlwaysRadioButton, SIGNAL("clicked(bool)"), self.ShowAlwaysRadioButton_clicked)
112
144
self.connect(self.HideWhenInactiveRadioButton, SIGNAL("clicked(bool)"), self.HideWhenInactiveRadioButton_clicked)
113
145
self.connect(self.HideAlwaysRadioButton, SIGNAL("clicked(bool)"), self.HideAlwaysRadioButton_clicked)
114
146
self.connect(self.MessageShowComboBox, SIGNAL("activated(int)"), self.MessageShowComboBox_activated)
147
self.connect(self.UpdatecheckBox, SIGNAL("clicked(bool)"), self.UpdatecheckBox_clicked)
152
def UpdatecheckBox_clicked(self, b):
153
log.debug("Update HPLIP val =%d "%b)
155
self.upgrade_notify = False
157
self.upgrade_notify = True
117
159
def updateUi(self):
118
160
self.updateVisibility()
119
161
self.updateMessages()
120
162
self.updateDeviceList()
163
self.updateUpgradeSettings()
123
166
def updateVisibility(self):
159
202
def updateDeviceList(self):
205
def updateUpgradeSettings(self):
206
if self.upgrade_notify is True:
207
self.UpdatecheckBox.setChecked(True)
209
self.UpdatecheckBox.setChecked(False)
163
214
def __tr(self, s, c=None):
164
215
return QApplication.translate("SystrayFrame", s, c, QApplication.UnicodeUTF8)