Tizen 2.1 base
[platform/upstream/hplip.git] / ui / nodevicesform_base.py
1 # -*- coding: utf-8 -*-
2
3 # Form implementation generated from reading ui file 'ui/nodevicesform_base.ui'
4 #
5 # Created: Tue Jun 10 13:34:02 2008
6 #      by: The PyQt User Interface Compiler (pyuic) 3.17.3
7 #
8 # WARNING! All changes made in this file will be lost!
9
10
11 from qt import *
12
13
14 class NoDevicesForm_base(QDialog):
15     def __init__(self,parent = None,name = None,modal = 0,fl = 0):
16         QDialog.__init__(self,parent,name,modal,fl)
17
18         if not name:
19             self.setName("NoDevicesForm_base")
20
21
22         NoDevicesForm_baseLayout = QGridLayout(self,1,1,11,6,"NoDevicesForm_baseLayout")
23
24         self.Icon = QLabel(self,"Icon")
25         self.Icon.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.Icon.sizePolicy().hasHeightForWidth()))
26         self.Icon.setFrameShape(QLabel.NoFrame)
27         self.Icon.setScaledContents(1)
28
29         NoDevicesForm_baseLayout.addWidget(self.Icon,0,0)
30         spacer3 = QSpacerItem(20,280,QSizePolicy.Minimum,QSizePolicy.Expanding)
31         NoDevicesForm_baseLayout.addItem(spacer3,1,0)
32         spacer2 = QSpacerItem(20,16,QSizePolicy.Minimum,QSizePolicy.Expanding)
33         NoDevicesForm_baseLayout.addItem(spacer2,2,2)
34
35         self.textLabel7 = QLabel(self,"textLabel7")
36         self.textLabel7.setAlignment(QLabel.WordBreak | QLabel.AlignVCenter)
37
38         NoDevicesForm_baseLayout.addMultiCellWidget(self.textLabel7,0,1,1,4)
39         spacer43 = QSpacerItem(400,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
40         NoDevicesForm_baseLayout.addMultiCell(spacer43,3,3,0,1)
41
42         self.setupPushButton = QPushButton(self,"setupPushButton")
43
44         NoDevicesForm_baseLayout.addWidget(self.setupPushButton,3,2)
45
46         self.CUPSButton = QPushButton(self,"CUPSButton")
47
48         NoDevicesForm_baseLayout.addWidget(self.CUPSButton,3,3)
49
50         self.ExitButton = QPushButton(self,"ExitButton")
51         self.ExitButton.setDefault(1)
52
53         NoDevicesForm_baseLayout.addWidget(self.ExitButton,3,4)
54
55         self.languageChange()
56
57         self.resize(QSize(525,440).expandedTo(self.minimumSizeHint()))
58         self.clearWState(Qt.WState_Polished)
59
60         self.connect(self.CUPSButton,SIGNAL("clicked()"),self.CUPSButton_clicked)
61         self.connect(self.ExitButton,SIGNAL("clicked()"),self.ExitButton_clicked)
62         self.connect(self.setupPushButton,SIGNAL("clicked()"),self.setupPushButton_clicked)
63
64
65     def languageChange(self):
66         self.setCaption(self.__tr("HP Device Manager - No Installed HP Devices Found"))
67         self.textLabel7.setText(self.__tr("<b><font size=\"+2\">No Installed HP Devices Found.</font></b><p>To install a device, use one of the following methods:<p>\n"
68 "1.Run <b>hp-setup</b> (in a shell/terminal or click <tt>Setup Device...</tt> below).<p>\n"
69 "2. <b>CUPS web interface</b> (open a browser to: <u>http://localhost:631</u> or press the button below),<p>\n"
70 "3. The <b>printer installation utility</b> that came with your operating system (YaST, PrinterDrake, etc).\n"
71 "<p><p>After setting up a printer, you may have to press <tt>F6</tt> or choose <tt>Device | Refresh All</tt> for the printer to appear in the HP Device Manager.<p>\n"
72 "<i><b>Note: Only devices installed with the <tt>hp:</tt> or <tt>hpfax:</tt> CUPS backend will appear in the HP Device Manager.</b></i><p>"))
73         self.setupPushButton.setText(self.__tr("Setup Device..."))
74         self.CUPSButton.setText(self.__tr("CUPS Web Interface"))
75         self.ExitButton.setText(self.__tr("Close"))
76
77
78     def CUPSButton_clicked(self):
79         print "NoDevicesForm_base.CUPSButton_clicked(): Not implemented yet"
80
81     def ExitButton_clicked(self):
82         print "NoDevicesForm_base.ExitButton_clicked(): Not implemented yet"
83
84     def setupPushButton_clicked(self):
85         print "NoDevicesForm_base.setupPushButton_clicked(): Not implemented yet"
86
87     def __tr(self,s,c = None):
88         return qApp.translate("NoDevicesForm_base",s,c)