diff options
author | Michele Calgaro <[email protected]> | 2024-01-10 10:12:35 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-01-11 10:03:49 +0900 |
commit | db88dbbdb24193c81d3b4b893553b78cddf32eb3 (patch) | |
tree | 392ed8ab9606ee7a8a67b201e84a8b4a9e8ddb5a /examples | |
parent | bab19cc2a24fceccebe4477c4af99a6a162ef998 (diff) | |
download | pytde-db88dbbdb24193c81d3b4b893553b78cddf32eb3.tar.gz pytde-db88dbbdb24193c81d3b4b893553b78cddf32eb3.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit d94985267d6f224c5a9833736762f466d264374d)
Diffstat (limited to 'examples')
33 files changed, 100 insertions, 100 deletions
diff --git a/examples/menudemo.py b/examples/menudemo.py index 0e4ddf6..27673b0 100644 --- a/examples/menudemo.py +++ b/examples/menudemo.py @@ -37,7 +37,7 @@ copyright holder. import sys -from PyTQt.tqt import TQPopupMenu, SIGNAL, TQLabel, TQIconSet +from PyTQt.tqt import TQPopupMenu, TQ_SIGNAL, TQLabel, TQIconSet from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, TDEIcon, TDEIconLoader, TDEShortcut from tdeui import TDEMainWindow, KMessageBox, KStdAction, TDEAction, TDEToggleAction, TDEFontSizeAction, TDEFontAction, TDERadioAction,\ diff --git a/examples/pytde-sampler/basic_widgets/datepicker.py b/examples/pytde-sampler/basic_widgets/datepicker.py index 467a96a..51571cb 100644 --- a/examples/pytde-sampler/basic_widgets/datepicker.py +++ b/examples/pytde-sampler/basic_widgets/datepicker.py @@ -1,4 +1,4 @@ -from PyTQt.tqt import TQFrame, TQStringList, TQVBoxLayout, SIGNAL, TQLabel, TQSizePolicy, TQt +from PyTQt.tqt import TQFrame, TQStringList, TQVBoxLayout, TQ_SIGNAL, TQLabel, TQSizePolicy, TQt from PyTQt.tqttable import TQTable from tdeui import KTextEdit, KDatePicker, KDateWidget @@ -37,6 +37,6 @@ class MainFrame(TQFrame): layout.addWidget(self.other, 0) layout.addWidget(self.dateDisplay, 2) - self.connect(self.datePicker, SIGNAL('dateChanged(TQDate)'), + self.connect(self.datePicker, TQ_SIGNAL('dateChanged(TQDate)'), self.dateDisplay.setDate) diff --git a/examples/pytde-sampler/basic_widgets/historycombo.py b/examples/pytde-sampler/basic_widgets/historycombo.py index a43e8a9..8891235 100644 --- a/examples/pytde-sampler/basic_widgets/historycombo.py +++ b/examples/pytde-sampler/basic_widgets/historycombo.py @@ -1,5 +1,5 @@ from PyTQt.tqt import TQt, TQFrame, TQHBoxLayout, TQVBoxLayout, TQStringList, TQLabel, \ - SIGNAL, SLOT + TQ_SIGNAL, TQ_SLOT from tdeui import KHistoryCombo, KTextEdit @@ -41,11 +41,11 @@ class MainFrame(TQFrame): 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.connect(self.historyCombo, TQ_SIGNAL('activated(const TQString& )'), + self.historyCombo, TQ_SLOT('addToHistory(const TQString&)')) + self.connect(self.historyCombo, TQ_SIGNAL('cleared()'), self.historyCleared) - self.connect(self.historyCombo, SIGNAL('activated(const TQString &)'), + self.connect(self.historyCombo, TQ_SIGNAL('activated(const TQString &)'), self.historySelection.setText) def historyCleared(self): diff --git a/examples/pytde-sampler/dialogs/about/aboutapp.py b/examples/pytde-sampler/dialogs/about/aboutapp.py index 737fe57..f5b6d38 100644 --- a/examples/pytde-sampler/dialogs/about/aboutapp.py +++ b/examples/pytde-sampler/dialogs/about/aboutapp.py @@ -1,7 +1,7 @@ iconName = 'about_kde' labelText = 'TDEAboutApplication' -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdecore import i18n from tdeui import TDEAboutApplication, KPushButton, KTextEdit @@ -22,7 +22,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showAboutDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showAboutDialog) def showAboutDialog(self): dlg = TDEAboutApplication(self) diff --git a/examples/pytde-sampler/dialogs/about/abouttde.py b/examples/pytde-sampler/dialogs/about/abouttde.py index c48e83f..883a1bf 100644 --- a/examples/pytde-sampler/dialogs/about/abouttde.py +++ b/examples/pytde-sampler/dialogs/about/abouttde.py @@ -1,7 +1,7 @@ iconName = 'about_kde' labelText = 'TDEAboutTDE' -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdecore import i18n from tdeui import TDEAboutKDE, KPushButton, KTextEdit @@ -21,7 +21,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showAboutDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showAboutDialog) def showAboutDialog(self): dlg = TDEAboutKDE(self) diff --git a/examples/pytde-sampler/dialogs/bugreport.py b/examples/pytde-sampler/dialogs/bugreport.py index 4d37a8c..9b35ccb 100644 --- a/examples/pytde-sampler/dialogs/bugreport.py +++ b/examples/pytde-sampler/dialogs/bugreport.py @@ -6,7 +6,7 @@ labelText = 'KBugReport' ##~ specifies what we want. ##~ docItemName = 'KBugReport' -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdecore import i18n from tdeui import TDEAboutDialog, KPushButton, KBugReport, KTextEdit @@ -26,7 +26,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showBugDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showBugDialog) def showBugDialog(self): diff --git a/examples/pytde-sampler/dialogs/color.py b/examples/pytde-sampler/dialogs/color.py index 8c87162..cf9cdd6 100644 --- a/examples/pytde-sampler/dialogs/color.py +++ b/examples/pytde-sampler/dialogs/color.py @@ -2,13 +2,13 @@ iconName = 'colorize' labelText = 'KColorDialog' -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdecore import i18n from tdeui import KPushButton, KColorDialog, KColorPatch, KTextEdit helpText = ("TDE provides a nifty common color selection dialog." - "The color selection in the dialog is tracked via a SIGNAL " + "The color selection in the dialog is tracked via a TQ_SIGNAL " "connected to the KColorPatch area below.") @@ -25,18 +25,18 @@ class MainFrame(TQFrame): buttonlayout.addStretch(1) layout.addWidget(self.patch, 10) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showColorDialog) + self.connect(self.button, TQ_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.connect(dlg, TQ_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.connect(dlg, TQ_SIGNAL('colorSelected(const TQColor &)'), self.patch.setColor) dlg.exec_loop() diff --git a/examples/pytde-sampler/dialogs/config.py b/examples/pytde-sampler/dialogs/config.py index d086b28..da9ea42 100644 --- a/examples/pytde-sampler/dialogs/config.py +++ b/examples/pytde-sampler/dialogs/config.py @@ -1,5 +1,5 @@ -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQString +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, TQ_SIGNAL, TQString from tdecore import i18n, TDEConfigSkeleton from tdeui import KPushButton, TDEConfigDialog, KTextEdit @@ -33,7 +33,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showConfigDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showConfigDialog) def showConfigDialog(self): diff --git a/examples/pytde-sampler/dialogs/edfind.py b/examples/pytde-sampler/dialogs/edfind.py index 5fa8155..777138f 100644 --- a/examples/pytde-sampler/dialogs/edfind.py +++ b/examples/pytde-sampler/dialogs/edfind.py @@ -1,5 +1,5 @@ -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQFont, TQString +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, TQ_SIGNAL, TQFont, TQString from tdecore import i18n from tdeui import KPushButton, KEdFind, KTextEdit @@ -21,14 +21,14 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showEdFind) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showEdFind) def showEdFind(self): dlg = self.dlg = KEdFind(self) - self.connect(dlg, SIGNAL('done()'), + self.connect(dlg, TQ_SIGNAL('done()'), self.doneClicked) - self.connect(dlg, SIGNAL('search()'), + self.connect(dlg, TQ_SIGNAL('search()'), self.searchClicked) dlg.exec_loop() diff --git a/examples/pytde-sampler/dialogs/edreplace.py b/examples/pytde-sampler/dialogs/edreplace.py index 249ca42..07954fe 100644 --- a/examples/pytde-sampler/dialogs/edreplace.py +++ b/examples/pytde-sampler/dialogs/edreplace.py @@ -1,4 +1,4 @@ -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQFont, TQString +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, TQ_SIGNAL, TQFont, TQString from tdecore import i18n from tdeui import KPushButton, KEdReplace, KTextEdit @@ -20,14 +20,14 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showEdReplace) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showEdReplace) def showEdReplace(self): dlg = self.dlg = KEdReplace(self) - self.connect(dlg, SIGNAL('done()'), + self.connect(dlg, TQ_SIGNAL('done()'), self.doneClicked) - self.connect(dlg, SIGNAL('replace()'), + self.connect(dlg, TQ_SIGNAL('replace()'), self.replaceClicked) dlg.exec_loop() diff --git a/examples/pytde-sampler/dialogs/font.py b/examples/pytde-sampler/dialogs/font.py index 7846eb6..b0a73c5 100644 --- a/examples/pytde-sampler/dialogs/font.py +++ b/examples/pytde-sampler/dialogs/font.py @@ -1,5 +1,5 @@ -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQFont, TQString +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, TQ_SIGNAL, TQFont, TQString from tdecore import i18n from tdeui import KPushButton, TDEFontDialog, KTextEdit @@ -41,7 +41,7 @@ class MainFrame(TQFrame): buttonlayout.addStretch(1) layout.addWidget(self.example, 10) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showFontDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showFontDialog) def showFontDialog(self): diff --git a/examples/pytde-sampler/dialogs/input.py b/examples/pytde-sampler/dialogs/input.py index a297e37..7970a50 100644 --- a/examples/pytde-sampler/dialogs/input.py +++ b/examples/pytde-sampler/dialogs/input.py @@ -1,7 +1,7 @@ iconName = 'editclear' labelText = 'KInputDialog' -from PyTQt.tqt import TQFrame, TQGridLayout, TQLabel, TQStringList, SIGNAL +from PyTQt.tqt import TQFrame, TQGridLayout, TQLabel, TQStringList, TQ_SIGNAL from tdecore import i18n from tdeui import KPushButton, KInputDialog, KTextEdit @@ -24,28 +24,28 @@ class MainFrame(TQFrame): layout.addMultiCellWidget(self.help, 0, 1, 0, 1) button = KPushButton(i18n('Get Text'), self) - self.connect(button, SIGNAL('clicked()'), self.getText) + self.connect(button, TQ_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.connect(button, TQ_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.connect(button, TQ_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.connect(button, TQ_SIGNAL('clicked()'), self.getItem) self.getItemLabel = TQLabel(self.items[0], self) layout.addWidget(button, 5, 0) layout.addWidget(self.getItemLabel, 5, 1) diff --git a/examples/pytde-sampler/dialogs/key.py b/examples/pytde-sampler/dialogs/key.py index 487f5d9..fda7436 100644 --- a/examples/pytde-sampler/dialogs/key.py +++ b/examples/pytde-sampler/dialogs/key.py @@ -1,7 +1,7 @@ iconName = 'configure_shortcuts' labelText = 'KKeyDialog' -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdecore import i18n from tdeui import KPushButton, KKeyDialog, KTextEdit @@ -22,7 +22,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showKeysDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showKeysDialog) def showKeysDialog(self): top = self.topLevelWidget() diff --git a/examples/pytde-sampler/dialogs/msgbox.py b/examples/pytde-sampler/dialogs/msgbox.py index 697dd3c..3b993bd 100644 --- a/examples/pytde-sampler/dialogs/msgbox.py +++ b/examples/pytde-sampler/dialogs/msgbox.py @@ -5,7 +5,7 @@ from random import random from traceback import print_exc from io import StringIO -from PyTQt.tqt import TQFrame, TQGridLayout, TQLabel, TQStringList, SIGNAL +from PyTQt.tqt import TQFrame, TQGridLayout, TQLabel, TQStringList, TQ_SIGNAL from tdecore import i18n from tdeui import KGuiItem, KPushButton, KMessageBox, KTextEdit @@ -41,47 +41,47 @@ class MainFrame(TQFrame): layout.addMultiCellWidget(self.help, 0, 1, 0, 1) button = KPushButton(i18n('Question Yes-No'), self) - self.connect(button, SIGNAL('clicked()'), self.questionYesNo) + self.connect(button, TQ_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) + self.connect(button, TQ_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) + self.connect(button, TQ_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) + self.connect(button, TQ_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) + self.connect(button, TQ_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) + self.connect(button, TQ_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) + self.connect(button, TQ_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) + self.connect(button, TQ_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) + self.connect(button, TQ_SIGNAL('clicked()'), self.informationList) layout.addWidget(button, 10, 0) layout.setRowStretch(10, 0) diff --git a/examples/pytde-sampler/dialogs/passwd.py b/examples/pytde-sampler/dialogs/passwd.py index 0508611..57354de 100644 --- a/examples/pytde-sampler/dialogs/passwd.py +++ b/examples/pytde-sampler/dialogs/passwd.py @@ -1,4 +1,4 @@ -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdecore import i18n from tdeui import KPushButton, KPasswordDialog, KTextEdit @@ -22,7 +22,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showPasswordDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showPasswordDialog) def showPasswordDialog(self): diff --git a/examples/pytde-sampler/dialogs/progress.py b/examples/pytde-sampler/dialogs/progress.py index 1f4ab4b..3ac1182 100644 --- a/examples/pytde-sampler/dialogs/progress.py +++ b/examples/pytde-sampler/dialogs/progress.py @@ -2,7 +2,7 @@ iconName = 'go' labelText = 'KProgressDialog' -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, TQ_SIGNAL from tdecore import i18n from tdeui import KPushButton, KProgressDialog, KTextEdit @@ -22,7 +22,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showProgressDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showProgressDialog) def showProgressDialog(self): self.dlg = dlg = KProgressDialog(self, None, 'Sample Progress Dialog', @@ -30,7 +30,7 @@ class MainFrame(TQFrame): dlg.progressBar().setTotalSteps(20) dlg.progressBar().setFormat('% complete: %p - value: %v - maximum: %m') timer = TQTimer(self) - self.connect(timer, SIGNAL('timeout()'), self.updateProgress) + self.connect(timer, TQ_SIGNAL('timeout()'), self.updateProgress) timer.start(250, False) dlg.exec_loop() timer.stop() diff --git a/examples/pytde-sampler/dialogs/tip.py b/examples/pytde-sampler/dialogs/tip.py index b9e8b3d..9238327 100644 --- a/examples/pytde-sampler/dialogs/tip.py +++ b/examples/pytde-sampler/dialogs/tip.py @@ -3,7 +3,7 @@ labelText = 'KTipDialog' import os -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdecore import i18n from tdeui import KPushButton, KTipDatabase, KTipDialog, KTextEdit @@ -22,7 +22,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showTipDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showTipDialog) def showTipDialog(self): filename = os.path.abspath(os.path.join(os.path.dirname(__file__), 'tips')) diff --git a/examples/pytde-sampler/icon_handling/misc.py b/examples/pytde-sampler/icon_handling/misc.py index 4be12be..aef8e6e 100644 --- a/examples/pytde-sampler/icon_handling/misc.py +++ b/examples/pytde-sampler/icon_handling/misc.py @@ -3,7 +3,7 @@ iconName = 'icons' labelText = 'Misc.' -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL, TQPoint +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL, TQPoint from tdecore import i18n from tdeui import TDEAboutDialog, KPushButton, KBugReport, KTextEdit from tdeui import KRootPermsIcon, KWritePermsIcon diff --git a/examples/pytde-sampler/icon_handling/sizes.py b/examples/pytde-sampler/icon_handling/sizes.py index f93fd94..4e3ead4 100644 --- a/examples/pytde-sampler/icon_handling/sizes.py +++ b/examples/pytde-sampler/icon_handling/sizes.py @@ -3,7 +3,7 @@ iconName = 'icons' labelText = 'Icon Sizing' -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdecore import i18n from tdeui import TDEAboutDialog, KPushButton, KBugReport, KTextEdit @@ -22,7 +22,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showBugDialog) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showBugDialog) def showBugDialog(self): diff --git a/examples/pytde-sampler/misc/gradientselect.py b/examples/pytde-sampler/misc/gradientselect.py index 4b2ee9e..94f66e0 100644 --- a/examples/pytde-sampler/misc/gradientselect.py +++ b/examples/pytde-sampler/misc/gradientselect.py @@ -1,4 +1,4 @@ -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL, TQColor, TQSizePolicy, TQLabel +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL, TQColor, TQSizePolicy, TQLabel from tdecore import i18n from tdeui import KPushButton, KGradientSelector, KTextEdit, KDualColorButton, KColorPatch @@ -38,11 +38,11 @@ class MainFrame(TQFrame): layout.addWidget(self.selector, 10) - self.connect(self.dualButton, SIGNAL('fgChanged(const TQColor &)'), + self.connect(self.dualButton, TQ_SIGNAL('fgChanged(const TQColor &)'), self.selector.setFirstColor) - self.connect(self.dualButton, SIGNAL('bgChanged(const TQColor &)'), + self.connect(self.dualButton, TQ_SIGNAL('bgChanged(const TQColor &)'), self.selector.setSecondColor) - self.connect(self.selector, SIGNAL('valueChanged(int)'), + self.connect(self.selector, TQ_SIGNAL('valueChanged(int)'), self.updateValue) diff --git a/examples/pytde-sampler/misc/passivepop.py b/examples/pytde-sampler/misc/passivepop.py index 316b69e..2704783 100644 --- a/examples/pytde-sampler/misc/passivepop.py +++ b/examples/pytde-sampler/misc/passivepop.py @@ -1,4 +1,4 @@ -from PyTQt.tqt import TQt, TQFrame, TQHBoxLayout, TQVBoxLayout, TQLabel, SIGNAL +from PyTQt.tqt import TQt, TQFrame, TQHBoxLayout, TQVBoxLayout, TQLabel, TQ_SIGNAL from tdeui import KPassivePopup, KTextEdit, KPushButton from tdecore import TDEGlobal, TDEIcon @@ -22,7 +22,7 @@ class MainFrame(TQFrame): layout.addStretch(10) - self.connect(self.button, SIGNAL('clicked()'), self.showPopups) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showPopups) def showPopups(self): diff --git a/examples/pytde-sampler/misc/window_info.py b/examples/pytde-sampler/misc/window_info.py index cf95afe..c222413 100644 --- a/examples/pytde-sampler/misc/window_info.py +++ b/examples/pytde-sampler/misc/window_info.py @@ -1,7 +1,7 @@ -from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQ_SIGNAL from tdeui import KWindowInfo, KPushButton, KTextEdit from tdecore import i18n, TDEApplication @@ -21,7 +21,7 @@ class MainFrame(TQFrame): buttonlayout.addWidget(self.button) buttonlayout.addStretch(1) layout.addStretch(1) - self.connect(self.button, SIGNAL('clicked()'), self.showWindowInfo) + self.connect(self.button, TQ_SIGNAL('clicked()'), self.showWindowInfo) def showWindowInfo(self): diff --git a/examples/pytde-sampler/qt_widgets/__init__.py b/examples/pytde-sampler/qt_widgets/__init__.py index 982bc9c..83a29b9 100644 --- a/examples/pytde-sampler/qt_widgets/__init__.py +++ b/examples/pytde-sampler/qt_widgets/__init__.py @@ -4,7 +4,7 @@ iconName = 'designer' helpText = """TQt provides a rich set of widgets for application use. Select the children of this item to see for yourself.""" -from PyTQt.tqt import TQFrame, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQVBoxLayout, TQ_SIGNAL from tdeui import KTextEdit diff --git a/examples/pytde-sampler/qt_widgets/table.py b/examples/pytde-sampler/qt_widgets/table.py index 0cdc4ab..bf12a9a 100644 --- a/examples/pytde-sampler/qt_widgets/table.py +++ b/examples/pytde-sampler/qt_widgets/table.py @@ -8,7 +8,7 @@ editable table widget.' import csv import os -from PyTQt.tqt import TQFrame, TQStringList, TQVBoxLayout, SIGNAL +from PyTQt.tqt import TQFrame, TQStringList, TQVBoxLayout, TQ_SIGNAL from PyTQt.tqttable import TQTable from tdeui import KTextEdit diff --git a/examples/pytde-sampler/sampler.py b/examples/pytde-sampler/sampler.py index 8d04233..4567e04 100755 --- a/examples/pytde-sampler/sampler.py +++ b/examples/pytde-sampler/sampler.py @@ -10,7 +10,7 @@ import inspect import os import sys -from PyTQt.tqt import SIGNAL, SLOT, PYSIGNAL, TQt +from PyTQt.tqt import TQ_SIGNAL, TQ_SLOT, PYSIGNAL, TQt from PyTQt.tqt import TQVBoxLayout, TQLabel, TQPixmap, TQSplitter, TQFrame, TQDialog from PyTQt.tqt import TQSizePolicy, TQHBoxLayout, TQSpacerItem, TQPushButton @@ -34,8 +34,8 @@ except (NameError, ): __file__ = sys.argv[0] -sigDoubleClicked = SIGNAL('doubleClicked(TQListViewItem *)') -sigViewItemSelected = SIGNAL('selectionChanged(TQListViewItem *)') +sigDoubleClicked = TQ_SIGNAL('doubleClicked(TQListViewItem *)') +sigViewItemSelected = TQ_SIGNAL('selectionChanged(TQListViewItem *)') sigSampleSelected = PYSIGNAL('sample selected') blank = KURL('about:blank') @@ -151,7 +151,7 @@ class WebFrame(CommonFrame): def __init__(self, parent): CommonFrame.__init__(self, parent) self.part = part = buildPart(self, 'text/html', "Type == 'Service'") - #part.connect(part, SIGNAL('tdehtmlMousePressEvent(a)'), self.onURL) + #part.connect(part, TQ_SIGNAL('tdehtmlMousePressEvent(a)'), self.onURL) def onURL(self, a): print('****', a) @@ -367,7 +367,7 @@ class SamplerMainWindow(TDEMainWindow): """ dlg = KEditToolbar(self.actionCollection(), self.xmlRcFileName) - self.connect(dlg, SIGNAL('newToolbarConfig()'), self.rebuildGui) + self.connect(dlg, TQ_SIGNAL('newToolbarConfig()'), self.rebuildGui) #connect(self, sigSampleSelected, self.sourceFrame.showModuleSource) dlg.exec_loop() diff --git a/examples/qxembedexample.py b/examples/qxembedexample.py index da9c45b..9b9f674 100644 --- a/examples/qxembedexample.py +++ b/examples/qxembedexample.py @@ -54,7 +54,7 @@ class QXEmbedExample(TQWidget): self.resize(TQSize(471,499).expandedTo(self.minimumSizeHint())) self.clearWState(TQt.WState_Polished) - self.connect(self.launchButton,SIGNAL("clicked()"),self.launchApp) + self.connect(self.launchButton,TQ_SIGNAL("clicked()"),self.launchApp) def languageChange(self): diff --git a/examples/uimodules/uidialogs.py b/examples/uimodules/uidialogs.py index 1c8e2b4..baedc0e 100644 --- a/examples/uimodules/uidialogs.py +++ b/examples/uimodules/uidialogs.py @@ -1,4 +1,4 @@ -from PyTQt.tqt import TQVBox, TQLabel, TQLineEdit, TQString, TQPixmap, TQPushButton, TQColor, SIGNAL, TQButtonGroup,\ +from PyTQt.tqt import TQVBox, TQLabel, TQLineEdit, TQString, TQPixmap, TQPushButton, TQColor, TQ_SIGNAL, TQButtonGroup,\ TQRadioButton, TQt, TQWidget from tdecore import TDEAccel, i18n @@ -46,9 +46,9 @@ class CustomDlg (KDialog): self.okBtn.setGeometry (x, y, 40, 22) self.canBtn.setGeometry (x + 50, y, 40, 22) - self.connect (self.dlgBtn, SIGNAL ("clicked()"), self.dlgClicked) - self.connect (self.okBtn, SIGNAL ("clicked ()"), self.okClicked) - self.connect (self.canBtn, SIGNAL ("clicked ()"), self.cancelClicked) + self.connect (self.dlgBtn, TQ_SIGNAL ("clicked()"), self.dlgClicked) + self.connect (self.okBtn, TQ_SIGNAL ("clicked ()"), self.okClicked) + self.connect (self.canBtn, TQ_SIGNAL ("clicked ()"), self.cancelClicked) def dlgClicked (self): # get some (numerical) color values from the original dialog @@ -93,7 +93,7 @@ class MessageDlg (KDialog): for i in range (n): TQRadioButton (buttons [i], grp) - self.connect (grp, SIGNAL ("clicked (int)"), self.launch) + self.connect (grp, TQ_SIGNAL ("clicked (int)"), self.launch) def launch (self, which): if which == QuestionYesNo: diff --git a/examples/uimodules/uimisc.py b/examples/uimodules/uimisc.py index 26129d1..a28f602 100644 --- a/examples/uimodules/uimisc.py +++ b/examples/uimodules/uimisc.py @@ -1,6 +1,6 @@ import os, time -from PyTQt.tqt import TQImage, TQLabel, TQPixmap, TQPushButton, SIGNAL, TQColor, TQValidator +from PyTQt.tqt import TQImage, TQLabel, TQPixmap, TQPushButton, TQ_SIGNAL, TQColor, TQValidator from tdeui import KMessageBox, KDateValidator, KFloatValidator, KIntValidator, KLineEdit, KLed @@ -24,7 +24,7 @@ class Page3: self.iv = KLineEdit (self.page) self.iv.setGeometry (x, y + 20, 100, 20) self.iv.show () - self.page.connect (self.iv, SIGNAL("textChanged (const TQString &)"), self.ivChanged) + self.page.connect (self.iv, TQ_SIGNAL("textChanged (const TQString &)"), self.ivChanged) self.ivVal = KIntValidator (self.page) self.ivVal.setRange (20, 50) @@ -61,7 +61,7 @@ class Page3: self.fv = KLineEdit (self.page) self.fv.setGeometry (x, y + 20, 100, 20) self.fv.show () - self.page.connect (self.fv, SIGNAL("textChanged (const TQString &)"), self.fvChanged) + self.page.connect (self.fv, TQ_SIGNAL("textChanged (const TQString &)"), self.fvChanged) self.fvVal = KFloatValidator (self.page) self.fvVal.setRange (10.0, 40.0) @@ -98,7 +98,7 @@ class Page3: self.dv = KLineEdit (self.page) self.dv.setGeometry (x, y + 20, 100, 20) self.dv.show () -# self.page.connect (self.dv, SIGNAL("textChanged (const TQString &)"), self.dvChanged) +# self.page.connect (self.dv, TQ_SIGNAL("textChanged (const TQString &)"), self.dvChanged) self.dvVal = KDateValidator (self.page) # self.dvVal.setRange (10.0, 40.0) @@ -110,7 +110,7 @@ class Page3: dvBtn = TQPushButton ("Validate", self.page) dvBtn.setGeometry (x, y + 45, 60, 22) dvBtn.show () - self.page.connect (dvBtn, SIGNAL ("clicked ()"), self.dvChanged) + self.page.connect (dvBtn, TQ_SIGNAL ("clicked ()"), self.dvChanged) dvNoteLbl = TQLabel ("Format is locale dependent\nShort date only\nTry DD-MM-YY", self.page) dvNoteLbl.setGeometry (x, y + 70, 150, 60) diff --git a/examples/uimodules/uiwidgets.py b/examples/uimodules/uiwidgets.py index 1d7992f..69bd002 100644 --- a/examples/uimodules/uiwidgets.py +++ b/examples/uimodules/uiwidgets.py @@ -1,6 +1,6 @@ import time, sys -from PyTQt.tqt import TQLabel, TQFrame, TQColor, TQPushButton, SIGNAL, TQButtonGroup, TQRadioButton, \ +from PyTQt.tqt import TQLabel, TQFrame, TQColor, TQPushButton, TQ_SIGNAL, TQButtonGroup, TQRadioButton, \ TQt, TQString, TQChar, TQWidget, TQTimer from tdecore import TDEApplication @@ -43,9 +43,9 @@ class Page1: replaceBtn.setGeometry (x + 90, y, 60, 22) gotoBtn.setGeometry (x + 180, y, 60, 22) - self.page.connect (searchBtn, SIGNAL ("clicked ()"), parent.edit.search) - self.page.connect (replaceBtn, SIGNAL ("clicked ()"), parent.edit.replace) - self.page.connect (gotoBtn, SIGNAL ("clicked ()"), parent.edit.doGotoLine) + self.page.connect (searchBtn, TQ_SIGNAL ("clicked ()"), parent.edit.search) + self.page.connect (replaceBtn, TQ_SIGNAL ("clicked ()"), parent.edit.replace) + self.page.connect (gotoBtn, TQ_SIGNAL ("clicked ()"), parent.edit.doGotoLine) searchBtn.show () replaceBtn.show () @@ -106,7 +106,7 @@ class Page1: for i in range (n): TQRadioButton (buttons [i], grp) - grp.connect (grp, SIGNAL ("clicked (int)"), self.restrict) + grp.connect (grp, TQ_SIGNAL ("clicked (int)"), self.restrict) grp.find (0).setChecked (True) self.restrict (0) @@ -456,7 +456,7 @@ class Page6: toggle.setGeometry (150, 400, 60, 22) toggle.show () - self.page.connect (toggle, SIGNAL ("clicked ()"), self.toggleClicked) + self.page.connect (toggle, TQ_SIGNAL ("clicked ()"), self.toggleClicked) self.page.show () @@ -608,7 +608,7 @@ class CSDlg (KDialog): closeBtn.setGeometry ( 610, 280, 60, 22) closeBtn.show () - self.connect (closeBtn, SIGNAL ("clicked ()"), self.closeClicked) + self.connect (closeBtn, TQ_SIGNAL ("clicked ()"), self.closeClicked) def closeClicked (self): self.done (1) diff --git a/examples/uiqxembed.py b/examples/uiqxembed.py index 9778e1e..c912ae1 100644 --- a/examples/uiqxembed.py +++ b/examples/uiqxembed.py @@ -4,7 +4,7 @@ """ import sys -from PyTQt.tqt import TQIconSet, TQProcess, TQTimer, SIGNAL, SLOT +from PyTQt.tqt import TQIconSet, TQProcess, TQTimer, TQ_SIGNAL, TQ_SLOT from tdecore import TDEAboutData, TDEApplication, TDECmdLineArgs, TDEGlobal, TDEIcon from tdecore import KWin, KWinModule @@ -115,5 +115,5 @@ if __name__ == '__main__': app = TDEApplication() mainWindow = ExampleMain() mainWindow.show() - app.connect(app, SIGNAL('lastWindowClosed()'), app, SLOT('quit()')) + app.connect(app, TQ_SIGNAL('lastWindowClosed()'), app, TQ_SLOT('quit()')) app.exec_loop() diff --git a/examples/uisampler.py b/examples/uisampler.py index e52a3b6..57ae1c0 100644 --- a/examples/uisampler.py +++ b/examples/uisampler.py @@ -1,7 +1,7 @@ import sys sys.path.append ("./uimodules") -from PyTQt.tqt import TQSplitter, TQWidgetStack, TQWidget, TQListViewItem, SIGNAL, TQCString , TQScrollView, TQRect, TQt +from PyTQt.tqt import TQSplitter, TQWidgetStack, TQWidget, TQListViewItem, TQ_SIGNAL, TQCString , TQScrollView, TQRect, TQt from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData from tdeui import TDEMainWindow, TDEListView @@ -160,7 +160,7 @@ class MainWin (TDEMainWindow): self.setCentralWidget (self.mainView) self.initListView () - self.connect (self.tree, SIGNAL ("clicked (TQListViewItem *)"), self.lvClicked) + self.connect (self.tree, TQ_SIGNAL ("clicked (TQListViewItem *)"), self.lvClicked) self.edit = None self.currentPageObj = None diff --git a/examples/uitdemdi.py b/examples/uitdemdi.py index 5be4c94..9f3f5d4 100644 --- a/examples/uitdemdi.py +++ b/examples/uitdemdi.py @@ -28,7 +28,7 @@ All is not rosy, however: import os import sys -from PyTQt.tqt import SIGNAL, TQVBoxLayout, TQLabel +from PyTQt.tqt import TQ_SIGNAL, TQVBoxLayout, TQLabel from tdecore import i18n, TDEAboutData, TDEApplication, TDEGlobal, TDEIcon, TDECmdLineArgs from tdeui import KDockWidget, TDEListBox, KStdAction @@ -39,9 +39,9 @@ except (ImportError, ): sys.exit(1) -sigChildCloseRequest = SIGNAL('childWindowCloseRequest(KMdiChildView *)') -sigChildViewActivated = SIGNAL('viewActivated(KMdiChildView *)') -sigBoxSelectionChanged = SIGNAL('selectionChanged(TQListBoxItem *)') +sigChildCloseRequest = TQ_SIGNAL('childWindowCloseRequest(KMdiChildView *)') +sigChildViewActivated = TQ_SIGNAL('viewActivated(KMdiChildView *)') +sigBoxSelectionChanged = TQ_SIGNAL('selectionChanged(TQListBoxItem *)') def getIcon(name, group=TDEIcon.NoGroup, size=TDEIcon.SizeSmall): diff --git a/examples/xmlmenudemo.py b/examples/xmlmenudemo.py index 9c5fc82..943d737 100644 --- a/examples/xmlmenudemo.py +++ b/examples/xmlmenudemo.py @@ -37,7 +37,7 @@ copyright holder. import sys, os -from PyTQt.tqt import TQPopupMenu, SIGNAL, TQLabel, TQIconSet +from PyTQt.tqt import TQPopupMenu, TQ_SIGNAL, TQLabel, TQIconSet from tdecore import TDEApplication, TDECmdLineArgs, TDEAboutData, i18n, TDEIcon, TDEIconLoader, TDEShortcut, TDEGlobal from tdeui import TDEMainWindow, KMessageBox, KStdAction, TDEAction, TDEToggleAction, TDEFontSizeAction, TDEFontAction, TDERadioAction,\ |