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 # ------------------------------------------------------------
35 from PyQt4 import QtCore
36 from PyQt4 import QtGui
39 from environment import Environment
41 # ------------------------------------------------------------
47 <body bgcolor="#FFFFFF">
51 <img src="image:ait_logo_no_claim.png"/>
60 Copyright (C) 2013, AIT Austrian Institute of Technology<br/>
61 AIT Austrian Institute of Technology GmbH<br/>
62 Donau-City-Strasse 1 | 1220 Vienna | Austria<br/>
63 <a href="http://www.ait.ac.at">http://www.ait.ac.at</a>
72 # ------------------------------------------------------------
76 class About(QtGui.QDialog):
78 """Show some about stuff."""
80 def __init__(self, parent = None, flags = QtCore.Qt.WindowFlags(0)):
82 # super call and widget init
83 super(About, self).__init__(parent, flags)
85 # setup image search path
86 QtCore.QDir.setSearchPaths("image", QtCore.QStringList(Environment('opensecurity').image_path));
88 self.setWindowTitle('About OpenSecuirty ...')
94 """Create the widgets."""
96 lyMain = QtGui.QVBoxLayout(self)
97 lyMain.setContentsMargins(8, 8, 8, 8)
99 lbAbout = QtGui.QLabel()
100 lbAbout.setStyleSheet("QWidget { background: white; color: black; };")
101 lbAbout.setText(ABOUT_TEXT)
102 lbAbout.setContentsMargins(12, 12, 12, 12)
104 scAbout = QtGui.QScrollArea()
105 scAbout.setWidget(lbAbout)
106 scAbout.viewport().setStyleSheet("QWidget { background: white; color: black; };")
107 lyMain.addWidget(scAbout)
110 lyButton = QtGui.QHBoxLayout()
111 lyMain.addLayout(lyButton)
113 lyButton.addStretch(1)
114 btnOk = QtGui.QPushButton('&Ok', self)
115 btnOk.setMinimumWidth(100)
116 lyButton.addWidget(btnOk)
119 btnOk.clicked.connect(self.accept)
122 self.setMinimumSize(400, 200)
123 self.resize(lyMain.minimumSize())