diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:09:42 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:09:42 -0600 |
commit | 2df6bde18ab40472f2df8637cf6456cb80dc2329 (patch) | |
tree | 5a4362124ff46786fce835d2f1e7d583c92a5670 /examples | |
parent | be6cfa4b990910e65e8d2f4f212eba3f7da6ee72 (diff) | |
download | pytde-2df6bde18ab40472f2df8637cf6456cb80dc2329.tar.gz pytde-2df6bde18ab40472f2df8637cf6456cb80dc2329.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'examples')
-rw-r--r-- | examples/README | 2 | ||||
-rw-r--r-- | examples/kdeform1.ui | 8 | ||||
-rw-r--r-- | examples/kpartgui.dtd | 2 | ||||
-rw-r--r-- | examples/kurldemo.py | 6 | ||||
-rw-r--r-- | examples/menudemo.py | 34 | ||||
-rw-r--r-- | examples/mimetype.py | 8 | ||||
-rw-r--r-- | examples/pyTDEHTMLPart.py | 8 | ||||
-rw-r--r-- | examples/pytde-sampler/dialogs/font.py | 8 | ||||
-rw-r--r-- | examples/pytde-sampler/dialogs/key.py | 2 | ||||
-rw-r--r-- | examples/pytde-sampler/qt_widgets/CONTRIB | 92 | ||||
-rwxr-xr-x | examples/pytde-sampler/runner.py | 6 | ||||
-rwxr-xr-x | examples/pytde-sampler/sampler.py | 16 | ||||
-rw-r--r-- | examples/systray.py | 6 | ||||
-rw-r--r-- | examples/uimodules/uidialogs.py | 10 | ||||
-rw-r--r-- | examples/uimodules/uimenus.py | 18 | ||||
-rw-r--r-- | examples/uimodules/uiwidgets.py | 24 | ||||
-rw-r--r-- | examples/uimodules/uixml.py | 2 | ||||
-rw-r--r-- | examples/uiqxembed.py | 6 | ||||
-rw-r--r-- | examples/uisampler.py | 42 | ||||
-rw-r--r-- | examples/uitdemdi.py | 4 | ||||
-rw-r--r-- | examples/xmlmenudemo.py | 48 |
21 files changed, 176 insertions, 176 deletions
diff --git a/examples/README b/examples/README index d5dc062..a316a6a 100644 --- a/examples/README +++ b/examples/README @@ -3,7 +3,7 @@ programs that demonstrate or test some features of PyKDE: uisampler.py - demos of most of the tdeui widgets, - including dialogs, menus (KAction, KStdAction, etc) + including dialogs, menus (TDEAction, KStdAction, etc) widgets, and xml ui definition mimetest.py - tests TDESharedPtr related classes/methods diff --git a/examples/kdeform1.ui b/examples/kdeform1.ui index 176ec6e..fe7eaca 100644 --- a/examples/kdeform1.ui +++ b/examples/kdeform1.ui @@ -248,9 +248,9 @@ Python:from tdefile import KURLRequester</comment> <number>7</number> </property> </widget> - <widget class="KFontCombo" row="0" column="2"> + <widget class="TDEFontCombo" row="0" column="2"> <property name="name"> - <cstring>KFontCombo2</cstring> + <cstring>TDEFontCombo2</cstring> </property> </widget> </grid> @@ -272,9 +272,9 @@ Python:from tdefile import KURLRequester</comment> <property name="spacing"> <number>6</number> </property> - <widget class="KListView" row="0" column="0"> + <widget class="TDEListView" row="0" column="0"> <property name="name"> - <cstring>KListView1</cstring> + <cstring>TDEListView1</cstring> </property> </widget> </grid> diff --git a/examples/kpartgui.dtd b/examples/kpartgui.dtd index 7706569..005bc6a 100644 --- a/examples/kpartgui.dtd +++ b/examples/kpartgui.dtd @@ -67,7 +67,7 @@ <!-- Defines both Standard and app-specific actions. An action can appear in a menu, a toolbar or in a menubar . --> <!ELEMENT Action EMPTY> -<!-- We defined only a few standard KAction properties here. Theoritically we can have +<!-- We defined only a few standard TDEAction properties here. Theoritically we can have any property here --> <!ATTLIST Action name CDATA #REQUIRED diff --git a/examples/kurldemo.py b/examples/kurldemo.py index 2ef56d3..badec04 100644 --- a/examples/kurldemo.py +++ b/examples/kurldemo.py @@ -32,11 +32,11 @@ urls = ["http://slashdot.org", "http://www.kde.org", "http://www.riverbankcomput import sys from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, KURL -from tdeui import KMainWindow, KEdit +from tdeui import TDEMainWindow, KEdit -class MainWin (KMainWindow): +class MainWin (TDEMainWindow): def __init__ (self, *args): - apply (KMainWindow.__init__, (self,) + args) + apply (TDEMainWindow.__init__, (self,) + args) self.setGeometry (0, 0, 400, 600) diff --git a/examples/menudemo.py b/examples/menudemo.py index 59931e8..c0eb60d 100644 --- a/examples/menudemo.py +++ b/examples/menudemo.py @@ -43,17 +43,17 @@ import sys from qt import TQPopupMenu, SIGNAL, TQLabel, TQIconSet -from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, KIcon, KIconLoader, KShortcut -from tdeui import KMainWindow, KMessageBox, KStdAction, KAction, KToggleAction, KFontSizeAction, KFontAction, KRadioAction,\ - KActionSeparator, KActionMenu, KWindowListMenu +from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, KIcon, KIconLoader, TDEShortcut +from tdeui import TDEMainWindow, KMessageBox, KStdAction, TDEAction, TDEToggleAction, TDEFontSizeAction, TDEFontAction, TDERadioAction,\ + TDEActionSeparator, TDEActionMenu, KWindowListMenu 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 () @@ -81,37 +81,37 @@ 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 (), "special") + self.specialAction = TDEAction (i18n ("Special"), TDEShortcut.null (), self.slotSpecial, self.actionCollection (), "special") # Demo menu items - # KToggleAction has an isChecked member and emits the "toggle" signal - self.toggle1Action = KToggleAction ("Toggle 1") - self.toggle2Action = KToggleAction ("Toggle 2", KShortcut.null (), self.slotToggle2, None) + # TDEToggleAction has an isChecked member and emits the "toggle" signal + self.toggle1Action = TDEToggleAction ("Toggle 1") + self.toggle2Action = TDEToggleAction ("Toggle 2", TDEShortcut.null (), self.slotToggle2, None) # A separator - create once/use everywhere - self.separateAction = KActionSeparator () + self.separateAction = TDEActionSeparator () # Font stuff in menus or toolbar - self.fontAction = KFontAction ("Font") - self.fontSizeAction = KFontSizeAction ("Font Size") + self.fontAction = TDEFontAction ("Font") + self.fontSizeAction = TDEFontSizeAction ("Font Size") # Need to assign an icon to actionMenu below icons = KIconLoader () iconSet = TQIconSet (icons.loadIcon ("viewmag", KIcon.Toolbar)) - # Nested menus using KActions (also nested on toolbar) - self.actionMenu = KActionMenu ("Action Menu") + # Nested menus using TDEActions (also nested on toolbar) + self.actionMenu = TDEActionMenu ("Action Menu") self.actionMenu.setIconSet (iconSet) self.actionMenu.insert (KStdAction.zoomIn (self.slotZoomIn, self.actionCollection ())) self.actionMenu.insert (KStdAction.zoomOut (self.slotZoomOut, self.actionCollection ())) # Doesn't work in KDE 2.1.1 -# self.radio1Action = KRadioAction ("Radio 1") +# self.radio1Action = TDERadioAction ("Radio 1") # self.radio1Action.setExclusiveGroup ("Radio") -# self.radio2Action = KRadioAction ("Radio 2") +# self.radio2Action = TDERadioAction ("Radio 2") # self.radio2Action.setExclusiveGroup ("Radio") -# self.radio3Action = KRadioAction ("Radio 3") +# self.radio3Action = TDERadioAction ("Radio 3") # self.radio3Action.setExclusiveGroup ("Radio") def initMenus (self): diff --git a/examples/mimetype.py b/examples/mimetype.py index ca99534..6d66c32 100644 --- a/examples/mimetype.py +++ b/examples/mimetype.py @@ -42,12 +42,12 @@ import sys from qt import TQWidget, TQButtonGroup, TQt, TQLabel, TQListView, TQListViewItem from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, KURL -from tdeui import KMainWindow, KTabCtl, KListBox +from tdeui import TDEMainWindow, KTabCtl, TDEListBox from kio import KMimeType, KService, KServiceGroup, KServiceType, TDETrader, KServiceTypeProfile, KServiceGroup -class MainWin (KMainWindow): +class MainWin (TDEMainWindow): def __init__ (self, *args): - apply (KMainWindow.__init__, (self,) + args) + apply (TDEMainWindow.__init__, (self,) + args) tabctl = KTabCtl (self) self.setGeometry (0, 0, 600, 400) @@ -176,7 +176,7 @@ class KMimeTypeTab (TQWidget): self.setGeometry (0, 0, 500, 370) lbLbl = TQLabel ("All Mimetypes", self) lbLbl.setGeometry (10, 10, 150, 20) - lb = KListBox (self) + lb = TDEListBox (self) lb.setGeometry (10, 30, 200, 300) mlist = KMimeType.allMimeTypes () lblist = [] diff --git a/examples/pyTDEHTMLPart.py b/examples/pyTDEHTMLPart.py index 4f31e2b..6dd3397 100644 --- a/examples/pyTDEHTMLPart.py +++ b/examples/pyTDEHTMLPart.py @@ -24,7 +24,7 @@ additional code to make this do something useful. The seem to provide much help. Also, to follow links, you probably need to connect some signals to slots. I haven't tried it, but this should work with a plain -KMainWindow or other widget too. +TDEMainWindow or other widget too. The KDE website also incorporates gifs, jpegs, and I believe CSS too. Playing around with some other @@ -45,7 +45,7 @@ lifted from the KDE classref. from tdecore import TDECmdLineArgs, KURL, TDEApplication, i18n, TDEAboutData, BarIcon, KLibLoader -from tdeui import KMainWindow, KMessageBox, KAction, KStdAction, KKeyDialog, KEditToolbar +from tdeui import TDEMainWindow, KMessageBox, TDEAction, KStdAction, KKeyDialog, KEditToolbar from qt import TQString, TQStringList @@ -64,8 +64,8 @@ TRUE = not FALSE TOOLBAR_EXIT = 0 TOOLBAR_OPEN = 1 -# Note that we use KParts.MainWindow, not KMainWindow as the superclass -# (KParts.MainWindow subclasses KMainWindow). Also, be sure the 'apply' +# Note that we use KParts.MainWindow, not TDEMainWindow as the superclass +# (KParts.MainWindow subclasses TDEMainWindow). Also, be sure the 'apply' # clause references KParts.MainWindow - it's a hard bug to track down # if it doesn't. diff --git a/examples/pytde-sampler/dialogs/font.py b/examples/pytde-sampler/dialogs/font.py index 194524c..1eccc13 100644 --- a/examples/pytde-sampler/dialogs/font.py +++ b/examples/pytde-sampler/dialogs/font.py @@ -1,11 +1,11 @@ from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQFont, TQString from tdecore import i18n -from tdeui import KPushButton, KFontDialog, KTextEdit +from tdeui import KPushButton, TDEFontDialog, KTextEdit iconName = 'fonts' -labelText = 'KFontDialog' -docParts = ('tdeui', 'KFontDialog') +labelText = 'TDEFontDialog' +docParts = ('tdeui', 'TDEFontDialog') helpText = ("KDE provides a font dialog box for users to select (can you " "guess??) fonts. The button below displays a font dialog box. " "The font of this widget (the text widget you're reading) is used " @@ -47,7 +47,7 @@ class MainFrame(TQFrame): def showFontDialog(self): font = TQFont(self.example.font()) string = TQString() - accepted, other = KFontDialog.getFontAndText(font, string, False, self) + accepted, other = TDEFontDialog.getFontAndText(font, string, False, self) if accepted: self.example.setFont(font) self.example.setText(string) diff --git a/examples/pytde-sampler/dialogs/key.py b/examples/pytde-sampler/dialogs/key.py index 8c88537..808a298 100644 --- a/examples/pytde-sampler/dialogs/key.py +++ b/examples/pytde-sampler/dialogs/key.py @@ -6,7 +6,7 @@ from tdecore import i18n from tdeui import KPushButton, KKeyDialog, KTextEdit -helpText = ("Configuring keystroke shortcuts is simple with KActions and the " +helpText = ("Configuring keystroke shortcuts is simple with TDEActions and the " "KKeyDialog type. This sample starts the KKeyDialog for the " "sampler application.") diff --git a/examples/pytde-sampler/qt_widgets/CONTRIB b/examples/pytde-sampler/qt_widgets/CONTRIB index 1dd45b0..f552225 100644 --- a/examples/pytde-sampler/qt_widgets/CONTRIB +++ b/examples/pytde-sampler/qt_widgets/CONTRIB @@ -14,11 +14,11 @@ tdecore,IconSize,,, tdecore,TDEAboutData,,, tdecore,KAboutPerson,,, tdecore,KAboutTranslator,,, -tdecore,KAccel,,, -tdecore,KAccelAction,,, -tdecore,KAccelActions,,, -tdecore,KAccelBase,,, -tdecore,KAccelShortcutList,,, +tdecore,TDEAccel,,, +tdecore,TDEAccelAction,,, +tdecore,TDEAccelActions,,, +tdecore,TDEAccelBase,,, +tdecore,TDEAccelShortcutList,,, tdecore,TDEApplication,,, tdecore,KAsyncIO,,, tdecore,KAudioPlayer,,, @@ -84,16 +84,16 @@ tdecore,KRandomSequence,,, tdecore,KRegExp,,, tdecore,KRootProp,,, tdecore,KSaveFile,,, -tdecore,KSelectionOwner,,, -tdecore,KSelectionWatcher,,, +tdecore,TDESelectionOwner,,, +tdecore,TDESelectionWatcher,,, tdecore,TDEServerSocket,,, tdecore,KSessionManaged,,, tdecore,TDEShared,,, tdecore,TDESharedConfig,,, tdecore,KShell,,, tdecore,KShellProcess,,, -tdecore,KShortcut,,, -tdecore,KShortcutList,,, +tdecore,TDEShortcut,,, +tdecore,TDEShortcutList,,, tdecore,KSimpleConfig,,, tdecore,TDESocket,,, tdecore,TDEStandardDirs,,, @@ -101,7 +101,7 @@ tdecore,TDEStartupInfo,,, tdecore,TDEStartupInfoData,,, tdecore,TDEStartupInfoId,,, tdecore,KStaticDeleterBase,,, -tdecore,KStdAccel,,, +tdecore,TDEStdAccel,,, tdecore,KStringHandler,,, tdecore,KTempDir,,, tdecore,KTempFile,,, @@ -180,12 +180,12 @@ tdeui,KAboutContributor,,, tdeui,KAboutDialog,,, tdeui,KAboutKDE,,, tdeui,KAboutWidget,,, -tdeui,KAction,,, -tdeui,KActionCollection,,, -tdeui,KActionMenu,,, -tdeui,KActionPtrShortcutList,,, -tdeui,KActionSeparator,,, -tdeui,KActionShortcutList,,, +tdeui,TDEAction,,, +tdeui,TDEActionCollection,,, +tdeui,TDEActionMenu,,, +tdeui,TDEActionPtrShortcutList,,, +tdeui,TDEActionSeparator,,, +tdeui,TDEActionShortcutList,,, tdeui,KActiveLabel,,, tdeui,KAnimWidget,,, tdeui,KArrowButton,,, @@ -243,12 +243,12 @@ tdeui,KEditListBox,,, tdeui,KEditToolbar,,, tdeui,KEditToolbarWidget,,, tdeui,KFloatValidator,,, -tdeui,KFontAction,,, -tdeui,KFontChooser,,, -tdeui,KFontCombo,,, -tdeui,KFontDialog,,, -tdeui,KFontRequester,,, -tdeui,KFontSizeAction,,, +tdeui,TDEFontAction,,, +tdeui,TDEFontChooser,,, +tdeui,TDEFontCombo,,, +tdeui,TDEFontDialog,,, +tdeui,TDEFontRequester,,, +tdeui,TDEFontSizeAction,,, tdeui,KGradientSelector,,, tdeui,KGuiItem,,, tdeui,KHSSelector,,, @@ -267,13 +267,13 @@ tdeui,KKeyDialog,,, tdeui,KLed,,, tdeui,KLineEdit,,, tdeui,KLineEditDlg,,, -tdeui,KListAction,,, -tdeui,KListBox,,, -tdeui,KListView,,, -tdeui,KListViewItem,,, +tdeui,TDEListAction,,, +tdeui,TDEListBox,,, +tdeui,TDEListView,,, +tdeui,TDEListViewItem,,, tdeui,KMacroCommand,,, -tdeui,KMainWindow,,, -tdeui,KMainWindowInterface,,, +tdeui,TDEMainWindow,,, +tdeui,TDEMainWindowInterface,,, tdeui,KMenuBar,,, tdeui,KMessageBox,,, tdeui,KMimeTypeValidator,,, @@ -287,22 +287,22 @@ tdeui,KPanelMenu,,, tdeui,KPassivePopup,,, tdeui,KPasswordDialog,,, tdeui,KPasswordEdit,,, -tdeui,KPasteTextAction,,, +tdeui,TDEPasteTextAction,,, tdeui,KPixmapIO,,, -tdeui,KPopupFrame,,, -tdeui,KPopupMenu,,, -tdeui,KPopupTitle,,, +tdeui,TDEPopupFrame,,, +tdeui,TDEPopupMenu,,, +tdeui,TDEPopupTitle,,, tdeui,KProgress,,, tdeui,KProgressDialog,,, tdeui,KPushButton,,, -tdeui,KRadioAction,,, -tdeui,KRecentFilesAction,,, +tdeui,TDERadioAction,,, +tdeui,TDERecentFilesAction,,, tdeui,KRestrictedLine,,, tdeui,KRootPermsIcon,,, tdeui,KRootPixmap,,, tdeui,KRuler,,, -tdeui,KSelectAction,,, -tdeui,KSelector,,, +tdeui,TDESelectAction,,, +tdeui,TDESelector,,, tdeui,KSeparator,,, tdeui,KSplashScreen,,, tdeui,KSqueezedTextLabel,,, @@ -320,14 +320,14 @@ tdeui,KTextEdit,,, tdeui,KTimeWidget,,, tdeui,KTipDatabase,,, tdeui,KTipDialog,,, -tdeui,KToggleAction,,, -tdeui,KToggleFullScreenAction,,, -tdeui,KToggleToolBarAction,,, -tdeui,KToolBar,,, -tdeui,KToolBarButton,,, -tdeui,KToolBarPopupAction,,, -tdeui,KToolBarRadioGroup,,, -tdeui,KToolBarSeparator,,, +tdeui,TDEToggleAction,,, +tdeui,TDEToggleFullScreenAction,,, +tdeui,TDEToggleToolBarAction,,, +tdeui,TDEToolBar,,, +tdeui,TDEToolBarButton,,, +tdeui,TDEToolBarPopupAction,,, +tdeui,TDEToolBarRadioGroup,,, +tdeui,TDEToolBarSeparator,,, tdeui,KURLLabel,,, tdeui,KValueSelector,,, tdeui,KWidgetAction,,, @@ -341,7 +341,7 @@ tdeui,KXMLGUIClient,,, tdeui,KXMLGUIFactory,,, tdeui,KXYSelector,,, tdeui,QXEmbed,,, -tdeui,testKActionList,,, +tdeui,testTDEActionList,,, tdefile,TDEApplicationPropsPlugin,,, tdefile,KBindingPropsPlugin,,, tdefile,KCombiView,,, @@ -382,7 +382,7 @@ tdefile,KOpenWithDlg,,, tdefile,KPreviewWidgetBase,,, tdefile,KPropertiesDialog,,, tdefile,KPropsDlgPlugin,,, -tdefile,KRecentDocument,,, +tdefile,TDERecentDocument,,, tdefile,KURLBar,,, tdefile,KURLBarItem,,, tdefile,KURLBarItemDialog,,, diff --git a/examples/pytde-sampler/runner.py b/examples/pytde-sampler/runner.py index d9eee11..1bfb18b 100755 --- a/examples/pytde-sampler/runner.py +++ b/examples/pytde-sampler/runner.py @@ -4,16 +4,16 @@ """ import sys from tdecore import TDEApplication, TDECmdLineArgs -from tdeui import KMainWindow +from tdeui import TDEMainWindow from qt import TQVBoxLayout ## relative import -- cry me a river! import about -class SamplerRunnerWindow(KMainWindow): +class SamplerRunnerWindow(TDEMainWindow): def __init__(self, ctor): - KMainWindow.__init__(self) + TDEMainWindow.__init__(self) layout = TQVBoxLayout(self) layout.setAutoAdd(True) self.widget = ctor(self) diff --git a/examples/pytde-sampler/sampler.py b/examples/pytde-sampler/sampler.py index dfb2a06..30e1828 100755 --- a/examples/pytde-sampler/sampler.py +++ b/examples/pytde-sampler/sampler.py @@ -17,8 +17,8 @@ from qt import TQSizePolicy, TQHBoxLayout, TQSpacerItem, TQPushButton from tdecore import i18n, TDEAboutData, TDEApplication, TDECmdLineArgs, TDEGlobal from tdecore import TDEGlobalSettings, KWin, KWinModule, KURL, KIcon -from tdeui import KComboBox, KListView, KListViewItem, KTabWidget, KTextEdit -from tdeui import KMainWindow, KPushButton, KSplashScreen, KStdAction +from tdeui import KComboBox, TDEListView, TDEListViewItem, KTabWidget, KTextEdit +from tdeui import TDEMainWindow, KPushButton, KSplashScreen, KStdAction from tdeui import KKeyDialog, KEditToolbar from kio import TDETrader @@ -197,12 +197,12 @@ class OutputFrame(KTextEdit): return getattr(self.filehandle, name) -class SamplerListView(KListView): +class SamplerListView(TDEListView): """ the main list view of samples """ def __init__(self, parent): - KListView.__init__(self, parent) + TDEListView.__init__(self, parent) self.addColumn(i18n('Sample')) self.setRootIsDecorated(True) @@ -217,7 +217,7 @@ class SamplerListView(KListView): topname, subnames = names[0], names[1:] item = roots.get(topname, None) if item is None: - roots[topname] = item = KListViewItem(self, module.labelText()) + roots[topname] = item = TDEListViewItem(self, module.labelText()) item.module = module item.setPixmap(0, getIcon(module.icon())) @@ -228,7 +228,7 @@ class SamplerListView(KListView): item = cache.get(bname, None) if item is None: subitem = cache[bname] = \ - KListViewItem(subitem, module.labelText()) + TDEListViewItem(subitem, module.labelText()) subitem.module = module subitem.setPixmap(0, getIcon(module.icon())) subitem = item @@ -237,12 +237,12 @@ class SamplerListView(KListView): self.setOpen(root, True) -class SamplerMainWindow(KMainWindow): +class SamplerMainWindow(TDEMainWindow): """ the main window """ def __init__(self, *args): - KMainWindow.__init__(self, *args) + TDEMainWindow.__init__(self, *args) self.hSplitter = hSplit = TQSplitter(TQt.Horizontal, self) self.samplesList = samplesList = SamplerListView(hSplit) self.vSplitter = vSplit = TQSplitter(TQt.Vertical, hSplit) diff --git a/examples/systray.py b/examples/systray.py index 6066d3e..cc7a40a 100644 --- a/examples/systray.py +++ b/examples/systray.py @@ -31,11 +31,11 @@ import sys from qt import TQLabel 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) #-------------------- main ------------------------------------------------ diff --git a/examples/uimodules/uidialogs.py b/examples/uimodules/uidialogs.py index ba03a9a..8b102b4 100644 --- a/examples/uimodules/uidialogs.py +++ b/examples/uimodules/uidialogs.py @@ -1,9 +1,9 @@ from qt import TQVBox, TQLabel, TQLineEdit, TQString, TQPixmap, TQPushButton, TQColor, SIGNAL, TQButtonGroup,\ TQRadioButton, TQt, TQWidget -from tdecore import KAccel, i18n +from tdecore import TDEAccel, i18n -from tdeui import KAboutDialog, KAboutKDE, KBugReport, KColorDialog, KDialog, KDialogBase, KFontDialog,\ +from tdeui import KAboutDialog, KAboutKDE, KBugReport, KColorDialog, KDialog, KDialogBase, TDEFontDialog,\ KPasswordDialog, KMessageBox, KLineEditDlg, KKeyDialog, KWizard # despite what the docs say, there is no enum (in 2.1.1 anyway) @@ -176,13 +176,13 @@ def dlgKDialogBase (parent): dlg.show () -def dlgKFontDialog (parent): - dlg = KFontDialog (parent, "font dlg", False, False) +def dlgTDEFontDialog (parent): + dlg = TDEFontDialog (parent, "font dlg", False, False) dlg.show () def dlgKKeyDialog (parent): # This really doesn't do anything except pop up the dlg - keys = KAccel (parent) + keys = TDEAccel (parent) keys.insertItem( i18n( "Zoom in" ), "Zoom in", "+" ); keys.readSettings(); KKeyDialog.configureKeys (keys) diff --git a/examples/uimodules/uimenus.py b/examples/uimodules/uimenus.py index 6fc72ff..d57f7cc 100644 --- a/examples/uimodules/uimenus.py +++ b/examples/uimodules/uimenus.py @@ -32,21 +32,21 @@ class PageNotImpl: niLbl.show () -def menuKAccelGen (parent): +def menuTDEAccelGen (parent): parent.currentPageObj = PageNotImpl (parent) -def menuKAccelMenu (parent): +def menuTDEAccelMenu (parent): parent.currentPageObj = PageNotImpl (parent) -def menuKAction (parent): +def menuTDEAction (parent): parent.currentPageObj = PageLaunch (parent) os.system ("python menudemo.py") -def menuKActionMenu (parent): +def menuTDEActionMenu (parent): parent.currentPageObj = PageLaunch (parent) os.system ("python menudemo.py") -def menuKActionSeparator (parent): +def menuTDEActionSeparator (parent): parent.currentPageObj = PageLaunch (parent) os.system ("python menudemo.py") @@ -73,13 +73,13 @@ def menuKPanelExtension (parent): def menuKPanelMenu (parent): parent.currentPageObj = PageNotImpl (parent) -def menuKPopupFrame (parent): +def menuTDEPopupFrame (parent): pass -def menuKPopupMenu (parent): +def menuTDEPopupMenu (parent): pass -def menuKPopupTitle (parent): +def menuTDEPopupTitle (parent): pass def menuKStatusBar (parent): @@ -94,7 +94,7 @@ def menuKStdAction (parent): parent.currentPageObj = PageLaunch (parent) os.system ("python menudemo.py") -def menuKToolBar (parent): +def menuTDEToolBar (parent): parent.currentPageObj = PageLaunch (parent) os.system ("python menudemo.py") diff --git a/examples/uimodules/uiwidgets.py b/examples/uimodules/uiwidgets.py index 35e6a34..c6f4df4 100644 --- a/examples/uimodules/uiwidgets.py +++ b/examples/uimodules/uiwidgets.py @@ -4,8 +4,8 @@ from qt import TQLabel, TQFrame, TQColor, TQPushButton, SIGNAL, TQButtonGroup, T TQWidget, TQTimer from tdecore import TDEApplication -from tdeui import KEdit, KComboBox, KColorCombo, KEditListBox, KListBox, KLineEdit, KRestrictedLine,\ - KSqueezedTextLabel, KFontChooser, KButtonBox, KColorButton, KColorCells,\ +from tdeui import KEdit, KComboBox, KColorCombo, KEditListBox, TDEListBox, KLineEdit, KRestrictedLine,\ + KSqueezedTextLabel, TDEFontChooser, KButtonBox, KColorButton, KColorCells,\ KColorPatch, KDualColorButton,\ KRootPermsIcon, KWritePermsIcon, KCharSelect, KDialog, KLed, KRootPixmap,\ KTabCtl, KProgress, KDatePicker, KDateTable, KGradientSelector, KHSSelector,\ @@ -174,11 +174,11 @@ class Page2: editListBox.insertStrList (["One", "Two", "Three"]) editListBox.show () - lbLbl = TQLabel ("KListBox", self.page) + lbLbl = TQLabel ("TDEListBox", self.page) lbLbl.setGeometry (x2, y2, 100, 20) lbLbl.show () - listBox = KListBox (self.page) + listBox = TDEListBox (self.page) listBox.setGeometry (x2, y2 + 20, 100, 100) listBox.insertStrList (["One", "Two", "Three"]) listBox.show () @@ -190,11 +190,11 @@ class Page3: x = 10 y = 10 - fontLbl = TQLabel ("KFontChooser", self.page) + fontLbl = TQLabel ("TDEFontChooser", self.page) fontLbl.setGeometry (x, y, 95, 20) fontLbl.show () - fontChoose = KFontChooser (self.page) + fontChoose = TDEFontChooser (self.page) fontChoose.setGeometry (x, y + 20, 375, 300) fontChoose.show () @@ -576,7 +576,7 @@ class PageThisApp: x = 10 y = 10 - taLbl = TQLabel ("This application uses KMainWindow as its top level widget\n and KListView in the"\ + taLbl = TQLabel ("This application uses TDEMainWindow as its top level widget\n and TDEListView in the"\ " left-hand panel", self.page) taLbl.setGeometry (x, y, 300, 60) taLbl.show () @@ -672,7 +672,7 @@ def widKEdit (parent): def widKEditListBox (parent): parent.currentPageObj = Page2 (parent) -def widKFontChooser (parent): +def widTDEFontChooser (parent): parent.currentPageObj = Page3 (parent) def widKHSSelector (parent): @@ -696,10 +696,10 @@ def widKLed (parent): def widKLineEdit (parent): parent.currentPageObj = Page1 (parent) -def widKListBox (parent): +def widTDEListBox (parent): parent.currentPageObj = Page2 (parent) -def widKListView (parent): +def widTDEListView (parent): parent.currentPageObj = PageThisApp (parent) def widKNumInput (parent): @@ -717,7 +717,7 @@ def widKProgress (parent): def widKRootPixmap (parent): parent.currentPageObj = PageNotImpl (parent) -def widKMainWindow (parent): +def widTDEMainWindow (parent): parent.currentPageObj = PageThisApp (parent) def widKRestrictedLine (parent): @@ -726,7 +726,7 @@ def widKRestrictedLine (parent): def widKRuler (parent): parent.currentPageObj = PageNotImpl (parent) -def widKSelector (parent): +def widTDESelector (parent): parent.currentPageObj = Page4 (parent) def widKSeparator (parent): diff --git a/examples/uimodules/uixml.py b/examples/uimodules/uixml.py index cabcc80..b661ffb 100644 --- a/examples/uimodules/uixml.py +++ b/examples/uimodules/uixml.py @@ -19,7 +19,7 @@ class PageLaunch: TDEApplication.kApplication ().processEvents () -def xmlKActionCollection (parent): +def xmlTDEActionCollection (parent): parent.currentPageObj = PageLaunch (parent) os.system ("python xmlmenudemo.py") diff --git a/examples/uiqxembed.py b/examples/uiqxembed.py index 0ed9258..487016b 100644 --- a/examples/uiqxembed.py +++ b/examples/uiqxembed.py @@ -8,7 +8,7 @@ from qt import TQIconSet, TQProcess, TQTimer, SIGNAL, SLOT from tdecore import TDEAboutData, TDEApplication, TDECmdLineArgs, TDEGlobal, KIcon from tdecore import KWin, KWinModule -from tdeui import KComboBox, KMainWindow, KPushButton, QXEmbed +from tdeui import KComboBox, TDEMainWindow, KPushButton, QXEmbed ## add the missing items to the pyuic-generated module @@ -89,12 +89,12 @@ class ExampleForm(QXEmbedExample): tabs.setTabIconSet(embedded, TQIconSet(pxm)) -class ExampleMain(KMainWindow): +class ExampleMain(TDEMainWindow): """ an example main window """ def __init__ (self, *args): - KMainWindow.__init__(self, *args) + TDEMainWindow.__init__(self, *args) self.setGeometry(0, 0, 400, 400) self.embed = embed = ExampleForm(self) self.setCentralWidget(embed) diff --git a/examples/uisampler.py b/examples/uisampler.py index 7eab781..a166116 100644 --- a/examples/uisampler.py +++ b/examples/uisampler.py @@ -4,7 +4,7 @@ sys.path.append ("./uimodules") from qt import TQSplitter, TQWidgetStack, TQWidget, TQListViewItem, SIGNAL, TQCString , TQScrollView, TQRect, TQt from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData -from tdeui import KMainWindow, KListView +from tdeui import TDEMainWindow, TDEListView from uidialogs import * from uiwidgets import * @@ -23,7 +23,7 @@ listItems = {"Dialogs": "KColorDialog": [],\ "KDialog": [],\ "KDialogBase": ["KDialogBaseButton", "KDialogBase::SButton", "KDialogBaseTile"],\ - "KFontDialog": [],\ + "TDEFontDialog": [],\ "KKeyDialog": [],\ "KLineEditDlg": [],\ "KMessageBox": [],\ @@ -47,42 +47,42 @@ listItems = {"Dialogs": "KDualColorButton": [],\ "KEdit": ["KEdFind", "KEdGotoLine", "KEdReplace"],\ "KEditListBox": [],\ - "KFontChooser": [],\ + "TDEFontChooser": [],\ "KHSSelector": [],\ "KIconView": [],\ "KJanusWidget": ["KJanusWidget::IconListBox"],\ "KKeyChooser": [],\ "KLed": [],\ "KLineEdit": [],\ - "KListBox": [],\ - "KListView": [],\ + "TDEListBox": [],\ + "TDEListView": [],\ "KNumInput": ["KDoubleNumInput", "KIntNumInput"],\ "KPaletteTable": [],\ "KPasswordEdit": [],\ "KProgress": [],\ "KRootPixmap": [],\ - "KMainWindow": [],\ + "TDEMainWindow": [],\ "KRestrictedLine": [],\ "KRuler": [],\ - "KSelector": ["KGradientSelector", "KValueSelector", "KHSSelector", "KXYSelector"],\ + "TDESelector": ["KGradientSelector", "KValueSelector", "KHSSelector", "KXYSelector"],\ "KSeparator": [],\ "KSqueezedTextLabel": [],\ "KTabCtl": [],\ "KTextBrowser": [],\ "KURLLabel": []},\ "XML": - {"KActionCollection": [],\ + {"TDEActionCollection": [],\ "KEditToolbar": [],\ "KEditToolbarWidget": [],\ "KXMLGUIBuilder": [],\ "KXMLGUIClient": ["KXMLGUIClient::DocStruct"],\ "KXMLGUIFactory": []},\ "Menus/Toolbars": - {"KAccelMenu": [],\ - "KAction": ["KFontAction", "KFontSizeAction", "KListAction", "KRecentFilesAction", "KRadioAction",\ - "KSelectAction", "KToggleAction"],\ - "KActionMenu": [],\ - "KActionSeparator": [],\ + {"TDEAccelMenu": [],\ + "TDEAction": ["TDEFontAction", "TDEFontSizeAction", "TDEListAction", "TDERecentFilesAction", "TDERadioAction",\ + "TDESelectAction", "TDEToggleAction"],\ + "TDEActionMenu": [],\ + "TDEActionSeparator": [],\ "KContextMenuManager": [],\ "KDCOPActionProxy": [],\ "KHelpMenu": [],\ @@ -90,14 +90,14 @@ listItems = {"Dialogs": "KPanelApplet": [],\ "KPanelExtension": [],\ "KPanelMenu": [],\ - "KPopupFrame": [],\ - "KPopupMenu": [],\ - "KPopupTitle": [],\ + "TDEPopupFrame": [],\ + "TDEPopupMenu": [],\ + "TDEPopupTitle": [],\ "KStatusBar": [],\ "KStatusBarLabel": [],\ "KStdAction": [],\ - "KToolBar": ["KToolBarButton", "KToolBarButtonList", "KToolBarPopupAction",\ - "KToolBarRadioGroup", "KToolBarSeparator"],\ + "TDEToolBar": ["TDEToolBarButton", "TDEToolBarButtonList", "TDEToolBarPopupAction",\ + "TDEToolBarRadioGroup", "TDEToolBarSeparator"],\ "KWindowListMenu": []},\ "Other": {"KAlphaPainter": [],\ @@ -131,9 +131,9 @@ Select a dialog/widget/menu/etc example from the tree at left """ -class MainWin (KMainWindow): +class MainWin (TDEMainWindow): def __init__ (self, *args): - apply (KMainWindow.__init__, (self,) + args) + apply (TDEMainWindow.__init__, (self,) + args) self.setCaption ("Samples of PyKDE widget usage") self.setGeometry (mainGeom) @@ -141,7 +141,7 @@ class MainWin (KMainWindow): # create the main view - list view on the left and an # area to display frames on the right self.mainView = TQSplitter (self, "main view") - self.tree = KListView (self.mainView, "tree") + self.tree = TDEListView (self.mainView, "tree") self.page = TQWidgetStack (self.mainView, "page") self.blankPage = TQWidget (self.page, "blank") self.blankPage.setGeometry (0, 0, 375, 390) diff --git a/examples/uitdemdi.py b/examples/uitdemdi.py index f746384..7177a16 100644 --- a/examples/uitdemdi.py +++ b/examples/uitdemdi.py @@ -30,7 +30,7 @@ import sys from qt import SIGNAL, TQVBoxLayout, TQLabel from tdecore import i18n, TDEAboutData, TDEApplication, TDEGlobal, KIcon, TDECmdLineArgs -from tdeui import KDockWidget, KListBox, KStdAction +from tdeui import KDockWidget, TDEListBox, KStdAction try: from tdemdi import KMdi, KMdiMainFrm, KMdiChildView @@ -74,7 +74,7 @@ class KmdiExample(KMdiMainFrm): self.tools = {} for idx, ico in enumerate(self.toolIcons): - wid = KListBox(self, 'list%s' % idx) + wid = TDEListBox(self, 'list%s' % idx) self.makeTool(wid, 'Tool %s' % idx, ico) ## smells self.mainToolWidget = maintool = self.tools['Tool 0'][0] diff --git a/examples/xmlmenudemo.py b/examples/xmlmenudemo.py index ce372ca..ac469bf 100644 --- a/examples/xmlmenudemo.py +++ b/examples/xmlmenudemo.py @@ -43,17 +43,17 @@ import sys, os from qt import TQPopupMenu, SIGNAL, TQLabel, TQIconSet -from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, KIcon, KIconLoader, KShortcut, TDEGlobal -from tdeui import KMainWindow, KMessageBox, KStdAction, KAction, KToggleAction, KFontSizeAction, KFontAction, KRadioAction,\ - KActionSeparator, KActionMenu, KWindowListMenu, KXMLGUIClient, KActionCollection +from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, KIcon, KIconLoader, TDEShortcut, TDEGlobal +from tdeui import TDEMainWindow, KMessageBox, KStdAction, TDEAction, TDEToggleAction, TDEFontSizeAction, TDEFontAction, TDERadioAction,\ + TDEActionSeparator, TDEActionMenu, KWindowListMenu, KXMLGUIClient, 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.setGeometry (0, 0, 350, 200) @@ -76,12 +76,12 @@ class MainWin (KMainWindow): self.saveAsAction.setEnabled (False) def initActions (self): - # This is used in all of the KAction/KStdAction constructors -- + # This is used in all of the TDEAction/KStdAction constructors -- # Seems more efficient to only do the call once acts = self.actionCollection () # This is used often enough, we just define it here - scNull = KShortcut.null () + scNull = TDEShortcut.null () # "File" menu items self.newAction = KStdAction.openNew (self.slotNew, acts) @@ -114,20 +114,20 @@ class MainWin (KMainWindow): # object names - the variable the object is assigned to ('self.specialAction') # has no meaning in XNLGUI terms except through the objects 'name' member value - self.specialAction = KAction (i18n ("Special"), scNull, self.slotSpecial, acts, "specialActionName") + self.specialAction = TDEAction (i18n ("Special"), scNull, self.slotSpecial, acts, "specialActionName") # Demo menu items - # KToggleAction has an isChecked member and emits the "toggle" signal - self.toggle1Action = KToggleAction ("Toggle 1", scNull, acts, "toggle1Action") - self.toggle2Action = KToggleAction ("Toggle 2", scNull, self.slotToggle2, acts, "toggle2Action") + # TDEToggleAction has an isChecked member and emits the "toggle" signal + self.toggle1Action = TDEToggleAction ("Toggle 1", scNull, acts, "toggle1Action") + self.toggle2Action = TDEToggleAction ("Toggle 2", scNull, self.slotToggle2, acts, "toggle2Action") # A separator - create once/use everywhere - self.separateAction = KActionSeparator (acts, "separateAction") + self.separateAction = TDEActionSeparator (acts, "separateAction") # Font stuff in menus or toolbar - self.fontAction = KFontAction ("Font", scNull, acts, "fontAction") - self.fontSizeAction = KFontSizeAction ("Font Size", scNull, acts, "fontSizeAction") + self.fontAction = TDEFontAction ("Font", scNull, acts, "fontAction") + self.fontSizeAction = TDEFontSizeAction ("Font Size", scNull, acts, "fontSizeAction") self.fontAction.setComboWidth (150) self.fontSizeAction.setComboWidth (75) @@ -136,8 +136,8 @@ class MainWin (KMainWindow): icons = KIconLoader () iconSet = TQIconSet (icons.loadIcon ("viewmag", KIcon.Toolbar)) - # Nested menus using KActions (also nested on toolbar) - self.actionMenu = KActionMenu ("Action Menu", acts, "actionMenu") + # Nested menus using TDEActions (also nested on toolbar) + self.actionMenu = TDEActionMenu ("Action Menu", acts, "actionMenu") self.actionMenu.setIconSet (iconSet) # By using KStdAction here, the XMLGUI mechanism will automatically @@ -152,12 +152,12 @@ class MainWin (KMainWindow): self.actionMenu.insert (KStdAction.zoomIn (self.slotZoomIn, acts)) self.actionMenu.insert (KStdAction.zoomOut (self.slotZoomOut, acts)) - self.radio1Action = KRadioAction ("Radio 1", scNull, self.slotRadio, acts, "radio1") + self.radio1Action = TDERadioAction ("Radio 1", scNull, self.slotRadio, acts, "radio1") self.radio1Action.setExclusiveGroup ("Radio") self.radio1Action.setChecked (1) - self.radio2Action = KRadioAction ("Radio 2", scNull, self.slotRadio, acts, "radio2") + self.radio2Action = TDERadioAction ("Radio 2", scNull, self.slotRadio, acts, "radio2") self.radio2Action.setExclusiveGroup ("Radio") - self.radio3Action = KRadioAction ("Radio 3", scNull, self.slotRadio, acts, "radio3") + self.radio3Action = TDERadioAction ("Radio 3", scNull, self.slotRadio, acts, "radio3") self.radio3Action.setExclusiveGroup ("Radio") @@ -168,7 +168,7 @@ class MainWin (KMainWindow): def dynamicActions (self): # This creates something like a 'recent files list' in the 'File' menu - # (There is a KRecentFilesAction that probably should be used instead, + # (There is a TDERecentFilesAction that probably should be used instead, # but this demos the use of action lists) # The code here corresponds to the <ActionList name="recent"/> entry # in the rc file @@ -180,15 +180,15 @@ class MainWin (KMainWindow): self.unplugActionList("recent"); self.dynamicActionsList = [] - # Create a KAction for each entry and store the KActions in a list - # Use 'None' for the KActionCollection argument in the KAction constructor + # Create a TDEAction for each entry and store the TDEActions in a list + # Use 'None' for the TDEActionCollection argument in the TDEAction constructor # in this case only for i in range (len (fakeFiles)): - act = KAction (i18n (" ".join (["&" + str (i), fakeFiles [i]])), KShortcut.null (),\ + act = TDEAction (i18n (" ".join (["&" + str (i), fakeFiles [i]])), TDEShortcut.null (),\ self.slotFake, None, fakeFiles [i][:-4] + "open") self.dynamicActionsList.append(act) - # Update the menu with the most recent KActions + # Update the menu with the most recent TDEActions self.plugActionList("recent", self.dynamicActionsList) |