diff options
Diffstat (limited to 'examples/uisampler.py')
-rw-r--r-- | examples/uisampler.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/examples/uisampler.py b/examples/uisampler.py index af61e93..211947b 100644 --- a/examples/uisampler.py +++ b/examples/uisampler.py @@ -1,7 +1,7 @@ import sys sys.path.append ("./uimodules") -from qt import QSplitter, QWidgetStack, QWidget, QListViewItem, SIGNAL, QCString , QScrollView, QRect, Qt +from qt import TQSplitter, TQWidgetStack, TQWidget, TQListViewItem, SIGNAL, TQCString , TQScrollView, TQRect, TQt from tdecore import KApplication, KCmdLineArgs, KAboutData from tdeui import KMainWindow, KListView @@ -117,12 +117,12 @@ listItems = {"Dialogs": "KSharedPixmap": [],\ "KSystemTray": [],\ "KThemeBase": ["KThemeCache", "KThemePixmap", "KThemeStyle"],\ - "QXEmbed": []}} + "TQXEmbed": []}} prefix = {"Dialogs": "dlg", "Widgets": "wid", "XML": "xml", "Menus/Toolbars": "menu", "Other": "misc"} # The following leave about 375 x 390 for the rt hand panel -mainGeom = QRect (0, 0, 640, 500) +mainGeom = TQRect (0, 0, 640, 500) treeWidth = 220 blankMsg = """ UISampler - provides examples of PyKDE widgets @@ -140,22 +140,22 @@ class MainWin (KMainWindow): # create the main view - list view on the left and an # area to display frames on the right - self.mainView = QSplitter (self, "main view") + self.mainView = TQSplitter (self, "main view") self.tree = KListView (self.mainView, "tree") - self.page = QWidgetStack (self.mainView, "page") - self.blankPage = QWidget (self.page, "blank") + self.page = TQWidgetStack (self.mainView, "page") + self.blankPage = TQWidget (self.page, "blank") self.blankPage.setGeometry (0, 0, 375, 390) - self.blankPage.setBackgroundMode (QWidget.PaletteBase) + self.blankPage.setBackgroundMode (TQWidget.PaletteBase) - blankLbl = QLabel (blankMsg, self.blankPage) + blankLbl = TQLabel (blankMsg, self.blankPage) blankLbl.setGeometry (40, 10, 380, 150) - blankLbl.setBackgroundMode (QWidget.PaletteBase) + blankLbl.setBackgroundMode (TQWidget.PaletteBase) - blankPM = QPixmap ("pytestimage.png") - pmLbl = QLabel ("", self.blankPage) + blankPM = TQPixmap ("pytestimage.png") + pmLbl = TQLabel ("", self.blankPage) pmLbl.setPixmap (blankPM) pmLbl.setGeometry (40, 160, 300, 200) - pmLbl.setBackgroundMode (QWidget.PaletteBase) + pmLbl.setBackgroundMode (TQWidget.PaletteBase) self.page.addWidget (self.blankPage, 1) self.page.raiseWidget (1) @@ -163,7 +163,7 @@ class MainWin (KMainWindow): self.setCentralWidget (self.mainView) self.initListView () - self.connect (self.tree, SIGNAL ("clicked (QListViewItem *)"), self.lvClicked) + self.connect (self.tree, SIGNAL ("clicked (TQListViewItem *)"), self.lvClicked) self.edit = None self.currentPageObj = None @@ -173,15 +173,15 @@ class MainWin (KMainWindow): # self.tree.setMaximumWidth (treeWidth) self.mainView.setSizes ([treeWidth, 375]) self.tree.setRootIsDecorated (True) - self.tree.setVScrollBarMode (QScrollView.AlwaysOn) + self.tree.setVScrollBarMode (TQScrollView.AlwaysOn) topLevel = listItems.keys () for item_1 in topLevel: - parent = QListViewItem (self.tree, item_1) + parent = TQListViewItem (self.tree, item_1) secondLevel = listItems [item_1].keys () for item_2 in secondLevel: - child = QListViewItem (parent, item_2) + child = TQListViewItem (parent, item_2) for item_3 in listItems [item_1][item_2]: - QListViewItem (child, item_3) + TQListViewItem (child, item_3) def lvClicked (self, lvItem): if not lvItem: @@ -208,9 +208,9 @@ class MainWin (KMainWindow): self.page.removeWidget (current) del current - newPage = QWidget (self.page) + newPage = TQWidget (self.page) newPage.setGeometry (0, 0, 375, 390) -# newPage.setBackgroundMode (QWidget.PaletteBase) +# newPage.setBackgroundMode (TQWidget.PaletteBase) self.page.addWidget (newPage, 2) self.page.raiseWidget (2) |