source: dassmodus/trunk/dassmodus/dassmodus/dassmodus/integrityCheckDialog.py@ 955

Last change on this file since 955 was 955, checked in by pstorz, on Sep 28, 2011 at 11:35:12 AM

forgotten files

File size: 1.2 KB
Line 
1
2from PyQt4.QtCore import *
3from PyQt4.QtGui import *
4from PyQt4 import QtCore, QtGui
5
6
7
8
9import Ui_integrityCheckDialog
10
11
12class IntegrityCheckDialog(QDialog, Ui_integrityCheckDialog.Ui_IntegrityCheckForm):
13 '''
14 '''
15 def __init__(self, parent=None, resultstring=''):
16 super(IntegrityCheckDialog, self).__init__(parent)
17 self.setupUi(self)
18
19
20 for line in resultstring.splitlines():
21
22 (severity, message) = line.split(':',1)
23 item = QtGui.QListWidgetItem(message)
24 #print severity, line
25 icon = QtGui.QIcon(":/icons/" + severity + ".png")
26 item.setIcon(icon)
27 self.listWidget.addItem(item)
28
29
30 #self.setWindowTitle(title)
31 #self.groupBox.setTitle(title)
32
33
34 #self.connect(self.buttonBox, SIGNAL("accepted()"),
35 # self, SLOT("accept()"))
36 #self.connect(self.buttonBox, SIGNAL("rejected()"),
37 # self, SLOT("reject()"))
38 #self.setWindowTitle("Edit Message Types")
39
40
41
42
43if __name__ == "__main__":
44
45 import sys
46 import qt_resources # for the icons
47 app = QApplication(sys.argv)
48 dialog = IntegrityCheckDialog(resultstring = "ERROR:Test\nWARNING:test\nINFO:test\n")
49 dialog.show()
50 app.exec_()
Note: See TracBrowser for help on using the repository browser.