From a34018607101552e28894a868a25707d594b08e1 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Fri, 25 Jul 2008 21:08:56 +0000 Subject: [PATCH] Added sample relations git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@32 014f5005-505e-4b48-8d0a-63407b615a7c --- maingui.py | 11 +++++------ samples/person_room.tlb | 9 +++++++++ samples/rooms.tlb | 9 +++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 samples/person_room.tlb create mode 100644 samples/rooms.tlb diff --git a/maingui.py b/maingui.py index 1a27ab3..fedb9d6 100644 --- a/maingui.py +++ b/maingui.py @@ -24,7 +24,7 @@ import about class Ui_Form(object): def __init__(self): - self.Dialog=None + self.About=None self.relations={} #Dictionary for relations def execute(self): try: @@ -86,12 +86,11 @@ class Ui_Form(object): del self.relations[str(i.text().toUtf8())] self.updateRelations() def showAbout(self): - if self.Dialog==None: - self.Dialog = QtGui.QDialog() + if self.About==None: + self.About = QtGui.QDialog() ui = about.Ui_Dialog() - ui.setupUi(self.Dialog) - self.Dialog.show() - #sys.exit(app.exec_()) + ui.setupUi(self.About) + self.About.show() def loadRelation(self): res=QtGui.QInputDialog.getText(None, QtGui.QApplication.translate("Form", "New relation"),QtGui.QApplication.translate("Form", "Insert the name for the new relation")) diff --git a/samples/person_room.tlb b/samples/person_room.tlb new file mode 100644 index 0000000..32f9784 --- /dev/null +++ b/samples/person_room.tlb @@ -0,0 +1,9 @@ +id room +0 1 +1 4 +2 2 +3 2 +4 5 +5 1 +6 5 +7 1 \ No newline at end of file diff --git a/samples/rooms.tlb b/samples/rooms.tlb new file mode 100644 index 0000000..01cacff --- /dev/null +++ b/samples/rooms.tlb @@ -0,0 +1,9 @@ +room phone +0 1515 +1 1516 +2 1617 +3 1601 +4 1041 +5 9212 +6 1424 +7 1294 \ No newline at end of file