diff options
Diffstat (limited to 'examples/pykde-sampler/basic_widgets')
-rw-r--r-- | examples/pykde-sampler/basic_widgets/__init__.py | 8 | ||||
-rw-r--r-- | examples/pykde-sampler/basic_widgets/datepicker.py | 20 | ||||
-rw-r--r-- | examples/pykde-sampler/basic_widgets/historycombo.py | 26 |
3 files changed, 27 insertions, 27 deletions
diff --git a/examples/pykde-sampler/basic_widgets/__init__.py b/examples/pykde-sampler/basic_widgets/__init__.py index 8a32c63..312f629 100644 --- a/examples/pykde-sampler/basic_widgets/__init__.py +++ b/examples/pykde-sampler/basic_widgets/__init__.py @@ -4,14 +4,14 @@ 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 QFrame, QVBoxLayout +from qt import TQFrame, TQVBoxLayout from tdeui import KTextEdit -class MainFrame(QFrame): +class MainFrame(TQFrame): def __init__(self, parent=None): - QFrame.__init__(self, parent) - layout = QVBoxLayout(self) + 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 index d32fb45..b0f74c6 100644 --- a/examples/pykde-sampler/basic_widgets/datepicker.py +++ b/examples/pykde-sampler/basic_widgets/datepicker.py @@ -1,5 +1,5 @@ -from qt import QFrame, QStringList, QVBoxLayout, SIGNAL, QLabel, QSizePolicy, Qt -from qttable import QTable +from qt import TQFrame, TQStringList, TQVBoxLayout, SIGNAL, TQLabel, TQSizePolicy, TQt +from qttable import TQTable from tdeui import KTextEdit, KDatePicker, KDateWidget @@ -17,26 +17,26 @@ 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(QFrame): +class MainFrame(TQFrame): def __init__(self, parent=None): - QFrame.__init__(self, parent) + TQFrame.__init__(self, parent) self.help = KTextEdit(helpText, '', self) self.dateDisplay = KDateWidget(self) - self.dateDisplay.setSizePolicy(QSizePolicy(QSizePolicy.Maximum, - QSizePolicy.Maximum)) + self.dateDisplay.setSizePolicy(TQSizePolicy(TQSizePolicy.Maximum, + TQSizePolicy.Maximum)) self.datePicker = KDatePicker(self) - layout = QVBoxLayout(self) + layout = TQVBoxLayout(self) layout.addWidget(self.help, 1) - layout.addWidget(self.datePicker, 0, Qt.AlignHCenter) + layout.addWidget(self.datePicker, 0, TQt.AlignHCenter) layout.addStretch(1) - self.other = QLabel('Selected Date:', self) + self.other = TQLabel('Selected Date:', self) layout.addWidget(self.other, 0) layout.addWidget(self.dateDisplay, 2) - self.connect(self.datePicker, SIGNAL('dateChanged(QDate)'), + 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 index a71b72c..3b0797c 100644 --- a/examples/pykde-sampler/basic_widgets/historycombo.py +++ b/examples/pykde-sampler/basic_widgets/historycombo.py @@ -1,4 +1,4 @@ -from qt import Qt, QFrame, QHBoxLayout, QVBoxLayout, QStringList, QLabel, \ +from qt import TQt, TQFrame, TQHBoxLayout, TQVBoxLayout, TQStringList, TQLabel, \ SIGNAL, SLOT from tdeui import KHistoryCombo, KTextEdit @@ -15,37 +15,37 @@ helpText = ('An example of the KHistoryCombo widget.' 'slot to automatically add new items.') -historyText = 'a quick brown fox jumps over the lazy dog' +historyText = 'a tquick brown fox jumps over the lazy dog' -class MainFrame(QFrame): +class MainFrame(TQFrame): def __init__(self, parent=None): - QFrame.__init__(self, parent) + TQFrame.__init__(self, parent) self.help = KTextEdit(helpText, '', self) self.historyCombo = KHistoryCombo(self) - self.historySelectionLabel = QLabel('Selected value: ', self) - self.historySelection = QLabel('(none)', self) + self.historySelectionLabel = TQLabel('Selected value: ', self) + self.historySelection = TQLabel('(none)', self) - items = QStringList() + items = TQStringList() for item in historyText.split(): items.append(item) self.historyCombo.setHistoryItems(items, True) - layout = QVBoxLayout(self, 4) + layout = TQVBoxLayout(self, 4) layout.addWidget(self.help, 3) layout.addStretch(1) - selectionLayout = QHBoxLayout(layout, 4) + selectionLayout = TQHBoxLayout(layout, 4) selectionLayout.addWidget(self.historySelectionLabel, 1) - selectionLayout.addWidget(self.historySelection, 10, Qt.AlignLeft) + selectionLayout.addWidget(self.historySelection, 10, TQt.AlignLeft) layout.addWidget(self.historyCombo, 0) layout.addStretch(10) - self.connect(self.historyCombo, SIGNAL('activated(const QString& )'), - self.historyCombo, SLOT('addToHistory(const QString&)')) + 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 QString &)'), + self.connect(self.historyCombo, SIGNAL('activated(const TQString &)'), self.historySelection.setText) def historyCleared(self): |