summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py')
-rw-r--r--kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
index 985d757d8..de553b920 100644
--- a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
+++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
@@ -39,8 +39,8 @@ class CopyCenterPlugin:
def finish(self):
self.isfinished = True
self.widget.disconnectClicked()
- def createWidget(self,dialog,parent):
- return self.copycenterplugin.widget(dialog, self, parent)
+ def createWidget(self,dialog,tqparent):
+ return self.copycenterplugin.widget(dialog, self, tqparent)
class Source(Plugin):
plugintype = "Source"
@@ -84,7 +84,7 @@ class CopyCenterPlugin:
return None
record = []
for fieldname in self.fieldlist:
- record.append( unicode(self.cursor.value(fieldname).toString()).encode("latin-1") )
+ record.append( tqunicode(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 = unicode(self.cursor.lastError().driverText()).encode("latin-1")
- db = unicode(self.cursor.lastError().databaseText()).encode("latin-1")
+ drv = tqunicode(self.cursor.lastError().driverText()).encode("latin-1")
+ db = tqunicode(self.cursor.lastError().databaseText()).encode("latin-1")
print "failed: %s %s" % (drv,db)
self.copierer.writeFailed(record)
else:
@@ -209,7 +209,7 @@ class CopyCenterPlugin:
""" Constructor. """
pass
- def widget(self,dialog,plugin,parent):
+ def widget(self,dialog,plugin,tqparent):
""" Each plugin may provide a qt.QWidget back to the
CopyCenter.py. The widget will be used to configure our
plugin settings. """
@@ -246,7 +246,7 @@ class CopyCenterPlugin:
class FieldsDialog(ListViewDialog):
def __init__(self, mainwidget):
- ListViewDialog.__init__(self,parent,"Fields")
+ ListViewDialog.__init__(self,tqparent,"Fields")
self.mainwidget = mainwidget
self.listview.setSelectionMode(qt.QListView.Multi)
self.listview.setSorting(-1)
@@ -280,14 +280,14 @@ class CopyCenterPlugin:
class MainWidget(qt.QHBox):
- def __init__(self,plugin,dialog,parent):
+ def __init__(self,plugin,dialog,tqparent):
import qt
import qtsql
- qt.QHBox.__init__(self,parent)
+ qt.QHBox.__init__(self,tqparent)
self.dialog = dialog
self.plugin = plugin
- self.connectionbox = qt.QVBox(parent)
+ self.connectionbox = qt.QVBox(tqparent)
self.connectionbox.setSpacing(2)
driverbox = qt.QHBox(self.connectionbox)
@@ -331,7 +331,7 @@ class CopyCenterPlugin:
dblabel.setBuddy(self.dbedit)
dbbox.setStretchFactor(self.dbedit,1)
- statusbar = qt.QHBox(parent)
+ statusbar = qt.QHBox(tqparent)
statusbar.setSpacing(2)
statusbar.setStretchFactor(qt.QWidget(statusbar),1)
self.connectbtn = qt.QPushButton("Connect",statusbar)
@@ -340,7 +340,7 @@ class CopyCenterPlugin:
self.disconnectbtn.setEnabled(False)
qt.QObject.connect(self.disconnectbtn, qt.SIGNAL("clicked()"),self.disconnectClicked)
- tablebox = qt.QHBox(parent)
+ tablebox = qt.QHBox(tqparent)
tablelabel = qt.QLabel("Table:",tablebox)
self.tableedit = qt.QLineEdit(self.plugin.options['table'],tablebox)
qt.QObject.connect(self.tableedit, qt.SIGNAL("textChanged(const QString&)"), self.tableEditChanged)
@@ -350,7 +350,7 @@ class CopyCenterPlugin:
tablelabel.setBuddy(self.tableedit)
tablebox.setStretchFactor(self.tableedit,1)
- fieldbox = qt.QHBox(parent)
+ fieldbox = qt.QHBox(tqparent)
fieldlabel = qt.QLabel("Fields:",fieldbox)
self.fieldedit = qt.QLineEdit(self.plugin.options['fields'],fieldbox)
self.fieldbtn = qt.QPushButton("...",fieldbox)
@@ -360,7 +360,7 @@ class CopyCenterPlugin:
fieldbox.setStretchFactor(self.fieldedit,1)
if self.plugin.plugintype == "Source":
- box = qt.QHBox(parent)
+ box = qt.QHBox(tqparent)
wherelabel = qt.QLabel("Where:",box)
self.whereedit = qt.QLineEdit(self.plugin.options['where'],box)
wherelabel.setBuddy(self.whereedit)
@@ -368,9 +368,9 @@ class CopyCenterPlugin:
elif self.plugin.plugintype == "Destination":
class OperationBox(qt.QVBox):
- def __init__(self, mainwidget, parent):
+ def __init__(self, mainwidget, tqparent):
self.mainwidget = mainwidget
- qt.QVBox.__init__(self, parent)
+ qt.QVBox.__init__(self, tqparent)
opbox = qt.QHBox(self)
operationlabel = qt.QLabel("Operation:",opbox)
self.mainwidget.operationedit = qt.QComboBox(opbox)
@@ -401,7 +401,7 @@ class CopyCenterPlugin:
1: showUpdate,
}[ self.mainwidget.operationedit.currentItem() ](self)
if self.box != None: self.box.show()
- OperationBox(self,parent)
+ OperationBox(self,tqparent)
def tableEditChanged(self,text):
if self.plugin.database != None and self.plugin.database.isOpen():
@@ -491,5 +491,5 @@ class CopyCenterPlugin:
print "database is closed now!"
self.updateConnectState()
- plugin.widget = MainWidget(plugin,self.dialog,parent)
+ plugin.widget = MainWidget(plugin,self.dialog,tqparent)
return plugin.widget