summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--displayconfig-TODO135
-rw-r--r--grubconfig/grubconfig.py124
-rwxr-xr-xpowermanager/guidance-power-manager.py99
-rw-r--r--powermanager/guidance_power_manager_ui.ui68
-rw-r--r--powermanager/notify.ui10
-rw-r--r--powermanager/tooltip.ui4
-rwxr-xr-xserviceconfig/serviceconfig.py96
-rwxr-xr-xuserconfig/userconfig.py1
-rwxr-xr-xwineconfig/firstrunwizard.py108
-rw-r--r--wineconfig/kcm_wineconfig.cpp66
-rwxr-xr-xwineconfig/wineconfig.py691
11 files changed, 655 insertions, 747 deletions
diff --git a/displayconfig-TODO b/displayconfig-TODO
deleted file mode 100644
index 926f7d9..0000000
--- a/displayconfig-TODO
+++ /dev/null
@@ -1,135 +0,0 @@
-* How many cards do we have? autodetection?
-* Is our card a dualhead card?
-* How many monitors are connected?
-
-* difference between one and two card is different device sections
-* twinview has one device, one screen, one serverlayout
-* xinerama has two devices, two screens, two monitors
-
-twinview <> xinerama:
- all sections double
-
-one or two cards:
- different device sections
-
-one or two monitors
- ?? one or two cards
- ?? twinview or xinerama (driver? different resolutions?)
-
-
-class XSetup(Object):
- Screens[] getScreens()
- bool maySetDualhead()
- getUseDualhead()
- setUseDualhead(bool)
- (xoff,yoff) getDualheadPosition() # offset from screen 1 top left corner.
- setDualheadOrientation(xoff,yoff)
-
- bool is3DAccelerated()
-
- GFXCard[] getGFXCards()
-
-
-class Screen(Object):
- maySetResolution()
- Resolution[] getAvailableResolutions()
- getResolution()
- setResolution(Resolution)
-
- maySetRefresh()
- int getRefreshRate()
- setRefreshRate(int)
-
- maySetRotation()
- getRotation()
- getAvailableRotations()
- setRotation()
-
- bool isAvailableMirrorHorizontal()
- getMirrorHorizontal()
- setMirrorHorizontal()
- bool isAvailableMirrorVertical()
- getMirrorVertical()
- setMirrorVertical()
-
-class Resolution(Object):
- int getWidth()
- int getHeight()
- int[] getRefreshRates():
-
-
-
-* What is the current setup? (Xinerama? Singlehead? Twinview?)
-
-- Warning: Xinerama vs. DRI
- * "unlinking" the sliders will yield a warning "Using different
- resolutions on the screens will disable 3D hardware acceleration on
- the second head", which is a Xinerama deficiency).
-
- Note: Probably only Ati and nvidia do support mergedFB properly, other
- drivers might lose xinerama features like placement and maximize
-
-- Drag and drop widget
- * The fun part: implementing a Drag and Drop widget where the (resizing)
- screens can be dragged into their respective relative position,
- "snapping" in the more obvious ones, i.e. plain "left of" and "right
- of", "above" and "under" (without offset).
-
-
-- displayconfig.MonitorPreview:
- Singleheadpreview: Monitor keeps size
- DualheadPreview: like now, monitor resizes to show relative screen size
-
-Displayconfig; Notes abstractielaag
--------------------------------------
-* een XSetup heeft N gfxcards.
-* een GfxCard heeft N Monitors
-* XSetup is een container voor alle objecten uit de abstractielaag.
-* XSetup.addMonitor(monitor,gfxcard) waarbij gfxcard al in XSetup zit en een
- referentie naar de kaart vormt waarop monitor is aangesloten.
-* Een Adaptor heeft een 1:1 relatie met een monitor, en is 'onderdeel' van
- een "Screen" (in de zin van Screen section uit xorg.conf)
-* Controls zoals resize en de rotatie / mirroring widgets manipuleren een
- Adaptor, die intern de Screen manipuleert
-* Singlehead resolutie verandert via xrandr en slaat settings op via
- displayconfig-restore.py
-* Dualhead resolutie aanpassen pakt intern een passende metamode (bij twinview)
- en checkt of alle zinvolle metamodes beschikbaar zijn, anders wordt de user
- gewaarschuwd dat dit eerst moet gebeuren.
-* Adaptor in dualhead / twinview modus worden dus naar een screen vertaald
- metamodes heeft.
-* Screen moet dan nog support voor metamodes krijgen.
-
-
-
-displayconfig:
-===============
-* Current resolution doesn't get recognized if current != highest resolution
-* new tab display powermanagement, just like the existing tab, we need to be
- able to at least replace existing functionality
-
-
-New Widgets:
--------------
-* DualheadPreview
-* RadioButtons instead of dropdown for Positioning
-
-* Detect if we're already running on dualhead, (en|dis)able widgets accordingly
-* Nvidia MergedFB
- - Make preview of dualhead more clear (only xinerama or also mergedFB?)
- - Generate list of Metamodes from resolutions available
- - write dualhead settings to xorg.conf
-* Compare dualhead with different drivers WRT xorg.conf
- - generic Xinerama (Matrox, others?)
- - dualhead for fglrx, SiS ...
- - MergedFB as special case for nvidia (sis?)
-* Preview should be rotatable (and|or) resizable (and|or) DualHeadpreview?
-* Add missing elements to DualHeadTab
- - [ ] Use MergedFB (binds two resolution sliders)
- - label with warning "You can only use DRI on one head with different resolutions blahblah"
-FIXME: enabling Dualhead should:
- - Update resolutions with "metamodes"
- - disable Rotation/mirroring stuff
- - Add ServerLayout to xorg.conf
- - Add second Screen to xorg.conf
- - Alternatively (if both resolutions are the same enable MergedFB
diff --git a/grubconfig/grubconfig.py b/grubconfig/grubconfig.py
index 5b26ab3..bcdf323 100644
--- a/grubconfig/grubconfig.py
+++ b/grubconfig/grubconfig.py
@@ -16,14 +16,26 @@
# #
###########################################################################
-
+import sys
+import os
+import os.path
+# Trinity-specific paths
+tqt_modules = []
+for m_path in sys.path:
+ if os.path.exists(os.path.join(m_path, 'sip4_tqt')):
+ m_sip_dir = os.path.join(m_path, 'sip4_tqt')
+ tqt_modules.insert(0, m_sip_dir)
+ if os.path.exists(os.path.join(m_path, 'python_tqt')):
+ m_pyqt_dir = os.path.join(m_path, 'python_tqt')
+ tqt_modules.insert(0, m_pyqt_dir)
+for m_path in tqt_modules:
+ sys.path.insert(0, m_path)
from qt import *
from tdeui import *
from tdecore import *
from tdefile import *
-import sys, os, string, re
-import os.path
+import string, re
import shutil
import locale
import tempfile
@@ -48,7 +60,7 @@ cat3 = ["kernel"]
class GreyListViewItem(TDEListViewItem):
def paintCell(self, p, cg, column, width, align ):
cgGrey = cg
- cgGrey.setColor(QColorGroup.Text,QColor("grey"))
+ cgGrey.setColor(TQColorGroup.Text,TQColor("grey"))
TDEListViewItem.paintCell(self, p, cgGrey, column, width, align)
cg.restore()
@@ -81,19 +93,19 @@ class GrubConfigAppClass(programbase):
# - GRUB Options Tab -
if standalone:
usershbox = self.addHBoxPage(i18n("Grub Options"))
- vbox = QVBox(usershbox)
+ vbox = TQVBox(usershbox)
else:
- vbox = QVBox(tabcontrol)
+ vbox = TQVBox(tabcontrol)
vbox.setMargin(KDialog.marginHint())
# -- Operating Systems List & MakeDefault Button --
- horizontalbox = QHBox(vbox)
+ horizontalbox = TQHBox(vbox)
self.itemslistview = TDEListView(horizontalbox)
self.itemslistview.addColumn("")
self.itemslistview.setSorting(-1)
self.itemslistview.header().hide()
self.itemslistviewitems = []
- arrowsbox = QVBox(horizontalbox)
+ arrowsbox = TQVBox(horizontalbox)
self.upbutton = KPushButton(i18n("Move Up"),arrowsbox)
self.connect(self.upbutton,SIGNAL("clicked()"),self.slotUpButtonClicked)
@@ -105,88 +117,88 @@ class GrubConfigAppClass(programbase):
# -- Boot Options Group Box --
- bootoptionsbasebox = QVGroupBox(vbox,"Boot Options")
+ bootoptionsbasebox = TQVGroupBox(vbox,"Boot Options")
bootoptionsbasebox.setTitle(i18n("Boot Options"));
- bootoptionsbasevbox = QWidget(bootoptionsbasebox)
+ bootoptionsbasevbox = TQWidget(bootoptionsbasebox)
- infogrid = QGridLayout(bootoptionsbasevbox,3,2)
+ infogrid = TQGridLayout(bootoptionsbasevbox,3,2)
infogrid.setSpacing(KDialog.spacingHint())
# --- Timeout ---
- label = QLabel(i18n("Timeout:"),bootoptionsbasevbox)
+ label = TQLabel(i18n("Timeout:"),bootoptionsbasevbox)
infogrid.addWidget(label,0,0)
- timeoutbox = QHBox(bootoptionsbasevbox)
+ timeoutbox = TQHBox(bootoptionsbasevbox)
timeoutbox.setSpacing(KDialog.spacingHint())
self.timeout = KIntSpinBox(timeoutbox,"Timeout")
if "timeout" in self.globalvars:
self.timeout.setValue(int(self.globalvars['timeout'][0]))
- label = QLabel(i18n("seconds"),timeoutbox)
+ label = TQLabel(i18n("seconds"),timeoutbox)
infogrid.addWidget(timeoutbox,0,1)
infogrid.addWidget(self.timeout,0,1)
# --- Hide Menu on Boot ---
- self.hidemenuonboot = QCheckBox(i18n("Hide Menu on Boot"),bootoptionsbasevbox)
+ self.hidemenuonboot = TQCheckBox(i18n("Hide Menu on Boot"),bootoptionsbasevbox)
if 'hiddenmenu' in self.globalvars:
self.hidemenuonboot.setChecked(int(self.globalvars['hiddenmenu'][0]))
infogrid.addWidget(self.hidemenuonboot,1,1)
# --- Make Last OS Default ---
- self.lastdefault = QCheckBox(i18n("Make Last Operating System Default"),bootoptionsbasevbox)
+ self.lastdefault = TQCheckBox(i18n("Make Last Operating System Default"),bootoptionsbasevbox)
infogrid.addWidget(self.lastdefault,2,1)
# -- Security Group Box --
- securitybox = QVGroupBox(vbox,"Security")
+ securitybox = TQVGroupBox(vbox,"Security")
securitybox.setTitle(i18n("Security"));
- securityvbox = QWidget(securitybox)
+ securityvbox = TQWidget(securitybox)
- infogrid = QGridLayout(securityvbox,2,2)
+ infogrid = TQGridLayout(securityvbox,2,2)
infogrid.setSpacing(KDialog.spacingHint())
# --- Password ---
- label = QLabel(i18n("Password:"),securityvbox)
+ label = TQLabel(i18n("Password:"),securityvbox)
infogrid.addWidget(label,0,0)
self.userpassword = KPasswordEdit(securityvbox)
infogrid.addWidget(self.userpassword,0,1)
# --- Repeat Password ---
- label = QLabel(i18n("Repeat Password:"),securityvbox)
+ label = TQLabel(i18n("Repeat Password:"),securityvbox)
infogrid.addWidget(label,1,0)
self.userrepeatpassword = KPasswordEdit(securityvbox)
infogrid.addWidget(self.userrepeatpassword,1,1)
# -- Splash Screen Group Box --
- splashbox = QVGroupBox(vbox,"Splash screen")
+ splashbox = TQVGroupBox(vbox,"Splash screen")
splashbox.setTitle(i18n("Splash screen"));
# --- Background Color ---
- labelandeditbox = QHBox(splashbox)
- label = QLabel(i18n("Background Color:"),labelandeditbox)
- self.backgroundcolor = QComboBox(labelandeditbox)
+ labelandeditbox = TQHBox(splashbox)
+ label = TQLabel(i18n("Background Color:"),labelandeditbox)
+ self.backgroundcolor = TQComboBox(labelandeditbox)
# --- Highlight Color ---
- labelandeditbox = QHBox(splashbox)
- label = QLabel(i18n("Highlight Color:"),labelandeditbox)
- self.highlightcolor = QComboBox(labelandeditbox)
+ labelandeditbox = TQHBox(splashbox)
+ label = TQLabel(i18n("Highlight Color:"),labelandeditbox)
+ self.highlightcolor = TQComboBox(labelandeditbox)
# - Operating Systems Tab -
if standalone:
groupsvbox = self.addVBoxPage(i18n("Operating Systems"))
- vb = QVBox(groupsvbox)
+ vb = TQVBox(groupsvbox)
else:
- groupsvbox = QVBox(tabcontrol)
+ groupsvbox = TQVBox(tabcontrol)
roupsvbox.setMargin(KDialog.marginHint())
- vb = QVBox(groupsvbox)
+ vb = TQVBox(groupsvbox)
# -- Operating Systems List --
- horizontalbox = QHBox(vb)
+ horizontalbox = TQHBox(vb)
self.oslistview = TDEListView(horizontalbox)
self.oslistview.addColumn("")
self.oslistview.addColumn("")
@@ -196,72 +208,72 @@ class GrubConfigAppClass(programbase):
self.connect(self.oslistview,SIGNAL("selectionChanged()"),self.oslistviewitemSelected)
# -- Operating Systems Details Box --
- osdetailsbox = QVGroupBox(vb,"Operating System Details")
- # label = QLabel(i18n("Security"),securitybox)
- detailsvbox = QWidget(osdetailsbox)
+ osdetailsbox = TQVGroupBox(vb,"Operating System Details")
+ # label = TQLabel(i18n("Security"),securitybox)
+ detailsvbox = TQWidget(osdetailsbox)
- infogrid = QGridLayout(detailsvbox,7,2)
+ infogrid = TQGridLayout(detailsvbox,7,2)
infogrid.setSpacing(KDialog.spacingHint())
osdetailsbox.setTitle(i18n("Operating System Details"));
# --- List in GRUB Menu ---
- self.listingrub = QCheckBox(i18n("List in GRUB Menu"),detailsvbox)
+ self.listingrub = TQCheckBox(i18n("List in GRUB Menu"),detailsvbox)
infogrid.addWidget(self.listingrub,0,1)
# --- Display Name ---
- label = QLabel(i18n("Display Name:"),detailsvbox)
+ label = TQLabel(i18n("Display Name:"),detailsvbox)
infogrid.addWidget(label,1,0)
- self.displaynamelabel = QLineEdit("",detailsvbox)
+ self.displaynamelabel = TQLineEdit("",detailsvbox)
infogrid.addWidget(self.displaynamelabel,1,1)
- self.connect(self.displaynamelabel,SIGNAL("textChanged(const QString &)"),self.slotDisplayNameLabelChanged)
+ self.connect(self.displaynamelabel,SIGNAL("textChanged(const TQString &)"),self.slotDisplayNameLabelChanged)
# --- Operating System ---
- label = QLabel(i18n("Operating System:"),detailsvbox)
+ label = TQLabel(i18n("Operating System:"),detailsvbox)
infogrid.addWidget(label,2,0)
- self.operatingsystem = QComboBox(detailsvbox)
+ self.operatingsystem = TQComboBox(detailsvbox)
infogrid.addWidget(self.operatingsystem,2,1)
# --- Kernel ---
- label = QLabel(i18n("Kernel:"),detailsvbox)
+ label = TQLabel(i18n("Kernel:"),detailsvbox)
infogrid.addWidget(label,3,0)
self.kernel = KURLRequester(detailsvbox)
infogrid.addWidget(self.kernel,3,1)
# --- Failsafe Kernel ---
# not sure if that is possible - requested by seele
- label = QLabel(i18n("Failsafe Kernel:"),detailsvbox)
+ label = TQLabel(i18n("Failsafe Kernel:"),detailsvbox)
infogrid.addWidget(label,4,0)
- self.failsafekernel = QComboBox(detailsvbox)
+ self.failsafekernel = TQComboBox(detailsvbox)
infogrid.addWidget(self.failsafekernel,4,1)
# --- Initial RAM Disk ---
- label = QLabel(i18n("Initial RAM Disk:"),detailsvbox)
+ label = TQLabel(i18n("Initial RAM Disk:"),detailsvbox)
infogrid.addWidget(label,5,0)
self.initrd = KURLRequester(detailsvbox)
infogrid.addWidget(self.initrd,5,1)
# --- Root Filesystem ---
- label = QLabel(i18n("Root Filesystem:"),detailsvbox)
+ label = TQLabel(i18n("Root Filesystem:"),detailsvbox)
infogrid.addWidget(label,6,0)
- self.rootfilesystem = QComboBox(detailsvbox)
+ self.rootfilesystem = TQComboBox(detailsvbox)
infogrid.addWidget(self.rootfilesystem,6,1)
# -- Boot Options Box --
- bootoptionsbox = QVGroupBox(vb,"Boot Options")
- # label = QLabel(i18n("Security"),securitybox)
+ bootoptionsbox = TQVGroupBox(vb,"Boot Options")
+ # label = TQLabel(i18n("Security"),securitybox)
bootoptionsbox.setTitle(i18n("Boot Options"));
- self.acpibox = QCheckBox(i18n("Power Management (ACPI) "),bootoptionsbox)
- self.debugbox = QCheckBox(i18n("Debugging Messages "),bootoptionsbox)
- self.selinuxbox = QCheckBox(i18n("SELinux Support "),bootoptionsbox)
- self.splashbox = QCheckBox(i18n("Splash Screen"),bootoptionsbox)
+ self.acpibox = TQCheckBox(i18n("Power Management (ACPI) "),bootoptionsbox)
+ self.debugbox = TQCheckBox(i18n("Debugging Messages "),bootoptionsbox)
+ self.selinuxbox = TQCheckBox(i18n("SELinux Support "),bootoptionsbox)
+ self.splashbox = TQCheckBox(i18n("Splash Screen"),bootoptionsbox)
- labelandeditbox = QHBox(bootoptionsbox)
- label = QLabel(i18n("Custom Options:"),labelandeditbox)
+ labelandeditbox = TQHBox(bootoptionsbox)
+ label = TQLabel(i18n("Custom Options:"),labelandeditbox)
self.customoptions = KLineEdit("",labelandeditbox)
# -- (static) UI finished --
diff --git a/powermanager/guidance-power-manager.py b/powermanager/guidance-power-manager.py
index cef7e52..aeccf2f 100755
--- a/powermanager/guidance-power-manager.py
+++ b/powermanager/guidance-power-manager.py
@@ -22,8 +22,8 @@ Specification at https://wiki.kubuntu.org/KubuntuPowerManagement
Issues:
- We have to keep polling HAL rather than listening for signals because the Python DBUS bindings
- don't have Qt mainloop integration
- - Written in Python so will be slow to load up, will probably port to C++ Qt 4.2 in future
+ don't have TQt mainloop integration
+ - Written in Python so will be slow to load up, will probably port to C++ TQt 4.2 in future
- Should also handle UPS and bluetooth batteries
- systray applet should be hidden if no battery, but then how do you suspend if no battery?
(ksmserver integration please)
@@ -32,8 +32,21 @@ Issues:
- dcop calls need patch to dcopexport.py, already submitted upstream
"""
-import os
import sys
+import os
+import os.path
+# Trinity-specific paths
+tqt_modules = []
+for m_path in sys.path:
+ if os.path.exists(os.path.join(m_path, 'sip4_tqt')):
+ m_sip_dir = os.path.join(m_path, 'sip4_tqt')
+ tqt_modules.insert(0, m_sip_dir)
+ if os.path.exists(os.path.join(m_path, 'python_tqt')):
+ m_pyqt_dir = os.path.join(m_path, 'python_tqt')
+ tqt_modules.insert(0, m_pyqt_dir)
+for m_path in tqt_modules:
+ sys.path.insert(0, m_path)
+
import subprocess
import dbus
@@ -69,7 +82,7 @@ class Notify(NotifyWidget):
def setCaption(self,caption):
""" Text to show in bold letters. """
- self.Caption.setText(QString("<b>")+caption+QString("</b>"))
+ self.Caption.setText(TQString("<b>")+caption+QString("</b>"))
def setText(self,msg):
"""" Set actual notification message. """
@@ -87,7 +100,7 @@ class PowerManager(PowerManagerUI):
# therefore, it gets our parent as parent.
self.systray = KSystemTray(parent)
self.icon = "battery-charging-100"
- self.systray.setPixmap(QPixmap(UserIcon(self.icon)))
+ self.systray.setPixmap(TQPixmap(UserIcon(self.icon)))
self.connect(self.systray, SIGNAL("quitSelected()"), self.quit)
# Configuration filename
@@ -110,7 +123,7 @@ class PowerManager(PowerManagerUI):
# Polling: evil. can't receive signals in python-dbus unless we have a glib mainloop,
# so we need to poll
- self.pollTimer = QTimer(self)
+ self.pollTimer = TQTimer(self)
self.connect(self.pollTimer, SIGNAL("timeout()"), self.poll)
self.pollTimer.start(POLL_INTERVAL) # 5 second poll, maybe make this configurable
self.poll(False)
@@ -136,20 +149,20 @@ class PowerManager(PowerManagerUI):
self.LaptopLidRadios.setEnabled(False)
def _initCB(self, combo, options, values):
- """ Initialize QComboBox with proper values from provided options. """
+ """ Initialize TQComboBox with proper values from provided options. """
combo.clear()
for option in options:
combo.insertItem(values[option])
def _getCB(self, combo, options):
- """ Get current item from QComboBox from config file (string) value. """
+ """ Get current item from TQComboBox from config file (string) value. """
try:
return options[combo.currentItem()]
except IndexError:
return ""
def _setCB(self, combo, options, default, value):
- """ Set current item in QComboBox from string value. """
+ """ Set current item in TQComboBox from string value. """
try:
num = options.index(value)
except ValueError:
@@ -158,14 +171,14 @@ class PowerManager(PowerManagerUI):
combo.setCurrentItem(num)
def _getRB(self, radios, options):
- """ Get current item from QRadioButton from config file (string) value. """
+ """ Get current item from TQRadioButton from config file (string) value. """
try:
return options[radios.selectedId()]
except IndexError:
return ""
def _setRB(self, radios, options, default, value):
- """ Set current item in QRadioButton from string value. """
+ """ Set current item in TQRadioButton from string value. """
try:
num = options.index(value)
except ValueError:
@@ -250,9 +263,9 @@ class PowerManager(PowerManagerUI):
self.connect(self.BatteryBrightnessSlider, SIGNAL("valueChanged(int)"), self.changeBatteryBrightness)
#Add a blank tooltip, the tooltipgroup signals are then used for our KPassivePopup
- toolTipGroup = QToolTipGroup(self.systray)
- QToolTip.add(self.systray, "", toolTipGroup, "blah")
- self.connect(toolTipGroup, SIGNAL("showTip(const QString&)"), self.showTip)
+ toolTipGroup = TQToolTipGroup(self.systray)
+ TQToolTip.add(self.systray, "", toolTipGroup, "blah")
+ self.connect(toolTipGroup, SIGNAL("showTip(const TQString&)"), self.showTip)
self.connect(toolTipGroup, SIGNAL("removeTip()"), self.hideTip)
# Popup tooltip showing battery level
@@ -353,7 +366,7 @@ class PowerManager(PowerManagerUI):
# And change the icon in the systray, remove the restore option
# This way, we're basically becoming a systray applet, you can
# hibernate and suspend from
- self.systray.setPixmap(QPixmap(UserIcon(self.icon)))
+ self.systray.setPixmap(TQPixmap(UserIcon(self.icon)))
if self.powermanager.hasAC:
self.wasOnBattery = self.powermanager.onBattery()
@@ -368,8 +381,8 @@ class PowerManager(PowerManagerUI):
self.PoweredBrightnessSlider.setValue(self.config.readNumEntry("poweredBrightness", brightness_high)) #default highest
tt_text = "Every step increases or decreases the brightness by %i%%" % int(100/brightness_high)
- QToolTip.add(self.BatteryBrightnessSlider, tt_text)
- QToolTip.add(self.PoweredBrightnessSlider, tt_text)
+ TQToolTip.add(self.BatteryBrightnessSlider, tt_text)
+ TQToolTip.add(self.PoweredBrightnessSlider, tt_text)
self.lockScreenOnResume.setChecked(self.config.readBoolEntry("lockOnResume", True))
@@ -418,7 +431,7 @@ class PowerManager(PowerManagerUI):
self.config.sync()
def quit(self):
- """ Quit application. """
+ """ TQuit application. """
kapp.quit()
def showTip(self, text=""):
@@ -457,7 +470,7 @@ class PowerManager(PowerManagerUI):
value=self.BatteryBrightnessSlider.value()*100/self.BatteryBrightnessSlider.maxValue()
else:
value=self.PoweredBrightnessSlider.value()*100/self.PoweredBrightnessSlider.maxValue()
- return QString(str(value))
+ return TQString(str(value))
def hideTip(self):
""" Hide the tooltip."""
@@ -599,15 +612,15 @@ class PowerManager(PowerManagerUI):
oldIcon = self.icon
self.icon = self._getIcon()
if self.icon != oldIcon:
- self.systray.setPixmap(QPixmap(UserIcon(self.icon)))
- self.BattPixmap.setPixmap(QPixmap(UserIcon(self.icon)))
+ self.systray.setPixmap(TQPixmap(UserIcon(self.icon)))
+ self.BattPixmap.setPixmap(TQPixmap(UserIcon(self.icon)))
def notify(self, msg, icon=None):
""" Send a notification popup. """
if icon:
- icon = QPixmap(icon)
+ icon = TQPixmap(icon)
else:
- icon = QPixmap(SmallIcon("messagebox_info"))
+ icon = TQPixmap(SmallIcon("messagebox_info"))
try:
del self.warningPopup
except:
@@ -615,7 +628,7 @@ class PowerManager(PowerManagerUI):
self.warningPopup = KPassivePopup(self.systray)
label = Notify(self.warningPopup, msg, icon)
self.warningPopup.setView(label)
- position = QPoint(5,5)
+ position = TQPoint(5,5)
self.warningPopup.show(position)
def poll(self,notify=True):
@@ -728,20 +741,20 @@ class PowerManager(PowerManagerUI):
if self.act_call[action] != None:
note = i18n("Laptop lid is closed, %1 now.").arg(self.act_notify[action])
self.notify(note, self.act_icon[action])
- QTimer.singleShot(2000, self.act_call[action])
+ TQTimer.singleShot(2000, self.act_call[action])
else:
self.powermanager.lidClosedState = False
def _addBatteryWidgets(self):
""" Adds progressbars to show battery status to the tooltip."""
- BattLayout = QHBoxLayout(None,0,6,"BattLayout")
+ BattLayout = TQHBoxLayout(None,0,6,"BattLayout")
- self.BattPixmap = QLabel(self.tooltip,"BattLabLayout")
- self.BattPixmap.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.BattPixmap.sizePolicy().hasHeightForWidth()))
- self.BattPixmap.setPixmap(QPixmap(UserIcon(self.icon)))
+ self.BattPixmap = TQLabel(self.tooltip,"BattLabLayout")
+ self.BattPixmap.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.BattPixmap.sizePolicy().hasHeightForWidth()))
+ self.BattPixmap.setPixmap(TQPixmap(UserIcon(self.icon)))
self.BattPixmap.setScaledContents(1)
BattLayout.addWidget(self.BattPixmap)
- self.BattMainLabel = QLabel(self.tooltip,"BattMainLabel")
+ self.BattMainLabel = TQLabel(self.tooltip,"BattMainLabel")
self.BattMainLabel.setText(i18n("<b>Battery:</b>"))
BattLayout.addWidget(self.BattMainLabel)
@@ -754,13 +767,13 @@ class PowerManager(PowerManagerUI):
self.BattProgress = {}
i = 1
for batt in self.powermanager.batteries:
- self.BattLayout[batt] = QHBoxLayout(None,0,6,"BattBarLayout")
- self.BattLabel[batt] = QLabel(self.tooltip,"BattLabel")
+ self.BattLayout[batt] = TQHBoxLayout(None,0,6,"BattBarLayout")
+ self.BattLabel[batt] = TQLabel(self.tooltip,"BattLabel")
if len(self.powermanager.batteries) > 1:
self.BattLabel[batt].setText(i18n("Battery %i" % i))
self.BattLayout[batt].addWidget(self.BattLabel[batt])
self.BattProgress[batt] = KProgress(self.tooltip,"BattProgress")
- self.BattProgress[batt].setMinimumSize(QSize(200,0))
+ self.BattProgress[batt].setMinimumSize(TQSize(200,0))
self.BattLayout[batt].addWidget(self.BattProgress[batt])
self.tooltip.layout().addLayout(self.BattLayout[batt])
i += 1
@@ -791,14 +804,14 @@ class PowerManager(PowerManagerUI):
if len(self.powermanager.cpus) == 0:
return
- LabelLayout = QHBoxLayout(None,0,6,"layout5")
+ LabelLayout = TQHBoxLayout(None,0,6,"layout5")
- self.CpuPixmap = QLabel(self.tooltip,"CpuPixmap")
- self.CpuPixmap.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.CpuPixmap.sizePolicy().hasHeightForWidth()))
- self.CpuPixmap.setPixmap(QPixmap(UserIcon("processor")))
+ self.CpuPixmap = TQLabel(self.tooltip,"CpuPixmap")
+ self.CpuPixmap.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.CpuPixmap.sizePolicy().hasHeightForWidth()))
+ self.CpuPixmap.setPixmap(TQPixmap(UserIcon("processor")))
self.CpuPixmap.setScaledContents(1)
LabelLayout.addWidget(self.CpuPixmap)
- self.CpuMainLabel = QLabel(self.tooltip,"CpuMainLabel")
+ self.CpuMainLabel = TQLabel(self.tooltip,"CpuMainLabel")
self.CpuMainLabel.setText(i18n("<b>CPU Frequency:</b>"))
LabelLayout.addWidget(self.CpuMainLabel)
@@ -811,8 +824,8 @@ class PowerManager(PowerManagerUI):
self.CpuProgress = {}
i = 1
for cpu in self.powermanager.cpus:
- self.CpuLayout[cpu] = QHBoxLayout(None,0,6,"layout2")
- self.CpuLabel[cpu] = QLabel(self.tooltip,"CpuLabel")
+ self.CpuLayout[cpu] = TQHBoxLayout(None,0,6,"layout2")
+ self.CpuLabel[cpu] = TQLabel(self.tooltip,"CpuLabel")
if len(self.powermanager.cpus) > 1:
self.CpuLabel[cpu].setText(i18n("Processor %i" % i))
self.CpuLayout[cpu].addWidget(self.CpuLabel[cpu])
@@ -967,7 +980,7 @@ class PowerManager(PowerManagerUI):
note = i18n("You are about to run out of battery power, %1 now.").arg(self.act_notify[action])
self.notify(note, self.act_icon[action])
if self.act_call[action] != None:
- QTimer.singleShot(2000, self.act_call[action])
+ TQTimer.singleShot(2000, self.act_call[action])
else:
self.powermanager.criticalBatteryState = False
if currentLevel <= warningLevel and self.batt_level < CHARGE_LEVEL_THRESHOLD:
@@ -998,7 +1011,7 @@ class PowerManager(PowerManagerUI):
if idlesec > idleTime:
note = i18n("System idle for at least %1 minutes, %2 now.").arg(idleTime).arg(self.act_notify[action])
self.notify(note, self.act_icon[action])
- QTimer.singleShot(2000, self.act_call[action])
+ TQTimer.singleShot(2000, self.act_call[action])
@@ -1113,7 +1126,7 @@ if __name__ == "__main__":
aboutdata.addAuthor("Sebastian Kügler", "Developer", "[email protected]","http://vizZzion.org")
aboutdata.addAuthor("Jonathan Riddell", "Developer", "[email protected]")
aboutdata.addAuthor("Luka Renko", "Developer", "[email protected]")
- aboutdata.setProgramLogo(QImage("power-manager.png"))
+ aboutdata.setProgramLogo(TQImage("power-manager.png"))
TDECmdLineArgs.init(sys.argv, aboutdata)
#kapp = KUniqueApplication(True, True, False)
#kapp = TDEApplication()
diff --git a/powermanager/guidance_power_manager_ui.ui b/powermanager/guidance_power_manager_ui.ui
index 77aa884..f8c1eba 100644
--- a/powermanager/guidance_power_manager_ui.ui
+++ b/powermanager/guidance_power_manager_ui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PowerManagerUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>PowerManagerUI</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GeneralSettingsBox</cstring>
</property>
@@ -33,7 +33,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>lockScreenOnResume</cstring>
</property>
@@ -43,7 +43,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>MainsPoweredBox</cstring>
</property>
@@ -62,7 +62,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>layout17</cstring>
</property>
@@ -70,7 +70,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>PoweredBrightnessLabel</cstring>
</property>
@@ -78,7 +78,7 @@
<string>Brightness</string>
</property>
</widget>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>PoweredBrightnessSlider</cstring>
</property>
@@ -112,7 +112,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>layout13</cstring>
</property>
@@ -137,7 +137,7 @@
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>PoweredIdleLabel</cstring>
</property>
@@ -145,7 +145,7 @@
<string>When the system is idle for more than</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>PoweredIdleTime</cstring>
</property>
@@ -159,14 +159,14 @@
<string>To prevent data loss or other damage, you can have the system suspend or hibernate, so you don't run accidentally out of battery power. Configure the number of minutes below which the machine will run the configured action.</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>PoweredIdleCombo</cstring>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>layout13_2_2</cstring>
</property>
@@ -191,7 +191,7 @@
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>PoweredFreqLabel</cstring>
</property>
@@ -199,7 +199,7 @@
<string>CPU frequency scaling policy</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>PoweredFreqCombo</cstring>
</property>
@@ -208,7 +208,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>BatteryBox</cstring>
</property>
@@ -227,7 +227,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>layout16</cstring>
</property>
@@ -235,7 +235,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>BatteryBrightnessLabel</cstring>
</property>
@@ -243,7 +243,7 @@
<string>Brightness</string>
</property>
</widget>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>BatteryBrightnessSlider</cstring>
</property>
@@ -268,7 +268,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>layout14</cstring>
</property>
@@ -276,12 +276,12 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QComboBox" row="1" column="4">
+ <widget class="TQComboBox" row="1" column="4">
<property name="name">
<cstring>BatteryIdleCombo</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>BatteryIdleLabel</cstring>
</property>
@@ -289,12 +289,12 @@
<string>When the system is idle for more than</string>
</property>
</widget>
- <widget class="QComboBox" row="0" column="4">
+ <widget class="TQComboBox" row="0" column="4">
<property name="name">
<cstring>BatteryCriticalCombo</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>BatteryCriticalLabel</cstring>
</property>
@@ -302,7 +302,7 @@
<string>When battery remaining time drops below</string>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="3">
+ <widget class="TQSpinBox" row="1" column="3">
<property name="name">
<cstring>BatteryIdleTime</cstring>
</property>
@@ -316,7 +316,7 @@
<string>To prevent data loss or other damage, you can have the system suspend or hibernate, so you don't run accidentally out of battery power. Configure the number of minutes below which the machine will run the configured action.</string>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="3">
+ <widget class="TQSpinBox" row="0" column="3">
<property name="name">
<cstring>CriticalRemainTime</cstring>
</property>
@@ -366,7 +366,7 @@
</spacer>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>layout13_2</cstring>
</property>
@@ -391,7 +391,7 @@
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>BatteryFreqLabel</cstring>
</property>
@@ -399,7 +399,7 @@
<string>CPU frequency scaling policy</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>BatteryFreqCombo</cstring>
</property>
@@ -408,7 +408,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>LaptopLidRadios</cstring>
</property>
@@ -433,7 +433,7 @@
<property name="spacing">
<number>5</number>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>laptopClosedNone</cstring>
</property>
@@ -441,7 +441,7 @@
<string>Do nothing</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>laptopClosedBlank</cstring>
</property>
@@ -449,7 +449,7 @@
<string>Lock screen</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>laptopClosedSuspend</cstring>
</property>
@@ -463,7 +463,7 @@
<string>Suspend is a sleep state, the system will consume only very little energy when suspended</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>laptopClosedHibernate</cstring>
</property>
@@ -477,7 +477,7 @@
<string>Hibernate or "Suspend to Disk" is a deep sleepstate, allowing the system to power off completely</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>laptopClosedShutdown</cstring>
</property>
diff --git a/powermanager/notify.ui b/powermanager/notify.ui
index ebf2950..affbec2 100644
--- a/powermanager/notify.ui
+++ b/powermanager/notify.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>NotifyWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>NotifyWidgetUI</cstring>
</property>
@@ -33,7 +33,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0" rowspan="2" colspan="1">
+ <widget class="TQLabel" row="0" column="0" rowspan="2" colspan="1">
<property name="name">
<cstring>Icon</cstring>
</property>
@@ -52,7 +52,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>Text</cstring>
</property>
@@ -60,7 +60,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>Caption</cstring>
</property>
@@ -70,6 +70,6 @@
</widget>
</grid>
</widget>
-<pixmapfunction>QPixmap</pixmapfunction>
+<pixmapfunction>TQPixmap</pixmapfunction>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/powermanager/tooltip.ui b/powermanager/tooltip.ui
index 6055110..a120920 100644
--- a/powermanager/tooltip.ui
+++ b/powermanager/tooltip.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ToolTip</class>
<comment>Python:from tdeui import *</comment>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ToolTip</cstring>
</property>
@@ -48,6 +48,6 @@
<slots>
<slot>ToolTip_destroyed( TQObject * )</slot>
</slots>
-<pixmapfunction>QPixmap</pixmapfunction>
+<pixmapfunction>TQPixmap</pixmapfunction>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/serviceconfig/serviceconfig.py b/serviceconfig/serviceconfig.py
index 88fbec7..4e82bf8 100755
--- a/serviceconfig/serviceconfig.py
+++ b/serviceconfig/serviceconfig.py
@@ -16,12 +16,24 @@
# #
###########################################################################
-from qt import *
-from tdeui import *
-from tdecore import *
import sys
import os
import os.path
+# Trinity-specific paths
+tqt_modules = []
+for m_path in sys.path:
+ if os.path.exists(os.path.join(m_path, 'sip4_tqt')):
+ m_sip_dir = os.path.join(m_path, 'sip4_tqt')
+ tqt_modules.insert(0, m_sip_dir)
+ if os.path.exists(os.path.join(m_path, 'python_tqt')):
+ m_pyqt_dir = os.path.join(m_path, 'python_tqt')
+ tqt_modules.insert(0, m_pyqt_dir)
+for m_path in tqt_modules:
+ sys.path.insert(0, m_path)
+
+from qt import *
+from tdeui import *
+from tdecore import *
import posix
import re
from pickle import Pickler,Unpickler
@@ -960,7 +972,7 @@ class SysVInitApp(programbase):
self.updatingGUI = False
self.context = getServiceContext()
- self.servicestolistitems = {} # Map service names to QListViewItems
+ self.servicestolistitems = {} # Map service names to TQListViewItems
self.currentrunlevel = self.context.currentRunLevel()
self.context.loadInfo()
@@ -968,28 +980,28 @@ class SysVInitApp(programbase):
self.aboutus = TDEAboutApplication(self)
if standalone:
- toplayout = QVBoxLayout( self.plainPage(), 0, KDialog.spacingHint() )
- tophb = QSplitter(Qt.Horizontal, self.plainPage())
+ toplayout = TQVBoxLayout( self.plainPage(), 0, KDialog.spacingHint() )
+ tophb = TQSplitter(TQt.Horizontal, self.plainPage())
else:
- toplayout = QVBoxLayout( self, 0, KDialog.spacingHint() )
- tophb = QSplitter(Qt.Horizontal, self)
+ toplayout = TQVBoxLayout( self, 0, KDialog.spacingHint() )
+ tophb = TQSplitter(TQt.Horizontal, self)
toplayout.addWidget(tophb)
- vb = QVBox(tophb)
+ vb = TQVBox(tophb)
vb.setSpacing(KDialog.spacingHint())
- hb = QHBox(vb)
+ hb = TQHBox(vb)
hb.setSpacing(KDialog.spacingHint())
vb.setStretchFactor(hb,0)
- label = QLabel(hb)
+ label = TQLabel(hb)
label.setPixmap(UserIcon("hi32-app-daemons"))
hb.setStretchFactor(label,0)
- label = QLabel(i18n("Run level:"),hb)
+ label = TQLabel(i18n("Run level:"),hb)
hb.setStretchFactor(label,0)
- self.runlevelcombo = QComboBox(hb)
+ self.runlevelcombo = TQComboBox(hb)
# Load up the runlevel combo box.
i = 0
@@ -1003,7 +1015,7 @@ class SysVInitApp(programbase):
self.connect(self.runlevelcombo, SIGNAL("activated(int)"), self.slotRunLevelChanged)
- widget = QWidget(hb)
+ widget = TQWidget(hb)
hb.setStretchFactor(widget,1)
self.servicelistview = TDEListView(vb)
@@ -1011,56 +1023,56 @@ class SysVInitApp(programbase):
self.servicelistview.addColumn(i18n("Start at Boot"))
self.servicelistview.addColumn(i18n("Status"))
self.servicelistview.setAllColumnsShowFocus(True)
- self.servicelistview.setSelectionMode(QListView.Single)
- self.connect(self.servicelistview, SIGNAL("selectionChanged(QListViewItem *)"), self.slotListClicked)
+ self.servicelistview.setSelectionMode(TQListView.Single)
+ self.connect(self.servicelistview, SIGNAL("selectionChanged(TQListViewItem *)"), self.slotListClicked)
# Right hand side of the dialog.
- vb = QVBox(tophb)
+ vb = TQVBox(tophb)
vb.setSpacing(KDialog.spacingHint())
- hgb = QHGroupBox(i18n("Service Details"),vb)
+ hgb = TQHGroupBox(i18n("Service Details"),vb)
vb.setStretchFactor(hgb,1)
- vb2 = QVBox(hgb)
+ vb2 = TQVBox(hgb)
vb2.setSpacing(KDialog.spacingHint())
- label = QLabel(i18n("Description:"),vb2)
+ label = TQLabel(i18n("Description:"),vb2)
vb2.setStretchFactor(label,0)
- self.descriptiontextedit = QTextEdit(vb2)
+ self.descriptiontextedit = TQTextEdit(vb2)
vb2.setStretchFactor(self.descriptiontextedit,2)
self.descriptiontextedit.setReadOnly(True)
- self.startatbootcheckbox = QCheckBox(i18n("Start during boot"),vb2)
+ self.startatbootcheckbox = TQCheckBox(i18n("Start during boot"),vb2)
vb2.setStretchFactor(self.startatbootcheckbox,0)
self.connect(self.startatbootcheckbox, SIGNAL("toggled(bool)"), self.slotBootChanged)
- label = QLabel(i18n("Status:"),vb2)
+ label = TQLabel(i18n("Status:"),vb2)
vb2.setStretchFactor(label,0)
- self.statustext = QTextEdit(vb2)
+ self.statustext = TQTextEdit(vb2)
self.statustext.setReadOnly(True)
vb2.setStretchFactor(self.statustext,1)
- hb2 = QHBox(vb2)
+ hb2 = TQHBox(vb2)
hb2.setSpacing(KDialog.spacingHint())
vb2.setStretchFactor(hb2,0)
- self.startbutton = QPushButton(i18n("Start"),hb2)
+ self.startbutton = TQPushButton(i18n("Start"),hb2)
hb2.setStretchFactor(self.startbutton,1)
self.connect(self.startbutton, SIGNAL("clicked()"), self.slotStartButton)
- self.stopbutton = QPushButton(i18n("Stop"),hb2)
+ self.stopbutton = TQPushButton(i18n("Stop"),hb2)
hb2.setStretchFactor(self.stopbutton,1)
self.connect(self.stopbutton, SIGNAL("clicked()"), self.slotStopButton)
- self.restartbutton = QPushButton(i18n("Restart"),hb2)
+ self.restartbutton = TQPushButton(i18n("Restart"),hb2)
hb2.setStretchFactor(self.restartbutton,1)
self.connect(self.restartbutton, SIGNAL("clicked()"), self.slotRestartButton)
if DISTRO == "Gentoo":
# Gentoo Linux gets an extra button.
- self.zapbutton = QPushButton(i18n("Zap"),hb2)
+ self.zapbutton = TQPushButton(i18n("Zap"),hb2)
hb2.setStretchFactor(self.zapbutton,1)
self.connect(self.zapbutton, SIGNAL("clicked()"), self.slotZapButton)
if not isroot:
self.disableStuff()
else:
- self.connect(self.servicelistview, SIGNAL("contextMenu(TDEListView*,QListViewItem*,const QPoint&)"),
+ self.connect(self.servicelistview, SIGNAL("contextMenu(TDEListView*,TQListViewItem*,const TQPoint&)"),
self.slotServiceContextMenu)
self.__fillListView(self.currentrunlevel)
@@ -1130,7 +1142,7 @@ class SysVInitApp(programbase):
self.__checkServiceStatus()
if DISTRO == "Debian" and (standalone or (not standalone and is_shown)):
- QTimer.singleShot(0,self.__startLoadDescriptions)
+ TQTimer.singleShot(0,self.__startLoadDescriptions)
is_shown = True
@@ -1151,9 +1163,9 @@ class SysVInitApp(programbase):
if item.isAvailableInRunlevel(runlevelobj):
status = item.status.strip().replace("\n",", ")[:32]
if item in runlevelobj.activeservices:
- lvi = QListViewItem(self.servicelistview,item.filename,i18n("Yes"),status)
+ lvi = TQListViewItem(self.servicelistview,item.filename,i18n("Yes"),status)
else:
- lvi = QListViewItem(self.servicelistview,item.filename,i18n("No"),status)
+ lvi = TQListViewItem(self.servicelistview,item.filename,i18n("No"),status)
self.servicestolistitems[item] = lvi
########################################################################
@@ -1276,7 +1288,7 @@ class SysVInitApp(programbase):
self.context.descriptioncache.saveCache()
return
- QTimer.singleShot(0,self.__loadDescriptions)
+ TQTimer.singleShot(0,self.__loadDescriptions)
########################################################################
def __runInitScript(self,title,service,command):
@@ -1380,21 +1392,21 @@ class CommandRunner(KDialogBase):
self.resize(400,200)
vbox = self.makeVBoxMainWidget()
- hbox = QHBox(vbox)
+ hbox = TQHBox(vbox)
hbox.setSpacing(self.spacingHint())
- tmplabel = QLabel(hbox)
+ tmplabel = TQLabel(hbox)
tmplabel.setPixmap(UserIcon("laserwarn"))
hbox.setStretchFactor(tmplabel,0)
- self.headinglabel = QLabel(hbox)
+ self.headinglabel = TQLabel(hbox)
hbox.setStretchFactor(self.headinglabel,1)
- self.outputtextview = QTextView(vbox)
- self.outputtextview.setTextFormat(QTextView.PlainText)
+ self.outputtextview = TQTextView(vbox)
+ self.outputtextview.setTextFormat(TQTextView.PlainText)
- self.kid = QProcess()
- self.kid.setCommunication(QProcess.Stdout|QProcess.Stderr)
+ self.kid = TQProcess()
+ self.kid.setCommunication(TQProcess.Stdout|TQProcess.Stderr)
self.connect(self.kid,SIGNAL("processExited()"),self.slotProcessExited)
self.connect(self.kid,SIGNAL("readyReadStdout()"),self.slotReadyReadStdout)
self.connect(self.kid,SIGNAL("readyReadStderr()"),self.slotReadyReadStderr)
@@ -1416,7 +1428,7 @@ class CommandRunner(KDialogBase):
self.killTimer(self.bootstraptimer)
# Create a slightly new environment where TERM is vt100
- new_env = QStringList()
+ new_env = TQStringList()
for key in os.environ:
if key=="TERM":
new_env.append("TERM=vt100")
diff --git a/userconfig/userconfig.py b/userconfig/userconfig.py
index 527a9e7..3671acc 100755
--- a/userconfig/userconfig.py
+++ b/userconfig/userconfig.py
@@ -29,6 +29,7 @@ for m_path in sys.path:
tqt_modules.insert(0, m_pyqt_dir)
for m_path in tqt_modules:
sys.path.insert(0, m_path)
+
from qt import *
from tdeui import *
from tdecore import *
diff --git a/wineconfig/firstrunwizard.py b/wineconfig/firstrunwizard.py
index e35d0bd..43891b3 100755
--- a/wineconfig/firstrunwizard.py
+++ b/wineconfig/firstrunwizard.py
@@ -44,70 +44,70 @@ class FirstRunWizard(KWizard):
self.setupPageExistingWine()
self.setupPageCreateWine()
self.slotCreateExistingToggled(0)
- #self.connect(self,SIGNAL("selected(const QString &)"),self.slotPageChanged)
+ #self.connect(self,SIGNAL("selected(const TQString &)"),self.slotPageChanged)
- #self.resize(QSize(600,480).expandedTo(self.minimumSizeHint()))
- self.clearWState(Qt.WState_Polished)
+ #self.resize(TQSize(600,480).expandedTo(self.minimumSizeHint()))
+ self.clearWState(TQt.WState_Polished)
def setupPage1(self):
- page1 = QHBox(self,"page1")
+ page1 = TQHBox(self,"page1")
- self.kdewinepicture = QLabel(page1,"kdewinepicture")
- self.kdewinepicture.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.kdewinepicture.sizePolicy().hasHeightForWidth()))
- self.kdewinepicture.setMinimumSize(QSize(140,320))
- self.kdewinepicture.setPixmap(QPixmap(self.imagedir+"kdewinewizard.png"))
+ self.kdewinepicture = TQLabel(page1,"kdewinepicture")
+ self.kdewinepicture.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.kdewinepicture.sizePolicy().hasHeightForWidth()))
+ self.kdewinepicture.setMinimumSize(TQSize(140,320))
+ self.kdewinepicture.setPixmap(TQPixmap(self.imagedir+"kdewinewizard.png"))
#self.kdewinepicture.setScaledContents(1)
- spacer = QWidget(page1)
- spacer.setMinimumSize(QSize(6,300))
+ spacer = TQWidget(page1)
+ spacer.setMinimumSize(TQSize(6,300))
- pagebody = QVBox(page1,"pagebody")
+ pagebody = TQVBox(page1,"pagebody")
page1.setStretchFactor(pagebody,1)
- introtext = QLabel(pagebody,"introtext")
+ introtext = TQLabel(pagebody,"introtext")
introtext.setText(i18n("It appears that you do not yet have a Windows drive set up.\n" +\
"This wizard will help set it up so that you can run windows applications.\n"))
- spacer = QWidget(pagebody)
- spacer.setMinimumSize(QSize(6,20))
+ spacer = TQWidget(pagebody)
+ spacer.setMinimumSize(TQSize(6,20))
self.createinstall = True
- createwinepathchoice = QRadioButton(i18n("Set up the fake windows installation " +\
+ createwinepathchoice = TQRadioButton(i18n("Set up the fake windows installation " +\
"in the following directory:"),pagebody)
self.winepath = self.default_winepath
- hbox = QHBox(pagebody)
+ hbox = TQHBox(pagebody)
hbox.setSpacing(KDialog.spacingHint())
self.winefolderedit = KLineEdit(self.winepath,hbox)
self.urlcompletion = KURLCompletion(KURLCompletion.DirCompletion)
self.winefolderedit.setCompletionObject(self.urlcompletion)
self.winefolderedit.setCompletionMode(TDEGlobalSettings.CompletionPopup)
- self.connect(self.winefolderedit,SIGNAL("textChanged(const QString &)"),self.slotWineFolderEdited)
+ self.connect(self.winefolderedit,SIGNAL("textChanged(const TQString &)"),self.slotWineFolderEdited)
self.browsecreatebutton = KPushButton(i18n("Browse"),hbox)
self.connect(self.browsecreatebutton,SIGNAL("clicked()"),self.slotBrowseClicked)
- spacer = QWidget(pagebody)
- spacer.setMinimumSize(QSize(6,10))
+ spacer = TQWidget(pagebody)
+ spacer.setMinimumSize(TQSize(6,10))
- existingwinepathchoice = QRadioButton(i18n("There is already a fake windows installation " +\
+ existingwinepathchoice = TQRadioButton(i18n("There is already a fake windows installation " +\
"in the following directory:"),pagebody)
- hbox = QHBox(pagebody)
+ hbox = TQHBox(pagebody)
hbox.setSpacing(KDialog.spacingHint())
self.existingwinefolderedit = KLineEdit("",hbox)
self.urlcompletion = KURLCompletion(KURLCompletion.DirCompletion)
self.existingwinefolderedit.setCompletionObject(self.urlcompletion)
self.existingwinefolderedit.setCompletionMode(TDEGlobalSettings.CompletionPopup)
- self.connect(self.existingwinefolderedit,SIGNAL("textChanged(const QString &)"),self.slotWineFolderEdited)
+ self.connect(self.existingwinefolderedit,SIGNAL("textChanged(const TQString &)"),self.slotWineFolderEdited)
self.browseexistingbutton = KPushButton(i18n("Browse"),hbox)
self.connect(self.browseexistingbutton,SIGNAL("clicked()"),self.slotBrowseClicked)
- self.createexistingchoicesgroup = QButtonGroup(pagebody,"createexistingchoicesgroup")
+ self.createexistingchoicesgroup = TQButtonGroup(pagebody,"createexistingchoicesgroup")
self.createexistingchoicesgroup.insert(createwinepathchoice,0)
self.createexistingchoicesgroup.insert(existingwinepathchoice,1)
self.createexistingchoicesgroup.setExclusive(True)
@@ -115,7 +115,7 @@ class FirstRunWizard(KWizard):
self.createexistingchoicesgroup.setButton(0)
self.connect(self.createexistingchoicesgroup,SIGNAL("clicked(int)"),self.slotCreateExistingToggled)
- bottomspacer = QWidget(pagebody)
+ bottomspacer = TQWidget(pagebody)
pagebody.setStretchFactor(bottomspacer,1)
self.addPage( page1, i18n("Setting up your windows drive") )
@@ -126,30 +126,30 @@ class FirstRunWizard(KWizard):
self.setFinishEnabled( page1, False )
def setupPageExistingWine(self):
- self.pageexisting = QHBox(self,"pageexisting")
+ self.pageexisting = TQHBox(self,"pageexisting")
- self.kdewinepicture = QLabel(self.pageexisting,"kdewinepicture")
- self.kdewinepicture.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.kdewinepicture.sizePolicy().hasHeightForWidth()))
- self.kdewinepicture.setMinimumSize(QSize(140,320))
- self.kdewinepicture.setPixmap(QPixmap(self.imagedir+"kdewinewizard.png"))
+ self.kdewinepicture = TQLabel(self.pageexisting,"kdewinepicture")
+ self.kdewinepicture.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.kdewinepicture.sizePolicy().hasHeightForWidth()))
+ self.kdewinepicture.setMinimumSize(TQSize(140,320))
+ self.kdewinepicture.setPixmap(TQPixmap(self.imagedir+"kdewinewizard.png"))
#self.kdewinepicture.setScaledContents(1)
- spacer = QWidget(self.pageexisting)
- spacer.setMinimumSize(QSize(6,300))
+ spacer = TQWidget(self.pageexisting)
+ spacer.setMinimumSize(TQSize(6,300))
valid = wineread.VerifyWineDrive(self.winepath)
- pagebody = QVBox(self.pageexisting,"pagebody")
+ pagebody = TQVBox(self.pageexisting,"pagebody")
self.pageexisting.setStretchFactor(pagebody,1)
- existstext = QLabel(pagebody,"existstext")
+ existstext = TQLabel(pagebody,"existstext")
if valid:
existstext.setText(i18n("A fake windows installation was found."))
else:
existstext.setText(i18n("No fake windows installation was found in\n" +\
self.winepath + "\nPlease go back and create one."))
- bottomspacer = QWidget(pagebody)
+ bottomspacer = TQWidget(pagebody)
pagebody.setStretchFactor(bottomspacer,1)
self.addPage( self.pageexisting, i18n("Setting up your windows drive") )
@@ -160,25 +160,25 @@ class FirstRunWizard(KWizard):
self.setFinishEnabled( self.pageexisting, True )
def setupPageCreateWine(self):
- self.pagecreate = QHBox(self,"pagecreate")
+ self.pagecreate = TQHBox(self,"pagecreate")
- self.kdewinepicture = QLabel(self.pagecreate,"kdewinepicture")
- self.kdewinepicture.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.kdewinepicture.sizePolicy().hasHeightForWidth()))
- self.kdewinepicture.setMinimumSize(QSize(140,320))
- self.kdewinepicture.setPixmap(QPixmap(self.imagedir+"kdewinewizard.png"))
+ self.kdewinepicture = TQLabel(self.pagecreate,"kdewinepicture")
+ self.kdewinepicture.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.kdewinepicture.sizePolicy().hasHeightForWidth()))
+ self.kdewinepicture.setMinimumSize(TQSize(140,320))
+ self.kdewinepicture.setPixmap(TQPixmap(self.imagedir+"kdewinewizard.png"))
#self.kdewinepicture.setScaledContents(1)
- spacer = QWidget(self.pagecreate)
- spacer.setMinimumSize(QSize(6,300))
+ spacer = TQWidget(self.pagecreate)
+ spacer.setMinimumSize(TQSize(6,300))
- pagebody = QVBox(self.pagecreate,"pagebody")
+ pagebody = TQVBox(self.pagecreate,"pagebody")
self.pagecreate.setStretchFactor(pagebody,1)
- self.createdtext = QLabel(pagebody,"existstext")
+ self.createdtext = TQLabel(pagebody,"existstext")
self.createdtext.setText(i18n("A fake windows installation was created for you in\n" +\
self.winepath))
- bottomspacer = QWidget(pagebody)
+ bottomspacer = TQWidget(pagebody)
pagebody.setStretchFactor(bottomspacer,1)
self.addPage( self.pagecreate, i18n("Setting up your windows drive") )
@@ -189,21 +189,21 @@ class FirstRunWizard(KWizard):
self.setFinishEnabled( self.pagecreate, True )
def setupPageVersion(self):
- self.pageversion = QHBox(self,"pageversion")
+ self.pageversion = TQHBox(self,"pageversion")
- self.kdewinepicture = QLabel(self.pageversion,"kdewinepicture")
- self.kdewinepicture.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.kdewinepicture.sizePolicy().hasHeightForWidth()))
- self.kdewinepicture.setMinimumSize(QSize(140,320))
- self.kdewinepicture.setPixmap(QPixmap(self.imagedir+"kdewinewizard.png"))
+ self.kdewinepicture = TQLabel(self.pageversion,"kdewinepicture")
+ self.kdewinepicture.setSizePolicy(TQSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed,0,0,self.kdewinepicture.sizePolicy().hasHeightForWidth()))
+ self.kdewinepicture.setMinimumSize(TQSize(140,320))
+ self.kdewinepicture.setPixmap(TQPixmap(self.imagedir+"kdewinewizard.png"))
#self.kdewinepicture.setScaledContents(1)
- spacer = QWidget(self.pageversion)
- spacer.setMinimumSize(QSize(6,300))
+ spacer = TQWidget(self.pageversion)
+ spacer.setMinimumSize(TQSize(6,300))
- pagebody = QVBox(self.pageversion,"pagebody")
+ pagebody = TQVBox(self.pageversion,"pagebody")
self.pageversion.setStretchFactor(pagebody,1)
- versiontext = QLabel(pagebody,"versiontext")
+ versiontext = TQLabel(pagebody,"versiontext")
versiontext.setText(i18n("What windows version would you like to emulate?\n"))
self.winversions = wineread.winversions
@@ -214,7 +214,7 @@ class FirstRunWizard(KWizard):
self.connect(self.versioncombo,SIGNAL("activated(int)"),self.slotVersionActivated)
self.__selectWinVer(self.verid)
- bottomspacer = QWidget(pagebody)
+ bottomspacer = TQWidget(pagebody)
pagebody.setStretchFactor(bottomspacer,1)
self.addPage( self.pageversion, i18n("Setting up your windows drive") )
diff --git a/wineconfig/kcm_wineconfig.cpp b/wineconfig/kcm_wineconfig.cpp
index b275c46..cc478cf 100644
--- a/wineconfig/kcm_wineconfig.cpp
+++ b/wineconfig/kcm_wineconfig.cpp
@@ -1,10 +1,10 @@
/*
* pykcm_launcher.cpp
- *
+ *
* Launch Control Centre modules written in Python using an embedded Python
* interpreter.
- * Based on David Boddie's PyKDE-components.
+ * Based on David Boddie's PyTDE-components.
*/
// pythonize.h must be included first.
@@ -15,17 +15,15 @@
#include <klibloader.h>
#include <kstandarddirs.h>
#include <ksimpleconfig.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <sip.h>
-#define MODULE_DIR "/opt/trinity/share/apps/guidance"
-#define EXTRA_MODULE_DIR "/opt/trinity/share/python-support/tde-guidance-trinity"
-#define EXTRA_MODULE_DIR_TWO "/opt/trinity/share/python-support/guidance-backends-trinity"
-#define EXTRA_MODULE_DIR_THREE "/opt/trinity/share/python-support/tde-guidance-powermanager-trinity"
+#define MODULE_DIR "/root/TEMP5/tde-guidance-trinity-14.0.0-r131/debian/tmp/opt/trinity/share/apps/guidance"
+#define EXTRA_MODULE_DIR "None"
#define MODULE_NAME "wineconfig"
#define FACTORY "create_wineconfig"
#define CPP_FACTORY create_wineconfig
-#define LIB_PYTHON "libpython2.5.so"
+#define LIB_PYTHON "libpython2.7.so"
#define debug 1
static TDECModule *report_error(char *msg) {
@@ -33,48 +31,42 @@ static TDECModule *report_error(char *msg) {
return NULL;
}
-static TDECModule* return_instance( QWidget *parent, const char *name ) {
+static TDECModule* return_instance( TQWidget *parent, const char *name ) {
TDECModule* tdecmodule;
- PyObject *pyTDECModuleTuple;
+ PyObject *pyTDECModuleTuple;
PyObject *pyTDECModule;
Pythonize *pyize; // Pythonize object to manage the Python interpreter.
int isErr;
-
+
// Try to determine what py script we're loading. Note that "name"
// typically appears to be NULL.
- QString script(MODULE_NAME);
+ TQString script(MODULE_NAME);
// Reload libpython, but this time tell the runtime linker to make the
// symbols global and available for later loaded libraries/module.
KLibLoader::self()->globalLibrary(LIB_PYTHON);
-
+
// Start the interpreter.
pyize = initialize();
if (!pyize) {
return report_error ("***Failed to start interpreter\n");
}
-
+
// Add the path to the python script to the interpreter search path.
- QString path = QString(MODULE_DIR);
- if(path == QString::null) {
+ TQString path = TQString(MODULE_DIR);
+ if(path == TQString::null) {
return report_error ("***Failed to locate script path");
}
if(!pyize->appendToSysPath (path.latin1 ())) {
return report_error ("***Failed to set sys.path\n");
}
- QString extrapath = QString(EXTRA_MODULE_DIR);
+
+ // Add the extra path to the python script to the interpreter search path.
+ TQString extrapath = TQString(EXTRA_MODULE_DIR);
if(!pyize->appendToSysPath (extrapath.latin1 ())) {
- return report_error ("***Failed to set extra sys.path\n");
- }
- QString extrapath_two = QString(EXTRA_MODULE_DIR_TWO);
- if(!pyize->appendToSysPath (extrapath_two.latin1 ())) {
- return report_error ("***Failed to set extra 2 sys.path\n");
+ return report_error ("***Failed to set extra sys.path\n");
}
- QString extrapath_three = QString(EXTRA_MODULE_DIR_THREE);
- if(!pyize->appendToSysPath (extrapath_three.latin1 ())) {
- return report_error ("***Failed to set extra 3 sys.path\n");
- }
-
+
// Load the Python script.
PyObject *pyModule = pyize->importModule ((char *)script.latin1 ());
if(!pyModule) {
@@ -83,14 +75,14 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
}
// Inject a helper function
- QString bridge = QString("import sip\n"
- "import qt\n"
+ TQString bridge = TQString("from sip4_tqt import sip\n"
+ "from python_tqt import qt\n"
"def kcontrol_bridge_" FACTORY "(parent,name):\n"
" if parent!=0:\n"
#if SIP_VERSION >= 0x040200
- " wparent = sip.wrapinstance(parent,qt.QWidget)\n"
-#else
- " wparent = sip.wrapinstance(parent,'QWidget')\n"
+ " wparent = sip.wrapinstance(parent,qt.TQWidget)\n"
+#else
+ " wparent = sip.wrapinstance(parent,'TQWidget')\n"
#endif
" else:\n"
" wparent = None\n"
@@ -103,7 +95,7 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
if(!kcmFactory) {
return report_error ("***failed to find module factory\n");
}
-
+
// Call the factory function. Set up the args.
PyObject *pyParent = PyLong_FromVoidPtr(parent);
PyObject *pyName = PyString_FromString(MODULE_NAME);
@@ -125,7 +117,7 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
// Stop this from getting garbage collected.
Py_INCREF(PyTuple_GET_ITEM(pyTDECModuleTuple,0));
-
+
// convert the TDECModule PyObject to a real C++ TDECModule *.
isErr = 0;
pyTDECModule = PyTuple_GET_ITEM(pyTDECModuleTuple,1);
@@ -134,8 +126,8 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
return report_error ("***failed sip conversion to C++ pointer\n");
}
pyize->decref(pyTDECModuleTuple);
-
- // PyKDE can't run the module without this - Pythonize
+
+ // PyTDE can't run the module without this - Pythonize
// grabs the lock at initialization and we have to give
// it back before exiting. At this point, we no longer need
// it.
@@ -150,7 +142,7 @@ static TDECModule* return_instance( QWidget *parent, const char *name ) {
extern "C" {
// Factory function that kcontrol will call.
- TDECModule* CPP_FACTORY(QWidget *parent, const char *name) {
+ TDECModule* CPP_FACTORY(TQWidget *parent, const char *name) {
return return_instance(parent, name);
}
}
diff --git a/wineconfig/wineconfig.py b/wineconfig/wineconfig.py
index cd9eac9..cf6d008 100755
--- a/wineconfig/wineconfig.py
+++ b/wineconfig/wineconfig.py
@@ -16,6 +16,21 @@
# #
###########################################################################
+import sys
+import os
+import os.path
+# Trinity-specific paths
+tqt_modules = []
+for m_path in sys.path:
+ if os.path.exists(os.path.join(m_path, 'sip4_tqt')):
+ m_sip_dir = os.path.join(m_path, 'sip4_tqt')
+ tqt_modules.insert(0, m_sip_dir)
+ if os.path.exists(os.path.join(m_path, 'python_tqt')):
+ m_pyqt_dir = os.path.join(m_path, 'python_tqt')
+ tqt_modules.insert(0, m_pyqt_dir)
+for m_path in tqt_modules:
+ sys.path.insert(0, m_path)
+
from qt import *
from tdecore import *
from tdeui import *
@@ -23,10 +38,8 @@ from tdefile import *
from tdeio import *
#import string
#import math
-import os
import shutil
#import select
-import sys
#import struct
#import csv
#import time
@@ -136,15 +149,15 @@ class WineConfigApp(programbase):
def _buildGUI(self):
global standalone,application
if not standalone:
- toplayout = QVBoxLayout( self, 0, KDialog.spacingHint() )
- tabcontrol = QTabWidget(self)
+ toplayout = TQVBoxLayout( self, 0, KDialog.spacingHint() )
+ tabcontrol = TQTabWidget(self)
toplayout.addWidget(tabcontrol)
toplayout.setStretchFactor(tabcontrol,1)
#--- General tab ---
tabname = i18n("General")
if standalone:
- general1page = self.addGridPage(1,QGrid.Horizontal,tabname)
+ general1page = self.addGridPage(1,TQGrid.Horizontal,tabname)
general1page.setSpacing(0)
self.generalpage = GeneralPage(general1page,self.compact_mode)
else:
@@ -161,7 +174,7 @@ class WineConfigApp(programbase):
if not application:
tabname = i18n("Drives && Directories")
if standalone:
- drives1page = self.addGridPage(1,QGrid.Horizontal,tabname)
+ drives1page = self.addGridPage(1,TQGrid.Horizontal,tabname)
drives1page.setSpacing(0)
self.drivespage = DrivesPage(drives1page,self.compact_mode)
else:
@@ -177,7 +190,7 @@ class WineConfigApp(programbase):
#--- Audio tab ---
tabname = i18n("Audio")
if standalone:
- audio1page = self.addGridPage(1,QGrid.Horizontal,tabname)
+ audio1page = self.addGridPage(1,TQGrid.Horizontal,tabname)
self.audiopage = AudioPage(audio1page)
else:
self.audiopage = AudioPage(tabcontrol)
@@ -192,7 +205,7 @@ class WineConfigApp(programbase):
#--- Graphics tab ---
tabname = i18n("Graphics")
if standalone:
- graphics1page = self.addGridPage(1,QGrid.Horizontal,tabname)
+ graphics1page = self.addGridPage(1,TQGrid.Horizontal,tabname)
self.graphicspage = GraphicsPage(graphics1page)
else:
self.graphicspage = GraphicsPage(tabcontrol)
@@ -209,7 +222,7 @@ class WineConfigApp(programbase):
if not application:
tabname = i18n("Appearance")
if standalone:
- appearance1page = self.addGridPage(1,QGrid.Horizontal,tabname)
+ appearance1page = self.addGridPage(1,TQGrid.Horizontal,tabname)
self.appearancepage = AppearancePage(appearance1page)
else:
self.appearancepage = AppearancePage(tabcontrol)
@@ -234,7 +247,7 @@ class WineConfigApp(programbase):
if not application:
tabname = i18n("Applications")
if standalone:
- apps1page = self.addGridPage(1,QGrid.Horizontal,tabname)
+ apps1page = self.addGridPage(1,TQGrid.Horizontal,tabname)
self.appspage = ApplicationsPage(apps1page)
else:
self.appspage = ApplicationsPage(tabcontrol)
@@ -249,7 +262,7 @@ class WineConfigApp(programbase):
#--- Libraries tab ---
tabname = i18n("Libraries")
if standalone:
- libs1page = self.addGridPage(1,QGrid.Horizontal,tabname)
+ libs1page = self.addGridPage(1,TQGrid.Horizontal,tabname)
self.libspage = LibrariesPage(libs1page)
else:
self.libspage = LibrariesPage(tabcontrol)
@@ -266,20 +279,20 @@ class WineConfigApp(programbase):
""" Displays an error that wine is not installed """
global standalone
if not standalone:
- toplayout = QVBoxLayout( self, 0, KDialog.spacingHint() )
+ toplayout = TQVBoxLayout( self, 0, KDialog.spacingHint() )
if not standalone:
- nowinewarning = QLabel(self,"nowinewarning")
+ nowinewarning = TQLabel(self,"nowinewarning")
toplayout.addWidget(nowinewarning)
else:
vbox = self.addVBoxPage ("Wine Not Installed")
- nowinewarning = QLabel(vbox,"nowinewarning")
+ nowinewarning = TQLabel(vbox,"nowinewarning")
nowinewarning.setText(i18n("It appears that you do not have wine " +\
"installed.\nwine " + \
"can be used to run some programs designed for " + \
"Windows.\nPlease " +\
"install the wine package to get this functionality."))
- nowinewarning.setFrameStyle( QFrame.Box | QFrame.Raised )
+ nowinewarning.setFrameStyle( TQFrame.Box | TQFrame.Raised )
def InstallWine(self):
""" Allows the user to enable the proper repositories and
@@ -434,27 +447,27 @@ class WineConfigApp(programbase):
############################################################################
''' Not used.
-class ErrorPage(QWidget):
+class ErrorPage(TQWidget):
"""
Displayed when there is no fake Windows drive
"""
def __init__(self,parent = None, name = None, parentapp = None, modal = 0,fl=0):
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
if not name:
self.setName("ErrorPage")
self.parent = parentapp
- self.top_layout = QVBoxLayout(self,0,0,"ErrorPageLayout")
+ self.top_layout = TQVBoxLayout(self,0,0,"ErrorPageLayout")
- vbox = QVBox(self)
+ vbox = TQVBox(self)
vbox.setSpacing(KDialog.spacingHint())
self.top_layout.addWidget(vbox)
- errortext = QLabel(vbox,"errortext")
+ errortext = TQLabel(vbox,"errortext")
errortext.setText(i18n("You need to set up a " +\
"fake Windows drive\n before you can edit settings or run " +\
"Windows applications."))
@@ -462,10 +475,10 @@ class ErrorPage(QWidget):
self.createbutton = KPushButton(i18n("Create Fake Windows Drive"),vbox)
self.connect(self.createbutton,SIGNAL("clicked()"),self.slotCreateClicked)
- bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
+ bottomspacer = TQSpacerItem(51,160,TQSizePolicy.Minimum,TQSizePolicy.Expanding)
self.top_layout.addItem(bottomspacer)
- self.clearWState(Qt.WState_Polished)
+ self.clearWState(TQt.WState_Polished)
def slotCreateClicked(self):
self.parent.CreateWindowsInstall()
@@ -481,7 +494,7 @@ class ErrorPage(QWidget):
##############################################################################
-class DrivesPage(QWidget):
+class DrivesPage(TQWidget):
"""
A TabPage with configuration for drive mappings
"""
@@ -501,7 +514,7 @@ class DrivesPage(QWidget):
'cdrom':4}
def __init__(self,parent = None,name = None,modal = 0,fl = 0):
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
self.updatingGUI = True
@@ -513,36 +526,36 @@ class DrivesPage(QWidget):
self.drives = wineread.LoadDrives()
self.drives[26:] = wineread.GetShellLinks()
- drives_tab_layout = QVBoxLayout(self,0,0,"DrivesTabLayout")
+ drives_tab_layout = TQVBoxLayout(self,0,0,"DrivesTabLayout")
self.top_layout = drives_tab_layout
- vbox = QVBox(self)
+ vbox = TQVBox(self)
vbox.setSpacing(KDialog.spacingHint())
drives_tab_layout.addWidget(vbox)
# -- Drive mappings group
- self.mappings_group_box = QHGroupBox(vbox)
+ self.mappings_group_box = TQHGroupBox(vbox)
self.mappings_group_box.setTitle(i18n("Drive and Directory Mappings"))
self.mappings_group_box.setInsideSpacing(KDialog.spacingHint())
self.mappings_group_box.setInsideMargin(KDialog.marginHint())
- vbox2 = QVBox(self.mappings_group_box)
+ vbox2 = TQVBox(self.mappings_group_box)
vbox2.setSpacing(KDialog.spacingHint())
- spacer = QWidget(vbox2)
+ spacer = TQWidget(vbox2)
vbox2.setStretchFactor(spacer,1)
self.driveslist = TDEListView(vbox2)
self.driveslist.addColumn(i18n("Directory"))
self.driveslist.addColumn(i18n("Links to"))
self.driveslist.setAllColumnsShowFocus(True)
- self.driveslist.setSelectionMode(QListView.Single)
+ self.driveslist.setSelectionMode(TQListView.Single)
self.driveslist.setSorting(-1,True)
- self.connect(self.driveslist, SIGNAL("selectionChanged(QListViewItem *)"), self.slotListClicked)
+ self.connect(self.driveslist, SIGNAL("selectionChanged(TQListViewItem *)"), self.slotListClicked)
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
self.addbutton = KPushButton(i18n("Add Drive..."),hbox)
@@ -551,56 +564,56 @@ class DrivesPage(QWidget):
self.removebutton = KPushButton(i18n("Remove Drive"),hbox)
self.connect(self.removebutton,SIGNAL("clicked()"),self.slotRemoveClicked)
- spacer = QWidget(hbox)
+ spacer = TQWidget(hbox)
hbox.setStretchFactor(spacer,1)
self.autobutton = KPushButton(i18n("Autodetect"),hbox)
self.connect(self.autobutton,SIGNAL("clicked()"),self.slotAutoClicked)
- hbox2 = QHBox(vbox2)
+ hbox2 = TQHBox(vbox2)
hbox2.setSpacing(KDialog.spacingHint())
- pathtext = QLabel(hbox2,"pathtext")
+ pathtext = TQLabel(hbox2,"pathtext")
pathtext.setText(i18n("Path:"))
self.fsfolderedit = KLineEdit("/",hbox2)
self.urlcompletion = KURLCompletion(KURLCompletion.DirCompletion)
self.fsfolderedit.setCompletionObject(self.urlcompletion)
self.fsfolderedit.setCompletionMode(TDEGlobalSettings.CompletionPopup)
- self.connect(self.fsfolderedit,SIGNAL("textChanged(const QString &)"),self.slotFolderEdited)
+ self.connect(self.fsfolderedit,SIGNAL("textChanged(const TQString &)"),self.slotFolderEdited)
self.browsebutton = KPushButton(i18n("Browse"),hbox2)
self.connect(self.browsebutton,SIGNAL("clicked()"),self.slotBrowseClicked)
- hbox2 = QHBox(vbox2)
+ hbox2 = TQHBox(vbox2)
hbox2.setSpacing(KDialog.spacingHint())
- self.typetext = QLabel(hbox2,"typetext")
+ self.typetext = TQLabel(hbox2,"typetext")
self.typetext.setText(i18n("Type:"))
self.typecombo = KComboBox(0,hbox2,"typecombo")
self.fillTypeCombo(self.typecombo)
self.connect(self.typecombo,SIGNAL("activated(int)"),self.slotTypeActivated)
- spacer = QWidget(hbox2)
+ spacer = TQWidget(hbox2)
hbox2.setStretchFactor(spacer,1)
- hbox2 = QHBox(vbox2)
+ hbox2 = TQHBox(vbox2)
hbox2.setSpacing(KDialog.spacingHint())
- self.infotext1 = QLabel(hbox2,"infotext1")
+ self.infotext1 = TQLabel(hbox2,"infotext1")
- hbox2 = QHBox(vbox2)
+ hbox2 = TQHBox(vbox2)
hbox2.setSpacing(KDialog.spacingHint())
- self.infotext2 = QLabel(hbox2,"infotext2")
+ self.infotext2 = TQLabel(hbox2,"infotext2")
- bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
+ bottomspacer = TQSpacerItem(51,160,TQSizePolicy.Minimum,TQSizePolicy.Expanding)
drives_tab_layout.addItem(bottomspacer)
self.changed = False
- self.clearWState(Qt.WState_Polished)
+ self.clearWState(TQt.WState_Polished)
self.updatingGUI=False
@@ -749,7 +762,7 @@ class DrivesPage(QWidget):
for driveid, driveletter, mapping, drivetype, drivelabel, serial in reversed(self.drives):
if mapping or drivelabel:
- lvi = QListViewItem(self.driveslist,driveletter,mapping)
+ lvi = TQListViewItem(self.driveslist,driveletter,mapping)
self.drivesToListItems[driveid] = lvi
if self.selecteddriveid==driveid:
firstselecteddriveid = driveid
@@ -825,7 +838,7 @@ class DrivesPage(QWidget):
self.top_layout.setSpacing(spacing)
############################################################################
-class AudioPage(QWidget):
+class AudioPage(TQWidget):
driversdic = {
"":i18n("None - Disable Sound"),
"alsa":"ALSA",
@@ -858,117 +871,117 @@ class AudioPage(QWidget):
def __init__(self,parent = None,name = None,modal = 0,fl = 0):
global application
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
if not name:
self.setName("AudioTab")
- audio_tab_layout = QVBoxLayout(self,0,0,"AudioTabLayout")
+ audio_tab_layout = TQVBoxLayout(self,0,0,"AudioTabLayout")
self.top_layout = audio_tab_layout
- vbox = QVBox(self)
+ vbox = TQVBox(self)
vbox.setSpacing(KDialog.spacingHint())
audio_tab_layout.addWidget(vbox)
if application:
- appwarning = QLabel(vbox,"appwarning")
+ appwarning = TQLabel(vbox,"appwarning")
appwarning.setText(i18n("Application specific settings for <b>" +\
application + "</b><p>Changing a setting here will permanently " +\
"make that setting independent of settings for all other " +\
"applications.</p>"))
- appwarning.setFrameStyle( QFrame.Box | QFrame.Raised )
+ appwarning.setFrameStyle( TQFrame.Box | TQFrame.Raised )
# -- Drivers group
- self.driver_group_box = QHGroupBox(vbox)
+ self.driver_group_box = TQHGroupBox(vbox)
self.driver_group_box.setTitle(i18n("Driver Selection"))
self.driver_group_box.setInsideSpacing(KDialog.spacingHint())
self.driver_group_box.setInsideMargin(KDialog.marginHint())
- vbox2 = QVBox(self.driver_group_box)
+ vbox2 = TQVBox(self.driver_group_box)
vbox2.setSpacing(KDialog.spacingHint())
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
- drivertext = QLabel(hbox,"drivertext")
+ drivertext = TQLabel(hbox,"drivertext")
drivertext.setText(i18n("Audio Driver:"))
self.drivercombo = KComboBox(0,hbox,"drivercombo")
self.fillDriverCombo(self.drivercombo)
self.connect(self.drivercombo,SIGNAL("activated(int)"),self.slotDriverActivated)
- QToolTip.add(hbox, i18n("Choose an audio driver. Not all audio " +\
+ TQToolTip.add(hbox, i18n("Choose an audio driver. Not all audio " +\
"drivers are available."))
- spacer = QWidget(hbox)
+ spacer = TQWidget(hbox)
hbox.setStretchFactor(spacer,1)
if application:
self.driver_group_box.hide()
# -- DirectSound Settings group
- self.dsound_group_box = QHGroupBox(vbox)
+ self.dsound_group_box = TQHGroupBox(vbox)
self.dsound_group_box.setTitle(i18n("DirectSound"))
self.dsound_group_box.setInsideSpacing(KDialog.spacingHint())
self.dsound_group_box.setInsideMargin(KDialog.marginHint())
- vbox2 = QVBox(self.dsound_group_box)
+ vbox2 = TQVBox(self.dsound_group_box)
vbox2.setSpacing(KDialog.spacingHint())
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
- acceltext = QLabel(hbox,"acceltext")
+ acceltext = TQLabel(hbox,"acceltext")
acceltext.setText(i18n("Hardware Acceleration:"))
self.accelcombo = KComboBox(0,hbox,"accelcombo")
self.fillAccelCombo(self.accelcombo)
self.connect(self.accelcombo,SIGNAL("activated(int)"),self.slotAccelActivated)
- spacer = QWidget(hbox)
+ spacer = TQWidget(hbox)
hbox.setStretchFactor(spacer,1)
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
- self.overridecheckbox = QCheckBox(i18n("Override KDE Sample Rate"),hbox)
+ self.overridecheckbox = TQCheckBox(i18n("Override KDE Sample Rate"),hbox)
hbox.setStretchFactor(self.overridecheckbox,0)
self.connect(self.overridecheckbox,SIGNAL("toggled(bool)"),self.slotOverrideKDESoundToggled)
self.overridecheckbox.hide()
- self.sampleratehbox = QHBox(vbox2)
+ self.sampleratehbox = TQHBox(vbox2)
self.sampleratehbox.setSpacing(KDialog.spacingHint())
- sampletext = QLabel(self.sampleratehbox,"sampletext")
+ sampletext = TQLabel(self.sampleratehbox,"sampletext")
sampletext.setText(i18n("Default Sample Rate:"))
self.samplecombo = KComboBox(0,self.sampleratehbox,"samplecombo")
self.fillSampleCombo(self.samplecombo)
self.connect(self.samplecombo,SIGNAL("activated(int)"),self.slotSampleActivated)
- bitstext = QLabel(self.sampleratehbox,"bitstext")
+ bitstext = TQLabel(self.sampleratehbox,"bitstext")
bitstext.setText(i18n("Default Bits Per Sample:"))
self.bitscombo = KComboBox(0,self.sampleratehbox,"bitscombo")
self.fillBitsCombo(self.bitscombo)
self.connect(self.bitscombo,SIGNAL("activated(int)"),self.slotBitsActivated)
- spacer = QWidget(self.sampleratehbox)
+ spacer = TQWidget(self.sampleratehbox)
self.sampleratehbox.setStretchFactor(spacer,1)
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
- self.drvemucheckbox = QCheckBox(i18n("Driver Emulation"),hbox)
+ self.drvemucheckbox = TQCheckBox(i18n("Driver Emulation"),hbox)
hbox.setStretchFactor(self.drvemucheckbox,0)
self.connect(self.drvemucheckbox,SIGNAL("toggled(bool)"), self.slotDriverEmulToggled)
- bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
+ bottomspacer = TQSpacerItem(51,160,TQSizePolicy.Minimum,TQSizePolicy.Expanding)
audio_tab_layout.addItem(bottomspacer)
self.reset()
- self.clearWState(Qt.WState_Polished)
+ self.clearWState(TQt.WState_Polished)
def fillDriverCombo(self,combo):
""" Fill the combobox with the values from our list """
@@ -1152,7 +1165,7 @@ class AudioPage(QWidget):
############################################################################
-class GraphicsPage(QWidget):
+class GraphicsPage(TQWidget):
# Mapping values in seconds to human-readable labels.
vertexshadersupport = (
@@ -1167,46 +1180,46 @@ class GraphicsPage(QWidget):
def __init__(self,parent = None,name = None,modal = 0,fl = 0):
global currentallowwm
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
if not name:
self.setName("GraphicsTab")
- graphics_tab_layout = QVBoxLayout(self,0,0,"GraphicsTabLayout")
+ graphics_tab_layout = TQVBoxLayout(self,0,0,"GraphicsTabLayout")
self.top_layout = graphics_tab_layout
- vbox = QVBox(self)
+ vbox = TQVBox(self)
vbox.setSpacing(KDialog.spacingHint())
graphics_tab_layout.addWidget(vbox)
if application:
- appwarning = QLabel(vbox,"appwarning")
+ appwarning = TQLabel(vbox,"appwarning")
appwarning.setText(i18n("Application specific settings for <b>" +\
application + "</b><p>Changing a setting here will permanently " +\
"make that setting independent of settings for all other " +\
"applications.</p>"))
- appwarning.setFrameStyle( QFrame.Box | QFrame.Raised )
+ appwarning.setFrameStyle( TQFrame.Box | TQFrame.Raised )
# -- Window settings group
- self.windows_group_box = QHGroupBox(vbox)
+ self.windows_group_box = TQHGroupBox(vbox)
self.windows_group_box.setTitle(i18n("Window Settings"))
self.windows_group_box.setInsideSpacing(KDialog.spacingHint())
self.windows_group_box.setInsideMargin(KDialog.marginHint())
- vbox2 = QVBox(self.windows_group_box)
+ vbox2 = TQVBox(self.windows_group_box)
vbox2.setSpacing(KDialog.spacingHint())
- self.allowcursorcheckbox = QCheckBox(i18n("Allow DirectX applications to stop the mouse leaving their window"),vbox2)
+ self.allowcursorcheckbox = TQCheckBox(i18n("Allow DirectX applications to stop the mouse leaving their window"),vbox2)
self.connect(self.allowcursorcheckbox,SIGNAL("toggled(bool)"), self.slotAllowCursorToggled)
- self.dubbuffercheckbox = QCheckBox(i18n("Enable desktop double buffering"),vbox2)
+ self.dubbuffercheckbox = TQCheckBox(i18n("Enable desktop double buffering"),vbox2)
self.connect(self.dubbuffercheckbox,SIGNAL("toggled(bool)"), self.slotDubBufferToggled)
- self.allowwmcheckbox = QCheckBox(i18n("Allow the window manager to control the windows"),vbox2)
+ self.allowwmcheckbox = TQCheckBox(i18n("Allow the window manager to control the windows"),vbox2)
self.connect(self.allowwmcheckbox,SIGNAL("toggled(bool)"), self.slotAllowWMToggled)
- QToolTip.add(self.allowwmcheckbox, \
+ TQToolTip.add(self.allowwmcheckbox, \
i18n("<p>If windows are managed by your window manager, then they" +\
" will have the standard borders, they will respect your virtual" +\
" desktop and appear in your window list.\n</p><p>" +\
@@ -1215,35 +1228,35 @@ class GraphicsPage(QWidget):
" closely with your desktop, but the emulation will be more" +\
" accurate so it can help some programs work better.</p>"))
- self.showdragcheckbox = QCheckBox(i18n("Display window contents while dragging"),vbox2)
+ self.showdragcheckbox = TQCheckBox(i18n("Display window contents while dragging"),vbox2)
self.connect(self.showdragcheckbox,SIGNAL("toggled(bool)"), self.slotShowDragToggled)
- self.emudesktopcheckbox = QCheckBox(i18n("Emulate a virtual desktop"),vbox2)
+ self.emudesktopcheckbox = TQCheckBox(i18n("Emulate a virtual desktop"),vbox2)
self.connect(self.emudesktopcheckbox,SIGNAL("toggled(bool)"), self.slotEmuDesktopToggled)
- self.desksizehbox = QHBox(vbox2)
+ self.desksizehbox = TQHBox(vbox2)
self.desksizehbox.setSpacing(KDialog.spacingHint())
- desksizetext = QLabel(self.desksizehbox,"desksizetext")
+ desksizetext = TQLabel(self.desksizehbox,"desksizetext")
desksizetext.setText(i18n("Desktop size:"))
self.xsizeedit = KLineEdit("640",self.desksizehbox)
- self.xsizeedit.setValidator(QIntValidator(self.xsizeedit))
- self.connect(self.xsizeedit,SIGNAL("textChanged(const QString &)"),self.slotDesktopSizeChanged)
- bytext = QLabel(self.desksizehbox,"bytext")
+ self.xsizeedit.setValidator(TQIntValidator(self.xsizeedit))
+ self.connect(self.xsizeedit,SIGNAL("textChanged(const TQString &)"),self.slotDesktopSizeChanged)
+ bytext = TQLabel(self.desksizehbox,"bytext")
bytext.setText(i18n("x"))
self.ysizeedit = KLineEdit("480",self.desksizehbox)
- self.ysizeedit.setValidator(QIntValidator(self.ysizeedit))
- self.connect(self.ysizeedit,SIGNAL("textChanged(const QString &)"),self.slotDesktopSizeChanged)
+ self.ysizeedit.setValidator(TQIntValidator(self.ysizeedit))
+ self.connect(self.ysizeedit,SIGNAL("textChanged(const TQString &)"),self.slotDesktopSizeChanged)
- spacer = QWidget(self.desksizehbox)
+ spacer = TQWidget(self.desksizehbox)
self.desksizehbox.setStretchFactor(spacer,1)
- QToolTip.add(self.emudesktopcheckbox,
+ TQToolTip.add(self.emudesktopcheckbox,
i18n("<p>You can choose to emulate a Windows desktop, where all" +\
" the windows are confined to one 'virtual screen', or you" +\
" can have the windows placed on your standard desktop.</p>"))
- QToolTip.add(self.desksizehbox, QToolTip.textFor(self.emudesktopcheckbox))
+ TQToolTip.add(self.desksizehbox, TQToolTip.textFor(self.emudesktopcheckbox))
if application:
self.emudesktopcheckbox.hide()
@@ -1251,50 +1264,50 @@ class GraphicsPage(QWidget):
self.showdragcheckbox.hide()
# -- Direct3D settings group
- self.d3d_group_box = QHGroupBox(vbox)
+ self.d3d_group_box = TQHGroupBox(vbox)
self.d3d_group_box.setTitle(i18n("Direct3D"))
self.d3d_group_box.setInsideSpacing(KDialog.spacingHint())
self.d3d_group_box.setInsideMargin(KDialog.marginHint())
- vbox2 = QVBox(self.d3d_group_box)
+ vbox2 = TQVBox(self.d3d_group_box)
vbox2.setSpacing(KDialog.spacingHint())
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
- vertexshadertext = QLabel(hbox,"vertexshadertext")
+ vertexshadertext = TQLabel(hbox,"vertexshadertext")
vertexshadertext.setText(i18n("Vertex Shader Support:"))
self.accelcombo = KComboBox(0,hbox,"accelcombo")
self.fillCombo(self.accelcombo)
self.connect(self.accelcombo,SIGNAL("activated(int)"),self.slotVertexShaderModeActivated)
- spacer = QWidget(hbox)
+ spacer = TQWidget(hbox)
hbox.setStretchFactor(spacer,1)
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
- self.pixelshadercheckbox = QCheckBox(i18n("Allow Pixel Shader (if supported by hardware)"),hbox)
+ self.pixelshadercheckbox = TQCheckBox(i18n("Allow Pixel Shader (if supported by hardware)"),hbox)
self.connect(self.pixelshadercheckbox,SIGNAL("toggled(bool)"), self.slotPixelShaderModeToggled)
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
- self.glslcheckbox = QCheckBox(i18n("Use GL Shader Language"),hbox)
+ self.glslcheckbox = TQCheckBox(i18n("Use GL Shader Language"),hbox)
self.connect(self.glslcheckbox,SIGNAL("toggled(bool)"), self.slotGLSLToggled)
- QToolTip.add(hbox,
+ TQToolTip.add(hbox,
i18n("<p>This enables the use of GL Shading Language for vertex" +\
" and pixel shaders, as long as the hardware supports it." +\
" This is experimental.</p>"))
- bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
+ bottomspacer = TQSpacerItem(51,160,TQSizePolicy.Minimum,TQSizePolicy.Expanding)
graphics_tab_layout.addItem(bottomspacer)
self.reset()
- self.clearWState(Qt.WState_Polished)
+ self.clearWState(TQt.WState_Polished)
def fillCombo(self,combo):
""" Fill the combobox with the values from our list """
@@ -1517,7 +1530,7 @@ class GraphicsPage(QWidget):
############################################################################
-class AppearancePage(QWidget):
+class AppearancePage(TQWidget):
themes = [unicode(i18n("No Theme"))]
colorschemes = [unicode(i18n("Custom"))]
@@ -1530,83 +1543,83 @@ class AppearancePage(QWidget):
# For example, the value of BorderWidth is
# customizableitems[str(i18n("Window Border"))][1]["BorderWidth"][1]
customizableitems = {"Window Border":
- ({"ActiveBorder":[unicode(i18n("Active Color:")),QColor()],
- "InactiveBorder":[unicode(i18n("Inactive Color:")),QColor()]},
+ ({"ActiveBorder":[unicode(i18n("Active Color:")),TQColor()],
+ "InactiveBorder":[unicode(i18n("Inactive Color:")),TQColor()]},
{"BorderWidth":[unicode(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth
"Title Bar":
- ({"ActiveTitle":[unicode(i18n("Active Color:")),QColor()],
- "GradientActiveTitle":[unicode(i18n("Gradient:")),QColor()],
- "InactiveTitle":[unicode(i18n("Inactive Color:")),QColor()],
- "GradientInactiveTitle":[unicode(i18n("Gradient:")),QColor()],
- "TitleText":[unicode(i18n("Active Text:")),QColor()],
- "InactiveTitleText":[unicode(i18n("Inactive Text:")),QColor()]},
+ ({"ActiveTitle":[unicode(i18n("Active Color:")),TQColor()],
+ "GradientActiveTitle":[unicode(i18n("Gradient:")),TQColor()],
+ "InactiveTitle":[unicode(i18n("Inactive Color:")),TQColor()],
+ "GradientInactiveTitle":[unicode(i18n("Gradient:")),TQColor()],
+ "TitleText":[unicode(i18n("Active Text:")),TQColor()],
+ "InactiveTitleText":[unicode(i18n("Inactive Text:")),TQColor()]},
{}), #ActiveTitle, GradientActiveTitle, InactiveTitle, GradientInactiveTitle, TitleText, InactiveTitleText
"Application Workspace":
- ({"AppWorkSpace":[unicode(i18n("Background Color:")),QColor()]},
+ ({"AppWorkSpace":[unicode(i18n("Background Color:")),TQColor()]},
{}), #AppWorkSpace "Background"
"Buttons":
- ({"ButtonFace":[unicode(i18n("Face:")),QColor()],
- "ButtonHilight":[unicode(i18n("Hilight:")),QColor()],
- "ButtonLight":[unicode(i18n("Light:")),QColor()],
- "ButtonShadow":[unicode(i18n("Shadow:")),QColor()],
- "ButtonText":[unicode(i18n("Text Color:")),QColor()],
- "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),QColor()],
- "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),QColor()],
- "WindowFrame":[unicode(i18n("Frame:")),QColor()]},
+ ({"ButtonFace":[unicode(i18n("Face:")),TQColor()],
+ "ButtonHilight":[unicode(i18n("Hilight:")),TQColor()],
+ "ButtonLight":[unicode(i18n("Light:")),TQColor()],
+ "ButtonShadow":[unicode(i18n("Shadow:")),TQColor()],
+ "ButtonText":[unicode(i18n("Text Color:")),TQColor()],
+ "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),TQColor()],
+ "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),TQColor()],
+ "WindowFrame":[unicode(i18n("Frame:")),TQColor()]},
{}), #ButtonFace, ButtonHilight, ButtonLight, ButtonShadow, ButtonText, ButtonAlternateFace, ButtonDkShadow, WindowFrame
"Caption Buttons":
({},
{"CaptionHeight":[unicode(i18n("Height:")),1],
"CaptionWidth":[unicode(i18n("Width:")),1]}), #Metrics: CaptionHeight, CaptionWidth
"Desktop":
- ({"Background":[unicode(i18n("Background:")),QColor()]},
+ ({"Background":[unicode(i18n("Background:")),TQColor()]},
{}), #Background
"Menu":
- ({"Menu":[unicode(i18n("Menu Background:")),QColor()],
- "MenuBar":[unicode(i18n("Menu Bar Color:")),QColor()],
- "MenuHilight":[unicode(i18n("Menu Hilight:")),QColor()],
- "MenuText":[unicode(i18n("Text Color:")),QColor()]},
+ ({"Menu":[unicode(i18n("Menu Background:")),TQColor()],
+ "MenuBar":[unicode(i18n("Menu Bar Color:")),TQColor()],
+ "MenuHilight":[unicode(i18n("Menu Hilight:")),TQColor()],
+ "MenuText":[unicode(i18n("Text Color:")),TQColor()]},
{"MenuHeight":[unicode(i18n("Menu Bar Height:")),1]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing)
"Scrollbar":
- ({"Scrollbar":[unicode(i18n("Color:")),QColor()]},
+ ({"Scrollbar":[unicode(i18n("Color:")),TQColor()]},
{"ScrollWidth":[unicode(i18n("Width:")),1]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth
"Window":
- ({"Window":[unicode(i18n("Background:")),QColor()],
- "WindowText":[unicode(i18n("Text Color:")),QColor()]},
+ ({"Window":[unicode(i18n("Background:")),TQColor()],
+ "WindowText":[unicode(i18n("Text Color:")),TQColor()]},
{}), #Window "Background", WindowText
"Selected Items":
- ({"Hilight":[unicode(i18n("Hilight Color:")),QColor()],
- "HilightText":[unicode(i18n("Text Color:")),QColor()]},
+ ({"Hilight":[unicode(i18n("Hilight Color:")),TQColor()],
+ "HilightText":[unicode(i18n("Text Color:")),TQColor()]},
{})} #Hilight, HilightText
def __init__(self,parent = None,name = None,modal = 0,fl = 0):
global imagedir
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
if not name:
self.setName("AppearanceTab")
- appearance_tab_layout = QVBoxLayout(self,0,0,"AppearanceTabLayout")
+ appearance_tab_layout = TQVBoxLayout(self,0,0,"AppearanceTabLayout")
self.top_layout = appearance_tab_layout
- vbox = QVBox(self)
+ vbox = TQVBox(self)
vbox.setSpacing(KDialog.spacingHint())
appearance_tab_layout.addWidget(vbox)
# -- Appearance group
- self.appearance_group_box = QVGroupBox(vbox)
+ self.appearance_group_box = TQVGroupBox(vbox)
self.appearance_group_box.setTitle(i18n("Style and Colors"))
self.appearance_group_box.setInsideSpacing(KDialog.spacingHint())
self.appearance_group_box.setInsideMargin(KDialog.marginHint())
- themebox = QWidget(self.appearance_group_box)
+ themebox = TQWidget(self.appearance_group_box)
- theme_layout = QGridLayout(themebox,3,3)
+ theme_layout = TQGridLayout(themebox,3,3)
theme_layout.setSpacing(KDialog.spacingHint())
theme_layout.setColStretch(1,1)
- styletext = QLabel(themebox,"styletext")
+ styletext = TQLabel(themebox,"styletext")
styletext.setText(i18n("Widget Style:"))
theme_layout.addWidget(styletext,0,0)
@@ -1620,7 +1633,7 @@ class AppearancePage(QWidget):
self.connect(self.installbutton,SIGNAL("clicked()"),self.slotInstallThemeClicked)
theme_layout.addWidget(self.installbutton,0,2)
- fontsizetext = QLabel(themebox,"fontsizetext")
+ fontsizetext = TQLabel(themebox,"fontsizetext")
fontsizetext.setText(i18n("Font Size:"))
theme_layout.addWidget(fontsizetext,1,0)
@@ -1629,7 +1642,7 @@ class AppearancePage(QWidget):
self.connect(self.fontsizecombo,SIGNAL("activated(int)"),self.slotFontSizeActivated)
theme_layout.addWidget(self.fontsizecombo,1,1)
- colorschemetext = QLabel(themebox,"colorschemetext")
+ colorschemetext = TQLabel(themebox,"colorschemetext")
colorschemetext.setText(i18n("Color Scheme:"))
theme_layout.addWidget(colorschemetext,2,0)
@@ -1643,19 +1656,19 @@ class AppearancePage(QWidget):
theme_layout.addWidget(self.saveschemebutton,2,2)
# --- Custom Colors ---
- hbox = QHBox(self.appearance_group_box)
+ hbox = TQHBox(self.appearance_group_box)
hbox.setSpacing(KDialog.spacingHint())
self.sizehbox = hbox
- self.leftspacer = QWidget(hbox)
+ self.leftspacer = TQWidget(hbox)
- self.customcolorsvbox = QVBox(hbox)
+ self.customcolorsvbox = TQVBox(hbox)
self.customcolorsvbox.setSpacing(KDialog.spacingHint())
- hbox = QHBox(self.customcolorsvbox)
+ hbox = TQHBox(self.customcolorsvbox)
hbox.setSpacing(KDialog.spacingHint())
- itemtext = QLabel(hbox,"itemtext")
+ itemtext = TQLabel(hbox,"itemtext")
itemtext.setText(i18n("Item:"))
self.itemcombo = KComboBox(0,hbox,"itemcombo")
@@ -1663,159 +1676,159 @@ class AppearancePage(QWidget):
self.connect(self.itemcombo,SIGNAL("activated(int)"),self.slotItemActivated)
hbox.setStretchFactor(self.itemcombo,1)
- self.customcolorsgrid = QWidget(self.customcolorsvbox)
- self.customcolorsgrid_layout = QGridLayout(self.customcolorsgrid,4,2)
+ self.customcolorsgrid = TQWidget(self.customcolorsvbox)
+ self.customcolorsgrid_layout = TQGridLayout(self.customcolorsgrid,4,2)
self.customcolorsgrid_layout.setSpacing(KDialog.spacingHint())
# Box 1 of 8
- self.colorsizehbox1 = QWidget(self.customcolorsgrid,"colorsizehbox1")
+ self.colorsizehbox1 = TQWidget(self.customcolorsgrid,"colorsizehbox1")
self.customcolorsgrid_layout.addWidget(self.colorsizehbox1,0,0)
- self.colorsizehbox1_layout = QGridLayout(self.colorsizehbox1,1,2)
+ self.colorsizehbox1_layout = TQGridLayout(self.colorsizehbox1,1,2)
self.colorsizehbox1_layout.setSpacing(KDialog.spacingHint())
- self.colorsizetext1 = QLabel(self.colorsizehbox1,"colorsizetext1")
+ self.colorsizetext1 = TQLabel(self.colorsizehbox1,"colorsizetext1")
self.colorsizetext1.setText(i18n(":"))
- self.colorsizehbox1_layout.addWidget(self.colorsizetext1,0,0,Qt.AlignRight)
+ self.colorsizehbox1_layout.addWidget(self.colorsizetext1,0,0,TQt.AlignRight)
- self.sizespinbox1 = QSpinBox(self.colorsizehbox1,"sizespinbox1")
+ self.sizespinbox1 = TQSpinBox(self.colorsizehbox1,"sizespinbox1")
self.sizespinbox1.setMinValue(0)
self.connect(self.sizespinbox1,SIGNAL("valueChanged(int)"),self.slotSizeActivated)
self.colorcombo1 = KColorCombo(self.colorsizehbox1,"colorcombo1")
- self.connect(self.colorcombo1,SIGNAL("activated(const QColor &)"),self.slotColorActivated)
+ self.connect(self.colorcombo1,SIGNAL("activated(const TQColor &)"),self.slotColorActivated)
# Box 2 of 8
- self.colorsizehbox2 = QWidget(self.customcolorsgrid,"colorsizehbox2")
+ self.colorsizehbox2 = TQWidget(self.customcolorsgrid,"colorsizehbox2")
self.customcolorsgrid_layout.addWidget(self.colorsizehbox2,0,1)
- self.colorsizehbox2_layout = QGridLayout(self.colorsizehbox2,1,2)
+ self.colorsizehbox2_layout = TQGridLayout(self.colorsizehbox2,1,2)
self.colorsizehbox2_layout.setSpacing(KDialog.spacingHint())
- self.colorsizetext2 = QLabel(self.colorsizehbox2,"colorsizetext2")
+ self.colorsizetext2 = TQLabel(self.colorsizehbox2,"colorsizetext2")
self.colorsizetext2.setText(i18n(":"))
- self.colorsizehbox2_layout.addWidget(self.colorsizetext2,0,0,Qt.AlignRight)
+ self.colorsizehbox2_layout.addWidget(self.colorsizetext2,0,0,TQt.AlignRight)
- self.sizespinbox2 = QSpinBox(self.colorsizehbox2,"sizespinbox2")
+ self.sizespinbox2 = TQSpinBox(self.colorsizehbox2,"sizespinbox2")
self.sizespinbox2.setMinValue(0)
self.connect(self.sizespinbox2,SIGNAL("valueChanged(int)"),self.slotSizeActivated)
self.colorcombo2 = KColorCombo(self.colorsizehbox2,"colorcombo2")
- self.connect(self.colorcombo2,SIGNAL("activated(const QColor &)"),self.slotColorActivated)
+ self.connect(self.colorcombo2,SIGNAL("activated(const TQColor &)"),self.slotColorActivated)
# Box 3 of 8
- self.colorsizehbox3 = QWidget(self.customcolorsgrid,"colorsizehbox3")
+ self.colorsizehbox3 = TQWidget(self.customcolorsgrid,"colorsizehbox3")
self.customcolorsgrid_layout.addWidget(self.colorsizehbox3,1,0)
- self.colorsizehbox3_layout = QGridLayout(self.colorsizehbox3,1,2)
+ self.colorsizehbox3_layout = TQGridLayout(self.colorsizehbox3,1,2)
self.colorsizehbox3_layout.setSpacing(KDialog.spacingHint())
- self.colorsizetext3 = QLabel(self.colorsizehbox3,"colorsizetext3")
+ self.colorsizetext3 = TQLabel(self.colorsizehbox3,"colorsizetext3")
self.colorsizetext3.setText(i18n(":"))
- self.colorsizehbox3_layout.addWidget(self.colorsizetext3,0,0,Qt.AlignRight)
+ self.colorsizehbox3_layout.addWidget(self.colorsizetext3,0,0,TQt.AlignRight)
- self.sizespinbox3 = QSpinBox(self.colorsizehbox3,"sizespinbox3")
+ self.sizespinbox3 = TQSpinBox(self.colorsizehbox3,"sizespinbox3")
self.sizespinbox3.setMinValue(0)
self.connect(self.sizespinbox3,SIGNAL("valueChanged(int)"),self.slotSizeActivated)
self.colorcombo3 = KColorCombo(self.colorsizehbox3,"colorcombo3")
- self.connect(self.colorcombo3,SIGNAL("activated(const QColor &)"),self.slotColorActivated)
+ self.connect(self.colorcombo3,SIGNAL("activated(const TQColor &)"),self.slotColorActivated)
# Box 4 of 8
- self.colorsizehbox4 = QWidget(self.customcolorsgrid,"colorsizehbox4")
+ self.colorsizehbox4 = TQWidget(self.customcolorsgrid,"colorsizehbox4")
self.customcolorsgrid_layout.addWidget(self.colorsizehbox4,1,1)
- self.colorsizehbox4_layout = QGridLayout(self.colorsizehbox4,1,2)
+ self.colorsizehbox4_layout = TQGridLayout(self.colorsizehbox4,1,2)
self.colorsizehbox4_layout.setSpacing(KDialog.spacingHint())
- self.colorsizetext4 = QLabel(self.colorsizehbox4,"colorsizetext4")
+ self.colorsizetext4 = TQLabel(self.colorsizehbox4,"colorsizetext4")
self.colorsizetext4.setText(i18n(":"))
- self.colorsizehbox4_layout.addWidget(self.colorsizetext4,0,0,Qt.AlignRight)
+ self.colorsizehbox4_layout.addWidget(self.colorsizetext4,0,0,TQt.AlignRight)
- self.sizespinbox4 = QSpinBox(self.colorsizehbox4,"sizespinbox4")
+ self.sizespinbox4 = TQSpinBox(self.colorsizehbox4,"sizespinbox4")
self.sizespinbox4.setMinValue(0)
self.connect(self.sizespinbox4,SIGNAL("valueChanged(int)"),self.slotSizeActivated)
self.colorcombo4 = KColorCombo(self.colorsizehbox4,"colorcombo4")
- self.connect(self.colorcombo4,SIGNAL("activated(const QColor &)"),self.slotColorActivated)
+ self.connect(self.colorcombo4,SIGNAL("activated(const TQColor &)"),self.slotColorActivated)
# Box 5 of 8
- self.colorsizehbox5 = QWidget(self.customcolorsgrid,"colorsizehbox5")
+ self.colorsizehbox5 = TQWidget(self.customcolorsgrid,"colorsizehbox5")
self.customcolorsgrid_layout.addWidget(self.colorsizehbox5,2,0)
- self.colorsizehbox5_layout = QGridLayout(self.colorsizehbox5,1,2)
+ self.colorsizehbox5_layout = TQGridLayout(self.colorsizehbox5,1,2)
self.colorsizehbox5_layout.setSpacing(KDialog.spacingHint())
- self.colorsizetext5 = QLabel(self.colorsizehbox5,"colorsizetext5")
+ self.colorsizetext5 = TQLabel(self.colorsizehbox5,"colorsizetext5")
self.colorsizetext5.setText(i18n(":"))
- self.colorsizehbox5_layout.addWidget(self.colorsizetext5,0,0,Qt.AlignRight)
+ self.colorsizehbox5_layout.addWidget(self.colorsizetext5,0,0,TQt.AlignRight)
- self.sizespinbox5 = QSpinBox(self.colorsizehbox5,"sizespinbox5")
+ self.sizespinbox5 = TQSpinBox(self.colorsizehbox5,"sizespinbox5")
self.sizespinbox5.setMinValue(0)
self.connect(self.sizespinbox5,SIGNAL("valueChanged(int)"),self.slotSizeActivated)
self.colorcombo5 = KColorCombo(self.colorsizehbox5,"colorcombo5")
- self.connect(self.colorcombo5,SIGNAL("activated(const QColor &)"),self.slotColorActivated)
+ self.connect(self.colorcombo5,SIGNAL("activated(const TQColor &)"),self.slotColorActivated)
# Box 6 of 8
- self.colorsizehbox6 = QWidget(self.customcolorsgrid,"colorsizehbox6")
+ self.colorsizehbox6 = TQWidget(self.customcolorsgrid,"colorsizehbox6")
self.customcolorsgrid_layout.addWidget(self.colorsizehbox6,2,1)
- self.colorsizehbox6_layout = QGridLayout(self.colorsizehbox6,1,2)
+ self.colorsizehbox6_layout = TQGridLayout(self.colorsizehbox6,1,2)
self.colorsizehbox6_layout.setSpacing(KDialog.spacingHint())
- self.colorsizetext6 = QLabel(self.colorsizehbox6,"colorsizetext6")
+ self.colorsizetext6 = TQLabel(self.colorsizehbox6,"colorsizetext6")
self.colorsizetext6.setText(i18n(":"))
- self.colorsizehbox6_layout.addWidget(self.colorsizetext6,0,0,Qt.AlignRight)
+ self.colorsizehbox6_layout.addWidget(self.colorsizetext6,0,0,TQt.AlignRight)
- self.sizespinbox6 = QSpinBox(self.colorsizehbox6,"sizespinbox6")
+ self.sizespinbox6 = TQSpinBox(self.colorsizehbox6,"sizespinbox6")
self.sizespinbox6.setMinValue(0)
self.connect(self.sizespinbox6,SIGNAL("valueChanged(int)"),self.slotSizeActivated)
self.colorcombo6 = KColorCombo(self.colorsizehbox6,"colorcombo6")
- self.connect(self.colorcombo6,SIGNAL("activated(const QColor &)"),self.slotColorActivated)
+ self.connect(self.colorcombo6,SIGNAL("activated(const TQColor &)"),self.slotColorActivated)
# Box 7 of 8
- self.colorsizehbox7 = QWidget(self.customcolorsgrid,"colorsizehbox7")
+ self.colorsizehbox7 = TQWidget(self.customcolorsgrid,"colorsizehbox7")
self.customcolorsgrid_layout.addWidget(self.colorsizehbox7,3,0)
- self.colorsizehbox7_layout = QGridLayout(self.colorsizehbox7,1,2)
+ self.colorsizehbox7_layout = TQGridLayout(self.colorsizehbox7,1,2)
self.colorsizehbox7_layout.setSpacing(KDialog.spacingHint())
- self.colorsizetext7 = QLabel(self.colorsizehbox7,"colorsizetext7")
+ self.colorsizetext7 = TQLabel(self.colorsizehbox7,"colorsizetext7")
self.colorsizetext7.setText(i18n(":"))
- self.colorsizehbox7_layout.addWidget(self.colorsizetext7,0,0,Qt.AlignRight)
+ self.colorsizehbox7_layout.addWidget(self.colorsizetext7,0,0,TQt.AlignRight)
- self.sizespinbox7 = QSpinBox(self.colorsizehbox7,"sizespinbox7")
+ self.sizespinbox7 = TQSpinBox(self.colorsizehbox7,"sizespinbox7")
self.sizespinbox7.setMinValue(0)
self.connect(self.sizespinbox7,SIGNAL("valueChanged(int)"),self.slotSizeActivated)
self.colorcombo7 = KColorCombo(self.colorsizehbox7,"colorcombo7")
- self.connect(self.colorcombo7,SIGNAL("activated(const QColor &)"),self.slotColorActivated)
+ self.connect(self.colorcombo7,SIGNAL("activated(const TQColor &)"),self.slotColorActivated)
# Box 8 of 8
- self.colorsizehbox8 = QWidget(self.customcolorsgrid,"colorsizehbox8")
+ self.colorsizehbox8 = TQWidget(self.customcolorsgrid,"colorsizehbox8")
self.customcolorsgrid_layout.addWidget(self.colorsizehbox8,3,1)
- self.colorsizehbox8_layout = QGridLayout(self.colorsizehbox8,1,2)
+ self.colorsizehbox8_layout = TQGridLayout(self.colorsizehbox8,1,2)
self.colorsizehbox8_layout.setSpacing(KDialog.spacingHint())
- self.colorsizetext8 = QLabel(self.colorsizehbox8,"colorsizetext8")
+ self.colorsizetext8 = TQLabel(self.colorsizehbox8,"colorsizetext8")
self.colorsizetext8.setText(i18n(":"))
- self.colorsizehbox8_layout.addWidget(self.colorsizetext8,0,0,Qt.AlignRight)
+ self.colorsizehbox8_layout.addWidget(self.colorsizetext8,0,0,TQt.AlignRight)
- self.sizespinbox8 = QSpinBox(self.colorsizehbox8,"sizespinbox8")
+ self.sizespinbox8 = TQSpinBox(self.colorsizehbox8,"sizespinbox8")
self.sizespinbox8.setMinValue(0)
self.connect(self.sizespinbox8,SIGNAL("valueChanged(int)"),self.slotSizeActivated)
self.colorcombo8 = KColorCombo(self.colorsizehbox8,"colorcombo8")
- self.connect(self.colorcombo8,SIGNAL("activated(const QColor &)"),self.slotColorActivated)
+ self.connect(self.colorcombo8,SIGNAL("activated(const TQColor &)"),self.slotColorActivated)
- spacer = QWidget(self.customcolorsvbox)
+ spacer = TQWidget(self.customcolorsvbox)
self.customcolorsvbox.setStretchFactor(spacer,1)
self.customcolorsvbox.setMinimumHeight(itemtext.height()*4.5)
#self.customcolorsvbox.setStretchFactor(self.customcolorsgrid,1)
- bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
+ bottomspacer = TQSpacerItem(51,160,TQSizePolicy.Minimum,TQSizePolicy.Expanding)
appearance_tab_layout.addItem(bottomspacer)
self.selecteditem = None
self.config = TDEConfig("wineconfigrc",False,False)
self.reset()
- self.clearWState(Qt.WState_Polished)
+ self.clearWState(TQt.WState_Polished)
def isChanged(self):
changed = False
@@ -1836,9 +1849,9 @@ class AppearancePage(QWidget):
for key in self.customizableitems[item][0].keys():
color = colors.get(key,"0 0 0")
color = color.split()
- color = QColor(int(color[0]),int(color[1]),int(color[2]))
+ color = TQColor(int(color[0]),int(color[1]),int(color[2]))
if not custom and self.customizableitems[item][0][key][1] !=\
- self.config.readColorEntry(key,QColor(0,0,0)):
+ self.config.readColorEntry(key,TQColor(0,0,0)):
self.__selectColorScheme(0)
custom = True
if self.customizableitems[item][0][key][1] != color:
@@ -1915,8 +1928,8 @@ class AppearancePage(QWidget):
for key in self.customizableitems[item][0].keys():
color = colors.get(key,"0 0 0")
color = color.split()
- color = QColor(int(color[0]),int(color[1]),int(color[2]))
- if color != self.config.readColorEntry(key,QColor(0,0,0)):
+ color = TQColor(int(color[0]),int(color[1]),int(color[2]))
+ if color != self.config.readColorEntry(key,TQColor(0,0,0)):
self.currentcustomcolorscheme = self.colorschemes[0]
self.customizableitems[item][0][key][1] = color
for key in self.customizableitems[item][1].keys():
@@ -2115,63 +2128,63 @@ class AppearancePage(QWidget):
config.setGroup("General")
self.customizableitems["Application Workspace"][0]["AppWorkSpace"][1] =\
- config.readColorEntry("background",QColor(100,100,100))
+ config.readColorEntry("background",TQColor(100,100,100))
self.customizableitems["Buttons"][0]["ButtonFace"][1] =\
- config.readColorEntry("background",QColor(230,230,230))
+ config.readColorEntry("background",TQColor(230,230,230))
self.customizableitems["Buttons"][0]["ButtonHilight"][1] =\
- config.readColorEntry("windowBackground",QColor(240,240,240))
+ config.readColorEntry("windowBackground",TQColor(240,240,240))
self.customizableitems["Buttons"][0]["ButtonLight"][1] =\
- config.readColorEntry("selectBackground",QColor(200,200,200)).light(135)
+ config.readColorEntry("selectBackground",TQColor(200,200,200)).light(135)
self.customizableitems["Buttons"][0]["ButtonShadow"][1] =\
- config.readColorEntry("background",QColor(100,100,100)).dark(180)
+ config.readColorEntry("background",TQColor(100,100,100)).dark(180)
self.customizableitems["Buttons"][0]["ButtonText"][1] =\
- config.readColorEntry("buttonForeground",QColor(0,0,0))
+ config.readColorEntry("buttonForeground",TQColor(0,0,0))
self.customizableitems["Buttons"][0]["ButtonAlternateFace"][1] =\
- config.readColorEntry("background",QColor(230,230,230))
+ config.readColorEntry("background",TQColor(230,230,230))
self.customizableitems["Buttons"][0]["ButtonDkShadow"][1] =\
- config.readColorEntry("selectBackground",QColor(0,0,0)).dark(146)
+ config.readColorEntry("selectBackground",TQColor(0,0,0)).dark(146)
self.customizableitems["Buttons"][0]["WindowFrame"][1] =\
- config.readColorEntry("selectBackground",QColor(0,0,0))
+ config.readColorEntry("selectBackground",TQColor(0,0,0))
self.customizableitems["Menu"][0]["Menu"][1] =\
- config.readColorEntry("background",QColor(230,230,230)).light(105)
+ config.readColorEntry("background",TQColor(230,230,230)).light(105)
self.customizableitems["Menu"][0]["MenuBar"][1] =\
- config.readColorEntry("background",QColor(230,230,230))
+ config.readColorEntry("background",TQColor(230,230,230))
self.customizableitems["Menu"][0]["MenuHilight"][1] =\
- config.readColorEntry("selectBackground",QColor(0,0,0))
+ config.readColorEntry("selectBackground",TQColor(0,0,0))
self.customizableitems["Menu"][0]["MenuText"][1] =\
- config.readColorEntry("foreground",QColor(0,0,0))
+ config.readColorEntry("foreground",TQColor(0,0,0))
self.customizableitems["Scrollbar"][0]["Scrollbar"][1] =\
- config.readColorEntry("background",QColor(230,230,230))
+ config.readColorEntry("background",TQColor(230,230,230))
self.customizableitems["Window"][0]["Window"][1] =\
- config.readColorEntry("windowBackground",QColor(255,255,255))
+ config.readColorEntry("windowBackground",TQColor(255,255,255))
self.customizableitems["Window"][0]["WindowText"][1] =\
- config.readColorEntry("foreground",QColor(0,0,0))
+ config.readColorEntry("foreground",TQColor(0,0,0))
self.customizableitems["Selected Items"][0]["Hilight"][1] =\
- config.readColorEntry("selectBackground",QColor(0,0,0))
+ config.readColorEntry("selectBackground",TQColor(0,0,0))
self.customizableitems["Selected Items"][0]["HilightText"][1] =\
- config.readColorEntry("selectForeground",QColor(255,255,255))
+ config.readColorEntry("selectForeground",TQColor(255,255,255))
config.setGroup("WM")
self.customizableitems["Title Bar"][0]["ActiveTitle"][1] =\
- config.readColorEntry("activeBackground",QColor(10,10,100))
+ config.readColorEntry("activeBackground",TQColor(10,10,100))
self.customizableitems["Title Bar"][0]["GradientActiveTitle"][1] =\
- config.readColorEntry("activeBlend",QColor(10,10,200)).light(110)
+ config.readColorEntry("activeBlend",TQColor(10,10,200)).light(110)
self.customizableitems["Title Bar"][0]["InactiveTitle"][1] =\
- config.readColorEntry("inactiveBackground",QColor(100,100,100))
+ config.readColorEntry("inactiveBackground",TQColor(100,100,100))
self.customizableitems["Title Bar"][0]["GradientInactiveTitle"][1] =\
- config.readColorEntry("inactiveBlend",QColor(100,100,200))
+ config.readColorEntry("inactiveBlend",TQColor(100,100,200))
self.customizableitems["Title Bar"][0]["TitleText"][1] =\
- config.readColorEntry("activeForeground",QColor(255,255,255))
+ config.readColorEntry("activeForeground",TQColor(255,255,255))
self.customizableitems["Title Bar"][0]["InactiveTitleText"][1] =\
- config.readColorEntry("inactiveForeground",QColor(250,250,250))
+ config.readColorEntry("inactiveForeground",TQColor(250,250,250))
self.customizableitems["Window Border"][0]["ActiveBorder"][1] =\
- config.readColorEntry("frame",QColor(10,10,100))
+ config.readColorEntry("frame",TQColor(10,10,100))
self.customizableitems["Window Border"][0]["InactiveBorder"][1] =\
- config.readColorEntry("frame",QColor(100,100,200))
+ config.readColorEntry("frame",TQColor(100,100,200))
config.setGroup("Desktop0")
self.customizableitems["Desktop"][0]["Background"][1] =\
- config.readColorEntry("Color1",QColor(50,150,85))
+ config.readColorEntry("Color1",TQColor(50,150,85))
self.saveColorScheme(self.colorschemes[1])
@@ -2229,7 +2242,7 @@ class AppearancePage(QWidget):
self.config.setGroup(self.colorschemes[colorid])
for item in self.customizableitems.keys():
for key in self.customizableitems[item][0].keys():
- color = self.config.readColorEntry(key,QColor(0,0,0))
+ color = self.config.readColorEntry(key,TQColor(0,0,0))
self.customizableitems[item][0][key][1] = color
for key in self.customizableitems[item][1].keys():
size = self.config.readNumEntry(key,1)
@@ -2734,109 +2747,109 @@ class AppearancePage(QWidget):
# --- Some default color schemes, with names ---
preset1 = (unicode(i18n("Purple")),
{"Window Border":
- ({"ActiveBorder":[unicode(i18n("Active Color:")),QColor(239,239,239)],
- "InactiveBorder":[unicode(i18n("Inactive Color:")),QColor(239,239,239)]},
+ ({"ActiveBorder":[unicode(i18n("Active Color:")),TQColor(239,239,239)],
+ "InactiveBorder":[unicode(i18n("Inactive Color:")),TQColor(239,239,239)]},
{"BorderWidth":[unicode(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth
"Title Bar":
- ({"ActiveTitle":[unicode(i18n("Active Color:")),QColor(91,86,168)],
- "GradientActiveTitle":[unicode(i18n("Gradient:")),QColor(136,118,202)],
- "InactiveTitle":[unicode(i18n("Inactive Color:")),QColor(223,225,230)],
- "GradientInactiveTitle":[unicode(i18n("Gradient:")),QColor(157,170,186)],
- "TitleText":[unicode(i18n("Active Text:")),QColor(255,255,255)],
- "InactiveTitleText":[unicode(i18n("Inactive Text:")),QColor(168,168,168)]},
+ ({"ActiveTitle":[unicode(i18n("Active Color:")),TQColor(91,86,168)],
+ "GradientActiveTitle":[unicode(i18n("Gradient:")),TQColor(136,118,202)],
+ "InactiveTitle":[unicode(i18n("Inactive Color:")),TQColor(223,225,230)],
+ "GradientInactiveTitle":[unicode(i18n("Gradient:")),TQColor(157,170,186)],
+ "TitleText":[unicode(i18n("Active Text:")),TQColor(255,255,255)],
+ "InactiveTitleText":[unicode(i18n("Inactive Text:")),TQColor(168,168,168)]},
{}), #ActiveTitle, GradientActiveTitle, InactiveTitle, GradientInactiveTitle, TitleText, InactiveTitleText
"Application Workspace":
- ({"AppWorkSpace":[unicode(i18n("Background Color:")),QColor(90,90,90)]},
+ ({"AppWorkSpace":[unicode(i18n("Background Color:")),TQColor(90,90,90)]},
{}), #AppWorkSpace "Background"
"Buttons":
- ({"ButtonFace":[unicode(i18n("Face:")),QColor(238,239,242)],
- "ButtonHilight":[unicode(i18n("Hilight:")),QColor(255,255,255)],
- "ButtonLight":[unicode(i18n("Light:")),QColor(201,199,255)],
- "ButtonShadow":[unicode(i18n("Shadow:")),QColor(132,132,134)],
- "ButtonText":[unicode(i18n("Text Color:")),QColor(0,0,0)],
- "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),QColor(238,239,242)],
- "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),QColor(98,96,143)],
- "WindowFrame":[unicode(i18n("Frame:")),QColor(144,140,209)]},
+ ({"ButtonFace":[unicode(i18n("Face:")),TQColor(238,239,242)],
+ "ButtonHilight":[unicode(i18n("Hilight:")),TQColor(255,255,255)],
+ "ButtonLight":[unicode(i18n("Light:")),TQColor(201,199,255)],
+ "ButtonShadow":[unicode(i18n("Shadow:")),TQColor(132,132,134)],
+ "ButtonText":[unicode(i18n("Text Color:")),TQColor(0,0,0)],
+ "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),TQColor(238,239,242)],
+ "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),TQColor(98,96,143)],
+ "WindowFrame":[unicode(i18n("Frame:")),TQColor(144,140,209)]},
{}), #ButtonFace, ButtonHilight, ButtonLight, ButtonShadow, ButtonText, ButtonAlternateFace, ButtonDkShadow, WindowFrame
"Caption Buttons":
({},
{"CaptionHeight":[unicode(i18n("Height:")),22],
"CaptionWidth":[unicode(i18n("Width:")),22]}), #Metrics: CaptionHeight, CaptionWidth
"Desktop":
- ({"Background":[unicode(i18n("Background:")),QColor(146,127,188)]},
+ ({"Background":[unicode(i18n("Background:")),TQColor(146,127,188)]},
{}), #Background
"Menu":
- ({"Menu":[unicode(i18n("Menu Background:")),QColor(250,251,254)],
- "MenuBar":[unicode(i18n("Menu Bar Color:")),QColor(238,239,242)],
- "MenuHilight":[unicode(i18n("Menu Hilight:")),QColor(144,140,209)],
- "MenuText":[unicode(i18n("Text Color:")),QColor(0,0,0)]},
+ ({"Menu":[unicode(i18n("Menu Background:")),TQColor(250,251,254)],
+ "MenuBar":[unicode(i18n("Menu Bar Color:")),TQColor(238,239,242)],
+ "MenuHilight":[unicode(i18n("Menu Hilight:")),TQColor(144,140,209)],
+ "MenuText":[unicode(i18n("Text Color:")),TQColor(0,0,0)]},
{"MenuHeight":[unicode(i18n("Menu Bar Height:")),22]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing)
"Scrollbar":
- ({"Scrollbar":[unicode(i18n("Color:")),QColor(238,239,242)]},
+ ({"Scrollbar":[unicode(i18n("Color:")),TQColor(238,239,242)]},
{"ScrollWidth":[unicode(i18n("Width:")),16]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth
"Window":
- ({"Window":[unicode(i18n("Background:")),QColor(255,255,255)],
- "WindowText":[unicode(i18n("Text Color:")),QColor(0,0,0)]},
+ ({"Window":[unicode(i18n("Background:")),TQColor(255,255,255)],
+ "WindowText":[unicode(i18n("Text Color:")),TQColor(0,0,0)]},
{}), #Window "Background", WindowText
"Selected Items":
- ({"Hilight":[unicode(i18n("Hilight Color:")),QColor(144,140,209)],
- "HilightText":[unicode(i18n("Text Color:")),QColor(255,255,255)]},
+ ({"Hilight":[unicode(i18n("Hilight Color:")),TQColor(144,140,209)],
+ "HilightText":[unicode(i18n("Text Color:")),TQColor(255,255,255)]},
{})}) #Hilight, HilightText
preset2 = (unicode(i18n("Blue")),
{"Window Border":
- ({"ActiveBorder":[unicode(i18n("Active Color:")),QColor(239,239,239)],
- "InactiveBorder":[unicode(i18n("Inactive Color:")),QColor(239,239,239)]},
+ ({"ActiveBorder":[unicode(i18n("Active Color:")),TQColor(239,239,239)],
+ "InactiveBorder":[unicode(i18n("Inactive Color:")),TQColor(239,239,239)]},
{"BorderWidth":[unicode(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth
"Title Bar":
- ({"ActiveTitle":[unicode(i18n("Active Color:")),QColor(0,113,201)],
- "GradientActiveTitle":[unicode(i18n("Gradient:")),QColor(87,161,219)],
- "InactiveTitle":[unicode(i18n("Inactive Color:")),QColor(191,191,191)],
- "GradientInactiveTitle":[unicode(i18n("Gradient:")),QColor(171,171,171)],
- "TitleText":[unicode(i18n("Active Text:")),QColor(255,255,255)],
- "InactiveTitleText":[unicode(i18n("Inactive Text:")),QColor(95,95,95)]},
+ ({"ActiveTitle":[unicode(i18n("Active Color:")),TQColor(0,113,201)],
+ "GradientActiveTitle":[unicode(i18n("Gradient:")),TQColor(87,161,219)],
+ "InactiveTitle":[unicode(i18n("Inactive Color:")),TQColor(191,191,191)],
+ "GradientInactiveTitle":[unicode(i18n("Gradient:")),TQColor(171,171,171)],
+ "TitleText":[unicode(i18n("Active Text:")),TQColor(255,255,255)],
+ "InactiveTitleText":[unicode(i18n("Inactive Text:")),TQColor(95,95,95)]},
{}), #ActiveTitle, GradientActiveTitle, InactiveTitle, GradientInactiveTitle, TitleText, InactiveTitleText
"Application Workspace":
- ({"AppWorkSpace":[unicode(i18n("Background Color:")),QColor(90,90,90)]},
+ ({"AppWorkSpace":[unicode(i18n("Background Color:")),TQColor(90,90,90)]},
{}), #AppWorkSpace "Background"
"Buttons":
- ({"ButtonFace":[unicode(i18n("Face:")),QColor(239,239,239)],
- "ButtonHilight":[unicode(i18n("Hilight:")),QColor(246,246,246)],
- "ButtonLight":[unicode(i18n("Light:")),QColor(191,207,251)],
- "ButtonShadow":[unicode(i18n("Shadow:")),QColor(148,148,153)],
- "ButtonText":[unicode(i18n("Text Color:")),QColor(0,0,0)],
- "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),QColor(238,239,242)],
- "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),QColor(50,101,146)],
- "WindowFrame":[unicode(i18n("Frame:")),QColor(74,149,214)]},
+ ({"ButtonFace":[unicode(i18n("Face:")),TQColor(239,239,239)],
+ "ButtonHilight":[unicode(i18n("Hilight:")),TQColor(246,246,246)],
+ "ButtonLight":[unicode(i18n("Light:")),TQColor(191,207,251)],
+ "ButtonShadow":[unicode(i18n("Shadow:")),TQColor(148,148,153)],
+ "ButtonText":[unicode(i18n("Text Color:")),TQColor(0,0,0)],
+ "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),TQColor(238,239,242)],
+ "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),TQColor(50,101,146)],
+ "WindowFrame":[unicode(i18n("Frame:")),TQColor(74,149,214)]},
{}), #ButtonFace, ButtonHilight, ButtonLight, ButtonShadow, ButtonText, ButtonAlternateFace, ButtonDkShadow, WindowFrame
"Caption Buttons":
({},
{"CaptionHeight":[unicode(i18n("Height:")),22],
"CaptionWidth":[unicode(i18n("Width:")),22]}), #Metrics: CaptionHeight, CaptionWidth
"Desktop":
- ({"Background":[unicode(i18n("Background:")),QColor(44,109,189)]},
+ ({"Background":[unicode(i18n("Background:")),TQColor(44,109,189)]},
{}), #Background
"Menu":
- ({"Menu":[unicode(i18n("Menu Background:")),QColor(249,249,249)],
- "MenuBar":[unicode(i18n("Menu Bar Color:")),QColor(239,239,239)],
- "MenuHilight":[unicode(i18n("Menu Hilight:")),QColor(74,149,214)],
- "MenuText":[unicode(i18n("Text Color:")),QColor(0,0,0)]},
+ ({"Menu":[unicode(i18n("Menu Background:")),TQColor(249,249,249)],
+ "MenuBar":[unicode(i18n("Menu Bar Color:")),TQColor(239,239,239)],
+ "MenuHilight":[unicode(i18n("Menu Hilight:")),TQColor(74,149,214)],
+ "MenuText":[unicode(i18n("Text Color:")),TQColor(0,0,0)]},
{"MenuHeight":[unicode(i18n("Menu Bar Height:")),22]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing)
"Scrollbar":
- ({"Scrollbar":[unicode(i18n("Color:")),QColor(230,230,230)]},
+ ({"Scrollbar":[unicode(i18n("Color:")),TQColor(230,230,230)]},
{"ScrollWidth":[unicode(i18n("Width:")),16]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth
"Window":
- ({"Window":[unicode(i18n("Background:")),QColor(255,255,255)],
- "WindowText":[unicode(i18n("Text Color:")),QColor(0,0,0)]},
+ ({"Window":[unicode(i18n("Background:")),TQColor(255,255,255)],
+ "WindowText":[unicode(i18n("Text Color:")),TQColor(0,0,0)]},
{}), #Window "Background", WindowText
"Selected Items":
- ({"Hilight":[unicode(i18n("Hilight Color:")),QColor(74,149,214)],
- "HilightText":[unicode(i18n("Text Color:")),QColor(255,255,255)]},
+ ({"Hilight":[unicode(i18n("Hilight Color:")),TQColor(74,149,214)],
+ "HilightText":[unicode(i18n("Text Color:")),TQColor(255,255,255)]},
{})}) #Hilight, HilightText
presets = [preset1,preset2]
############################################################################
-class GeneralPage(QWidget):
+class GeneralPage(TQWidget):
winversions = wineread.winversions
@@ -2855,49 +2868,49 @@ class GeneralPage(QWidget):
def __init__(self,parent = None,name = None,modal = 0,fl = 0):
global application
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
if not name:
self.setName("GeneralTab")
- general_tab_layout = QVBoxLayout(self,0,0,"GeneralTabLayout")
+ general_tab_layout = TQVBoxLayout(self,0,0,"GeneralTabLayout")
self.top_layout = general_tab_layout
- vbox = QVBox(self)
+ vbox = TQVBox(self)
vbox.setSpacing(KDialog.spacingHint())
general_tab_layout.addWidget(vbox)
if application:
- appwarning = QLabel(vbox,"appwarning")
+ appwarning = TQLabel(vbox,"appwarning")
appwarning.setText(i18n("Application specific settings for <b>" +\
application + "</b><p>Changing a setting here will permanently " +\
"make that setting independent of settings for all other " +\
"applications.</p>"))
- appwarning.setFrameStyle( QFrame.Box | QFrame.Raised )
+ appwarning.setFrameStyle( TQFrame.Box | TQFrame.Raised )
self.winversions = self.winversions + (( "global",\
unicode(i18n("Use Global Setting")), 0, 0, 0, "", "", 0, 0, ""),)
self.verdic["global"]=11
- hbox = QHBox(vbox)
+ hbox = TQHBox(vbox)
hbox.setSpacing(KDialog.spacingHint())
- versiontext = QLabel(hbox,"versiontext")
+ versiontext = TQLabel(hbox,"versiontext")
versiontext.setText(i18n("Windows version:"))
self.versioncombo = KComboBox(0,hbox,"versioncombo")
self.fillVersionCombo(self.versioncombo)
self.connect(self.versioncombo,SIGNAL("activated(int)"),self.slotVersionActivated)
- spacer = QWidget(hbox)
+ spacer = TQWidget(hbox)
hbox.setStretchFactor(spacer,1)
- bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
+ bottomspacer = TQSpacerItem(51,160,TQSizePolicy.Minimum,TQSizePolicy.Expanding)
general_tab_layout.addItem(bottomspacer)
self.reset()
- self.clearWState(Qt.WState_Polished)
+ self.clearWState(TQt.WState_Polished)
def isChanged(self):
changed = False
@@ -2943,7 +2956,7 @@ class GeneralPage(QWidget):
############################################################################
-class ApplicationsPage(QWidget):
+class ApplicationsPage(TQWidget):
applications = []
@@ -2951,35 +2964,35 @@ class ApplicationsPage(QWidget):
mailers = []
def __init__(self,parent = None,name = None,modal = 0,fl = 0):
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
if not name:
self.setName("ApplicationsTab")
- applications_tab_layout = QVBoxLayout(self,0,0,"ApplicationsTabLayout")
+ applications_tab_layout = TQVBoxLayout(self,0,0,"ApplicationsTabLayout")
self.top_layout = applications_tab_layout
- vbox = QVBox(self)
+ vbox = TQVBox(self)
vbox.setSpacing(KDialog.spacingHint())
applications_tab_layout.addWidget(vbox)
# -- Application Specific Settings group --
- self.perapp_group_box = QHGroupBox(vbox)
+ self.perapp_group_box = TQHGroupBox(vbox)
self.perapp_group_box.setTitle(i18n("Application specific settings"))
self.perapp_group_box.setInsideSpacing(KDialog.spacingHint())
self.perapp_group_box.setInsideMargin(KDialog.marginHint())
- vbox2 = QVBox(self.perapp_group_box)
+ vbox2 = TQVBox(self.perapp_group_box)
vbox2.setSpacing(KDialog.spacingHint())
- applicationstext = QLabel(vbox2,"applicationstext")
+ applicationstext = TQLabel(vbox2,"applicationstext")
applicationstext.setText(i18n("Change application specific settings for:"))
self.appslist = TDEListBox(vbox2)
- self.connect(self.appslist, SIGNAL("selectionChanged(QListBoxItem *)"), self.slotListClicked)
+ self.connect(self.appslist, SIGNAL("selectionChanged(TQListBoxItem *)"), self.slotListClicked)
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
self.addbutton = KPushButton(i18n("Add Application..."),hbox)
@@ -2988,7 +3001,7 @@ class ApplicationsPage(QWidget):
self.removebutton = KPushButton(i18n("Remove..."),hbox)
self.connect(self.removebutton,SIGNAL("clicked()"),self.slotRemoveClicked)
- spacer = QWidget(hbox)
+ spacer = TQWidget(hbox)
hbox.setStretchFactor(spacer,1)
self.settingsbutton = KPushButton(i18n("Settings"),hbox)
@@ -2996,17 +3009,17 @@ class ApplicationsPage(QWidget):
# -- Native Applications Settings group --
# Removed pending a patch to winebrowser
- #self.nativeapp_group_box = QVGroupBox(vbox)
+ #self.nativeapp_group_box = TQVGroupBox(vbox)
#self.nativeapp_group_box.setTitle(i18n("Native applications"))
#self.nativeapp_group_box.setInsideSpacing(KDialog.spacingHint())
#self.nativeapp_group_box.setInsideMargin(KDialog.marginHint())
- #vbox3 = QWidget(self.nativeapp_group_box)
+ #vbox3 = TQWidget(self.nativeapp_group_box)
- #native_apps_layout = QGridLayout(vbox3,2,3)
+ #native_apps_layout = TQGridLayout(vbox3,2,3)
#native_apps_layout.setSpacing(KDialog.spacingHint())
- #browsertext = QLabel(vbox3,"browsertext")
+ #browsertext = TQLabel(vbox3,"browsertext")
#browsertext.setText(i18n("Web Browser:"))
#native_apps_layout.addWidget(browsertext,0,0)
@@ -3024,7 +3037,7 @@ class ApplicationsPage(QWidget):
#self.connect(self.browserbutton,SIGNAL("clicked()"),self.slotBrowserClicked)
#native_apps_layout.addWidget(self.browserbutton,0,2)
- #mailertext = QLabel(vbox3,"mailertext")
+ #mailertext = TQLabel(vbox3,"mailertext")
#mailertext.setText(i18n("Mail Client:"))
#native_apps_layout.addWidget(mailertext,1,0)
@@ -3040,7 +3053,7 @@ class ApplicationsPage(QWidget):
#self.connect(self.mailerbutton,SIGNAL("clicked()"),self.slotMailerClicked)
#native_apps_layout.addWidget(self.mailerbutton,1,2)
- bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
+ bottomspacer = TQSpacerItem(51,160,TQSizePolicy.Minimum,TQSizePolicy.Expanding)
applications_tab_layout.addItem(bottomspacer)
self.changed = False
@@ -3062,7 +3075,7 @@ class ApplicationsPage(QWidget):
self.reset()
- self.clearWState(Qt.WState_Polished)
+ self.clearWState(TQt.WState_Polished)
def isChanged(self):
changed = False
@@ -3253,7 +3266,7 @@ class ApplicationsPage(QWidget):
self.applications.sort()
- self.appslist.insertStringList(QStringList.fromStrList(self.applications))
+ self.appslist.insertStringList(TQStringList.fromStrList(self.applications))
self.__selectApp(None)
@@ -3317,7 +3330,7 @@ class ApplicationsPage(QWidget):
############################################################################
-class LibrariesPage(QWidget):
+class LibrariesPage(TQWidget):
dlls = [""]
overriddendlls = {}
@@ -3331,35 +3344,35 @@ class LibrariesPage(QWidget):
unicode(i18n("Disable"))]
def __init__(self,parent = None,name = None,modal = 0,fl = 0):
- QWidget.__init__(self,parent)
+ TQWidget.__init__(self,parent)
if not name:
self.setName("LibrariesTab")
- libraries_tab_layout = QVBoxLayout(self,0,0,"LibrariesTabLayout")
+ libraries_tab_layout = TQVBoxLayout(self,0,0,"LibrariesTabLayout")
self.top_layout = libraries_tab_layout
- vbox = QVBox(self)
+ vbox = TQVBox(self)
vbox.setSpacing(KDialog.spacingHint())
libraries_tab_layout.addWidget(vbox)
# -- DLL overrides group
- self.overrides_group_box = QHGroupBox(vbox)
+ self.overrides_group_box = TQHGroupBox(vbox)
self.overrides_group_box.setTitle(i18n("DLL Overrides"))
self.overrides_group_box.setInsideSpacing(KDialog.spacingHint())
self.overrides_group_box.setInsideMargin(KDialog.marginHint())
- vbox2 = QVBox(self.overrides_group_box)
+ vbox2 = TQVBox(self.overrides_group_box)
vbox2.setSpacing(KDialog.spacingHint())
- spacer = QWidget(vbox2)
+ spacer = TQWidget(vbox2)
vbox2.setStretchFactor(spacer,1)
- newtext = QLabel(vbox2,"newtext")
+ newtext = TQLabel(vbox2,"newtext")
newtext.setText(i18n("New override for library:"))
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
self.dllcombo = KComboBox(0,hbox,"dllcombo")
@@ -3367,7 +3380,7 @@ class LibrariesPage(QWidget):
hbox.setStretchFactor(self.dllcombo,3)
self.connect(self.dllcombo,SIGNAL("activated(int)"),self.slotDllComboActivated)
- QToolTip.add(self.dllcombo,
+ TQToolTip.add(self.dllcombo,
i18n("<p>Dynamic Link Libraries can be specified individually to" +\
" be either builtin (provided by Wine) or native (taken from" +\
" Windows or provided by the application).</p>"))
@@ -3375,23 +3388,23 @@ class LibrariesPage(QWidget):
hbox.setStretchFactor(self.addbutton,1)
self.connect(self.addbutton,SIGNAL("clicked()"),self.slotAddClicked)
- existingtext = QLabel(vbox2,"existingtext")
+ existingtext = TQLabel(vbox2,"existingtext")
existingtext.setText(i18n("Existing overrides:"))
- hbox = QHBox(vbox2)
+ hbox = TQHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint())
self.dllslist = TDEListView(hbox)
self.dllslist.addColumn(i18n("Library"))
self.dllslist.addColumn(i18n("Load Order"))
self.dllslist.setAllColumnsShowFocus(True)
- self.dllslist.setSelectionMode(QListView.Single)
+ self.dllslist.setSelectionMode(TQListView.Single)
self.dllslist.setSorting(-1,True)
hbox.setStretchFactor(self.dllslist,3)
- self.connect(self.dllslist, SIGNAL("selectionChanged(QListViewItem *)"), self.slotListClicked)
+ self.connect(self.dllslist, SIGNAL("selectionChanged(TQListViewItem *)"), self.slotListClicked)
- vbox3 = QVBox(hbox)
+ vbox3 = TQVBox(hbox)
vbox3.setSpacing(KDialog.spacingHint())
hbox.setStretchFactor(vbox3,1)
@@ -3403,17 +3416,17 @@ class LibrariesPage(QWidget):
self.connect(self.removebutton,SIGNAL("clicked()"),self.slotRemoveClicked)
self.removebutton.setEnabled(False)
- spacer = QWidget(vbox3)
+ spacer = TQWidget(vbox3)
vbox3.setStretchFactor(spacer,1)
- bottomspacer = QSpacerItem(51,160,QSizePolicy.Minimum,QSizePolicy.Expanding)
+ bottomspacer = TQSpacerItem(51,160,TQSizePolicy.Minimum,TQSizePolicy.Expanding)
libraries_tab_layout.addItem(bottomspacer)
self.changed = False
self.reset()
- self.clearWState(Qt.WState_Polished)
+ self.clearWState(TQt.WState_Polished)
def isChanged(self):
changed = False
@@ -3463,7 +3476,7 @@ class LibrariesPage(QWidget):
if self.selecteddll:
order = KInputDialog.getItem(i18n("Edit Library Override"),\
unicode(i18n("Load order for %s:")) % (unicode(self.selecteddll),),
- QStringList.fromStrList(self.orderoptionstr),\
+ TQStringList.fromStrList(self.orderoptionstr),\
False,0,self,"editdll")
if order[1]:
@@ -3488,7 +3501,7 @@ class LibrariesPage(QWidget):
lastdll = None
for dll,order in self.overriddendlls.iteritems():
- lvi = QListViewItem(self.dllslist,dll,order)
+ lvi = TQListViewItem(self.dllslist,dll,order)
self.dllsToListItems[dll] = lvi
if self.selecteddll and self.selecteddll==dll:
firstselecteddll = dll