implemented inserting of tuples in GUI
git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@84 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
479cad96dc
commit
6e14b4b4c7
13
maingui.py
13
maingui.py
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user