- Still a stub, with handler module now
git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@322 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
cbedc893b1
commit
06d27b14a7
60
relational_gui/creator.py
Normal file
60
relational_gui/creator.py
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# author Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>
|
||||
|
||||
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()
|
@ -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!
|
||||
|
@ -32,12 +32,65 @@
|
||||
<widget class="QTableWidget" name="table">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<x>230</x>
|
||||
<y>50</y>
|
||||
<width>256</width>
|
||||
<height>192</height>
|
||||
</rect>
|
||||
</property>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>a</string>
|
||||
</property>
|
||||
</row>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>60</y>
|
||||
<width>137</width>
|
||||
<height>140</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="cmdAddColumn">
|
||||
<property name="text">
|
||||
<string>Add column</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cmdRemoveColumn">
|
||||
<property name="text">
|
||||
<string>Remove column</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cmdAddTuple">
|
||||
<property name="text">
|
||||
<string>Add tuple</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cmdRemoveTuple">
|
||||
<property name="text">
|
||||
<string>Remove tuple</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
@ -49,8 +102,8 @@
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
<x>328</x>
|
||||
<y>354</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
@ -65,8 +118,8 @@
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
<x>396</x>
|
||||
<y>360</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
|
@ -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!
|
||||
|
Loading…
Reference in New Issue
Block a user