saving fixed

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@68 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2008-11-30 14:39:49 +07:00
parent efbbbeba35
commit 907e774d73
7 changed files with 20 additions and 70 deletions

@ -20,10 +20,10 @@
from PyQt4 import QtCore, QtGui
try: #If QtWebKit is available, uses it
from PyQt4 import QtWebKit
webk=True
from PyQt4 import QtWebKit
webk=True
except:
webk=False
webk=False
import relational
class Ui_Dialog(object):
@ -84,16 +84,18 @@ class Ui_Dialog(object):
self.verticalLayout_7 = QtGui.QVBoxLayout(self.tab_2)
self.verticalLayout_7.setObjectName("verticalLayout_7")
if (webk):
self.webView = QtWebKit.QWebView(self.tab_2)
self.webView.setUrl(QtCore.QUrl("http://galileo.dmi.unict.it/wiki/relational/doku.php"))
self.webView.setObjectName("webView")
self.verticalLayout_7.addWidget(self.webView)
else:
self.webError = QtGui.QLabel(self.groupBox)
self.webError.setFont(font)
self.webError.setObjectName("lblError")
self.verticalLayout_7.addWidget(self.webError)
self.webError.setText(QtGui.QApplication.translate("Dialog", "Error! Unable to import QtWebKit module.", None, QtGui.QApplication.UnicodeUTF8))
self.webView = QtWebKit.QWebView(self.tab_2)
self.webView.setUrl(QtCore.QUrl("http://galileo.dmi.unict.it/wiki/relational/doku.php"))
self.webView.setObjectName("webView")
self.verticalLayout_7.addWidget(self.webView)
else:
self.webError = QtGui.QLabel(self.groupBox)
self.webError.setFont(font)
self.webError.setObjectName("lblError")
self.verticalLayout_7.addWidget(self.webError)
self.webError.setText(QtGui.QApplication.translate("Dialog", "Error! Unable to import QtWebKit module.", None,
QtGui.QApplication.UnicodeUTF8))
self.tabWidget.addTab(self.tab_2,"")
self.verticalLayout_2.addWidget(self.tabWidget)
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
@ -106,7 +108,7 @@ class Ui_Dialog(object):
self.tabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("accepted()"),Dialog.accept)
QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("rejected()"),Dialog.reject)
#QtCore.QObject.connect(self.label_4,QtCore.SIGNAL("linkActivated()"),self.openSite)
#QtCore.QObject.connect(self.label_4,QtCore.SIGNAL("linkActivated()"),self.openSite)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def openSite(self):
print "ciao"
@ -115,14 +117,13 @@ class Ui_Dialog(object):
self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", "Relational", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("Dialog", "Relational", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("Dialog", "Version "+relational.version, None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.label_3.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.groupBox_3.setTitle(QtGui.QApplication.translate("Dialog", "Author", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("Dialog", "Salvo \"LtWorf\" Tomaselli <tiposchi@tiscali.it>", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.label_2.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.groupBox_2.setTitle(QtGui.QApplication.translate("Dialog", "Links", None, QtGui.QApplication.UnicodeUTF8))
self.label_4.setText(QtGui.QApplication.translate("Dialog", "http://galileo.dmi.unict.it/wiki/relational/", None, QtGui.QApplication.UnicodeUTF8))
self.label_4.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.label_4.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("Dialog", "About", None, QtGui.QApplication.UnicodeUTF8))
self.textEdit.setHtml(QtGui.QApplication.translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><title>GNU General Public License - GNU Project - Free Software Foundation (FSF)</title><style type=\"text/css\">\n"

@ -98,7 +98,7 @@ class Ui_Form(object):
filename+=".csv"
for i in self.lstRelations.selectedItems():
self.relations[str(i.text().toUtf8())].save(filename,use_csv)
self.relations[str(i.text().toUtf8())].save(filename)
return
def unloadRelation(self):
for i in self.lstRelations.selectedItems():

@ -1,6 +0,0 @@
date
2008-12-12
2007-08-12
1985-05-09
1988-4-21
1992-7-27

@ -1,9 +0,0 @@
id name chief age
0 jack 0 22
1 carl 0 20
2 john 1 30
3 dean 1 33
4 eve 0 25
5 duncan 4 30
6 paul 4 30
7 alia 1 28

@ -1,9 +0,0 @@
id room
0 1
1 4
2 2
3 2
4 5
5 1
6 5
7 1

@ -1,9 +0,0 @@
room phone
0 1515
1 1516
2 1617
3 1601
4 1041
5 9212
6 1424
7 1294

@ -1,18 +0,0 @@
id skill
0 C
0 Python
1 Python
1 C++
1 SystemAdmin
2 C
2 PHP
3 C++
4 C++
4 C
4 Perl
5 Perl
5 C
7 Python
7 C
7 PHP
9 Java