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)