|
|
|
@ -16,21 +16,26 @@
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
#
|
|
|
|
|
# author Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>
|
|
|
|
|
import sys
|
|
|
|
|
import os
|
|
|
|
|
import pickle
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
from PyQt4 import QtCore, QtGui
|
|
|
|
|
except:
|
|
|
|
|
from PySide import QtCore, QtGui
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from relational import relation, parser, optimizer,rtypes
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
import about
|
|
|
|
|
import survey
|
|
|
|
|
import os
|
|
|
|
|
import surveyForm
|
|
|
|
|
import maingui
|
|
|
|
|
import compatibility
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class relForm(QtGui.QMainWindow):
|
|
|
|
|
|
|
|
|
|
def __init__(self,ui):
|
|
|
|
@ -42,6 +47,9 @@ class relForm(QtGui.QMainWindow):
|
|
|
|
|
self.selectedRelation=None
|
|
|
|
|
self.ui=ui
|
|
|
|
|
self.qcounter=1 #Query counter
|
|
|
|
|
|
|
|
|
|
self.settings = QtCore.QSettings()
|
|
|
|
|
|
|
|
|
|
def checkVersion(self):
|
|
|
|
|
from relational import maintenance
|
|
|
|
|
online=maintenance.check_latest_version()
|
|
|
|
@ -204,7 +212,16 @@ class relForm(QtGui.QMainWindow):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.updateRelations()
|
|
|
|
|
def closeEvent(self, event):
|
|
|
|
|
self.save_settings()
|
|
|
|
|
event.accept()
|
|
|
|
|
def save_settings(self):
|
|
|
|
|
#self.settings.setValue("width",)
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
def restore_settings(self):
|
|
|
|
|
#self.settings.value('session_name','default').toString()
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
def showSurvey(self):
|
|
|
|
|
if self.Survey==None:
|
|
|
|
@ -214,6 +231,7 @@ class relForm(QtGui.QMainWindow):
|
|
|
|
|
ui.setupUi(self.Survey)
|
|
|
|
|
self.Survey.setDefaultValues()
|
|
|
|
|
self.Survey.show()
|
|
|
|
|
|
|
|
|
|
def showAbout(self):
|
|
|
|
|
if self.About==None:
|
|
|
|
|
self.About = QtGui.QDialog()
|
|
|
|
@ -294,4 +312,3 @@ class relForm(QtGui.QMainWindow):
|
|
|
|
|
def addSymbolInQuery(self,symbol):
|
|
|
|
|
self.ui.txtQuery.insert(symbol)
|
|
|
|
|
self.ui.txtQuery.setFocus()
|
|
|
|
|
|