Able to (temporarily) store queries with a name

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@152 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
LtWorf 2009-05-06 16:35:21 +00:00
parent 185c3f661d
commit 9627500a21
2 changed files with 6 additions and 4 deletions

View File

@ -72,3 +72,5 @@
- Added make install and uninstall - Added make install and uninstall
- Optimizer generate a tree from the expression - Optimizer generate a tree from the expression
- Uses python-psyco when it is available - Uses python-psyco when it is available
- Ability to perform optimizations from GUI
- Able to (temporarily) store queries with a name

View File

@ -33,8 +33,8 @@ class Ui_Form(object):
self.undo=[] #UndoQueue for relations self.undo=[] #UndoQueue for relations
self.selectedRelation=None self.selectedRelation=None
def load_query(self,*index): def load_query(self,*index):
print index self.txtQuery.setText(self.savedQ.itemData(index[0]).toString())
pass
def save_query(self): def save_query(self):
defname="" defname=""
res=QtGui.QInputDialog.getText(self.Form, QtGui.QApplication.translate("Form", "New query"),QtGui.QApplication.translate("Form", "Insert the name for the query"), res=QtGui.QInputDialog.getText(self.Form, QtGui.QApplication.translate("Form", "New query"),QtGui.QApplication.translate("Form", "Insert the name for the query"),
@ -480,7 +480,7 @@ class Ui_Form(object):
QtCore.QObject.connect(self.cmdDelete,QtCore.SIGNAL("clicked()"),self.deleteTuple) QtCore.QObject.connect(self.cmdDelete,QtCore.SIGNAL("clicked()"),self.deleteTuple)
QtCore.QObject.connect(self.lstRelations,QtCore.SIGNAL("itemDoubleClicked(QListWidgetItem*)"),self.printRelation) QtCore.QObject.connect(self.lstRelations,QtCore.SIGNAL("itemDoubleClicked(QListWidgetItem*)"),self.printRelation)
QtCore.QObject.connect(self.lstRelations,QtCore.SIGNAL("itemClicked(QListWidgetItem*)"),self.showAttributes) QtCore.QObject.connect(self.lstRelations,QtCore.SIGNAL("itemClicked(QListWidgetItem*)"),self.showAttributes)
QtCore.QObject.connect(self.savedQ,QtCore.SIGNAL("currentIndexChanged(QString*)"),self.load_query) QtCore.QObject.connect(self.savedQ,QtCore.SIGNAL("currentIndexChanged(int)"),self.load_query)
QtCore.QMetaObject.connectSlotsByName(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Form.setTabOrder(self.txtResult,self.txtQuery) Form.setTabOrder(self.txtResult,self.txtQuery)