summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2023-01-23 15:51:24 +0100
committerSlávek Banko <[email protected]>2023-01-23 15:51:24 +0100
commit21c6548234338921fe97ec67148e9fa753c694b4 (patch)
tree3432057bff20868f762ffe12fe42924be193dce4 /lib
parent86480e58eafc1fa3486e03155ed34e02b4595a24 (diff)
downloadkoffice-21c6548234338921fe97ec67148e9fa753c694b4.tar.gz
koffice-21c6548234338921fe97ec67148e9fa753c694b4.zip
Update after renaming qt => tqt in PyTQt module.
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/kformula/prototype/engine.py2
-rwxr-xr-xlib/kformula/prototype/main.py2
-rwxr-xr-xlib/kformula/prototype/unicode.py2
-rwxr-xr-xlib/kformula/scripts/bycodes.py8
-rwxr-xr-xlib/kross/python/scripts/gui.py78
-rw-r--r--lib/kross/test/testgui.py50
6 files changed, 71 insertions, 71 deletions
diff --git a/lib/kformula/prototype/engine.py b/lib/kformula/prototype/engine.py
index 4ad207f9..a0d6ab1f 100644
--- a/lib/kformula/prototype/engine.py
+++ b/lib/kformula/prototype/engine.py
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
"""
-from PyTQt.qt import *
+from PyTQt.tqt import *
class BasicElement:
diff --git a/lib/kformula/prototype/main.py b/lib/kformula/prototype/main.py
index 953bc060..c5855340 100755
--- a/lib/kformula/prototype/main.py
+++ b/lib/kformula/prototype/main.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import sys
-from TQt.qt import *
+from TQt.tqt import *
from engine import Widget
diff --git a/lib/kformula/prototype/unicode.py b/lib/kformula/prototype/unicode.py
index ca495d25..10e0f848 100755
--- a/lib/kformula/prototype/unicode.py
+++ b/lib/kformula/prototype/unicode.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import sys
-from TQt.qt import *
+from TQt.tqt import *
from xml.sax import saxutils, handler, make_parser
class Form1(TQWidget):
diff --git a/lib/kformula/scripts/bycodes.py b/lib/kformula/scripts/bycodes.py
index fdd84269..24a2954d 100755
--- a/lib/kformula/scripts/bycodes.py
+++ b/lib/kformula/scripts/bycodes.py
@@ -20,7 +20,7 @@
"""
import sys
import string
-from TQt import qt
+from TQt import tqt
def decode( fd, font, line ):
begin = string.find( line, '"' )
@@ -39,10 +39,10 @@ def decode( fd, font, line ):
char_list.append( string.atoi( second, 16 ) )
else:
char_list.append( string.atoi ( str, 16 ) )
- fm = qt.TQFontMetrics( qt.TQFont( font ) )
+ fm = tqt.TQFontMetrics( tqt.TQFont( font ) )
in_font = True
for c in char_list:
- if not fm.inFont( qt.TQChar( c ) ):
+ if not fm.inFont( tqt.TQChar( c ) ):
in_font = False
fd.write( str + ' ' + str( in_font ) + '\n')
@@ -56,7 +56,7 @@ def parse( file, font ):
line = fd.readline()
if __name__ == '__main__':
- a = qt.TQApplication( sys.argv )
+ a = tqt.TQApplication( sys.argv )
if len( sys.argv ) == 2:
sys.argv.append( 'Arev Sans' )
parse ( sys.argv[1], sys.argv[2] )
diff --git a/lib/kross/python/scripts/gui.py b/lib/kross/python/scripts/gui.py
index 693261dd..aa4dc986 100755
--- a/lib/kross/python/scripts/gui.py
+++ b/lib/kross/python/scripts/gui.py
@@ -184,64 +184,64 @@ class TQtDialog:
""" This class is used to wrap PyTQt/PyTDE into a more abstract interface."""
def __init__(self, title):
- from TQt import qt
+ from TQt import tqt
- class Dialog(qt.TQDialog):
+ class Dialog(tqt.TQDialog):
def __init__(self, parent = None, name = None, modal = 0, fl = 0):
- qt.TQDialog.__init__(self, parent, name, modal, fl)
- qt.TQDialog.accept = self.accept
- self.layout = qt.TQVBoxLayout(self)
+ tqt.TQDialog.__init__(self, parent, name, modal, fl)
+ tqt.TQDialog.accept = self.accept
+ self.layout = tqt.TQVBoxLayout(self)
self.layout.setSpacing(6)
self.layout.setMargin(11)
- class Label(qt.TQLabel):
+ class Label(tqt.TQLabel):
def __init__(self, dialog, parent, caption):
- qt.TQLabel.__init__(self, parent)
+ tqt.TQLabel.__init__(self, parent)
self.setText("<qt>%s</qt>" % caption.replace("\n","<br>"))
- class Frame(qt.TQHBox):
+ class Frame(tqt.TQHBox):
def __init__(self, dialog, parent):
- qt.TQHBox.__init__(self, parent)
+ tqt.TQHBox.__init__(self, parent)
self.widget = self
self.setSpacing(6)
- class Edit(qt.TQHBox):
+ class Edit(tqt.TQHBox):
def __init__(self, dialog, parent, caption, text):
- qt.TQHBox.__init__(self, parent)
+ tqt.TQHBox.__init__(self, parent)
self.setSpacing(6)
- label = qt.TQLabel(caption, self)
- self.edit = qt.TQLineEdit(self)
+ label = tqt.TQLabel(caption, self)
+ self.edit = tqt.TQLineEdit(self)
self.edit.setText( str(text) )
self.setStretchFactor(self.edit, 1)
label.setBuddy(self.edit)
def get(self):
return self.edit.text()
- class Button(qt.TQPushButton):
+ class Button(tqt.TQPushButton):
#def __init__(self, *args):
def __init__(self, dialog, parent, caption, commandmethod):
- #apply(qt.TQPushButton.__init__, (self,) + args)
- qt.TQPushButton.__init__(self, parent)
+ #apply(tqt.TQPushButton.__init__, (self,) + args)
+ tqt.TQPushButton.__init__(self, parent)
self.commandmethod = commandmethod
self.setText(caption)
- qt.TQObject.connect(self, qt.SIGNAL("clicked()"), self.commandmethod)
+ tqt.TQObject.connect(self, tqt.SIGNAL("clicked()"), self.commandmethod)
- class CheckBox(qt.TQCheckBox):
+ class CheckBox(tqt.TQCheckBox):
def __init__(self, dialog, parent, caption, checked = True):
#TkDialog.Widget.__init__(self, dialog, parent)
- qt.TQCheckBox.__init__(self, parent)
+ tqt.TQCheckBox.__init__(self, parent)
self.setText(caption)
self.setChecked(checked)
#def isChecked(self):
# return self.isChecked()
- class List(qt.TQHBox):
+ class List(tqt.TQHBox):
def __init__(self, dialog, parent, caption, items):
- qt.TQHBox.__init__(self, parent)
+ tqt.TQHBox.__init__(self, parent)
self.setSpacing(6)
- label = qt.TQLabel(caption, self)
- self.combo = qt.TQComboBox(self)
+ label = tqt.TQLabel(caption, self)
+ self.combo = tqt.TQComboBox(self)
self.setStretchFactor(self.combo, 1)
label.setBuddy(self.combo)
for item in items:
@@ -251,24 +251,24 @@ class TQtDialog:
def set(self, index):
self.combo.setCurrentItem(index)
- class FileChooser(qt.TQHBox):
+ class FileChooser(tqt.TQHBox):
def __init__(self, dialog, parent, caption, initialfile = None, filetypes = None):
- #apply(qt.TQHBox.__init__, (self,) + args)
- qt.TQHBox.__init__(self, parent)
+ #apply(tqt.TQHBox.__init__, (self,) + args)
+ tqt.TQHBox.__init__(self, parent)
self.setMinimumWidth(400)
self.initialfile = initialfile
self.filetypes = filetypes
self.setSpacing(6)
- label = qt.TQLabel(caption, self)
- self.edit = qt.TQLineEdit(self)
+ label = tqt.TQLabel(caption, self)
+ self.edit = tqt.TQLineEdit(self)
self.edit.setText(self.initialfile)
self.setStretchFactor(self.edit, 1)
label.setBuddy(self.edit)
browsebutton = Button(dialog, self, "...", self.browseButtonClicked)
- #qt.TQObject.connect(browsebutton, qt.SIGNAL("clicked()"), self.browseButtonClicked)
+ #tqt.TQObject.connect(browsebutton, tqt.SIGNAL("clicked()"), self.browseButtonClicked)
def get(self):
return self.edit.text()
@@ -294,9 +294,9 @@ class TQtDialog:
import tdefile
filename = tdefile.KFileDialog.getOpenFileName(self.initialfile, filtermask, self, "Save to file")
except:
- print("TQtDialog.FileChooser.browseButtonClicked() qt.TQFileDialog")
+ print("TQtDialog.FileChooser.browseButtonClicked() tqt.TQFileDialog")
# fallback to TQt filedialog
- filename = qt.TQFileDialog.getOpenFileName(self.initialfile, filtermask, self, "Save to file")
+ filename = tqt.TQFileDialog.getOpenFileName(self.initialfile, filtermask, self, "Save to file")
if filename != None and filename != "":
self.edit.setText(filename)
@@ -309,19 +309,19 @@ class TQtDialog:
def show(self):
result = 1
if self.typename == "okcancel":
- result = qt.TQMessageBox.question(self.widget, self.caption, self.message, "&Ok", "&Cancel", "", 1)
+ result = tqt.TQMessageBox.question(self.widget, self.caption, self.message, "&Ok", "&Cancel", "", 1)
else:
- qt.TQMessageBox.information(self.widget, self.caption, self.message, "&Ok")
+ tqt.TQMessageBox.information(self.widget, self.caption, self.message, "&Ok")
result = 0
if result == 0:
return True
return False
- self.app = qt.tqApp
- self.dialog = Dialog(self.app.mainWidget(), "Dialog", 1, qt.TQt.WDestructiveClose)
+ self.app = tqt.tqApp
+ self.dialog = Dialog(self.app.mainWidget(), "Dialog", 1, tqt.TQt.WDestructiveClose)
self.dialog.setCaption(title)
- self.widget = qt.TQVBox(self.dialog)
+ self.widget = tqt.TQVBox(self.dialog)
self.widget.setSpacing(6)
self.dialog.layout.addWidget(self.widget)
@@ -335,10 +335,10 @@ class TQtDialog:
self.MessageBox = MessageBox
def show(self):
- from TQt import qt
- qt.TQApplication.setOverrideCursor(qt.TQt.arrowCursor)
+ from TQt import tqt
+ tqt.TQApplication.setOverrideCursor(tqt.TQt.arrowCursor)
self.dialog.exec_loop()
- qt.TQApplication.restoreOverrideCursor()
+ tqt.TQApplication.restoreOverrideCursor()
def close(self):
print("TQtDialog.close()")
diff --git a/lib/kross/test/testgui.py b/lib/kross/test/testgui.py
index 0a3cf822..9c2747e8 100644
--- a/lib/kross/test/testgui.py
+++ b/lib/kross/test/testgui.py
@@ -37,37 +37,37 @@ class TkTest:
class TQtTest:
def __init__(self):
- from TQt import qt
+ from TQt import tqt
- class Button(qt.TQPushButton):
+ class Button(tqt.TQPushButton):
def __init__(self, *args):
- qt.TQPushButton.__init__(*(self,) + args)
+ tqt.TQPushButton.__init__(*(self,) + args)
- class ComboBox(qt.TQHBox):
+ class ComboBox(tqt.TQHBox):
def __init__(self, parent, caption, items = []):
- qt.TQHBox.__init__(self, parent)
+ tqt.TQHBox.__init__(self, parent)
self.setSpacing(6)
- label = qt.TQLabel(str(caption), self)
- self.combobox = qt.TQComboBox(self)
+ label = tqt.TQLabel(str(caption), self)
+ self.combobox = tqt.TQComboBox(self)
self.setStretchFactor(self.combobox, 1)
label.setBuddy(self.combobox)
for item in items:
self.combobox.insertItem( str(item) )
- class FileChooser(qt.TQHBox):
+ class FileChooser(tqt.TQHBox):
def __init__(self, *args):
- qt.TQHBox.__init__(*(self,) + args)
+ tqt.TQHBox.__init__(*(self,) + args)
self.defaultfilename = "~/output.html"
self.setSpacing(6)
- label = qt.TQLabel("File:", self)
- self.edit = qt.TQLineEdit(self)
+ label = tqt.TQLabel("File:", self)
+ self.edit = tqt.TQLineEdit(self)
self.edit.setText(self.defaultfilename)
self.setStretchFactor(self.edit, 1)
label.setBuddy(self.edit)
browsebutton = Button("...", self)
- qt.TQObject.connect(browsebutton, qt.SIGNAL("clicked()"), self.browseButtonClicked)
+ tqt.TQObject.connect(browsebutton, tqt.SIGNAL("clicked()"), self.browseButtonClicked)
def file(self):
return self.edit.text()
@@ -80,22 +80,22 @@ class TQtTest:
filename = tdefile.KFileDialog.getOpenFileName(self.defaultfilename, "*.html", self, "Save to file")
except:
# fallback to TQt filedialog
- filename = qt.TQFileDialog.getOpenFileName(self.defaultfilename, "*.html", self, "Save to file")
+ filename = tqt.TQFileDialog.getOpenFileName(self.defaultfilename, "*.html", self, "Save to file")
if filename != None and filename != "":
self.edit.setText(filename)
- class Dialog(qt.TQDialog):
+ class Dialog(tqt.TQDialog):
def __init__(self, parent = None, name = None, modal = 0, fl = 0):
- qt.TQDialog.__init__(self, parent, name, modal, fl)
- qt.TQDialog.accept = self.accept
+ tqt.TQDialog.__init__(self, parent, name, modal, fl)
+ tqt.TQDialog.accept = self.accept
self.setCaption("Export to HTML")
#self.layout()
- self.layout = qt.TQVBoxLayout(self)
+ self.layout = tqt.TQVBoxLayout(self)
self.layout.setSpacing(6)
self.layout.setMargin(11)
- infolabel = qt.TQLabel("Export the data of a table or a query to a HTML-file.", self)
+ infolabel = tqt.TQLabel("Export the data of a table or a query to a HTML-file.", self)
self.layout.addWidget(infolabel)
source = ComboBox(self, "Datasource:")
@@ -107,21 +107,21 @@ class TQtTest:
self.filechooser = FileChooser(self)
self.layout.addWidget(self.filechooser)
- buttonbox = qt.TQHBox(self)
+ buttonbox = tqt.TQHBox(self)
buttonbox.setSpacing(6)
self.layout.addWidget(buttonbox)
savebutton = Button("Save", buttonbox)
- qt.TQObject.connect(savebutton, qt.SIGNAL("clicked()"), self, qt.SLOT("accept()"))
- #qt.TQObject.connect(savebutton, qt.SIGNAL("clicked()"), self.exportButtonClicked)
+ tqt.TQObject.connect(savebutton, tqt.SIGNAL("clicked()"), self, tqt.SLOT("accept()"))
+ #tqt.TQObject.connect(savebutton, tqt.SIGNAL("clicked()"), self.exportButtonClicked)
cancelbutton = Button("Cancel", buttonbox)
- qt.TQObject.connect(cancelbutton, qt.SIGNAL("clicked()"), self, qt.SLOT("close()"))
+ tqt.TQObject.connect(cancelbutton, tqt.SIGNAL("clicked()"), self, tqt.SLOT("close()"))
def accept(self):
print("ACCEPTTTTTTTT !!!!!!!!!!!!!!!!!!!!!!!!!!!!")
- file = qt.TQFile( self.filechooser.file() )
+ file = tqt.TQFile( self.filechooser.file() )
#if not file.exists():
# print "File '%s' does not exist." % self.filechooser.file()
#else:
@@ -137,9 +137,9 @@ class TQtTest:
print("=> Dialog.event %s" % e)
#self.deleteLater()
#support.swapThreadState() # calls appropriate c-function
- return qt.TQDialog.event(self, e)
+ return tqt.TQDialog.event(self, e)
- app = qt.tqApp
+ app = tqt.tqApp
dialog = Dialog(app.mainWidget(), "Dialog", 1)
dialog.show()