diff options
author | Timothy Pearson <[email protected]> | 2011-12-03 22:23:44 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-03 22:23:44 -0600 |
commit | 203ba231d0276943aae36111f9ec1e949f3c6a4c (patch) | |
tree | f039f7a5b5fc2da88a96876971bac580d87f6788 /examples/uimodules | |
parent | fd35f4a8382b7d223bc0325b9ca3f88515778aa0 (diff) | |
download | pytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.tar.gz pytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.zip |
Initial TQt conversion
Diffstat (limited to 'examples/uimodules')
-rw-r--r-- | examples/uimodules/uidialogs.py | 62 | ||||
-rw-r--r-- | examples/uimodules/uimenus.py | 6 | ||||
-rw-r--r-- | examples/uimodules/uimisc.py | 64 | ||||
-rw-r--r-- | examples/uimodules/uiwidgets.py | 160 | ||||
-rw-r--r-- | examples/uimodules/uixml.py | 4 |
5 files changed, 148 insertions, 148 deletions
diff --git a/examples/uimodules/uidialogs.py b/examples/uimodules/uidialogs.py index a08e44d..1c85fbe 100644 --- a/examples/uimodules/uidialogs.py +++ b/examples/uimodules/uidialogs.py @@ -1,5 +1,5 @@ -from qt import QVBox, QLabel, QLineEdit, QString, QPixmap, QPushButton, QColor, SIGNAL, QButtonGroup,\ - QRadioButton, Qt, QWidget +from qt import TQVBox, TQLabel, TQLineEdit, TQString, TQPixmap, TQPushButton, TQColor, SIGNAL, TQButtonGroup,\ + TQRadioButton, TQt, TQWidget from tdecore import KAccel, i18n @@ -28,15 +28,15 @@ class CustomDlg (KDialog): x = 20 y = 10 - rLbl = QLabel ("r", self) - gLbl = QLabel ("g", self) - bLbl = QLabel ("b", self) - self.rEd = QLineEdit ("64", self) - self.gEd = QLineEdit ("64", self) - self.bEd = QLineEdit ("64", self) - self.dlgBtn = QPushButton ("Set/Get Color", self) - self.okBtn = QPushButton ("OK", self) - self.canBtn = QPushButton ("Cancel", self) + rLbl = TQLabel ("r", self) + gLbl = TQLabel ("g", self) + bLbl = TQLabel ("b", self) + self.rEd = TQLineEdit ("64", self) + self.gEd = TQLineEdit ("64", self) + self.bEd = TQLineEdit ("64", self) + self.dlgBtn = TQPushButton ("Set/Get Color", self) + self.okBtn = TQPushButton ("OK", self) + self.canBtn = TQPushButton ("Cancel", self) rLbl.setGeometry (x, y, 25, 20) gLbl.setGeometry (x + 30, y, 25, 20) @@ -61,8 +61,8 @@ class CustomDlg (KDialog): green = int (self.gEd.text ().latin1 ()) blue = int (self.bEd.text ().latin1 ()) - # convert the numbers to a QColor - color = QColor (red, green, blue) + # convert the numbers to a TQColor + color = TQColor (red, green, blue) # invoke the dialog (getColor is a 'static' call) # initialize with the colors from above (in color) @@ -73,7 +73,7 @@ class CustomDlg (KDialog): # get the numerical color values back red, green, blue = color.rgb () - # update the QLineEdits in the original dialog + # update the TQLineEdits in the original dialog self.rEd.setText (str (red)) self.gEd.setText (str (green)) self.bEd.setText (str (blue)) @@ -93,10 +93,10 @@ class MessageDlg (KDialog): n = len (buttons) - grp = QButtonGroup (n, Qt.Vertical, "MessageBoxes", self, "button grp") + grp = TQButtonGroup (n, TQt.Vertical, "MessageBoxes", self, "button grp") grp.setGeometry (10, 10, 200, 30*n) for i in range (n): - QRadioButton (buttons [i], grp) + TQRadioButton (buttons [i], grp) self.connect (grp, SIGNAL ("clicked (int)"), self.launch) @@ -126,11 +126,11 @@ class MessageDlg (KDialog): def dlgKAboutDialog (parent): dlg = KAboutDialog (parent, 'about dialog', False) - dlg.setLogo (QPixmap ("pytestimage.png")) + dlg.setLogo (TQPixmap ("pytestimage.png")) dlg.setTitle ("UISampler for PyKDE") dlg.setAuthor ("Jim Bublitz", "[email protected]", "http://www.riverbankcomputing.co.uk",\ "\n\nPyKDE -- Python bindings\n\tfor KDE") - dlg.addContributor ("PyKDE list", "[email protected]", QString.null, QString.null) + dlg.addContributor ("PyKDE list", "[email protected]", TQString.null, TQString.null) dlg.show () @@ -161,18 +161,18 @@ def dlgKDialogBase (parent): # making 'page' the parent inserts the widgets in # the VBox created above - label = QLabel( caption, page, "caption" ); + label = TQLabel( caption, page, "caption" ); - lineedit = QLineEdit(text_, page, "lineedit" ); + lineedit = TQLineEdit(text_, page, "lineedit" ); lineedit.setMinimumWidth(dlg.fontMetrics().maxWidth()*20); # This tests some handwritten code in KDialogBase - label0 = QLabel ("Border widths", page) + label0 = TQLabel ("Border widths", page) a, b, c, d = dlg.getBorderWidths () - labelA = QLabel ("Upper Left X: " + str (a), page) - labelB = QLabel ("Upper Left Y: " + str (b), page) - labelC = QLabel ("Lower Right X: " + str (c), page) - labelD = QLabel ("Lower Right Y: " + str (d), page) + labelA = TQLabel ("Upper Left X: " + str (a), page) + labelB = TQLabel ("Upper Left Y: " + str (b), page) + labelC = TQLabel ("Lower Right X: " + str (c), page) + labelD = TQLabel ("Lower Right Y: " + str (d), page) dlg.show () @@ -211,14 +211,14 @@ def dlgKPasswordDialog (parent): def dlgKWizard (parent): wiz = KWizard (parent) - page1 = QWidget (wiz) - p1Lbl = QLabel ("This is page 1", page1) + page1 = TQWidget (wiz) + p1Lbl = TQLabel ("This is page 1", page1) p1Lbl.setGeometry (20, 20, 100, 20) - page2 = QWidget (wiz) - p2Lbl = QLabel ("This is page 2", page2) + page2 = TQWidget (wiz) + p2Lbl = TQLabel ("This is page 2", page2) p2Lbl.setGeometry (50, 20, 100, 20) - page3 = QWidget (wiz) - p3Lbl = QLabel ("This is page 3", page3) + page3 = TQWidget (wiz) + p3Lbl = TQLabel ("This is page 3", page3) p3Lbl.setGeometry (80, 20, 100, 20) wiz.addPage (page1, "Page 1") diff --git a/examples/uimodules/uimenus.py b/examples/uimodules/uimenus.py index 6f98769..4e11157 100644 --- a/examples/uimodules/uimenus.py +++ b/examples/uimodules/uimenus.py @@ -1,6 +1,6 @@ import os -from qt import QLabel +from qt import TQLabel from tdecore import KApplication @@ -11,7 +11,7 @@ class PageLaunch: x = 10 y = 10 - launchLbl = QLabel ("Launching application ... please wait\n\nClose launched application to continue", self.page) + launchLbl = TQLabel ("Launching application ... please wait\n\nClose launched application to continue", self.page) launchLbl.setGeometry (x, y, 300, 80) launchLbl.show () @@ -27,7 +27,7 @@ class PageNotImpl: x = 10 y = 10 - niLbl = QLabel ("Nothing is currently implemented for this widget", self.page) + niLbl = TQLabel ("Nothing is currently implemented for this widget", self.page) niLbl.setGeometry (x, y, 300, 20) niLbl.show () diff --git a/examples/uimodules/uimisc.py b/examples/uimodules/uimisc.py index 7f39b86..f296aac 100644 --- a/examples/uimodules/uimisc.py +++ b/examples/uimodules/uimisc.py @@ -1,6 +1,6 @@ import os, time -from qt import QImage, QLabel, QPixmap, QPushButton, SIGNAL, QColor, QValidator +from qt import TQImage, TQLabel, TQPixmap, TQPushButton, SIGNAL, TQColor, TQValidator from tdeui import KMessageBox, KDateValidator, KFloatValidator, KIntValidator, KLineEdit, KLed @@ -13,33 +13,33 @@ class Page3: x = 10 y = 15 - green = QColor (0, 255, 0) - yellow = QColor (255, 255, 0) - red = QColor (255, 0, 0) + green = TQColor (0, 255, 0) + yellow = TQColor (255, 255, 0) + red = TQColor (255, 0, 0) - ivLbl = QLabel ("KIntValidator", self.page) + ivLbl = TQLabel ("KIntValidator", self.page) ivLbl.setGeometry (x, y, 100, 20) ivLbl.show () self.iv = KLineEdit (self.page) self.iv.setGeometry (x, y + 20, 100, 20) self.iv.show () - self.page.connect (self.iv, SIGNAL("textChanged (const QString &)"), self.ivChanged) + self.page.connect (self.iv, SIGNAL("textChanged (const TQString &)"), self.ivChanged) self.ivVal = KIntValidator (self.page) self.ivVal.setRange (20, 50) - ivRngLbl = QLabel ("Range is 20 - 50", self.page) + ivRngLbl = TQLabel ("Range is 20 - 50", self.page) ivRngLbl.setGeometry (x, y + 45, 100, 20) ivRngLbl.show () - ivAccLbl = QLabel ("Acceptable", self.page) + ivAccLbl = TQLabel ("Acceptable", self.page) ivAccLbl.setGeometry (x + 125, y + 45, 85, 20) ivAccLbl.show () - ivInterLbl = QLabel ("Intermediate", self.page) + ivInterLbl = TQLabel ("Intermediate", self.page) ivInterLbl.setGeometry (x + 125, y + 20, 85, 20) ivInterLbl.show () - ivInvalLbl = QLabel ("Invalid", self.page) + ivInvalLbl = TQLabel ("Invalid", self.page) ivInvalLbl.setGeometry (x + 125, y - 5, 85, 20) ivInvalLbl.show () self.ivInvalLed = KLed (red, KLed.Off, KLed.Sunken, KLed.Circular,self.page) @@ -54,29 +54,29 @@ class Page3: y = y + 100 - fvLbl = QLabel ("KFloatValidator", self.page) + fvLbl = TQLabel ("KFloatValidator", self.page) fvLbl.setGeometry (x, y, 100, 20) fvLbl.show () self.fv = KLineEdit (self.page) self.fv.setGeometry (x, y + 20, 100, 20) self.fv.show () - self.page.connect (self.fv, SIGNAL("textChanged (const QString &)"), self.fvChanged) + self.page.connect (self.fv, SIGNAL("textChanged (const TQString &)"), self.fvChanged) self.fvVal = KFloatValidator (self.page) self.fvVal.setRange (10.0, 40.0) - fvRngLbl = QLabel ("Range is 10.0 - 40.0", self.page) + fvRngLbl = TQLabel ("Range is 10.0 - 40.0", self.page) fvRngLbl.setGeometry (x, y + 45, 100, 20) fvRngLbl.show () - fvAccLbl = QLabel ("Acceptable", self.page) + fvAccLbl = TQLabel ("Acceptable", self.page) fvAccLbl.setGeometry (x + 125, y + 45, 85, 20) fvAccLbl.show () - fvInterLbl = QLabel ("Intermediate", self.page) + fvInterLbl = TQLabel ("Intermediate", self.page) fvInterLbl.setGeometry (x + 125, y + 20, 95, 20) fvInterLbl.show () - fvInvalLbl = QLabel ("Invalid", self.page) + fvInvalLbl = TQLabel ("Invalid", self.page) fvInvalLbl.setGeometry (x + 125, y - 5, 85, 20) fvInvalLbl.show () self.fvInvalLed = KLed (red, KLed.Off, KLed.Sunken, KLed.Circular,self.page) @@ -91,38 +91,38 @@ class Page3: y = y + 100 - dvLbl = QLabel ("KDateValidator", self.page) + dvLbl = TQLabel ("KDateValidator", self.page) dvLbl.setGeometry (x, y, 100, 20) dvLbl.show () self.dv = KLineEdit (self.page) self.dv.setGeometry (x, y + 20, 100, 20) self.dv.show () -# self.page.connect (self.dv, SIGNAL("textChanged (const QString &)"), self.dvChanged) +# self.page.connect (self.dv, SIGNAL("textChanged (const TQString &)"), self.dvChanged) self.dvVal = KDateValidator (self.page) # self.dvVal.setRange (10.0, 40.0) -# dvRngLbl = QLabel ("Range is 10.0 - 40.0", self.page) +# dvRngLbl = TQLabel ("Range is 10.0 - 40.0", self.page) # dvRngLbl.setGeometry (x, y + 45, 100, 20) # dvRngLbl.show () - dvBtn = QPushButton ("Validate", self.page) + dvBtn = TQPushButton ("Validate", self.page) dvBtn.setGeometry (x, y + 45, 60, 22) dvBtn.show () self.page.connect (dvBtn, SIGNAL ("clicked ()"), self.dvChanged) - dvNoteLbl = QLabel ("Format is locale dependent\nShort date only\nTry DD-MM-YY", self.page) + dvNoteLbl = TQLabel ("Format is locale dependent\nShort date only\nTry DD-MM-YY", self.page) dvNoteLbl.setGeometry (x, y + 70, 150, 60) dvNoteLbl.show () - dvAccLbl = QLabel ("Acceptable", self.page) + dvAccLbl = TQLabel ("Acceptable", self.page) dvAccLbl.setGeometry (x + 125, y + 45, 85, 20) dvAccLbl.show () - dvInterLbl = QLabel ("Intermediate", self.page) + dvInterLbl = TQLabel ("Intermediate", self.page) dvInterLbl.setGeometry (x + 125, y + 20, 85, 20) dvInterLbl.show () - dvInvalLbl = QLabel ("Invalid", self.page) + dvInvalLbl = TQLabel ("Invalid", self.page) dvInvalLbl.setGeometry (x + 125, y - 5, 85, 20) dvInvalLbl.show () self.dvInvalLed = KLed (red, KLed.Off, KLed.Sunken, KLed.Circular,self.page) @@ -142,9 +142,9 @@ class Page3: state, i = self.ivVal.validate (self.iv.text ()) - if state == QValidator.Acceptable: + if state == TQValidator.Acceptable: self.ivAccLed.on () - elif state == QValidator.Intermediate: + elif state == TQValidator.Intermediate: self.ivInterLed.on () else: self.ivInvalLed.on () @@ -156,9 +156,9 @@ class Page3: state, i = self.fvVal.validate (self.fv.text ()) - if state == QValidator.Acceptable: + if state == TQValidator.Acceptable: self.fvAccLed.on () - elif state == QValidator.Intermediate: + elif state == TQValidator.Intermediate: self.fvInterLed.on () else: self.fvInvalLed.on () @@ -170,9 +170,9 @@ class Page3: state, i = self.dvVal.validate (self.dv.text ()) - if state == QValidator.Acceptable: + if state == TQValidator.Acceptable: self.dvAccLed.on () - elif state == QValidator.Intermediate: + elif state == TQValidator.Intermediate: self.dvInterLed.on () else: self.dvInvalLed.on () @@ -184,7 +184,7 @@ class PageNotImpl: x = 10 y = 10 - niLbl = QLabel ("Nothing is currently implemented for this widget", self.page) + niLbl = TQLabel ("Nothing is currently implemented for this widget", self.page) niLbl.setGeometry (x, y, 300, 20) niLbl.show () @@ -230,7 +230,7 @@ def miscKSystemTray (parent): def miscKThemeBase (parent): parent.currentPageObj = PageNotImpl (parent) -def miscQXEmbed (parent): +def miscTQXEmbed (parent): parent.currentPageObj = PageNotImpl (parent) if __name__ == "__main__": diff --git a/examples/uimodules/uiwidgets.py b/examples/uimodules/uiwidgets.py index 54573bf..efbb8a6 100644 --- a/examples/uimodules/uiwidgets.py +++ b/examples/uimodules/uiwidgets.py @@ -1,7 +1,7 @@ import time, sys -from qt import QLabel, QFrame, QColor, QPushButton, SIGNAL, QButtonGroup, QRadioButton, Qt, QString, QChar,\ - QWidget, QTimer +from qt import TQLabel, TQFrame, TQColor, TQPushButton, SIGNAL, TQButtonGroup, TQRadioButton, TQt, TQString, TQChar,\ + TQWidget, TQTimer from tdecore import KApplication from tdeui import KEdit, KComboBox, KColorCombo, KEditListBox, KListBox, KLineEdit, KRestrictedLine,\ @@ -23,7 +23,7 @@ class Page1: x = 10 y = 10 - editLbl = QLabel ("KEdit", self.page) + editLbl = TQLabel ("KEdit", self.page) editLbl.setGeometry (x, y, 50, 20) editLbl.show () @@ -39,9 +39,9 @@ class Page1: parent.edit.show () y = y + 125 - searchBtn = QPushButton ("Search", self.page) - replaceBtn = QPushButton ("Replace", self.page) - gotoBtn = QPushButton ("GoTo Line", self.page) + searchBtn = TQPushButton ("Search", self.page) + replaceBtn = TQPushButton ("Replace", self.page) + gotoBtn = TQPushButton ("GoTo Line", self.page) searchBtn.setGeometry (x, y, 60, 22) replaceBtn.setGeometry (x + 90, y, 60, 22) @@ -57,7 +57,7 @@ class Page1: y = y + 35 - lineeditLbl = QLabel ("KLineEdit", self.page) + lineeditLbl = TQLabel ("KLineEdit", self.page) lineeditLbl.setGeometry (x, y, 70, 20) lineeditLbl.show () @@ -65,7 +65,7 @@ class Page1: lineedit.setGeometry (x, y + 20, 100, 20) lineedit.show () - intLbl = QLabel ("KIntNumInput", self.page) + intLbl = TQLabel ("KIntNumInput", self.page) intLbl.setGeometry (x + 195, y + 35, 95, 20) intLbl.show () @@ -79,7 +79,7 @@ class Page1: y = y + 50 - dblLbl = QLabel ("KDoubleNumInput", self.page) + dblLbl = TQLabel ("KDoubleNumInput", self.page) dblLbl.setGeometry (x + 195, y + 80, 115, 20) dblLbl.show () @@ -89,7 +89,7 @@ class Page1: dblNum.setRange (0.0, 10.0, 0.5, True) dblNum.show () - restricteditLbl = QLabel ("KRestrictedLine", self.page) + restricteditLbl = TQLabel ("KRestrictedLine", self.page) restricteditLbl.setGeometry (x, y, 95, 20) restricteditLbl.show () @@ -101,14 +101,14 @@ class Page1: n = len (buttons) - self.validLbl = QLabel ("", self.page) + self.validLbl = TQLabel ("", self.page) self.validLbl.setGeometry (x, y + 50, 250, 20) self.validLbl.show () - grp = QButtonGroup (n, Qt.Vertical, "Select valid chars", self.page, "button grp") + grp = TQButtonGroup (n, TQt.Vertical, "Select valid chars", self.page, "button grp") grp.setGeometry (x, y + 75, 150, 5+30*n) for i in range (n): - QRadioButton (buttons [i], grp) + TQRadioButton (buttons [i], grp) grp.connect (grp, SIGNAL ("clicked (int)"), self.restrict) @@ -122,21 +122,21 @@ class Page1: kapp.processEvents () y = y + 195 - sqzLbl = QLabel ("This text is too long to fit in the label below", self.page) + sqzLbl = TQLabel ("This text is too long to fit in the label below", self.page) sqzLbl.setGeometry (x, y, 350, 20) sqzLbl.show () - sqzLbl1 = QLabel ("KSqueezedTxtLabel:", self.page) + sqzLbl1 = TQLabel ("KSqueezedTxtLabel:", self.page) sqzLbl1.setGeometry (x, y + 20, 120, 20) sqzLbl1.show () squeeze = KSqueezedTextLabel ("This text is too long to fit in the label below", self.page) squeeze.setGeometry (x + 125, y + 20, 125, 20) - squeeze.setBackgroundMode (QWidget.PaletteBase) + squeeze.setBackgroundMode (TQWidget.PaletteBase) squeeze.show () def restrict (self, which): - r = {0: "0123456789", 1: "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 2: "abcdefghijklmnopqrstuvwxyz"} + r = {0: "0123456789", 1: "ABCDEFGHIJKLMNOPTQRSTUVWXYZ", 2: "abcdefghijklmnopqrstuvwxyz"} self.restrictlineedit.setValidChars (r [which]) self.validLbl.setText ("Valid: " + self.restrictlineedit.validChars ().latin1 ()) @@ -152,7 +152,7 @@ class Page2: - cbLbl = QLabel ("KComboBox", self.page) + cbLbl = TQLabel ("KComboBox", self.page) cbLbl.setGeometry (x1, y1, 75, 20) cbLbl.show () @@ -161,7 +161,7 @@ class Page2: combo.setGeometry (x1, y1 + 20, 100, 25) combo.show () - ccbLbl = QLabel ("KColorCombo", self.page) + ccbLbl = TQLabel ("KColorCombo", self.page) ccbLbl.setGeometry (x2, y1, 100, 20) ccbLbl.show () @@ -174,7 +174,7 @@ class Page2: editListBox.insertStrList (["One", "Two", "Three"]) editListBox.show () - lbLbl = QLabel ("KListBox", self.page) + lbLbl = TQLabel ("KListBox", self.page) lbLbl.setGeometry (x2, y2, 100, 20) lbLbl.show () @@ -190,7 +190,7 @@ class Page3: x = 10 y = 10 - fontLbl = QLabel ("KFontChooser", self.page) + fontLbl = TQLabel ("KFontChooser", self.page) fontLbl.setGeometry (x, y, 95, 20) fontLbl.show () @@ -207,16 +207,16 @@ class Page4: x = 10 y = 10 - cbLbl = QLabel ("KColorButton", self.page) + cbLbl = TQLabel ("KColorButton", self.page) cbLbl.setGeometry (x, y, 75, 20) cbLbl.show () cb = KColorButton (self.page) - cb.setColor (QColor (255, 0, 0)) + cb.setColor (TQColor (255, 0, 0)) cb.setGeometry (x, y + 20, 30, 30) cb.show () - ccbLbl = QLabel ("KColorCombo", self.page) + ccbLbl = TQLabel ("KColorCombo", self.page) ccbLbl.setGeometry (x + 150, y, 100, 20) ccbLbl.show () @@ -226,53 +226,53 @@ class Page4: y = y + 60 - cpLbl = QLabel ("KColorPatch", self.page) + cpLbl = TQLabel ("KColorPatch", self.page) cpLbl.setGeometry (x, y, 75, 20) cpLbl.show () cp = KColorPatch (self.page) - cp.setColor (QColor (255, 0, 0)) + cp.setColor (TQColor (255, 0, 0)) cp.setGeometry (x, y + 20, 20, 20) cp.show () x = x + 150 - ccLbl = QLabel ("KColorCells", self.page) + ccLbl = TQLabel ("KColorCells", self.page) ccLbl.setGeometry (x, y, 75, 20) ccLbl.show () cc = KColorCells (self.page, 1, 5) - cc.setColor (0, QColor (0, 0, 0)) - cc.setColor (1, QColor (255, 0, 0)) - cc.setColor (2, QColor (0, 255, 0)) - cc.setColor (3, QColor (0, 0, 255)) - cc.setColor (4, QColor (255, 255, 255)) + cc.setColor (0, TQColor (0, 0, 0)) + cc.setColor (1, TQColor (255, 0, 0)) + cc.setColor (2, TQColor (0, 255, 0)) + cc.setColor (3, TQColor (0, 0, 255)) + cc.setColor (4, TQColor (255, 255, 255)) cc.setGeometry (x, y + 20, 100, 20) cc.show () x = 10 y = y + 50 - dcLbl = QLabel ("KDualColorButton", self.page) + dcLbl = TQLabel ("KDualColorButton", self.page) dcLbl.setGeometry (x, y, 105, 20) dcLbl.show () - dc = KDualColorButton (QColor (255, 0, 0), QColor (0, 0, 0), self.page) + dc = KDualColorButton (TQColor (255, 0, 0), TQColor (0, 0, 0), self.page) dc.setGeometry (x, y + 20, 40, 40) dc.show () - gsLbl = QLabel ("KGradientSelector", self.page) + gsLbl = TQLabel ("KGradientSelector", self.page) gsLbl.setGeometry (x + 80, y + 30, 110, 20) gsLbl.show () gs = KGradientSelector (self.page) gs.setGeometry (x + 80, y + 50, 250, 20) - gs.setColors (QColor (255, 0, 0), QColor (255, 255, 0)) + gs.setColors (TQColor (255, 0, 0), TQColor (255, 255, 0)) gs.show () y = y + 80 - hsLbl = QLabel ("KHSSelector", self.page) + hsLbl = TQLabel ("KHSSelector", self.page) hsLbl.setGeometry (x, y, 95, 20) hsLbl.show () @@ -282,7 +282,7 @@ class Page4: y = y + 110 - ptLbl = QLabel ("KPaletteTable", self.page) + ptLbl = TQLabel ("KPaletteTable", self.page) ptLbl.setGeometry (x, y, 95, 20) ptLbl.show () @@ -298,7 +298,7 @@ class Page5: x = 10 y = 10 - rpLbl = QLabel ("KRootPermsIcon", self.page) + rpLbl = TQLabel ("KRootPermsIcon", self.page) rpLbl.setGeometry (x, y, 95, 20) rpLbl.show () @@ -306,7 +306,7 @@ class Page5: rp.setGeometry (x, y + 20, 32, 32) rp.show () - wpLbl = QLabel ("KWritePermsIcon", self.page) + wpLbl = TQLabel ("KWritePermsIcon", self.page) wpLbl.setGeometry (x + 125, y, 95, 20) wpLbl.show () @@ -316,7 +316,7 @@ class Page5: y = y + 75 - pw1Lbl = QLabel ("KPasswordEdit - echo *", self.page) + pw1Lbl = TQLabel ("KPasswordEdit - echo *", self.page) pw1Lbl.setGeometry (x, y, 150, 20) pw1Lbl.show () @@ -326,7 +326,7 @@ class Page5: y = y + 50 - pw2Lbl = QLabel ("KPasswordEdit - echo ***", self.page) + pw2Lbl = TQLabel ("KPasswordEdit - echo ***", self.page) pw2Lbl.setGeometry (x, y, 150, 20) pw2Lbl.show () @@ -336,7 +336,7 @@ class Page5: y = y + 50 - pw3Lbl = QLabel ("KPasswordEdit - no echo", self.page) + pw3Lbl = TQLabel ("KPasswordEdit - no echo", self.page) pw3Lbl.setGeometry (x, y, 150, 20) pw3Lbl.show () @@ -346,7 +346,7 @@ class Page5: y = y + 50 - urlLbl = QLabel ("KURLLabel", self.page) + urlLbl = TQLabel ("KURLLabel", self.page) urlLbl.setGeometry (x, y, 100, 20) urlLbl.show () @@ -359,11 +359,11 @@ class Page5: x = 70 y = y + 50 - bbLbl = QLabel ("KButtonBox", self.page) + bbLbl = TQLabel ("KButtonBox", self.page) bbLbl.setGeometry (x, y, 75, 20) bbLbl.show () - bbox = KButtonBox (self.page, Qt.Horizontal) + bbox = KButtonBox (self.page, TQt.Horizontal) bbox.setGeometry (x, y + 20, 300, 22) bbox.addButton ("Button 1") bbox.addButton ("Button 2") @@ -372,14 +372,14 @@ class Page5: y = y + 50 -# dbLbl = QLabel ("KDirectionButton", self.page) +# dbLbl = TQLabel ("KDirectionButton", self.page) # dbLbl.setGeometry (x, y, 95, 20) # dbLbl.show () -# dbUp = KDirectionButton (Qt.UpArrow, self.page) -# dbDown = KDirectionButton (Qt.DownArrow, self.page) -# dbRight = KDirectionButton (Qt.RightArrow, self.page) -# dbLeft = KDirectionButton (Qt.LeftArrow, self.page) +# dbUp = KDirectionButton (TQt.UpArrow, self.page) +# dbDown = KDirectionButton (TQt.DownArrow, self.page) +# dbRight = KDirectionButton (TQt.RightArrow, self.page) +# dbLeft = KDirectionButton (TQt.LeftArrow, self.page) # dbUp.setGeometry (x, y + 20, 22, 22) # dbDown.setGeometry (x + 30, y + 20, 22, 22) @@ -393,7 +393,7 @@ class Page5: x = x + 150 -# kbLbl = QLabel ("KKeyButton", self.page) +# kbLbl = TQLabel ("KKeyButton", self.page) # kbLbl.setGeometry (x, y, 95, 20) # kbLbl.show () @@ -405,14 +405,14 @@ class Page5: x = 70 y = y + 50 -# tbLbl = QLabel ("KTabButton", self.page) +# tbLbl = TQLabel ("KTabButton", self.page) # tbLbl.setGeometry (x, y, 95, 20) # tbLbl.show () -# tbUp = KTabButton (Qt.UpArrow, self.page) -# tbDown = KTabButton (Qt.DownArrow, self.page) -# tbRight = KTabButton (Qt.RightArrow, self.page) -# tbLeft = KTabButton (Qt.LeftArrow, self.page) +# tbUp = KTabButton (TQt.UpArrow, self.page) +# tbDown = KTabButton (TQt.DownArrow, self.page) +# tbRight = KTabButton (TQt.RightArrow, self.page) +# tbLeft = KTabButton (TQt.LeftArrow, self.page) # tbUp.setGeometry (x, y + 20, 22, 25) # tbDown.setGeometry (x + 30, y + 20, 22, 25) @@ -431,10 +431,10 @@ class Page6: x = 20 y = 10 - red = QColor (255, 0, 0) - green = QColor (0, 255, 0) - yellow = QColor (255, 255, 0) - blue = QColor (0, 0, 255) + red = TQColor (255, 0, 0) + green = TQColor (0, 255, 0) + yellow = TQColor (255, 255, 0) + blue = TQColor (0, 0, 255) ledcolor = [red, green, yellow, blue] ledshape = [KLed.Rectangular, KLed.Circular] @@ -456,7 +456,7 @@ class Page6: y = y + 30 y = y + 10 - toggle = QPushButton ("Toggle", self.page) + toggle = TQPushButton ("Toggle", self.page) toggle.setGeometry (150, 400, 60, 22) toggle.show () @@ -476,21 +476,21 @@ class Page7: x = 10 y = 10 - tabLbl = QLabel ("KTabCtl", self.page) + tabLbl = TQLabel ("KTabCtl", self.page) tabLbl.setGeometry (x, y, 95, 20) tabLbl.show () tab = KTabCtl (self.page) tab.setGeometry (x, y + 20, 300, 100) - page1 = QWidget (tab) - p1Lbl = QLabel ("This is page 1", page1) + page1 = TQWidget (tab) + p1Lbl = TQLabel ("This is page 1", page1) p1Lbl.setGeometry (20, 20, 100, 20) - page2 = QWidget (tab) - p2Lbl = QLabel ("This is page 2", page2) + page2 = TQWidget (tab) + p2Lbl = TQLabel ("This is page 2", page2) p2Lbl.setGeometry (50, 20, 100, 20) - page3 = QWidget (tab) - p3Lbl = QLabel ("This is page 3", page3) + page3 = TQWidget (tab) + p3Lbl = TQLabel ("This is page 3", page3) p3Lbl.setGeometry (20, 50, 100, 20) tab.addTab (page1, "Tab 1") @@ -501,7 +501,7 @@ class Page7: x = 10 y = 150 - progLbl = QLabel ("KProgress", self.page) + progLbl = TQLabel ("KProgress", self.page) progLbl.setGeometry (x, y + 50, 95, 20) progLbl.show () @@ -521,11 +521,11 @@ class Page7: self.total = 0 y = y + 150 - sepLbl = QLabel ("KSeparator", self.page) + sepLbl = TQLabel ("KSeparator", self.page) sepLbl.setGeometry (x, y, 95, 20) sepLbl.show () - sep = KSeparator (QFrame.HLine, self.page) + sep = KSeparator (TQFrame.HLine, self.page) sep.setGeometry (x, y + 20, 75, 10) sep.show () @@ -540,7 +540,7 @@ class Page7: self.p2.advance (1) if self.total < 26: - QTimer.singleShot (100, self.add1) + TQTimer.singleShot (100, self.add1) @@ -551,7 +551,7 @@ class Page8: x = 40 y = 10 - dpLbl = QLabel ("KDatePicker", self.page) + dpLbl = TQLabel ("KDatePicker", self.page) dpLbl.setGeometry (x, y, 95, 20) dpLbl.show () @@ -561,7 +561,7 @@ class Page8: y = y + 210 - dtLbl = QLabel ("KDateTable", self.page) + dtLbl = TQLabel ("KDateTable", self.page) dtLbl.setGeometry (x, y, 95, 20) dtLbl.show () @@ -576,7 +576,7 @@ class PageThisApp: x = 10 y = 10 - taLbl = QLabel ("This application uses KMainWindow as its top level widget\n and KListView in the"\ + taLbl = TQLabel ("This application uses KMainWindow as its top level widget\n and KListView in the"\ " left-hand panel", self.page) taLbl.setGeometry (x, y, 300, 60) taLbl.show () @@ -588,7 +588,7 @@ class PageNotImpl: x = 10 y = 10 - niLbl = QLabel ("Nothing is currently implemented for this widget", self.page) + niLbl = TQLabel ("Nothing is currently implemented for this widget", self.page) niLbl.setGeometry (x, y, 300, 20) niLbl.show () @@ -600,15 +600,15 @@ class CSDlg (KDialog): x = 10 y = 10 - csLbl = QLabel ("KCharSelect", self) + csLbl = TQLabel ("KCharSelect", self) csLbl.setGeometry (x, y, 95, 20) csLbl.show () - cs = KCharSelect (self, "chselect", QString.null, QChar (' '), 0) + cs = KCharSelect (self, "chselect", TQString.null, TQChar (' '), 0) cs.setGeometry (x, y + 20, 680, 250) cs.show () - closeBtn = QPushButton ("Close", self) + closeBtn = TQPushButton ("Close", self) closeBtn.setGeometry ( 610, 280, 60, 22) closeBtn.show () diff --git a/examples/uimodules/uixml.py b/examples/uimodules/uixml.py index 8dbd4d3..8e8ca8c 100644 --- a/examples/uimodules/uixml.py +++ b/examples/uimodules/uixml.py @@ -1,6 +1,6 @@ import os -from qt import QLabel +from qt import TQLabel from tdecore import KApplication @@ -11,7 +11,7 @@ class PageLaunch: x = 10 y = 10 - launchLbl = QLabel ("Launching application ... please wait\n\nClose launched application to continue", self.page) + launchLbl = TQLabel ("Launching application ... please wait\n\nClose launched application to continue", self.page) launchLbl.setGeometry (x, y, 300, 80) launchLbl.show () |