Tizen 2.1 base
[platform/upstream/hplip.git] / ui / upgradeform_base.py
1 # -*- coding: utf-8 -*-
2
3 # Form implementation generated from reading ui file 'ui/upgradeform_base.ui'
4 #
5 # Created: Thu Feb 9 20:00:42 2012
6 #      by: The PyQt User Interface Compiler (pyuic) 3.18.1
7 #
8 # WARNING! All changes made in this file will be lost!
9
10
11 from qt import *
12
13
14 class UpgradeForm_base(QDialog):
15     def __init__(self,parent = None,name = "",modal = 0,fl = 0,distro_type =1 , msg="" ):
16         QDialog.__init__(self,parent,name,modal,fl)
17
18         if name == "":
19             self.setName("HPLIP_Upgrade")
20         self.msg=msg
21         self.distro_type = distro_type
22
23         self.textLabel1 = QLabel(self,"textLabel1")
24         self.textLabel1.setGeometry(QRect(10,10,310,50))
25
26
27         self.buttonGroup1 = QButtonGroup(self,"buttonGroup1")
28         self.buttonGroup1.setGeometry(QRect(10,60,300,110))
29
30         self.installRadioBtton = QRadioButton(self.buttonGroup1,"installRadioBtton")
31         self.installRadioBtton.setGeometry(QRect(10,20,250,20))
32         self.installRadioBtton.setChecked(True)
33
34
35         self.remindRadioBtton = QRadioButton(self.buttonGroup1,"remindRadioBtton")
36         self.remindRadioBtton.setGeometry(QRect(10,50,130,20))
37
38
39         self.daysSpinBox = QSpinBox(self.buttonGroup1,"daysSpinBox")
40         self.daysSpinBox.setGeometry(QRect(139,50,50,20))
41         self.daysSpinBox.setMinValue(1)
42         self.daysSpinBox.setMaxValue(365)
43 #        self.daysSpinBox.setEnabled(False)
44
45
46         self.daysLabel = QLabel(self.buttonGroup1,"daysLabel")
47
48         self.daysLabel.setGeometry(QRect(200,50,68,20))
49
50
51         self.dontRemindRadioBtton = QRadioButton(self.buttonGroup1,"dontRemindRadioBtton")
52         self.dontRemindRadioBtton.setGeometry(QRect(10,80,160,20))
53
54
55         self.NextButton = QPushButton(self,"NextButton")
56         self.NextButton.setGeometry(QRect(140,190,90,25))
57
58         self.CancelButton = QPushButton(self,"CancelButton")
59         self.CancelButton.setGeometry(QRect(240,190,80,25))
60
61         self.languageChange()
62         self.resize(QSize(328,225).expandedTo(self.minimumSizeHint()))
63         self.clearWState(Qt.WState_Polished)
64
65         self.connect(self.daysSpinBox,SIGNAL("valueChanged(int)"),self.daysSpinBox_change)
66
67     def daysSpinBox_change(self):
68         self.remindRadioBtton.setChecked(True)
69         
70     def languageChange(self):
71         self.setCaption(self.__tr("HPLIP Upgrade Manager"))
72         self.textLabel1.setText(self.__tr(self.msg))
73         if self.distro_type == 1:
74             self.installRadioBtton.setText(self.__tr("Download and Install"))
75         else:
76             self.installRadioBtton.setText(self.__tr("Follow steps from www.hplip.net"))
77         self.remindRadioBtton.setText(self.__tr("Remind me after"))
78         self.daysLabel.setText(self.__tr("days"))
79         self.dontRemindRadioBtton.setText(self.__tr("Don't remind again"))
80         self.NextButton.setText(self.__tr("Ok"))
81         self.CancelButton.setText(self.__tr("Cancel"))
82
83
84
85     def __tr(self,s,c = None):
86         return qApp.translate("Form1",s,c)