diff options
Diffstat (limited to 'examples/uimodules/uidialogs.py')
-rw-r--r-- | examples/uimodules/uidialogs.py | 62 |
1 files changed, 31 insertions, 31 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") |