home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / hplip / ui / nodevicesform_base.py < prev    next >
Encoding:
Python Source  |  2006-08-30  |  3.0 KB  |  81 lines

  1. # -*- coding: utf-8 -*-
  2.  
  3. # Form implementation generated from reading ui file 'ui/nodevicesform_base.ui'
  4. #
  5. # Created: Wed Aug 30 11:37:46 2006
  6. #      by: The PyQt User Interface Compiler (pyuic) 3.16
  7. #
  8. # WARNING! All changes made in this file will be lost!
  9.  
  10.  
  11. import sys
  12. from qt import *
  13.  
  14.  
  15. class NoDevicesForm_base(QDialog):
  16.     def __init__(self,parent = None,name = None,modal = 0,fl = 0):
  17.         QDialog.__init__(self,parent,name,modal,fl)
  18.  
  19.         if not name:
  20.             self.setName("NoDevicesForm_base")
  21.  
  22.  
  23.         NoDevicesForm_baseLayout = QGridLayout(self,1,1,11,6,"NoDevicesForm_baseLayout")
  24.  
  25.         self.Icon = QLabel(self,"Icon")
  26.         self.Icon.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.Icon.sizePolicy().hasHeightForWidth()))
  27.         self.Icon.setFrameShape(QLabel.NoFrame)
  28.         self.Icon.setScaledContents(1)
  29.  
  30.         NoDevicesForm_baseLayout.addWidget(self.Icon,0,0)
  31.  
  32.         self.textLabel7 = QLabel(self,"textLabel7")
  33.         self.textLabel7.setAlignment(QLabel.WordBreak | QLabel.AlignVCenter)
  34.  
  35.         NoDevicesForm_baseLayout.addMultiCellWidget(self.textLabel7,0,0,1,3)
  36.  
  37.         self.ExitButton = QPushButton(self,"ExitButton")
  38.  
  39.         NoDevicesForm_baseLayout.addWidget(self.ExitButton,1,3)
  40.  
  41.         self.CUPSButton = QPushButton(self,"CUPSButton")
  42.  
  43.         NoDevicesForm_baseLayout.addWidget(self.CUPSButton,1,2)
  44.         spacer43 = QSpacerItem(520,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
  45.         NoDevicesForm_baseLayout.addMultiCell(spacer43,1,1,0,1)
  46.  
  47.         self.languageChange()
  48.  
  49.         self.resize(QSize(809,222).expandedTo(self.minimumSizeHint()))
  50.         self.clearWState(Qt.WState_Polished)
  51.  
  52.         self.connect(self.CUPSButton,SIGNAL("clicked()"),self.CUPSButton_clicked)
  53.         self.connect(self.ExitButton,SIGNAL("clicked()"),self.ExitButton_clicked)
  54.  
  55.  
  56.     def languageChange(self):
  57.         self.setCaption(self.__tr("HP Device Manager - No Installed HP Devices"))
  58.         self.textLabel7.setText(self.__tr("<b>No installed HP devices found.</b> To install a device, use the <u>CUPS web interface</u> (http://localhost:631) or the <u>printer installation utility</u> that came with your operating system.\n"
  59. "After setting up a printer, you must press <tt>F6</tt> or chose <tt>Device | Refresh All</tt> for the printer to appear in the HP Device Manager.<p>\n"
  60. "<i>Note: Only devices installed with the hp: CUPS backend will appear in the HP Device Manager.</i><p>"))
  61.         self.ExitButton.setText(self.__tr("OK"))
  62.         self.CUPSButton.setText(self.__tr("CUPS Web Interface"))
  63.  
  64.  
  65.     def CUPSButton_clicked(self):
  66.         print "NoDevicesForm_base.CUPSButton_clicked(): Not implemented yet"
  67.  
  68.     def ExitButton_clicked(self):
  69.         print "NoDevicesForm_base.ExitButton_clicked(): Not implemented yet"
  70.  
  71.     def __tr(self,s,c = None):
  72.         return qApp.translate("NoDevicesForm_base",s,c)
  73.  
  74. if __name__ == "__main__":
  75.     a = QApplication(sys.argv)
  76.     QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
  77.     w = NoDevicesForm_base()
  78.     a.setMainWidget(w)
  79.     w.show()
  80.     a.exec_loop()
  81.