]>
jfr.im git - irc/weechat/qweechat.git/blob - src/qweechat/about.py
2 # -*- coding: utf-8 -*-
4 # Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org>
6 # This file is part of QWeeChat, a Qt remote GUI for WeeChat.
8 # QWeeChat is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # QWeeChat is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with QWeeChat. If not, see <http://www.gnu.org/licenses/>.
27 QtCore
= qt_compat
.import_module('QtCore')
28 QtGui
= qt_compat
.import_module('QtGui')
31 class AboutDialog(QtGui
.QDialog
):
34 def __init__(self
, name
, messages
, *args
):
35 apply(QtGui
.QDialog
.__init
__, (self
,) + args
)
37 self
.setWindowTitle(name
)
39 close_button
= QtGui
.QPushButton('Close')
40 close_button
.pressed
.connect(self
.close
)
42 hbox
= QtGui
.QHBoxLayout()
44 hbox
.addWidget(close_button
)
47 vbox
= QtGui
.QVBoxLayout()
49 label
= QtGui
.QLabel(msg
.decode('utf-8'))
50 label
.setAlignment(QtCore
.Qt
.AlignHCenter
)