From 203ba231d0276943aae36111f9ec1e949f3c6a4c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 3 Dec 2011 22:23:44 -0600 Subject: Initial TQt conversion --- templates/annotated/basicapp.py | 6 +++--- templates/annotated/menuapp1.py | 8 ++++---- templates/annotated/menuapp2.py | 12 ++++++------ templates/annotated/menuapp3.py | 2 +- templates/annotated/minimal.py | 4 ++-- templates/annotated/systray.py | 8 ++++---- templates/annotated/systray1.py | 4 ++-- templates/basic/menuapp1.py | 32 ++++++++++++++++---------------- templates/basic/menuapp2.py | 6 +++--- templates/basic/menuapp3.py | 2 +- templates/basic/systray.py | 6 +++--- templates/basic/systray1.py | 2 +- 12 files changed, 46 insertions(+), 46 deletions(-) (limited to 'templates') diff --git a/templates/annotated/basicapp.py b/templates/annotated/basicapp.py index d124b76..8af04b7 100644 --- a/templates/annotated/basicapp.py +++ b/templates/annotated/basicapp.py @@ -77,7 +77,7 @@ aboutData.addAuthor ("author2", "they did something else", "another@email.addres # Pass the command line arguments and aboutData to # KCmdLineArgs - this is where KDE will look for # this information. The KApplication constructor -# used below *requires* the args are processed +# used below *retquires* the args are processed # *before* KApplication is instantiated. There # is an alternate constructor that takes sys.argv # as an argument (see minimal.py) @@ -96,8 +96,8 @@ KCmdLineArgs.init (sys.argv, aboutData) # of tuples KCmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) -# instantiate KApplication - no other QObject -# or QWidget based classes can be instantiated +# instantiate KApplication - no other TQObject +# or TQWidget based classes can be instantiated # until there is a KApplication instance app = KApplication () diff --git a/templates/annotated/menuapp1.py b/templates/annotated/menuapp1.py index 23184eb..0f0f3f5 100644 --- a/templates/annotated/menuapp1.py +++ b/templates/annotated/menuapp1.py @@ -43,7 +43,7 @@ True = not False import sys -from qt import QPopupMenu, SIGNAL +from qt import TQPopupMenu, SIGNAL from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n, KStdAccel, KIcon, KIconLoader from tdeui import KMainWindow, KMessageBox @@ -68,9 +68,9 @@ class MainWin (KMainWindow): self.initStatusBar () def initMenus (self): - # Create a QPopupMenu - all menus are "popup" menus + # Create a TQPopupMenu - all menus are "popup" menus - fileMenu = QPopupMenu (self) + fileMenu = TQPopupMenu (self) # This is the "simple" KDE-1.0 way. It is not suggested that this # template actually be used in an application, but it's @@ -116,7 +116,7 @@ class MainWin (KMainWindow): self.menuBar ().insertItem (i18n ("&File"), fileMenu) - editMenu = QPopupMenu (self) + editMenu = TQPopupMenu (self) # "Edit" menu items editMenu.insertItem (i18n ("Undo"), self.slotUndo, KStdAccel.undo ()) diff --git a/templates/annotated/menuapp2.py b/templates/annotated/menuapp2.py index 6a5e894..b3b3501 100644 --- a/templates/annotated/menuapp2.py +++ b/templates/annotated/menuapp2.py @@ -41,7 +41,7 @@ True = not False import sys -from qt import QPopupMenu, SIGNAL +from qt import TQPopupMenu, SIGNAL from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n from tdeui import KMainWindow, KMessageBox, KStdAction, KAction @@ -67,7 +67,7 @@ class MainWin (KMainWindow): # Create the status bar self.initStatusBar () - # Usings actions, only a single line is required + # Usings actions, only a single line is retquired # to enable/disable both the menu item and corresponding # toolbar button from anywhere in the program self.saveAction.setEnabled (False) @@ -112,15 +112,15 @@ class MainWin (KMainWindow): # or you can use KAction.setIcon to set/change the icon. You # can also add a tooltip with KAction.setToolTip - # This KAction constructor requires a QString, an accelerator (0 - # in this case), a slot, and a QObject (None in this case) + # This KAction constructor retquires a TQString, an accelerator (0 + # in this case), a slot, and a TQObject (None in this case) self.specialAction = KAction (i18n ("Special"), 0, self.slotSpecial, None) def initMenus (self): # plug the actions into the menus - fileMenu = QPopupMenu (self) + fileMenu = TQPopupMenu (self) self.newAction.plug (fileMenu) self.openAction.plug (fileMenu) fileMenu.insertSeparator () @@ -132,7 +132,7 @@ class MainWin (KMainWindow): self.quitAction.plug (fileMenu) self.menuBar ().insertItem (i18n ("&File"), fileMenu) - editMenu = QPopupMenu (self) + editMenu = TQPopupMenu (self) self.undoAction.plug (editMenu) self.redoAction.plug (editMenu) editMenu.insertSeparator () diff --git a/templates/annotated/menuapp3.py b/templates/annotated/menuapp3.py index 3748d84..bcea5e1 100644 --- a/templates/annotated/menuapp3.py +++ b/templates/annotated/menuapp3.py @@ -41,7 +41,7 @@ True = not False import sys -from qt import QPopupMenu, SIGNAL +from qt import TQPopupMenu, SIGNAL from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n from tdeui import KMainWindow, KMessageBox, KStdAction, KAction, KActionCollection diff --git a/templates/annotated/minimal.py b/templates/annotated/minimal.py index a84d39e..e021851 100644 --- a/templates/annotated/minimal.py +++ b/templates/annotated/minimal.py @@ -56,8 +56,8 @@ class MainWin (KMainWindow): #-------------------- main ------------------------------------------------ -# instantiate KApplication - no other QObject -# or QWidget based classes can be instantiated +# instantiate KApplication - no other TQObject +# or TQWidget based classes can be instantiated # until there is a KApplication instance appName = "template" app = KApplication (sys.argv, appName) diff --git a/templates/annotated/systray.py b/templates/annotated/systray.py index 8e86b10..7f7dc93 100644 --- a/templates/annotated/systray.py +++ b/templates/annotated/systray.py @@ -29,7 +29,7 @@ copyright holder. import sys -from qt import QWidget, SIGNAL +from qt import TQWidget, SIGNAL from tdecore import KApplication, KIcon, KIconLoader from tdeui import KSystemTray @@ -42,13 +42,13 @@ KMainWindow is closed, it also shuts down KApplication and the program terminates. One way around that (not necessarily the best way - see systray1.py) -is to make the "main window" a QWidget or other QWidget subclass +is to make the "main window" a TQWidget or other TQWidget subclass that's not KMainWindow. """ -class MainWin (QWidget): +class MainWin (TQWidget): def __init__ (self, *args): - apply (QWidget.__init__, (self,) + args) + apply (TQWidget.__init__, (self,) + args) #-------------------- main ------------------------------------------------ diff --git a/templates/annotated/systray1.py b/templates/annotated/systray1.py index bfff650..e911f38 100644 --- a/templates/annotated/systray1.py +++ b/templates/annotated/systray1.py @@ -1,6 +1,6 @@ """ A basic system tray application - you can combine this with code from -menuapp2.py or menuapp3.py to quickly build a full-blown application +menuapp2.py or menuapp3.py to tquickly build a full-blown application framework. """ @@ -35,7 +35,7 @@ copyright holder. import sys -from qt import QLabel, QWidget, SIGNAL +from qt import TQLabel, TQWidget, SIGNAL from tdecore import KApplication, KIcon, KIconLoader from tdeui import KMainWindow, KSystemTray diff --git a/templates/basic/menuapp1.py b/templates/basic/menuapp1.py index ff29f80..863a521 100644 --- a/templates/basic/menuapp1.py +++ b/templates/basic/menuapp1.py @@ -42,7 +42,7 @@ True = not False import sys -from qt import QPopupMenu, SIGNAL +from qt import TQPopupMenu, SIGNAL from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n, KStdAccel, KIcon, KIconLoader from tdeui import KMainWindow, KMessageBox @@ -67,34 +67,34 @@ class MainWin (KMainWindow): self.initStatusBar () def initMenus (self): - fileMenu = QPopupMenu (self) + fileMenu = TQPopupMenu (self) # "File" menu items - fileMenu.insertItem (i18n ("New"), self.slotNew, KStdAccel.openNew ().keyCodeQt ()) - fileMenu.insertItem (i18n ("Open"), self.slotOpen, KStdAccel.open ().keyCodeQt ()) + fileMenu.insertItem (i18n ("New"), self.slotNew, KStdAccel.openNew ().keyCodeTQt ()) + fileMenu.insertItem (i18n ("Open"), self.slotOpen, KStdAccel.open ().keyCodeTQt ()) fileMenu.insertSeparator (); - fileMenu.insertItem (i18n ("Save"), self.slotSave, KStdAccel.save ().keyCodeQt ()) + fileMenu.insertItem (i18n ("Save"), self.slotSave, KStdAccel.save ().keyCodeTQt ()) fileMenu.insertItem (i18n ("SaveAs"), self.slotSaveAs) fileMenu.insertSeparator (); - fileMenu.insertItem (i18n ("Print"), self.slotPrint, KStdAccel.print_ ().keyCodeQt ()) + fileMenu.insertItem (i18n ("Print"), self.slotPrint, KStdAccel.print_ ().keyCodeTQt ()) fileMenu.insertSeparator (); - fileMenu.insertItem (i18n ("&Quit"), self.slotQuit, KStdAccel.quit ().keyCodeQt ()); + fileMenu.insertItem (i18n ("&Quit"), self.slotQuit, KStdAccel.quit ().keyCodeTQt ()); self.menuBar ().insertItem (i18n ("&File"), fileMenu) - editMenu = QPopupMenu (self) + editMenu = TQPopupMenu (self) # "Edit" menu items - editMenu.insertItem (i18n ("Undo"), self.slotUndo, KStdAccel.undo ().keyCodeQt ()) - editMenu.insertItem (i18n ("Redo"), self.slotRedo, KStdAccel.redo ().keyCodeQt ()) + editMenu.insertItem (i18n ("Undo"), self.slotUndo, KStdAccel.undo ().keyCodeTQt ()) + editMenu.insertItem (i18n ("Redo"), self.slotRedo, KStdAccel.redo ().keyCodeTQt ()) editMenu.insertSeparator (); - editMenu.insertItem (i18n ("Cut"), self.slotCut, KStdAccel.cut ().keyCodeQt ()) - editMenu.insertItem (i18n ("Copy"), self.slotCopy, KStdAccel.copy ().keyCodeQt ()) - editMenu.insertItem (i18n ("Paste"), self.slotPaste, KStdAccel.paste ().keyCodeQt ()) + editMenu.insertItem (i18n ("Cut"), self.slotCut, KStdAccel.cut ().keyCodeTQt ()) + editMenu.insertItem (i18n ("Copy"), self.slotCopy, KStdAccel.copy ().keyCodeTQt ()) + editMenu.insertItem (i18n ("Paste"), self.slotPaste, KStdAccel.paste ().keyCodeTQt ()) editMenu.insertSeparator (); - editMenu.insertItem (i18n ("Find"), self.slotFind, KStdAccel.find ().keyCodeQt ()) - editMenu.insertItem (i18n ("Find Next"), self.slotFindNext, KStdAccel.findNext ().keyCodeQt ()) - editMenu.insertItem (i18n ("Replace"), self.slotReplace, KStdAccel.replace ().keyCodeQt ()) + editMenu.insertItem (i18n ("Find"), self.slotFind, KStdAccel.find ().keyCodeTQt ()) + editMenu.insertItem (i18n ("Find Next"), self.slotFindNext, KStdAccel.findNext ().keyCodeTQt ()) + editMenu.insertItem (i18n ("Replace"), self.slotReplace, KStdAccel.replace ().keyCodeTQt ()) self.menuBar ().insertItem (i18n ("&Edit"), editMenu) diff --git a/templates/basic/menuapp2.py b/templates/basic/menuapp2.py index 1edb042..3a8b2ff 100644 --- a/templates/basic/menuapp2.py +++ b/templates/basic/menuapp2.py @@ -41,7 +41,7 @@ True = not False import sys -from qt import QPopupMenu, SIGNAL +from qt import TQPopupMenu, SIGNAL from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n, KShortcut from tdeui import KMainWindow, KMessageBox, KStdAction, KAction @@ -83,7 +83,7 @@ class MainWin (KMainWindow): self.specialAction = KAction (i18n ("Special"), KShortcut.null (), self.slotSpecial, self.actionCollection (), None) def initMenus (self): - fileMenu = QPopupMenu (self) + fileMenu = TQPopupMenu (self) self.newAction.plug (fileMenu) self.openAction.plug (fileMenu) fileMenu.insertSeparator () @@ -95,7 +95,7 @@ class MainWin (KMainWindow): self.quitAction.plug (fileMenu) self.menuBar ().insertItem (i18n ("&File"), fileMenu) - editMenu = QPopupMenu (self) + editMenu = TQPopupMenu (self) self.undoAction.plug (editMenu) self.redoAction.plug (editMenu) editMenu.insertSeparator () diff --git a/templates/basic/menuapp3.py b/templates/basic/menuapp3.py index a7f3fb9..79bba36 100644 --- a/templates/basic/menuapp3.py +++ b/templates/basic/menuapp3.py @@ -41,7 +41,7 @@ True = not False import sys -from qt import QPopupMenu, SIGNAL +from qt import TQPopupMenu, SIGNAL from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n, KShortcut from tdeui import KMainWindow, KMessageBox, KStdAction, KAction, KActionCollection diff --git a/templates/basic/systray.py b/templates/basic/systray.py index 741609d..406c095 100644 --- a/templates/basic/systray.py +++ b/templates/basic/systray.py @@ -29,14 +29,14 @@ copyright holder. import sys -from qt import QWidget, SIGNAL +from qt import TQWidget, SIGNAL from tdecore import KApplication, KIcon, KIconLoader from tdeui import KSystemTray -class MainWin (QWidget): +class MainWin (TQWidget): def __init__ (self, *args): - apply (QWidget.__init__, (self,) + args) + apply (TQWidget.__init__, (self,) + args) #-------------------- main ------------------------------------------------ diff --git a/templates/basic/systray1.py b/templates/basic/systray1.py index 13f1d8f..fdb8067 100644 --- a/templates/basic/systray1.py +++ b/templates/basic/systray1.py @@ -29,7 +29,7 @@ copyright holder. import sys -from qt import QLabel, QWidget, SIGNAL +from qt import TQLabel, TQWidget, SIGNAL from tdecore import KApplication, KIcon, KIconLoader from tdeui import KMainWindow, KSystemTray -- cgit v1.2.1