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
44 # ------------------------------------------------------------
51 <style type="text/css">
52 .header { margin-bottom: 24px; }
53 .about_text { margin-bottom: 100px; margin-left: 64px; margin-right: 64px; }
54 .logo { vertical-align: top; margin-bottom: 24px; }
55 .footer { margin-top: 100px; }
58 <body bgcolor="#FFFFFF">
62 <a href="http://www.opensecurity.at"><img src="image:opensecurity_logo.jpg"/></a><br/><br/>
63 OpenSecurity Demo V0.1
66 <div class="about_text" align="justify">
71 <a href="http://www.ait.ac.at"><img src="image:ait_logo_no_claim.png"/></a>
72 <a href="http://www.x-net.at"><img src="image:x-net_logo.jpg"/></a>
73 <a href="http://www.ikarussecurity.com"><img src="image:ikarus_logo.jpg"/></a>
77 <a href="http://www.liqua.net"><img src="image:liqua_logo.jpg"/></a>
78 <a href="http://www.linz.at"><img src="image:linz_logo.jpg"/></a>
79 <a href="http://www.bmvit.gv.at"><img src="image:bmvit_logo.jpg"/></a>
83 <a href="http://www.ffg.at"><img src="image:ffg_logo.jpg"/></a>
84 <a href="http://www.kiras.at"><img src="image:kiras_logo.jpg"/></a>
87 <div class="footer" align="left">
88 Copyright (C) 2013, AIT Austrian Institute of Technology<br/>
89 AIT Austrian Institute of Technology GmbH<br/>
90 Donau-City-Strasse 1 | 1220 Vienna | Austria<br/>
91 <a href="http://www.ait.ac.at">http://www.ait.ac.at</a>
100 # ------------------------------------------------------------
104 class About(QtGui.QDialog):
106 """Show some about stuff."""
108 def __init__(self, parent = None, flags = QtCore.Qt.WindowFlags(0)):
110 # super call and widget init
111 super(About, self).__init__(parent, flags)
113 # setup image search path
114 QtCore.QDir.setSearchPaths("image", QtCore.QStringList(os.path.join(Environment('opensecurity').data_path, '..', 'gfx')));
116 self.setWindowTitle('About OpenSecurity ...')
122 """Create the widgets."""
124 lyMain = QtGui.QVBoxLayout(self)
125 lyMain.setContentsMargins(8, 8, 8, 8)
127 lbAbout = QtGui.QLabel()
128 lbAbout.setStyleSheet("QWidget { background: white; color: black; };")
129 lbAbout.setText(ABOUT_TEXT)
130 lbAbout.setContentsMargins(12, 12, 12, 12)
132 scAbout = QtGui.QScrollArea()
133 scAbout.setWidget(lbAbout)
134 scAbout.viewport().setStyleSheet("QWidget { background: white; color: black; };")
135 lyMain.addWidget(scAbout)
138 lyButton = QtGui.QHBoxLayout()
139 lyMain.addLayout(lyButton)
141 lyButton.addStretch(1)
142 btnOk = QtGui.QPushButton('&Ok', self)
143 btnOk.setMinimumWidth(100)
144 lyButton.addWidget(btnOk)
147 btnOk.clicked.connect(self.accept)
150 self.setMinimumSize(600, 400)
151 self.resize(lyMain.minimumSize())