summaryrefslogtreecommitdiffstats
path: root/kspread/plugins/scripting/scripts/exporthtml
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/plugins/scripting/scripts/exporthtml')
-rwxr-xr-xkspread/plugins/scripting/scripts/exporthtml/ExportHtml.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py b/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
index 529a2d26c..d38771fc8 100755
--- a/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
+++ b/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
@@ -16,30 +16,30 @@ Dual-licensed under LGPL v2+higher and the BSD license.
import os, sys
try:
- import qt
+ from TQt import qt
except (ImportError):
- raise "Failed to import the required PyQt python module."
+ raise "Failed to import the required PyTQt python module."
-class Dialog(qt.QDialog):
+class Dialog(tqt.QDialog):
def __init__(self, scriptpath, parent):
self.scriptpath = scriptpath
import krosskspreadcore
self.doc = krosskspreadcore.get("KSpreadDocument")
- import qt
- qt.QDialog.__init__(self, parent, "Dialog", 1, qt.Qt.WDestructiveClose)
+ from TQt import qt
+ qt.TQDialog.__init__(self, parent, "Dialog", 1, qt.TQt.WDestructiveClose)
self.setCaption("Export to HTML File")
- layout = qt.QVBoxLayout(self)
- box = qt.QVBox(self)
+ layout = qt.TQVBoxLayout(self)
+ box = qt.TQVBox(self)
box.setMargin(10)
box.setSpacing(10)
layout.addWidget(box)
- sheetbox = qt.QHBox(box)
+ sheetbox = qt.TQHBox(box)
sheetbox.setSpacing(6)
- sheetlabel = qt.QLabel("Sheet:",sheetbox)
- self.sheetcombo = qt.QComboBox(sheetbox)
+ sheetlabel = qt.TQLabel("Sheet:",sheetbox)
+ self.sheetcombo = qt.TQComboBox(sheetbox)
currentsheetname = self.doc.currentSheet().name()
for sheetname in self.doc.sheetNames():
self.sheetcombo.insertItem(sheetname)
@@ -65,10 +65,10 @@ class Dialog(qt.QDialog):
,
}
- stylebox = qt.QHBox(box)
+ stylebox = qt.TQHBox(box)
stylebox.setSpacing(6)
- stylelabel = qt.QLabel("Style:",stylebox)
- self.stylecombo = qt.QComboBox(stylebox)
+ stylelabel = qt.TQLabel("Style:",stylebox)
+ self.stylecombo = qt.TQComboBox(stylebox)
stylenames = self.styles.keys()
stylenames.sort()
for stylename in stylenames:
@@ -76,32 +76,32 @@ class Dialog(qt.QDialog):
stylelabel.setBuddy(self.stylecombo)
stylebox.setStretchFactor(self.stylecombo,1)
- filebox = qt.QHBox(box)
+ filebox = qt.TQHBox(box)
filebox.setSpacing(6)
- filelabel = qt.QLabel("File:",filebox)
- self.fileedit = qt.QLineEdit(self.getDefaultFile(),filebox)
- btn = qt.QPushButton("...",filebox)
- qt.QObject.connect(btn, qt.SIGNAL("clicked()"),self.browseClicked)
+ filelabel = qt.TQLabel("File:",filebox)
+ self.fileedit = qt.TQLineEdit(self.getDefaultFile(),filebox)
+ btn = qt.TQPushButton("...",filebox)
+ qt.TQObject.connect(btn, qt.SIGNAL("clicked()"),self.browseClicked)
filelabel.setBuddy(self.fileedit)
filebox.setStretchFactor(self.fileedit,1)
- btnbox = qt.QHBox(box)
+ btnbox = qt.TQHBox(box)
btnbox.setSpacing(6)
- okbtn = qt.QPushButton(btnbox)
+ okbtn = qt.TQPushButton(btnbox)
okbtn.setText("Export")
okbtn.setDefault(True)
- qt.QObject.connect(okbtn,qt.SIGNAL("clicked()"),self.startExport)
- cancelbtn = qt.QPushButton(btnbox)
+ qt.TQObject.connect(okbtn,qt.SIGNAL("clicked()"),self.startExport)
+ cancelbtn = qt.TQPushButton(btnbox)
cancelbtn.setText("Cancel")
- qt.QObject.connect(cancelbtn,qt.SIGNAL("clicked()"),self.close)
+ qt.TQObject.connect(cancelbtn,qt.SIGNAL("clicked()"),self.close)
box.setMinimumWidth(480)
def browseClicked(self):
- import qt
- filename = str( qt.QFileDialog.getSaveFileName(str(self.fileedit.text()),"*.htm *.html *.xhtml;;*", self) )
+ from TQt import qt
+ filename = str( qt.TQFileDialog.getSaveFileName(str(self.fileedit.text()),"*.htm *.html *.xhtml;;*", self) )
if filename != "": self.fileedit.setText(filename)
-
+
def getDefaultFile(self):
import os
try:
@@ -119,7 +119,7 @@ class Dialog(qt.QDialog):
return os.path.join(homepath, "kspreadexport.html")
def startExport(self):
- import qt
+ from TQt import qt
sheetname = str( self.sheetcombo.currentText() )
sheet = self.doc.sheetByName( sheetname )
@@ -129,7 +129,7 @@ class Dialog(qt.QDialog):
try:
file = open(filename, "w")
except IOError, (errno, strerror):
- qt.QMessageBox.critical(self,"Error","<qt>Failed to create HTML file \"%s\"<br><br>%s</qt>" % (filename,strerror))
+ qt.TQMessageBox.critical(self,"Error","<qt>Failed to create HTML file \"%s\"<br><br>%s</qt>" % (filename,strerror))
return
file.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n")
@@ -170,7 +170,7 @@ class Dialog(qt.QDialog):
if __name__ == "__main__":
scriptpath = os.getcwd()
- qtapp = qt.QApplication(sys.argv)
+ qtapp = qt.TQApplication(sys.argv)
else:
scriptpath = os.path.dirname(__name__)
qtapp = qt.tqApp