diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
commit | 94844816550ad672ccfcdc25659c625546239998 (patch) | |
tree | e35fc60fd736c645d59f6408af032774ad8023d3 /kexi/plugins/scripting/scripts | |
parent | 2a811c38c74c03648ecf857e566c44483cbad706 (diff) | |
download | koffice-94844816550ad672ccfcdc25659c625546239998.tar.gz koffice-94844816550ad672ccfcdc25659c625546239998.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kexi/plugins/scripting/scripts')
4 files changed, 22 insertions, 22 deletions
diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py index 6f75bdea..f244ae39 100644 --- a/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py +++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py @@ -93,10 +93,10 @@ def runGuiApp(copycenter, name): qt.QDialog.__init__(self, parent, "ProgressDialog", 1) self.parent = parent self.setCaption(caption) - tqlayout = qt.QVBoxLayout(self) + layout = qt.QVBoxLayout(self) box = qt.QVBox(self) box.setMargin(2) - tqlayout.addWidget(box) + layout.addWidget(box) self.listview = qt.QListView(box) self.listview.setAllColumnsShowFocus(True) self.listview.header().setStretchEnabled(True,0) @@ -216,7 +216,7 @@ def runGuiApp(copycenter, name): print "CopyJobWidget.writeOptions" writer.write("<%s plugin=\"%s\">\n" % (plugininst.plugintype, pluginname)) for optionname in plugininst.options: - value = self.escape( tqunicode(plugininst.options[optionname]).encode("utf-8") ) + value = self.escape( unicode(plugininst.options[optionname]).encode("utf-8") ) writer.write("\t<%s value=\"%s\" />\n" % (optionname,value)) writer.write("</%s>\n" % plugininst.plugintype) @@ -309,31 +309,31 @@ def runGuiApp(copycenter, name): self.starttime = None qt.QDialog.__init__(self, dialog, "ProgressDialog", 1) self.setCaption("Copying...") - tqlayout = qt.QVBoxLayout(self) + layout = qt.QVBoxLayout(self) box = qt.QVBox(self) box.setSpacing(6) box.setMargin(6) - tqlayout.addWidget(box) + layout.addWidget(box) self.textbrowser = qt.QTextBrowser(box) self.textbrowser.setWordWrap(qt.QTextEdit.WidgetWidth) self.textbrowser.setTextFormat(qt.Qt.RichText) statusbox = qt.QFrame(box) - tqlayout = qt.QGridLayout(statusbox,4,2,0,2) - tqlayout.addWidget(qt.QLabel("Number of records done:",statusbox),0,0) + layout = qt.QGridLayout(statusbox,4,2,0,2) + layout.addWidget(qt.QLabel("Number of records done:",statusbox),0,0) self.donecounter = 0 self.donelabel = qt.QLabel("-",statusbox) - tqlayout.addWidget(self.donelabel,0,1) - tqlayout.addWidget(qt.QLabel("Successfully copied records:",statusbox),1,0) + layout.addWidget(self.donelabel,0,1) + layout.addWidget(qt.QLabel("Successfully copied records:",statusbox),1,0) self.successcounter = 0 self.successlabel = qt.QLabel("-",statusbox) - tqlayout.addWidget(self.successlabel,1,1) - tqlayout.addWidget(qt.QLabel("Failed to copy records:",statusbox),2,0) + layout.addWidget(self.successlabel,1,1) + layout.addWidget(qt.QLabel("Failed to copy records:",statusbox),2,0) self.failedcounter = 0 self.failedlabel = qt.QLabel("-",statusbox) - tqlayout.addWidget(self.failedlabel,2,1) - tqlayout.addWidget(qt.QLabel("Elapsed time in seconds:",statusbox),3,0) + layout.addWidget(self.failedlabel,2,1) + layout.addWidget(qt.QLabel("Elapsed time in seconds:",statusbox),3,0) self.elapsedlabel = qt.QLabel("-",statusbox) - tqlayout.addWidget(self.elapsedlabel,3,1) + layout.addWidget(self.elapsedlabel,3,1) btnbox = qt.QHBox(box) btnbox.setSpacing(6) self.donebtn = qt.QPushButton(btnbox) @@ -530,11 +530,11 @@ def runGuiApp(copycenter, name): self.ListViewDialog = ListViewDialog qt.QDialog.__init__(self, parent, "Dialog", 1, qt.Qt.WDestructiveClose) self.setCaption("Copy Center") - tqlayout = qt.QVBoxLayout(self) + layout = qt.QVBoxLayout(self) box = qt.QVBox(self) box.setMargin(6) box.setSpacing(6) - tqlayout.addWidget(box) + layout.addWidget(box) self.tab = qt.QTabWidget(box) self.tab.setMargin(6) box.setStretchFactor(self.tab,1) diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py index 678cf40b..985d757d 100644 --- a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py +++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py @@ -84,7 +84,7 @@ class CopyCenterPlugin: return None record = [] for fieldname in self.fieldlist: - record.append( tqunicode(self.cursor.value(fieldname).toString()).encode("latin-1") ) + record.append( unicode(self.cursor.value(fieldname).toString()).encode("latin-1") ) #print "read record: %s" % record return record @@ -145,8 +145,8 @@ class CopyCenterPlugin: cursorrecord.setValue(self.fieldlist[i], v) rowcount = self.cursor.insert() if rowcount < 1: - drv = tqunicode(self.cursor.lastError().driverText()).encode("latin-1") - db = tqunicode(self.cursor.lastError().databaseText()).encode("latin-1") + drv = unicode(self.cursor.lastError().driverText()).encode("latin-1") + db = unicode(self.cursor.lastError().databaseText()).encode("latin-1") print "failed: %s %s" % (drv,db) self.copierer.writeFailed(record) else: diff --git a/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py b/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py index d0d1f0cc..cace0340 100644 --- a/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py +++ b/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py @@ -131,7 +131,7 @@ class HtmlExporter: if items == None: break output.write("<tr>") for item in items: - u = tqunicode(str(self.htmlescape(item)),"latin-1") + u = unicode(str(self.htmlescape(item)),"latin-1") output.write("<td>%s</td>" % u.encode("utf-8")) output.write("</tr>\n") output.write("</table>\n") diff --git a/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py b/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py index 6ca94f9a..200b3dee 100755 --- a/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py +++ b/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py @@ -124,9 +124,9 @@ class SaxInput: was parsed. """ if self.field != None: - # the xml-data is tqunicode and we need to encode it + # the xml-data is unicode and we need to encode it # to latin-1 cause KexiDB deals only with latin-1. - u = tqunicode(chars[offset:offset+length]) + u = unicode(chars[offset:offset+length]) self.field.append(u.encode("latin-1")) # start the job |