From db88dbbdb24193c81d3b4b893553b78cddf32eb3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 10 Jan 2024 10:12:35 +0900 Subject: Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines Signed-off-by: Michele Calgaro (cherry picked from commit d94985267d6f224c5a9833736762f466d264374d) --- examples/uimodules/uidialogs.py | 10 +++++----- examples/uimodules/uimisc.py | 10 +++++----- examples/uimodules/uiwidgets.py | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'examples/uimodules') 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) -- cgit v1.2.1