2 # -*- coding: utf-8 -*-
4 # ------------------------------------------------------------
7 # tell the user about the project
9 # Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
11 # Copyright (C) 2013 AIT Austrian Institute of Technology
12 # AIT Austrian Institute of Technology GmbH
13 # Donau-City-Strasse 1 | 1220 Vienna | Austria
14 # http://www.ait.ac.at
16 # This program is free software; you can redistribute it and/or
17 # modify it under the terms of the GNU General Public License
18 # as published by the Free Software Foundation version 2.
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 51 Franklin Street, Fifth Floor,
28 # Boston, MA 02110-1301, USA.
29 # ------------------------------------------------------------
32 # ------------------------------------------------------------
37 from PyQt4 import QtCore
38 from PyQt4 import QtGui
41 from environment import Environment
43 # ------------------------------------------------------------
49 <body bgcolor="#FFFFFF">
53 <img src="image:ait_logo_no_claim.png"/>
62 Copyright (C) 2013, AIT Austrian Institute of Technology<br/>
63 AIT Austrian Institute of Technology GmbH<br/>
64 Donau-City-Strasse 1 | 1220 Vienna | Austria<br/>
65 <a href="http://www.ait.ac.at">http://www.ait.ac.at</a>
74 # ------------------------------------------------------------
78 class About(QtGui.QDialog):
80 """Show some about stuff."""
82 def __init__(self, parent = None, flags = QtCore.Qt.WindowFlags(0)):
84 # super call and widget init
85 super(About, self).__init__(parent, flags)
87 # setup image search path
88 QtCore.QDir.setSearchPaths("image", QtCore.QStringList(os.path.join(Environment('opensecurity').data_path, '..', 'gfx')));
90 self.setWindowTitle('About OpenSecurity ...')
96 """Create the widgets."""
98 lyMain = QtGui.QVBoxLayout(self)
99 lyMain.setContentsMargins(8, 8, 8, 8)
101 lbAbout = QtGui.QLabel()
102 lbAbout.setStyleSheet("QWidget { background: white; color: black; };")
103 lbAbout.setText(ABOUT_TEXT)
104 lbAbout.setContentsMargins(12, 12, 12, 12)
106 scAbout = QtGui.QScrollArea()
107 scAbout.setWidget(lbAbout)
108 scAbout.viewport().setStyleSheet("QWidget { background: white; color: black; };")
109 lyMain.addWidget(scAbout)
112 lyButton = QtGui.QHBoxLayout()
113 lyMain.addLayout(lyButton)
115 lyButton.addStretch(1)
116 btnOk = QtGui.QPushButton('&Ok', self)
117 btnOk.setMinimumWidth(100)
118 lyButton.addWidget(btnOk)
121 btnOk.clicked.connect(self.accept)
124 self.setMinimumSize(400, 200)
125 self.resize(lyMain.minimumSize())