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/annotated | |
parent | 1d7616d07ef6f1e6c8131a861ddff208557825e3 (diff) | |
download | pytde-6677c2f8c66333c3951e8830f8760065c7a29074.tar.gz pytde-6677c2f8c66333c3951e8830f8760065c7a29074.zip |
Rename KApplication to TDEApplication to avoid conflicts with KDE4
Diffstat (limited to 'templates/annotated')
-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 |
7 files changed, 26 insertions, 26 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() |