From d070aee4c277d331e54b81ac2881977a8d8cb7c0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 5 Dec 2011 00:17:19 -0600 Subject: Finish pykde to pytde rename --- examples/pykde-sampler/HOWTO.samples | 60 --- examples/pykde-sampler/TODO | 12 - examples/pykde-sampler/__init__.py | 1 - examples/pykde-sampler/about.py | 57 --- examples/pykde-sampler/aboutkde.png | Bin 36991 -> 0 bytes examples/pykde-sampler/basic_widgets/__init__.py | 17 - examples/pykde-sampler/basic_widgets/datepicker.py | 42 -- .../pykde-sampler/basic_widgets/historycombo.py | 53 -- examples/pykde-sampler/contributors.txt | 4 - examples/pykde-sampler/dialogs/__init__.py | 18 - examples/pykde-sampler/dialogs/about/__init__.py | 16 - examples/pykde-sampler/dialogs/about/aboutapp.py | 29 -- examples/pykde-sampler/dialogs/about/aboutkde.py | 28 -- examples/pykde-sampler/dialogs/bugreport.py | 34 -- examples/pykde-sampler/dialogs/color.py | 42 -- examples/pykde-sampler/dialogs/config.py | 59 --- examples/pykde-sampler/dialogs/edfind.py | 52 -- examples/pykde-sampler/dialogs/edreplace.py | 52 -- examples/pykde-sampler/dialogs/font.py | 53 -- examples/pykde-sampler/dialogs/input.py | 87 ---- examples/pykde-sampler/dialogs/key.py | 29 -- examples/pykde-sampler/dialogs/msgbox.py | 141 ------ examples/pykde-sampler/dialogs/passwd.py | 34 -- examples/pykde-sampler/dialogs/progress.py | 39 -- examples/pykde-sampler/dialogs/tip.py | 31 -- examples/pykde-sampler/dialogs/tips | 24 - examples/pykde-sampler/gen_todo.py | 19 - examples/pykde-sampler/icon_handling/__init__.py | 18 - examples/pykde-sampler/icon_handling/misc.py | 31 -- examples/pykde-sampler/icon_handling/sizes.py | 30 -- examples/pykde-sampler/lib.py | 105 ---- examples/pykde-sampler/misc/__init__.py | 16 - examples/pykde-sampler/misc/gradientselect.py | 51 -- examples/pykde-sampler/misc/passivepop.py | 43 -- examples/pykde-sampler/misc/window_info.py | 35 -- examples/pykde-sampler/qt_widgets/CONTRIB | 537 --------------------- examples/pykde-sampler/qt_widgets/__init__.py | 17 - examples/pykde-sampler/qt_widgets/table.py | 42 -- examples/pykde-sampler/runner.py | 58 --- examples/pykde-sampler/sampler.py | 423 ---------------- examples/pykde-sampler/sampler.rc | 13 - examples/pykde-sampler/wizards/__init__.py | 2 - examples/pykde-sampler/wizards/wiz.py | 2 - examples/pykde-sampler/xwin/__init__.py | 18 - 44 files changed, 2474 deletions(-) delete mode 100644 examples/pykde-sampler/HOWTO.samples delete mode 100644 examples/pykde-sampler/TODO delete mode 100644 examples/pykde-sampler/__init__.py delete mode 100644 examples/pykde-sampler/about.py delete mode 100644 examples/pykde-sampler/aboutkde.png delete mode 100644 examples/pykde-sampler/basic_widgets/__init__.py delete mode 100644 examples/pykde-sampler/basic_widgets/datepicker.py delete mode 100644 examples/pykde-sampler/basic_widgets/historycombo.py delete mode 100644 examples/pykde-sampler/contributors.txt delete mode 100644 examples/pykde-sampler/dialogs/__init__.py delete mode 100644 examples/pykde-sampler/dialogs/about/__init__.py delete mode 100644 examples/pykde-sampler/dialogs/about/aboutapp.py delete mode 100644 examples/pykde-sampler/dialogs/about/aboutkde.py delete mode 100644 examples/pykde-sampler/dialogs/bugreport.py delete mode 100644 examples/pykde-sampler/dialogs/color.py delete mode 100644 examples/pykde-sampler/dialogs/config.py delete mode 100644 examples/pykde-sampler/dialogs/edfind.py delete mode 100644 examples/pykde-sampler/dialogs/edreplace.py delete mode 100644 examples/pykde-sampler/dialogs/font.py delete mode 100644 examples/pykde-sampler/dialogs/input.py delete mode 100644 examples/pykde-sampler/dialogs/key.py delete mode 100644 examples/pykde-sampler/dialogs/msgbox.py delete mode 100644 examples/pykde-sampler/dialogs/passwd.py delete mode 100644 examples/pykde-sampler/dialogs/progress.py delete mode 100644 examples/pykde-sampler/dialogs/tip.py delete mode 100644 examples/pykde-sampler/dialogs/tips delete mode 100644 examples/pykde-sampler/gen_todo.py delete mode 100644 examples/pykde-sampler/icon_handling/__init__.py delete mode 100644 examples/pykde-sampler/icon_handling/misc.py delete mode 100644 examples/pykde-sampler/icon_handling/sizes.py delete mode 100644 examples/pykde-sampler/lib.py delete mode 100644 examples/pykde-sampler/misc/__init__.py delete mode 100644 examples/pykde-sampler/misc/gradientselect.py delete mode 100644 examples/pykde-sampler/misc/passivepop.py delete mode 100644 examples/pykde-sampler/misc/window_info.py delete mode 100644 examples/pykde-sampler/qt_widgets/CONTRIB delete mode 100644 examples/pykde-sampler/qt_widgets/__init__.py delete mode 100644 examples/pykde-sampler/qt_widgets/table.py delete mode 100755 examples/pykde-sampler/runner.py delete mode 100755 examples/pykde-sampler/sampler.py delete mode 100644 examples/pykde-sampler/sampler.rc delete mode 100644 examples/pykde-sampler/wizards/__init__.py delete mode 100644 examples/pykde-sampler/wizards/wiz.py delete mode 100644 examples/pykde-sampler/xwin/__init__.py (limited to 'examples/pykde-sampler') diff --git a/examples/pykde-sampler/HOWTO.samples b/examples/pykde-sampler/HOWTO.samples deleted file mode 100644 index 2b20c52..0000000 --- a/examples/pykde-sampler/HOWTO.samples +++ /dev/null @@ -1,60 +0,0 @@ -How to Write Samples for the PyKDE Sampler -========================================== - - -Create or locate a directory within the sampler application root directory. - -Add a module. - -In side the module, add the following: - -- iconName - string (optional) - default: 'filenew' - example: 'colorize' - - When supplied, this should be the short name of a KDE icon, such as - 'stop', 'editclear', etc. If available, This icon will be used as - the list item's icon in the sampler. Not all icons are available in - all themes, so try to use the icons that are available in the - default KDE installation. - - -- labelText - string (optional) - default: module name - example: 'KMessageBox' - - When supplied, this value is used as the list item text for the - sample. If it's not supplied, the application will use the name of - the module instead. - - -- docParts - two-tuple (optional) - default: None - example: ('tdeui', 'KAboutDialog') - - If specified, this sequence should contain two items, first item - name of pytde module, second item name of class within the module. - These two values are used to form the URL to the documentation for - the sample. - - -- one of buildWidget, buildDialog, buildApp, MainFrame - callable (retquired) - default: None - example: MainFrame(TQFrame): ... - - The sample module must contain a callable with one of these names. - The callable must accept a single positional parameter, the parent - widget. - - In most cases, it is sufficient to define a subclass of TQFrame named - 'MainFrame'. To construct a more complex sample, define a function - with one of the other names. - - The callable should return (or instatiate) a widget for display in - the main sampler widget. The created frame is responsible for - displaying it's help text and for any providing any widgets - necessary to - - - - diff --git a/examples/pykde-sampler/TODO b/examples/pykde-sampler/TODO deleted file mode 100644 index 730cc02..0000000 --- a/examples/pykde-sampler/TODO +++ /dev/null @@ -1,12 +0,0 @@ -Sampler App -=========== - -- Turn off word wrap in the source viewer -- Add application icon -- Enable hyperlink signal and slot in doc viewer - - -Samples -======= - -- More samples diff --git a/examples/pykde-sampler/__init__.py b/examples/pykde-sampler/__init__.py deleted file mode 100644 index 4265cc3..0000000 --- a/examples/pykde-sampler/__init__.py +++ /dev/null @@ -1 +0,0 @@ -#!/usr/bin/env python diff --git a/examples/pykde-sampler/about.py b/examples/pykde-sampler/about.py deleted file mode 100644 index 108194b..0000000 --- a/examples/pykde-sampler/about.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python -""" About the PyKDE Sampler - -Defines the 'about' function to create a KAboutData instance for the -sampler application. -""" -from os.path import dirname, join -from tdecore import KAboutData - - -appName = 'pytdesampler' -progName = 'PyKDE Sampler' -authorName = 'Troy Melhase' -authorEmail = bugsEmailAddress = 'troy@gci.net' -version = '0.1' -shortDescription = 'The PyKDE Sampler' -licenseType = KAboutData.License_GPL_V2 -copyrightStatement = '(c) 2006, %s' % (authorName, ) -homePageAddress = 'http://www.riverbankcomputing.co.uk/pytde/' -aboutText = ("The application sampler for PyKDE.") -contributors = [] # module-level global for keeping the strings around; intentional - - -def about(): - """ creates KAboutData instance for the app - - """ - about = KAboutData( - appName, - progName, - version, - shortDescription, - licenseType, - copyrightStatement, - aboutText, - homePageAddress, - bugsEmailAddress) - about.addAuthor(authorName, '', authorEmail) - - try: - contrib = open(join(dirname(__file__), 'contributors.txt')) - contrib = [line.strip() for line in contrib] - contrib = [line for line in contrib if not line.startswith('#')] - for line in contrib: - try: - name, task, addr = [s.strip() for s in line.split(',')] - contributors.append((name, task, addr)) - except: - pass - except: - pass - - contributors.sort(lambda a, b:cmp(a[0], b[0])) - for name, task, addr in contributors: - about.addCredit(name, task, addr) - - return about diff --git a/examples/pykde-sampler/aboutkde.png b/examples/pykde-sampler/aboutkde.png deleted file mode 100644 index 2aa6d73..0000000 Binary files a/examples/pykde-sampler/aboutkde.png and /dev/null differ diff --git a/examples/pykde-sampler/basic_widgets/__init__.py b/examples/pykde-sampler/basic_widgets/__init__.py deleted file mode 100644 index 312f629..0000000 --- a/examples/pykde-sampler/basic_widgets/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -labelText = 'Widgets' -iconName = 'about_kde' - -helpText = """KDE provides a large set of basic widgets for application use. -Select the children of this item to see for yourself.""" - -from qt import TQFrame, TQVBoxLayout -from tdeui import KTextEdit - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - layout = TQVBoxLayout(self) - self.text = KTextEdit(helpText, '', self) - layout.addWidget(self.text, 1) - layout.addStretch(1) diff --git a/examples/pykde-sampler/basic_widgets/datepicker.py b/examples/pykde-sampler/basic_widgets/datepicker.py deleted file mode 100644 index b0f74c6..0000000 --- a/examples/pykde-sampler/basic_widgets/datepicker.py +++ /dev/null @@ -1,42 +0,0 @@ -from qt import TQFrame, TQStringList, TQVBoxLayout, SIGNAL, TQLabel, TQSizePolicy, TQt -from qttable import TQTable -from tdeui import KTextEdit, KDatePicker, KDateWidget - - -labelText = 'KDatePicker' -iconName = 'date' -helpText = """A date selection widget. - -Provides a widget for calendar date input. - -Different from the previous versions, it now emits two types of -signals, either dateSelected() or dateEntered() (see documentation for -both signals). - -A line edit has been added in the newer versions to allow the user to -select a date directly by entering numbers like 19990101 or 990101. -""" - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.help = KTextEdit(helpText, '', self) - self.dateDisplay = KDateWidget(self) - - self.dateDisplay.setSizePolicy(TQSizePolicy(TQSizePolicy.Maximum, - TQSizePolicy.Maximum)) - - self.datePicker = KDatePicker(self) - - layout = TQVBoxLayout(self) - layout.addWidget(self.help, 1) - layout.addWidget(self.datePicker, 0, TQt.AlignHCenter) - layout.addStretch(1) - - self.other = TQLabel('Selected Date:', self) - layout.addWidget(self.other, 0) - layout.addWidget(self.dateDisplay, 2) - - self.connect(self.datePicker, SIGNAL('dateChanged(TQDate)'), - self.dateDisplay.setDate) - diff --git a/examples/pykde-sampler/basic_widgets/historycombo.py b/examples/pykde-sampler/basic_widgets/historycombo.py deleted file mode 100644 index 3b0797c..0000000 --- a/examples/pykde-sampler/basic_widgets/historycombo.py +++ /dev/null @@ -1,53 +0,0 @@ -from qt import TQt, TQFrame, TQHBoxLayout, TQVBoxLayout, TQStringList, TQLabel, \ - SIGNAL, SLOT -from tdeui import KHistoryCombo, KTextEdit - - -iconName = 'history' -labelText = 'KHistoryCombo' -docParts = ('tdeui', 'KHistoryCombo') -helpText = ('An example of the KHistoryCombo widget.' - '\n\n' - 'Completion is enabled via the setHistoryItems call; when the second ' - 'parameter is True, matching items from the list appear as you type.' - '\n\n' - 'The activated signal is connected to the addToHistory ' - 'slot to automatically add new items.') - - -historyText = 'a tquick brown fox jumps over the lazy dog' - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.help = KTextEdit(helpText, '', self) - self.historyCombo = KHistoryCombo(self) - - self.historySelectionLabel = TQLabel('Selected value: ', self) - self.historySelection = TQLabel('(none)', self) - - items = TQStringList() - for item in historyText.split(): - items.append(item) - self.historyCombo.setHistoryItems(items, True) - - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help, 3) - layout.addStretch(1) - selectionLayout = TQHBoxLayout(layout, 4) - selectionLayout.addWidget(self.historySelectionLabel, 1) - selectionLayout.addWidget(self.historySelection, 10, TQt.AlignLeft) - layout.addWidget(self.historyCombo, 0) - layout.addStretch(10) - - self.connect(self.historyCombo, SIGNAL('activated(const TQString& )'), - self.historyCombo, SLOT('addToHistory(const TQString&)')) - self.connect(self.historyCombo, SIGNAL('cleared()'), - self.historyCleared) - self.connect(self.historyCombo, SIGNAL('activated(const TQString &)'), - self.historySelection.setText) - - def historyCleared(self): - print 'History combo cleared.' - diff --git a/examples/pykde-sampler/contributors.txt b/examples/pykde-sampler/contributors.txt deleted file mode 100644 index 5063545..0000000 --- a/examples/pykde-sampler/contributors.txt +++ /dev/null @@ -1,4 +0,0 @@ -# author, contributions, email -Phil Thompson, For PyTQt and SIP, phil@riverbankcomputing.co.uk -Jim Bublitz, For PyKDE, jbublitz@nwinternet.com - diff --git a/examples/pykde-sampler/dialogs/__init__.py b/examples/pykde-sampler/dialogs/__init__.py deleted file mode 100644 index 07a731c..0000000 --- a/examples/pykde-sampler/dialogs/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -labelText = 'Dialog Boxes' -iconName = 'launch' - - -helpText = ("KDE provides a convenient set of dialog boxes for application use. " - "Select the children of this item to see for yourself.") - - -from qt import TQFrame, TQVBoxLayout -from tdeui import KTextEdit - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - layout = TQVBoxLayout(self) - self.text = KTextEdit(helpText, '', self) - layout.addWidget(self.text, 1) diff --git a/examples/pykde-sampler/dialogs/about/__init__.py b/examples/pykde-sampler/dialogs/about/__init__.py deleted file mode 100644 index ea1ad17..0000000 --- a/examples/pykde-sampler/dialogs/about/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -labelText = 'About Dialogs' -iconName = 'info' - -helpText = ("KDE has multiple dialog types to display information about your " -"applicaiton and environment. They provide a tremendous amount of functionality " -"and consistency. They're easy to use, and they're good for the environment!") - -from qt import TQFrame, TQVBoxLayout -from tdeui import KTextEdit - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - layout = TQVBoxLayout(self) - self.text = KTextEdit(helpText, '', self) - layout.addWidget(self.text, 1) diff --git a/examples/pykde-sampler/dialogs/about/aboutapp.py b/examples/pykde-sampler/dialogs/about/aboutapp.py deleted file mode 100644 index 820d50f..0000000 --- a/examples/pykde-sampler/dialogs/about/aboutapp.py +++ /dev/null @@ -1,29 +0,0 @@ -iconName = 'about_kde' -labelText = 'KAboutApplication' - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdecore import i18n -from tdeui import KAboutApplication, KPushButton, KTextEdit - - -helpText = ("Typically available via the applications 'Help' menu, this " - "dialog presents the user with the applications About widget.") - -docParts = ('tdeui', 'KAboutDialog') - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('About Application'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showAboutDialog) - - def showAboutDialog(self): - dlg = KAboutApplication(self) - dlg.show() diff --git a/examples/pykde-sampler/dialogs/about/aboutkde.py b/examples/pykde-sampler/dialogs/about/aboutkde.py deleted file mode 100644 index dc7390c..0000000 --- a/examples/pykde-sampler/dialogs/about/aboutkde.py +++ /dev/null @@ -1,28 +0,0 @@ -iconName = 'about_kde' -labelText = 'KAboutKDE' - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdecore import i18n -from tdeui import KAboutKDE, KPushButton, KTextEdit - - -helpText = ("Typically available via the applications 'Help' menu, this " - "dialog presents the user with the standard KDE About dialog.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('About KDE'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showAboutDialog) - - def showAboutDialog(self): - dlg = KAboutKDE(self) - dlg.show() diff --git a/examples/pykde-sampler/dialogs/bugreport.py b/examples/pykde-sampler/dialogs/bugreport.py deleted file mode 100644 index 76fe0ae..0000000 --- a/examples/pykde-sampler/dialogs/bugreport.py +++ /dev/null @@ -1,34 +0,0 @@ -iconName = 'core' -labelText = 'KBugReport' - -##~ if we wanted to, we could define the name of a KDE class used for lookup of -##~ the documentation url. The 'labelText' string above already -##~ specifies what we want. -##~ docItemName = 'KBugReport' - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdecore import i18n -from tdeui import KAboutDialog, KPushButton, KBugReport, KTextEdit - - -helpText = ("KDE provides a way to report bugs from applications. This dialog" - "is typically available from the application 'Help' menu.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Bug Report Dialog'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showBugDialog) - - - def showBugDialog(self): - dlg = KBugReport(self) - dlg.exec_loop() diff --git a/examples/pykde-sampler/dialogs/color.py b/examples/pykde-sampler/dialogs/color.py deleted file mode 100644 index 738c000..0000000 --- a/examples/pykde-sampler/dialogs/color.py +++ /dev/null @@ -1,42 +0,0 @@ -iconName = 'colorize' -labelText = 'KColorDialog' - - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdecore import i18n -from tdeui import KPushButton, KColorDialog, KColorPatch, KTextEdit - - -helpText = ("KDE provides a nifty common color selection dialog." - "The color selection in the dialog is tracked via a SIGNAL " - "connected to the KColorPatch area below.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Color Dialog'), self) - self.help = KTextEdit(helpText, '', self) - self.patch = KColorPatch(self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addWidget(self.patch, 10) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showColorDialog) - - def showColorDialog(self): - dlg = KColorDialog(self) - - ## this connection is made so that there's a default color - self.connect(dlg, SIGNAL('colorSelected(const TQColor &)'), - self.patch.setPaletteBackgroundColor) - dlg.setColor(self.patch.paletteBackgroundColor()) - - ## this connection is the one that changes the patch color to match - ## the color selected in the dialog - self.connect(dlg, SIGNAL('colorSelected(const TQColor &)'), - self.patch.setColor) - dlg.exec_loop() diff --git a/examples/pykde-sampler/dialogs/config.py b/examples/pykde-sampler/dialogs/config.py deleted file mode 100644 index 8700cff..0000000 --- a/examples/pykde-sampler/dialogs/config.py +++ /dev/null @@ -1,59 +0,0 @@ - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQString -from tdecore import i18n, KConfigSkeleton -from tdeui import KPushButton, KConfigDialog, KTextEdit - -iconName = 'configure' -labelText = 'KConfigDialog' -docParts = ('tdeui', 'KConfigDialog') -helpText = ("") - - -class SampleSettings(KConfigSkeleton): - def __init__(self): - KConfigSkeleton.__init__(self) - self.anyString = TQString() - - self.setCurrentGroup("Strings") - self.addItemString("Test", self.anyString, "Default Value") - - self.setCurrentGroup("Booleans") - self.addItemBool("Any Bool", False) - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Config Dialog'), self) - self.help = KTextEdit(helpText, '', self) - - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showConfigDialog) - - - def showConfigDialog(self): - config = SampleSettings() - dlg = KConfigDialog(self, 'Sampler Config', config) - self.strings = StringsSettings(self) - self.bools = BoolSettings(self) - dlg.addPage(self.strings, 'Strings', 'Strings') - dlg.addPage(self.bools, 'Bools', 'Bools') - dlg.exec_loop() - - -class StringsSettings(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.text = KTextEdit('A String', '', self) - - -class BoolSettings(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.text = KTextEdit('A Bool', '', self) - diff --git a/examples/pykde-sampler/dialogs/edfind.py b/examples/pykde-sampler/dialogs/edfind.py deleted file mode 100644 index 0dabb2f..0000000 --- a/examples/pykde-sampler/dialogs/edfind.py +++ /dev/null @@ -1,52 +0,0 @@ - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQFont, TQString -from tdecore import i18n -from tdeui import KPushButton, KEdFind, KTextEdit - -iconName = 'find' -labelText = 'KEdFind' -docParts = ('tdeui', 'KEdFind') -helpText = ("An example of the KEdFind dialog.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Edit Find Dialog'), self) - self.help = KTextEdit(helpText, '', self) - - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showEdFind) - - - def showEdFind(self): - dlg = self.dlg = KEdFind(self) - self.connect(dlg, SIGNAL('done()'), - self.doneClicked) - self.connect(dlg, SIGNAL('search()'), - self.searchClicked) - dlg.exec_loop() - - - def doneClicked(self): - print 'done searching' - - def searchClicked(self): - print 'searching: ', self.dlg.getText(), - if self.dlg.get_direction(): - print '(backwards) ', - else: - print '(forwards) ', - if self.dlg.case_sensitive(): - print '(case-sensitive)' - else: - print '(case-insensitive)' - - - - diff --git a/examples/pykde-sampler/dialogs/edreplace.py b/examples/pykde-sampler/dialogs/edreplace.py deleted file mode 100644 index 2cbc03e..0000000 --- a/examples/pykde-sampler/dialogs/edreplace.py +++ /dev/null @@ -1,52 +0,0 @@ -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQFont, TQString -from tdecore import i18n -from tdeui import KPushButton, KEdReplace, KTextEdit - -iconName = 'findreplace' -labelText = 'KEdReplace' -docParts = ('tdeui', 'KEdReplace') -helpText = ("An example of the KEdReplace dialog.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Edit Find Dialog'), self) - self.help = KTextEdit(helpText, '', self) - - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showEdReplace) - - - def showEdReplace(self): - dlg = self.dlg = KEdReplace(self) - self.connect(dlg, SIGNAL('done()'), - self.doneClicked) - self.connect(dlg, SIGNAL('replace()'), - self.replaceClicked) - dlg.exec_loop() - - - def doneClicked(self): - print 'done replacing' - - def replaceClicked(self): - print 'replacing: ', self.dlg.getText() - return - if self.dlg.get_direction(): - print '(backwards) ', - else: - print '(forwards) ', - if self.dlg.case_sensitive(): - print '(case-sensitive)' - else: - print '(case-insensitive)' - - - - diff --git a/examples/pykde-sampler/dialogs/font.py b/examples/pykde-sampler/dialogs/font.py deleted file mode 100644 index 194524c..0000000 --- a/examples/pykde-sampler/dialogs/font.py +++ /dev/null @@ -1,53 +0,0 @@ - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQFont, TQString -from tdecore import i18n -from tdeui import KPushButton, KFontDialog, KTextEdit - -iconName = 'fonts' -labelText = 'KFontDialog' -docParts = ('tdeui', 'KFontDialog') -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 " - "as the default. If the dialog is accepted, the font of this " - "widget is change to match the selection.") - - -fontText = """Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam -ante. Nam in mauris. Vestibulum ante velit, condimentum vel, congue -sit amet, lobortis a, dui. Fusce auctor, quam non pretium nonummy, leo -ante imperdiet libero, id lobortis erat erat tquis eros. Pellentesque -habitant morbi tristique senectus et netus et malesuada fames ac -turpis egestas. Cras ut metus. Vivamus suscipit, sapien id tempor -elementum, nunc quam malesuada dolor, sit amet luctus sapien odio vel -ligula. Integer scelerisque, risus a interdum vestibulum, felis ipsum -pharetra eros, nec nonummy libero justo tquis risus. Vestibulum -tincidunt, augue vitae suscipit congue, sem dui adipiscing nulla, ut -nonummy arcu quam ac sem. Nulla in metus. Phasellus neque. -""" - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Font Dialog'), self) - self.help = KTextEdit(helpText, '', self) - self.example = KTextEdit(fontText, '', self) - - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addWidget(self.example, 10) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showFontDialog) - - - def showFontDialog(self): - font = TQFont(self.example.font()) - string = TQString() - accepted, other = KFontDialog.getFontAndText(font, string, False, self) - if accepted: - self.example.setFont(font) - self.example.setText(string) diff --git a/examples/pykde-sampler/dialogs/input.py b/examples/pykde-sampler/dialogs/input.py deleted file mode 100644 index 8d9312f..0000000 --- a/examples/pykde-sampler/dialogs/input.py +++ /dev/null @@ -1,87 +0,0 @@ -iconName = 'editclear' -labelText = 'KInputDialog' - -from qt import TQFrame, TQGridLayout, TQLabel, TQStringList, SIGNAL -from tdecore import i18n -from tdeui import KPushButton, KInputDialog, KTextEdit - - -helpText = ("KInputDialog allows the programmer to display a simple dialog to " - "request a bit of text, an integer value, a double value, or a " - "list item from the user.") - - -class MainFrame(TQFrame): - items = ['Apples', 'Bananas', 'Mangos', 'Oranges', 'Pears', ] - - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.help = KTextEdit(helpText, '', self) - - layout = TQGridLayout(self, 5, 2, 4) # five rows, two cols, four px spacing - layout.setRowStretch(0, 10) - layout.setColStretch(1, 10) - layout.addMultiCellWidget(self.help, 0, 1, 0, 1) - - button = KPushButton(i18n('Get Text'), self) - self.connect(button, SIGNAL('clicked()'), self.getText) - self.getTextLabel = TQLabel('text value', self) - layout.addWidget(button, 2, 0) - layout.addWidget(self.getTextLabel, 2, 1) - layout.setRowStretch(2, 0) - - button = KPushButton(i18n('Get Integer'), self) - self.connect(button, SIGNAL('clicked()'), self.getInt) - self.getIntLabel = TQLabel('0', self) - layout.addWidget(self.getIntLabel, 3, 1) - layout.addWidget(button, 3, 0) - layout.setRowStretch(3, 0) - - button = KPushButton(i18n('Get Double'), self) - self.connect(button, SIGNAL('clicked()'), self.getDouble) - self.getDoubleLabel = TQLabel('0.0', self) - layout.addWidget(self.getDoubleLabel, 4, 1) - layout.addWidget(button, 4, 0) - layout.setRowStretch(4, 0) - - button = KPushButton(i18n('Get Item'), self) - self.connect(button, SIGNAL('clicked()'), self.getItem) - self.getItemLabel = TQLabel(self.items[0], self) - layout.addWidget(button, 5, 0) - layout.addWidget(self.getItemLabel, 5, 1) - layout.setRowStretch(5, 0) - - def getText(self): - title = 'KInputDialog.getText Dialog' - label = 'Enter some text:' - default = self.getTextLabel.text() - value, accepted = KInputDialog.getText(title, label, default) - if accepted: - self.getTextLabel.setText(value) - - def getInt(self): - title = 'KInputDialog.getInteger Dialog' - label = 'Enter an integer:' - default = int('%s' % self.getIntLabel.text()) - value, accepted = KInputDialog.getInteger(title, label, default) - if accepted: - self.getIntLabel.setText('%s' % value) - - def getDouble(self): - title = 'KInputDialog.getDouble Dialog' - label = 'Enter a double:' - default = float('%s' % self.getDoubleLabel.text()) - value, accepted = KInputDialog.getDouble(title, label, default, -10.0, 10.0) - if accepted: - self.getDoubleLabel.setText('%s' % value) - - def getItem(self): - title = 'KInputDialog.getItem Dialog' - label = 'Select an item:' - current = self.items.index('%s' % self.getItemLabel.text()) - selections = TQStringList() - for item in self.items: - selections.append(item) - value, accepted = KInputDialog.getItem(title, label, selections, current) - if accepted: - self.getItemLabel.setText('%s' % value) diff --git a/examples/pykde-sampler/dialogs/key.py b/examples/pykde-sampler/dialogs/key.py deleted file mode 100644 index 8c88537..0000000 --- a/examples/pykde-sampler/dialogs/key.py +++ /dev/null @@ -1,29 +0,0 @@ -iconName = 'configure_shortcuts' -labelText = 'KKeyDialog' - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdecore import i18n -from tdeui import KPushButton, KKeyDialog, KTextEdit - - -helpText = ("Configuring keystroke shortcuts is simple with KActions and the " - "KKeyDialog type. This sample starts the KKeyDialog for the " - "sampler application.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Key Configuration Dialog'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showKeysDialog) - - def showKeysDialog(self): - top = self.topLevelWidget() - KKeyDialog.configure(top.actionCollection(), self) diff --git a/examples/pykde-sampler/dialogs/msgbox.py b/examples/pykde-sampler/dialogs/msgbox.py deleted file mode 100644 index b22c03f..0000000 --- a/examples/pykde-sampler/dialogs/msgbox.py +++ /dev/null @@ -1,141 +0,0 @@ -iconName = 'stop' -labelText = 'KMessageBox' - -from random import random -from traceback import print_exc -from StringIO import StringIO - -from qt import TQFrame, TQGridLayout, TQLabel, TQStringList, SIGNAL -from tdecore import i18n -from tdeui import KGuiItem, KPushButton, KMessageBox, KTextEdit - - -helpText = ("The KMessageBox Python class wraps the static methods of its C++ " - "counterpart. Some of these methods are used below. Refer to the " - "docs for KMessageBox for a full list.") - - -class MainFrame(TQFrame): - msg = 'Do you like food?' - caption = 'Simple Question' - err = 'Some kind of error happened, but it could be worse!' - info = 'Always wash your hands after eating.' - items = ['Apples', 'Bananas', 'Cantaloupe', 'Mangos', 'Oranges', 'Pears', ] - - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - items = TQStringList() - for item in self.items: - items.append(item) - self.items = items - - responses = 'Ok Cancel Yes No Continue'.split() - responses = [(getattr(KMessageBox, res), res) for res in responses] - self.responses = dict(responses) - - self.help = KTextEdit(helpText, '', self) - - layout = TQGridLayout(self, 5, 2, 4) - layout.setRowStretch(0, 10) - layout.setColStretch(1, 10) - layout.addMultiCellWidget(self.help, 0, 1, 0, 1) - - button = KPushButton(i18n('Question Yes-No'), self) - self.connect(button, SIGNAL('clicked()'), self.questionYesNo) - layout.addWidget(button, 2, 0) - layout.setRowStretch(2, 0) - - button = KPushButton(i18n('Warning Yes-No-Cancel'), self) - self.connect(button, SIGNAL('clicked()'), self.warningYesNoCancel) - layout.addWidget(button, 3, 0) - layout.setRowStretch(3, 0) - - button = KPushButton(i18n('Warning Continue-Cancel-List'), self) - self.connect(button, SIGNAL('clicked()'), self.warningContinueCancelList) - layout.addWidget(button, 4, 0) - layout.setRowStretch(4, 0) - - button = KPushButton(i18n('Error'), self) - self.connect(button, SIGNAL('clicked()'), self.error) - layout.addWidget(button, 5, 0) - layout.setRowStretch(5, 0) - - button = KPushButton(i18n('Detailed Error'), self) - self.connect(button, SIGNAL('clicked()'), self.detailedError) - layout.addWidget(button, 6, 0) - layout.setRowStretch(6, 0) - - button = KPushButton(i18n('Sorry'), self) - self.connect(button, SIGNAL('clicked()'), self.sorry) - layout.addWidget(button, 7, 0) - layout.setRowStretch(7, 0) - - button = KPushButton(i18n('Detailed Sorry'), self) - self.connect(button, SIGNAL('clicked()'), self.detailedSorry) - layout.addWidget(button, 8, 0) - layout.setRowStretch(8, 0) - - button = KPushButton(i18n('Information'), self) - self.connect(button, SIGNAL('clicked()'), self.information) - layout.addWidget(button, 9, 0) - layout.setRowStretch(9, 0) - - button = KPushButton(i18n('Information List'), self) - self.connect(button, SIGNAL('clicked()'), self.informationList) - layout.addWidget(button, 10, 0) - layout.setRowStretch(10, 0) - - def questionYesNo(self): - dlg = KMessageBox.questionYesNo(self, self.msg, self.caption) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) - - def warningYesNoCancel(self): - dlg = KMessageBox.warningYesNoCancel(self, self.msg, self.caption) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) - - def warningContinueCancelList(self): - uiitem = KGuiItem('Time to Eat', 'favorites') - ctor = KMessageBox.warningContinueCancelList - dlgid = '%s' % random() - args = self, self.msg, self.items, self.caption, uiitem, dlgid - dlg = ctor(*args) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) - - def error(self): - dlg = KMessageBox.error(self, self.err) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) - - def detailedError(self): - try: - x = self.thisAttributeDoesNotExist - except (AttributeError, ), ex: - handle = StringIO() - print_exc(0, handle) - details = handle.getvalue() - dlg = KMessageBox.detailedError(self, self.err, details) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) - - def sorry(self): - dlg = KMessageBox.sorry(self, self.err) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) - - def detailedSorry(self): - try: - x = self.thisAttributeDoesNotExist - except (AttributeError, ), ex: - handle = StringIO() - print_exc(0, handle) - details = handle.getvalue() - dlg = KMessageBox.detailedSorry(self, self.err, details) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) - - def information(self): - dlgid = '%s' % random() - dlg = KMessageBox.information(self, self.info, '', dlgid) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) - - def informationList(self): - dlgid = '%s' % random() - ctor = KMessageBox.informationList - dlg = ctor(self, self.info, self.items, '', dlgid) - print 'You pressed "%s"' % (self.responses.get(dlg, dlg), ) diff --git a/examples/pykde-sampler/dialogs/passwd.py b/examples/pykde-sampler/dialogs/passwd.py deleted file mode 100644 index 3081c3d..0000000 --- a/examples/pykde-sampler/dialogs/passwd.py +++ /dev/null @@ -1,34 +0,0 @@ -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdecore import i18n -from tdeui import KPushButton, KPasswordDialog, KTextEdit - -iconName = 'password' -labelText = 'KPasswordDialog' -docParts = ('tdeui', 'KPasswordDialog') -helpText = ("KDE provides two variations on the password dialog. The simple " - "one shown here prompts for a password. The other type allows the " - "user to enter a new password, and provides a second field to " - "confirm the first entry.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Password Dialog'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showPasswordDialog) - - - def showPasswordDialog(self): - old = 'foo bar baz' - prompt = "Enter your super-secret password (enter anything, it's just an example):" - result = KPasswordDialog.getPassword(old, prompt) - if result == KPasswordDialog.Accepted: - pass - diff --git a/examples/pykde-sampler/dialogs/progress.py b/examples/pykde-sampler/dialogs/progress.py deleted file mode 100644 index 948ad78..0000000 --- a/examples/pykde-sampler/dialogs/progress.py +++ /dev/null @@ -1,39 +0,0 @@ -iconName = 'go' -labelText = 'KProgressDialog' - - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL -from tdecore import i18n -from tdeui import KPushButton, KProgressDialog, KTextEdit - - -helpText = """KDE provides a ready-built dialog to display a bit of text and a -progress bar.""" - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Progress Dialog'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showProgressDialog) - - def showProgressDialog(self): - self.dlg = dlg = KProgressDialog(self, None, 'Sample Progress Dialog', - helpText) - dlg.progressBar().setTotalSteps(20) - dlg.progressBar().setFormat('% complete: %p - value: %v - maximum: %m') - timer = TQTimer(self) - self.connect(timer, SIGNAL('timeout()'), self.updateProgress) - timer.start(250, False) - dlg.exec_loop() - timer.stop() - - def updateProgress(self): - self.dlg.progressBar().advance(1) diff --git a/examples/pykde-sampler/dialogs/tip.py b/examples/pykde-sampler/dialogs/tip.py deleted file mode 100644 index b86d3fd..0000000 --- a/examples/pykde-sampler/dialogs/tip.py +++ /dev/null @@ -1,31 +0,0 @@ -iconName = 'idea' -labelText = 'KTipDialog' - -import os - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdecore import i18n -from tdeui import KPushButton, KTipDatabase, KTipDialog, KTextEdit - - -helpText = ("The KDE standard Tip-of-the-Day dialog.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Tip-of-the-Day Dialog'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showTipDialog) - - def showTipDialog(self): - filename = os.path.abspath(os.path.join(os.path.dirname(__file__), 'tips')) - tips = KTipDatabase(filename) - dlg = KTipDialog(tips, self) - dlg.exec_loop() diff --git a/examples/pykde-sampler/dialogs/tips b/examples/pykde-sampler/dialogs/tips deleted file mode 100644 index 9f24457..0000000 --- a/examples/pykde-sampler/dialogs/tips +++ /dev/null @@ -1,24 +0,0 @@ - - - -

