diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-20 00:05:23 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-20 00:05:23 -0600 |
commit | 6677c2f8c66333c3951e8830f8760065c7a29074 (patch) | |
tree | e45d51b044ce8575210fca1584852fbbe4742316 /templates | |
parent | 1d7616d07ef6f1e6c8131a861ddff208557825e3 (diff) | |
download | pytde-6677c2f8c66333c3951e8830f8760065c7a29074.tar.gz pytde-6677c2f8c66333c3951e8830f8760065c7a29074.zip |
Rename KApplication to TDEApplication to avoid conflicts with KDE4
Diffstat (limited to 'templates')
-rw-r--r-- | templates/annotated/basicapp.py | 14 | ||||
-rw-r--r-- | templates/annotated/menuapp1.py | 4 | ||||
-rw-r--r-- | templates/annotated/menuapp2.py | 4 | ||||
-rw-r--r-- | templates/annotated/menuapp3.py | 4 | ||||
-rw-r--r-- | templates/annotated/minimal.py | 10 | ||||
-rw-r--r-- | templates/annotated/systray.py | 8 | ||||
-rw-r--r-- | templates/annotated/systray1.py | 8 | ||||
-rw-r--r-- | templates/basic/basicapp.py | 4 | ||||
-rw-r--r-- | templates/basic/menuapp1.py | 4 | ||||
-rw-r--r-- | templates/basic/menuapp2.py | 4 | ||||
-rw-r--r-- | templates/basic/menuapp3.py | 4 | ||||
-rw-r--r-- | templates/basic/minimal.py | 4 | ||||
-rw-r--r-- | templates/basic/systray.py | 6 | ||||
-rw-r--r-- | templates/basic/systray1.py | 6 |
14 files changed, 42 insertions, 42 deletions
diff --git a/templates/annotated/basicapp.py b/templates/annotated/basicapp.py index 0a44593..44b6681 100644 --- a/templates/annotated/basicapp.py +++ b/templates/annotated/basicapp.py @@ -35,7 +35,7 @@ copyright holder. import sys -from tdecore import KApplication, KCmdLineArgs, KAboutData +from tdecore import TDEApplication, KCmdLineArgs, KAboutData from tdeui import KMainWindow """ @@ -76,9 +76,9 @@ 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 +# this information. The TDEApplication constructor # used below *requires* the args are processed -# *before* KApplication is instantiated. There +# *before* TDEApplication is instantiated. There # is an alternate constructor that takes sys.argv # as an argument (see minimal.py) @@ -96,10 +96,10 @@ KCmdLineArgs.init (sys.argv, aboutData) # of tuples KCmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) -# instantiate KApplication - no other TQObject +# instantiate TDEApplication - no other TQObject # or TQWidget based classes can be instantiated -# until there is a KApplication instance -app = KApplication () +# until there is a TDEApplication instance +app = TDEApplication () # instantiate the subclass of KMainWindow mainWindow = MainWin (None, "main window") @@ -107,7 +107,7 @@ mainWindow = MainWin (None, "main window") # create the display mainWindow.show() -# run KApplication's event loop until the +# run TDEApplication's event loop until the # program exits app.exec_loop() diff --git a/templates/annotated/menuapp1.py b/templates/annotated/menuapp1.py index 0f0f3f5..d18ea00 100644 --- a/templates/annotated/menuapp1.py +++ b/templates/annotated/menuapp1.py @@ -45,7 +45,7 @@ import sys from qt import TQPopupMenu, SIGNAL -from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n, KStdAccel, KIcon, KIconLoader +from tdecore import TDEApplication, KCmdLineArgs, KAboutData, i18n, KStdAccel, KIcon, KIconLoader from tdeui import KMainWindow, KMessageBox TOOLBAR_NEW = 1 @@ -264,7 +264,7 @@ KCmdLineArgs.init (sys.argv, aboutData) KCmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) -app = KApplication () +app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() app.exec_loop() diff --git a/templates/annotated/menuapp2.py b/templates/annotated/menuapp2.py index be0d100..c5cbe1b 100644 --- a/templates/annotated/menuapp2.py +++ b/templates/annotated/menuapp2.py @@ -43,7 +43,7 @@ import sys from qt import TQPopupMenu, SIGNAL -from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n +from tdecore import TDEApplication, KCmdLineArgs, KAboutData, i18n from tdeui import KMainWindow, KMessageBox, KStdAction, KAction STATUSBAR_LEFT = 1 @@ -238,7 +238,7 @@ KCmdLineArgs.init (sys.argv, aboutData) KCmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) -app = KApplication () +app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() app.exec_loop() diff --git a/templates/annotated/menuapp3.py b/templates/annotated/menuapp3.py index a5f198d..19140ef 100644 --- a/templates/annotated/menuapp3.py +++ b/templates/annotated/menuapp3.py @@ -43,7 +43,7 @@ import sys from qt import TQPopupMenu, SIGNAL -from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n +from tdecore import TDEApplication, KCmdLineArgs, KAboutData, i18n from tdeui import KMainWindow, KMessageBox, KStdAction, KAction, KActionCollection STATUSBAR_LEFT = 1 @@ -202,7 +202,7 @@ KCmdLineArgs.init (sys.argv, aboutData) KCmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) -app = KApplication () +app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() app.exec_loop() diff --git a/templates/annotated/minimal.py b/templates/annotated/minimal.py index e021851..817d140 100644 --- a/templates/annotated/minimal.py +++ b/templates/annotated/minimal.py @@ -34,7 +34,7 @@ copyright holder. import sys -from tdecore import KApplication +from tdecore import TDEApplication from tdeui import KMainWindow @@ -56,11 +56,11 @@ class MainWin (KMainWindow): #-------------------- main ------------------------------------------------ -# instantiate KApplication - no other TQObject +# instantiate TDEApplication - no other TQObject # or TQWidget based classes can be instantiated -# until there is a KApplication instance +# until there is a TDEApplication instance appName = "template" -app = KApplication (sys.argv, appName) +app = TDEApplication (sys.argv, appName) # instantiate the subclass of KMainWindow mainWindow = MainWin (None, "main window") @@ -68,7 +68,7 @@ mainWindow = MainWin (None, "main window") # create the display mainWindow.show() -# run KApplication's event loop until the +# run TDEApplication's event loop until the # program exits app.exec_loop() diff --git a/templates/annotated/systray.py b/templates/annotated/systray.py index 7f7dc93..dee4e90 100644 --- a/templates/annotated/systray.py +++ b/templates/annotated/systray.py @@ -30,7 +30,7 @@ copyright holder. import sys from qt import TQWidget, SIGNAL -from tdecore import KApplication, KIcon, KIconLoader +from tdecore import TDEApplication, KIcon, KIconLoader from tdeui import KSystemTray """ @@ -38,7 +38,7 @@ Typically an application's "main window" will be a KMainWindow or a subclass of KMainWindow (KMainWindow provides simple mechanisms for constructing mens, toolbars, statusbars, etc). The problem with using KMainWindow in a System Tray application is that when -KMainWindow is closed, it also shuts down KApplication and the +KMainWindow is closed, it also shuts down TDEApplication and the program terminates. One way around that (not necessarily the best way - see systray1.py) @@ -56,11 +56,11 @@ class MainWin (TQWidget): # when the user right clicks the icon in the system tray and # selects "Quit" from the popup menu def slotQuitSelected (): - KApplication.kApplication ().quit () + TDEApplication.kApplication ().quit () # The usual stuff appName = "template" -app = KApplication (sys.argv, appName) +app = TDEApplication (sys.argv, appName) mainWindow = MainWin (None, "main window") # System tray apps need an icon diff --git a/templates/annotated/systray1.py b/templates/annotated/systray1.py index e911f38..1537fbc 100644 --- a/templates/annotated/systray1.py +++ b/templates/annotated/systray1.py @@ -36,7 +36,7 @@ copyright holder. import sys from qt import TQLabel, TQWidget, SIGNAL -from tdecore import KApplication, KIcon, KIconLoader +from tdecore import TDEApplication, KIcon, KIconLoader from tdeui import KMainWindow, KSystemTray # This template uses KMainWindow as the main window widget @@ -70,15 +70,15 @@ class MainWin (KMainWindow): # system tray icon's menu def slotQuitSelected (self): self.exitFlag = True - KApplication.kApplication ().quit () + TDEApplication.kApplication ().quit () #-------------------- main ------------------------------------------------ # The usual stuff - you can also use the KAboutData/KCmdLineArgs version -# for program startup used in other templates - the KApplication constructor +# for program startup used in other templates - the TDEApplication constructor # used here may be obsoleted eventually appName = "template" -app = KApplication (sys.argv, appName) +app = TDEApplication (sys.argv, appName) mainWindow = MainWin (None, "main window") mainWindow.show() diff --git a/templates/basic/basicapp.py b/templates/basic/basicapp.py index 2de4996..b5b5f62 100644 --- a/templates/basic/basicapp.py +++ b/templates/basic/basicapp.py @@ -30,7 +30,7 @@ copyright holder. import sys from qt import SIGNAL -from tdecore import KApplication, KCmdLineArgs, KAboutData +from tdecore import TDEApplication, KCmdLineArgs, KAboutData from tdeui import KMainWindow class MainWin (KMainWindow): @@ -51,7 +51,7 @@ aboutData.addAuthor ("author2", "they did something else", "another@email.addres KCmdLineArgs.init (sys.argv, aboutData) -app = KApplication () +app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() app.connect (app, SIGNAL ("lastWindowClosed ()"), app.quit) diff --git a/templates/basic/menuapp1.py b/templates/basic/menuapp1.py index 8312c7c..4b33bda 100644 --- a/templates/basic/menuapp1.py +++ b/templates/basic/menuapp1.py @@ -44,7 +44,7 @@ import sys from qt import TQPopupMenu, SIGNAL -from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n, KStdAccel, KIcon, KIconLoader +from tdecore import TDEApplication, KCmdLineArgs, KAboutData, i18n, KStdAccel, KIcon, KIconLoader from tdeui import KMainWindow, KMessageBox TOOLBAR_NEW = 1 @@ -188,7 +188,7 @@ KCmdLineArgs.init (sys.argv, aboutData) KCmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) -app = KApplication () +app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() app.exec_loop() diff --git a/templates/basic/menuapp2.py b/templates/basic/menuapp2.py index 3a8b2ff..54d3593 100644 --- a/templates/basic/menuapp2.py +++ b/templates/basic/menuapp2.py @@ -43,7 +43,7 @@ import sys from qt import TQPopupMenu, SIGNAL -from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n, KShortcut +from tdecore import TDEApplication, KCmdLineArgs, KAboutData, i18n, KShortcut from tdeui import KMainWindow, KMessageBox, KStdAction, KAction STATUSBAR_LEFT = 1 @@ -194,7 +194,7 @@ KCmdLineArgs.init (sys.argv, aboutData) KCmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) -app = KApplication () +app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() app.exec_loop() diff --git a/templates/basic/menuapp3.py b/templates/basic/menuapp3.py index 79bba36..e3328bc 100644 --- a/templates/basic/menuapp3.py +++ b/templates/basic/menuapp3.py @@ -43,7 +43,7 @@ import sys from qt import TQPopupMenu, SIGNAL -from tdecore import KApplication, KCmdLineArgs, KAboutData, i18n, KShortcut +from tdecore import TDEApplication, KCmdLineArgs, KAboutData, i18n, KShortcut from tdeui import KMainWindow, KMessageBox, KStdAction, KAction, KActionCollection STATUSBAR_LEFT = 1 @@ -155,7 +155,7 @@ KCmdLineArgs.init (sys.argv, aboutData) KCmdLineArgs.addCmdLineOptions ([("+files", "File to open")]) -app = KApplication () +app = TDEApplication () mainWindow = MainWin (None, "main window") mainWindow.show() app.exec_loop() diff --git a/templates/basic/minimal.py b/templates/basic/minimal.py index 8d74187..02dda02 100644 --- a/templates/basic/minimal.py +++ b/templates/basic/minimal.py @@ -29,7 +29,7 @@ copyright holder. import sys -from tdecore import KApplication +from tdecore import TDEApplication from tdeui import KMainWindow class MainWin (KMainWindow): @@ -40,7 +40,7 @@ class MainWin (KMainWindow): #-------------------- main ------------------------------------------------ appName = "template" -app = KApplication (sys.argv, appName) +app = TDEApplication (sys.argv, appName) mainWindow = MainWin (None, "main window") mainWindow.show() app.exec_loop() diff --git a/templates/basic/systray.py b/templates/basic/systray.py index 406c095..5dc2a3d 100644 --- a/templates/basic/systray.py +++ b/templates/basic/systray.py @@ -30,7 +30,7 @@ copyright holder. import sys from qt import TQWidget, SIGNAL -from tdecore import KApplication, KIcon, KIconLoader +from tdecore import TDEApplication, KIcon, KIconLoader from tdeui import KSystemTray @@ -41,10 +41,10 @@ class MainWin (TQWidget): #-------------------- main ------------------------------------------------ def slotQuitSelected (): - KApplication.kApplication ().quit () + TDEApplication.kApplication ().quit () appName = "template" -app = KApplication (sys.argv, appName) +app = TDEApplication (sys.argv, appName) mainWindow = MainWin (None, "main window") icons = KIconLoader () diff --git a/templates/basic/systray1.py b/templates/basic/systray1.py index fdb8067..dfa2b7d 100644 --- a/templates/basic/systray1.py +++ b/templates/basic/systray1.py @@ -30,7 +30,7 @@ copyright holder. import sys from qt import TQLabel, TQWidget, SIGNAL -from tdecore import KApplication, KIcon, KIconLoader +from tdecore import TDEApplication, KIcon, KIconLoader from tdeui import KMainWindow, KSystemTray class MainWin (KMainWindow): @@ -52,13 +52,13 @@ class MainWin (KMainWindow): def slotQuitSelected (self): self.exitFlag = True - KApplication.kApplication ().quit () + TDEApplication.kApplication ().quit () #-------------------- main ------------------------------------------------ appName = "template" -app = KApplication (sys.argv, appName) +app = TDEApplication (sys.argv, appName) mainWindow = MainWin (None, "main window") mainWindow.show() |