diff --git a/relational_gui/creator.py b/relational_gui/creator.py new file mode 100644 index 0000000..054974b --- /dev/null +++ b/relational_gui/creator.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Relational +# Copyright (C) 2008 Salvo "LtWorf" Tomaselli +# +# Relational is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# author Salvo "LtWorf" Tomaselli + +try: + from PyQt4 import QtCore, QtGui +except: + from PySide import QtCore, QtGui + +from relational import relation +import rel_edit + + +class creatorForm(QtGui.QDialog): + def __init__(self,ui,rel=None): + QtGui.QDialog.__init__(self) + self.setSizeGripEnabled(True) + self.result_relation=None + + + + def accept(self): + + QtGui.QDialog.accept(self) + pass + def reject(self): + pass + + + + +def editRelation(rel=None): + ui = rel_edit.Ui_Dialog() + Form = creatorForm(ui) + + + ui.setupUi(Form) + Form.exec_() + return Form.result_relation + + +if __name__ == '__main__': + import sys + app = QtGui.QApplication(sys.argv) + print editRelation() diff --git a/relational_gui/maingui.py b/relational_gui/maingui.py index 93a174a..0bb557f 100644 --- a/relational_gui/maingui.py +++ b/relational_gui/maingui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'relational_gui/maingui.ui' # -# Created: Sun Oct 9 00:27:00 2011 +# Created: Thu Oct 13 17:38:01 2011 # by: PyQt4 UI code generator 4.8.3 # # WARNING! All changes made in this file will be lost! diff --git a/relational_gui/rel_edit.ui b/relational_gui/rel_edit.ui index 2d3d504..69b5eac 100644 --- a/relational_gui/rel_edit.ui +++ b/relational_gui/rel_edit.ui @@ -32,12 +32,65 @@ - 290 + 230 50 256 192 + + + a + + + + + A + + + + + + + 10 + 60 + 137 + 140 + + + + Edit + + + + + + Add column + + + + + + + Remove column + + + + + + + Add tuple + + + + + + + Remove tuple + + + + @@ -49,8 +102,8 @@ accept() - 248 - 254 + 328 + 354 157 @@ -65,8 +118,8 @@ reject() - 316 - 260 + 396 + 360 286 diff --git a/relational_gui/survey.py b/relational_gui/survey.py index 6f5565f..e75cc1d 100644 --- a/relational_gui/survey.py +++ b/relational_gui/survey.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'relational_gui/survey.ui' # -# Created: Sun Oct 9 00:27:00 2011 +# Created: Thu Oct 13 17:38:01 2011 # by: PyQt4 UI code generator 4.8.3 # # WARNING! All changes made in this file will be lost!