Don't tug on Superman's cape.

- -
- - - -

Don't spit into the wind.

- -
- - - -

Don't pull the mask off the Lone Ranger.

- -
- - - -

And don't mess around with Jim!

- -
diff --git a/examples/pykde-sampler/gen_todo.py b/examples/pykde-sampler/gen_todo.py deleted file mode 100644 index 6abd5be..0000000 --- a/examples/pykde-sampler/gen_todo.py +++ /dev/null @@ -1,19 +0,0 @@ -mods = ['dcop', 'tdecore', 'tdefx', 'tdeprint', 'tdesu', 'tdeui', 'kfile', 'khtml', 'kio', 'kmdi', 'kparts', 'kspell', ] -all = [] - - -print 'Module,Item,Path,Contributor' -for mod in mods: - module = __import__(mod) - items = dir(module) - items.sort() - items = [item for item in items if not item.startswith('_')] - items = [item for item in items if not item in all] - - for item in items: - all.append(item) - print '%s,%s,,,' % (mod, item, ) - - - - diff --git a/examples/pykde-sampler/icon_handling/__init__.py b/examples/pykde-sampler/icon_handling/__init__.py deleted file mode 100644 index 2a525ac..0000000 --- a/examples/pykde-sampler/icon_handling/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -labelText = 'Icons' -iconName = 'icons' - - -helpText = ("KDE icons are nice. " - "Select the children of this item to see for yourself.") - - -from qt import TQFrame, TQVBoxLayout -from tdeui import KTextEdit - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - layout = TQVBoxLayout(self) - self.text = KTextEdit(helpText, '', self) - layout.addWidget(self.text, 1) diff --git a/examples/pykde-sampler/icon_handling/misc.py b/examples/pykde-sampler/icon_handling/misc.py deleted file mode 100644 index cab3571..0000000 --- a/examples/pykde-sampler/icon_handling/misc.py +++ /dev/null @@ -1,31 +0,0 @@ - -iconName = 'icons' -labelText = 'Misc.' - - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL, TQPoint -from tdecore import i18n -from tdeui import KAboutDialog, KPushButton, KBugReport, KTextEdit -from tdeui import KRootPermsIcon, KWritePermsIcon - - -helpText = ("Samples for the KRootPermsIcon and KWritePermsIcon classes." - "These icons don't do anything.") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - - layout = TQVBoxLayout(self, 4) - layout.setAutoAdd(True) - - self.help = KTextEdit(helpText, '', self) - self.root = KRootPermsIcon(None) - self.root.reparent(self, 0, TQPoint(0,0), True) - - import os - fn = os.path.abspath('.') - print fn - self.write = KWritePermsIcon(fn) - self.write.reparent(self, 0, TQPoint(0,0), True) diff --git a/examples/pykde-sampler/icon_handling/sizes.py b/examples/pykde-sampler/icon_handling/sizes.py deleted file mode 100644 index af7226d..0000000 --- a/examples/pykde-sampler/icon_handling/sizes.py +++ /dev/null @@ -1,30 +0,0 @@ - -iconName = 'icons' -labelText = 'Icon Sizing' - - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdecore import i18n -from tdeui import KAboutDialog, KPushButton, KBugReport, KTextEdit - - -helpText = ("") - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Bug Report Dialog'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showBugDialog) - - - def showBugDialog(self): - dlg = KBugReport(self) - dlg.exec_loop() diff --git a/examples/pykde-sampler/lib.py b/examples/pykde-sampler/lib.py deleted file mode 100644 index 875ae1a..0000000 --- a/examples/pykde-sampler/lib.py +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -""" - -""" -import os -import sys - -from os import listdir, walk -from os.path import dirname, isdir, abspath, split, join, exists - - -samplerpath = dirname(abspath(__file__)) -packagepath, packagename = split(samplerpath) - -samplerpath += os.path.sep -packagepath += os.path.sep - - -def namedimport(name): - """ import a module given a dotted package name - - Taken directly from the Python library docs for __import __ - """ - mod = __import__(name) - components = name.split('.') - for comp in components[1:]: - mod = getattr(mod, comp) - return mod - - -def ispackage(path): - return isdir(path) and exists(join(path, '__init__.py')) - - -def ismodule(path): - head, tail = os.path.split(path) - if tail in ('__init__.py', '__init__.pyc', '__init__.pyo'): - return False - head, tail = os.path.splitext(path) - return tail in ('.py', ) # don't use these, which filters them out dupes ( '.pyc', '.pyo') - - -def listimports(top): - top = abspath(top) - yield top - for path in listdir(top): - path = join(top, path) - if ispackage(path): - yield path - for subpath in listimports(path): - yield subpath - elif ismodule(path): - yield path - - -def listmodules(): - if samplerpath not in sys.path: - sys.path.append(samplerpath) - - dirs = [join(samplerpath, d) for d in listdir(samplerpath)] - dirs = [d for d in dirs if exists(join(d, '__init__.py'))] - - modules = [] - for dirname in dirs: - dirpath = join(samplerpath, dirname) - for path in listimports(dirpath): - path = path.replace('.py', '') - path = path.replace(samplerpath, '').replace(os.path.sep, '.') - try: - module = namedimport(path) - except (ValueError, ImportError, ), exc: - print 'Exception %s importing %s' % (exc, path, ) - else: - modules.append((path, module)) - modules.sort() - return [(path, SamplerModule(module)) for path, module in modules] - - -class SamplerModule(object): - defaultIcon = 'filenew' - - - def __init__(self, module): - self.module = module - - - def name(self): - return self.module.__name__.split('.')[-1] - - - def labelText(self): - return getattr(self.module, 'labelText', self.name()) - - - def icon(self): - return getattr(self.module, 'iconName', self.defaultIcon) - - - def builder(self): - for name in ('buildWidget', 'buildDialog', 'buildApp', 'MainFrame'): - try: - return getattr(self.module, name) - except (AttributeError, ): - pass - raise AttributeError('No builder found') diff --git a/examples/pykde-sampler/misc/__init__.py b/examples/pykde-sampler/misc/__init__.py deleted file mode 100644 index f9b66ae..0000000 --- a/examples/pykde-sampler/misc/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -labelText = 'Misc' -iconName = 'misc' - - -helpText = ("") - -from qt import TQFrame, TQVBoxLayout -from tdeui import KTextEdit - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - layout = TQVBoxLayout(self) - self.text = KTextEdit(helpText, '', self) - layout.addWidget(self.text, 1) diff --git a/examples/pykde-sampler/misc/gradientselect.py b/examples/pykde-sampler/misc/gradientselect.py deleted file mode 100644 index 0adb2ea..0000000 --- a/examples/pykde-sampler/misc/gradientselect.py +++ /dev/null @@ -1,51 +0,0 @@ -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL, TQColor, TQSizePolicy, TQLabel -from tdecore import i18n -from tdeui import KPushButton, KGradientSelector, KTextEdit, KDualColorButton, KColorPatch - -iconName = 'colors' -labelText = 'KGradientSelector' -docParts = ('tdeui', 'KGradientSelector') -helpText = ("An example of the KGradientSelector widget." - "\n" - "Change the start and finish colors with the dual color button." - ) - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.help = KTextEdit(helpText, '', self) - self.selector = KGradientSelector(self) - self.dualLabel = TQLabel('Select Colors:', self) - - self.startColor = TQColor('red') - self.finishColor = TQColor('blue') - - self.selector.setColors(self.startColor, self.finishColor) - self.selector.setText('Start', 'Finish') - - self.dualButton = KDualColorButton(self.startColor, self.finishColor, self) - self.dualButton.setSizePolicy(TQSizePolicy(TQSizePolicy.Maximum, - TQSizePolicy.Maximum)) - - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help, 20) - - buttonLayout = TQHBoxLayout(layout, 4) - buttonLayout.addWidget(self.dualLabel, 0) - buttonLayout.addWidget(self.dualButton, 1) - - layout.addWidget(self.selector, 10) - - - self.connect(self.dualButton, SIGNAL('fgChanged(const TQColor &)'), - self.selector.setFirstColor) - self.connect(self.dualButton, SIGNAL('bgChanged(const TQColor &)'), - self.selector.setSecondColor) - self.connect(self.selector, SIGNAL('valueChanged(int)'), - self.updateValue) - - - def updateValue(self, value): - ## this should be extended to update a color swatch - pass diff --git a/examples/pykde-sampler/misc/passivepop.py b/examples/pykde-sampler/misc/passivepop.py deleted file mode 100644 index 8a2b2e8..0000000 --- a/examples/pykde-sampler/misc/passivepop.py +++ /dev/null @@ -1,43 +0,0 @@ -from qt import TQt, TQFrame, TQHBoxLayout, TQVBoxLayout, TQLabel, SIGNAL -from tdeui import KPassivePopup, KTextEdit, KPushButton -from tdecore import KGlobal, KIcon - -iconName = 'popup' -labelText = 'KPassivePopup' -docParts = ('tdeui', 'KPassivePopup') -helpText = ('Examples of the KPassivePopup widget.') - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.help = KTextEdit(helpText, '', self) - self.button = KPushButton('Show Passive Popups', self) - - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help, 10) - buttonLayout = TQHBoxLayout(layout, 4) - buttonLayout.addWidget(self.button, 1) - buttonLayout.addStretch(10) - layout.addStretch(10) - - - self.connect(self.button, SIGNAL('clicked()'), self.showPopups) - - - def showPopups(self): - ## no support for all of the 3.5 calls - pop = KPassivePopup.message('Hello, KPassivePopup', self) - pop.setTimeout(3000) - pop.show() - - - pos = pop.pos() - pos.setY(pos.y() + pop.height() + 10) - - ico = KGlobal.instance().iconLoader().loadIcon('help', KIcon.NoGroup, - KIcon.SizeSmall) - pop = KPassivePopup.message('Hello', 'With Icons', ico, self) - pop.setTimeout(3000) - pop.show() - pop.move(pos) diff --git a/examples/pykde-sampler/misc/window_info.py b/examples/pykde-sampler/misc/window_info.py deleted file mode 100644 index daef2e0..0000000 --- a/examples/pykde-sampler/misc/window_info.py +++ /dev/null @@ -1,35 +0,0 @@ - - - -from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL -from tdeui import KWindowInfo, KPushButton, KTextEdit -from tdecore import i18n, KApplication - -iconName = 'misc' -labelText = 'KWindowInfo' -helpText = '' - - -class MainFrame(TQFrame): - def __init__(self, parent): - TQFrame.__init__(self, parent) - self.button = KPushButton(i18n('Show Message'), self) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - buttonlayout = TQHBoxLayout(layout, 4) - buttonlayout.addWidget(self.button) - buttonlayout.addStretch(1) - layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showWindowInfo) - - - def showWindowInfo(self): - main = KApplication.kApplication() - print main - print main.mainWidget() - - info = KWindowInfo(main) - info.message('Updated Window Info', 3) - - diff --git a/examples/pykde-sampler/qt_widgets/CONTRIB b/examples/pykde-sampler/qt_widgets/CONTRIB deleted file mode 100644 index 3def876..0000000 --- a/examples/pykde-sampler/qt_widgets/CONTRIB +++ /dev/null @@ -1,537 +0,0 @@ -Module,Item,Path,Contributor -dcop,DCOPClient,,, -dcop,DCOPClientTransaction,,, -dcop,DCOPObject,,, -dcop,DCOPObjectProxy,,, -dcop,DCOPRef,,, -dcop,DCOPReply,,, -dcop,DCOPStub,,, -tdecore,BarIcon,,, -tdecore,BarIconSet,,, -tdecore,DesktopIcon,,, -tdecore,DesktopIconSet,,, -tdecore,IconSize,,, -tdecore,KAboutData,,, -tdecore,KAboutPerson,,, -tdecore,KAboutTranslator,,, -tdecore,KAccel,,, -tdecore,KAccelAction,,, -tdecore,KAccelActions,,, -tdecore,KAccelBase,,, -tdecore,KAccelShortcutList,,, -tdecore,KApplication,,, -tdecore,KAsyncIO,,, -tdecore,KAudioPlayer,,, -tdecore,KBufferedIO,,, -tdecore,KCalendarSystem,,, -tdecore,KCalendarSystemFactory,,, -tdecore,KCatalogue,,, -tdecore,KCharsets,,, -tdecore,KClipboardSynchronizer,,, -tdecore,KCmdLineArgs,,, -tdecore,KCmdLineOptions,,, -tdecore,KCodecs,,, -tdecore,KCompletion,,, -tdecore,KCompletionBase,,, -tdecore,KConfig,,, -tdecore,KConfigBackEnd,,, -tdecore,KConfigBase,,, -tdecore,KConfigDialogManager,,, -tdecore,KConfigGroup,,, -tdecore,KConfigGroupSaver,,, -tdecore,KConfigINIBackEnd,,, -tdecore,KConfigSkeleton,,, -tdecore,KConfigSkeletonItem,,, -tdecore,KCrash,,, -tdecore,KDCOPPropertyProxy,,, -tdecore,KDE,,, -tdecore,KDesktopFile,,, -tdecore,KEntry,,, -tdecore,KEntryKey,,, -tdecore,KGlobal,,, -tdecore,KGlobalAccel,,, -tdecore,KGlobalSettings,,, -tdecore,KIDNA,,, -tdecore,KIPC,,, -tdecore,KIcon,,, -tdecore,KIconEffect,,, -tdecore,KIconLoader,,, -tdecore,KIconTheme,,, -tdecore,KInstance,,, -tdecore,KKey,,, -tdecore,KKeyNative,,, -tdecore,KKeySequence,,, -tdecore,KKeyServer,,, -tdecore,KLibFactory,,, -tdecore,KLibLoader,,, -tdecore,KLibrary,,, -tdecore,KLocale,,, -tdecore,KMD5,,, -tdecore,KMacroExpander,,, -tdecore,KMacroExpanderBase,,, -tdecore,KMimeSourceFactory,,, -tdecore,KMountPoint,,, -tdecore,KMultipleDrag,,, -tdecore,KNotifyClient,,, -tdecore,KPalette,,, -tdecore,KPixmapProvider,,, -tdecore,KProcIO,,, -tdecore,KProcess,,, -tdecore,KProcessController,,, -tdecore,KPty,,, -tdecore,KRFCDate,,, -tdecore,KRandomSequence,,, -tdecore,KRegExp,,, -tdecore,KRootProp,,, -tdecore,KSaveFile,,, -tdecore,KSelectionOwner,,, -tdecore,KSelectionWatcher,,, -tdecore,KServerSocket,,, -tdecore,KSessionManaged,,, -tdecore,KShared,,, -tdecore,KSharedConfig,,, -tdecore,KShell,,, -tdecore,KShellProcess,,, -tdecore,KShortcut,,, -tdecore,KShortcutList,,, -tdecore,KSimpleConfig,,, -tdecore,KSocket,,, -tdecore,KStandardDirs,,, -tdecore,KStartupInfo,,, -tdecore,KStartupInfoData,,, -tdecore,KStartupInfoId,,, -tdecore,KStaticDeleterBase,,, -tdecore,KStdAccel,,, -tdecore,KStringHandler,,, -tdecore,KTempDir,,, -tdecore,KTempFile,,, -tdecore,KURL,,, -tdecore,KURLDrag,,, -tdecore,KUniqueApplication,,, -tdecore,KWin,,, -tdecore,KWinModule,,, -tdecore,KZoneAllocator,,, -tdecore,MainBarIcon,,, -tdecore,MainBarIconSet,,, -tdecore,NET,,, -tdecore,NETIcon,,, -tdecore,NETPoint,,, -tdecore,NETRect,,, -tdecore,NETRootInfo,,, -tdecore,NETRootInfo2,,, -tdecore,NETSize,,, -tdecore,NETStrut,,, -tdecore,NETWinInfo,,, -tdecore,SmallIcon,,, -tdecore,SmallIconSet,,, -tdecore,UserIcon,,, -tdecore,UserIconSet,,, -tdecore,i18n,,, -tdecore,locate,,, -tdecore,locateLocal,,, -tdecore,testKEntryMap,,, -tdecore,urlcmp,,, -tdefx,KCPUInfo,,, -tdefx,KImageEffect,,, -tdefx,KPixmap,,, -tdefx,KPixmapEffect,,, -tdefx,KPixmapSplitter,,, -tdefx,KStyle,,, -tdefx,kColorBitmaps,,, -tdefx,kDrawBeButton,,, -tdefx,kDrawNextButton,,, -tdefx,kDrawRoundButton,,, -tdefx,kDrawRoundMask,,, -tdefx,kRoundMaskRegion,,, -tdeprint,DrBase,,, -tdeprint,DrBooleanOption,,, -tdeprint,DrChoiceGroup,,, -tdeprint,DrConstraint,,, -tdeprint,DrFloatOption,,, -tdeprint,DrGroup,,, -tdeprint,DrIntegerOption,,, -tdeprint,DrListOption,,, -tdeprint,DrMain,,, -tdeprint,DrPageSize,,, -tdeprint,DrStringOption,,, -tdeprint,KMJob,,, -tdeprint,KMJobManager,,, -tdeprint,KMManager,,, -tdeprint,KMObject,,, -tdeprint,KMPrinter,,, -tdeprint,KPReloadObject,,, -tdeprint,KPrintAction,,, -tdeprint,KPrintDialog,,, -tdeprint,KPrintDialogPage,,, -tdeprint,KPrinter,,, -tdeprint,pageNameToPageSize,,, -tdeprint,pageSizeToPageName,,, -tdeprint,rangeToSize,,, -tdesu,KCookie,,, -tdesu,KDEsuClient,,, -tdesu,PTY,,, -tdesu,PtyProcess,,, -tdesu,SshProcess,,, -tdesu,StubProcess,,, -tdesu,SuProcess,,, -tdeui,KAboutApplication,,, -tdeui,KAboutContainer,,, -tdeui,KAboutContributor,,, -tdeui,KAboutDialog,,, -tdeui,KAboutKDE,,, -tdeui,KAboutWidget,,, -tdeui,KAction,,, -tdeui,KActionCollection,,, -tdeui,KActionMenu,,, -tdeui,KActionPtrShortcutList,,, -tdeui,KActionSeparator,,, -tdeui,KActionShortcutList,,, -tdeui,KActiveLabel,,, -tdeui,KAnimWidget,,, -tdeui,KArrowButton,,, -tdeui,KAuthIcon,,, -tdeui,KBugReport,,, -tdeui,KButtonBox,,, -tdeui,KCModule,,, -tdeui,KCharSelect,,, -tdeui,KCharSelectTable,,, -tdeui,KColor,,, -tdeui,KColorButton,,, -tdeui,KColorCells,,, -tdeui,KColorCombo,,, -tdeui,KColorDialog,,, -tdeui,KColorDrag,,, -tdeui,KColorPatch,,, -tdeui,KComboBox,,, -tdeui,KCommand,,, -tdeui,KCommandHistory,,, -tdeui,KCompletionBox,,, -tdeui,KConfigDialog,,, -tdeui,KContextMenuManager,,, -tdeui,KCursor,,, -tdeui,KDCOPActionProxy,,, -tdeui,KDateInternalMonthPicker,,, -tdeui,KDateInternalWeekSelector,,, -tdeui,KDateInternalYearSelector,,, -tdeui,KDatePicker,,, -tdeui,KDateTable,,, -tdeui,KDateTimeWidget,,, -tdeui,KDateValidator,,, -tdeui,KDateWidget,,, -tdeui,KDialog,,, -tdeui,KDialogBase,,, -tdeui,KDialogQueue,,, -tdeui,KDockArea,,, -tdeui,KDockMainWindow,,, -tdeui,KDockManager,,, -tdeui,KDockTabGroup,,, -tdeui,KDockWidget,,, -tdeui,KDockWidgetAbstractHeader,,, -tdeui,KDockWidgetAbstractHeaderDrag,,, -tdeui,KDockWidgetHeader,,, -tdeui,KDockWidgetHeaderDrag,,, -tdeui,KDockWindow,,, -tdeui,KDoubleNumInput,,, -tdeui,KDoubleSpinBox,,, -tdeui,KDoubleValidator,,, -tdeui,KDualColorButton,,, -tdeui,KEdFind,,, -tdeui,KEdGotoLine,,, -tdeui,KEdReplace,,, -tdeui,KEdit,,, -tdeui,KEditListBox,,, -tdeui,KEditToolbar,,, -tdeui,KEditToolbarWidget,,, -tdeui,KFloatValidator,,, -tdeui,KFontAction,,, -tdeui,KFontChooser,,, -tdeui,KFontCombo,,, -tdeui,KFontDialog,,, -tdeui,KFontRequester,,, -tdeui,KFontSizeAction,,, -tdeui,KGradientSelector,,, -tdeui,KGuiItem,,, -tdeui,KHSSelector,,, -tdeui,KHelpMenu,,, -tdeui,KHistoryCombo,,, -tdeui,KIconView,,, -tdeui,KIconViewItem,,, -tdeui,KInputDialog,,, -tdeui,KIntNumInput,,, -tdeui,KIntSpinBox,,, -tdeui,KIntValidator,,, -tdeui,KJanusWidget,,, -tdeui,KKeyButton,,, -tdeui,KKeyChooser,,, -tdeui,KKeyDialog,,, -tdeui,KLed,,, -tdeui,KLineEdit,,, -tdeui,KLineEditDlg,,, -tdeui,KListAction,,, -tdeui,KListBox,,, -tdeui,KListView,,, -tdeui,KListViewItem,,, -tdeui,KMacroCommand,,, -tdeui,KMainWindow,,, -tdeui,KMainWindowInterface,,, -tdeui,KMenuBar,,, -tdeui,KMessageBox,,, -tdeui,KMimeTypeValidator,,, -tdeui,KNamedCommand,,, -tdeui,KNumInput,,, -tdeui,KPaletteTable,,, -tdeui,KPanelAppMenu,,, -tdeui,KPanelApplet,,, -tdeui,KPanelExtension,,, -tdeui,KPanelMenu,,, -tdeui,KPassivePopup,,, -tdeui,KPasswordDialog,,, -tdeui,KPasswordEdit,,, -tdeui,KPasteTextAction,,, -tdeui,KPixmapIO,,, -tdeui,KPopupFrame,,, -tdeui,KPopupMenu,,, -tdeui,KPopupTitle,,, -tdeui,KProgress,,, -tdeui,KProgressDialog,,, -tdeui,KPushButton,,, -tdeui,KRadioAction,,, -tdeui,KRecentFilesAction,,, -tdeui,KRestrictedLine,,, -tdeui,KRootPermsIcon,,, -tdeui,KRootPixmap,,, -tdeui,KRuler,,, -tdeui,KSelectAction,,, -tdeui,KSelector,,, -tdeui,KSeparator,,, -tdeui,KSplashScreen,,, -tdeui,KSqueezedTextLabel,,, -tdeui,KStatusBar,,, -tdeui,KStatusBarLabel,,, -tdeui,KStdAction,,, -tdeui,KStdGuiItem,,, -tdeui,KStringListValidator,,, -tdeui,KSystemTray,,, -tdeui,KTabBar,,, -tdeui,KTabCtl,,, -tdeui,KTabWidget,,, -tdeui,KTextBrowser,,, -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,KURLLabel,,, -tdeui,KValueSelector,,, -tdeui,KWidgetAction,,, -tdeui,KWindowInfo,,, -tdeui,KWindowListMenu,,, -tdeui,KWizard,,, -tdeui,KWordWrap,,, -tdeui,KWritePermsIcon,,, -tdeui,KXMLGUIBuilder,,, -tdeui,KXMLGUIClient,,, -tdeui,KXMLGUIFactory,,, -tdeui,KXYSelector,,, -tdeui,QXEmbed,,, -tdeui,testKActionList,,, -kfile,KApplicationPropsPlugin,,, -kfile,KBindingPropsPlugin,,, -kfile,KCombiView,,, -kfile,KCustomMenuEditor,,, -kfile,KDesktopPropsPlugin,,, -kfile,KDevicePropsPlugin,,, -kfile,KDirOperator,,, -kfile,KDirSelectDialog,,, -kfile,KDirSize,,, -kfile,KDiskFreeSp,,, -kfile,KEncodingFileDialog,,, -kfile,KExecPropsPlugin,,, -kfile,KFile,,, -kfile,KFileDetailView,,, -kfile,KFileDialog,,, -kfile,KFileFilterCombo,,, -kfile,KFileIconView,,, -kfile,KFileIconViewItem,,, -kfile,KFileListViewItem,,, -kfile,KFileOpenWithHandler,,, -kfile,KFilePermissionsPropsPlugin,,, -kfile,KFilePreview,,, -kfile,KFilePropsPlugin,,, -kfile,KFileSharePropsPlugin,,, -kfile,KFileTreeBranch,,, -kfile,KFileTreeView,,, -kfile,KFileTreeViewItem,,, -kfile,KFileTreeViewToolTip,,, -kfile,KFileView,,, -kfile,KFileViewSignaler,,, -kfile,KIconButton,,, -kfile,KIconCanvas,,, -kfile,KIconDialog,,, -kfile,KImageFilePreview,,, -kfile,KNotify,,, -kfile,KNotifyDialog,,, -kfile,KOpenWithDlg,,, -kfile,KPreviewWidgetBase,,, -kfile,KPropertiesDialog,,, -kfile,KPropsDlgPlugin,,, -kfile,KRecentDocument,,, -kfile,KURLBar,,, -kfile,KURLBarItem,,, -kfile,KURLBarItemDialog,,, -kfile,KURLBarListBox,,, -kfile,KURLComboBox,,, -kfile,KURLComboRequester,,, -kfile,KURLPropsPlugin,,, -kfile,KURLRequester,,, -kfile,KURLRequesterDlg,,, -khtml,DOM,,, -khtml,KHTMLPart,,, -khtml,KHTMLSettings,,, -khtml,KHTMLView,,, -kio,KAr,,, -kio,KArchive,,, -kio,KArchiveDirectory,,, -kio,KArchiveEntry,,, -kio,KArchiveFile,,, -kio,KAutoMount,,, -kio,KAutoUnmount,,, -kio,KDCOPServiceStarter,,, -kio,KDEDesktopMimeType,,, -kio,KDataTool,,, -kio,KDataToolAction,,, -kio,KDataToolInfo,,, -kio,KDirLister,,, -kio,KDirNotify,,, -kio,KDirWatch,,, -kio,KEMailSettings,,, -kio,KExecMimeType,,, -kio,KFileFilter,,, -kio,KFileItem,,, -kio,KFileMetaInfo,,, -kio,KFileMetaInfoGroup,,, -kio,KFileMetaInfoItem,,, -kio,KFileMetaInfoProvider,,, -kio,KFileMimeTypeInfo,,, -kio,KFilePlugin,,, -kio,KFileShare,,, -kio,KFileSharePrivate,,, -kio,KFilterBase,,, -kio,KFilterDev,,, -kio,KFolderType,,, -kio,KIO,,, -kio,KImageIO,,, -kio,KMimeMagic,,, -kio,KMimeMagicResult,,, -kio,KMimeType,,, -kio,KOCRDialog,,, -kio,KOCRDialogFactory,,, -kio,KOpenWithHandler,,, -kio,KProcessRunner,,, -kio,KProtocolInfo,,, -kio,KProtocolManager,,, -kio,KRun,,, -kio,KST_CTimeInfo,,, -kio,KST_KCustom,,, -kio,KST_KDEDesktopMimeType,,, -kio,KST_KExecMimeType,,, -kio,KST_KFolderType,,, -kio,KST_KImageIO,,, -kio,KST_KImageIOFormat,,, -kio,KST_KMimeType,,, -kio,KST_KProtocolInfo,,, -kio,KST_KProtocolInfoFactory,,, -kio,KST_KService,,, -kio,KST_KServiceFactory,,, -kio,KST_KServiceGroup,,, -kio,KST_KServiceGroupFactory,,, -kio,KST_KServiceType,,, -kio,KST_KServiceTypeFactory,,, -kio,KST_KSycocaEntry,,, -kio,KScanDialog,,, -kio,KScanDialogFactory,,, -kio,KService,,, -kio,KServiceGroup,,, -kio,KServiceOffer,,, -kio,KServiceSeparator,,, -kio,KServiceType,,, -kio,KServiceTypeProfile,,, -kio,KShellCompletion,,, -kio,KShred,,, -kio,KSimpleFileFilter,,, -kio,KSycoca,,, -kio,KSycocaEntry,,, -kio,KSycocaFactory,,, -kio,KTar,,, -kio,KTrader,,, -kio,KURIFilter,,, -kio,KURIFilterData,,, -kio,KURIFilterPlugin,,, -kio,KURLCompletion,,, -kio,KURLPixmapProvider,,, -kio,KZip,,, -kio,KZipFileEntry,,, -kio,Observer,,, -kio,RenameDlgPlugin,,, -kio,ThumbCreator,,, -kio,testKIOMetaData,,, -kio,testKIOUDSEntry,,, -kio,testKIOUDSEntryList,,, -kmdi,KMdi,,, -kmdi,KMdiChildArea,,, -kmdi,KMdiChildFrm,,, -kmdi,KMdiChildFrmCaption,,, -kmdi,KMdiChildFrmDragBeginEvent,,, -kmdi,KMdiChildFrmDragEndEvent,,, -kmdi,KMdiChildFrmMoveEvent,,, -kmdi,KMdiChildFrmResizeBeginEvent,,, -kmdi,KMdiChildFrmResizeEndEvent,,, -kmdi,KMdiChildView,,, -kmdi,KMdiMainFrm,,, -kmdi,KMdiTaskBar,,, -kmdi,KMdiTaskBarButton,,, -kmdi,KMdiToolViewAccessor,,, -kmdi,KMdiViewCloseEvent,,, -kmdi,KMdiWin32IconButton,,, -kparts,KParts,,, -kparts,createReadOnlyPart,,, -kparts,createReadWritePart,,, -kparts,testTQMapTQCStringInt,,, -kspell,KS_ADD,,, -kspell,KS_CANCEL,,, -kspell,KS_CLIENT_ASPELL,,, -kspell,KS_CLIENT_HSPELL,,, -kspell,KS_CLIENT_ISPELL,,, -kspell,KS_CONFIG,,, -kspell,KS_E_ASCII,,, -kspell,KS_E_CP1251,,, -kspell,KS_E_CP1255,,, -kspell,KS_E_KOI8R,,, -kspell,KS_E_KOI8U,,, -kspell,KS_E_LATIN1,,, -kspell,KS_E_LATIN13,,, -kspell,KS_E_LATIN15,,, -kspell,KS_E_LATIN2,,, -kspell,KS_E_LATIN3,,, -kspell,KS_E_LATIN4,,, -kspell,KS_E_LATIN5,,, -kspell,KS_E_LATIN7,,, -kspell,KS_E_LATIN8,,, -kspell,KS_E_LATIN9,,, -kspell,KS_E_UTF8,,, -kspell,KS_IGNORE,,, -kspell,KS_IGNOREALL,,, -kspell,KS_REPLACE,,, -kspell,KS_REPLACEALL,,, -kspell,KS_STOP,,, -kspell,KS_SUGGEST,,, -kspell,KSpell,,, -kspell,KSpellConfig,,, -kspell,KSpellDlg,,, diff --git a/examples/pykde-sampler/qt_widgets/__init__.py b/examples/pykde-sampler/qt_widgets/__init__.py deleted file mode 100644 index fdd6539..0000000 --- a/examples/pykde-sampler/qt_widgets/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -labelText = 'TQt Widgets' -iconName = 'designer' - -helpText = """TQt provides a rich set of widgets for application use. -Select the children of this item to see for yourself.""" - -from qt import TQFrame, TQVBoxLayout, SIGNAL -from tdeui import KTextEdit - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.help = KTextEdit(helpText, '', self) - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - layout.addStretch(1) diff --git a/examples/pykde-sampler/qt_widgets/table.py b/examples/pykde-sampler/qt_widgets/table.py deleted file mode 100644 index 4a689d2..0000000 --- a/examples/pykde-sampler/qt_widgets/table.py +++ /dev/null @@ -1,42 +0,0 @@ -labelText = 'TQTable' -iconName = 'inline_table' - -helpText = """From the docs: 'The TQTable class provides a flexible -editable table widget.' -""" - -import csv -import os - -from qt import TQFrame, TQStringList, TQVBoxLayout, SIGNAL -from qttable import TQTable - -from tdeui import KTextEdit - -contrib = os.path.join(os.path.split(__file__)[0], 'CONTRIB') - - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - self.help = KTextEdit(helpText, '', self) - - data = csv.reader(open(contrib)) - header = data.next() - items = [item for item in data] - - self.table = table = TQTable(len(items), len(header), self) - headers = TQStringList() - for headertext in header: - headers.append(headertext) - table.setColumnLabels(headers) - - cols = range(len(header)) - for row, record in enumerate(items): - for col in cols: - table.setText(row, col, record[col]) - - layout = TQVBoxLayout(self, 4) - layout.addWidget(self.help) - layout.addWidget(self.table) - layout.addStretch(1) diff --git a/examples/pykde-sampler/runner.py b/examples/pykde-sampler/runner.py deleted file mode 100755 index e153fae..0000000 --- a/examples/pykde-sampler/runner.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python -""" - -""" -import sys -from tdecore import KApplication, KCmdLineArgs -from tdeui import KMainWindow -from qt import TQVBoxLayout - -## relative import -- cry me a river! -import about - - -class SamplerRunnerWindow(KMainWindow): - def __init__(self, ctor): - KMainWindow.__init__(self) - layout = TQVBoxLayout(self) - layout.setAutoAdd(True) - self.widget = ctor(self) - - -def importItem(name): - """ importItem(name) -> import an item from a module by dotted name - - """ - def importName(name): - """ importName(name) -> import and return a module by name in dotted form - - Copied from the Python lib docs. - """ - mod = __import__(name) - for comp in name.split('.')[1:]: - mod = getattr(mod, comp) - return mod - - names = name.split('.') - modname, itemname = names[0:-1], names[-1] - mod = importName(str.join('.', modname)) - return getattr(mod, itemname) - - - -if __name__ == '__main__': - options = [('+item', 'An item in the sys.path')] - KCmdLineArgs.init(sys.argv, about.about) - KCmdLineArgs.addCmdLineOptions(options) - - args = KCmdLineArgs.parsedArgs() - if not args.count(): - args.usage() - else: - pathitem = args.arg(0) - widget = importItem(pathitem) - - app = KApplication() - mainWindow = SamplerRunnerWindow(widget) - mainWindow.show() - app.exec_loop() diff --git a/examples/pykde-sampler/sampler.py b/examples/pykde-sampler/sampler.py deleted file mode 100755 index 83a4979..0000000 --- a/examples/pykde-sampler/sampler.py +++ /dev/null @@ -1,423 +0,0 @@ -#!/usr/bin/env python -""" The PyKDE application sampler - -This module defines the top-level widgets for displaying the sampler -application. - - -""" -import inspect -import os -import sys - -from qt import SIGNAL, SLOT, PYSIGNAL, TQt -from qt import TQVBoxLayout, TQLabel, TQPixmap, TQSplitter, TQFrame, TQDialog -from qt import TQSizePolicy, TQHBoxLayout, TQSpacerItem, TQPushButton - -from tdecore import i18n, KAboutData, KApplication, KCmdLineArgs, KGlobal -from tdecore import KGlobalSettings, KWin, KWinModule, KURL, KIcon - -from tdeui import KComboBox, KListView, KListViewItem, KTabWidget, KTextEdit -from tdeui import KMainWindow, KPushButton, KSplashScreen, KStdAction -from tdeui import KKeyDialog, KEditToolbar - -from kio import KTrader -from kparts import createReadOnlyPart, createReadWritePart -from khtml import KHTMLPart - -import about -import lib - - -try: - __file__ -except (NameError, ): - __file__ = sys.argv[0] - - -sigDoubleClicked = SIGNAL('doubleClicked(TQListViewItem *)') -sigViewItemSelected = SIGNAL('selectionChanged(TQListViewItem *)') -sigSampleSelected = PYSIGNAL('sample selected') - -blank = KURL('about:blank') - - -def appConfig(group=None): - """ appConfig(group=None) -> returns the application KConfig - - """ - config = KGlobal.instance().config() - if group is not None: - config.setGroup(group) - return config - - -def getIcon(name, group=KIcon.NoGroup, size=KIcon.SizeSmall): - """ returns a kde icon by name - - """ - return KGlobal.instance().iconLoader().loadIcon(name, group, size) - - -def getIconSet(name, group=KIcon.NoGroup, size=KIcon.SizeSmall): - """ returns a kde icon set by name - - """ - return KGlobal.instance().iconLoader().loadIconSet(name, group, size) - - -def buildPart(parent, query, constraint, writable=False): - """ builds the first available offered part on the parent - - """ - offers = KTrader.self().query(query, constraint) - for ptr in offers: - if writable: - builder = createReadWritePart - else: - builder = createReadOnlyPart - part = builder(ptr.library(), parent, ptr.name()) - if part: - break - return part - - - -class CommonFrame(TQFrame): - """ provides a modicum of reuse - - """ - def __init__(self, parent): - TQFrame.__init__(self, parent) - layout = TQVBoxLayout(self) - layout.setAutoAdd(True) - layout.setAlignment(TQt.AlignCenter | TQt.AlignVCenter) - - -class SamplerFrame(CommonFrame): - """ frame type that swaps out old widgets for new when told to do so - - """ - def __init__(self, parent): - CommonFrame.__init__(self, parent) - self.widget = None - - def setWidget(self, widget): - self.layout().deleteAllItems() - previous = self.widget - if previous: - previous.close() - delattr(self, 'widget') - self.widget = widget - - def showSample(self, item, module): - try: - frameType = module.builder() - except (AttributeError, ): - print 'No sample callable defined in %s' % (module.name(), ) - else: - frame = frameType(self) - self.setWidget(frame) - frame.show() - - -class SourceFrame(CommonFrame): - """ frame with part for displaying python source - - """ - def __init__(self, parent): - CommonFrame.__init__(self, parent) - query = '' - self.part = buildPart(self, 'application/x-python', query, False) - - def showModuleSource(self, item, module): - if not self.part: - print 'No part available for displaying python source.' - return - try: - modulefile = inspect.getabsfile(module.module) - except: - return - self.part.openURL(blank) - if os.path.splitext(modulefile)[-1] == '.py': - self.part.openURL(KURL('file://%s' % modulefile)) - - -class WebFrame(CommonFrame): - """ frame with part for viewing web pages - - """ - docBase = 'http://www.riverbankcomputing.com/Docs/PyKDE3/classref/' - - def __init__(self, parent): - CommonFrame.__init__(self, parent) - self.part = part = buildPart(self, 'text/html', "Type == 'Service'") - #part.connect(part, SIGNAL('khtmlMousePressEvent(a)'), self.onURL) - - def onURL(self, a): - print '****', a - - def showDocs(self, item, module): - try: - mod, cls = module.module.docParts - except (AttributeError, ): - url = blank - else: - url = KURL(self.docUrl(mod, cls)) - self.part.openURL(url) - - - def docUrl(self, module, klass): - """ docUrl(name) -> return a doc url given a name from the kde libs - - """ - return '%s/%s/%s.html' % (self.docBase, module, klass, ) - - -class OutputFrame(KTextEdit): - """ text widget that acts (just enough) like a file - - """ - def __init__(self, parent, filehandle): - KTextEdit.__init__(self, parent) - self.filehandle = filehandle - self.setReadOnly(True) - self.setFont(KGlobalSettings.fixedFont()) - - - def write(self, text): - self.insert(text) - - - def clear(self): - self.setText('') - - - def __getattr__(self, name): - return getattr(self.filehandle, name) - - -class SamplerListView(KListView): - """ the main list view of samples - - """ - def __init__(self, parent): - KListView.__init__(self, parent) - self.addColumn(i18n('Sample')) - self.setRootIsDecorated(True) - - modules = lib.listmodules() - modules.sort(lambda a, b: cmp(a[0], b[0])) - - modmap = dict(modules) - modules = [(name.split('.'), name, mod) for name, mod in modules] - roots, cache = {}, {} - - for names, modname, module in modules: - topname, subnames = names[0], names[1:] - item = roots.get(topname, None) - if item is None: - roots[topname] = item = KListViewItem(self, module.labelText()) - item.module = module - item.setPixmap(0, getIcon(module.icon())) - - bname = '' - subitem = item - for subname in subnames: - bname = '%s.%s' % (bname, subname, ) - item = cache.get(bname, None) - if item is None: - subitem = cache[bname] = \ - KListViewItem(subitem, module.labelText()) - subitem.module = module - subitem.setPixmap(0, getIcon(module.icon())) - subitem = item - - for root in roots.values(): - self.setOpen(root, True) - - -class SamplerMainWindow(KMainWindow): - """ the main window - - """ - def __init__(self, *args): - KMainWindow.__init__(self, *args) - self.hSplitter = hSplit = TQSplitter(TQt.Horizontal, self) - self.samplesList = samplesList = SamplerListView(hSplit) - self.vSplitter = vSplit = TQSplitter(TQt.Vertical, hSplit) - self.setCentralWidget(hSplit) - self.setIcon(getIcon('kmail')) - - hSplit.setOpaqueResize(True) - vSplit.setOpaqueResize(True) - - self.contentTabs = cTabs = KTabWidget(vSplit) - self.outputTabs = oTabs = KTabWidget(vSplit) - - self.sampleFrame = SamplerFrame(cTabs) - self.sourceFrame = SourceFrame(cTabs) - self.webFrame = WebFrame(cTabs) - - cTabs.insertTab(self.sampleFrame, getIconSet('exec'), i18n('Sample')) - cTabs.insertTab(self.sourceFrame, getIconSet('source'), i18n('Source')) - cTabs.insertTab(self.webFrame, getIconSet('help'), i18n('Docs')) - - sys.stdout = self.stdoutFrame = OutputFrame(oTabs, sys.stdout) - sys.stderr = self.stderrFrame = OutputFrame(oTabs, sys.stderr) - - termIcons = getIconSet('terminal') - oTabs.insertTab(self.stdoutFrame, termIcons, i18n('stdout')) - oTabs.insertTab(self.stderrFrame, termIcons, i18n('stderr')) - - self.resize(640, 480) - height, width = self.height(), self.width() - hSplit.setSizes([width * 0.35, width * 0.65]) - vSplit.setSizes([height * 0.80, height * 0.20]) - - self.xmlRcFileName = os.path.abspath(os.path.join(os.path.dirname(__file__), 'sampler.rc')) - self.setXMLFile(self.xmlRcFileName) - config = appConfig() - actions = self.actionCollection() - actions.readShortcutSettings("", config) - self.quitAction = KStdAction.quit(self.close, actions) - - self.toggleMenubarAction = \ - KStdAction.showMenubar(self.showMenubar, actions) - self.toggleToolbarAction = \ - KStdAction.showToolbar(self.showToolbar, actions) - self.toggleStatusbarAction = \ - KStdAction.showStatusbar(self.showStatusbar, actions) - self.configureKeysAction = \ - KStdAction.keyBindings(self.showConfigureKeys, actions) - self.configureToolbarAction = \ - KStdAction.configureToolbars(self.showConfigureToolbars, actions) - self.configureAppAction = \ - KStdAction.preferences(self.showConfiguration, actions) - - connect = self.connect - connect(samplesList, sigViewItemSelected, self.sampleSelected) - connect(self, sigSampleSelected, self.reloadModule) - connect(self, sigSampleSelected, self.sourceFrame.showModuleSource) - connect(self, sigSampleSelected, self.sampleFrame.showSample) - connect(self, sigSampleSelected, self.webFrame.showDocs) - - self.restoreWindowSize(config) - self.createGUI(self.xmlRcFileName, 0) - self.sourceFrame.part.openURL(KURL('file://%s' % os.path.abspath(__file__))) - - - def showConfiguration(self): - """ showConfiguration() -> display the config dialog - - """ - return - ## not yet implemented - dlg = configdialog.ConfigurationDialog(self) - for obj in (self.stderrFrame, self.stdoutFrame, self.pythonShell): - call = getattr(obj, 'configChanged', None) - if call: - self.connect(dlg, util.sigConfigChanged, call) - dlg.show() - - - def senderCheckShow(self, widget): - """ senderCheckShow(widget) -> show or hide widget if sender is checked - - """ - if self.sender().isChecked(): - widget.show() - else: - widget.hide() - - - def showMenubar(self): - """ showMenuBar() -> toggle the menu bar - - """ - self.senderCheckShow(self.menuBar()) - - - def showToolbar(self): - """ showToolbar() -> toggle the tool bar - - """ - self.senderCheckShow(self.toolBar()) - - - def showStatusbar(self): - """ showStatusbar() -> toggle the status bar - - """ - self.senderCheckShow(self.statusBar()) - - - def showConfigureKeys(self): - """ showConfigureKeys() -> show the shortcut keys dialog - - """ - ret = KKeyDialog.configure(self.actionCollection(), self) - print ret - if ret == TQDialog.Accepted: - actions = self.actionCollection() - actions.writeShortcutSettings(None, appConfig()) - - - def showConfigureToolbars(self): - """ showConfigureToolbars() -> broken - - """ - dlg = KEditToolbar(self.actionCollection(), self.xmlRcFileName) - self.connect(dlg, SIGNAL('newToolbarConfig()'), self.rebuildGui) - #connect(self, sigSampleSelected, self.sourceFrame.showModuleSource) - - dlg.exec_loop() - - - def rebuildGui(self): - """ rebuildGui() -> recreate the gui and refresh the palette - - """ - self.createGUI(self.xmlRcFileName, 0) - for widget in (self.toolBar(), self.menuBar(), ): - widget.setPalette(self.palette()) - - - def sampleSelected(self): - """ sampleSelected() -> emit the current item and its module - - """ - self.stdoutFrame.clear() - self.stderrFrame.clear() - item = self.sender().currentItem() - self.emit(sigSampleSelected, (item, item.module)) - - - def setSplashPixmap(self, pixmap): - """ setSplashPixmap(pixmap) -> assimilate the splash screen pixmap - - """ - target = self.sampleFrame - label = TQLabel(target) - label.setPixmap(pixmap) - target.setWidget(label) - - - def reloadModule(self, item, module): - print >> sys.__stdout__, 'reload: ', reload(module.module) - - -if __name__ == '__main__': - aboutdata = about.about() - KCmdLineArgs.init(sys.argv, aboutdata) - app = KApplication() - - splashpix = TQPixmap(os.path.join(lib.samplerpath, 'aboutkde.png')) - splash = KSplashScreen(splashpix) - splash.resize(splashpix.size()) - splash.show() - mainWindow = SamplerMainWindow() - mainWindow.setSplashPixmap(splashpix) - mainWindow.show() - splash.finish(mainWindow) - app.exec_loop() diff --git a/examples/pykde-sampler/sampler.rc b/examples/pykde-sampler/sampler.rc deleted file mode 100644 index fc068ca..0000000 --- a/examples/pykde-sampler/sampler.rc +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/pykde-sampler/wizards/__init__.py b/examples/pykde-sampler/wizards/__init__.py deleted file mode 100644 index 63472b4..0000000 --- a/examples/pykde-sampler/wizards/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -iconName = 'wizard' -labelText = 'Wizards' diff --git a/examples/pykde-sampler/wizards/wiz.py b/examples/pykde-sampler/wizards/wiz.py deleted file mode 100644 index 1cb5544..0000000 --- a/examples/pykde-sampler/wizards/wiz.py +++ /dev/null @@ -1,2 +0,0 @@ -iconName = 'wizard' -labelText = 'Wizard' diff --git a/examples/pykde-sampler/xwin/__init__.py b/examples/pykde-sampler/xwin/__init__.py deleted file mode 100644 index 34787fd..0000000 --- a/examples/pykde-sampler/xwin/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -labelText = 'X Windows Features' -iconName = 'kcmx' - -helpText = """KDE and PyKDE allow interaction with the X Window system. Check -out the nifty samples below.""" - -from qt import TQFrame, TQLabel, TQVBoxLayout - -class MainFrame(TQFrame): - def __init__(self, parent=None): - TQFrame.__init__(self, parent) - layout = TQVBoxLayout(self) - self.text = TQLabel(helpText, self) - layout.addWidget(self.text, 1) - - - - -- cgit v1.2.1