- Buttons to edit and create relation
- Default example cells when working on a new relation git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@323 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
06d27b14a7
commit
e6c871b785
2
Makefile
2
Makefile
@ -4,8 +4,10 @@ default:
|
||||
gui:
|
||||
pyside-uic relational_pyside/survey.ui > relational_pyside/survey.py
|
||||
pyside-uic relational_pyside/maingui.ui > relational_pyside/maingui.py
|
||||
pyside-uic relational_pyside/rel_edit.ui > relational_pyside/rel_edit.py
|
||||
pyuic4 relational_gui/survey.ui > relational_gui/survey.py
|
||||
pyuic4 relational_gui/maingui.ui > relational_gui/maingui.py
|
||||
pyuic4 relational_gui/rel_edit.ui > relational_gui/rel_edit.py
|
||||
|
||||
|
||||
uninstall:
|
||||
|
@ -27,29 +27,76 @@ import rel_edit
|
||||
|
||||
|
||||
class creatorForm(QtGui.QDialog):
|
||||
def __init__(self,ui,rel=None):
|
||||
def __init__(self,rel=None):
|
||||
QtGui.QDialog.__init__(self)
|
||||
|
||||
self.setSizeGripEnabled(True)
|
||||
self.result_relation=None
|
||||
self.rel=rel
|
||||
def setUi(self,ui):
|
||||
self.ui=ui
|
||||
self.table=self.ui.table
|
||||
|
||||
if self.rel==None:
|
||||
self.setup_empty()
|
||||
else:
|
||||
self.setup_replation(rel)
|
||||
def setup_relation(rel):
|
||||
pass
|
||||
def setup_empty(self):
|
||||
self.table.insertColumn(0)
|
||||
self.table.insertColumn(0)
|
||||
self.table.insertRow(0)
|
||||
self.table.insertRow(0)
|
||||
|
||||
i00=QtGui.QTableWidgetItem()
|
||||
i01=QtGui.QTableWidgetItem()
|
||||
i10=QtGui.QTableWidgetItem()
|
||||
i11=QtGui.QTableWidgetItem()
|
||||
i00.setText('Field name 1')
|
||||
i01.setText('Field name 2')
|
||||
i10.setText('Value 1')
|
||||
i11.setText('Value 2')
|
||||
|
||||
self.table.setItem (0,0,i00)
|
||||
self.table.setItem (0,1,i01)
|
||||
self.table.setItem (1,0,i10)
|
||||
self.table.setItem (1,1,i11)
|
||||
|
||||
|
||||
|
||||
|
||||
def accept(self):
|
||||
|
||||
QtGui.QDialog.accept(self)
|
||||
pass
|
||||
def reject(self):
|
||||
self.result_relation=None
|
||||
QtGui.QDialog.reject(self)
|
||||
pass
|
||||
def addColumn(self):
|
||||
self.table.insertColumn(self.table.columnCount())
|
||||
pass
|
||||
def addRow(self):
|
||||
self.table.insertRow(1)
|
||||
pass
|
||||
def deleteColumn(self):
|
||||
if self.table.columnCount()>1:
|
||||
self.table.removeColumn(self.table.currentColumn())
|
||||
pass
|
||||
def deleteRow(self):
|
||||
if self.table.rowCount()>2:
|
||||
self.table.removeRow(self.table.currentRow())
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
def editRelation(rel=None):
|
||||
ui = rel_edit.Ui_Dialog()
|
||||
Form = creatorForm(ui)
|
||||
|
||||
Form = creatorForm(rel)
|
||||
|
||||
ui.setupUi(Form)
|
||||
Form.setUi(ui)
|
||||
|
||||
Form.exec_()
|
||||
return Form.result_relation
|
||||
|
||||
|
@ -162,6 +162,17 @@ class relForm(QtGui.QMainWindow):
|
||||
for i in self.ui.lstRelations.selectedItems():
|
||||
del self.relations[compatibility.get_py_str(i.text())]
|
||||
self.updateRelations()
|
||||
def editRelation(self):
|
||||
import creator
|
||||
for i in self.ui.lstRelations.selectedItems():
|
||||
self.relations[compatibility.get_py_str(i.text())]=creator.editRelation(self.relations[compatibility.get_py_str(i.text())])
|
||||
self.updateRelations()
|
||||
def newRelation(self):
|
||||
import creator
|
||||
creator.editRelation()
|
||||
self.updateRelations()
|
||||
#TODO chose name for the relation
|
||||
|
||||
def showSurvey(self):
|
||||
if self.Survey==None:
|
||||
self.Survey=surveyForm.surveyForm()
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'relational_gui/maingui.ui'
|
||||
#
|
||||
# Created: Thu Oct 13 17:38:01 2011
|
||||
# Created: Thu Oct 13 19:00:44 2011
|
||||
# by: PyQt4 UI code generator 4.8.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@ -157,6 +157,12 @@ class Ui_MainWindow(object):
|
||||
self.cmdUnload = QtGui.QPushButton(self.groupBox)
|
||||
self.cmdUnload.setObjectName(_fromUtf8("cmdUnload"))
|
||||
self.verticalLayout.addWidget(self.cmdUnload)
|
||||
self.cmdNew = QtGui.QPushButton(self.groupBox)
|
||||
self.cmdNew.setObjectName(_fromUtf8("cmdNew"))
|
||||
self.verticalLayout.addWidget(self.cmdNew)
|
||||
self.cmdEdit = QtGui.QPushButton(self.groupBox)
|
||||
self.cmdEdit.setObjectName(_fromUtf8("cmdEdit"))
|
||||
self.verticalLayout.addWidget(self.cmdEdit)
|
||||
self.groupBox_2 = QtGui.QGroupBox(self.splitter)
|
||||
self.groupBox_2.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.groupBox_2.setMaximumSize(QtCore.QSize(300, 16777215))
|
||||
@ -219,8 +225,14 @@ class Ui_MainWindow(object):
|
||||
self.action_Quit.setObjectName(_fromUtf8("action_Quit"))
|
||||
self.actionCheck_for_new_versions = QtGui.QAction(MainWindow)
|
||||
self.actionCheck_for_new_versions.setObjectName(_fromUtf8("actionCheck_for_new_versions"))
|
||||
self.actionNew_relation = QtGui.QAction(MainWindow)
|
||||
self.actionNew_relation.setObjectName(_fromUtf8("actionNew_relation"))
|
||||
self.actionEdit_relation = QtGui.QAction(MainWindow)
|
||||
self.actionEdit_relation.setObjectName(_fromUtf8("actionEdit_relation"))
|
||||
self.menuFile.addAction(self.actionNew_relation)
|
||||
self.menuFile.addAction(self.action_Load_relation)
|
||||
self.menuFile.addAction(self.action_Save_relation)
|
||||
self.menuFile.addAction(self.actionEdit_relation)
|
||||
self.menuFile.addSeparator()
|
||||
self.menuFile.addAction(self.action_Quit)
|
||||
self.menuAbout.addAction(self.actionAbout)
|
||||
@ -264,6 +276,10 @@ class Ui_MainWindow(object):
|
||||
QtCore.QObject.connect(self.action_Save_relation, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.saveRelation)
|
||||
QtCore.QObject.connect(self.action_Quit, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.close)
|
||||
QtCore.QObject.connect(self.actionCheck_for_new_versions, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.checkVersion)
|
||||
QtCore.QObject.connect(self.cmdEdit, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.editRelation)
|
||||
QtCore.QObject.connect(self.actionEdit_relation, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.editRelation)
|
||||
QtCore.QObject.connect(self.cmdNew, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.newRelation)
|
||||
QtCore.QObject.connect(self.actionNew_relation, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.newRelation)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
MainWindow.setTabOrder(self.cmdAbout, self.cmdSurvey)
|
||||
MainWindow.setTabOrder(self.cmdSurvey, self.cmdProduct)
|
||||
@ -321,6 +337,8 @@ class Ui_MainWindow(object):
|
||||
self.cmdLoad.setText(QtGui.QApplication.translate("MainWindow", "Load relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.cmdSave.setText(QtGui.QApplication.translate("MainWindow", "Save relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.cmdUnload.setText(QtGui.QApplication.translate("MainWindow", "Unload relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.cmdNew.setText(QtGui.QApplication.translate("MainWindow", "New relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.cmdEdit.setText(QtGui.QApplication.translate("MainWindow", "Edit relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.groupBox_2.setTitle(QtGui.QApplication.translate("MainWindow", "Attributes", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.txtResult.setText(QtGui.QApplication.translate("MainWindow", "_last1", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label.setText(QtGui.QApplication.translate("MainWindow", "=", None, QtGui.QApplication.UnicodeUTF8))
|
||||
@ -336,4 +354,8 @@ class Ui_MainWindow(object):
|
||||
self.action_Quit.setText(QtGui.QApplication.translate("MainWindow", "&Quit", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.action_Quit.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionCheck_for_new_versions.setText(QtGui.QApplication.translate("MainWindow", "Check for new versions", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionNew_relation.setText(QtGui.QApplication.translate("MainWindow", "New relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionNew_relation.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+N", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionEdit_relation.setText(QtGui.QApplication.translate("MainWindow", "Edit relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionEdit_relation.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+E", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
|
@ -312,6 +312,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cmdNew">
|
||||
<property name="text">
|
||||
<string>New relation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cmdEdit">
|
||||
<property name="text">
|
||||
<string>Edit relation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
@ -412,8 +426,10 @@
|
||||
<property name="title">
|
||||
<string>&File</string>
|
||||
</property>
|
||||
<addaction name="actionNew_relation"/>
|
||||
<addaction name="action_Load_relation"/>
|
||||
<addaction name="action_Save_relation"/>
|
||||
<addaction name="actionEdit_relation"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="action_Quit"/>
|
||||
</widget>
|
||||
@ -468,6 +484,22 @@
|
||||
<string>Check for new versions</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNew_relation">
|
||||
<property name="text">
|
||||
<string>New relation</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+N</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEdit_relation">
|
||||
<property name="text">
|
||||
<string>Edit relation</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+E</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>cmdAbout</tabstop>
|
||||
@ -605,8 +637,8 @@
|
||||
<slot>addProduct()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>41</x>
|
||||
<y>171</y>
|
||||
<x>53</x>
|
||||
<y>166</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>180</x>
|
||||
@ -621,8 +653,8 @@
|
||||
<slot>addDifference()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>82</x>
|
||||
<y>194</y>
|
||||
<x>94</x>
|
||||
<y>193</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>46</x>
|
||||
@ -637,8 +669,8 @@
|
||||
<slot>addArrow()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>99</x>
|
||||
<y>505</y>
|
||||
<x>107</x>
|
||||
<y>490</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>58</x>
|
||||
@ -653,8 +685,8 @@
|
||||
<slot>addRename()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>42</x>
|
||||
<y>474</y>
|
||||
<x>54</x>
|
||||
<y>463</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>111</x>
|
||||
@ -669,8 +701,8 @@
|
||||
<slot>addSelection()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>72</x>
|
||||
<y>446</y>
|
||||
<x>84</x>
|
||||
<y>436</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>16</x>
|
||||
@ -685,8 +717,8 @@
|
||||
<slot>addProjection()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>99</x>
|
||||
<y>414</y>
|
||||
<x>107</x>
|
||||
<y>409</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>91</x>
|
||||
@ -701,8 +733,8 @@
|
||||
<slot>unloadRelation()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>646</x>
|
||||
<y>312</y>
|
||||
<x>788</x>
|
||||
<y>280</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>773</x>
|
||||
@ -717,8 +749,8 @@
|
||||
<slot>saveRelation()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>717</x>
|
||||
<y>287</y>
|
||||
<x>788</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>760</x>
|
||||
@ -733,8 +765,8 @@
|
||||
<slot>loadRelation()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>753</x>
|
||||
<y>255</y>
|
||||
<x>788</x>
|
||||
<y>226</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>753</x>
|
||||
@ -797,8 +829,8 @@
|
||||
<slot>addORight()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>90</x>
|
||||
<y>359</y>
|
||||
<x>102</x>
|
||||
<y>355</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>58</x>
|
||||
@ -813,8 +845,8 @@
|
||||
<slot>addOuter()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>34</x>
|
||||
<y>390</y>
|
||||
<x>46</x>
|
||||
<y>382</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>86</x>
|
||||
@ -829,8 +861,8 @@
|
||||
<slot>addOLeft()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>32</x>
|
||||
<y>332</y>
|
||||
<x>44</x>
|
||||
<y>328</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>66</x>
|
||||
@ -845,8 +877,8 @@
|
||||
<slot>addJoin()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>101</x>
|
||||
<y>302</y>
|
||||
<x>107</x>
|
||||
<y>301</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>147</x>
|
||||
@ -893,8 +925,8 @@
|
||||
<slot>addUnion()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>20</x>
|
||||
<y>222</y>
|
||||
<x>32</x>
|
||||
<y>220</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>279</x>
|
||||
@ -1046,6 +1078,70 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cmdEdit</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>editRelation()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>683</x>
|
||||
<y>323</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>399</x>
|
||||
<y>305</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionEdit_relation</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>editRelation()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>399</x>
|
||||
<y>305</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cmdNew</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>newRelation()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>683</x>
|
||||
<y>296</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>399</x>
|
||||
<y>305</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionNew_relation</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>newRelation()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>399</x>
|
||||
<y>305</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>execute()</slot>
|
||||
@ -1076,5 +1172,7 @@
|
||||
<slot>showAttributes(QListWidgetItem*)</slot>
|
||||
<slot>loadQuery()</slot>
|
||||
<slot>resumeHistory(QListWidgetItem*)</slot>
|
||||
<slot>editRelation()</slot>
|
||||
<slot>newRelation()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
|
@ -11,87 +11,64 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Relation editor</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>340</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTableWidget" name="table">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<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>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<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>
|
||||
<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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="table"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
@ -127,5 +104,75 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cmdAddColumn</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>addColumn()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>71</x>
|
||||
<y>95</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>188</x>
|
||||
<y>100</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cmdRemoveColumn</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>deleteColumn()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>126</x>
|
||||
<y>121</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>202</x>
|
||||
<y>129</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cmdAddTuple</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>addRow()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>124</x>
|
||||
<y>155</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>197</x>
|
||||
<y>158</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cmdRemoveTuple</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>deleteRow()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>122</x>
|
||||
<y>181</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>182</x>
|
||||
<y>193</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>addColumn()</slot>
|
||||
<slot>addRow()</slot>
|
||||
<slot>deleteColumn()</slot>
|
||||
<slot>deleteRow()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'relational_gui/survey.ui'
|
||||
#
|
||||
# Created: Thu Oct 13 17:38:01 2011
|
||||
# Created: Thu Oct 13 19:00:44 2011
|
||||
# by: PyQt4 UI code generator 4.8.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
1
relational_pyside/creator.py
Symbolic link
1
relational_pyside/creator.py
Symbolic link
@ -0,0 +1 @@
|
||||
../relational_gui/creator.py
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'relational_pyside/maingui.ui'
|
||||
#
|
||||
# Created: Sun Oct 9 00:27:00 2011
|
||||
# Created: Thu Oct 13 19:00:44 2011
|
||||
# by: pyside-uic 0.2.13 running on PySide 1.0.7
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@ -152,6 +152,12 @@ class Ui_MainWindow(object):
|
||||
self.cmdUnload = QtGui.QPushButton(self.groupBox)
|
||||
self.cmdUnload.setObjectName("cmdUnload")
|
||||
self.verticalLayout.addWidget(self.cmdUnload)
|
||||
self.cmdNew = QtGui.QPushButton(self.groupBox)
|
||||
self.cmdNew.setObjectName("cmdNew")
|
||||
self.verticalLayout.addWidget(self.cmdNew)
|
||||
self.cmdEdit = QtGui.QPushButton(self.groupBox)
|
||||
self.cmdEdit.setObjectName("cmdEdit")
|
||||
self.verticalLayout.addWidget(self.cmdEdit)
|
||||
self.groupBox_2 = QtGui.QGroupBox(self.splitter)
|
||||
self.groupBox_2.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.groupBox_2.setMaximumSize(QtCore.QSize(300, 16777215))
|
||||
@ -214,8 +220,14 @@ class Ui_MainWindow(object):
|
||||
self.action_Quit.setObjectName("action_Quit")
|
||||
self.actionCheck_for_new_versions = QtGui.QAction(MainWindow)
|
||||
self.actionCheck_for_new_versions.setObjectName("actionCheck_for_new_versions")
|
||||
self.actionNew_relation = QtGui.QAction(MainWindow)
|
||||
self.actionNew_relation.setObjectName("actionNew_relation")
|
||||
self.actionEdit_relation = QtGui.QAction(MainWindow)
|
||||
self.actionEdit_relation.setObjectName("actionEdit_relation")
|
||||
self.menuFile.addAction(self.actionNew_relation)
|
||||
self.menuFile.addAction(self.action_Load_relation)
|
||||
self.menuFile.addAction(self.action_Save_relation)
|
||||
self.menuFile.addAction(self.actionEdit_relation)
|
||||
self.menuFile.addSeparator()
|
||||
self.menuFile.addAction(self.action_Quit)
|
||||
self.menuAbout.addAction(self.actionAbout)
|
||||
@ -259,6 +271,10 @@ class Ui_MainWindow(object):
|
||||
QtCore.QObject.connect(self.action_Save_relation, QtCore.SIGNAL("triggered()"), MainWindow.saveRelation)
|
||||
QtCore.QObject.connect(self.action_Quit, QtCore.SIGNAL("triggered()"), MainWindow.close)
|
||||
QtCore.QObject.connect(self.actionCheck_for_new_versions, QtCore.SIGNAL("triggered()"), MainWindow.checkVersion)
|
||||
QtCore.QObject.connect(self.cmdEdit, QtCore.SIGNAL("clicked()"), MainWindow.editRelation)
|
||||
QtCore.QObject.connect(self.actionEdit_relation, QtCore.SIGNAL("triggered()"), MainWindow.editRelation)
|
||||
QtCore.QObject.connect(self.cmdNew, QtCore.SIGNAL("clicked()"), MainWindow.newRelation)
|
||||
QtCore.QObject.connect(self.actionNew_relation, QtCore.SIGNAL("triggered()"), MainWindow.newRelation)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
MainWindow.setTabOrder(self.cmdAbout, self.cmdSurvey)
|
||||
MainWindow.setTabOrder(self.cmdSurvey, self.cmdProduct)
|
||||
@ -316,6 +332,8 @@ class Ui_MainWindow(object):
|
||||
self.cmdLoad.setText(QtGui.QApplication.translate("MainWindow", "Load relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.cmdSave.setText(QtGui.QApplication.translate("MainWindow", "Save relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.cmdUnload.setText(QtGui.QApplication.translate("MainWindow", "Unload relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.cmdNew.setText(QtGui.QApplication.translate("MainWindow", "New relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.cmdEdit.setText(QtGui.QApplication.translate("MainWindow", "Edit relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.groupBox_2.setTitle(QtGui.QApplication.translate("MainWindow", "Attributes", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.txtResult.setText(QtGui.QApplication.translate("MainWindow", "_last1", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label.setText(QtGui.QApplication.translate("MainWindow", "=", None, QtGui.QApplication.UnicodeUTF8))
|
||||
@ -331,4 +349,8 @@ class Ui_MainWindow(object):
|
||||
self.action_Quit.setText(QtGui.QApplication.translate("MainWindow", "&Quit", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.action_Quit.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionCheck_for_new_versions.setText(QtGui.QApplication.translate("MainWindow", "Check for new versions", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionNew_relation.setText(QtGui.QApplication.translate("MainWindow", "New relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionNew_relation.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+N", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionEdit_relation.setText(QtGui.QApplication.translate("MainWindow", "Edit relation", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.actionEdit_relation.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+E", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'relational_pyside/survey.ui'
|
||||
#
|
||||
# Created: Sun Oct 9 00:27:00 2011
|
||||
# Created: Thu Oct 13 19:00:44 2011
|
||||
# by: pyside-uic 0.2.13 running on PySide 1.0.7
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
Loading…
Reference in New Issue
Block a user