~ubuntu-branches/ubuntu/saucy/hplip/saucy-proposed

« back to all changes in this revision

Viewing changes to ui/devmgr4_base.py

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-26 11:20:39 UTC
  • mfrom: (1.5.6) (31.1.3 precise)
  • Revision ID: package-import@ubuntu.com-20120526112039-bevxczegxnbyr5m7
Tags: 3.12.4-1
* New upstream release
* Switch to source/format 3.0 (quilt) - drop dpatch
* Refreshed debian/patches
* dh_autoreconf debian/autogen.sh & set local-options single-debian-patch
* Update to debian/compat -> 9
* Fix "hardened build flags" patch from Moritz - thanks (Closes: #667828)
* Fix "duplex descriptor uninitialized" patch from Matej (Closes: #583273)
* Fix "please migrate to kde-runtime" patch from Pino (Closes: #666544)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
2
 
3
 
# Form implementation generated from reading ui file 'devmgr4_base.ui'
 
3
# Form implementation generated from reading ui file 'ui/devmgr4_base.ui'
4
4
#
5
 
# Created: Mon Apr 28 10:56:51 2008
6
 
#      by: The PyQt User Interface Compiler (pyuic) 3.17.3
 
5
# Created: Fri Feb 3 12:00:32 2012
 
6
#      by: The PyQt User Interface Compiler (pyuic) 3.18.1
7
7
#
8
8
# WARNING! All changes made in this file will be lost!
9
9
 
12
12
 
13
13
 
14
14
class DevMgr4_base(QMainWindow):
15
 
    def __init__(self,parent = None,name = None,fl = 0):
 
15
    def __init__(self,parent = None,name = None,fl = 0,latest_available_version="",Is_autoInstaller_distro=False):
16
16
        QMainWindow.__init__(self,parent,name,fl)
17
17
        self.statusBar()
18
18
 
19
19
        if not name:
20
20
            self.setName("DevMgr4_base")
21
21
 
 
22
        self.latest_available_version= latest_available_version
 
23
        self.Is_autoInstaller_distro= Is_autoInstaller_distro
22
24
 
23
25
        self.setCentralWidget(QWidget(self,"qt_central_widget"))
24
26
        DevMgr4_baseLayout = QGridLayout(self.centralWidget(),1,1,11,6,"DevMgr4_baseLayout")
178
180
 
179
181
        PrintJobsTabLayout.addWidget(self.printerTextLabel,0,1)
180
182
        self.Tabs.insertTab(self.PrintJobsTab,QString.fromLatin1(""))
 
183
        if self.latest_available_version is not "":
 
184
            self.UpgradeTab = QWidget(self.Tabs,"UpgradeTab")
 
185
            self.UpgradeLabel = QLabel(self.UpgradeTab,"UpgradeLabel")
 
186
            msg="Latest 'HPLIP-%s' version available for Installation"%self.latest_available_version
 
187
            self.UpgradeLabel.setText(self.__tr(msg))
 
188
            self.UpgradeLabel.setGeometry(QRect(17,43,330,20))
 
189
            if self.Is_autoInstaller_distro:
 
190
                self.InstallPushButton = QPushButton(self.UpgradeTab,"InstallPushButton")
 
191
                self.InstallPushButton.setText(self.__tr("Install Now"))
 
192
                self.InstallPushButton.setGeometry(QRect(390,40,111,30))
 
193
            else:
 
194
                self.ManualInfoLabel = QLabel(self.UpgradeTab,"ManualInfoLabel")
 
195
                msg="Please install manually as mentioned in "
 
196
                self.ManualInfoLabel.setText(self.__tr(msg))
 
197
                self.ManualInfoLabel.setGeometry(QRect(17,70,300,30))
 
198
                
 
199
                self.InstallPushButton = QPushButton(self.UpgradeTab,"InstallPushButton")
 
200
                self.InstallPushButton.setText(self.__tr("HPLIP website"))
 
201
                self.InstallPushButton.setGeometry(QRect(260,70,100,25))
 
202
            
 
203
            self.Tabs.insertTab(self.UpgradeTab,QString.fromLatin1(""))
 
204
            
181
205
 
182
206
        DevMgr4_baseLayout.addWidget(self.splitter2,0,0)
183
207
 
266
290
        self.connect(self.infoToolButton,SIGNAL("clicked()"),self.infoToolButton_clicked)
267
291
        self.connect(self.cancelToolButton,SIGNAL("clicked()"),self.cancelToolButton_clicked)
268
292
        self.connect(self.jobList,SIGNAL("contextMenuRequested(QListViewItem*,const QPoint&,int)"),self.jobList_contextMenuRequested)
269
 
 
 
293
        if self.latest_available_version is not "":
 
294
            self.connect(self.InstallPushButton,SIGNAL("clicked()"),self.InstallPushButton_clicked)
270
295
 
271
296
    def languageChange(self):
272
297
        self.setCaption(self.__tr("HP Device Manager"))
299
324
        self.stopstartPushButton.setText(self.__tr("Stop Printer"))
300
325
        self.printerTextLabel.setText(self.__tr("Printer Name:"))
301
326
        self.Tabs.changeTab(self.PrintJobsTab,self.__tr("Print Control"))
 
327
        if self.latest_available_version is not "":
 
328
            self.Tabs.changeTab(self.UpgradeTab,self.__tr("Upgrade"))
302
329
        self.helpContentsAction.setText(self.__tr("Contents"))
303
330
        self.helpContentsAction.setMenuText(self.__tr("&Contents..."))
304
331
        self.helpContentsAction.setToolTip(self.__tr("Help Contents (F1)"))
539
566
    def cancelToolButton_clicked(self):
540
567
        print "DevMgr4_base.cancelToolButton_clicked(): Not implemented yet"
541
568
 
 
569
    def InstallPushButton_clicked(self):
 
570
        print "DevMgr4_base.InstallPushButton_clicked(): Not implemented yet"
 
571
        
542
572
    def jobList_contextMenuRequested(self,a0,a1,a2):
543
573
        print "DevMgr4_base.jobList_contextMenuRequested(QListViewItem*,const QPoint&,int): Not implemented yet"
544
574