~mimose/+junk/hplip-3.16.11

« back to all changes in this revision

Viewing changes to ui5/aboutdialog.py

  • Committer: guoyalong
  • Date: 2017-09-20 10:13:05 UTC
  • Revision ID: guoyalong@kylinos.cn-20170920101305-82zaolzpv1qghz29
Modified debian/control & debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
#
 
3
# (c) Copyright 2001-2015 HP Development Company, L.P.
 
4
#
 
5
# This program is free software; you can redistribute it and/or modify
 
6
# it under the terms of the GNU General Public License as published by
 
7
# the Free Software Foundation; either version 2 of the License, or
 
8
# (at your option) any later version.
 
9
#
 
10
# This program is distributed in the hope that it will be useful,
 
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
# GNU General Public License for more details.
 
14
#
 
15
# You should have received a copy of the GNU General Public License
 
16
# along with this program; if not, write to the Free Software
 
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
18
#
 
19
# Authors: Don Welch
 
20
#
 
21
 
 
22
 
 
23
# Local
 
24
from base.g import *
 
25
#from base import device, utils
 
26
from .ui_utils import *
 
27
 
 
28
# Qt
 
29
from PyQt5.QtCore import *
 
30
from PyQt5.QtGui import *
 
31
 
 
32
# Ui
 
33
from .aboutdialog_base import Ui_AboutDlg_base
 
34
 
 
35
 
 
36
class AboutDialog(QDialog, Ui_AboutDlg_base):
 
37
    def __init__(self, parent, hplip_version, toolbox_version):
 
38
        QDialog.__init__(self, parent)
 
39
        self.setupUi(self)
 
40
        self.initUi(hplip_version, toolbox_version)
 
41
 
 
42
 
 
43
    def initUi(self, hplip_version, toolbox_version):
 
44
        self.CloseButton.clicked.connect(self.CloseButton_clicked)
 
45
 
 
46
        self.HPLIPVersionText.setText(hplip_version)
 
47
        self.ToolboxVersionText.setText(toolbox_version)
 
48
        self.PythonPixmap.setPixmap(load_pixmap('powered_by_python.png'))
 
49
        self.OsiPixmap.setPixmap(load_pixmap('opensource-75x65.png'))
 
50
        self.HPLIPLogo.setPixmap(load_pixmap('hp-tux-printer.png'))
 
51
 
 
52
 
 
53
 
 
54
    def CloseButton_clicked(self):
 
55
        self.close()
 
56
 
 
57
 
 
58