-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathabout.py
44 lines (31 loc) · 1.18 KB
/
about.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/python
# vim: set fileencoding=utf-8 :
" Provides the about dialog in help menu. "
from PyQt4 import QtGui
from Ui_about import Ui_Dialog
class AboutDialog(QtGui.QDialog, Ui_Dialog):
" Impelment the about dialog. "
def __init__(self, session, parent=None):
" Fill various infomation into the dialog. "
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
self.setWindowTitle( u"%s" % session.description)
detail = u""
detail += u"<html>"
detail += u"<b>%s version %s</b>" % \
(session.application, session.version)
detail += u"<br>"
detail += u"<br>"
for author in session.authors:
name, email, period = author
detail += "<a href='mailto:%s'>%s</a> Copyright (C) %s" % \
(email, name, period)
detail += "<br>"
detail += "<br>"
detail += u"<a href='%s'>%s</a>" % \
(session.homepage, session.homepage)
detail += "<br>"
detail += u"Licensed under %s" % (session.license)
detail += u"<br>"
detail += u"</html>"
self.labelDetailInfo.setText(detail)