diff options
Diffstat (limited to 'examples3/i18n')
-rwxr-xr-x | examples3/i18n/i18n.py | 34 | ||||
-rw-r--r-- | examples3/i18n/mywidget.py | 24 | ||||
-rw-r--r-- | examples3/i18n/mywidget_cs.ts | 4 | ||||
-rw-r--r-- | examples3/i18n/mywidget_de.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_el.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_en.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_eo.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_fr.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_it.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_jp.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_ko.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_no.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_ru.ts | 2 | ||||
-rw-r--r-- | examples3/i18n/mywidget_zh.ts | 2 |
14 files changed, 42 insertions, 42 deletions
diff --git a/examples3/i18n/i18n.py b/examples3/i18n/i18n.py index 06cc97f..8595d0b 100755 --- a/examples3/i18n/i18n.py +++ b/examples3/i18n/i18n.py @@ -9,16 +9,16 @@ from qt import * from mywidget import MyWidget -class QVDialog(QDialog): +class TQVDialog(TQDialog): def __init__(self, parent=None, name=None, modal=0, flags=0): - QDialog.__init__(self, parent, name, modal, flags) + TQDialog.__init__(self, parent, name, modal, flags) - self.vb = QVBoxLayout(self, 8) + self.vb = TQVBoxLayout(self, 8) self.vb.setAutoAdd(1) self.hb = None self.map = {} - #self.sm = QSignalMapper(self) + #self.sm = TQSignalMapper(self) self.connect(self, PYSIGNAL('mapped(int)'), self.done) def addButtons(self, cancel=None, ok=None, mid1=None, mid2=None, mid3=None): @@ -43,8 +43,8 @@ class QVDialog(QDialog): def addButton(self, text, result): if self.hb is None: - self.hb = QHBox(self) - c = QPushButton(text, self.hb) + self.hb = TQHBox(self) + c = TQPushButton(text, self.hb) self.setMapping(c, result) self.connect(c, SIGNAL('clicked()'), self.mapit) @@ -61,13 +61,13 @@ wlist = [] # keep reference to widgets def showLang(lang): global translator - qApp.setPalette(QPalette(QColor(220-randint(0,64),220-randint(0,64),220-randint(0,64)))) + qApp.setPalette(TQPalette(TQColor(220-randint(0,64),220-randint(0,64),220-randint(0,64)))) language = "mywidget_"+lang+".qm" - fi = QFileInfo(language) + fi = TQFileInfo(language) if not fi.exists(): - QMessageBox.warning(None, "File error", + TQMessageBox.warning(None, "File error", "Cannot find translation for language: "+lang+\ "\n(try eg. 'de' or 'en')") return None @@ -76,16 +76,16 @@ def showLang(lang): qApp.removeTranslator(translator) translator = None - translator = QTranslator(None) + translator = TQTranslator(None) translator.load(language,".") qApp.installTranslator(translator) m = MyWidget() - m.setCaption("PyQt Example - i18n - " + unicode(m.caption())) + m.setCaption("PyTQt Example - i18n - " + unicode(m.caption())) wlist.append(m) return m def main(argv): - app = QApplication(argv) + app = TQApplication(argv) qm = ["cs", "de", "el", "en", "eo", "fr", "it", "jp", "ko", "no", "ru", "zh"] @@ -94,16 +94,16 @@ def main(argv): lang = argv[1] if (len(argv) != 2) or (lang == "all"): - dlg = QVDialog(None, None, 1) + dlg = TQVDialog(None, None, 1) qmb = [] r = 0 if lang == "all": r=2 else: - bg = QButtonGroup(4, Qt.Vertical, "Choose Locales", dlg) - loc = QTextCodec.locale() + bg = TQButtonGroup(4, TQt.Vertical, "Choose Locales", dlg) + loc = TQTextCodec.locale() for i in range(0,len(qm)): - qmb.append(QCheckBox(qm[i], bg)) + qmb.append(TQCheckBox(qm[i], bg)) qmb[i].setChecked(str(loc) == qm[i]) dlg.addButtons("Cancel","OK","All") r = dlg.exec_loop() @@ -138,7 +138,7 @@ def main(argv): lang = argv[1] m = showLang(lang) app.setMainWidget(m) - m.setCaption("PyQt Example - i18n") + m.setCaption("PyTQt Example - i18n") m.show() return app.exec_loop() diff --git a/examples3/i18n/mywidget.py b/examples3/i18n/mywidget.py index 60e267a..f69cebf 100644 --- a/examples3/i18n/mywidget.py +++ b/examples3/i18n/mywidget.py @@ -2,32 +2,32 @@ from qt import * -class MyWidget(QMainWindow): +class MyWidget(TQMainWindow): def __init__(self, parent=None, name=None): - QMainWindow.__init__(self, parent, name) + TQMainWindow.__init__(self, parent, name) - self.central = QVBox(self) + self.central = TQVBox(self) self.central.setMargin(5) self.central.setSpacing(5) self.setCentralWidget(self.central) self.setCaption(self.trUtf8("""Internationalization Example""")) - self.file = QPopupMenu(self) + self.file = TQPopupMenu(self) self.file.insertItem(self.trUtf8("E&xit"), qApp, SLOT("quit()"), - QKeySequence(self.trUtf8("Ctrl+Q","File|Quit"))) + TQKeySequence(self.trUtf8("Ctrl+Q","File|Quit"))) self.menuBar().insertItem(self.trUtf8("&File"), self.file) self.statusBar().message(self.trUtf8('''Language: English''')) - self.label = QLabel(self.trUtf8("The Main Window"), self.central) + self.label = TQLabel(self.trUtf8("The Main Window"), self.central) - self.gbox = QButtonGroup(1, QGroupBox.Horizontal, + self.gbox = TQButtonGroup(1, TQGroupBox.Horizontal, self.trUtf8("View"), self.central) - rb = QRadioButton(qApp.translate('MyWidget','Perspective'), self.gbox) - rb = QRadioButton(qApp.translate('MyWidget','Isometric'), self.gbox) - rb = QRadioButton(qApp.translate('MyWidget','Oblique'), self.gbox) + rb = TQRadioButton(qApp.translate('MyWidget','Perspective'), self.gbox) + rb = TQRadioButton(qApp.translate('MyWidget','Isometric'), self.gbox) + rb = TQRadioButton(qApp.translate('MyWidget','Oblique'), self.gbox) self.initChoices(self.central) @@ -38,10 +38,10 @@ class MyWidget(QMainWindow): ] def initChoices(self, parent): - self.lb = QListBox(parent) + self.lb = TQListBox(parent) for ch in self.choices: self.lb.insertItem(self.trUtf8(ch)) def closeEvent(self, e): - QWidget.closeEvent(self, e) + TQWidget.closeEvent(self, e) self.emit(PYSIGNAL('closed'), ()) diff --git a/examples3/i18n/mywidget_cs.ts b/examples3/i18n/mywidget_cs.ts index 4cf61f1..2b82f04 100644 --- a/examples3/i18n/mywidget_cs.ts +++ b/examples3/i18n/mywidget_cs.ts @@ -55,14 +55,14 @@ </message> </context> <context encoding="UTF-8"> - <name>QAccel</name> + <name>TQAccel</name> <message encoding="UTF-8"> <source>Ctrl</source> <translation type="obsolete">Ctrl</translation> </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_de.ts b/examples3/i18n/mywidget_de.ts index d114b8b..0a60c2b 100644 --- a/examples3/i18n/mywidget_de.ts +++ b/examples3/i18n/mywidget_de.ts @@ -56,7 +56,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation>OK</translation> diff --git a/examples3/i18n/mywidget_el.ts b/examples3/i18n/mywidget_el.ts index 59fb228..0d7a5dc 100644 --- a/examples3/i18n/mywidget_el.ts +++ b/examples3/i18n/mywidget_el.ts @@ -55,7 +55,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_en.ts b/examples3/i18n/mywidget_en.ts index f231669..30a6e66 100644 --- a/examples3/i18n/mywidget_en.ts +++ b/examples3/i18n/mywidget_en.ts @@ -56,7 +56,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_eo.ts b/examples3/i18n/mywidget_eo.ts index 381870d..f4eaef4 100644 --- a/examples3/i18n/mywidget_eo.ts +++ b/examples3/i18n/mywidget_eo.ts @@ -59,7 +59,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_fr.ts b/examples3/i18n/mywidget_fr.ts index a029084..3fa0191 100644 --- a/examples3/i18n/mywidget_fr.ts +++ b/examples3/i18n/mywidget_fr.ts @@ -55,7 +55,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_it.ts b/examples3/i18n/mywidget_it.ts index a450deb..4fa708c 100644 --- a/examples3/i18n/mywidget_it.ts +++ b/examples3/i18n/mywidget_it.ts @@ -59,7 +59,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_jp.ts b/examples3/i18n/mywidget_jp.ts index 2a7345f..029dd0e 100644 --- a/examples3/i18n/mywidget_jp.ts +++ b/examples3/i18n/mywidget_jp.ts @@ -55,7 +55,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_ko.ts b/examples3/i18n/mywidget_ko.ts index acc8f9b..632f8a7 100644 --- a/examples3/i18n/mywidget_ko.ts +++ b/examples3/i18n/mywidget_ko.ts @@ -55,7 +55,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_no.ts b/examples3/i18n/mywidget_no.ts index 341c664..b91293c 100644 --- a/examples3/i18n/mywidget_no.ts +++ b/examples3/i18n/mywidget_no.ts @@ -55,7 +55,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_ru.ts b/examples3/i18n/mywidget_ru.ts index 07070b0..d279ed1 100644 --- a/examples3/i18n/mywidget_ru.ts +++ b/examples3/i18n/mywidget_ru.ts @@ -55,7 +55,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> diff --git a/examples3/i18n/mywidget_zh.ts b/examples3/i18n/mywidget_zh.ts index 8b015d6..0dcb2df 100644 --- a/examples3/i18n/mywidget_zh.ts +++ b/examples3/i18n/mywidget_zh.ts @@ -55,7 +55,7 @@ </message> </context> <context> - <name>QVDialog</name> + <name>TQVDialog</name> <message> <source>OK</source> <translation type="unfinished"></translation> |