From 9627500a215b3c9a76e5eabba4545220521de1ad Mon Sep 17 00:00:00 2001 From: LtWorf Date: Wed, 6 May 2009 16:35:21 +0000 Subject: [PATCH] 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 --- CHANGELOG | 4 +++- relational_gui/maingui.py | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3640ec9..a77937b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -71,4 +71,6 @@ - Bug: error in update operation, it changed the original tuple, so also other relations using the same tuple would change. Now it copies it. - Added make install and uninstall - Optimizer generate a tree from the expression -- Uses python-psyco when it is available \ No newline at end of file +- Uses python-psyco when it is available +- Ability to perform optimizations from GUI +- Able to (temporarily) store queries with a name \ No newline at end of file diff --git a/relational_gui/maingui.py b/relational_gui/maingui.py index 9141613..3889f1a 100644 --- a/relational_gui/maingui.py +++ b/relational_gui/maingui.py @@ -33,8 +33,8 @@ class Ui_Form(object): self.undo=[] #UndoQueue for relations self.selectedRelation=None def load_query(self,*index): - print index - pass + self.txtQuery.setText(self.savedQ.itemData(index[0]).toString()) + def save_query(self): defname="" 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.lstRelations,QtCore.SIGNAL("itemDoubleClicked(QListWidgetItem*)"),self.printRelation) 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) Form.setTabOrder(self.txtResult,self.txtQuery)