summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:09:42 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:09:42 -0600
commit2df6bde18ab40472f2df8637cf6456cb80dc2329 (patch)
tree5a4362124ff46786fce835d2f1e7d583c92a5670 /templates
parentbe6cfa4b990910e65e8d2f4f212eba3f7da6ee72 (diff)
downloadpytde-2df6bde18ab40472f2df8637cf6456cb80dc2329.tar.gz
pytde-2df6bde18ab40472f2df8637cf6456cb80dc2329.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'templates')
-rw-r--r--templates/annotated/basicapp.py12
-rw-r--r--templates/annotated/menuapp1.py52
-rw-r--r--templates/annotated/menuapp2.py18
-rw-r--r--templates/annotated/menuapp3.py14
-rw-r--r--templates/annotated/minimal.py12
-rw-r--r--templates/annotated/systray.py10
-rw-r--r--templates/annotated/systray1.py8
-rw-r--r--templates/basic/basicapp.py6
-rw-r--r--templates/basic/menuapp1.py34
-rw-r--r--templates/basic/menuapp2.py10
-rw-r--r--templates/basic/menuapp3.py10
-rw-r--r--templates/basic/minimal.py6
-rw-r--r--templates/basic/systray1.py6
13 files changed, 99 insertions, 99 deletions
diff --git a/templates/annotated/basicapp.py b/templates/annotated/basicapp.py
index a725004..50940ea 100644
--- a/templates/annotated/basicapp.py
+++ b/templates/annotated/basicapp.py
@@ -36,23 +36,23 @@ copyright holder.
import sys
from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData
-from tdeui import KMainWindow
+from tdeui import TDEMainWindow
"""
Most PyKDE applications will need a main window - the is the top
-level widget (the parent for all other widgets). KMainWindow has
+level widget (the parent for all other widgets). TDEMainWindow has
more functionality than shown here (see more complex templates).
It has the ability to create the other major parts of the user
interface - the main view, menus, toolbars, etc.
-Usually you provide a subclass of KMainWindow, construct menus
+Usually you provide a subclass of TDEMainWindow, construct menus
and toolbars in the subclass' __init__ method, and provide
slots for menu/toolbar actions in separate methods.
"""
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
#-------------------- main ------------------------------------------------
@@ -101,7 +101,7 @@ TDECmdLineArgs.addCmdLineOptions ([("+files", "File to open")])
# until there is a TDEApplication instance
app = TDEApplication ()
-# instantiate the subclass of KMainWindow
+# instantiate the subclass of TDEMainWindow
mainWindow = MainWin (None, "main window")
# create the display
diff --git a/templates/annotated/menuapp1.py b/templates/annotated/menuapp1.py
index 93b2a90..5d25e93 100644
--- a/templates/annotated/menuapp1.py
+++ b/templates/annotated/menuapp1.py
@@ -45,8 +45,8 @@ import sys
from qt import TQPopupMenu, SIGNAL
-from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, KStdAccel, KIcon, KIconLoader
-from tdeui import KMainWindow, KMessageBox
+from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, TDEStdAccel, KIcon, KIconLoader
+from tdeui import TDEMainWindow, KMessageBox
TOOLBAR_NEW = 1
TOOLBAR_OPEN = 2
@@ -59,9 +59,9 @@ STATUSBAR_LEFT = 1
STATUSBAR_MIDDLE = 2
STATUSBAR_RIGHT = 3
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
self.initMenus ()
self.initToolBar ()
@@ -81,18 +81,18 @@ class MainWin (KMainWindow):
# All menu item strings are wrapped with i18n - this allows
# internationalization
- # Predefined accelerators are in KStdAccel - these are
+ # Predefined accelerators are in TDEStdAccel - these are
# the standard accelerators. For custom accelerators, use
- # KAccel. All KStdAccel methods are static, so there is no
- # need to instantiate KStdAccel
+ # TDEAccel. All TDEStdAccel methods are static, so there is no
+ # need to instantiate TDEStdAccel
# "File" menu items
- fileMenu.insertItem (i18n ("New"), self.slotNew, KStdAccel.openNew ())
- fileMenu.insertItem (i18n ("Open"), self.slotOpen, KStdAccel.open ())
+ fileMenu.insertItem (i18n ("New"), self.slotNew, TDEStdAccel.openNew ())
+ fileMenu.insertItem (i18n ("Open"), self.slotOpen, TDEStdAccel.open ())
fileMenu.insertSeparator ();
- fileMenu.insertItem (i18n ("Save"), self.slotSave, KStdAccel.save ())
+ fileMenu.insertItem (i18n ("Save"), self.slotSave, TDEStdAccel.save ())
- # KStdAccel doesn't have a standard accelerator for 'Save As',
+ # TDEStdAccel doesn't have a standard accelerator for 'Save As',
# so we omit it - insertItem uses the default value
fileMenu.insertItem (i18n ("SaveAs"), self.slotSaveAs)
@@ -101,17 +101,17 @@ class MainWin (KMainWindow):
fileMenu.insertSeparator ();
- # Note the "KStdAccel.print_" has a trailing underscore, unlike the
+ # Note the "TDEStdAccel.print_" has a trailing underscore, unlike the
# equivalent KDE method - the underscore is necessary to prevent a
# clash with the Python keyword 'print'
- fileMenu.insertItem (i18n ("Print"), self.slotPrint, KStdAccel.print_ ())
+ fileMenu.insertItem (i18n ("Print"), self.slotPrint, TDEStdAccel.print_ ())
fileMenu.insertSeparator ();
- fileMenu.insertItem (i18n ("&Quit"), self.slotQuit, KStdAccel.quit ());
+ fileMenu.insertItem (i18n ("&Quit"), self.slotQuit, TDEStdAccel.quit ());
# Put fileMenu (as the File menu) into the menu bar
- # 'menuBar' is a predefined object owned by KMainWindow
+ # 'menuBar' is a predefined object owned by TDEMainWindow
self.menuBar ().insertItem (i18n ("&File"), fileMenu)
@@ -119,16 +119,16 @@ class MainWin (KMainWindow):
editMenu = TQPopupMenu (self)
# "Edit" menu items
- editMenu.insertItem (i18n ("Undo"), self.slotUndo, KStdAccel.undo ())
- editMenu.insertItem (i18n ("Redo"), self.slotRedo, KStdAccel.redo ())
+ editMenu.insertItem (i18n ("Undo"), self.slotUndo, TDEStdAccel.undo ())
+ editMenu.insertItem (i18n ("Redo"), self.slotRedo, TDEStdAccel.redo ())
editMenu.insertSeparator ();
- editMenu.insertItem (i18n ("Cut"), self.slotCut, KStdAccel.cut ())
- editMenu.insertItem (i18n ("Copy"), self.slotCopy, KStdAccel.copy ())
- editMenu.insertItem (i18n ("Paste"), self.slotPaste, KStdAccel.paste ())
+ editMenu.insertItem (i18n ("Cut"), self.slotCut, TDEStdAccel.cut ())
+ editMenu.insertItem (i18n ("Copy"), self.slotCopy, TDEStdAccel.copy ())
+ editMenu.insertItem (i18n ("Paste"), self.slotPaste, TDEStdAccel.paste ())
editMenu.insertSeparator ();
- editMenu.insertItem (i18n ("Find"), self.slotFind, KStdAccel.find ())
- editMenu.insertItem (i18n ("Find Next"), self.slotFindNext, KStdAccel.findNext ())
- editMenu.insertItem (i18n ("Replace"), self.slotReplace, KStdAccel.replace ())
+ editMenu.insertItem (i18n ("Find"), self.slotFind, TDEStdAccel.find ())
+ editMenu.insertItem (i18n ("Find Next"), self.slotFindNext, TDEStdAccel.findNext ())
+ editMenu.insertItem (i18n ("Replace"), self.slotReplace, TDEStdAccel.replace ())
# Put editMenu (as the Edit menu) into the menu bar
@@ -148,7 +148,7 @@ class MainWin (KMainWindow):
# (without the loadIcon call) is needed
icons = KIconLoader ()
- # KMainWindow owns at least one KToolBar instance, which is returned
+ # TDEMainWindow owns at least one TDEToolBar instance, which is returned
# by 'self.toolBar ()'. To obtain additional toolbars, add an argument
# to the call -- self.toolBar (1) will return another toolbar you can
# add buttons to.
@@ -157,7 +157,7 @@ class MainWin (KMainWindow):
# signal to connect (eg clicked) and the slot to connect to all need
# to be specified,as does the tooltip (the last string argument). There
# are easier ways to do this - see other menuapp templates for easier
- # methods using KAction/KStdAction
+ # methods using TDEAction/KStdAction
self.toolBar ().insertButton (icons.loadIcon ("filenew", KIcon.Toolbar), TOOLBAR_NEW, SIGNAL ("clicked (int)"), self.slotNew,\
True, "New")
@@ -173,7 +173,7 @@ class MainWin (KMainWindow):
True, "Paste")
def initStatusBar (self):
- # KMainWindow also owns a KStatusBar instance. The first
+ # TDEMainWindow also owns a KStatusBar instance. The first
# call creates a KStatusBar instance. See 'notImpl' below
# for an example of writing to the status bar. You can
# also add widgets (labels, progress bars, etc) to the
diff --git a/templates/annotated/menuapp2.py b/templates/annotated/menuapp2.py
index 6447d1c..8d79dd1 100644
--- a/templates/annotated/menuapp2.py
+++ b/templates/annotated/menuapp2.py
@@ -44,15 +44,15 @@ import sys
from qt import TQPopupMenu, SIGNAL
from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n
-from tdeui import KMainWindow, KMessageBox, KStdAction, KAction
+from tdeui import TDEMainWindow, KMessageBox, KStdAction, TDEAction
STATUSBAR_LEFT = 1
STATUSBAR_MIDDLE = 2
STATUSBAR_RIGHT = 3
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
# Create the actions that will populate
# the menus and toolbars
@@ -106,16 +106,16 @@ class MainWin (KMainWindow):
self.replaceAction = KStdAction.replace (self.slotReplace)
# For actions that are not "standard", you can create your
- # own actions using KAction. This example doesn't include
- # an icon, but there is a KAction constructor that will
+ # own actions using TDEAction. This example doesn't include
+ # an icon, but there is a TDEAction constructor that will
# allow you to specify an icon (for toolbar use, for instance),
- # or you can use KAction.setIcon to set/change the icon. You
- # can also add a tooltip with KAction.setToolTip
+ # or you can use TDEAction.setIcon to set/change the icon. You
+ # can also add a tooltip with TDEAction.setToolTip
- # This KAction constructor requires a TQString, an accelerator (0
+ # This TDEAction constructor requires 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)
+ self.specialAction = TDEAction (i18n ("Special"), 0, self.slotSpecial, None)
def initMenus (self):
# plug the actions into the menus
diff --git a/templates/annotated/menuapp3.py b/templates/annotated/menuapp3.py
index 59b0a6a..9ac414d 100644
--- a/templates/annotated/menuapp3.py
+++ b/templates/annotated/menuapp3.py
@@ -44,15 +44,15 @@ import sys
from qt import TQPopupMenu, SIGNAL
from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n
-from tdeui import KMainWindow, KMessageBox, KStdAction, KAction, KActionCollection
+from tdeui import TDEMainWindow, KMessageBox, KStdAction, TDEAction, TDEActionCollection
STATUSBAR_LEFT = 1
STATUSBAR_MIDDLE = 2
STATUSBAR_RIGHT = 3
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
# Create actions that correspond to those in the XML file
self.initActions ()
@@ -94,7 +94,7 @@ class MainWin (KMainWindow):
# if you defined the KStdActions as below. In fact, you can't override
# this behavior using KStdActions - if you want menus to be "non-standard"
# TDE menus (eg 'Cut' in the 'File' menu), you'll need to create your
- # actions from KAction instead of KStdAction. Obviously it makes more
+ # actions from TDEAction instead of KStdAction. Obviously it makes more
# sense to use the mechanism provided to produce consistent menus and
# toolbars. You can "unplug" items if, for example, you don't want them
# in the toolBar.
@@ -118,11 +118,11 @@ class MainWin (KMainWindow):
self.findNextAction = KStdAction.findNext (self.slotFindNext, self.actionCollection ())
self.replaceAction = KStdAction.replace (self.slotReplace, self.actionCollection ())
- # For ANYTHING constructed from KAction or its descendants (KActionMenu, KActionSeparator,
- # KFontAction, etc) you MUST provide the self.actionCollection () parent and an object
+ # For ANYTHING constructed from TDEAction or its descendants (TDEActionMenu, TDEActionSeparator,
+ # TDEFontAction, etc) you MUST provide the self.actionCollection () parent and an object
# name ("specialActionName") or the XMLGUI mechanism will not be able to locate the
# action. XMLGUI finds the action via its member name value, NOT via its variable name.
- self.specialAction = KAction (i18n ("Special"), 0, self.slotSpecial, self.actionCollection (), "specialActionName")
+ self.specialAction = TDEAction (i18n ("Special"), 0, self.slotSpecial, self.actionCollection (), "specialActionName")
def initStatusBar (self):
self.statusBar ().insertItem ("", STATUSBAR_LEFT, 1000, True)
diff --git a/templates/annotated/minimal.py b/templates/annotated/minimal.py
index 817d140..92a7816 100644
--- a/templates/annotated/minimal.py
+++ b/templates/annotated/minimal.py
@@ -35,23 +35,23 @@ copyright holder.
import sys
from tdecore import TDEApplication
-from tdeui import KMainWindow
+from tdeui import TDEMainWindow
"""
Most PyKDE applications will need a main window - the is the top
-level widget (the parent for all other widgets). KMainWindow has
+level widget (the parent for all other widgets). TDEMainWindow has
more functionality than shown here (see more complex templates).
It has the ability to create the other major parts of the user
interface - the main view, menus, toolbars, etc.
-Usually you provide a subclass of KMainWindow, construct menus
+Usually you provide a subclass of TDEMainWindow, construct menus
and toolbars in the subclass' __init__ method, and provide
slots for menu/toolbar actions in separate methods.
"""
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
#-------------------- main ------------------------------------------------
@@ -62,7 +62,7 @@ class MainWin (KMainWindow):
appName = "template"
app = TDEApplication (sys.argv, appName)
-# instantiate the subclass of KMainWindow
+# instantiate the subclass of TDEMainWindow
mainWindow = MainWin (None, "main window")
# create the display
diff --git a/templates/annotated/systray.py b/templates/annotated/systray.py
index dee4e90..56944a8 100644
--- a/templates/annotated/systray.py
+++ b/templates/annotated/systray.py
@@ -34,16 +34,16 @@ from tdecore import TDEApplication, KIcon, KIconLoader
from tdeui import KSystemTray
"""
-Typically an application's "main window" will be a KMainWindow or
-a subclass of KMainWindow (KMainWindow provides simple mechanisms
+Typically an application's "main window" will be a TDEMainWindow or
+a subclass of TDEMainWindow (TDEMainWindow 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 TDEApplication and the
+using TDEMainWindow in a System Tray application is that when
+TDEMainWindow is closed, it also shuts down TDEApplication and the
program terminates.
One way around that (not necessarily the best way - see systray1.py)
is to make the "main window" a TQWidget or other TQWidget subclass
-that's not KMainWindow.
+that's not TDEMainWindow.
"""
class MainWin (TQWidget):
diff --git a/templates/annotated/systray1.py b/templates/annotated/systray1.py
index faf97e0..3c1d3d5 100644
--- a/templates/annotated/systray1.py
+++ b/templates/annotated/systray1.py
@@ -37,9 +37,9 @@ import sys
from qt import TQLabel, TQWidget, SIGNAL
from tdecore import TDEApplication, KIcon, KIconLoader
-from tdeui import KMainWindow, KSystemTray
+from tdeui import TDEMainWindow, KSystemTray
-# This template uses KMainWindow as the main window widget
+# This template uses TDEMainWindow as the main window widget
# It solves the problem described in systray.py by using
# a flag to control the return value from queryClose - if
# :quit" is signalled from anywhere EXCEPT the system tray
@@ -47,9 +47,9 @@ from tdeui import KMainWindow, KSystemTray
# value for queryClose, it stops the application from shutting
# down; if self.exitFlag is True, the application shuts down
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
self.exitFlag = False
diff --git a/templates/basic/basicapp.py b/templates/basic/basicapp.py
index 53e0c51..65f5813 100644
--- a/templates/basic/basicapp.py
+++ b/templates/basic/basicapp.py
@@ -31,11 +31,11 @@ import sys
from qt import SIGNAL
from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData
-from tdeui import KMainWindow
+from tdeui import TDEMainWindow
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- KMainWindow.__init__ (self)
+ TDEMainWindow.__init__ (self)
#-------------------- main ------------------------------------------------
diff --git a/templates/basic/menuapp1.py b/templates/basic/menuapp1.py
index 6bd548e..c8f86db 100644
--- a/templates/basic/menuapp1.py
+++ b/templates/basic/menuapp1.py
@@ -44,8 +44,8 @@ import sys
from qt import TQPopupMenu, SIGNAL
-from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, KStdAccel, KIcon, KIconLoader
-from tdeui import KMainWindow, KMessageBox
+from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, TDEStdAccel, KIcon, KIconLoader
+from tdeui import TDEMainWindow, KMessageBox
TOOLBAR_NEW = 1
TOOLBAR_OPEN = 2
@@ -58,9 +58,9 @@ STATUSBAR_LEFT = 1
STATUSBAR_MIDDLE = 2
STATUSBAR_RIGHT = 3
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
self.initMenus ()
self.initToolBar ()
@@ -70,31 +70,31 @@ class MainWin (KMainWindow):
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, TDEStdAccel.openNew ().keyCodeQt ())
+ fileMenu.insertItem (i18n ("Open"), self.slotOpen, TDEStdAccel.open ().keyCodeQt ())
fileMenu.insertSeparator ();
- fileMenu.insertItem (i18n ("Save"), self.slotSave, KStdAccel.save ().keyCodeQt ())
+ fileMenu.insertItem (i18n ("Save"), self.slotSave, TDEStdAccel.save ().keyCodeQt ())
fileMenu.insertItem (i18n ("SaveAs"), self.slotSaveAs)
fileMenu.insertSeparator ();
- fileMenu.insertItem (i18n ("Print"), self.slotPrint, KStdAccel.print_ ().keyCodeQt ())
+ fileMenu.insertItem (i18n ("Print"), self.slotPrint, TDEStdAccel.print_ ().keyCodeQt ())
fileMenu.insertSeparator ();
- fileMenu.insertItem (i18n ("&Quit"), self.slotQuit, KStdAccel.quit ().keyCodeQt ());
+ fileMenu.insertItem (i18n ("&Quit"), self.slotQuit, TDEStdAccel.quit ().keyCodeQt ());
self.menuBar ().insertItem (i18n ("&File"), fileMenu)
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, TDEStdAccel.undo ().keyCodeQt ())
+ editMenu.insertItem (i18n ("Redo"), self.slotRedo, TDEStdAccel.redo ().keyCodeQt ())
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, TDEStdAccel.cut ().keyCodeQt ())
+ editMenu.insertItem (i18n ("Copy"), self.slotCopy, TDEStdAccel.copy ().keyCodeQt ())
+ editMenu.insertItem (i18n ("Paste"), self.slotPaste, TDEStdAccel.paste ().keyCodeQt ())
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, TDEStdAccel.find ().keyCodeQt ())
+ editMenu.insertItem (i18n ("Find Next"), self.slotFindNext, TDEStdAccel.findNext ().keyCodeQt ())
+ editMenu.insertItem (i18n ("Replace"), self.slotReplace, TDEStdAccel.replace ().keyCodeQt ())
self.menuBar ().insertItem (i18n ("&Edit"), editMenu)
diff --git a/templates/basic/menuapp2.py b/templates/basic/menuapp2.py
index 1f68d59..a9ec76f 100644
--- a/templates/basic/menuapp2.py
+++ b/templates/basic/menuapp2.py
@@ -43,16 +43,16 @@ import sys
from qt import TQPopupMenu, SIGNAL
-from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, KShortcut
-from tdeui import KMainWindow, KMessageBox, KStdAction, KAction
+from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, TDEShortcut
+from tdeui import TDEMainWindow, KMessageBox, KStdAction, TDEAction
STATUSBAR_LEFT = 1
STATUSBAR_MIDDLE = 2
STATUSBAR_RIGHT = 3
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
self.initActions ()
self.initMenus ()
@@ -80,7 +80,7 @@ class MainWin (KMainWindow):
self.findAction = KStdAction.find (self.slotFind, self.actionCollection ())
self.findNextAction = KStdAction.findNext (self.slotFindNext, self.actionCollection ())
self.replaceAction = KStdAction.replace (self.slotReplace, self.actionCollection ())
- self.specialAction = KAction (i18n ("Special"), KShortcut.null (), self.slotSpecial, self.actionCollection (), None)
+ self.specialAction = TDEAction (i18n ("Special"), TDEShortcut.null (), self.slotSpecial, self.actionCollection (), None)
def initMenus (self):
fileMenu = TQPopupMenu (self)
diff --git a/templates/basic/menuapp3.py b/templates/basic/menuapp3.py
index cd46f81..ce0dfaf 100644
--- a/templates/basic/menuapp3.py
+++ b/templates/basic/menuapp3.py
@@ -43,16 +43,16 @@ import sys
from qt import TQPopupMenu, SIGNAL
-from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, KShortcut
-from tdeui import KMainWindow, KMessageBox, KStdAction, KAction, KActionCollection
+from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, TDEShortcut
+from tdeui import TDEMainWindow, KMessageBox, KStdAction, TDEAction, TDEActionCollection
STATUSBAR_LEFT = 1
STATUSBAR_MIDDLE = 2
STATUSBAR_RIGHT = 3
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
self.initActions ()
self.createGUI ()
@@ -80,7 +80,7 @@ class MainWin (KMainWindow):
self.findAction = KStdAction.find (self.slotFind, self.actionCollection ())
self.findNextAction = KStdAction.findNext (self.slotFindNext, self.actionCollection ())
self.replaceAction = KStdAction.replace (self.slotReplace, self.actionCollection ())
- self.specialAction = KAction (i18n ("Special"), KShortcut.null (), self.slotSpecial, self.actionCollection (), "specialActionName")
+ self.specialAction = TDEAction (i18n ("Special"), TDEShortcut.null (), self.slotSpecial, self.actionCollection (), "specialActionName")
def initStatusBar (self):
self.statusBar ().insertItem ("", STATUSBAR_LEFT, 1000, True)
diff --git a/templates/basic/minimal.py b/templates/basic/minimal.py
index 02dda02..8ba815d 100644
--- a/templates/basic/minimal.py
+++ b/templates/basic/minimal.py
@@ -30,11 +30,11 @@ copyright holder.
import sys
from tdecore import TDEApplication
-from tdeui import KMainWindow
+from tdeui import TDEMainWindow
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
#-------------------- main ------------------------------------------------
diff --git a/templates/basic/systray1.py b/templates/basic/systray1.py
index dfa2b7d..0a660e7 100644
--- a/templates/basic/systray1.py
+++ b/templates/basic/systray1.py
@@ -31,11 +31,11 @@ import sys
from qt import TQLabel, TQWidget, SIGNAL
from tdecore import TDEApplication, KIcon, KIconLoader
-from tdeui import KMainWindow, KSystemTray
+from tdeui import TDEMainWindow, KSystemTray
-class MainWin (KMainWindow):
+class MainWin (TDEMainWindow):
def __init__ (self, *args):
- apply (KMainWindow.__init__, (self,) + args)
+ apply (TDEMainWindow.__init__, (self,) + args)
self.exitFlag = False