implemented inserting of tuples in GUI

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@84 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2009-02-10 17:25:04 +07:00
parent 479cad96dc
commit 6e14b4b4c7
1 changed files with 12 additions and 1 deletions

@ -163,7 +163,18 @@ class Ui_Form(object):
return return
def deleteTuple(self): def deleteTuple(self):
pass '''Shows an input dialog and removes the tuples corresponding to the condition.'''
res=QtGui.QInputDialog.getText(self.Form, QtGui.QApplication.translate("Form", "New relation"),QtGui.QApplication.translate("Form", "Remove tuples: insert where condition"),
QtGui.QLineEdit.Normal,"")
if res[1]==False:
return
for i in self.lstRelations.selectedItems():
rel=self.relations[str(i.text().toUtf8())]
if rel.delete(str(res[0].toUtf8())) > 0:
self.showRelation(rel)
return
def addProduct(self): def addProduct(self):
self.txtQuery.insert(u"*") self.txtQuery.insert(u"*")
self.txtQuery.setFocus() self.txtQuery.setFocus()