diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2018-12-23 05:16:51 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2018-12-23 19:49:45 +0100 |
commit | cd87feaa7862351214865914cc6dd8f3814d5e16 (patch) | |
tree | 729c67ead63655d872281c7f80ca345bd39c00c1 | |
parent | 5a27393a1f5edafde2f03342bb86b746c43b21f3 (diff) | |
download | desktop-effects-tde-cd87feaa7862351214865914cc6dd8f3814d5e16.tar.gz desktop-effects-tde-cd87feaa7862351214865914cc6dd8f3814d5e16.zip |
Fix python-tqt module import.
Qt3 => TQt Conversion.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit cc9252cf8ced7cba7ebf0b34a0d71d2ab32be787)
-rw-r--r-- | DesktopEffects/DesktopEffectsDialog.py | 116 | ||||
-rwxr-xr-x | DesktopEffects/DesktopEffectsKDE.py | 8 | ||||
-rw-r--r-- | data/DesktopEffectsDialog.ui | 64 |
3 files changed, 94 insertions, 94 deletions
diff --git a/DesktopEffects/DesktopEffectsDialog.py b/DesktopEffects/DesktopEffectsDialog.py index aeff061..a4f0030 100644 --- a/DesktopEffects/DesktopEffectsDialog.py +++ b/DesktopEffects/DesktopEffectsDialog.py @@ -3,13 +3,13 @@ # Form implementation generated from reading ui file 'data/DesktopEffectsDialog.ui' # # Created: Pá lis 2 18:10:24 2007 -# by: The PyQt User Interface Compiler (pyuic) 3.17.3 +# by: The PyTQt User Interface Compiler (pyuic) 3.17.3 # # WARNING! All changes made in this file will be lost! import sys -from qt import * +from python_tqt.qt import * from tdecore import TDECmdLineArgs, TDEApplication from tdeui import * @@ -2562,149 +2562,149 @@ image2_data = [ "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt" ] -class DesktopEffectsDialog(QDialog): +class DesktopEffectsDialog(TQDialog): def __init__(self,parent = None,name = None,modal = 0,fl = 0): - QDialog.__init__(self,parent,name,modal,fl) + TQDialog.__init__(self,parent,name,modal,fl) - self.image0 = QPixmap() + self.image0 = TQPixmap() self.image0.loadFromData(image0_data,"PNG") - self.image1 = QPixmap() + self.image1 = TQPixmap() self.image1.loadFromData(image1_data,"PNG") - self.image2 = QPixmap(image2_data) + self.image2 = TQPixmap(image2_data) if not name: self.setName("DesktopEffectsDialog") - DesktopEffectsDialogLayout = QVBoxLayout(self,11,6,"DesktopEffectsDialogLayout") + DesktopEffectsDialogLayout = TQVBoxLayout(self,11,6,"DesktopEffectsDialogLayout") - layout17 = QHBoxLayout(None,0,6,"layout17") + layout17 = TQHBoxLayout(None,0,6,"layout17") - self.packageIcon = QLabel(self,"packageIcon") - self.packageIcon.setMaximumSize(QSize(32,32)) + self.packageIcon = TQLabel(self,"packageIcon") + self.packageIcon.setMaximumSize(TQSize(32,32)) self.packageIcon.setPixmap(self.image0) self.packageIcon.setScaledContents(1) layout17.addWidget(self.packageIcon) - self.packageText = QLabel(self,"packageText") + self.packageText = TQLabel(self,"packageText") layout17.addWidget(self.packageText) - self.installButton = QPushButton(self,"installButton") - self.installButton.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.installButton.sizePolicy().hasHeightForWidth())) + self.installButton = TQPushButton(self,"installButton") + self.installButton.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.installButton.sizePolicy().hasHeightForWidth())) layout17.addWidget(self.installButton) DesktopEffectsDialogLayout.addLayout(layout17) - warningLayout = QHBoxLayout(None,0,6,"warningLayout") + warningLayout = TQHBoxLayout(None,0,6,"warningLayout") - self.warningIcon = QLabel(self,"warningIcon") - self.warningIcon.setSizePolicy(QSizePolicy(QSizePolicy.Maximum,QSizePolicy.Maximum,0,0,self.warningIcon.sizePolicy().hasHeightForWidth())) + self.warningIcon = TQLabel(self,"warningIcon") + self.warningIcon.setSizePolicy(TQSizePolicy(TQSizePolicy.Maximum,TQSizePolicy.Maximum,0,0,self.warningIcon.sizePolicy().hasHeightForWidth())) self.warningIcon.setPixmap(self.image1) self.warningIcon.setScaledContents(1) warningLayout.addWidget(self.warningIcon) - self.warningText = QLabel(self,"warningText") + self.warningText = TQLabel(self,"warningText") warningLayout.addWidget(self.warningText) DesktopEffectsDialogLayout.addLayout(warningLayout) - self.effectsGroup = QButtonGroup(self,"effectsGroup") - self.effectsGroup.setColumnLayout(0,Qt.Vertical) + self.effectsGroup = TQButtonGroup(self,"effectsGroup") + self.effectsGroup.setColumnLayout(0,TQt.Vertical) self.effectsGroup.layout().setSpacing(6) self.effectsGroup.layout().setMargin(11) - effectsGroupLayout = QVBoxLayout(self.effectsGroup.layout()) - effectsGroupLayout.setAlignment(Qt.AlignTop) + effectsGroupLayout = TQVBoxLayout(self.effectsGroup.layout()) + effectsGroupLayout.setAlignment(TQt.AlignTop) - layout5 = QHBoxLayout(None,0,6,"layout5") + layout5 = TQHBoxLayout(None,0,6,"layout5") - layout4 = QVBoxLayout(None,0,6,"layout4") + layout4 = TQVBoxLayout(None,0,6,"layout4") - self.radioButton4 = QRadioButton(self.effectsGroup,"radioButton4") + self.radioButton4 = TQRadioButton(self.effectsGroup,"radioButton4") layout4.addWidget(self.radioButton4) - self.noEffectsText = QLabel(self.effectsGroup,"noEffectsText") + self.noEffectsText = TQLabel(self.effectsGroup,"noEffectsText") layout4.addWidget(self.noEffectsText) layout5.addLayout(layout4) - self.noEffectsImage = QLabel(self.effectsGroup,"noEffectsImage") - self.noEffectsImage.setSizePolicy(QSizePolicy(QSizePolicy.Maximum,QSizePolicy.Maximum,0,0,self.noEffectsImage.sizePolicy().hasHeightForWidth())) - self.noEffectsImage.setMaximumSize(QSize(150,80)) + self.noEffectsImage = TQLabel(self.effectsGroup,"noEffectsImage") + self.noEffectsImage.setSizePolicy(TQSizePolicy(TQSizePolicy.Maximum,TQSizePolicy.Maximum,0,0,self.noEffectsImage.sizePolicy().hasHeightForWidth())) + self.noEffectsImage.setMaximumSize(TQSize(150,80)) self.noEffectsImage.setPixmap(self.image2) self.noEffectsImage.setScaledContents(1) layout5.addWidget(self.noEffectsImage) effectsGroupLayout.addLayout(layout5) - layout5_2 = QHBoxLayout(None,0,6,"layout5_2") + layout5_2 = TQHBoxLayout(None,0,6,"layout5_2") - layout4_2 = QVBoxLayout(None,0,6,"layout4_2") + layout4_2 = TQVBoxLayout(None,0,6,"layout4_2") - self.radioButton4_2 = QRadioButton(self.effectsGroup,"radioButton4_2") + self.radioButton4_2 = TQRadioButton(self.effectsGroup,"radioButton4_2") layout4_2.addWidget(self.radioButton4_2) - self.standardEffectsText = QLabel(self.effectsGroup,"standardEffectsText") + self.standardEffectsText = TQLabel(self.effectsGroup,"standardEffectsText") layout4_2.addWidget(self.standardEffectsText) layout5_2.addLayout(layout4_2) - self.standardEffectsImage = QLabel(self.effectsGroup,"standardEffectsImage") - self.standardEffectsImage.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.standardEffectsImage.sizePolicy().hasHeightForWidth())) - self.standardEffectsImage.setMaximumSize(QSize(150,80)) + self.standardEffectsImage = TQLabel(self.effectsGroup,"standardEffectsImage") + self.standardEffectsImage.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.standardEffectsImage.sizePolicy().hasHeightForWidth())) + self.standardEffectsImage.setMaximumSize(TQSize(150,80)) self.standardEffectsImage.setPixmap(self.image2) self.standardEffectsImage.setScaledContents(1) layout5_2.addWidget(self.standardEffectsImage) effectsGroupLayout.addLayout(layout5_2) - layout5_3 = QHBoxLayout(None,0,6,"layout5_3") + layout5_3 = TQHBoxLayout(None,0,6,"layout5_3") - layout4_3 = QVBoxLayout(None,0,6,"layout4_3") + layout4_3 = TQVBoxLayout(None,0,6,"layout4_3") - self.radioButton4_3 = QRadioButton(self.effectsGroup,"radioButton4_3") + self.radioButton4_3 = TQRadioButton(self.effectsGroup,"radioButton4_3") layout4_3.addWidget(self.radioButton4_3) - self.extraEffectsText = QLabel(self.effectsGroup,"extraEffectsText") + self.extraEffectsText = TQLabel(self.effectsGroup,"extraEffectsText") layout4_3.addWidget(self.extraEffectsText) layout5_3.addLayout(layout4_3) - self.extraEffectsImage = QLabel(self.effectsGroup,"extraEffectsImage") - self.extraEffectsImage.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.extraEffectsImage.sizePolicy().hasHeightForWidth())) - self.extraEffectsImage.setMaximumSize(QSize(150,80)) + self.extraEffectsImage = TQLabel(self.effectsGroup,"extraEffectsImage") + self.extraEffectsImage.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.extraEffectsImage.sizePolicy().hasHeightForWidth())) + self.extraEffectsImage.setMaximumSize(TQSize(150,80)) self.extraEffectsImage.setPixmap(self.image2) self.extraEffectsImage.setScaledContents(1) layout5_3.addWidget(self.extraEffectsImage) effectsGroupLayout.addLayout(layout5_3) - layout5_3_2 = QHBoxLayout(None,0,6,"layout5_3_2") + layout5_3_2 = TQHBoxLayout(None,0,6,"layout5_3_2") - layout4_3_2 = QVBoxLayout(None,0,6,"layout4_3_2") + layout4_3_2 = TQVBoxLayout(None,0,6,"layout4_3_2") - self.radioButton4_3_2 = QRadioButton(self.effectsGroup,"radioButton4_3_2") + self.radioButton4_3_2 = TQRadioButton(self.effectsGroup,"radioButton4_3_2") layout4_3_2.addWidget(self.radioButton4_3_2) - self.customEffectsText = QLabel(self.effectsGroup,"customEffectsText") + self.customEffectsText = TQLabel(self.effectsGroup,"customEffectsText") layout4_3_2.addWidget(self.customEffectsText) layout5_3_2.addLayout(layout4_3_2) - self.customEffectsImage = QLabel(self.effectsGroup,"customEffectsImage") - self.customEffectsImage.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.customEffectsImage.sizePolicy().hasHeightForWidth())) - self.customEffectsImage.setMaximumSize(QSize(150,80)) + self.customEffectsImage = TQLabel(self.effectsGroup,"customEffectsImage") + self.customEffectsImage.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.customEffectsImage.sizePolicy().hasHeightForWidth())) + self.customEffectsImage.setMaximumSize(TQSize(150,80)) self.customEffectsImage.setPixmap(self.image2) self.customEffectsImage.setScaledContents(1) layout5_3_2.addWidget(self.customEffectsImage) effectsGroupLayout.addLayout(layout5_3_2) DesktopEffectsDialogLayout.addWidget(self.effectsGroup) - layout12 = QHBoxLayout(None,0,6,"layout12") - spacer4 = QSpacerItem(530,31,QSizePolicy.Expanding,QSizePolicy.Minimum) + layout12 = TQHBoxLayout(None,0,6,"layout12") + spacer4 = TQSpacerItem(530,31,TQSizePolicy.Expanding,TQSizePolicy.Minimum) layout12.addItem(spacer4) - self.applyButton = QPushButton(self,"applyButton") + self.applyButton = TQPushButton(self,"applyButton") layout12.addWidget(self.applyButton) - self.cancelButton = QPushButton(self,"cancelButton") + self.cancelButton = TQPushButton(self,"cancelButton") layout12.addWidget(self.cancelButton) DesktopEffectsDialogLayout.addLayout(layout12) self.languageChange() - self.resize(QSize(697,527).expandedTo(self.minimumSizeHint())) - self.clearWState(Qt.WState_Polished) + self.resize(TQSize(697,527).expandedTo(self.minimumSizeHint())) + self.clearWState(TQt.WState_Polished) self.connect(self.installButton,SIGNAL("clicked()"),self.installButtonClicked) self.connect(self.radioButton4,SIGNAL("clicked()"),self.noEffects) @@ -2722,7 +2722,7 @@ class DesktopEffectsDialog(QDialog): self.warningText.setText(self.__tr("Desktop Effects are a great way to enjoy a modern desktop experience without transitioning to KDE4")) self.effectsGroup.setTitle(self.__tr("Effects Level")) self.radioButton4.setText(self.__tr("No Effects")) - self.noEffectsText.setText(self.__tr("All effects are disabled and KDE Window manager is used.\n" + self.noEffectsText.setText(self.__tr("All effects are disabled and TDE Window manager is used.\n" "This is the default behaviour.")) self.radioButton4_2.setText(self.__tr("Standard Effects")) self.standardEffectsText.setText(self.__tr("A compromise between usability and efficiency.")) @@ -2770,7 +2770,7 @@ if __name__ == "__main__": TDECmdLineArgs.init (sys.argv, appname, description, version) a = TDEApplication () - QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()")) + TQObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()")) w = DesktopEffectsDialog() a.setMainWidget(w) w.show() diff --git a/DesktopEffects/DesktopEffectsKDE.py b/DesktopEffects/DesktopEffectsKDE.py index 1a42fb3..20d2a53 100755 --- a/DesktopEffects/DesktopEffectsKDE.py +++ b/DesktopEffects/DesktopEffectsKDE.py @@ -20,7 +20,7 @@ import sys import os from optparse import OptionParser -from qt import * +from python_tqt.qt import * from tdeui import * from tdecore import * # for adept batch launching @@ -65,9 +65,9 @@ class DesktopEffectsKDE(DesktopEffectsDialog, DesktopEffectsCommon): self.action = 0 # set the screenshot pictures - self.noEffectsImage.setPixmap(QPixmap("./data/noeffects.png")) - self.standardEffectsImage.setPixmap(QPixmap("./data/standardeffects.png")) - self.extraEffectsImage.setPixmap(QPixmap("./data/extraeffects.png")) + self.noEffectsImage.setPixmap(TQPixmap("./data/noeffects.png")) + self.standardEffectsImage.setPixmap(TQPixmap("./data/standardeffects.png")) + self.extraEffectsImage.setPixmap(TQPixmap("./data/extraeffects.png")) # set the translations & icons # Apply diff --git a/data/DesktopEffectsDialog.ui b/data/DesktopEffectsDialog.ui index 1c706b6..1cc17bd 100644 --- a/data/DesktopEffectsDialog.ui +++ b/data/DesktopEffectsDialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DesktopEffectsDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>DesktopEffectsDialog</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout17</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>packageIcon</cstring> </property> @@ -44,7 +44,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>packageText</cstring> </property> @@ -52,7 +52,7 @@ <string>In order for Compiz Desktop Effects to work, the Compiz engine must be installed on your system.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>installButton</cstring> </property> @@ -70,7 +70,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>warningLayout</cstring> </property> @@ -78,7 +78,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>warningIcon</cstring> </property> @@ -97,7 +97,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>warningText</cstring> </property> @@ -107,7 +107,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>effectsGroup</cstring> </property> @@ -118,7 +118,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout5</cstring> </property> @@ -126,7 +126,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4</cstring> </property> @@ -134,7 +134,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton4</cstring> </property> @@ -142,7 +142,7 @@ <string>No Effects</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>noEffectsText</cstring> </property> @@ -153,7 +153,7 @@ This is the default behaviour.</string> </widget> </vbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>noEffectsImage</cstring> </property> @@ -180,7 +180,7 @@ This is the default behaviour.</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout5_2</cstring> </property> @@ -188,7 +188,7 @@ This is the default behaviour.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4_2</cstring> </property> @@ -196,7 +196,7 @@ This is the default behaviour.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton4_2</cstring> </property> @@ -204,7 +204,7 @@ This is the default behaviour.</string> <string>Standard Effects</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>standardEffectsText</cstring> </property> @@ -214,7 +214,7 @@ This is the default behaviour.</string> </widget> </vbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>standardEffectsImage</cstring> </property> @@ -241,7 +241,7 @@ This is the default behaviour.</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout5_3</cstring> </property> @@ -249,7 +249,7 @@ This is the default behaviour.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4_3</cstring> </property> @@ -257,7 +257,7 @@ This is the default behaviour.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton4_3</cstring> </property> @@ -265,7 +265,7 @@ This is the default behaviour.</string> <string>Extra Effects</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>extraEffectsText</cstring> </property> @@ -276,7 +276,7 @@ newer graphic card.</string> </widget> </vbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>extraEffectsImage</cstring> </property> @@ -303,7 +303,7 @@ newer graphic card.</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout5_3_2</cstring> </property> @@ -311,7 +311,7 @@ newer graphic card.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4_3_2</cstring> </property> @@ -319,7 +319,7 @@ newer graphic card.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton4_3_2</cstring> </property> @@ -327,7 +327,7 @@ newer graphic card.</string> <string>Custom Effects</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>customEffectsText</cstring> </property> @@ -337,7 +337,7 @@ newer graphic card.</string> </widget> </vbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>customEffectsImage</cstring> </property> @@ -366,7 +366,7 @@ newer graphic card.</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout12</cstring> </property> @@ -391,7 +391,7 @@ newer graphic card.</string> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>applyButton</cstring> </property> @@ -399,7 +399,7 @@ newer graphic card.</string> <string>Apply</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>cancelButton</cstring> </property> |