summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-03-10 19:56:27 +0200
committerMavridis Philippe <mavridisf@gmail.com>2024-03-10 20:04:10 +0200
commitdb5c38267db65110beb4ad895a1fe38b42d8001f (patch)
tree66e0eb45b6db27d468589aa56b089408600baf77
parentbf8023245ca81129b27778d9e38f4cbdcdd1dc5b (diff)
downloadtde-style-polyester-db5c38267db65110beb4ad895a1fe38b42d8001f.tar.gz
tde-style-polyester-db5c38267db65110beb4ad895a1fe38b42d8001f.zip
Port to TQt
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r--client/config/configdialog.cc168
-rwxr-xr-xclient/config/configdialog.ui58
-rwxr-xr-xclient/config/polyesterconfig.cc30
-rwxr-xr-xclient/config/polyesterconfig.h8
-rwxr-xr-xclient/create-buttons.sh2
-rw-r--r--client/images/button.pngbin0 -> 1285 bytes
-rw-r--r--client/images/circle.pngbin0 -> 1292 bytes
-rw-r--r--client/images/circle2.pngbin0 -> 1429 bytes
-rw-r--r--client/images/close.pngbin0 -> 1132 bytes
-rw-r--r--client/images/help.pngbin0 -> 914 bytes
-rw-r--r--client/images/keep_above.pngbin0 -> 541 bytes
-rw-r--r--client/images/keep_above_lit.pngbin0 -> 590 bytes
-rw-r--r--client/images/keep_below.pngbin0 -> 606 bytes
-rw-r--r--client/images/keep_below_lit.pngbin0 -> 611 bytes
-rw-r--r--client/images/maximize.pngbin0 -> 413 bytes
-rw-r--r--client/images/minimize.pngbin0 -> 319 bytes
-rw-r--r--client/images/restore.pngbin0 -> 763 bytes
-rw-r--r--client/images/splat.pngbin0 -> 811 bytes
-rw-r--r--client/images/unsplat.pngbin0 -> 851 bytes
-rw-r--r--client/images/window_background.pngbin0 -> 542 bytes
-rw-r--r--client/images/window_foreground.pngbin0 -> 572 bytes
-rwxr-xr-xclient/polyester.cc462
-rwxr-xr-xclient/polyester.h88
-rwxr-xr-xclient/shadow.cpp14
-rwxr-xr-xclient/shadow.h10
-rw-r--r--style/config/configdialog.ui114
-rwxr-xr-xstyle/config/polyesterconf.cpp68
-rwxr-xr-xstyle/config/polyesterconf.h30
-rwxr-xr-xstyle/misc.cpp14
-rwxr-xr-xstyle/misc.h2
-rwxr-xr-xstyle/polyester.cpp1212
-rwxr-xr-xstyle/polyester.h242
32 files changed, 1261 insertions, 1261 deletions
diff --git a/client/config/configdialog.cc b/client/config/configdialog.cc
index 27e7511..75f6623 100644
--- a/client/config/configdialog.cc
+++ b/client/config/configdialog.cc
@@ -11,179 +11,179 @@
#include "configdialog.h"
-#include <qvariant.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
/*
* Constructs a ConfigDialog as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
-ConfigDialog::ConfigDialog( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+ConfigDialog::ConfigDialog( TQWidget* parent, const char* name, WFlags fl )
+ : TQWidget( parent, name, fl )
{
if ( !name )
setName( "ConfigDialog" );
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
- ConfigDialogLayout = new QVBoxLayout( this, 0, 6, "ConfigDialogLayout");
+ setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
+ ConfigDialogLayout = new TQVBoxLayout( this, 0, 6, "ConfigDialogLayout");
- tabWidget3 = new QTabWidget( this, "tabWidget3" );
+ tabWidget3 = new TQTabWidget( this, "tabWidget3" );
- tab = new QWidget( tabWidget3, "tab" );
- tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout");
+ tab = new TQWidget( tabWidget3, "tab" );
+ tabLayout = new TQGridLayout( tab, 1, 1, 11, 6, "tabLayout");
- titlesize = new QSpinBox( tab, "titlesize" );
+ titlesize = new TQSpinBox( tab, "titlesize" );
titlesize->setMaxValue( 64 );
titlesize->setMinValue( 16 );
tabLayout->addWidget( titlesize, 1, 2 );
- framesize = new QSpinBox( tab, "framesize" );
+ framesize = new TQSpinBox( tab, "framesize" );
framesize->setMaxValue( 64 );
framesize->setMinValue( 1 );
framesize->setValue( 4 );
tabLayout->addWidget( framesize, 2, 2 );
- titleshadow = new QCheckBox( tab, "titleshadow" );
+ titleshadow = new TQCheckBox( tab, "titleshadow" );
titleshadow->setChecked( TRUE );
tabLayout->addWidget( titleshadow, 3, 2 );
- roundCorners = new QCheckBox( tab, "roundCorners" );
+ roundCorners = new TQCheckBox( tab, "roundCorners" );
roundCorners->setChecked( TRUE );
tabLayout->addWidget( roundCorners, 4, 2 );
- titleBarStyle = new QComboBox( FALSE, tab, "titleBarStyle" );
+ titleBarStyle = new TQComboBox( FALSE, tab, "titleBarStyle" );
tabLayout->addWidget( titleBarStyle, 5, 2 );
- textLabel1_4 = new QLabel( tab, "textLabel1_4" );
- textLabel1_4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ textLabel1_4 = new TQLabel( tab, "textLabel1_4" );
+ textLabel1_4->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout->addWidget( textLabel1_4, 5, 1 );
- textLabel1_2 = new QLabel( tab, "textLabel1_2" );
- textLabel1_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ textLabel1_2 = new TQLabel( tab, "textLabel1_2" );
+ textLabel1_2->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout->addWidget( textLabel1_2, 2, 1 );
- textLabel1 = new QLabel( tab, "textLabel1" );
- textLabel1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ textLabel1 = new TQLabel( tab, "textLabel1" );
+ textLabel1->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout->addWidget( textLabel1, 1, 1 );
- textLabel1_3 = new QLabel( tab, "textLabel1_3" );
- textLabel1_3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ textLabel1_3 = new TQLabel( tab, "textLabel1_3" );
+ textLabel1_3->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout->addMultiCellWidget( textLabel1_3, 0, 0, 0, 1 );
- spacer5 = new QSpacerItem( 71, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ spacer5 = new TQSpacerItem( 71, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
tabLayout->addItem( spacer5, 2, 0 );
- spacer4 = new QSpacerItem( 81, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ spacer4 = new TQSpacerItem( 81, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
tabLayout->addItem( spacer4, 2, 3 );
- titlealign = new QButtonGroup( tab, "titlealign" );
- titlealign->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, titlealign->sizePolicy().hasHeightForWidth() ) );
+ titlealign = new TQButtonGroup( tab, "titlealign" );
+ titlealign->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, titlealign->sizePolicy().hasHeightForWidth() ) );
titlealign->setLineWidth( 0 );
- titlealign->setColumnLayout(0, Qt::Vertical );
+ titlealign->setColumnLayout(0, TQt::Vertical );
titlealign->layout()->setSpacing( 6 );
titlealign->layout()->setMargin( 0 );
- titlealignLayout = new QHBoxLayout( titlealign->layout() );
- titlealignLayout->setAlignment( Qt::AlignTop );
+ titlealignLayout = new TQHBoxLayout( titlealign->layout() );
+ titlealignLayout->setAlignment( TQt::AlignTop );
- AlignLeft = new QRadioButton( titlealign, "AlignLeft" );
+ AlignLeft = new TQRadioButton( titlealign, "AlignLeft" );
titlealignLayout->addWidget( AlignLeft );
- AlignHCenter = new QRadioButton( titlealign, "AlignHCenter" );
+ AlignHCenter = new TQRadioButton( titlealign, "AlignHCenter" );
AlignHCenter->setChecked( TRUE );
titlealignLayout->addWidget( AlignHCenter );
- AlignRight = new QRadioButton( titlealign, "AlignRight" );
+ AlignRight = new TQRadioButton( titlealign, "AlignRight" );
titlealignLayout->addWidget( AlignRight );
tabLayout->addWidget( titlealign, 0, 2 );
- tabWidget3->insertTab( tab, QString::fromLatin1("") );
+ tabWidget3->insertTab( tab, TQString::fromLatin1("") );
- tab_2 = new QWidget( tabWidget3, "tab_2" );
- tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2");
+ tab_2 = new TQWidget( tabWidget3, "tab_2" );
+ tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2");
- textLabel1_5 = new QLabel( tab_2, "textLabel1_5" );
- textLabel1_5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ textLabel1_5 = new TQLabel( tab_2, "textLabel1_5" );
+ textLabel1_5->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout_2->addWidget( textLabel1_5, 1, 0 );
- buttonStyle = new QComboBox( FALSE, tab_2, "buttonStyle" );
+ buttonStyle = new TQComboBox( FALSE, tab_2, "buttonStyle" );
tabLayout_2->addWidget( buttonStyle, 1, 1 );
- textLabel4 = new QLabel( tab_2, "textLabel4" );
- textLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, textLabel4->sizePolicy().hasHeightForWidth() ) );
- textLabel4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ textLabel4 = new TQLabel( tab_2, "textLabel4" );
+ textLabel4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, textLabel4->sizePolicy().hasHeightForWidth() ) );
+ textLabel4->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout_2->addWidget( textLabel4, 0, 0 );
- buttonsize = new QSpinBox( tab_2, "buttonsize" );
- buttonsize->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, buttonsize->sizePolicy().hasHeightForWidth() ) );
- buttonsize->setButtonSymbols( QSpinBox::UpDownArrows );
+ buttonsize = new TQSpinBox( tab_2, "buttonsize" );
+ buttonsize->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, buttonsize->sizePolicy().hasHeightForWidth() ) );
+ buttonsize->setButtonSymbols( TQSpinBox::UpDownArrows );
buttonsize->setMaxValue( 64 );
buttonsize->setMinValue( 1 );
buttonsize->setValue( 16 );
tabLayout_2->addWidget( buttonsize, 0, 1 );
- animatebuttons = new QCheckBox( tab_2, "animatebuttons" );
+ animatebuttons = new TQCheckBox( tab_2, "animatebuttons" );
animatebuttons->setEnabled( TRUE );
animatebuttons->setChecked( TRUE );
tabLayout_2->addWidget( animatebuttons, 2, 1 );
- layout11 = new QHBoxLayout( 0, 0, 6, "layout11");
- spacer3 = new QSpacerItem( 30, 20, QSizePolicy::Maximum, QSizePolicy::Minimum );
+ layout11 = new TQHBoxLayout( 0, 0, 6, "layout11");
+ spacer3 = new TQSpacerItem( 30, 20, TQSizePolicy::Maximum, TQSizePolicy::Minimum );
layout11->addItem( spacer3 );
- textLabel2 = new QLabel( tab_2, "textLabel2" );
+ textLabel2 = new TQLabel( tab_2, "textLabel2" );
layout11->addWidget( textLabel2 );
- btnComboBox = new QComboBox( FALSE, tab_2, "btnComboBox" );
- btnComboBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, btnComboBox->sizePolicy().hasHeightForWidth() ) );
+ btnComboBox = new TQComboBox( FALSE, tab_2, "btnComboBox" );
+ btnComboBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, btnComboBox->sizePolicy().hasHeightForWidth() ) );
layout11->addWidget( btnComboBox );
tabLayout_2->addLayout( layout11, 3, 1 );
- squareButton = new QCheckBox( tab_2, "squareButton" );
+ squareButton = new TQCheckBox( tab_2, "squareButton" );
squareButton->setChecked( TRUE );
tabLayout_2->addMultiCellWidget( squareButton, 4, 4, 1, 2 );
- lightBorder = new QCheckBox( tab_2, "lightBorder" );
+ lightBorder = new TQCheckBox( tab_2, "lightBorder" );
tabLayout_2->addMultiCellWidget( lightBorder, 5, 5, 1, 2 );
- nomodalbuttons = new QCheckBox( tab_2, "nomodalbuttons" );
+ nomodalbuttons = new TQCheckBox( tab_2, "nomodalbuttons" );
nomodalbuttons->setChecked( TRUE );
tabLayout_2->addWidget( nomodalbuttons, 6, 1 );
- menuClose = new QCheckBox( tab_2, "menuClose" );
+ menuClose = new TQCheckBox( tab_2, "menuClose" );
menuClose->setEnabled( TRUE );
tabLayout_2->addMultiCellWidget( menuClose, 7, 7, 1, 2 );
- spacer3_3 = new QSpacerItem( 121, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ spacer3_3 = new TQSpacerItem( 121, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
tabLayout_2->addItem( spacer3_3, 1, 2 );
- tabWidget3->insertTab( tab_2, QString::fromLatin1("") );
+ tabWidget3->insertTab( tab_2, TQString::fromLatin1("") );
ConfigDialogLayout->addWidget( tabWidget3 );
languageChange();
- resize( QSize(388, 265).expandedTo(minimumSizeHint()) );
+ resize( TQSize(388, 265).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
@@ -208,7 +208,7 @@ ConfigDialog::ConfigDialog( QWidget* parent, const char* name, WFlags fl )
*/
ConfigDialog::~ConfigDialog()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*
@@ -222,10 +222,10 @@ void ConfigDialog::languageChange()
framesize->setSuffix( tr2i18n( " pixels" ) );
framesize->setSpecialValueText( tr2i18n( "1 pixel" ) );
titleshadow->setText( tr2i18n( "&Use shadowed text" ) );
- titleshadow->setAccel( QKeySequence( tr2i18n( "Alt+U" ) ) );
- QWhatsThis::add( titleshadow, tr2i18n( "Check this option if you want the titlebar text to have a 3D look with a shadow behind it." ) );
+ titleshadow->setAccel( TQKeySequence( tr2i18n( "Alt+U" ) ) );
+ TQWhatsThis::add( titleshadow, tr2i18n( "Check this option if you want the titlebar text to have a 3D look with a shadow behind it." ) );
roundCorners->setText( tr2i18n( "R&ound top corners" ) );
- roundCorners->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
+ roundCorners->setAccel( TQKeySequence( tr2i18n( "Alt+O" ) ) );
titleBarStyle->clear();
titleBarStyle->insertItem( tr2i18n( "Gradients" ) );
titleBarStyle->insertItem( tr2i18n( "Glass" ) );
@@ -233,16 +233,16 @@ void ConfigDialog::languageChange()
textLabel1_2->setText( tr2i18n( "Frame width:" ) );
textLabel1->setText( tr2i18n( "Title height:" ) );
textLabel1_3->setText( tr2i18n( "Text alignment:" ) );
- titlealign->setTitle( QString::null );
+ titlealign->setTitle( TQString::null );
AlignLeft->setText( tr2i18n( "L&eft" ) );
- AlignLeft->setAccel( QKeySequence( tr2i18n( "Alt+E" ) ) );
- QToolTip::add( AlignLeft, QString::null );
+ AlignLeft->setAccel( TQKeySequence( tr2i18n( "Alt+E" ) ) );
+ TQToolTip::add( AlignLeft, TQString::null );
AlignHCenter->setText( tr2i18n( "Ce&nter" ) );
- AlignHCenter->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) );
- QToolTip::add( AlignHCenter, QString::null );
+ AlignHCenter->setAccel( TQKeySequence( tr2i18n( "Alt+N" ) ) );
+ TQToolTip::add( AlignHCenter, TQString::null );
AlignRight->setText( tr2i18n( "Ri&ght" ) );
- AlignRight->setAccel( QKeySequence( tr2i18n( "Alt+G" ) ) );
- QToolTip::add( AlignRight, QString::null );
+ AlignRight->setAccel( TQKeySequence( tr2i18n( "Alt+G" ) ) );
+ TQToolTip::add( AlignRight, TQString::null );
tabWidget3->changeTab( tab, tr2i18n( "Titleb&ar" ) );
textLabel1_5->setText( tr2i18n( "Button Style:" ) );
buttonStyle->clear();
@@ -255,21 +255,21 @@ void ConfigDialog::languageChange()
buttonsize->setSuffix( tr2i18n( " pixels" ) );
buttonsize->setSpecialValueText( tr2i18n( "1 pixel" ) );
animatebuttons->setText( tr2i18n( "&Animate buttons" ) );
- animatebuttons->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
- QWhatsThis::add( animatebuttons, tr2i18n( "Check this option if you want to use button animations when hovering with the mouse." ) );
+ animatebuttons->setAccel( TQKeySequence( tr2i18n( "Alt+A" ) ) );
+ TQWhatsThis::add( animatebuttons, tr2i18n( "Check this option if you want to use button animations when hovering with the mouse." ) );
textLabel2->setText( tr2i18n( "Animation style:" ) );
btnComboBox->clear();
btnComboBox->insertItem( tr2i18n( "Colorize" ) );
btnComboBox->insertItem( tr2i18n( "Intensify" ) );
btnComboBox->insertItem( tr2i18n( "Fade" ) );
squareButton->setText( tr2i18n( "S&quare buttons" ) );
- squareButton->setAccel( QKeySequence( tr2i18n( "Alt+Q" ) ) );
+ squareButton->setAccel( TQKeySequence( tr2i18n( "Alt+Q" ) ) );
lightBorder->setText( tr2i18n( "Li&ghter button borders" ) );
- lightBorder->setAccel( QKeySequence( tr2i18n( "Alt+G" ) ) );
+ lightBorder->setAccel( TQKeySequence( tr2i18n( "Alt+G" ) ) );
nomodalbuttons->setText( tr2i18n( "&No buttons on modal windows" ) );
- nomodalbuttons->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) );
+ nomodalbuttons->setAccel( TQKeySequence( tr2i18n( "Alt+N" ) ) );
menuClose->setText( tr2i18n( "Close window when &menu double clicked" ) );
- menuClose->setAccel( QKeySequence( tr2i18n( "Alt+M" ) ) );
+ menuClose->setAccel( TQKeySequence( tr2i18n( "Alt+M" ) ) );
tabWidget3->changeTab( tab_2, tr2i18n( "&Buttons appearance" ) );
}
diff --git a/client/config/configdialog.ui b/client/config/configdialog.ui
index 8233edd..651d140 100755
--- a/client/config/configdialog.ui
+++ b/client/config/configdialog.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigDialog</cstring>
</property>
@@ -30,11 +30,11 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget3</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -45,7 +45,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSpinBox" row="1" column="2">
+ <widget class="TQSpinBox" row="1" column="2">
<property name="name">
<cstring>titlesize</cstring>
</property>
@@ -59,7 +59,7 @@
<number>16</number>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="2">
+ <widget class="TQSpinBox" row="2" column="2">
<property name="name">
<cstring>framesize</cstring>
</property>
@@ -79,7 +79,7 @@
<number>4</number>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="2">
+ <widget class="TQCheckBox" row="3" column="2">
<property name="name">
<cstring>titleshadow</cstring>
</property>
@@ -96,7 +96,7 @@
<string>Check this option if you want the titlebar text to have a 3D look with a shadow behind it.</string>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="2">
+ <widget class="TQCheckBox" row="4" column="2">
<property name="name">
<cstring>roundCorners</cstring>
</property>
@@ -110,7 +110,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QComboBox" row="5" column="2">
+ <widget class="TQComboBox" row="5" column="2">
<item>
<property name="text">
<string>Gradients</string>
@@ -125,7 +125,7 @@
<cstring>titleBarStyle</cstring>
</property>
</widget>
- <widget class="QLabel" row="5" column="1">
+ <widget class="TQLabel" row="5" column="1">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -136,7 +136,7 @@
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -147,7 +147,7 @@
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -158,7 +158,7 @@
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -203,7 +203,7 @@
</size>
</property>
</spacer>
- <widget class="QButtonGroup" row="0" column="2">
+ <widget class="TQButtonGroup" row="0" column="2">
<property name="name">
<cstring>titlealign</cstring>
</property>
@@ -228,7 +228,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>AlignLeft</cstring>
</property>
@@ -242,7 +242,7 @@
<string></string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>AlignHCenter</cstring>
</property>
@@ -259,7 +259,7 @@
<string></string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>AlignRight</cstring>
</property>
@@ -277,7 +277,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -288,7 +288,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_5</cstring>
</property>
@@ -299,7 +299,7 @@
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<item>
<property name="text">
<string>Gradients</string>
@@ -327,7 +327,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -346,7 +346,7 @@
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>buttonsize</cstring>
</property>
@@ -377,7 +377,7 @@
<number>16</number>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="1">
+ <widget class="TQCheckBox" row="2" column="1">
<property name="name">
<cstring>animatebuttons</cstring>
</property>
@@ -397,7 +397,7 @@
<string>Check this option if you want to use button animations when hovering with the mouse.</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="3" column="1">
+ <widget class="TQLayoutWidget" row="3" column="1">
<property name="name">
<cstring>layout11</cstring>
</property>
@@ -422,7 +422,7 @@
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -430,7 +430,7 @@
<string>Animation style:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Colorize</string>
@@ -460,7 +460,7 @@
</widget>
</hbox>
</widget>
- <widget class="QCheckBox" row="4" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="4" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>squareButton</cstring>
</property>
@@ -474,7 +474,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="5" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="5" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>lightBorder</cstring>
</property>
@@ -485,7 +485,7 @@
<string>Alt+G</string>
</property>
</widget>
- <widget class="QCheckBox" row="6" column="1">
+ <widget class="TQCheckBox" row="6" column="1">
<property name="name">
<cstring>nomodalbuttons</cstring>
</property>
@@ -499,7 +499,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="7" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="7" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>menuClose</cstring>
</property>
diff --git a/client/config/polyesterconfig.cc b/client/config/polyesterconfig.cc
index c526504..24c5ce8 100755
--- a/client/config/polyesterconfig.cc
+++ b/client/config/polyesterconfig.cc
@@ -13,13 +13,13 @@
#include <kconfig.h>
#include <klocale.h>
#include <kglobal.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
-#include <qcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
+#include <tqcombobox.h>
#include "polyesterconfig.h"
#include "configdialog.h"
@@ -29,8 +29,8 @@
// -------------
// Constructor
-polyesterConfig::polyesterConfig(KConfig* config, QWidget* parent)
- : QObject(parent), config_(0), dialog_(0) {
+polyesterConfig::polyesterConfig(KConfig* config, TQWidget* parent)
+ : TQObject(parent), config_(0), dialog_(0) {
// create the configuration object
config_ = new KConfig("kwinpolyesterrc");
KGlobal::locale()->insertCatalogue("kwin_polyester_config");
@@ -107,8 +107,8 @@ void polyesterConfig::selectionChanged(int) {
void polyesterConfig::load(KConfig*) {
config_->setGroup("General");
- QString value = config_->readEntry("TitleAlignment", "AlignHCenter");
- QRadioButton *button = (QRadioButton*)dialog_->titlealign->child(value);
+ TQString value = config_->readEntry("TitleAlignment", "AlignHCenter");
+ TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child(value);
if (button)
{
button->setChecked(true);
@@ -144,10 +144,10 @@ void polyesterConfig::load(KConfig*) {
void polyesterConfig::save(KConfig*) {
config_->setGroup("General");
- QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected();
+ TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected();
if (button)
{
- config_->writeEntry("TitleAlignment", QString(button->name()));
+ config_->writeEntry("TitleAlignment", TQString(button->name()));
}
config_->writeEntry("RoundCorners", dialog_->roundCorners->isChecked() );
config_->writeEntry("TitleSize", dialog_->titlesize->value() );
@@ -172,7 +172,7 @@ void polyesterConfig::save(KConfig*) {
// Set configuration defaults
void polyesterConfig::defaults() {
- QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter");
+ TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child("AlignHCenter");
if (button)
{
button->setChecked(true);
@@ -197,7 +197,7 @@ void polyesterConfig::defaults() {
//////////////////////////////////////////////////////////////////////////////
extern "C" {
- QObject* allocate_config(KConfig* config, QWidget* parent) {
+ TQObject* allocate_config(KConfig* config, TQWidget* parent) {
return (new polyesterConfig(config, parent));
}
}
diff --git a/client/config/polyesterconfig.h b/client/config/polyesterconfig.h
index 5c5a882..34c84ce 100755
--- a/client/config/polyesterconfig.h
+++ b/client/config/polyesterconfig.h
@@ -30,15 +30,15 @@
#ifndef polyesterCONFIG_H
#define polyesterCONFIG_H
-#include <qobject.h>
+#include <tqobject.h>
class KConfig;
class ConfigDialog;
-class polyesterConfig : public QObject {
- Q_OBJECT
+class polyesterConfig : public TQObject {
+ TQ_OBJECT
public:
- polyesterConfig(KConfig* config, QWidget* parent);
+ polyesterConfig(KConfig* config, TQWidget* parent);
~polyesterConfig();
signals:
diff --git a/client/create-buttons.sh b/client/create-buttons.sh
index 578fb57..c365564 100755
--- a/client/create-buttons.sh
+++ b/client/create-buttons.sh
@@ -11,7 +11,7 @@ done
# composite -compose overlay images/button.png $f $f
#done
-uic -o buttons.h -embed buttons images/circle.png images/circle2.png images/close.png images/help.png images/keep_above.png images/keep_above_lit.png images/keep_below.png images/keep_below_lit.png images/maximize.png images/minimize.png images/restore.png images/splat.png images/unsplat.png images/window_background.png images/window_foreground.png
+tquic -o buttons.h -embed buttons images/circle.png images/circle2.png images/close.png images/help.png images/keep_above.png images/keep_above_lit.png images/keep_below.png images/keep_below_lit.png images/maximize.png images/minimize.png images/restore.png images/splat.png images/unsplat.png images/window_background.png images/window_foreground.png
sed -e "s/factory/bfactory/" buttons.h >buttons.h.temp
mv buttons.h.temp buttons.h
diff --git a/client/images/button.png b/client/images/button.png
new file mode 100644
index 0000000..f4818e9
--- /dev/null
+++ b/client/images/button.png
Binary files differ
diff --git a/client/images/circle.png b/client/images/circle.png
new file mode 100644
index 0000000..7eb097f
--- /dev/null
+++ b/client/images/circle.png
Binary files differ
diff --git a/client/images/circle2.png b/client/images/circle2.png
new file mode 100644
index 0000000..b490770
--- /dev/null
+++ b/client/images/circle2.png
Binary files differ
diff --git a/client/images/close.png b/client/images/close.png
new file mode 100644
index 0000000..41e8942
--- /dev/null
+++ b/client/images/close.png
Binary files differ
diff --git a/client/images/help.png b/client/images/help.png
new file mode 100644
index 0000000..d19b158
--- /dev/null
+++ b/client/images/help.png
Binary files differ
diff --git a/client/images/keep_above.png b/client/images/keep_above.png
new file mode 100644
index 0000000..64cbdaf
--- /dev/null
+++ b/client/images/keep_above.png
Binary files differ
diff --git a/client/images/keep_above_lit.png b/client/images/keep_above_lit.png
new file mode 100644
index 0000000..0ba5ded
--- /dev/null
+++ b/client/images/keep_above_lit.png
Binary files differ
diff --git a/client/images/keep_below.png b/client/images/keep_below.png
new file mode 100644
index 0000000..f33cf20
--- /dev/null
+++ b/client/images/keep_below.png
Binary files differ
diff --git a/client/images/keep_below_lit.png b/client/images/keep_below_lit.png
new file mode 100644
index 0000000..9000121
--- /dev/null
+++ b/client/images/keep_below_lit.png
Binary files differ
diff --git a/client/images/maximize.png b/client/images/maximize.png
new file mode 100644
index 0000000..e14d9c9
--- /dev/null
+++ b/client/images/maximize.png
Binary files differ
diff --git a/client/images/minimize.png b/client/images/minimize.png
new file mode 100644
index 0000000..3f00670
--- /dev/null
+++ b/client/images/minimize.png
Binary files differ
diff --git a/client/images/restore.png b/client/images/restore.png
new file mode 100644
index 0000000..5c02d1b
--- /dev/null
+++ b/client/images/restore.png
Binary files differ
diff --git a/client/images/splat.png b/client/images/splat.png
new file mode 100644
index 0000000..b1aa64d
--- /dev/null
+++ b/client/images/splat.png
Binary files differ
diff --git a/client/images/unsplat.png b/client/images/unsplat.png
new file mode 100644
index 0000000..1044c85
--- /dev/null
+++ b/client/images/unsplat.png
Binary files differ
diff --git a/client/images/window_background.png b/client/images/window_background.png
new file mode 100644
index 0000000..8f133f3
--- /dev/null
+++ b/client/images/window_background.png
Binary files differ
diff --git a/client/images/window_foreground.png b/client/images/window_foreground.png
new file mode 100644
index 0000000..424f855
--- /dev/null
+++ b/client/images/window_foreground.png
Binary files differ
diff --git a/client/polyester.cc b/client/polyester.cc
index 62866fa..2ef4044 100755
--- a/client/polyester.cc
+++ b/client/polyester.cc
@@ -24,14 +24,14 @@
#include <kpixmapeffect.h>
#include <kpixmap.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qsettings.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
+#include <tqsettings.h>
#include <math.h>
#include <stdlib.h>
@@ -48,7 +48,7 @@ using namespace polyester;
polyesterFactory* factory=NULL;
bool polyesterFactory::initialized_ = false;
-Qt::AlignmentFlags polyesterFactory::titlealign_ = Qt::AlignHCenter;
+TQt::AlignmentFlags polyesterFactory::titlealign_ = TQt::AlignHCenter;
int polyesterFactory::contrast_ = 6;
bool polyesterFactory::cornerflags_ = true;
int polyesterFactory::titlesize_ = 22;
@@ -140,16 +140,16 @@ bool polyesterFactory::readConfig() {
config.setGroup("General");
// grab settings
- QString value = config.readEntry("TitleAlignment", "AlignHCenter");
+ TQString value = config.readEntry("TitleAlignment", "AlignHCenter");
if (value == "AlignLeft")
- titlealign_ = Qt::AlignLeft;
+ titlealign_ = TQt::AlignLeft;
else if (value == "AlignHCenter")
- titlealign_ = Qt::AlignHCenter;
+ titlealign_ = TQt::AlignHCenter;
else if (value == "AlignRight")
- titlealign_ = Qt::AlignRight;
+ titlealign_ = TQt::AlignRight;
- QSettings globalSettings;
- contrast_ = globalSettings.readNumEntry("/Qt/KDE/contrast", 6);
+ TQSettings globalSettings;
+ contrast_ = globalSettings.readNumEntry("/TQt/KDE/contrast", 6);
cornerflags_ = config.readBoolEntry("RoundCorners", true);
titlesize_ = config.readNumEntry("TitleSize",20);
titleBarStyle_ = config.readNumEntry("TitleBarStyle", 0);
@@ -184,7 +184,7 @@ bool polyesterFactory::readConfig() {
// polyesterButton()
// ---------------
// Constructor
-polyesterButton::polyesterButton(polyesterClient *parent, const char *name, const QString& tip, ButtonType type, int button_size, bool squareButton, bool toggle): QButton(parent->widget(), name),
+polyesterButton::polyesterButton(polyesterClient *parent, const char *name, const TQString& tip, ButtonType type, int button_size, bool squareButton, bool toggle): TQButton(parent->widget(), name),
client_(parent),
type_(type),
size_(button_size),
@@ -210,13 +210,13 @@ polyesterButton::polyesterButton(polyesterClient *parent, const char *name, cons
setFixedSize( buttonWidth, button_size);
setCursor(arrowCursor);
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
setToggleButton(toggle);
//button animation setup
- animTmr = new QTimer(this);
- connect(animTmr, SIGNAL(timeout() ), this, SLOT(animate() ) );
- connect(this, SIGNAL(pressed() ), this, SLOT(buttonClicked() ) );
- connect(this, SIGNAL(released() ), this, SLOT(buttonReleased() ) );
+ animTmr = new TQTimer(this);
+ connect(animTmr, TQ_SIGNAL(timeout() ), this, TQ_SLOT(animate() ) );
+ connect(this, TQ_SIGNAL(pressed() ), this, TQ_SLOT(buttonClicked() ) );
+ connect(this, TQ_SIGNAL(released() ), this, TQ_SLOT(buttonReleased() ) );
animProgress = 0;
m_clicked=false;
}
@@ -231,8 +231,8 @@ polyesterButton::~polyesterButton() {
// ----------
// Return size hint
-QSize polyesterButton::sizeHint() const {
- return QSize(size_, size_);
+TQSize polyesterButton::sizeHint() const {
+ return TQSize(size_, size_);
}
//////////////////////////////////////////////////////////////////////////////
@@ -245,7 +245,7 @@ void polyesterButton::buttonClicked() {
animProgress=0;
}
void polyesterButton::buttonReleased() {
- //This doesn't work b/c a released() signal is thrown when a leaveEvent occurs
+ //This doesn't work b/c a released() TQ_SIGNAL is thrown when a leaveEvent occurs
//m_clicked=false;
}
@@ -276,9 +276,9 @@ void polyesterButton::animate() {
// ------------
// Mouse has entered the button
-void polyesterButton::enterEvent(QEvent *e) {
+void polyesterButton::enterEvent(TQEvent *e) {
// we wanted to pass on the event
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
// we want to do mouseovers, so keep track of it here
hover_=true;
if(!m_clicked)
@@ -292,9 +292,9 @@ void polyesterButton::enterEvent(QEvent *e) {
// ------------
// Mouse has left the button
-void polyesterButton::leaveEvent(QEvent *e) {
+void polyesterButton::leaveEvent(TQEvent *e) {
// we wanted to pass on the event
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
// we want to do mouseovers, so keep track of it here
hover_=false;
if(!m_clicked)
@@ -308,7 +308,7 @@ void polyesterButton::leaveEvent(QEvent *e) {
// -----------------
// Button has been pressed
-void polyesterButton::mousePressEvent(QMouseEvent* e) {
+void polyesterButton::mousePressEvent(TQMouseEvent* e) {
lastmouse_ = e->button();
// translate and pass on mouse event
@@ -316,9 +316,9 @@ void polyesterButton::mousePressEvent(QMouseEvent* e) {
if ((type_ != ButtonMax) && (e->button() != LeftButton)) {
button = NoButton; // middle & right buttons inappropriate
}
- QMouseEvent me(e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
button, e->state());
- QButton::mousePressEvent(&me);
+ TQButton::mousePressEvent(&me);
}
//////////////////////////////////////////////////////////////////////////////
@@ -326,7 +326,7 @@ void polyesterButton::mousePressEvent(QMouseEvent* e) {
// -----------------
// Button has been released
-void polyesterButton::mouseReleaseEvent(QMouseEvent* e) {
+void polyesterButton::mouseReleaseEvent(TQMouseEvent* e) {
lastmouse_ = e->button();
// translate and pass on mouse event
@@ -334,8 +334,8 @@ void polyesterButton::mouseReleaseEvent(QMouseEvent* e) {
if ((type_ != ButtonMax) && (e->button() != LeftButton)) {
button = NoButton; // middle & right buttons inappropriate
}
- QMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state());
- QButton::mouseReleaseEvent(&me);
+ TQMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state());
+ TQButton::mouseReleaseEvent(&me);
if(m_clicked)
{
m_clicked=false;
@@ -344,21 +344,21 @@ void polyesterButton::mouseReleaseEvent(QMouseEvent* e) {
void polyesterButton::setOn(bool on)
{
- QButton::setOn(on);
+ TQButton::setOn(on);
}
void polyesterButton::setDown(bool on)
{
- QButton::setDown(on);
+ TQButton::setDown(on);
}
//////////////////////////////////////////////////////////
// getButtonImage()
// ----------------
-// get the button QImage based on type and window mode
-QImage polyesterButton::getButtonImage(ButtonType type)
+// get the button TQImage based on type and window mode
+TQImage polyesterButton::getButtonImage(ButtonType type)
{
- QImage finalImage;
+ TQImage finalImage;
switch(type) {
case ButtonClose:
finalImage = uic_findImage( "close.png" );
@@ -423,7 +423,7 @@ QImage polyesterButton::getButtonImage(ButtonType type)
finalImage = uic_findImage( "splat.png" );
break;
}
- if(qGray(KDecoration::options()->color(KDecoration::ColorButtonBg, client_->isActive()).rgb()) < 150)
+ if(tqGray(KDecoration::options()->color(KDecoration::ColorButtonBg, client_->isActive()).rgb()) < 150)
finalImage.invertPixels();
return finalImage;
@@ -434,7 +434,7 @@ QImage polyesterButton::getButtonImage(ButtonType type)
// -------------------------
// draw the pixmap button
-void polyesterButton::drawButton( QPainter *painter ) {
+void polyesterButton::drawButton( TQPainter *painter ) {
if ( !polyesterFactory::initialized() )
return ;
@@ -442,14 +442,14 @@ void polyesterButton::drawButton( QPainter *painter ) {
int newHeight = height() - 2;
int dx = (width() - newWidth) / 2;
int dy = (height() - newHeight) / 2;
- QImage tmpResult;
- QColorGroup group;
- QColor redColor(red);
+ TQImage tmpResult;
+ TQColorGroup group;
+ TQColor redColor(red);
bool active = client_->isActive();
genButtonPix(active);
- QPixmap backgroundTile = client_->getTitleBarTile(active);
+ TQPixmap backgroundTile = client_->getTitleBarTile(active);
group = KDecoration::options()->colorGroup(KDecoration::ColorButtonBg, active);
//draw the titlebar behind the buttons and app icons
@@ -471,10 +471,10 @@ void polyesterButton::drawButton( QPainter *painter ) {
dx++;
dy++;
}
- QPixmap menuButtonPixmap(client_->icon().pixmap(QIconSet::Small, QIconSet::Normal));
- QImage menuButtonImage(menuButtonPixmap.convertToImage());
+ TQPixmap menuButtonPixmap(client_->icon().pixmap(TQIconSet::Small, TQIconSet::Normal));
+ TQImage menuButtonImage(menuButtonPixmap.convertToImage());
//draw the menu button the same size as the other buttons
- //using QIconSet::Large gives us a 32x32 icon to resize, resizing larger than
+ //using TQIconSet::Large gives us a 32x32 icon to resize, resizing larger than
//that may produce pixilation of the image
//painter->setPen(group.background());
@@ -483,7 +483,7 @@ void polyesterButton::drawButton( QPainter *painter ) {
}
//build the button image with the icon superimposed to the button
- QImage buttonImage = (active?(buttonImgActive):(buttonImgInactive))->copy();
+ TQImage buttonImage = (active?(buttonImgActive):(buttonImgInactive))->copy();
KImageEffect::blendOnLower( (int)round(abs(width()-size_)/2), 0,
getButtonImage(type_).smoothScale( size_,size_),
buttonImage );
@@ -498,7 +498,7 @@ void polyesterButton::drawButton( QPainter *painter ) {
//always colorize with a threatening red color the close button
if( type_ == ButtonClose)
{
- //tmpResult = KImageEffect::blend( QColor(180, 50, 50), buttonImage, factor );
+ //tmpResult = KImageEffect::blend( TQColor(180, 50, 50), buttonImage, factor );
KImageEffect::desaturate( tmpResult, factor );
KImageEffect::channelIntensity( tmpResult, factor/3, KImageEffect::Red );
KImageEffect::channelIntensity( tmpResult, -factor/2, KImageEffect::Green );
@@ -550,9 +550,9 @@ void polyesterButton::drawButton( QPainter *painter ) {
}
}
- KImageEffect::blendOnLower(tmpResult, QPoint(1,1), buttonImage, QRect(1,1,width()-2, height()-2) );
+ KImageEffect::blendOnLower(tmpResult, TQPoint(1,1), buttonImage, TQRect(1,1,width()-2, height()-2) );
- QPixmap finalButton = QPixmap(buttonImage);
+ TQPixmap finalButton = TQPixmap(buttonImage);
painter->drawPixmap( 0, 0, finalButton );
}
@@ -563,10 +563,10 @@ void polyesterButton::genButtonPix( bool active )
else if(!active && buttonImgInactive_created) return;
KPixmap tempPixmap;
- QPixmap *tempButton = new QPixmap(width(), height());
- QPainter painter(tempButton);
+ TQPixmap *tempButton = new TQPixmap(width(), height());
+ TQPainter painter(tempButton);
- QColorGroup group;
+ TQColorGroup group;
group = KDecoration::options()->colorGroup(KDecoration::ColorButtonBg, client_->isActive());
if( ::factory->buttonStyle() == BUTTON_GLASS )
@@ -649,7 +649,7 @@ void polyesterButton::genButtonPix( bool active )
}
//border
- QColor borderColor = group.background().dark(160);
+ TQColor borderColor = group.background().dark(160);
painter.setPen( borderColor );
painter.drawLine(0, 2, 0, height()-3);
painter.drawLine(width()-1, 2, width()-1, height()-3);
@@ -671,29 +671,29 @@ void polyesterButton::genButtonPix( bool active )
painter.end();
//border antialiasing
- QImage *tempAlphaImg = new QImage( tempButton->convertToImage() );
+ TQImage *tempAlphaImg = new TQImage( tempButton->convertToImage() );
//tempAlphaImg = tempPixmap.convertToImage();
tempAlphaImg->setAlphaBuffer(true);
int borderRed = borderColor.red();
int borderGreen = borderColor.green();
int borderBlue = borderColor.blue();
- tempAlphaImg->setPixel(0,0, qRgba(borderRed, borderGreen , borderBlue, 40));
- tempAlphaImg->setPixel(width()-1, 0, qRgba(borderRed, borderGreen , borderBlue, 40));
- tempAlphaImg->setPixel(0,height()-1, qRgba(borderRed, borderGreen , borderBlue, 40));
- tempAlphaImg->setPixel(width()-1,height()-1, qRgba(borderRed, borderGreen , borderBlue, 40));
+ tempAlphaImg->setPixel(0,0, tqRgba(borderRed, borderGreen , borderBlue, 40));
+ tempAlphaImg->setPixel(width()-1, 0, tqRgba(borderRed, borderGreen , borderBlue, 40));
+ tempAlphaImg->setPixel(0,height()-1, tqRgba(borderRed, borderGreen , borderBlue, 40));
+ tempAlphaImg->setPixel(width()-1,height()-1, tqRgba(borderRed, borderGreen , borderBlue, 40));
- tempAlphaImg->setPixel(0,1, qRgba(borderRed, borderGreen , borderBlue, 127));
- tempAlphaImg->setPixel(1,0, qRgba(borderRed, borderGreen , borderBlue, 127));
+ tempAlphaImg->setPixel(0,1, tqRgba(borderRed, borderGreen , borderBlue, 127));
+ tempAlphaImg->setPixel(1,0, tqRgba(borderRed, borderGreen , borderBlue, 127));
- tempAlphaImg->setPixel(width()-2,0, qRgba(borderRed, borderGreen , borderBlue, 127));
- tempAlphaImg->setPixel(width()-1,1, qRgba(borderRed, borderGreen , borderBlue, 127));
+ tempAlphaImg->setPixel(width()-2,0, tqRgba(borderRed, borderGreen , borderBlue, 127));
+ tempAlphaImg->setPixel(width()-1,1, tqRgba(borderRed, borderGreen , borderBlue, 127));
- tempAlphaImg->setPixel(0,height()-2, qRgba(borderRed, borderGreen , borderBlue, 127));
- tempAlphaImg->setPixel(1,height()-1, qRgba(borderRed, borderGreen , borderBlue, 127));
+ tempAlphaImg->setPixel(0,height()-2, tqRgba(borderRed, borderGreen , borderBlue, 127));
+ tempAlphaImg->setPixel(1,height()-1, tqRgba(borderRed, borderGreen , borderBlue, 127));
- tempAlphaImg->setPixel(width()-1,height()-2, qRgba(borderRed, borderGreen , borderBlue, 127));
- tempAlphaImg->setPixel(width()-2,height()-1, qRgba(borderRed, borderGreen , borderBlue, 127));
+ tempAlphaImg->setPixel(width()-1,height()-2, tqRgba(borderRed, borderGreen , borderBlue, 127));
+ tempAlphaImg->setPixel(width()-2,height()-1, tqRgba(borderRed, borderGreen , borderBlue, 127));
if( client_->isActive() )
@@ -734,13 +734,13 @@ polyesterClient::polyesterClient(KDecorationBridge *b, KDecorationFactory *f)
//captionBufferDirty(true),
closing(false),
s_titleHeight(0),
- s_titleFont(QFont()),
+ s_titleFont(TQFont()),
maskDirty(true),
aDoubleBufferDirty(true),
iDoubleBufferDirty(true)
{
- aCaptionBuffer = new QPixmap();
- iCaptionBuffer = new QPixmap();
+ aCaptionBuffer = new TQPixmap();
+ iCaptionBuffer = new TQPixmap();
//copying the most used configuration options
frameSize = ::factory->frameSize();
@@ -784,7 +784,7 @@ void polyesterClient::create_pixmaps() {
if(pixmaps_created)
return;
KPixmap tempPixmap;
- QPainter painter;
+ TQPainter painter;
// active top title bar tile
@@ -795,7 +795,7 @@ void polyesterClient::create_pixmaps() {
KPixmapEffect::VerticalGradient
);
// tempPixmap.fill(KDecoration::options()->color(ColorTitleBar, true).light(150));
- aTitleBarTopTile = new QPixmap(1, s_titleHeight+frameSize);
+ aTitleBarTopTile = new TQPixmap(1, s_titleHeight+frameSize);
painter.begin(aTitleBarTopTile);
painter.drawPixmap(0, 0, tempPixmap);
painter.end();
@@ -806,7 +806,7 @@ void polyesterClient::create_pixmaps() {
KDecoration::options()->color(ColorTitleBlend, false),
KPixmapEffect::VerticalGradient
);
- iTitleBarTopTile = new QPixmap(1, s_titleHeight+frameSize);
+ iTitleBarTopTile = new TQPixmap(1, s_titleHeight+frameSize);
painter.begin(iTitleBarTopTile);
painter.drawPixmap(0, 0, tempPixmap);
painter.end();
@@ -817,9 +817,9 @@ void polyesterClient::create_pixmaps() {
else
tempPixmap.resize(1, s_titleHeight+frameSize);
- QColor color1;
- QColor color2;
- QColor glassColor;
+ TQColor color1;
+ TQColor color2;
+ TQColor glassColor;
if( ::factory->titleBarStyle() == TITLEBAR_GLASS )
{
glassColor = alphaBlendColors( KDecoration::options()->color(ColorTitleBar, true),
@@ -840,7 +840,7 @@ void polyesterClient::create_pixmaps() {
KPixmapEffect::VerticalGradient
);
- aTitleBarTile = new QPixmap(1, s_titleHeight+frameSize);
+ aTitleBarTile = new TQPixmap(1, s_titleHeight+frameSize);
painter.begin(aTitleBarTile);
painter.drawPixmap(0, 0, tempPixmap);
@@ -867,7 +867,7 @@ void polyesterClient::create_pixmaps() {
KDecoration::options()->color(ColorTitleBlend, false),
KPixmapEffect::VerticalGradient
);
- iTitleBarTile = new QPixmap(1, s_titleHeight+frameSize);
+ iTitleBarTile = new TQPixmap(1, s_titleHeight+frameSize);
painter.begin(iTitleBarTile);
painter.drawPixmap(0, 0, tempPixmap);
painter.end();
@@ -940,26 +940,26 @@ void polyesterClient::_resetLayout()
delete bottomSpacer_;
delete windowSpacer_;
- mainLayout_ = new QVBoxLayout(widget());
+ mainLayout_ = new TQVBoxLayout(widget());
// title
- titleLayout_ = new QHBoxLayout();
- QHBoxLayout *windowLayout_ = new QHBoxLayout();
-
-
- topSpacer_ = new QSpacerItem(1, frameSize, QSizePolicy::Expanding, QSizePolicy::Fixed);
- titlebar_ = new QSpacerItem(1, s_titleHeight,
- QSizePolicy::Expanding, QSizePolicy::Fixed);
- leftTitleSpacer_ = new QSpacerItem(frameSize, s_titleHeight,
- QSizePolicy::Fixed, QSizePolicy::Fixed);
- rightTitleSpacer_ = new QSpacerItem(frameSize, s_titleHeight,
- QSizePolicy::Fixed, QSizePolicy::Fixed);
- decoSpacer_ = new QSpacerItem(1, frameSize, QSizePolicy::Expanding, QSizePolicy::Fixed);
- leftSpacer_ = new QSpacerItem(frameSize, 1,
- QSizePolicy::Fixed, QSizePolicy::Expanding);
- rightSpacer_ = new QSpacerItem(frameSize, 1,
- QSizePolicy::Fixed, QSizePolicy::Expanding);
- bottomSpacer_ = new QSpacerItem(1, frameSize,
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ titleLayout_ = new TQHBoxLayout();
+ TQHBoxLayout *windowLayout_ = new TQHBoxLayout();
+
+
+ topSpacer_ = new TQSpacerItem(1, frameSize, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ titlebar_ = new TQSpacerItem(1, s_titleHeight,
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ leftTitleSpacer_ = new TQSpacerItem(frameSize, s_titleHeight,
+ TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ rightTitleSpacer_ = new TQSpacerItem(frameSize, s_titleHeight,
+ TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ decoSpacer_ = new TQSpacerItem(1, frameSize, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ leftSpacer_ = new TQSpacerItem(frameSize, 1,
+ TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ rightSpacer_ = new TQSpacerItem(frameSize, 1,
+ TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ bottomSpacer_ = new TQSpacerItem(1, frameSize,
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
// sizeof(...) is calculated at compile time
memset(button, 0, sizeof(polyesterButton *) * ButtonTypeCount);
@@ -967,9 +967,9 @@ void polyesterClient::_resetLayout()
// message in preview widget
if (isPreview()) {
windowLayout_->addWidget(
- new QLabel( i18n("<b><center>Polyester Preview</center></b>"), widget() ), 1 );
+ new TQLabel( i18n("<b><center>Polyester Preview</center></b>"), widget() ), 1 );
} else {
- windowLayout_->addItem(new QSpacerItem(0, 0));
+ windowLayout_->addItem(new TQSpacerItem(0, 0));
}
// setup titlebar buttons
@@ -980,17 +980,17 @@ void polyesterClient::_resetLayout()
if( !::factory->noModalButtons() || !isModal() || isResizable())
addButtons(titleLayout_,
- options()->customButtonPositions() ? options()->titleButtonsLeft() : QString(default_left),
+ options()->customButtonPositions() ? options()->titleButtonsLeft() : TQString(default_left),
buttonSize);
titleLayout_->addItem(titlebar_);
if( !::factory->noModalButtons() || !isModal() || isResizable())
addButtons(titleLayout_,
- options()->customButtonPositions() ? options()->titleButtonsRight() : QString(default_right),
+ options()->customButtonPositions() ? options()->titleButtonsRight() : TQString(default_right),
buttonSize);
titleLayout_->addItem(rightTitleSpacer_);
//Mid - left side, middle contents and right side
- QHBoxLayout * midLayout_ = new QHBoxLayout();
+ TQHBoxLayout * midLayout_ = new TQHBoxLayout();
midLayout_->addItem(leftSpacer_);
midLayout_->addLayout(windowLayout_);
midLayout_->addItem(rightSpacer_);
@@ -1004,8 +1004,8 @@ void polyesterClient::_resetLayout()
// connections
//TODO: probably these two connections could be removed
- // connect(this, SIGNAL(keepAboveChanged(bool)), SLOT(keepAboveChange(bool)));
- // connect(this, SIGNAL(keepBelowChanged(bool)), SLOT(keepBelowChange(bool)));
+ // connect(this, TQ_SIGNAL(keepAboveChanged(bool)), TQ_SLOT(keepAboveChange(bool)));
+ // connect(this, TQ_SIGNAL(keepBelowChanged(bool)), TQ_SLOT(keepBelowChange(bool)));
}
//////////////////////////////////////////////////////////////////////////////
@@ -1013,8 +1013,8 @@ void polyesterClient::_resetLayout()
// ------------
// Add buttons to title layout
-void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int button_size) {
- QString tip;
+void polyesterClient::addButtons(TQBoxLayout *layout, const TQString& s, int button_size) {
+ TQString tip;
if (s.length() > 0) {
for (unsigned n=0; n < s.length(); n++) {
switch (s[n]) {
@@ -1022,8 +1022,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
if (!button[ButtonMenu]) {
button[ButtonMenu] =
new polyesterButton(this, "splat.png", i18n("Menu"),ButtonMenu,button_size,::factory->squareButton());
- connect(button[ButtonMenu], SIGNAL(pressed()), this, SLOT(menuButtonPressed()));
- connect(button[ButtonMenu], SIGNAL(released()), this, SLOT(menuButtonReleased()));
+ connect(button[ButtonMenu], TQ_SIGNAL(pressed()), this, TQ_SLOT(menuButtonPressed()));
+ connect(button[ButtonMenu], TQ_SIGNAL(released()), this, TQ_SLOT(menuButtonReleased()));
layout->addWidget(button[ButtonMenu]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1038,8 +1038,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
}
button[ButtonSticky] =
new polyesterButton(this, "circle.png", tip, ButtonSticky, button_size,::factory->squareButton(), true);
- connect(button[ButtonSticky], SIGNAL(clicked()),
- this, SLOT(toggleOnAllDesktops()));
+ connect(button[ButtonSticky], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(toggleOnAllDesktops()));
layout->addWidget(button[ButtonSticky]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1049,8 +1049,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
if ((!button[ButtonHelp]) && providesContextHelp()) {
button[ButtonHelp] =
new polyesterButton(this, "help.png", i18n("Help"), ButtonHelp, button_size, ::factory->squareButton());
- connect(button[ButtonHelp], SIGNAL(clicked()),
- this, SLOT(showContextHelp()));
+ connect(button[ButtonHelp], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(showContextHelp()));
layout->addWidget(button[ButtonHelp]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1060,8 +1060,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
if ((!button[ButtonMin]) && isMinimizable()) {
button[ButtonMin] =
new polyesterButton(this, "minimize.png", i18n("Minimize"), ButtonMin, button_size,::factory->squareButton());
- connect(button[ButtonMin], SIGNAL(clicked()),
- this, SLOT(minimize()));
+ connect(button[ButtonMin], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(minimize()));
layout->addWidget(button[ButtonMin]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1076,8 +1076,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
}
button[ButtonMax] =
new polyesterButton(this, "maximize.png", tip, ButtonMax, button_size,::factory->squareButton(), true);
- connect(button[ButtonMax], SIGNAL(clicked()),
- this, SLOT(maxButtonPressed()));
+ connect(button[ButtonMax], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(maxButtonPressed()));
layout->addWidget(button[ButtonMax]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1087,8 +1087,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
if ((!button[ButtonClose]) && isCloseable()) {
button[ButtonClose] =
new polyesterButton(this, "close.png", i18n("Close"), ButtonClose, button_size, ::factory->squareButton());
- connect(button[ButtonClose], SIGNAL(clicked()),
- this, SLOT(closeWindow()));
+ connect(button[ButtonClose], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(closeWindow()));
layout->addWidget(button[ButtonClose]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1099,8 +1099,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
button[ButtonAbove] =
new polyesterButton(this, "keep_above.png",
i18n("Keep Above Others"), ButtonAbove, button_size, ::factory->squareButton(), true);
- connect(button[ButtonAbove], SIGNAL(clicked()),
- this, SLOT(aboveButtonPressed()));
+ connect(button[ButtonAbove], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(aboveButtonPressed()));
layout->addWidget(button[ButtonAbove]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1111,8 +1111,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
button[ButtonBelow] =
new polyesterButton(this, "keep_below.png",
i18n("Keep Below Others"), ButtonBelow, button_size, ::factory->squareButton(), true);
- connect(button[ButtonBelow], SIGNAL(clicked()),
- this, SLOT(belowButtonPressed()));
+ connect(button[ButtonBelow], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(belowButtonPressed()));
layout->addWidget(button[ButtonBelow]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1127,8 +1127,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
}
button[ButtonShade] =
new polyesterButton(this, "splat.png", tip, ButtonShade, button_size, ::factory->squareButton(), true);
- connect(button[ButtonShade], SIGNAL(clicked()),
- this, SLOT(shadeButtonPressed()));
+ connect(button[ButtonShade], TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(shadeButtonPressed()));
layout->addWidget(button[ButtonShade]);
if (n < s.length()-1) layout->addSpacing(1);
}
@@ -1172,8 +1172,8 @@ void polyesterClient::captionChange() {
void polyesterClient::desktopChange() {
bool d = isOnAllDesktops();
if (button[ButtonSticky]) {
- QToolTip::remove(button[ButtonSticky]);
- QToolTip::add(button[ButtonSticky], d ? i18n("Un-Sticky") : i18n("Sticky"));
+ TQToolTip::remove(button[ButtonSticky]);
+ TQToolTip::add(button[ButtonSticky], d ? i18n("Un-Sticky") : i18n("Sticky"));
button[ButtonSticky]->repaint(false);
}
}
@@ -1198,8 +1198,8 @@ void polyesterClient::maximizeChange() {
maskDirty = aDoubleBufferDirty = iDoubleBufferDirty = true;
bool m = (maximizeMode() == MaximizeFull);
if (button[ButtonMax]) {
- QToolTip::remove(button[ButtonMax]);
- QToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize"));
+ TQToolTip::remove(button[ButtonMax]);
+ TQToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize"));
button[ButtonMax]->repaint(false);
}
}
@@ -1212,8 +1212,8 @@ void polyesterClient::maximizeChange() {
void polyesterClient::shadeChange() {
bool s = isSetShade();
if (button[ButtonShade]) {
- QToolTip::remove(button[ButtonShade]);
- QToolTip::add(button[ButtonShade], s ? i18n("Unshade") : i18n("Shade"));
+ TQToolTip::remove(button[ButtonShade]);
+ TQToolTip::add(button[ButtonShade], s ? i18n("Unshade") : i18n("Shade"));
button[ButtonShade]->repaint(false);
}
}
@@ -1255,13 +1255,13 @@ void polyesterClient::borders(int &left, int &right, int &top, int &bottom) cons
top = s_titleHeight;
// update layout etc.
- topSpacer_->changeSize(1, -1, QSizePolicy::Expanding, QSizePolicy::Fixed);
- decoSpacer_->changeSize(1, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
- leftSpacer_->changeSize(left, 1, QSizePolicy::Fixed, QSizePolicy::Expanding);
- leftTitleSpacer_->changeSize(left, s_titleHeight, QSizePolicy::Fixed, QSizePolicy::Fixed);
- rightSpacer_->changeSize(right, 1, QSizePolicy::Fixed, QSizePolicy::Expanding);
- rightTitleSpacer_->changeSize(right, s_titleHeight, QSizePolicy::Fixed, QSizePolicy::Fixed);
- bottomSpacer_->changeSize(1, bottom, QSizePolicy::Expanding, QSizePolicy::Fixed);
+ topSpacer_->changeSize(1, -1, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ decoSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ leftTitleSpacer_->changeSize(left, s_titleHeight, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ rightSpacer_->changeSize(right, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ rightTitleSpacer_->changeSize(right, s_titleHeight, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
} else {
/*if the borders are rounded add more left and right borders*/
if( roundedCorners )
@@ -1271,13 +1271,13 @@ void polyesterClient::borders(int &left, int &right, int &top, int &bottom) cons
top = titleSize + (frameSize*2);
// update layout etc.
- topSpacer_->changeSize(1, frameSize, QSizePolicy::Expanding, QSizePolicy::Fixed);
- decoSpacer_->changeSize(1, frameSize, QSizePolicy::Expanding, QSizePolicy::Fixed);
- leftSpacer_->changeSize(left, 1, QSizePolicy::Fixed, QSizePolicy::Expanding);
- leftTitleSpacer_->changeSize(left, s_titleHeight, QSizePolicy::Fixed, QSizePolicy::Fixed);
- rightSpacer_->changeSize(right, 1, QSizePolicy::Fixed, QSizePolicy::Expanding);
- rightTitleSpacer_->changeSize(right,s_titleHeight,QSizePolicy::Fixed, QSizePolicy::Fixed);
- bottomSpacer_->changeSize(1, bottom, QSizePolicy::Expanding, QSizePolicy::Fixed);
+ topSpacer_->changeSize(1, frameSize, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ decoSpacer_->changeSize(1, frameSize, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ leftTitleSpacer_->changeSize(left, s_titleHeight, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ rightSpacer_->changeSize(right, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
+ rightTitleSpacer_->changeSize(right,s_titleHeight,TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
}
widget()->layout()->activate();
}
@@ -1287,7 +1287,7 @@ void polyesterClient::borders(int &left, int &right, int &top, int &bottom) cons
// --------
// Called to resize the window
-void polyesterClient::resize(const QSize &size) {
+void polyesterClient::resize(const TQSize &size) {
widget()->resize(size);
}
@@ -1296,7 +1296,7 @@ void polyesterClient::resize(const QSize &size) {
// -------------
// Return the minimum allowable size for this window
-QSize polyesterClient::minimumSize() const {
+TQSize polyesterClient::minimumSize() const {
return widget()->minimumSize();
}
@@ -1305,7 +1305,7 @@ QSize polyesterClient::minimumSize() const {
// ---------------
// Return logical mouse position
-KDecoration::Position polyesterClient::mousePosition(const QPoint &point) const {
+KDecoration::Position polyesterClient::mousePosition(const TQPoint &point) const {
const int corner = 24;
Position pos;
int fs = frameSize + handlebar;
@@ -1355,33 +1355,33 @@ KDecoration::Position polyesterClient::mousePosition(const QPoint &point) const
// -------------
// Event filter
-bool polyesterClient::eventFilter(QObject *obj, QEvent *e) {
+bool polyesterClient::eventFilter(TQObject *obj, TQEvent *e) {
if (obj != widget())
return false;
switch (e->type()) {
- case QEvent::MouseButtonDblClick: {
- mouseDoubleClickEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonDblClick: {
+ mouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
return true;
}
- case QEvent::MouseButtonPress: {
- processMousePressEvent(static_cast<QMouseEvent *>(e));
+ case TQEvent::MouseButtonPress: {
+ processMousePressEvent(static_cast<TQMouseEvent *>(e));
return true;
}
- case QEvent::Wheel: {
- wheelEvent(static_cast< QWheelEvent* >(e));
+ case TQEvent::Wheel: {
+ wheelEvent(static_cast< TQWheelEvent* >(e));
return true;
}
- case QEvent::Paint: {
- paintEvent(static_cast<QPaintEvent *>(e));
+ case TQEvent::Paint: {
+ paintEvent(static_cast<TQPaintEvent *>(e));
return true;
}
- case QEvent::Resize: {
- resizeEvent(static_cast<QResizeEvent *>(e));
+ case TQEvent::Resize: {
+ resizeEvent(static_cast<TQResizeEvent *>(e));
return true;
}
- case QEvent::Show: {
- showEvent(static_cast<QShowEvent *>(e));
+ case TQEvent::Show: {
+ showEvent(static_cast<TQShowEvent *>(e));
return true;
}
default: {
@@ -1397,7 +1397,7 @@ bool polyesterClient::eventFilter(QObject *obj, QEvent *e) {
// -----------------------
// Doubleclick on title
-void polyesterClient::mouseDoubleClickEvent(QMouseEvent *e) {
+void polyesterClient::mouseDoubleClickEvent(TQMouseEvent *e) {
if (titlebar_->geometry().contains(e->pos()))
titlebarDblClickOperation();
}
@@ -1407,7 +1407,7 @@ void polyesterClient::mouseDoubleClickEvent(QMouseEvent *e) {
// -----------------------
// Mousewheel over titlebar
-void polyesterClient::wheelEvent(QWheelEvent * e) {
+void polyesterClient::wheelEvent(TQWheelEvent * e) {
#if KDE_VERSION > KDE_MAKE_VERSION(3,4,3)
if (titleLayout_->geometry().contains(e->pos()))
titlebarMouseWheelOperation(e->delta());
@@ -1419,7 +1419,7 @@ titlebarMouseWheelOperation(e->delta());
// ------------
// Repaint the window
-void polyesterClient::paintEvent(QPaintEvent* e) {
+void polyesterClient::paintEvent(TQPaintEvent* e) {
if (!::factory->initialized())
{
return;
@@ -1429,21 +1429,21 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
const uint maxCaptionLength = 200; // truncate captions longer than this!
// FIXME: truncate related to window size
//titlebar_->geometry().width()/(widget()->font().pointSize());
- QString captionText(caption());
+ TQString captionText(caption());
if (captionText.length() > maxCaptionLength) {
captionText.truncate(maxCaptionLength);
captionText.append(" [...]");
}
- QColor blackColor(black);
- QColor redColor(red);
- QColorGroup group,widgetGroup;
+ TQColor blackColor(black);
+ TQColor redColor(red);
+ TQColorGroup group,widgetGroup;
bool active = isActive();
//doublebuffering everything to avoid the flicker
- QPainter finalPainter(widget());
+ TQPainter finalPainter(widget());
//an ugly debug red border used to thest the speed...
//finalPainter.fillRect(e->rect(),red);return;
@@ -1467,39 +1467,39 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
if( active )
- activeBuff = QPixmap(widget()->width(), widget()->height());
+ activeBuff = TQPixmap(widget()->width(), widget()->height());
else
- inactiveBuff = QPixmap(widget()->width(), widget()->height());
+ inactiveBuff = TQPixmap(widget()->width(), widget()->height());
- QPainter painter(active?&activeBuff:&inactiveBuff);
+ TQPainter painter(active?&activeBuff:&inactiveBuff);
//get group information first
group = options()->colorGroup(KDecoration::ColorTitleBlend, active);
widgetGroup = widget()->colorGroup();
- QRect topRect( topSpacer_->geometry() );
- QRect titleRect( titleLayout_->geometry() );
- QRect textRect( titlebar_->geometry() );
- QRect Rltitle( leftTitleSpacer_->geometry() );
- QRect Rrtitle( rightTitleSpacer_->geometry() );
- QRect Rdeco( decoSpacer_->geometry() );
- QRect Rleft( leftSpacer_->geometry() );
- QRect Rright( rightSpacer_->geometry() );
- QRect Rbottom( bottomSpacer_->geometry() );
- QRect tempRect;
+ TQRect topRect( topSpacer_->geometry() );
+ TQRect titleRect( titleLayout_->geometry() );
+ TQRect textRect( titlebar_->geometry() );
+ TQRect Rltitle( leftTitleSpacer_->geometry() );
+ TQRect Rrtitle( rightTitleSpacer_->geometry() );
+ TQRect Rdeco( decoSpacer_->geometry() );
+ TQRect Rleft( leftSpacer_->geometry() );
+ TQRect Rright( rightSpacer_->geometry() );
+ TQRect Rbottom( bottomSpacer_->geometry() );
+ TQRect tempRect;
/*
if(active)
{
- qDebug("topRect.y() = %i\tbottom() = %i",topRect.top(),topRect.bottom());
- qDebug("titleRect.y() = %i\tbottom() = %i",titleRect.top(),titleRect.bottom());
- qDebug("textRect.y() = %i\tbottom() = %i",textRect.top(),textRect.bottom());
- qDebug("Rltitle.y() = %i\tbottom() = %i",Rltitle.top(),Rltitle.bottom());
- qDebug("Rrtitle.y() = %i\tbottom() = %i",Rrtitle.top(),Rrtitle.bottom());
- qDebug("Rdeco.y() = %i\tbottom() = %i",Rdeco.top(),Rdeco.bottom());
- qDebug("Rleft.y() = %i\tbottom() = %i",Rleft.top(),Rleft.bottom());
- qDebug("Rright.y() = %i\tbottom() = %i",Rright.top(),Rright.bottom());
- qDebug("Rbottom.y() = %i\tbottom() = %i",Rbottom.top(),Rbottom.bottom());
+ tqDebug("topRect.y() = %i\tbottom() = %i",topRect.top(),topRect.bottom());
+ tqDebug("titleRect.y() = %i\tbottom() = %i",titleRect.top(),titleRect.bottom());
+ tqDebug("textRect.y() = %i\tbottom() = %i",textRect.top(),textRect.bottom());
+ tqDebug("Rltitle.y() = %i\tbottom() = %i",Rltitle.top(),Rltitle.bottom());
+ tqDebug("Rrtitle.y() = %i\tbottom() = %i",Rrtitle.top(),Rrtitle.bottom());
+ tqDebug("Rdeco.y() = %i\tbottom() = %i",Rdeco.top(),Rdeco.bottom());
+ tqDebug("Rleft.y() = %i\tbottom() = %i",Rleft.top(),Rleft.bottom());
+ tqDebug("Rright.y() = %i\tbottom() = %i",Rright.top(),Rright.bottom());
+ tqDebug("Rbottom.y() = %i\tbottom() = %i",Rbottom.top(),Rbottom.bottom());
}
*/
@@ -1519,23 +1519,23 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
//is the title text too long?
bool titleTooLong = false;
- Qt::AlignmentFlags titleAlign = ::factory->titleAlign();
+ TQt::AlignmentFlags titleAlign = ::factory->titleAlign();
const int gradientWidth = 60;
- if( QFontMetrics(widget()->font()).width(captionText) > (textRect.width() - gradientWidth) )
+ if( TQFontMetrics(widget()->font()).width(captionText) > (textRect.width() - gradientWidth) )
{
titleTooLong = true;
- titleAlign = Qt::AlignLeft;
+ titleAlign = TQt::AlignLeft;
}
//we are shadowing title bar text only if there is some text
if(::factory->titleShadow() && textRect.width()>0 && textRect.height()>0)
{
- QPixmap textPixmap;
- QPainter tempPainter;
- QColor shadowColor;
+ TQPixmap textPixmap;
+ TQPainter tempPainter;
+ TQColor shadowColor;
- textPixmap = QPixmap(textRect.width(), textRect.height());
- textPixmap.fill(QColor(0,0,0));
+ textPixmap = TQPixmap(textRect.width(), textRect.height());
+ textPixmap.fill(TQColor(0,0,0));
textPixmap.setMask( textPixmap.createHeuristicMask(TRUE) );
tempPainter.begin(&textPixmap);
@@ -1546,16 +1546,16 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
tempPainter.setPen(white);
tempPainter.drawText(1, 1, textRect.width(), textRect.height(),
- titleAlign | AlignVCenter | Qt::SingleLine,
+ titleAlign | AlignVCenter | TQt::SingleLine,
captionText);
tempPainter.end();
// make the cute blurred text shadow from Plastik engine
- QImage shadow;
+ TQImage shadow;
ShadowEngine se;
//deciding if the shadow will be black or white
- if(qGray(options()->color(KDecoration::ColorFont, isActive()).rgb()) > 150)
+ if(tqGray(options()->color(KDecoration::ColorFont, isActive()).rgb()) > 150)
shadowColor = blackColor;
else
shadowColor = white;
@@ -1570,7 +1570,7 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
painter.setFont(options()->font(isActive(), false));
painter.setPen(options()->color(KDecoration::ColorFont, isActive()));
painter.drawText(textRect,
- titleAlign | AlignVCenter | Qt::SingleLine,
+ titleAlign | AlignVCenter | TQt::SingleLine,
captionText);
// make title fade out when the caption is too long, veery slow but veery cool :-)
@@ -1578,13 +1578,13 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
{
int xGradient = textRect.right()-(gradientWidth-1);
- QPixmap backLayerP = QPixmap(gradientWidth, textRect.height());
- QPainter layerPainter(&backLayerP);
+ TQPixmap backLayerP = TQPixmap(gradientWidth, textRect.height());
+ TQPainter layerPainter(&backLayerP);
layerPainter.drawTiledPixmap(backLayerP.rect(), active ? *aTitleBarTile:*iTitleBarTile);
layerPainter.end();
- QImage backLayer = backLayerP.convertToImage();
+ TQImage backLayer = backLayerP.convertToImage();
- QImage textLayer = ( active ?
+ TQImage textLayer = ( active ?
activeBuff.convertToImage():
inactiveBuff.convertToImage()
).copy( xGradient, textRect.y(),
@@ -1698,35 +1698,35 @@ void polyesterClient::updateMask() {
if ( (!options()->moveResizeMaximizedWindows() && maximizeMode() & MaximizeFull ) )
{
- setMask(QRegion(widget()->rect()));
+ setMask(TQRegion(widget()->rect()));
return;
}
int r(width());
int b(height());
- QRegion mask;
+ TQRegion mask;
- mask=QRegion(widget()->rect());
- mask=QRegion( 0, 0, r, b );
+ mask=TQRegion(widget()->rect());
+ mask=TQRegion( 0, 0, r, b );
// Remove top-left corner.
if( roundedCorners &&
maximizeMode() != KDecorationDefines::MaximizeFull )
{
- mask -= QRegion(0, 0, 5, 1);
- mask -= QRegion(0, 1, 3, 1);
- mask -= QRegion(0, 2, 2, 1);
- mask -= QRegion(0, 3, 1, 2);
- mask -= QRegion(r - 5, 0, 5, 1);
- mask -= QRegion(r - 3, 1, 3, 1);
- mask -= QRegion(r - 2, 2, 2, 1);
- mask -= QRegion(r - 1, 3, 1, 2);
+ mask -= TQRegion(0, 0, 5, 1);
+ mask -= TQRegion(0, 1, 3, 1);
+ mask -= TQRegion(0, 2, 2, 1);
+ mask -= TQRegion(0, 3, 1, 2);
+ mask -= TQRegion(r - 5, 0, 5, 1);
+ mask -= TQRegion(r - 3, 1, 3, 1);
+ mask -= TQRegion(r - 2, 2, 2, 1);
+ mask -= TQRegion(r - 1, 3, 1, 2);
}
//always remove one corner pixel so it simulates a soft corner like plastik
- mask -= QRegion(0,0,1,1);
- mask -= QRegion(r-1,0,1,1);
- mask -= QRegion(0, b-1, 1,1);
- mask -= QRegion(r-1,b-1,1,1);
+ mask -= TQRegion(0,0,1,1);
+ mask -= TQRegion(r-1,0,1,1);
+ mask -= TQRegion(0, b-1, 1,1);
+ mask -= TQRegion(r-1,b-1,1,1);
setMask(mask, 1);
@@ -1738,10 +1738,10 @@ void polyesterClient::updateMask() {
// -------------
// Window is being resized
-void polyesterClient::resizeEvent(QResizeEvent *) {
+void polyesterClient::resizeEvent(TQResizeEvent *) {
maskDirty = aDoubleBufferDirty = iDoubleBufferDirty = true;
if (widget()->isShown()) {
- QRegion region = widget()->rect();
+ TQRegion region = widget()->rect();
region = region.subtract(titlebar_->geometry());
widget()->erase(region);
}
@@ -1753,7 +1753,7 @@ void polyesterClient::resizeEvent(QResizeEvent *) {
// -----------
// Window is being shown
-void polyesterClient::showEvent(QShowEvent *) {
+void polyesterClient::showEvent(TQShowEvent *) {
widget()->repaint();
updateMask();
}
@@ -1824,16 +1824,16 @@ void polyesterClient::belowButtonPressed() {
// Menu button was pressed (popup the menu)
void polyesterClient::menuButtonPressed() {
- static QTime* t = NULL;
+ static TQTime* t = NULL;
static polyesterClient* lastClient = NULL;
if (t == NULL)
- t = new QTime;
- bool dbl = (lastClient==this && t->elapsed() <= QApplication::doubleClickInterval());
+ t = new TQTime;
+ bool dbl = (lastClient==this && t->elapsed() <= TQApplication::doubleClickInterval());
lastClient = this;
t->start();
//if (button[ButtonMenu] && !dbl && !::factory->menuClosed()) {
if ( !dbl || !::factory->menuClosed()) {
- QPoint p(button[ButtonMenu]->rect().bottomLeft().x(),
+ TQPoint p(button[ButtonMenu]->rect().bottomLeft().x(),
button[ButtonMenu]->rect().bottomLeft().y());
KDecorationFactory* f = factory();
showWindowMenu(button[ButtonMenu]->mapToGlobal(p));
diff --git a/client/polyester.h b/client/polyester.h
index 52535f9..2d12f7f 100755
--- a/client/polyester.h
+++ b/client/polyester.h
@@ -30,7 +30,7 @@
#ifndef polyester_H
#define polyester_H
-#include <qbutton.h>
+#include <tqbutton.h>
#include <kdecoration.h>
#include <kdecorationfactory.h>
@@ -41,8 +41,8 @@
#define BUTTON_REVGRADIENT 2
#define BUTTON_FLAT 3
-class QSpacerItem;
-class QPoint;
+class TQSpacerItem;
+class TQPoint;
namespace polyester {
@@ -77,7 +77,7 @@ public:
virtual KDecoration *createDecoration(KDecorationBridge *b);
virtual bool reset(unsigned long changed);
static bool initialized();
- static Qt::AlignmentFlags titleAlign();
+ static TQt::AlignmentFlags titleAlign();
static int contrast();
static bool roundedCorners();
static int titleSize();
@@ -85,7 +85,7 @@ public:
static bool squareButton();
static int frameSize();
static int roundSize();
- static QFont titleFontTool() { return m_titleFontTool; }
+ static TQFont titleFontTool() { return m_titleFontTool; }
static bool titleShadow();
static int titleBarStyle() { return titleBarStyle_;}
static int buttonStyle() { return buttonStyle_;}
@@ -100,7 +100,7 @@ private:
private:
static bool initialized_;
- static Qt::AlignmentFlags titlealign_;
+ static TQt::AlignmentFlags titlealign_;
static int contrast_;
static bool cornerflags_;
static int titlesize_;
@@ -111,7 +111,7 @@ private:
static int titleBarStyle_;
static int buttonStyle_;
static int roundsize_;
- static QFont m_titleFontTool;
+ static TQFont m_titleFontTool;
static bool titleshadow_;
static bool animatebuttons;
static bool nomodalbuttons;
@@ -122,7 +122,7 @@ private:
inline bool polyesterFactory::initialized() {
return initialized_;
}
-inline Qt::AlignmentFlags polyesterFactory::titleAlign() {
+inline TQt::AlignmentFlags polyesterFactory::titleAlign() {
return titlealign_;
}
@@ -154,11 +154,11 @@ inline bool polyesterFactory::titleShadow() {
// polyesterButton //////////////////////////////////////////////////////////
-class polyesterButton : public QButton {
- Q_OBJECT
+class polyesterButton : public TQButton {
+ TQ_OBJECT
public:
polyesterButton(polyesterClient *parent=0, const char *name=0,
- const QString &tip=NULL,
+ const TQString &tip=NULL,
ButtonType type=ButtonHelp,
int button_size=18,
bool squareButton = true,
@@ -167,10 +167,10 @@ public:
~polyesterButton();
void setBitmap(const unsigned char *bitmap);
- QSize sizeHint() const;
+ TQSize sizeHint() const;
ButtonState lastMousePress() const;
void reset();
- QImage getButtonImage(ButtonType type);
+ TQImage getButtonImage(ButtonType type);
virtual void setOn(bool on);
virtual void setDown(bool on);
@@ -180,11 +180,11 @@ protected slots:
void buttonReleased();
private:
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void drawButton(QPainter *painter);
+ void enterEvent(TQEvent *e);
+ void leaveEvent(TQEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
+ void drawButton(TQPainter *painter);
void genButtonPix( bool active );
private:
@@ -192,20 +192,20 @@ private:
ButtonType type_;
int size_;
double buttonProportions_;
- QBitmap *deco_;
- QPixmap *pixmap[2][4];
- QImage *buttonImgActive;
- QImage *buttonImgInactive;
+ TQBitmap *deco_;
+ TQPixmap *pixmap[2][4];
+ TQImage *buttonImgActive;
+ TQImage *buttonImgInactive;
ButtonState lastmouse_;
bool buttonImgActive_created;
bool buttonImgInactive_created;
bool hover_;
bool m_clicked;
- QTimer *animTmr;
+ TQTimer *animTmr;
uint animProgress;
};
-inline Qt::ButtonState polyesterButton::lastMousePress() const {
+inline TQt::ButtonState polyesterButton::lastMousePress() const {
return lastmouse_;
}
inline void polyesterButton::reset() {
@@ -215,7 +215,7 @@ inline void polyesterButton::reset() {
// polyesterClient //////////////////////////////////////////////////////////
class polyesterClient : public KDecoration {
- Q_OBJECT
+ TQ_OBJECT
public:
polyesterClient(KDecorationBridge *b, KDecorationFactory *f);
virtual ~polyesterClient();
@@ -231,37 +231,37 @@ public:
virtual void borders(int &l, int &r, int &t, int &b) const;
- virtual void resize(const QSize &size);
- virtual QSize minimumSize() const;
- virtual Position mousePosition(const QPoint &point) const;
+ virtual void resize(const TQSize &size);
+ virtual TQSize minimumSize() const;
+ virtual Position mousePosition(const TQPoint &point) const;
- QPixmap getTitleBarTile(bool active) const
+ TQPixmap getTitleBarTile(bool active) const
{
return active ? *aTitleBarTile : *iTitleBarTile;
}
private:
- void addButtons(QBoxLayout* layout, const QString& buttons, int buttonSize = 18);
- bool eventFilter(QObject *obj, QEvent *e);
- void mouseDoubleClickEvent(QMouseEvent *e);
- void wheelEvent(QWheelEvent *e);
- void paintEvent(QPaintEvent *e);
- void resizeEvent(QResizeEvent *);
- void showEvent(QShowEvent *);
+ void addButtons(TQBoxLayout* layout, const TQString& buttons, int buttonSize = 18);
+ bool eventFilter(TQObject *obj, TQEvent *e);
+ void mouseDoubleClickEvent(TQMouseEvent *e);
+ void wheelEvent(TQWheelEvent *e);
+ void paintEvent(TQPaintEvent *e);
+ void resizeEvent(TQResizeEvent *);
+ void showEvent(TQShowEvent *);
void updateMask();
void _resetLayout();
int frameSize, titleSize, buttonSize;
bool roundedCorners;
- QVBoxLayout *mainLayout_;
- QHBoxLayout *titleLayout_;
- QSpacerItem *topSpacer_,
+ TQVBoxLayout *mainLayout_;
+ TQHBoxLayout *titleLayout_;
+ TQSpacerItem *topSpacer_,
*titleSpacer_,
*leftTitleSpacer_, *rightTitleSpacer_,
*decoSpacer_,
*leftSpacer_, *rightSpacer_,
*bottomSpacer_, *windowSpacer_;
- QPixmap *aCaptionBuffer, *iCaptionBuffer;
+ TQPixmap *aCaptionBuffer, *iCaptionBuffer;
private slots:
void maxButtonPressed();
@@ -278,16 +278,16 @@ signals:
void keepBelowChanged(bool);
private:
- QPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile;
+ TQPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile;
polyesterButton *button[ButtonTypeCount];
- QSpacerItem *titlebar_;
+ TQSpacerItem *titlebar_;
bool pixmaps_created;
bool closing;
int s_titleHeight;
- QFont s_titleFont;
+ TQFont s_titleFont;
int handlebar;
bool maskDirty, aDoubleBufferDirty, iDoubleBufferDirty;
- QPixmap activeBuff, inactiveBuff;
+ TQPixmap activeBuff, inactiveBuff;
void create_pixmaps();
void delete_pixmaps();
diff --git a/client/shadow.cpp b/client/shadow.cpp
index d6d4a86..8b94933 100755
--- a/client/shadow.cpp
+++ b/client/shadow.cpp
@@ -27,7 +27,7 @@
*/
#include "shadow.h"
-#include <qcolor.h>
+#include <tqcolor.h>
ShadowEngine::ShadowEngine()
{
@@ -39,9 +39,9 @@ ShadowEngine::~ShadowEngine()
{
}
-QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor)
+TQImage ShadowEngine::makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor)
{
- QImage result;
+ TQImage result;
// create a new image for for the shaddow
int w = textPixmap.width();
@@ -57,7 +57,7 @@ QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor
/*
* This is the source pixmap
*/
- QImage img = textPixmap.convertToImage().convertDepth(32);
+ TQImage img = textPixmap.convertToImage().convertDepth(32);
/*
* Resize the image if necessary
@@ -77,13 +77,13 @@ QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor
alphaShadow = decay(img, i, j);
alphaShadow = (alphaShadow > 180.0) ? 180.0 : alphaShadow;
// update the shadow's i,j pixel.
- result.setPixel(i,j, qRgba(bgRed, bgGreen , bgBlue, (int) alphaShadow));
+ result.setPixel(i,j, tqRgba(bgRed, bgGreen , bgBlue, (int) alphaShadow));
}
}
return result;
}
-double ShadowEngine::decay(QImage& source, int i, int j)
+double ShadowEngine::decay(TQImage& source, int i, int j)
{
// create a new image for the shadow
int w = source.width();
@@ -115,7 +115,7 @@ double ShadowEngine::decay(QImage& source, int i, int j)
else
sy = j + m;
- opacity += qGray(source.pixel(sx, sy));
+ opacity += tqGray(source.pixel(sx, sy));
}
}
alphaShadow += opacity / multiplicationFactor_;
diff --git a/client/shadow.h b/client/shadow.h
index 3f89c3c..0434201 100755
--- a/client/shadow.h
+++ b/client/shadow.h
@@ -29,9 +29,9 @@
#ifndef __FX_SHADOW
#define __FX_SHADOW
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcolor.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqcolor.h>
class ShadowEngine
{
@@ -40,9 +40,9 @@ class ShadowEngine
~ShadowEngine();
void setThickness(int thickness) { thickness_ = thickness; }
void setMultiplicationFactor(double factor) { multiplicationFactor_ = factor; }
- QImage makeShadow(const QPixmap& textPixmap, const QColor &bgColor);
+ TQImage makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor);
private:
- double decay(QImage& source, int x, int y);
+ double decay(TQImage& source, int x, int y);
int thickness_;
double multiplicationFactor_;
diff --git a/style/config/configdialog.ui b/style/config/configdialog.ui
index 2ffe295..07732af 100644
--- a/style/config/configdialog.ui
+++ b/style/config/configdialog.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigDialog</cstring>
</property>
@@ -31,7 +31,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget2</cstring>
</property>
@@ -41,7 +41,7 @@
<height>0</height>
</size>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -52,7 +52,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>buttons</cstring>
</property>
@@ -68,7 +68,7 @@
<set>AlignBottom</set>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>animations</cstring>
</property>
@@ -84,7 +84,7 @@
<set>AlignBottom</set>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>lightBorder</cstring>
</property>
@@ -101,7 +101,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLayoutWidget" row="7" column="1" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="7" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>layout1</cstring>
</property>
@@ -126,7 +126,7 @@
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>animateButtonToDark</cstring>
</property>
@@ -139,7 +139,7 @@
</widget>
</hbox>
</widget>
- <widget class="QCheckBox" row="3" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="3" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>shadowedButtonsText</cstring>
</property>
@@ -153,7 +153,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1" rowspan="1" colspan="2">
+ <widget class="TQComboBox" row="1" column="1" rowspan="1" colspan="2">
<item>
<property name="text">
<string>Glass buttons</string>
@@ -178,7 +178,7 @@
<cstring>buttonStyle</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="6" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="6" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>animateButton</cstring>
</property>
@@ -189,7 +189,7 @@
<string>Alt+M</string>
</property>
</widget>
- <widget class="QCheckBox" row="8" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="8" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>animateProgressBar</cstring>
</property>
@@ -234,7 +234,7 @@
</size>
</property>
</spacer>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -262,7 +262,7 @@
</size>
</property>
</spacer>
- <widget class="QLabel" row="11" column="0">
+ <widget class="TQLabel" row="11" column="0">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -273,7 +273,7 @@
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QCheckBox" row="12" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="12" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>coloredScrollBar</cstring>
</property>
@@ -287,7 +287,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="13" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="13" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>scrollBarLines</cstring>
</property>
@@ -298,7 +298,7 @@
<string>Alt+S</string>
</property>
</widget>
- <widget class="QComboBox" row="10" column="1" rowspan="1" colspan="2">
+ <widget class="TQComboBox" row="10" column="1" rowspan="1" colspan="2">
<item>
<property name="text">
<string>KDE style</string>
@@ -323,7 +323,7 @@
<cstring>scrollBarStyle</cstring>
</property>
</widget>
- <widget class="QLabel" row="10" column="0">
+ <widget class="TQLabel" row="10" column="0">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -334,7 +334,7 @@
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="9" column="0">
+ <widget class="TQLabel" row="9" column="0">
<property name="name">
<cstring>scrollbars</cstring>
</property>
@@ -350,7 +350,7 @@
<set>AlignBottom</set>
</property>
</widget>
- <widget class="QLayoutWidget" row="17" column="1" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="17" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>layout21</cstring>
</property>
@@ -358,7 +358,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>customCheckMarkColor</cstring>
</property>
@@ -387,7 +387,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="17" column="0">
+ <widget class="TQLabel" row="17" column="0">
<property name="name">
<cstring>textLabel10</cstring>
</property>
@@ -401,7 +401,7 @@
<cstring>customCheckMarkColor</cstring>
</property>
</widget>
- <widget class="QLabel" row="16" column="0">
+ <widget class="TQLabel" row="16" column="0">
<property name="name">
<cstring>textLabel9</cstring>
</property>
@@ -415,7 +415,7 @@
<cstring>customOverHighlightColor</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="16" column="1" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="16" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>layout20</cstring>
</property>
@@ -423,7 +423,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>customOverHighlightColor</cstring>
</property>
@@ -452,7 +452,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="15" column="0">
+ <widget class="TQLabel" row="15" column="0">
<property name="name">
<cstring>textLabel8</cstring>
</property>
@@ -466,7 +466,7 @@
<cstring>customFocusHighlightColor</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="15" column="1" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="15" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>layout22</cstring>
</property>
@@ -474,7 +474,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>customFocusHighlightColor</cstring>
</property>
@@ -503,7 +503,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="14" column="0">
+ <widget class="TQLabel" row="14" column="0">
<property name="name">
<cstring>textLabel7</cstring>
</property>
@@ -519,7 +519,7 @@
<set>AlignBottom</set>
</property>
</widget>
- <widget class="QSpinBox" row="11" column="1">
+ <widget class="TQSpinBox" row="11" column="1">
<property name="name">
<cstring>scrollBarSize</cstring>
</property>
@@ -553,7 +553,7 @@
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="4" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="4" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>useLowerCaseText</cstring>
</property>
@@ -566,7 +566,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -577,7 +577,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>buttonMenuItem</cstring>
</property>
@@ -594,7 +594,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="3" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>menuStripe</cstring>
</property>
@@ -608,7 +608,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="4" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>shadowedMenuBarText</cstring>
</property>
@@ -622,7 +622,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="5" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="5" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>menuBarEmphasis</cstring>
</property>
@@ -633,7 +633,7 @@
<string>Alt+U</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="6" column="1" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="6" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>layout9</cstring>
</property>
@@ -658,7 +658,7 @@
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>menuBarEmphasisBorder</cstring>
</property>
@@ -682,7 +682,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -693,7 +693,7 @@
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QCheckBox" row="14" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="14" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>highLightTab</cstring>
</property>
@@ -707,7 +707,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="12" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="12" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>statusBarFrame</cstring>
</property>
@@ -721,7 +721,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="15" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="15" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>drawTriangularExpander</cstring>
</property>
@@ -732,7 +732,7 @@
<string>Alt+X</string>
</property>
</widget>
- <widget class="QCheckBox" row="13" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="13" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>centeredTabBar</cstring>
</property>
@@ -743,7 +743,7 @@
<string>Alt+C</string>
</property>
</widget>
- <widget class="QCheckBox" row="17" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="17" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>colorizeSortedHeader</cstring>
</property>
@@ -757,7 +757,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="16" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="16" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>inputFocusHighlight</cstring>
</property>
@@ -768,7 +768,7 @@
<string>Alt+I</string>
</property>
</widget>
- <widget class="QCheckBox" row="10" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="10" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>drawToolBarItemSeparator</cstring>
</property>
@@ -782,7 +782,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="9" column="1" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="9" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>drawToolBarSeparator</cstring>
</property>
@@ -813,7 +813,7 @@
</size>
</property>
</spacer>
- <widget class="QLabel" row="11" column="0">
+ <widget class="TQLabel" row="11" column="0">
<property name="name">
<cstring>misc</cstring>
</property>
@@ -829,7 +829,7 @@
<set>AlignBottom</set>
</property>
</widget>
- <widget class="QLabel" row="8" column="0">
+ <widget class="TQLabel" row="8" column="0">
<property name="name">
<cstring>toolbars</cstring>
</property>
@@ -845,7 +845,7 @@
<set>AlignBottom</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>menus</cstring>
</property>
@@ -861,7 +861,7 @@
<set>AlignBottom</set>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>menuItemSpacing</cstring>
</property>
@@ -946,7 +946,7 @@
</size>
</property>
</spacer>
- <widget class="QFrame" row="7" column="1" rowspan="1" colspan="2">
+ <widget class="TQFrame" row="7" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>frameCustomEmphColor</cstring>
</property>
@@ -983,7 +983,7 @@
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>customMenuBarEmphasisColor</cstring>
</property>
@@ -1017,7 +1017,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -1028,7 +1028,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTextBrowser">
+ <widget class="TQTextBrowser">
<property name="name">
<cstring>textBrowser1</cstring>
</property>
@@ -1060,7 +1060,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -1071,7 +1071,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTextBrowser">
+ <widget class="TQTextBrowser">
<property name="name">
<cstring>textBrowser2</cstring>
</property>
diff --git a/style/config/polyesterconf.cpp b/style/config/polyesterconf.cpp
index 8f4bbec..055e19b 100755
--- a/style/config/polyesterconf.cpp
+++ b/style/config/polyesterconf.cpp
@@ -27,15 +27,15 @@ DEALINGS IN THE SOFTWARE.
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qspinbox.h>
-#include <qsettings.h>
-#include <qcolor.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqspinbox.h>
+#include <tqsettings.h>
+#include <tqcolor.h>
+#include <tqgroupbox.h>
#include <kglobal.h>
#include <klocale.h>
#include <kcolorbutton.h>
@@ -46,18 +46,18 @@ DEALINGS IN THE SOFTWARE.
extern "C"
{
- KDE_EXPORT QWidget* allocate_kstyle_config(QWidget* parent)
+ KDE_EXPORT TQWidget* allocate_kstyle_config(TQWidget* parent)
{
KGlobal::locale()->insertCatalogue("polyester");
return new PolyesterStyleConfig(parent);
}
}
-PolyesterStyleConfig::PolyesterStyleConfig(QWidget* parent): QWidget(parent)
+PolyesterStyleConfig::PolyesterStyleConfig(TQWidget* parent): TQWidget(parent)
{
//Should have no margins here, the dialog provides them
- QVBoxLayout* layout = new QVBoxLayout(this, 0, 0);
+ TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0);
dialog_ = new ConfigDialog(this);
KGlobal::locale()->insertCatalogue("kstyle_polyester_config");
@@ -65,7 +65,7 @@ PolyesterStyleConfig::PolyesterStyleConfig(QWidget* parent): QWidget(parent)
layout->addWidget(dialog_);
dialog_->show();
- QSettings s;
+ TQSettings s;
origScrollBarLines = s.readBoolEntry("/polyesterstyle/Settings/scrollBarLines", false);
dialog_->scrollBarLines->setChecked(origScrollBarLines);
origColoredScrollBar = s.readBoolEntry("/polyesterstyle/Settings/coloredScrollBar", true);
@@ -155,7 +155,7 @@ PolyesterStyleConfig::PolyesterStyleConfig(QWidget* parent): QWidget(parent)
connect(dialog_->menuBarEmphasis, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->menuBarEmphasisBorder, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->customMenuBarEmphasisColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(dialog_->menuBarEmphasisColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+ connect(dialog_->menuBarEmphasisColor, SIGNAL( changed(const TQColor&) ), SLOT( updateChanged() ) );
connect(dialog_->menuStripe, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->shadowedButtonsText, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->shadowedMenuBarText, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
@@ -170,11 +170,11 @@ PolyesterStyleConfig::PolyesterStyleConfig(QWidget* parent): QWidget(parent)
connect(dialog_->colorizeSortedHeader, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->buttonStyle, SIGNAL( activated(int) ), SLOT( updateChanged() ) );
connect(dialog_->customOverHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(dialog_->overHighlightColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+ connect(dialog_->overHighlightColor, SIGNAL( changed(const TQColor&) ), SLOT( updateChanged() ) );
connect(dialog_->customFocusHighlightColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(dialog_->focusHighlightColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+ connect(dialog_->focusHighlightColor, SIGNAL( changed(const TQColor&) ), SLOT( updateChanged() ) );
connect(dialog_->customCheckMarkColor, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
- connect(dialog_->checkMarkColor, SIGNAL( changed(const QColor&) ), SLOT( updateChanged() ) );
+ connect(dialog_->checkMarkColor, SIGNAL( changed(const TQColor&) ), SLOT( updateChanged() ) );
if ( dialog_->animateButton->isChecked() )
dialog_->animateButtonToDark->setEnabled(true);
@@ -220,7 +220,7 @@ PolyesterStyleConfig::~PolyesterStyleConfig()
void PolyesterStyleConfig::save()
{
- QSettings s;
+ TQSettings s;
s.writeEntry("/polyesterstyle/Settings/useLowerCaseText", dialog_->useLowerCaseText->isChecked());
s.writeEntry("/polyesterstyle/Settings/scrollBarLines", dialog_->scrollBarLines->isChecked());
s.writeEntry("/polyesterstyle/Settings/scrollBarStyle",
@@ -236,7 +236,7 @@ void PolyesterStyleConfig::save()
s.writeEntry("/polyesterstyle/Settings/colorizeSortedHeader", dialog_->colorizeSortedHeader->isChecked());
s.writeEntry("/polyesterstyle/Settings/menuBarEmphasisBorder", dialog_->menuBarEmphasisBorder->isChecked());
s.writeEntry("/polyesterstyle/Settings/customMenuBarEmphasisColor", dialog_->customMenuBarEmphasisColor->isChecked());
- s.writeEntry("/polyesterstyle/Settings/menuBarEmphasisColor", QColor(dialog_->menuBarEmphasisColor->color()).name());
+ s.writeEntry("/polyesterstyle/Settings/menuBarEmphasisColor", TQColor(dialog_->menuBarEmphasisColor->color()).name());
s.writeEntry("/polyesterstyle/Settings/menuStripe", dialog_->menuStripe->isChecked());
s.writeEntry("/polyesterstyle/Settings/shadowedButtonsText", dialog_->shadowedButtonsText->isChecked());
@@ -251,11 +251,11 @@ void PolyesterStyleConfig::save()
s.writeEntry("/polyesterstyle/Settings/inputFocusHighlight", dialog_->inputFocusHighlight->isChecked());
s.writeEntry("/polyesterstyle/Settings/buttonStyle", buttonType(dialog_->buttonStyle->currentItem()));
s.writeEntry("/polyesterstyle/Settings/customOverHighlightColor", dialog_->customOverHighlightColor->isChecked());
- s.writeEntry("/polyesterstyle/Settings/overHighlightColor", QColor(dialog_->overHighlightColor->color()).name());
+ s.writeEntry("/polyesterstyle/Settings/overHighlightColor", TQColor(dialog_->overHighlightColor->color()).name());
s.writeEntry("/polyesterstyle/Settings/customFocusHighlightColor", dialog_->customFocusHighlightColor->isChecked());
- s.writeEntry("/polyesterstyle/Settings/focusHighlightColor", QColor(dialog_->focusHighlightColor->color()).name());
+ s.writeEntry("/polyesterstyle/Settings/focusHighlightColor", TQColor(dialog_->focusHighlightColor->color()).name());
s.writeEntry("/polyesterstyle/Settings/customCheckMarkColor", dialog_->customCheckMarkColor->isChecked());
- s.writeEntry("/polyesterstyle/Settings/checkMarkColor", QColor(dialog_->checkMarkColor->color()).name());
+ s.writeEntry("/polyesterstyle/Settings/checkMarkColor", TQColor(dialog_->checkMarkColor->color()).name());
}
void PolyesterStyleConfig::defaults()
@@ -336,21 +336,21 @@ void PolyesterStyleConfig::updateChanged()
}
//button types
-QString PolyesterStyleConfig::buttonType( int listnr )
+TQString PolyesterStyleConfig::buttonType( int listnr )
{
switch ( listnr ) {
case 1:
- return QString("gradients");
+ return TQString("gradients");
case 2:
- return QString("reverseGradients");
+ return TQString("reverseGradients");
case 3:
- return QString("flat");
+ return TQString("flat");
default:
- return QString("glass");
+ return TQString("glass");
}
}
-int PolyesterStyleConfig::buttonItem( QString kBType )
+int PolyesterStyleConfig::buttonItem( TQString kBType )
{
if( !strcmp(kBType,"gradients") )
return 1;
@@ -363,21 +363,21 @@ int PolyesterStyleConfig::buttonItem( QString kBType )
}
//scrollBar types
-QString PolyesterStyleConfig::scrollBarType( int listnr )
+TQString PolyesterStyleConfig::scrollBarType( int listnr )
{
switch ( listnr ) {
case 1:
- return QString("PlatinumStyleScrollBar");
+ return TQString("PlatinumStyleScrollBar");
case 2:
- return QString("NextStyleScrollBar");
+ return TQString("NextStyleScrollBar");
case 3:
- return QString("WindowsStyleScrollBar");
+ return TQString("WindowsStyleScrollBar");
default:
- return QString("ThreeButtonScrollBar");
+ return TQString("ThreeButtonScrollBar");
}
}
-int PolyesterStyleConfig::scrollBarItem( QString kSType )
+int PolyesterStyleConfig::scrollBarItem( TQString kSType )
{
if( !strcmp(kSType,"PlatinumStyleScrollBar") )
return 1;
diff --git a/style/config/polyesterconf.h b/style/config/polyesterconf.h
index 589ad88..2bc18f1 100755
--- a/style/config/polyesterconf.h
+++ b/style/config/polyesterconf.h
@@ -30,15 +30,15 @@ DEALINGS IN THE SOFTWARE.
#ifndef POLYMER_CONF_H
#define POLYMER_CONF_H
-class QCheckBox;
-class QComboBox;
+class TQCheckBox;
+class TQComboBox;
class ConfigDialog;
-class PolyesterStyleConfig: public QWidget
+class PolyesterStyleConfig: public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
- PolyesterStyleConfig(QWidget* parent);
+ PolyesterStyleConfig(TQWidget* parent);
~PolyesterStyleConfig();
//This signal and the next two slots are the plugin
@@ -55,15 +55,15 @@ protected slots:
void updateChanged();
protected:
- QString buttonType( int listnr );
- int buttonItem( QString kBType );
- QString scrollBarType( int listnr );
- int scrollBarItem( QString kSType );
+ TQString buttonType( int listnr );
+ int buttonItem( TQString kBType );
+ TQString scrollBarType( int listnr );
+ int scrollBarItem( TQString kSType );
//Original settings, for accurate dirtiness tracking
bool origUseLowerCaseText;
bool origScrollBarLines;
- QString origScrollBarStyle;
+ TQString origScrollBarStyle;
int origScrollBarSize;
bool origColoredScrollBar;
bool origCenteredTabBar;
@@ -74,7 +74,7 @@ protected:
bool origMenuBarEmphasis;
bool origMenuBarEmphasisBorder;
bool origCustomMenuBarEmphasisColor;
- QColor origMenuBarEmphasisColor;
+ TQColor origMenuBarEmphasisColor;
bool origMenuStripe;
bool origColorizeSortedHeader;
bool origShadowedButtonsText;
@@ -88,13 +88,13 @@ protected:
// bool origDrawFocusRect;
bool origDrawTriangularExpander;
bool origInputFocusHighlight;
- QString origButtonStyle;
+ TQString origButtonStyle;
bool origCustomOverHighlightColor;
- QColor origOverHighlightColor;
+ TQColor origOverHighlightColor;
bool origCustomFocusHighlightColor;
- QColor origFocusHighlightColor;
+ TQColor origFocusHighlightColor;
bool origCustomCheckMarkColor;
- QColor origCheckMarkColor;
+ TQColor origCheckMarkColor;
private:
ConfigDialog *dialog_;
diff --git a/style/misc.cpp b/style/misc.cpp
index 2f1d30c..15fe755 100755
--- a/style/misc.cpp
+++ b/style/misc.cpp
@@ -16,23 +16,23 @@
* Boston, MA 02111-1307, USA.
*/
-#include <qcolor.h>
+#include <tqcolor.h>
#include "misc.h"
-QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int a)
+TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const int a)
{
// normal button...
- QRgb rgb = bgColor.rgb();
- QRgb rgb_b = fgColor.rgb();
+ TQRgb rgb = bgColor.rgb();
+ TQRgb rgb_b = fgColor.rgb();
int alpha = a;
if(alpha>255) alpha = 255;
if(alpha<0) alpha = 0;
int inv_alpha = 255 - alpha;
- QColor result = QColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255,
- qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255,
- qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) );
+ TQColor result = TQColor( tqRgb(tqRed(rgb_b)*inv_alpha/255 + tqRed(rgb)*alpha/255,
+ tqGreen(rgb_b)*inv_alpha/255 + tqGreen(rgb)*alpha/255,
+ tqBlue(rgb_b)*inv_alpha/255 + tqBlue(rgb)*alpha/255) );
return result;
}
diff --git a/style/misc.h b/style/misc.h
index 835c277..364c0d3 100755
--- a/style/misc.h
+++ b/style/misc.h
@@ -19,6 +19,6 @@
#ifndef __MISC_H
#define __MISC_H
-QColor alphaBlendColors(const QColor &backgroundColor, const QColor &foregroundColor, const int alpha);
+TQColor alphaBlendColors(const TQColor &backgroundColor, const TQColor &foregroundColor, const int alpha);
#endif // __MISC_H
diff --git a/style/polyester.cpp b/style/polyester.cpp
index f837874..0c2b1bc 100755
--- a/style/polyester.cpp
+++ b/style/polyester.cpp
@@ -42,35 +42,35 @@
*/
#include <stdlib.h>
-#include <qimage.h>
-#include <qstylefactory.h>
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qtabbar.h>
-#include <qprogressbar.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qcleanuphandler.h>
-#include <qheader.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qscrollbar.h>
-#include <qstyleplugin.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qmenubar.h>
-#include <qpopupmenu.h>
-#include <qdrawutil.h>
-#include <qapplication.h>
-#include <qvariant.h>
-#include <qradiobutton.h>
-#include <qregion.h>
-#include <qslider.h>
-#include <qsettings.h>
+#include <tqimage.h>
+#include <tqstylefactory.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqtabbar.h>
+#include <tqprogressbar.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqcleanuphandler.h>
+#include <tqheader.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqscrollbar.h>
+#include <tqstyleplugin.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqmenubar.h>
+#include <tqpopupmenu.h>
+#include <tqdrawutil.h>
+#include <tqapplication.h>
+#include <tqvariant.h>
+#include <tqradiobutton.h>
+#include <tqregion.h>
+#include <tqslider.h>
+#include <tqsettings.h>
#include <kpixmap.h>
#include <kimageeffect.h>
#include <kglobal.h>
@@ -140,17 +140,17 @@ static const uint TIMERINTERVAL = 25; // msec
static const int ANIMATIONSTEPS = 20;
// -- Style Plugin Interface -------------------------
-class PolyesterStylePlugin : public QStylePlugin
+class PolyesterStylePlugin : public TQStylePlugin
{
public:
PolyesterStylePlugin() {}
~PolyesterStylePlugin() {}
- QStringList keys() const {
- return QStringList() << "Polyester";
+ TQStringList keys() const {
+ return TQStringList() << "Polyester";
}
- QStyle* create( const QString& key ) {
+ TQStyle* create( const TQString& key ) {
if (key.lower() == "polyester")
return new PolyesterStyle;
return 0;
@@ -175,8 +175,8 @@ PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScr
horizontalLine = 0;
verticalLine = 0;
- QSettings settings;
- _contrast = settings.readNumEntry("/Qt/KDE/contrast", 6);
+ TQSettings settings;
+ _contrast = settings.readNumEntry("/TQt/KDE/contrast", 6);
settings.beginGroup("/polyesterstyle/Settings");
_useLowerCaseText = settings.readBoolEntry("/useLowerCaseText", false);
@@ -188,8 +188,8 @@ PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScr
_animateProgressBar = settings.readBoolEntry("/animateProgressBar", false);
_animateButton = settings.readBoolEntry("/animateButton", false);
/*don't animate buttons in gtk-qt or openoffice, they aren't able to do so :-)*/
- if( ( qstrcmp( qApp->argv() [ 0 ], "unknown" ) == 0 ) ||
- ( qstrcmp( qApp->argv() [ 0 ], "soffice.bin" ) == 0 ))
+ if( ( qstrcmp( tqApp->argv() [ 0 ], "unknown" ) == 0 ) ||
+ ( qstrcmp( tqApp->argv() [ 0 ], "soffice.bin" ) == 0 ))
_animateButton = false;
_animateButtonToDark = settings.readBoolEntry("/animateButtonToDark", false);
_buttonStyle = settings.readEntry("/buttonStyle", "glass");
@@ -229,12 +229,12 @@ PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScr
/*HACK: hack for gtk-qt: mozillas only works with windows style scrollbars,
even if the other gtk apps works with other styles, at the moment
I don't have a way to choose only mozilla apps, because
- qstrcmp( qApp->argv() [ 0 ], "firefox-bin" ) == 0
- does not work (qApp->argv() [ 0 ] is always unknown on gtk-qt apps)
+ qstrcmp( tqApp->argv() [ 0 ], "firefox-bin" ) == 0
+ does not work (tqApp->argv() [ 0 ] is always unknown on gtk-qt apps)
also, the menu stripe is turned off because it's managed too bad,
in particular by (of course) firefox
this hack may be disabled in the future, let's see...*/
- if( !qstrcmp( qApp->argv() [ 0 ], "unknown" ) )
+ if( !qstrcmp( tqApp->argv() [ 0 ], "unknown" ) )
{
_scrollBarType = KStyle::WindowsStyleScrollBar;
_menuStripe = false;
@@ -251,43 +251,43 @@ PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScr
_scrollBarType = KStyle::NextStyleScrollBar;
//HACK for gtk-qt: if setScrollBarType is called wxwidgets applications will broke
- /*if( qstrcmp( qApp->argv() [ 0 ], "unknown" ) )
+ /*if( qstrcmp( tqApp->argv() [ 0 ], "unknown" ) )
this->setScrollBarType(_scrollBarType);*/
this->setScrollBarType(_scrollBarType);
// setup pixmap cache...
- pixmapCache = new QIntCache<CacheEntry>(150000, 499);
+ pixmapCache = new TQIntCache<CacheEntry>(150000, 499);
pixmapCache->setAutoDelete(true);
if ( _animateProgressBar )
{
- animationTimer = new QTimer( this );
+ animationTimer = new TQTimer( this );
connect( animationTimer, SIGNAL(timeout()), this, SLOT(updateProgressPos()) );
}
if ( _animateButton )
{
- btnAnimTimer = new QTimer( this );
+ btnAnimTimer = new TQTimer( this );
connect( btnAnimTimer, SIGNAL(timeout()), this, SLOT(animate()) );
}
//create and empty image for the alpha blended menu stripe
- alphaStripe = new QImage();
+ alphaStripe = new TQImage();
}
void PolyesterStyle::updateProgressPos()
{
- QProgressBar* pb;
+ TQProgressBar* pb;
//Update the registered progressbars.
- QMap<QWidget*, int>::iterator iter;
+ TQMap<TQWidget*, int>::iterator iter;
bool visible = false;
for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); iter++)
{
- if ( !::qt_cast<QProgressBar*>(iter.key()) )
+ if ( !::tqt_cast<TQProgressBar*>(iter.key()) )
continue;
- pb = dynamic_cast<QProgressBar*>(iter.key());
+ pb = dynamic_cast<TQProgressBar*>(iter.key());
if ( iter.key() -> isEnabled() &&
pb -> progress() != pb->totalSteps() )
{
@@ -313,7 +313,7 @@ void PolyesterStyle::animate() {
bool mustStop = true;
for ( AnimWidgetMap::iterator it = animWidgets.begin(); it != animWidgets.end(); ++it) {
- QWidget *widget = it.key();
+ TQWidget *widget = it.key();
if( animWidgets[widget].active == true ) {
mustStop = false;
@@ -353,7 +353,7 @@ PolyesterStyle::~PolyesterStyle()
delete verticalLine;
}
-void PolyesterStyle::polish(QApplication* app)
+void PolyesterStyle::polish(TQApplication* app)
{
if (!qstrcmp(app->argv()[0], "kicker"))
kickerMode = true;
@@ -361,19 +361,19 @@ void PolyesterStyle::polish(QApplication* app)
kornMode = true;
}
-void PolyesterStyle::polish(QWidget* widget)
+void PolyesterStyle::polish(TQWidget* widget)
{
if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...?
khtmlWidgets[widget] = true;
- connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(khtmlWidgetDestroyed(QObject*)));
+ connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(khtmlWidgetDestroyed(TQObject*)));
}
- // use qt_cast where possible to check if the widget inheits one of the classes. might improve
- // performance compared to QObject::inherits()
- if ( ::qt_cast<QPushButton*>(widget) || ::qt_cast<QComboBox*>(widget) ||
- ::qt_cast<QSpinWidget*>(widget) || ::qt_cast<QSlider*>(widget) ||
- ::qt_cast<QCheckBox*>(widget) || ::qt_cast<QRadioButton*>(widget) ||
- ::qt_cast<QToolButton*>(widget) || widget->inherits("QSplitterHandle") )
+ // use tqt_cast where possible to check if the widget inheits one of the classes. might improve
+ // performance compared to TQObject::inherits()
+ if ( ::tqt_cast<TQPushButton*>(widget) || ::tqt_cast<TQComboBox*>(widget) ||
+ ::tqt_cast<TQSpinWidget*>(widget) || ::tqt_cast<TQSlider*>(widget) ||
+ ::tqt_cast<TQCheckBox*>(widget) || ::tqt_cast<TQRadioButton*>(widget) ||
+ ::tqt_cast<TQToolButton*>(widget) || widget->inherits("TQSplitterHandle") )
{
// widget->setBackgroundMode(PaletteBackground);
widget->installEventFilter(this);
@@ -385,36 +385,36 @@ void PolyesterStyle::polish(QWidget* widget)
// btnAnimTimer->start( TIMERINTERVAL, false );
animWidgets[widget].active = false;
- connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(animWidgetDestroyed(QObject*)));
+ connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(animWidgetDestroyed(TQObject*)));
}
- QSlider *slider = ::qt_cast<QSlider*>(widget);
+ TQSlider *slider = ::tqt_cast<TQSlider*>(widget);
if(slider)
{
connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(sliderThumbMoved(int)));
connect(slider, SIGNAL(valueChanged(int)), this, SLOT(sliderThumbMoved(int)));
}
- } else if (::qt_cast<QLineEdit*>(widget)) {
+ } else if (::tqt_cast<TQLineEdit*>(widget)) {
widget->installEventFilter(this);
- } else if (::qt_cast<QTabBar*>(widget)) {
+ } else if (::tqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(true);
widget->installEventFilter(this);
- } else if (::qt_cast<QPopupMenu*>(widget)) {
+ } else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( NoBackground );
} else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
widget->installEventFilter(this);
- } else if (::qt_cast<QHeader*>(widget)) {
+ } else if (::tqt_cast<TQHeader*>(widget)) {
connect(widget->parent(), SIGNAL(contentsMoving(int, int)), widget, SLOT(update()));
widget->installEventFilter(this);
- }else if (::qt_cast<QScrollBar*>(widget)) {
+ }else if (::tqt_cast<TQScrollBar*>(widget)) {
widget->installEventFilter(this);
}
- if( _animateProgressBar && ::qt_cast<QProgressBar*>(widget) )
+ if( _animateProgressBar && ::tqt_cast<TQProgressBar*>(widget) )
{
widget->installEventFilter(this);
progAnimWidgets[widget] = 0;
- connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(progressBarDestroyed(QObject*)));
+ connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(progressBarDestroyed(TQObject*)));
if (!animationTimer->isActive())
animationTimer->start( 50, false );
}
@@ -424,37 +424,37 @@ void PolyesterStyle::polish(QWidget* widget)
KStyle::polish(widget);
}
-void PolyesterStyle::unPolish(QWidget* widget)
+void PolyesterStyle::unPolish(TQWidget* widget)
{
if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...?
khtmlWidgets.remove(widget);
}
- // use qt_cast to check if the widget inheits one of the classes.
- if ( ::qt_cast<QPushButton*>(widget) || ::qt_cast<QComboBox*>(widget) ||
- ::qt_cast<QSpinWidget*>(widget) || ::qt_cast<QSlider*>(widget) ||
- ::qt_cast<QCheckBox*>(widget) || ::qt_cast<QRadioButton*>(widget) ||
- ::qt_cast<QToolButton*>(widget) || ::qt_cast<QLineEdit*>(widget) ||
- widget->inherits("QSplitterHandle") )
+ // use tqt_cast to check if the widget inheits one of the classes.
+ if ( ::tqt_cast<TQPushButton*>(widget) || ::tqt_cast<TQComboBox*>(widget) ||
+ ::tqt_cast<TQSpinWidget*>(widget) || ::tqt_cast<TQSlider*>(widget) ||
+ ::tqt_cast<TQCheckBox*>(widget) || ::tqt_cast<TQRadioButton*>(widget) ||
+ ::tqt_cast<TQToolButton*>(widget) || ::tqt_cast<TQLineEdit*>(widget) ||
+ widget->inherits("TQSplitterHandle") )
{
widget->removeEventFilter(this);
animWidgets.remove(widget);
}
- else if (::qt_cast<QTabBar*>(widget) || ::qt_cast<QHeader*>(widget)
- || ::qt_cast<QScrollBar*>(widget)) {
+ else if (::tqt_cast<TQTabBar*>(widget) || ::tqt_cast<TQHeader*>(widget)
+ || ::tqt_cast<TQScrollBar*>(widget)) {
widget->setMouseTracking(false);
widget->removeEventFilter(this);
- } else if (::qt_cast<QPopupMenu*>(widget)) {
+ } else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( PaletteBackground );
} else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
widget->removeEventFilter(this);
}
- const QSlider *slider = ::qt_cast<QSlider*>(widget);
+ const TQSlider *slider = ::tqt_cast<TQSlider*>(widget);
if(slider && sliderValues.contains(slider))
sliderValues.remove(slider);
- if ( ::qt_cast<QProgressBar*>(widget) )
+ if ( ::tqt_cast<TQProgressBar*>(widget) )
{
progAnimWidgets.remove(widget);
}
@@ -463,25 +463,25 @@ void PolyesterStyle::unPolish(QWidget* widget)
}
/*a bunch of slots stuff...*/
-void PolyesterStyle::khtmlWidgetDestroyed(QObject* obj)
+void PolyesterStyle::khtmlWidgetDestroyed(TQObject* obj)
{
- khtmlWidgets.remove(static_cast<QWidget*>(obj));
+ khtmlWidgets.remove(static_cast<TQWidget*>(obj));
}
-void PolyesterStyle::progressBarDestroyed(QObject* obj)
+void PolyesterStyle::progressBarDestroyed(TQObject* obj)
{
- progAnimWidgets.remove(static_cast<QWidget*>(obj));
+ progAnimWidgets.remove(static_cast<TQWidget*>(obj));
}
-void PolyesterStyle::animWidgetDestroyed(QObject* obj)
+void PolyesterStyle::animWidgetDestroyed(TQObject* obj)
{
- animWidgets.remove(static_cast<QWidget*>(obj));
+ animWidgets.remove(static_cast<TQWidget*>(obj));
}
-void PolyesterStyle::renderContour(QPainter *p,
- const QRect &r,
- const QColor &backgroundColor,
- const QColor &contour,
+void PolyesterStyle::renderContour(TQPainter *p,
+ const TQRect &r,
+ const TQColor &backgroundColor,
+ const TQColor &contour,
const uint flags) const
{
if((r.width() <= 0)||(r.height() <= 0))
@@ -499,7 +499,7 @@ void PolyesterStyle::renderContour(QPainter *p,
const bool sharpBottomLeft = flags&Sharp_BottomLeft;
const bool sharpBottomRight = flags&Sharp_BottomRight;
- QColor contourColor;
+ TQColor contourColor;
if (disabled) {
contourColor = backgroundColor.dark(150);
} else {
@@ -584,41 +584,41 @@ void PolyesterStyle::renderContour(QPainter *p,
if(drawLeft && drawTop) {
switch(flags&Round_UpperLeft) {
case false:
- renderPixel(p,QPoint(r.left(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
break;
default:
- renderPixel(p,QPoint(r.left()+1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
- renderPixel(p,QPoint(r.left(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left()+1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
}
}
if(drawLeft && drawBottom) {
switch(flags&Round_BottomLeft) {
case false:
- renderPixel(p,QPoint(r.left(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
break;
default:
- renderPixel(p,QPoint(r.left()+1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
- renderPixel(p,QPoint(r.left(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left()+1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.left(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
}
}
if(drawRight && drawTop) {
switch(flags&Round_UpperRight) {
case false:
- renderPixel(p,QPoint(r.right(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right(),r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
break;
default:
- renderPixel(p,QPoint(r.right()-1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
- renderPixel(p,QPoint(r.right(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right()-1,r.top()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right(),r.top()+1),alphaAA,contourColor,backgroundColor,alphaBlend);
}
}
if(drawRight && drawBottom) {
switch(flags&Round_BottomRight) {
case false:
- renderPixel(p,QPoint(r.right(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right(),r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
break;
default:
- renderPixel(p,QPoint(r.right()-1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
- renderPixel(p,QPoint(r.right(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right()-1,r.bottom()),alphaAA,contourColor,backgroundColor,alphaBlend);
+ renderPixel(p,TQPoint(r.right(),r.bottom()-1),alphaAA,contourColor,backgroundColor,alphaBlend);
}
}
@@ -635,9 +635,9 @@ void PolyesterStyle::renderContour(QPainter *p,
}
-void PolyesterStyle::renderMask(QPainter *p,
- const QRect &r,
- const QColor &color,
+void PolyesterStyle::renderMask(TQPainter *p,
+ const TQRect &r,
+ const TQColor &color,
const uint flags) const
{
if((r.width() <= 0)||(r.height() <= 0))
@@ -649,7 +649,7 @@ void PolyesterStyle::renderMask(QPainter *p,
const bool roundBottomRight = flags&Round_BottomRight;
- p->fillRect (QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) , color);
+ p->fillRect (TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) , color);
p->setPen(color);
// sides
@@ -663,11 +663,11 @@ void PolyesterStyle::renderMask(QPainter *p,
r.right(), roundBottomLeft?r.bottom()-1:r.bottom() );
}
-void PolyesterStyle::renderSurface(QPainter *p,
- const QRect &r,
- const QColor &backgroundColor,
- const QColor &buttonColor,
- const QColor &highlightColor,
+void PolyesterStyle::renderSurface(TQPainter *p,
+ const TQRect &r,
+ const TQColor &backgroundColor,
+ const TQColor &buttonColor,
+ const TQColor &highlightColor,
int intensity,
const uint flags) const
{
@@ -700,7 +700,7 @@ void PolyesterStyle::renderSurface(QPainter *p,
highlightBottom = (flags&Highlight_Bottom);
}
- QColor baseColor = alphaBlendColors(backgroundColor, disabled?backgroundColor:buttonColor, 10);
+ TQColor baseColor = alphaBlendColors(backgroundColor, disabled?backgroundColor:buttonColor, 10);
if (disabled) {
intensity = 2;
} else if (highlight) {
@@ -714,16 +714,16 @@ void PolyesterStyle::renderSurface(QPainter *p,
// some often needed colors...
// 1 more intensive than 2.
- const QColor colorTop1 = alphaBlendColors(baseColor,
+ const TQColor colorTop1 = alphaBlendColors(baseColor,
sunken?baseColor.dark(100+intensity*2):baseColor.light(100+intensity*2), 80);
- const QColor colorTop2 = alphaBlendColors(baseColor,
+ const TQColor colorTop2 = alphaBlendColors(baseColor,
sunken?baseColor.dark(100+intensity):baseColor.light(100+intensity), 80);
- const QColor colorBottom1 = alphaBlendColors(baseColor,
+ const TQColor colorBottom1 = alphaBlendColors(baseColor,
sunken?baseColor.light(100+intensity*2):baseColor.dark(100+intensity*2), 80);
- const QColor colorBottom2 = alphaBlendColors(baseColor,
+ const TQColor colorBottom2 = alphaBlendColors(baseColor,
sunken?baseColor.light(100+intensity):baseColor.dark(100+intensity), 80);
- const QColor colorBorder = colorTop1.light(100+_contrast);
+ const TQColor colorBorder = colorTop1.light(100+_contrast);
// sides
if (drawLeft) {
@@ -731,7 +731,7 @@ void PolyesterStyle::renderSurface(QPainter *p,
int height = r.height();
if (roundUpperLeft || !drawTop) height--;
if (roundBottomLeft || !drawBottom) height--;
- renderGradient(p, QRect(r.left(), (roundUpperLeft&&drawTop)?r.top()+1:r.top(), 1, height),
+ renderGradient(p, TQRect(r.left(), (roundUpperLeft&&drawTop)?r.top()+1:r.top(), 1, height),
colorBorder, baseColor);
} else {
p->setPen(colorBorder );
@@ -746,7 +746,7 @@ void PolyesterStyle::renderSurface(QPainter *p,
// and we don't whant to draw the Top, we have a unpainted area
if (roundUpperRight || !drawTop) height--;
if (roundBottomRight || !drawBottom) height--;
- renderGradient(p, QRect(r.right(), (roundUpperRight&&drawTop)?r.top()+1:r.top(), 1, height),
+ renderGradient(p, TQRect(r.right(), (roundUpperRight&&drawTop)?r.top()+1:r.top(), 1, height),
baseColor, _lightBorder&&!sunken?colorBorder:colorBottom1);
} else {
/*3d effect or light borders?*/
@@ -764,7 +764,7 @@ void PolyesterStyle::renderSurface(QPainter *p,
int width = r.width();
if (roundUpperLeft || !drawLeft) width--;
if (roundUpperRight || !drawRight) width--;
- renderGradient(p, QRect((roundUpperLeft&&drawLeft)?r.left()+1:r.left(), r.top(), width, 1),
+ renderGradient(p, TQRect((roundUpperLeft&&drawLeft)?r.left()+1:r.left(), r.top(), width, 1),
colorTop2, colorBorder, false );
}
}
@@ -777,7 +777,7 @@ void PolyesterStyle::renderSurface(QPainter *p,
int width = r.width();
if (roundBottomLeft || !drawLeft) width--;
if (roundBottomRight || !drawRight) width--;
- renderGradient(p, QRect((roundBottomLeft&&drawLeft)?r.left()+1:r.left(), r.bottom(), width, 1),
+ renderGradient(p, TQRect((roundBottomLeft&&drawLeft)?r.left()+1:r.left(), r.bottom(), width, 1),
colorBottom2, _lightBorder&&!sunken?colorBorder:colorBottom1, false);
}
}
@@ -797,15 +797,15 @@ void PolyesterStyle::renderSurface(QPainter *p,
if( !strcmp(_buttonStyle,"gradients" ) /*|| sunken*/ ){
//polyester style
- renderGradient(p, QRect(drawLeft?r.left()+1:r.left(),
+ renderGradient(p, TQRect(drawLeft?r.left()+1:r.left(),
drawTop?r.top()+1:r.top(), width, height),
colorTop2, colorBottom2, horizontal);
}
else if( !strcmp(_buttonStyle,"glass" ) ){
//glass buttons
/*create a copy of the two colors, otherwise ugly things(tm) happens...*/
- const QColor colorTop3 = QColor(colorTop1.rgb()).light(100+_contrast);
- const QColor colorBottom3 = QColor(colorBottom2.rgb()).light(100+_contrast);
+ const TQColor colorTop3 = TQColor(colorTop1.rgb()).light(100+_contrast);
+ const TQColor colorBottom3 = TQColor(colorBottom2.rgb()).light(100+_contrast);
//halfsize is half of height or width depending in the scrollbar is horizontal
// round on upper int if the size is odd
@@ -815,21 +815,21 @@ void PolyesterStyle::renderSurface(QPainter *p,
else
halfsize = width%2==0?width/2:(width/2)+1;
- renderGradient(p, QRect(left, top,
+ renderGradient(p, TQRect(left, top,
horizontal?width:width/2, horizontal?height/2:height),
colorTop2, colorBottom3, horizontal);
- renderGradient(p, QRect(horizontal?left:left+width/2,
+ renderGradient(p, TQRect(horizontal?left:left+width/2,
horizontal?top+height/2:top,
horizontal?width:halfsize, horizontal?halfsize:height),
colorBottom2, colorTop2, horizontal);
}else if( !strcmp(_buttonStyle,"reverseGradients" ) ){
//lipstik style
- renderGradient(p, QRect(drawLeft?r.left()+1:r.left(),
+ renderGradient(p, TQRect(drawLeft?r.left()+1:r.left(),
drawTop?r.top()+1:r.top(), width, height),
colorBottom2, colorTop2, horizontal);
}else{
//flat style
- renderGradient(p, QRect(drawLeft?r.left()+1:r.left(),
+ renderGradient(p, TQRect(drawLeft?r.left()+1:r.left(),
drawTop?r.top()+1:r.top(), width, height),
buttonColor, buttonColor, horizontal);
}
@@ -897,17 +897,17 @@ void PolyesterStyle::renderSurface(QPainter *p,
}
}
-void PolyesterStyle::renderPixel(QPainter *p,
- const QPoint &pos,
+void PolyesterStyle::renderPixel(TQPainter *p,
+ const TQPoint &pos,
const int alpha,
- const QColor &color,
- const QColor &background,
+ const TQColor &color,
+ const TQColor &background,
bool fullAlphaBlend) const
{
if(fullAlphaBlend)
// full alpha blend: paint into an image with alpha buffer and convert to a pixmap ...
{
- QRgb rgb = color.rgb();
+ TQRgb rgb = color.rgb();
// generate a quite unique key -- use the unused width field to store the alpha value.
CacheEntry search(cAlphaDot, alpha, 0, rgb);
int key = search.key();
@@ -924,10 +924,10 @@ void PolyesterStyle::renderPixel(QPainter *p,
}
- QImage aImg(1,1,32); // 1x1
+ TQImage aImg(1,1,32); // 1x1
aImg.setAlphaBuffer(true);
- aImg.setPixel(0,0,qRgba(qRed(rgb),qGreen(rgb),qBlue(rgb),alpha));
- QPixmap *result = new QPixmap(aImg);
+ aImg.setPixel(0,0,tqRgba(tqRed(rgb),tqGreen(rgb),tqBlue(rgb),alpha));
+ TQPixmap *result = new TQPixmap(aImg);
p->drawPixmap(pos, *result);
@@ -940,24 +940,24 @@ void PolyesterStyle::renderPixel(QPainter *p,
} else
// don't use an alpha buffer: calculate the resulting color from the alpha value, the fg- and the bg-color.
{
- QRgb rgb_a = color.rgb();
- QRgb rgb_b = background.rgb();
+ TQRgb rgb_a = color.rgb();
+ TQRgb rgb_b = background.rgb();
int a = alpha;
if(a>255) a = 255;
if(a<0) a = 0;
int a_inv = 255 - a;
- QColor res = QColor( qRgb(qRed(rgb_b)*a_inv/255 + qRed(rgb_a)*a/255,
- qGreen(rgb_b)*a_inv/255 + qGreen(rgb_a)*a/255,
- qBlue(rgb_b)*a_inv/255 + qBlue(rgb_a)*a/255) );
+ TQColor res = TQColor( tqRgb(tqRed(rgb_b)*a_inv/255 + tqRed(rgb_a)*a/255,
+ tqGreen(rgb_b)*a_inv/255 + tqGreen(rgb_a)*a/255,
+ tqBlue(rgb_b)*a_inv/255 + tqBlue(rgb_a)*a/255) );
p->setPen(res);
p->drawPoint(pos);
}
}
-void PolyesterStyle::renderButton(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+void PolyesterStyle::renderButton(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
bool sunken,
bool mouseOver,
bool horizontal,
@@ -971,7 +971,7 @@ void PolyesterStyle::renderButton(QPainter *p,
if(kickerMode) enabled = true;
- const QPen oldPen( p->pen() );
+ const TQPen oldPen( p->pen() );
uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
if(!enabled) contourFlags|=Is_Disabled;
@@ -1015,7 +1015,7 @@ void PolyesterStyle::renderButton(QPainter *p,
/*Colorize to mouseHover only the default button, the others will get lighter or darker*/
if(!isDefault)
{
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
g.background(), g.button().light(100+animFrame),
(_animateButton?alphaBlendColors( getColor(g,MouseOverHighlight),g.button(), 20*animFrame ):getColor(g,MouseOverHighlight)),
_contrast, surfaceFlags);
@@ -1023,9 +1023,9 @@ void PolyesterStyle::renderButton(QPainter *p,
else
{
//12.8 is the maximum amount of blending (256) / ANIMATIONSTEPS (20)
- QColor buttonColor = alphaBlendColors( g.highlight(), g.button(), (int)(12.8*animFrame)+50);
+ TQColor buttonColor = alphaBlendColors( g.highlight(), g.button(), (int)(12.8*animFrame)+50);
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
g.background(), buttonColor.light(100+animFrame), getColor(g,MouseOverHighlight), _contrast+animFrame, surfaceFlags);
}
@@ -1033,7 +1033,7 @@ void PolyesterStyle::renderButton(QPainter *p,
renderContour(p, r, g.background(), g.button().dark(105+_contrast*3),
contourFlags);
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast/2, surfaceFlags);
flatMode = false;
@@ -1044,14 +1044,14 @@ void PolyesterStyle::renderButton(QPainter *p,
}
-void PolyesterStyle::renderDot(QPainter *p,
- const QPoint &point,
- const QColor &baseColor,
+void PolyesterStyle::renderDot(TQPainter *p,
+ const TQPoint &point,
+ const TQColor &baseColor,
const bool thick,
const bool sunken) const
{
- const QColor topColor = alphaBlendColors(baseColor, sunken?baseColor.dark(130):baseColor.light(150), 70);
- const QColor bottomColor = alphaBlendColors(baseColor, sunken?baseColor.light(150):baseColor.dark(130), 70);
+ const TQColor topColor = alphaBlendColors(baseColor, sunken?baseColor.dark(130):baseColor.light(150), 70);
+ const TQColor bottomColor = alphaBlendColors(baseColor, sunken?baseColor.light(150):baseColor.dark(130), 70);
p->setPen(topColor );
p->drawLine(point.x(), point.y(), point.x()+1, point.y());
p->drawPoint(point.x(), point.y()+1);
@@ -1064,10 +1064,10 @@ void PolyesterStyle::renderDot(QPainter *p,
}
}
-void PolyesterStyle::renderGradient(QPainter *painter,
- const QRect &rect,
- const QColor &c1,
- const QColor &c2,
+void PolyesterStyle::renderGradient(TQPainter *painter,
+ const TQRect &rect,
+ const TQColor &c1,
+ const TQColor &c2,
bool horizontal) const
{
if((rect.width() <= 0)||(rect.height() <= 0))
@@ -1095,9 +1095,9 @@ void PolyesterStyle::renderGradient(QPainter *painter,
}
// there wasn't anything matching in the cache, create the pixmap now...
- QPixmap *result = new QPixmap(horizontal ? 10 : rect.width(),
+ TQPixmap *result = new TQPixmap(horizontal ? 10 : rect.width(),
horizontal ? rect.height() : 10);
- QPainter p(result);
+ TQPainter p(result);
int r_w = result->rect().width();
int r_h = result->rect().height();
@@ -1129,7 +1129,7 @@ void PolyesterStyle::renderGradient(QPainter *painter,
gl += gdelta;
bl += bdelta;
- p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.setPen(TQColor(rl>>16, gl>>16, bl>>16));
p.drawLine(r_x, r_y+y, r_x2, r_y+y);
}
} else {
@@ -1138,7 +1138,7 @@ void PolyesterStyle::renderGradient(QPainter *painter,
gl += gdelta;
bl += bdelta;
- p.setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p.setPen(TQColor(rl>>16, gl>>16, bl>>16));
p.drawLine(r_x+x, r_y, r_x+x, r_y2);
}
}
@@ -1157,9 +1157,9 @@ void PolyesterStyle::renderGradient(QPainter *painter,
delete result;
}
-void PolyesterStyle::renderPanel(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+void PolyesterStyle::renderPanel(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
const bool pseudo3d,
const bool sunken) const
{
@@ -1168,21 +1168,21 @@ void PolyesterStyle::renderPanel(QPainter *p,
r.coords(&x, &y, &x2, &y2);
if (kickerMode &&
- p->device() && p->device()->devType() == QInternal::Widget &&
- QCString(static_cast<QWidget*>(p->device())->className()) == "FittsLawFrame") {
+ p->device() && p->device()->devType() == TQInternal::Widget &&
+ TQCString(static_cast<TQWidget*>(p->device())->className()) == "FittsLawFrame") {
// Stolen wholesale from Keramik. I don't like it, but oh well.
if (sunken) {
- const QCOORD corners[] = { x2, y, x2, y2, x, y2, x, y };
+ const TQCOORD corners[] = { x2, y, x2, y2, x, y2, x, y };
p->setPen(g.background().dark());
- p->drawConvexPolygon(QPointArray(4, corners));
+ p->drawConvexPolygon(TQPointArray(4, corners));
p->setPen(g.background().light());
- p->drawPolyline(QPointArray(4, corners), 0, 3);
+ p->drawPolyline(TQPointArray(4, corners), 0, 3);
} else {
- const QCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
+ const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
p->setPen(g.background().dark());
- p->drawPolygon(QPointArray(4, corners));
+ p->drawPolygon(TQPointArray(4, corners));
p->setPen(g.background().light());
- p->drawPolyline(QPointArray(4, corners), 0, 3);
+ p->drawPolyline(TQPointArray(4, corners), 0, 3);
}
} else {
renderContour(p, r, g.background(), getColor(g, PanelContour) );
@@ -1206,15 +1206,15 @@ void PolyesterStyle::renderPanel(QPainter *p,
}
}
-void PolyesterStyle::renderMenuBlendPixmap( KPixmap &pix, const QColorGroup &cg,
- const QPopupMenu* /* popup */ ) const
+void PolyesterStyle::renderMenuBlendPixmap( KPixmap &pix, const TQColorGroup &cg,
+ const TQPopupMenu* /* popup */ ) const
{
pix.fill( cg.background().light(105) );
}
-void PolyesterStyle::renderTab(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+void PolyesterStyle::renderTab(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
bool mouseOver,
const SelectedTab selected,
const bool bottom,
@@ -1222,7 +1222,7 @@ void PolyesterStyle::renderTab(QPainter *p,
const bool triangular,
bool cornerWidget) const
{
- const bool reverseLayout = QApplication::reverseLayout();
+ const bool reverseLayout = TQApplication::reverseLayout();
const bool isFirst = (pos == First) || (pos == Single);
const bool isLast = (pos == Last);
const bool isSingle = (pos == Single);
@@ -1238,27 +1238,27 @@ void PolyesterStyle::renderTab(QPainter *p,
// is selected
// the top part of the tab which is nearly the same for all positions
- QRect Rc; // contour
+ TQRect Rc; // contour
if (!bottom) {
if (isFirst && !cornerWidget && !reverseLayout) {
- Rc = QRect(r.x(), r.y(), r.width()-1, r.height()-3);
+ Rc = TQRect(r.x(), r.y(), r.width()-1, r.height()-3);
} else if (isFirst && !cornerWidget && reverseLayout) {
- Rc = QRect(r.x()+1, r.y(), r.width()-1, r.height()-3);
+ Rc = TQRect(r.x()+1, r.y(), r.width()-1, r.height()-3);
} else {
- Rc = QRect(r.x()+1, r.y(), r.width()-2, r.height()-3);
+ Rc = TQRect(r.x()+1, r.y(), r.width()-2, r.height()-3);
}
} else {
if (isFirst && !cornerWidget && !reverseLayout) {
- Rc = QRect(r.x(), r.y()+3, r.width()-1, r.height()-3);
+ Rc = TQRect(r.x(), r.y()+3, r.width()-1, r.height()-3);
} else if (isFirst && !cornerWidget && reverseLayout) {
- Rc = QRect(r.x()+1, r.y()+3, r.width()-1, r.height()-3);
+ Rc = TQRect(r.x()+1, r.y()+3, r.width()-1, r.height()-3);
} else {
- Rc = QRect(r.x()+1, r.y()+3, r.width()-2, r.height()-3);
+ Rc = TQRect(r.x()+1, r.y()+3, r.width()-2, r.height()-3);
}
}
- const QRect Rs(Rc.x()+1, bottom?Rc.y():Rc.y()+1, Rc.width()-2, Rc.height()-1); // the resulting surface
+ const TQRect Rs(Rc.x()+1, bottom?Rc.y():Rc.y()+1, Rc.width()-2, Rc.height()-1); // the resulting surface
// the area where the fake border shoudl appear
- const QRect Rb(r.x(), bottom?r.top():Rc.bottom()+1, r.width(), r.height()-Rc.height() );
+ const TQRect Rb(r.x(), bottom?r.top():Rc.bottom()+1, r.width(), r.height()-Rc.height() );
uint contourFlags = Draw_Left|Draw_Right;
if(!bottom) {
@@ -1274,33 +1274,33 @@ void PolyesterStyle::renderTab(QPainter *p,
if(!bottom) {
p->setPen(getColor(g,PanelLight) );
p->drawLine(Rs.x()+1, Rs.y(), Rs.right()-1, Rs.y() );
- renderGradient(p, QRect(Rs.x(), Rs.y()+1, 1, Rs.height()-1),
+ renderGradient(p, TQRect(Rs.x(), Rs.y()+1, 1, Rs.height()-1),
getColor(g,PanelLight), getColor(g,PanelLight2));
- renderGradient(p, QRect(Rs.right(), Rs.y()+1, 1, Rs.height()-1),
+ renderGradient(p, TQRect(Rs.right(), Rs.y()+1, 1, Rs.height()-1),
getColor(g,PanelDark), getColor(g,PanelDark2));
if( !strcmp(_buttonStyle,"glass" ) ){
- renderGradient(p, QRect(Rs.x()+1, Rs.y()+1, Rs.width()-2, Rs.height()/2),
+ renderGradient(p, TQRect(Rs.x()+1, Rs.y()+1, Rs.width()-2, Rs.height()/2),
g.background().light(100+_contrast),
g.background());
- renderGradient(p, QRect(Rs.x()+1, Rs.y()+Rs.height()/2, Rs.width()-2, Rs.height()/2),
+ renderGradient(p, TQRect(Rs.x()+1, Rs.y()+Rs.height()/2, Rs.width()-2, Rs.height()/2),
g.background().dark(100+_contrast),
g.background());
}else if( !strcmp(_buttonStyle,"gradients" ) )
- renderGradient(p, QRect(Rs.x()+1, Rs.y()+1, Rs.width()-2, Rs.height()-1),
+ renderGradient(p, TQRect(Rs.x()+1, Rs.y()+1, Rs.width()-2, Rs.height()-1),
getColor(g,PanelLight), g.background());
else if( !strcmp(_buttonStyle,"reverseGradients" ) )
- renderGradient(p, QRect(Rs.x()+1, Rs.y()+1, Rs.width()-2,
+ renderGradient(p, TQRect(Rs.x()+1, Rs.y()+1, Rs.width()-2,
Rs.height()-1),
g.background().dark(100+_contrast), g.background());
else
- renderGradient(p, QRect(Rs.x()+1, Rs.y()+1, Rs.width()-2,
+ renderGradient(p, TQRect(Rs.x()+1, Rs.y()+1, Rs.width()-2,
Rs.height()-1),
g.background(), g.background());
if( _highLightTab )
{
- p->fillRect( QRect(Rs.x()+1, Rs.y(), Rs.width()-2, 2),
+ p->fillRect( TQRect(Rs.x()+1, Rs.y(), Rs.width()-2, 2),
g.highlight());
p->setPen( g.highlight() );
p->drawLine( Rs.x(), Rs.y()+1, Rs.x(), Rs.y()+2 );
@@ -1320,12 +1320,12 @@ void PolyesterStyle::renderTab(QPainter *p,
p->drawLine(Rs.right(), Rs.bottom()-2, Rs.right(), Rs.bottom()-1 );
}
- renderGradient(p, QRect(Rs.x(), Rs.y(), 1, Rs.height()-4),
+ renderGradient(p, TQRect(Rs.x(), Rs.y(), 1, Rs.height()-4),
getColor(g,PanelLight), getColor(g,PanelLight2));
- renderGradient(p, QRect(Rs.right(), Rs.y(), 1, Rs.height()-4),
+ renderGradient(p, TQRect(Rs.right(), Rs.y(), 1, Rs.height()-4),
getColor(g,PanelDark), getColor(g,PanelDark2));
- renderSurface(p, QRect(Rs.x()+1, Rs.y(), Rs.width()-2, Rs.height()-3), g.background(), g.button(), g.highlight(), _contrast, Is_Horizontal);
+ renderSurface(p, TQRect(Rs.x()+1, Rs.y(), Rs.width()-2, Rs.height()-3), g.background(), g.button(), g.highlight(), _contrast, Is_Horizontal);
}
@@ -1336,7 +1336,7 @@ void PolyesterStyle::renderTab(QPainter *p,
p->setPen(alphaBlendColors(g.background(), getColor(g, ButtonContour), 50) );
if((!isFirst&&!reverseLayout) || (!isLast&&reverseLayout) ) {
p->drawPoint(r.left(), bottom?(triangular?r.bottom()-2:r.bottom()-3):(triangular?r.top()+2:r.top()+3) );
- /*renderSurface(p, QRect(r.left(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
+ /*renderSurface(p, TQRect(r.left(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast,
Draw_Top|Draw_Bottom|Is_Horizontal);*/
}
@@ -1345,7 +1345,7 @@ void PolyesterStyle::renderTab(QPainter *p,
p->setPen(alphaBlendColors(g.background(), getColor(g, ButtonContour), 50) );
p->drawPoint(r.right(), bottom?(triangular?r.bottom()-2:r.bottom()-3):(triangular?r.top()+2:r.top()+3) );
#if 0
- renderSurface(p, QRect(r.right(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
+ renderSurface(p, TQRect(r.right(), bottom?r.top()+3:(triangular?r.top()+3:r.top()+4), 1, (triangular?r.height()-6:r.height()-7) ),
g.background(), g.button(), getColor(g,MouseOverHighlight), _contrast,
Draw_Top|Draw_Bottom|Is_Horizontal/*|((bottom?Highlight_Bottom:Highlight_Top):0)*/);
#endif
@@ -1404,32 +1404,32 @@ void PolyesterStyle::renderTab(QPainter *p,
// inactive tabs
// the top part of the tab which is nearly the same for all positions
- QRect Rc; // contour
+ TQRect Rc; // contour
if (isFirst&&reverseLayout ) {
- Rc = QRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-2, (triangular?r.height()-4:r.height()-5) );
+ Rc = TQRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-2, (triangular?r.height()-4:r.height()-5) );
} else {
- Rc = QRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-1, (triangular?r.height()-4:r.height()-5) );
+ Rc = TQRect(r.x()+1, (bottom?r.y()+2:(triangular?r.y()+2:r.y()+3)), r.width()-1, (triangular?r.height()-4:r.height()-5) );
}
- QRect Rs; // the resulting surface
+ TQRect Rs; // the resulting surface
if ( (isFirst&&!reverseLayout) || (isLast&&reverseLayout) )
- Rs = QRect(Rc.x()+1,
+ Rs = TQRect(Rc.x()+1,
bottom?Rc.y():Rc.y()+1,
Rc.width()-(selected == OtherTab?2:1),
Rc.height()-1);
else if( reverseLayout ){
- Rs = QRect(Rc.x()-(selected == NextTab?1:0),
+ Rs = TQRect(Rc.x()-(selected == NextTab?1:0),
bottom?Rc.y():Rc.y()+1,
Rc.width()-(selected == OtherTab?1:0),
Rc.height()-1);
}
else{
- Rs = QRect(Rc.x()-(selected == PrevTab?1:0),
+ Rs = TQRect(Rc.x()-(selected == PrevTab?1:0),
bottom?Rc.y():Rc.y()+1,
Rc.width()-(selected == OtherTab?1:0),
Rc.height()-1);
}
// the area where the fake border shoudl appear
- const QRect Rb(r.x(), bottom?r.y():Rc.bottom()+1, r.width(), 2 );
+ const TQRect Rb(r.x(), bottom?r.y():Rc.bottom()+1, r.width(), 2 );
uint contourFlags;
if(!bottom) {
@@ -1540,7 +1540,7 @@ void PolyesterStyle::renderTab(QPainter *p,
void PolyesterStyle::sliderThumbMoved(int val)
{
- QSlider *slider = ::qt_cast<QSlider*>(sender());
+ TQSlider *slider = ::tqt_cast<TQSlider*>(sender());
if(slider) {
sliderValues.insert(slider, val);
slider->repaint(false);
@@ -1548,12 +1548,12 @@ void PolyesterStyle::sliderThumbMoved(int val)
}
void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
- QPainter *p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt) const
+ const TQStyleOption& opt) const
{
// some "global" vars...
const bool enabled = (flags & Style_Enabled);
@@ -1562,7 +1562,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
// ------
switch( kpe ) {
case KPE_SliderGroove: {
- const QSlider* slider = (const QSlider*)widget;
+ const TQSlider* slider = (const TQSlider*)widget;
bool horizontal = slider->orientation() == Horizontal;
int value = slider->value();
@@ -1580,22 +1580,22 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
)+halfSliderLength;
- if( QApplication::reverseLayout() )
+ if( TQApplication::reverseLayout() )
coloredWidth = r.width() - coloredWidth;
- /*renderContour(p, QRect(r.left(), center-3, r.width(), 5),
+ /*renderContour(p, TQRect(r.left(), center-3, r.width(), 5),
cg.background(), cg.background().dark(enabled?150:130),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);*/
/*p->fillRect(r.left()+1, center-1, (int)(coloredWidth), 2,
enabled?cg.highlight():cg.background().dark(120));*/
//colored part
- renderContour(p, QRect(r.left(), center-3, (int)coloredWidth, 5),
+ renderContour(p, TQRect(r.left(), center-3, (int)coloredWidth, 5),
cg.background(),
enabled && _coloredScrollBar?getColor(cg, DragButtonContour, IsEnabled)
:cg.background().dark(130),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
- renderGradient(p, QRect(r.left()+1, center-2,
+ renderGradient(p, TQRect(r.left()+1, center-2,
(int)coloredWidth, 3),
enabled && _coloredScrollBar?cg.highlight().light(100+_contrast*4)
:cg.background().dark(120-_contrast),
@@ -1603,11 +1603,11 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
:cg.background().dark(120), true);
//empty part
- renderContour(p, QRect((int)coloredWidth, center-3,
+ renderContour(p, TQRect((int)coloredWidth, center-3,
r.width()-(int)coloredWidth, 5),
cg.background(), cg.background().dark(enabled?150:130),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
- renderGradient(p, QRect((int)coloredWidth, center-2,
+ renderGradient(p, TQRect((int)coloredWidth, center-2,
r.width()-(int)coloredWidth-1, 3),
cg.background().dark(100+_contrast*4),
cg.background().light(100+_contrast), true);
@@ -1620,20 +1620,20 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
(slider->maxValue()-slider->minValue()))*
(slider->value() - slider->minValue())
)+halfSliderLength;
- /*renderContour(p, QRect(center-3, r.top(), 5, r.height()),
+ /*renderContour(p, TQRect(center-3, r.top(), 5, r.height()),
cg.background(), cg.background().dark(enabled?150:130),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);*/
/*p->fillRect(center-1, (int)(coloredHeight), 3, r.height(),
enabled?cg.highlight():cg.background().dark(120));*/
//colored part
- renderContour(p, QRect(center-3, (int)nonColoredHeight,
+ renderContour(p, TQRect(center-3, (int)nonColoredHeight,
5, r.height()-(int)nonColoredHeight),
cg.background(),
enabled && _coloredScrollBar?getColor(cg, DragButtonContour, IsEnabled)
:cg.background().dark(130),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
- renderGradient(p, QRect(center-2, (int)nonColoredHeight,
+ renderGradient(p, TQRect(center-2, (int)nonColoredHeight,
3, r.height()-(int)nonColoredHeight-1),
enabled?cg.highlight().light(100+_contrast*4)
:cg.background().dark(120-_contrast),
@@ -1641,10 +1641,10 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
:cg.background().dark(120), false);
//empty part
- renderContour(p, QRect(center-3, r.top(), 5, (int)nonColoredHeight),
+ renderContour(p, TQRect(center-3, r.top(), 5, (int)nonColoredHeight),
cg.background(), cg.background().dark(enabled?150:130),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom);
- renderGradient(p, QRect(center-2, r.y()+1, 3,
+ renderGradient(p, TQRect(center-2, r.y()+1, 3,
(int)nonColoredHeight),
cg.background().dark(100+_contrast*4),
cg.background().light(100+_contrast), false);
@@ -1653,19 +1653,19 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
}
case KPE_SliderHandle: {
- const QSlider* slider = (const QSlider*)widget;
+ const TQSlider* slider = (const TQSlider*)widget;
bool horizontal = slider->orientation() == Horizontal;
const bool pressed = (flags&Style_Active);
const WidgetState s = enabled?(pressed?IsPressed:IsEnabled):IsDisabled;
- const QColor contour = getColor(cg,DragButtonContour,s),
+ const TQColor contour = getColor(cg,DragButtonContour,s),
surface = getColor(cg,DragButtonSurface,s);
int xcenter = (r.left()+r.right()) / 2;
int ycenter = (r.top()+r.bottom()) / 2;
if (horizontal) {
- renderContour(p, QRect(xcenter-5, ycenter-6, 11, 10),
+ renderContour(p, TQRect(xcenter-5, ycenter-6, 11, 10),
cg.background(), contour,
Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight);
@@ -1719,27 +1719,27 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawPoint(xcenter+5-4, ycenter+8);
- QRegion mask(xcenter-4, ycenter-5, 9, 13);
- mask -= QRegion(xcenter-4, ycenter+4, 2, 4);
- mask -= QRegion(xcenter-3, ycenter+5, 2, 3);
- mask -= QRegion(xcenter-2, ycenter+6, 2, 2);
- mask -= QRegion(xcenter-1, ycenter+7, 2, 1);
- mask -= QRegion(xcenter+1, ycenter+7, 1, 1);
- mask -= QRegion(xcenter+1, ycenter+6, 2, 2);
- mask -= QRegion(xcenter+2, ycenter+5, 2, 3);
- mask -= QRegion(xcenter+3, ycenter+4, 2, 4);
+ TQRegion mask(xcenter-4, ycenter-5, 9, 13);
+ mask -= TQRegion(xcenter-4, ycenter+4, 2, 4);
+ mask -= TQRegion(xcenter-3, ycenter+5, 2, 3);
+ mask -= TQRegion(xcenter-2, ycenter+6, 2, 2);
+ mask -= TQRegion(xcenter-1, ycenter+7, 2, 1);
+ mask -= TQRegion(xcenter+1, ycenter+7, 1, 1);
+ mask -= TQRegion(xcenter+1, ycenter+6, 2, 2);
+ mask -= TQRegion(xcenter+2, ycenter+5, 2, 3);
+ mask -= TQRegion(xcenter+3, ycenter+4, 2, 4);
p->setClipRegion(mask);
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|Is_Horizontal;
if(!enabled)
surfaceFlags |= Is_Disabled;
- renderSurface(p, QRect(xcenter-4, ycenter-5, 9, 13),
+ renderSurface(p, TQRect(xcenter-4, ycenter-5, 9, 13),
cg.background(), surface, getColor(cg,MouseOverHighlight),
_contrast+3, surfaceFlags);
- renderDot(p, QPoint(xcenter-3, ycenter-3), surface, false, true );
- renderDot(p, QPoint(xcenter+2, ycenter-3), surface, false, true );
+ renderDot(p, TQPoint(xcenter-3, ycenter-3), surface, false, true );
+ renderDot(p, TQPoint(xcenter+2, ycenter-3), surface, false, true );
p->setClipping(false);
} else {
- renderContour(p, QRect(xcenter-6, ycenter-5, 10, 11),
+ renderContour(p, TQRect(xcenter-6, ycenter-5, 10, 11),
cg.background(), contour,
Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft);
@@ -1794,26 +1794,26 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawPoint(xcenter+8, ycenter-5+4);
p->drawPoint(xcenter+8, ycenter+5-4);
- QRegion mask(xcenter-5, ycenter-4, 13, 9);
- mask -= QRegion(xcenter+4, ycenter-4, 4, 1);
- mask -= QRegion(xcenter+4, ycenter-3, 4, 1);
- mask -= QRegion(xcenter+5, ycenter-2, 3, 1);
- mask -= QRegion(xcenter+6, ycenter-1, 2, 1);
- mask -= QRegion(xcenter+7, ycenter, 2, 1);
- mask -= QRegion(xcenter+6, ycenter+1, 2, 1);
- mask -= QRegion(xcenter+5, ycenter+2, 3, 1);
- mask -= QRegion(xcenter+4, ycenter+3, 4, 1);
- mask -= QRegion(xcenter+4, ycenter+4, 4, 1);
+ TQRegion mask(xcenter-5, ycenter-4, 13, 9);
+ mask -= TQRegion(xcenter+4, ycenter-4, 4, 1);
+ mask -= TQRegion(xcenter+4, ycenter-3, 4, 1);
+ mask -= TQRegion(xcenter+5, ycenter-2, 3, 1);
+ mask -= TQRegion(xcenter+6, ycenter-1, 2, 1);
+ mask -= TQRegion(xcenter+7, ycenter, 2, 1);
+ mask -= TQRegion(xcenter+6, ycenter+1, 2, 1);
+ mask -= TQRegion(xcenter+5, ycenter+2, 3, 1);
+ mask -= TQRegion(xcenter+4, ycenter+3, 4, 1);
+ mask -= TQRegion(xcenter+4, ycenter+4, 4, 1);
p->setClipRegion(mask);
uint surfaceFlags = Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft|
Round_UpperRight|Is_Horizontal;
if(!enabled)
surfaceFlags |= Is_Disabled;
- renderSurface(p, QRect(xcenter-5, ycenter-4, 13, 9),
+ renderSurface(p, TQRect(xcenter-5, ycenter-4, 13, 9),
cg.background(), surface, getColor(cg,MouseOverHighlight),
_contrast+3, surfaceFlags);
- renderDot(p, QPoint(xcenter-3, ycenter-3), surface, false, true );
- renderDot(p, QPoint(xcenter-3, ycenter+2), surface, false, true );
+ renderDot(p, TQPoint(xcenter-3, ycenter-3), surface, false, true );
+ renderDot(p, TQPoint(xcenter-3, ycenter+2), surface, false, true );
p->setClipping(false);
}
@@ -1836,9 +1836,9 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawLine( centerx, centery - radius, centerx, centery + radius );
} else if(_drawTriangularExpander) {
if( flags & Style_On )
- drawPrimitive(PE_ArrowRight, p, QRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
+ drawPrimitive(PE_ArrowRight, p, TQRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
if( flags & Style_Off )
- drawPrimitive(PE_ArrowDown, p, QRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
+ drawPrimitive(PE_ArrowDown, p, TQRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
}
break;
@@ -1853,10 +1853,10 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
{
// make 128*1 and 1*128 bitmaps that can be used for
// drawing the right sort of lines.
- verticalLine = new QBitmap( 1, 129, true );
- horizontalLine = new QBitmap( 128, 1, true );
- QPointArray a( 64 );
- QPainter p2;
+ verticalLine = new TQBitmap( 1, 129, true );
+ horizontalLine = new TQBitmap( 128, 1, true );
+ TQPointArray a( 64 );
+ TQPainter p2;
p2.begin( verticalLine );
int i;
@@ -1865,7 +1865,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
verticalLine->setMask( *verticalLine );
p2.begin( horizontalLine );
@@ -1874,7 +1874,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
horizontalLine->setMask( *horizontalLine );
}
@@ -1923,11 +1923,11 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
bool down = flags & Style_Down;
bool on = flags & Style_On;
@@ -1952,7 +1952,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
if(_drawFocusRect) //FIXME: it's necessary to be configurable? naaah :)
{
//Figuring out in what beast we are painting...
- QWidget *widget = dynamic_cast<QWidget*>( p->device() );
+ TQWidget *widget = dynamic_cast<TQWidget*>( p->device() );
//rendercontour isn't able to draw with negative measures
//rounded border in a listview/listbox is ugly
@@ -1960,8 +1960,8 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
//also no rouded border when there is no parent widget
if( r.width() < 0 || r.height() < 0 || (widget && !widget->parentWidget()) ||
(widget &&
- (dynamic_cast<QScrollView*>( widget->parent() ) ||
- dynamic_cast<QListBox*>( widget->parent()))
+ (dynamic_cast<TQScrollView*>( widget->parent() ) ||
+ dynamic_cast<TQListBox*>( widget->parent()))
) ||
cg.background() == getColor(cg, ButtonContour)
)
@@ -1971,7 +1971,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
break;
}
- QColor backgroundColor;
+ TQColor backgroundColor;
if( widget )
backgroundColor = widget->paletteBackgroundColor();
else
@@ -1998,13 +1998,13 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
//is the section sorted?
bool sortedSection = false;
//orientation
- Qt::Orientation orientation = Qt::Horizontal;
+ TQt::Orientation orientation = TQt::Horizontal;
- QHeader *header = dynamic_cast<QHeader*>(p->device() );
- QListView *list = NULL;
+ TQHeader *header = dynamic_cast<TQHeader*>(p->device() );
+ TQListView *list = NULL;
if (header) {
- list = dynamic_cast<QListView*>(header->parent());
- int headerPos = (header->orientation()==Qt::Horizontal?r.x():r.y());
+ list = dynamic_cast<TQListView*>(header->parent());
+ int headerPos = (header->orientation()==TQt::Horizontal?r.x():r.y());
headerId = header->sectionAt( headerPos + header->offset());
isFirst = header->mapToIndex(header->sectionAt(headerPos ) +
header->offset()) == 0;
@@ -2023,24 +2023,24 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
if(!enabled) contourFlags|=Is_Disabled;
//if horizontal draw always the top contour, else always the left one
- if( orientation == Qt::Horizontal )
+ if( orientation == TQt::Horizontal )
contourFlags |= Draw_Top;
else
contourFlags |= Draw_Left;
//round first header contour and draw the border that usually is not drawn
- if( isFirst && orientation == Qt::Horizontal )
+ if( isFirst && orientation == TQt::Horizontal )
contourFlags |= Draw_Left|Round_UpperLeft;
- if( isFirst && orientation == Qt::Vertical )
+ if( isFirst && orientation == TQt::Vertical )
contourFlags |= Draw_Top|Round_UpperLeft;
//round last header contour
- //if it's horizontal and we are in a QListView, round only if resizemode !=NoColumn
- if( isLast && orientation == Qt::Horizontal /*&&
- (( list && list->resizeMode() != QListView::NoColumn) || !list)*/ )
+ //if it's horizontal and we are in a TQListView, round only if resizemode !=NoColumn
+ if( isLast && orientation == TQt::Horizontal /*&&
+ (( list && list->resizeMode() != TQListView::NoColumn) || !list)*/ )
contourFlags |= Round_UpperRight;
- if( isLast && orientation == Qt::Vertical )
+ if( isLast && orientation == TQt::Vertical )
contourFlags |= Round_BottomLeft;
/* The function
@@ -2066,8 +2066,8 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
{
if( (hoverWidget == p->device()) && headerId == hoverHeaderId )
{
- /*remedy to a Qt bug that triggers only on horizontal headers*/
- if( (header && header->orientation()==Qt::Vertical) ||
+ /*remedy to a TQt bug that triggers only on horizontal headers*/
+ if( (header && header->orientation()==TQt::Vertical) ||
(header && (header->sectionPos(headerId) +
header->sectionSize(headerId) -
header->offset() > r.x()))
@@ -2078,7 +2078,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
}
- renderSurface(p, QRect(isFirst?r.left()+1:r.left(), r.top()+1, isFirst?r.width()-2:r.width()-1, r.height()-2),
+ renderSurface(p, TQRect(isFirst?r.left()+1:r.left(), r.top()+1, isFirst?r.width()-2:r.width()-1, r.height()-2),
cg.background(),
sortedSection?alphaBlendColors(cg.highlight(), cg.button(), 70):cg.button(),
getColor(cg,MouseOverHighlight), _contrast,
@@ -2115,11 +2115,11 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
case PE_SpinWidgetMinus: {
p->setPen( cg.buttonText() );
- int l = QMIN( w-2, h-2 );
+ int l = TQMIN( w-2, h-2 );
// make the length even so that we get a nice symmetric plus...
if(l%2 != 0)
--l;
- QPoint c = r.center();
+ TQPoint c = r.center();
p->drawLine( c.x()-l/2, c.y(), c.x()+l/2, c.y() );
if ( pe == PE_SpinWidgetPlus ) {
@@ -2135,7 +2135,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
const WidgetState s = enabled?(down?IsPressed:
((hoverWidget == p->device())?
IsHighlighted:IsEnabled)):IsDisabled;
- const QColor surface = getColor(cg, DragButtonSurface, s);
+ const TQColor surface = getColor(cg, DragButtonSurface, s);
uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Sharp_UpperLeft|Sharp_UpperRight|Sharp_BottomLeft|Sharp_BottomRight;
if(!enabled) contourFlags|=Is_Disabled;
@@ -2158,7 +2158,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
if(down) surfaceFlags|= Is_Sunken;
if(r.height() >= 4)
{
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
cg.background(), surface, cg.highlight(),
_contrast+3, surfaceFlags);
}
@@ -2181,8 +2181,8 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
else
{
- renderDot(p, QPoint(xPos-3, yPos+i), surface, true, true );
- renderDot(p, QPoint(xPos+2, yPos+i), surface, true, true );
+ renderDot(p, TQPoint(xPos-3, yPos+i), surface, true, true );
+ renderDot(p, TQPoint(xPos+2, yPos+i), surface, true, true );
}
}
}
@@ -2199,8 +2199,8 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
else
{
- renderDot(p, QPoint(xPos+i, yPos-3), surface, true, true );
- renderDot(p, QPoint(xPos+i, yPos+2), surface, true, true );
+ renderDot(p, TQPoint(xPos+i, yPos-3), surface, true, true );
+ renderDot(p, TQPoint(xPos+i, yPos+2), surface, true, true );
}
}
}
@@ -2212,7 +2212,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
case PE_ScrollBarSubPage: {
if (on || down) {
- p->fillRect(r, QBrush(cg.mid().dark()));
+ p->fillRect(r, TQBrush(cg.mid().dark()));
} else {
if(flags & Style_Horizontal) {
@@ -2239,10 +2239,10 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
contourFlags);
- QRect gradientRect( xs,y+1,ws,h/2 );
+ TQRect gradientRect( xs,y+1,ws,h/2 );
renderGradient( p, gradientRect, cg.background().dark(100+_contrast),
cg.background().light(100+_contrast));
- p->fillRect( QRect(xs,gradientRect.bottom()+1,ws,h-2-gradientRect.height()),
+ p->fillRect( TQRect(xs,gradientRect.bottom()+1,ws,h-2-gradientRect.height()),
cg.background().light(100+_contrast) );
}
@@ -2273,10 +2273,10 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
contourFlags);
- QRect gradientRect( x+1,ys,w/2,hs );
+ TQRect gradientRect( x+1,ys,w/2,hs );
renderGradient( p, gradientRect, cg.background().dark(100+_contrast),
cg.background().light(100+_contrast), false);
- p->fillRect( QRect(gradientRect.right()+1, ys, w-2-gradientRect.width(), hs),
+ p->fillRect( TQRect(gradientRect.right()+1, ys, w-2-gradientRect.width(), hs),
cg.background().light(100+_contrast) );
}
@@ -2339,7 +2339,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
contourFlags);
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-(r.x()==0?2:1), r.height()-(r.y()==0?2:1)),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-(r.x()==0?2:1), r.height()-(r.y()==0?2:1)),
cg.background(), cg.button(), getColor(cg,MouseOverHighlight), _contrast+3,
surfaceFlags);
@@ -2390,7 +2390,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
renderContour(p, r, cg.background(), getColor(cg, ButtonContour),
contourFlags);
- renderSurface(p, QRect(r.left()+(!isNext||!horiz?1:0), r.top()+(!isNext||horiz?1:0), r.width()-(isNext&&horiz?1:2), r.height()-(isNext&&!horiz?1:2)),
+ renderSurface(p, TQRect(r.left()+(!isNext||!horiz?1:0), r.top()+(!isNext||horiz?1:0), r.width()-(isNext&&horiz?1:2), r.height()-(isNext&&!horiz?1:2)),
cg.background(), cg.button(), getColor(cg,MouseOverHighlight), _contrast+3,
surfaceFlags);
@@ -2403,7 +2403,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
// CHECKBOXES
// ----------
case PE_Indicator: {
- QColor contentColor = enabled?cg.base():cg.background();
+ TQColor contentColor = enabled?cg.base():cg.background();
uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
if(!enabled) {
@@ -2422,7 +2422,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
surfaceFlags |= Highlight_Left|Highlight_Right|
Highlight_Top|Highlight_Bottom;
}
- renderSurface(p, QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2),
cg.background(), contentColor, getColor(cg,MouseOverHighlight), enabled?_contrast+3:(_contrast/2), surfaceFlags);
drawPrimitive(PE_CheckMark, p, r, cg, flags);
@@ -2438,11 +2438,11 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
// RADIOBUTTONS
// ------------
case PE_ExclusiveIndicator: {
- const QColor contourColor = getColor(cg, ButtonContour, enabled);
- QColor contentColor = enabled?cg.base():cg.background();
+ const TQColor contourColor = getColor(cg, ButtonContour, enabled);
+ TQColor contentColor = enabled?cg.base():cg.background();
- QBitmap bmp;
- bmp = QBitmap(13, 13, radiobutton_mask_bits, true);
+ TQBitmap bmp;
+ bmp = TQBitmap(13, 13, radiobutton_mask_bits, true);
// first the surface...
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
if(!enabled) {
@@ -2457,28 +2457,28 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
// ...then contour, anti-alias, mouseOver...
// contour
- bmp = QBitmap(13, 13, radiobutton_contour_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_contour_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(cg.background(), contourColor, 50) );
p->drawPixmap(x, y, bmp);
// anti-alias outside
- bmp = QBitmap(13, 13, radiobutton_aa_outside_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_aa_outside_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(cg.background(), contourColor, 150) );
p->drawPixmap(x, y, bmp);
// highlighting...
if(mouseOver) {
- bmp = QBitmap(13, 13, radiobutton_highlight1_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_highlight1_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, getColor(cg,MouseOverHighlight), 80) );
p->drawPixmap(x, y, bmp);
- bmp = QBitmap(13, 13, radiobutton_highlight2_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_highlight2_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, getColor(cg,MouseOverHighlight), 150) );
p->drawPixmap(x, y, bmp);
}
// anti-alias inside, "above" the higlighting!
- bmp = QBitmap(13, 13, radiobutton_aa_inside_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_aa_inside_bits, true);
bmp.setMask(bmp);
if(mouseOver) {
p->setPen(alphaBlendColors(getColor(cg,MouseOverHighlight), contourColor, 180) );
@@ -2493,8 +2493,8 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
case PE_ExclusiveIndicatorMask: {
p->fillRect(r, color0);
- QBitmap bmp;
- bmp = QBitmap(13, 13, radiobutton_mask_bits, true);
+ TQBitmap bmp;
+ bmp = TQBitmap(13, 13, radiobutton_mask_bits, true);
bmp.setMask(bmp);
p->setPen(color1);
p->drawPixmap(x, y, bmp);
@@ -2506,20 +2506,20 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
// --------------
case PE_Splitter: {
// highlight on mouse over
- QColor color = (hoverWidget == p->device())?cg.background().light(100+_contrast):cg.background();
+ TQColor color = (hoverWidget == p->device())?cg.background().light(100+_contrast):cg.background();
p->fillRect(r, color);
if (w > h) {
if (h > 4) {
int ycenter = r.height()/2;
for(int k = r.width()/2-12; k <= r.width()/2+12; k+=6) {
- renderDot(p, QPoint(k, ycenter-1), color, true, true);
+ renderDot(p, TQPoint(k, ycenter-1), color, true, true);
}
}
} else {
if (w > 4) {
int xcenter = r.width()/2;
for(int k = r.height()/2-12; k <= r.height()/2+12; k+=6){
- renderDot(p, QPoint(xcenter-1, k), color, true, true);
+ renderDot(p, TQPoint(xcenter-1, k), color, true, true);
}
}
}
@@ -2549,9 +2549,9 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
bool isEnabled = true;
// panel is highlighted by default if it has focus, but if we have access to the
// widget itself we can try to avoid highlighting in case it's readOnly or disabled.
- if (p->device() && dynamic_cast<QLineEdit*>(p->device()))
+ if (p->device() && dynamic_cast<TQLineEdit*>(p->device()))
{
- QLineEdit* lineEdit = dynamic_cast<QLineEdit*>(p->device());
+ TQLineEdit* lineEdit = dynamic_cast<TQLineEdit*>(p->device());
isReadOnly = lineEdit->isReadOnly();
isEnabled = lineEdit->isEnabled();
}
@@ -2566,9 +2566,9 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
//
// In this place there is no reliable way to detect if we are in khtml; the
// only thing we know is that khtml buffers its widgets into a pixmap. So
- // when the paint device is a QPixmap, chances are high that we are in khtml.
+ // when the paint device is a TQPixmap, chances are high that we are in khtml.
// It's possible that this breaks other things, so let's see how it works...
- if (p->device() && dynamic_cast<QPixmap*>(p->device() ) ) {
+ if (p->device() && dynamic_cast<TQPixmap*>(p->device() ) ) {
contourFlags += Draw_AlphaBlend;
}
@@ -2582,7 +2582,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
renderContour(p, r, cg.background(),
getColor(cg, ButtonContour, enabled), contourFlags );
}
- const QColor contentColor = enabled?cg.base():cg.background();
+ const TQColor contentColor = enabled?cg.base():cg.background();
if (_inputFocusHighlight && hasFocus && !isReadOnly && isEnabled)
{
p->setPen( getColor(cg,FocusHighlight).dark(130) );
@@ -2624,7 +2624,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
case PE_PanelPopup: {
/*TODO: is there a way tho check if we are a menubar popup or a normal popup?
so in the menubar popup
- (QApplication::reverseLayout()?Sharp_UpperRight:Sharp_UpperLeft)|
+ (TQApplication::reverseLayout()?Sharp_UpperRight:Sharp_UpperLeft)|
could be added
*/
renderContour(p, r, cg.background(), cg.background().dark(200),
@@ -2637,10 +2637,10 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
case PE_PanelMenuBar:
case PE_PanelDockWindow: {
// fix for toolbar lag (from Mosfet Liquid)
- QWidget* w = dynamic_cast<QWidget*>(p->device());
+ TQWidget* w = dynamic_cast<TQWidget*>(p->device());
if(w && w->backgroundMode() == PaletteButton)
w->setBackgroundMode(PaletteBackground);
- p->fillRect(r, cg.brush(QColorGroup::Background));
+ p->fillRect(r, cg.brush(TQColorGroup::Background));
if ( _drawToolBarSeparator &&
//don't draw the separator under the menubars if the emphasys with border is on
@@ -2696,12 +2696,12 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
/*handles littler, nicer*/
if(horiz) {
for(int j = vCenter-6; j <= vCenter+6; j+=6) {
- renderDot(p, QPoint(hCenter, j), cg.background(), true, true);
+ renderDot(p, TQPoint(hCenter, j), cg.background(), true, true);
counter++;
}
} else {
for(int j = hCenter-12; j <= hCenter+12; j+=6) {
- renderDot(p, QPoint(j, vCenter), cg.background(), true, true);
+ renderDot(p, TQPoint(j, vCenter), cg.background(), true, true);
counter++;
}
}
@@ -2749,31 +2749,31 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
case PE_CheckMark: {
- const QColor contentColor = enabled?cg.base():cg.background();
- QColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
+ const TQColor contentColor = enabled?cg.base():cg.background();
+ TQColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
if(flags & Style_Down) {
checkmarkColor = alphaBlendColors(contentColor, checkmarkColor, 150);
}
int x = r.center().x() - 4, y = r.center().y() - 4;
- QBitmap bmp;
+ TQBitmap bmp;
if( flags & Style_On ) {
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_dark_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_dark_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
p->drawPixmap(x, y, bmp);
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_light_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_light_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(125), 50) );
p->drawPixmap(x, y, bmp);
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_aa_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_aa_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 150) );
p->drawPixmap(x, y, bmp);
} else if ( flags & Style_Off ) {
// empty
} else { // tristate
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_tristate_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, checkmark_tristate_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
p->drawPixmap(x, y, bmp);
@@ -2789,7 +2789,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
case PE_ArrowDown:
case PE_ArrowLeft:
case PE_ArrowRight: {
- QPointArray a;
+ TQPointArray a;
switch (pe) {
case PE_SpinWidgetUp:
@@ -2819,7 +2819,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
}
- const QWMatrix oldMatrix( p->worldMatrix() );
+ const TQWMatrix oldMatrix( p->worldMatrix() );
if (flags & Style_Down) {
p->translate(pixelMetric(PM_ButtonShiftHorizontal),
@@ -2830,10 +2830,10 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
//move PE_HeaderArrow toghether the headerlabel
/*HACK: brutally move the header arrow; maybe in the future
a more clean solution will be possible*/
- if( pe == PE_HeaderArrow && !QApplication::reverseLayout())
+ if( pe == PE_HeaderArrow && !TQApplication::reverseLayout())
{
- QHeader *header = dynamic_cast<QHeader*>(p->device() );
- if (header && header->orientation()==Qt::Horizontal)
+ TQHeader *header = dynamic_cast<TQHeader*>(p->device() );
+ if (header && header->orientation()==TQt::Horizontal)
{
int section = header->sectionAt(x + header->offset());
x = header->sectionSize(section) +
@@ -2857,7 +2857,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
a.translate(0, 0);
}
- if (p->pen() == QPen::NoPen) {
+ if (p->pen() == TQPen::NoPen) {
if (flags & Style_Enabled) {
p->setPen(cg.buttonText());
} else {
@@ -2880,14 +2880,14 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
void PolyesterStyle::drawControl(ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt) const
+ const TQStyleOption& opt) const
{
- const bool reverseLayout = QApplication::reverseLayout();
+ const bool reverseLayout = TQApplication::reverseLayout();
const bool enabled = (flags & Style_Enabled);
@@ -2896,7 +2896,7 @@ void PolyesterStyle::drawControl(ControlElement element,
// PROGRESSBAR
// -----------
case CE_ProgressBarGroove: {
- const QColor content = enabled?cg.base():cg.background();
+ const TQColor content = enabled?cg.base():cg.background();
renderContour(p, r, cg.background(), getColor(cg, ButtonContour, enabled) );
p->setPen(content.dark(105) );
p->drawLine(r.left()+2, r.top()+1, r.right()-2, r.top()+1 );
@@ -2908,11 +2908,11 @@ void PolyesterStyle::drawControl(ControlElement element,
}
case CE_ProgressBarContents: {
- const QProgressBar *pb = dynamic_cast<const QProgressBar*>(widget);
+ const TQProgressBar *pb = dynamic_cast<const TQProgressBar*>(widget);
int steps = pb->totalSteps();
- const QColor bg = enabled?cg.base():cg.background(); // background
- const QColor fg = enabled?cg.highlight():cg.background().dark(110); // foreground
+ const TQColor bg = enabled?cg.base():cg.background(); // background
+ const TQColor fg = enabled?cg.highlight():cg.background().dark(110); // foreground
if( steps == 0 )
{ // Busy indicator
@@ -2923,17 +2923,17 @@ void PolyesterStyle::drawControl(ControlElement element,
if( progress > r.width()-barWidth )
progress = (r.width()-barWidth)-(progress-(r.width()-barWidth));
- renderGradient( p, QRect( r.x(), r.y(), r.width(), r.height()/2 ),
+ renderGradient( p, TQRect( r.x(), r.y(), r.width(), r.height()/2 ),
bg.dark(100+_contrast), bg );
- p->fillRect( QRect( r.x(), (r.height()/2)+1,
+ p->fillRect( TQRect( r.x(), (r.height()/2)+1,
r.width(), r.height()-(r.height()/2)+1 ),
bg );
- renderContour( p, QRect( r.x()+progress, r.y(), barWidth, r.height() ),
+ renderContour( p, TQRect( r.x()+progress, r.y(), barWidth, r.height() ),
bg, fg.dark(160),
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|
Round_BottomRight|Round_UpperLeft|Round_BottomLeft );
- renderSurface(p, QRect( r.x()+progress+1, r.y()+1, barWidth-2, r.height()-2 ),
+ renderSurface(p, TQRect( r.x()+progress+1, r.y()+1, barWidth-2, r.height()-2 ),
bg, fg, cg.highlight(),
2*(_contrast/3),
Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
@@ -2950,12 +2950,12 @@ void PolyesterStyle::drawControl(ControlElement element,
if(w<4) w = 4;
int w2 = r.width()-(r.width()-w);
- QRect RemptyGradient(reverseLayout?r.left():r.left()+w-1, r.top(),
+ TQRect RemptyGradient(reverseLayout?r.left():r.left()+w-1, r.top(),
r.width()-w+1, r.height()/2 );
- QRect Rempty( RemptyGradient.x(), RemptyGradient.bottom()+1,
+ TQRect Rempty( RemptyGradient.x(), RemptyGradient.bottom()+1,
RemptyGradient.width(), r.height()-RemptyGradient.height());
- QRect Rcontour(reverseLayout?r.right()-w2+1:r.left(), r.top(), w2, r.height() );
- QRect Rsurface(Rcontour.left()+1, Rcontour.top()+1, w2-2, Rcontour.height()-2);
+ TQRect Rcontour(reverseLayout?r.right()-w2+1:r.left(), r.top(), w2, r.height() );
+ TQRect Rsurface(Rcontour.left()+1, Rcontour.top()+1, w2-2, Rcontour.height()-2);
p->fillRect(Rempty, bg);
renderGradient( p, RemptyGradient, bg.dark(100+_contrast), bg );
@@ -2966,17 +2966,17 @@ void PolyesterStyle::drawControl(ControlElement element,
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperRight|Round_BottomRight|Round_UpperLeft|Round_BottomLeft);
- QRegion mask(Rsurface);
+ TQRegion mask(Rsurface);
- mask -= QRegion(Rsurface.left(), Rsurface.top(), 1, 1);
- mask -= QRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
- mask -= QRegion(Rsurface.right(), Rsurface.top(), 1, 1);
- mask -= QRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
+ mask -= TQRegion(Rsurface.left(), Rsurface.top(), 1, 1);
+ mask -= TQRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
+ mask -= TQRegion(Rsurface.right(), Rsurface.top(), 1, 1);
+ mask -= TQRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
p->setClipRegion(mask);
int counter = 0;
- QPixmap surfaceTile(21, r.height()-2);
- QPainter surfacePainter(&surfaceTile);
+ TQPixmap surfaceTile(21, r.height()-2);
+ TQPainter surfacePainter(&surfaceTile);
// - 21 pixel -
// __________
// | ` `| <- 3
@@ -2988,7 +2988,7 @@ void PolyesterStyle::drawControl(ControlElement element,
const int tileHeight = surfaceTile.height();
// 3
renderSurface(&surfacePainter,
- QRect(20, 0, 11, tileHeight),
+ TQRect(20, 0, 11, tileHeight),
fg.light(105), fg, cg.highlight(), 2*(_contrast/3),
reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_BottomLeft|Is_Horizontal
@@ -2997,7 +2997,7 @@ void PolyesterStyle::drawControl(ControlElement element,
Is_Horizontal);
// 2
renderSurface(&surfacePainter,
- QRect(10, 0, 11, tileHeight),
+ TQRect(10, 0, 11, tileHeight),
fg, fg.light(105), cg.highlight(), 2*(_contrast/3),
reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_BottomLeft|Is_Horizontal
@@ -3005,7 +3005,7 @@ void PolyesterStyle::drawControl(ControlElement element,
Round_UpperRight|Round_BottomRight|Is_Horizontal);
// 1
renderSurface(&surfacePainter,
- QRect(0, 0, 11, tileHeight),
+ TQRect(0, 0, 11, tileHeight),
fg.light(105), fg, cg.highlight(), 2*(_contrast/3),
reverseLayout ? Draw_Right|Draw_Left|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_BottomLeft|Is_Horizontal
@@ -3019,8 +3019,8 @@ void PolyesterStyle::drawControl(ControlElement element,
staticShift = (reverseLayout ? Rsurface.left() : Rsurface.right()) % 40 - 40;
} else {
// find the animation Offset for the current Widget
- QWidget* nonConstWidget = const_cast<QWidget*>(widget);
- QMapConstIterator<QWidget*, int> iter = progAnimWidgets.find(nonConstWidget);
+ TQWidget* nonConstWidget = const_cast<TQWidget*>(widget);
+ TQMapConstIterator<TQWidget*, int> iter = progAnimWidgets.find(nonConstWidget);
if (iter != progAnimWidgets.end())
animShift = iter.data();
}
@@ -3047,7 +3047,7 @@ void PolyesterStyle::drawControl(ControlElement element,
break;
}
- //TABBAR TEXT (code from Qt libraries Copyright Trolltech 2006)
+ //TABBAR TEXT (code from TQt libraries Copyright Trolltech 2006)
//--------------
case CE_TabBarLabel:{
if ( opt.isDefault() )
@@ -3056,22 +3056,22 @@ void PolyesterStyle::drawControl(ControlElement element,
const uint text_flags = AlignVCenter | AlignHCenter | ShowPrefix |
DontClip | SingleLine;
- QTab *t = opt.tab();
- const QTabBar * tb = ( const QTabBar * ) widget;
+ TQTab *t = opt.tab();
+ const TQTabBar * tb = ( const TQTabBar * ) widget;
- QRect tr = r;
+ TQRect tr = r;
if ( t->identifier() == tb->currentTab())
{
tr.moveTop( tr.top() -
- pixelMetric( QStyle::PM_TabBarTabShiftVertical, tb ) );
+ pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
tr.moveLeft( tr.left() -
- pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, tb ) );
+ pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, tb ) );
}
if(_shadowedButtonsText)
{
p->setPen( cg.button().dark(120+_contrast));
- p->drawText(QRect(tr.x()+1, tr.y()+1, tr.width(), tr.height()),
+ p->drawText(TQRect(tr.x()+1, tr.y()+1, tr.width(), tr.height()),
text_flags, opt.tab()->text());
}
@@ -3089,24 +3089,24 @@ void PolyesterStyle::drawControl(ControlElement element,
case CE_RadioButton: {
drawPrimitive(PE_ExclusiveIndicator, p, r, cg, flags);
- const QColor contentColor = enabled?cg.base():cg.background();
- QColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
+ const TQColor contentColor = enabled?cg.base():cg.background();
+ TQColor checkmarkColor = enabled?getColor(cg,CheckMark):cg.background();
if(flags & Style_Down) {
checkmarkColor = alphaBlendColors(contentColor, checkmarkColor, 150);
}
if (flags & Style_On || flags & Style_Down) {
int x = r.center().x() - 4, y = r.center().y() - 4;
- QBitmap bmp;
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_dark_bits, true);
+ TQBitmap bmp;
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_dark_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 50) );
p->drawPixmap(x, y, bmp);
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_light_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_light_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(125), 50) );
p->drawPixmap(x, y, bmp);
- bmp = QBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_aa_bits, true);
+ bmp = TQBitmap(CHECKMARKSIZE, CHECKMARKSIZE, radiomark_aa_bits, true);
bmp.setMask(bmp);
p->setPen(alphaBlendColors(contentColor, checkmarkColor.dark(150), 150) );
p->drawPixmap(x, y, bmp);
@@ -3118,16 +3118,16 @@ void PolyesterStyle::drawControl(ControlElement element,
// TABS
// ----
case CE_TabBarTab: {
- const QTabBar * tb = (const QTabBar *) widget;
+ const TQTabBar * tb = (const TQTabBar *) widget;
bool cornerWidget = false;
- if( ::qt_cast<QTabWidget*>(tb->parent()) ) {
- const QTabWidget *tw = (const QTabWidget*)tb->parent();
+ if( ::tqt_cast<TQTabWidget*>(tb->parent()) ) {
+ const TQTabWidget *tw = (const TQTabWidget*)tb->parent();
// is there a corner widget in the (top) left edge?
- QWidget *cw = tw->cornerWidget(Qt::TopLeft);
+ TQWidget *cw = tw->cornerWidget(TQt::TopLeft);
if(cw)
cornerWidget = true;
}
- QTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = tb->shape();
SelectedTab selected = OtherTab;
if( flags & Style_Selected )
selected = ThisTab;
@@ -3154,18 +3154,18 @@ void PolyesterStyle::drawControl(ControlElement element,
}
switch (tbs) {
- case QTabBar::TriangularAbove:
+ case TQTabBar::TriangularAbove:
// renderTriangularTab(p, r, cg, (flags & Style_MouseOver), selected, false, pos);
renderTab(p, r, cg, mouseOver, selected, false, pos, true, cornerWidget);
break;
- case QTabBar::RoundedAbove:
+ case TQTabBar::RoundedAbove:
renderTab(p, r, cg, mouseOver, selected, false, pos, false, cornerWidget);
break;
- case QTabBar::TriangularBelow:
+ case TQTabBar::TriangularBelow:
// renderTriangularTab(p, r, cg, (flags & Style_MouseOver), selected, true, pos);
renderTab(p, r, cg, mouseOver, selected, true, pos, true, cornerWidget);
break;
- case QTabBar::RoundedBelow:
+ case TQTabBar::RoundedBelow:
renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
break;
default:
@@ -3176,7 +3176,7 @@ void PolyesterStyle::drawControl(ControlElement element,
}
case CE_PushButton: {
- QPushButton *button = (QPushButton *)widget;
+ TQPushButton *button = (TQPushButton *)widget;
const bool isDefault = enabled && button->isDefault();
@@ -3186,19 +3186,19 @@ void PolyesterStyle::drawControl(ControlElement element,
if (widget == hoverWidget)
flags |= Style_MouseOver;
- QColorGroup g2 = cg;
+ TQColorGroup g2 = cg;
if (isDefault)
- g2.setColor(QColorGroup::Background, cg.background().dark(120) );
+ g2.setColor(TQColorGroup::Background, cg.background().dark(120) );
int animFrame = 0;
if( _animateButton && animWidgets.contains( button )){
animFrame = animWidgets[button].animFrame;
- g2.setColor( QColorGroup::Button, cg.button().light(100+animFrame) );
+ g2.setColor( TQColorGroup::Button, cg.button().light(100+animFrame) );
}
drawPrimitive(PE_ButtonBevel, p,
- isDefault?QRect(r.x()+1,r.y()+1,r.width()-2,r.height()-2):r,
- g2, flags, QStyleOption(button) );
+ isDefault?TQRect(r.x()+1,r.y()+1,r.width()-2,r.height()-2):r,
+ g2, flags, TQStyleOption(button) );
if (isDefault ) {
drawPrimitive(PE_ButtonDefault, p, r, cg, flags);
@@ -3212,7 +3212,7 @@ void PolyesterStyle::drawControl(ControlElement element,
int x, y, w, h;
r.rect( &x, &y, &w, &h );
- QPushButton* button = (QPushButton *)( widget );
+ TQPushButton* button = (TQPushButton *)( widget );
bool active = button->isOn() || button->isDown();
bool cornArrow = false;
@@ -3229,13 +3229,13 @@ void PolyesterStyle::drawControl(ControlElement element,
{
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
if ( button->iconSet() && !button->iconSet()->isNull() &&
- (dx + button->iconSet()->pixmap (QIconSet::Small, QIconSet::Normal, QIconSet::Off ).width()) >= w )
+ (dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w )
{
cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget
}
else
{
- drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
cg, flags, opt );
w -= dx;
}
@@ -3244,15 +3244,15 @@ void PolyesterStyle::drawControl(ControlElement element,
// Draw the icon if there is one
if ( button->iconSet() && !button->iconSet()->isNull() )
{
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if (button->isEnabled())
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if (button->isToggleButton() && button->isOn())
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pixmap = button->iconSet()->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pixmap = button->iconSet()->pixmap( TQIconSet::Small, mode, state );
if (button->text().isEmpty() && !button->pixmap())
p->drawPixmap( x + w/2 - pixmap.width()/2, y + h / 2 - pixmap.height() / 2,
@@ -3261,7 +3261,7 @@ void PolyesterStyle::drawControl(ControlElement element,
p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
if (cornArrow) //Draw over the icon
- drawPrimitive( PE_ArrowDown, p, visualRect( QRect(x + w - 6, x + h - 6, 7, 7), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
cg, flags, opt );
@@ -3276,7 +3276,7 @@ void PolyesterStyle::drawControl(ControlElement element,
animFrame = animWidgets[button].animFrame;
//12.8 is the maximum amount of blending (256) / ANIMATIONSTEPS (20)
- QColor textColor = alphaBlendColors( cg.highlightedText(),
+ TQColor textColor = alphaBlendColors( cg.highlightedText(),
button->colorGroup().buttonText(),
(int)(12.8*animFrame)
);
@@ -3285,25 +3285,25 @@ void PolyesterStyle::drawControl(ControlElement element,
if( _shadowedButtonsText && button->isEnabled() && button->text() )
{
- QColor shadowColor = alphaBlendColors( cg.highlight(),
+ TQColor shadowColor = alphaBlendColors( cg.highlight(),
cg.button(),
(int)(12.8*animFrame)
).dark(120+_contrast);
- drawItem( p, QRect(x+1, y+1, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect(x+1, y+1, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(),
_useLowerCaseText?button->text().lower():button->text(),
-1, &shadowColor );
}
- drawItem( p, QRect(x, y, w, h), AlignCenter|ShowPrefix,
+ drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix,
button->colorGroup(), button->isEnabled(), button->pixmap(),
_useLowerCaseText?button->text().lower():button->text(),
-1, &textColor );
if ( flags & Style_HasFocus )
{
- QColorGroup g2 = cg;
+ TQColorGroup g2 = cg;
drawPrimitive( PE_FocusRect, p,
visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
@@ -3316,7 +3316,7 @@ void PolyesterStyle::drawControl(ControlElement element,
// -----------------------------------------
case CE_MenuBarItem: {
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
bool active = flags & Style_Active;
bool focused = flags & Style_HasFocus;
bool down = flags & Style_Down;
@@ -3325,7 +3325,7 @@ void PolyesterStyle::drawControl(ControlElement element,
if( _menuBarEmphasis )
{
- QMenuBar *mb = (QMenuBar*)widget;
+ TQMenuBar *mb = (TQMenuBar*)widget;
renderSurface(p, mb->rect(), cg.background(),
getColor(cg, MenuBarEmphasis),
cg.background(),
@@ -3340,13 +3340,13 @@ void PolyesterStyle::drawControl(ControlElement element,
if (down) {
//drawPrimitive(PE_ButtonTool, p, r, cg, flags|Style_Down, opt);
//code to draw the menubar item as a tab (ugly?)
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()),
cg.highlight(), cg.highlight(), cg.highlight(),
_contrast, Is_Horizontal|Draw_Right|Draw_Top|Draw_Left);
renderContour(p, r, getColor(cg, MenuBarEmphasis), cg.highlight().dark(100+_contrast*8), Draw_Right|Draw_Top|Draw_Left|Round_UpperRight|Round_UpperLeft);
- //renderTab( p, QRect(r.left(), r.top(), r.width(), r.height()+2), cg, false, true, false, Single, false, false);
+ //renderTab( p, TQRect(r.left(), r.top(), r.width(), r.height()+2), cg, false, true, false, Single, false, false);
} else {
- renderSurface(p, QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
+ renderSurface(p, TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2),
cg.background(), getColor(cg, MenuBarEmphasis), cg.background(),
_contrast, Is_Horizontal|Draw_Right|Draw_Top|Draw_Left|Draw_Bottom);
renderContour(p, r, getColor(cg, MenuBarEmphasis), getColor(cg, MenuBarEmphasis).dark(120+_contrast*8), Draw_Right|Draw_Top|Draw_Left|Round_UpperRight|Round_UpperLeft|Draw_Bottom|Round_BottomRight|Round_BottomLeft);
@@ -3366,7 +3366,7 @@ void PolyesterStyle::drawControl(ControlElement element,
p->setPen(cg.highlightedText() );
else
if( _customMenuBarEmphasisColor )
- p->setPen( (qGray(_menuBarEmphasisColor.rgb())>150?cg.foreground():white) );
+ p->setPen( (tqGray(_menuBarEmphasisColor.rgb())>150?cg.foreground():white) );
else
p->setPen( cg.foreground() );
p->drawText(r, text_flags, mi->text());
@@ -3377,12 +3377,12 @@ void PolyesterStyle::drawControl(ControlElement element,
// POPUPMENU ITEM (highlighted on mouseover)
// ------------------------------------------
case CE_PopupMenuItem: {
- const QPopupMenu *popupmenu = static_cast< const QPopupMenu * >( widget );
- QMenuItem *mi = opt.menuItem();
+ const TQPopupMenu *popupmenu = static_cast< const TQPopupMenu * >( widget );
+ TQMenuItem *mi = opt.menuItem();
if ( !mi )
{
- // Don't leave blank holes if we set NoBackground for the QPopupMenu.
+ // Don't leave blank holes if we set NoBackground for the TQPopupMenu.
// This only happens when the popupMenu spans more than one column.
if (! ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) )
p->fillRect( r, cg.background().light( 105 ) );
@@ -3396,9 +3396,9 @@ void PolyesterStyle::drawControl(ControlElement element,
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( checkable )
- checkcol = QMAX( checkcol, 20 );
+ checkcol = TQMAX( checkcol, 20 );
//draw a solid background...
if (! ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) )
@@ -3406,11 +3406,11 @@ void PolyesterStyle::drawControl(ControlElement element,
p->fillRect( r, cg.background().light( 105 ) );
if( _menuStripe )
{
- if( !QApplication::reverseLayout() )
- p->fillRect( QRect(r.left(), r.top(), stripeWidth, r.height()),
+ if( !TQApplication::reverseLayout() )
+ p->fillRect( TQRect(r.left(), r.top(), stripeWidth, r.height()),
cg.background().dark( 100+_contrast ) );
else
- p->fillRect( QRect(r.right()-23, r.top(), stripeWidth, r.height()),
+ p->fillRect( TQRect(r.right()-23, r.top(), stripeWidth, r.height()),
cg.background().dark( 100+_contrast ) );
}
}
@@ -3428,10 +3428,10 @@ void PolyesterStyle::drawControl(ControlElement element,
alphaStripe->setAlphaBuffer(true);
for( int i = 0; i < stripeWidth; i++)
for( int j = 0; j < r.height(); j++)
- alphaStripe->setPixel(i,j, qRgba(0, 0 , 0, 20));
+ alphaStripe->setPixel(i,j, tqRgba(0, 0 , 0, 20));
}
- if( !QApplication::reverseLayout() )
+ if( !TQApplication::reverseLayout() )
p->drawPixmap( r.topLeft(), *alphaStripe );
else
p->drawPixmap( r.topRight(), *alphaStripe );
@@ -3441,8 +3441,8 @@ void PolyesterStyle::drawControl(ControlElement element,
// is this menu item highlighted?
if (active)
{
- QRect r2 = QRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2);
- QRect r3 = QRect(r.left()+2, r.top()+2, r.width()-4, r.height()-4);
+ TQRect r2 = TQRect(r.left()+1, r.top()+1, r.width()-2, r.height()-2);
+ TQRect r3 = TQRect(r.left()+2, r.top()+2, r.width()-4, r.height()-4);
if (enabled)
{
@@ -3475,7 +3475,7 @@ void PolyesterStyle::drawControl(ControlElement element,
if ( mi->isSeparator() )
{
p->setPen( cg.mid() );
- if( !QApplication::reverseLayout() )
+ if( !TQApplication::reverseLayout() )
{
p->drawLine( r.x()+stripeWidth, r.y() + 1, r.right()-5, r.y() + 1 );
if( !_lightBorder)
@@ -3496,28 +3496,28 @@ void PolyesterStyle::drawControl(ControlElement element,
break;
}
- QRect cr = visualRect( QRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
+ TQRect cr = visualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
// Do we have an icon?
if ( mi->iconSet() )
{
- QIconSet::Mode mode;
+ TQIconSet::Mode mode;
// Select the correct icon from the iconset
if (active)
- mode = enabled?QIconSet::Active:QIconSet::Disabled;
+ mode = enabled?TQIconSet::Active:TQIconSet::Disabled;
else
- mode = enabled?QIconSet::Normal:QIconSet::Disabled;
+ mode = enabled?TQIconSet::Normal:TQIconSet::Disabled;
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( checkable && /*!active &&*/ mi->isChecked() )
- drawPrimitive(QStyle::PE_Indicator, p, cr, cg,
- QStyle::Style_Enabled | QStyle::Style_Active | QStyle::Style_Off );
+ drawPrimitive(TQStyle::PE_Indicator, p, cr, cg,
+ TQStyle::Style_Enabled | TQStyle::Style_Active | TQStyle::Style_Off );
/*qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight) );*/
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight) );*/
// Draw the icon
- QPixmap pixmap = mi->iconSet()->pixmap(QIconSet::Small, mode);
- QRect pmr( 0, 0, pixmap.width(), pixmap.height() );
+ TQPixmap pixmap = mi->iconSet()->pixmap(TQIconSet::Small, mode);
+ TQRect pmr( 0, 0, pixmap.width(), pixmap.height() );
pmr.moveCenter( cr.center() );
p->drawPixmap( pmr.topLeft(), pixmap );
}
@@ -3525,8 +3525,8 @@ void PolyesterStyle::drawControl(ControlElement element,
// Are we checked? (This time without an icon)
else if ( checkable && mi->isChecked() )
{
- int style = QStyle::Style_Enabled | QStyle::Style_Active | QStyle::Style_On ;
- drawPrimitive(QStyle::PE_Indicator, p, cr, cg, style);
+ int style = TQStyle::Style_Enabled | TQStyle::Style_Active | TQStyle::Style_On ;
+ drawPrimitive(TQStyle::PE_Indicator, p, cr, cg, style);
}
// Time to draw the menu item label...
@@ -3547,7 +3547,7 @@ void PolyesterStyle::drawControl(ControlElement element,
// This color will be used instead of the above if the menu item
// is active and disabled at the same time. (etched text)
- QColor discol = cg.mid();
+ TQColor discol = cg.mid();
if ( mi->custom() ) {
int m = 2;
@@ -3566,7 +3566,7 @@ void PolyesterStyle::drawControl(ControlElement element,
}
// The menu item doesn't draw it's own label
- QString s = mi->text();
+ TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() ) {
int t = s.find( '\t' );
@@ -3574,8 +3574,8 @@ void PolyesterStyle::drawControl(ControlElement element,
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
- //QColor draw = cg.text();
- QColor draw = (active && enabled) ? cg.highlightedText () : cg.foreground();
+ //TQColor draw = cg.text();
+ TQColor draw = (active && enabled) ? cg.highlightedText () : cg.foreground();
p->setPen(draw);
@@ -3614,7 +3614,7 @@ void PolyesterStyle::drawControl(ControlElement element,
// The menu item doesn't have a text label
// Check if it has a pixmap instead
else if ( mi->pixmap() ) {
- QPixmap *pixmap = mi->pixmap();
+ TQPixmap *pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -3633,7 +3633,7 @@ void PolyesterStyle::drawControl(ControlElement element,
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = pixelMetric(PM_MenuButtonIndicator) - 1;
- QRect vr = visualRect( QRect( r.x() + r.width() - 5 - 1 - dim,
+ TQRect vr = visualRect( TQRect( r.x() + r.width() - 5 - 1 - dim,
r.y() + r.height() / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -3641,7 +3641,7 @@ void PolyesterStyle::drawControl(ControlElement element,
if ( enabled )
discol = cg.buttonText();
- QColorGroup g2( discol, cg.highlight(), white, white,
+ TQColorGroup g2( discol, cg.highlight(), white, white,
enabled ? white : discol, discol, white );
drawPrimitive( arrow, p, vr, g2, Style_Enabled );
@@ -3683,20 +3683,20 @@ void PolyesterStyle::drawControl(ControlElement element,
case CE_HeaderLabel:
{
- const QHeader *header = static_cast< const QHeader * >( widget );
+ const TQHeader *header = static_cast< const TQHeader * >( widget );
if( !header )
break;
int headerId = header->sectionAt(
- (header->orientation()==Qt::Horizontal?r.x():r.y()) +
+ (header->orientation()==TQt::Horizontal?r.x():r.y()) +
header->offset());
- QString s = header->label(headerId);
+ TQString s = header->label(headerId);
// Does the header have a text label?
if( !s.isNull() )
{
int t = s.find( '\t' );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
p->setPen(cg.text());
@@ -3707,13 +3707,13 @@ void PolyesterStyle::drawControl(ControlElement element,
r.y(), r.width(), r.height(),
text_flags, s, t );
}
- QIconSet *iS = header->iconSet(headerId);
+ TQIconSet *iS = header->iconSet(headerId);
if( iS )
{
- QIconSet::Mode mode = QIconSet::Normal;
- QIconSet::State state = QIconSet::On;
+ TQIconSet::Mode mode = TQIconSet::Normal;
+ TQIconSet::State state = TQIconSet::On;
- QPixmap pixmap = iS->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pixmap = iS->pixmap( TQIconSet::Small, mode, state );
p->drawPixmap(r.x(), r.y()+r.height()/2-pixmap.height()/2, pixmap);
}
break;
@@ -3725,10 +3725,10 @@ void PolyesterStyle::drawControl(ControlElement element,
}
void PolyesterStyle::drawControlMask(ControlElement element,
- QPainter *p,
- const QWidget *w,
- const QRect &r,
- const QStyleOption &opt) const
+ TQPainter *p,
+ const TQWidget *w,
+ const TQRect &r,
+ const TQStyleOption &opt) const
{
switch (element) {
case CE_PushButton: {
@@ -3745,10 +3745,10 @@ void PolyesterStyle::drawControlMask(ControlElement element,
}
void PolyesterStyle::drawComplexControlMask(ComplexControl c,
- QPainter *p,
- const QWidget *w,
- const QRect &r,
- const QStyleOption &o) const
+ TQPainter *p,
+ const TQWidget *w,
+ const TQRect &r,
+ const TQStyleOption &o) const
{
switch (c) {
case CC_SpinWidget:
@@ -3766,16 +3766,16 @@ void PolyesterStyle::drawComplexControlMask(ComplexControl c,
}
void PolyesterStyle::drawComplexControl(ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption& opt) const
+ const TQStyleOption& opt) const
{
- const bool reverseLayout = QApplication::reverseLayout();
+ const bool reverseLayout = TQApplication::reverseLayout();
const bool enabled = (flags & Style_Enabled);
@@ -3785,8 +3785,8 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
case CC_ComboBox: {
static const unsigned int handleWidth = 15;
- //const QComboBox *cb = dynamic_cast<const QComboBox *>(widget);
- QComboBox *cb = (QComboBox *)(widget); // **hack**: cast away const-ness for animation support!
+ //const TQComboBox *cb = dynamic_cast<const TQComboBox *>(widget);
+ TQComboBox *cb = (TQComboBox *)(widget); // **hack**: cast away const-ness for animation support!
// at the moment cb is only needed to check if the combo box is editable or not.
// if cb doesn't exist, just assume false and the app (gideon! ;) ) at least doesn't crash.
bool editable = false;
@@ -3800,9 +3800,9 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
if( _animateButton && animWidgets.contains( cb ))
animFrame = animWidgets[cb].animFrame;
- const QColor buttonColor = enabled?cg.button().light(100+animFrame):cg.background();
- const QColor highlightColor = (_animateButton?alphaBlendColors( getColor(cg,MouseOverHighlight),cg.button(), 20*animFrame ):getColor(cg,MouseOverHighlight));
- const QColor inputColor = enabled?(editable?cg.base():cg.button())
+ const TQColor buttonColor = enabled?cg.button().light(100+animFrame):cg.background();
+ const TQColor highlightColor = (_animateButton?alphaBlendColors( getColor(cg,MouseOverHighlight),cg.button(), 20*animFrame ):getColor(cg,MouseOverHighlight));
+ const TQColor inputColor = enabled?(editable?cg.base():cg.button())
:cg.background();
uint contourFlags = 0;
@@ -3811,9 +3811,9 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
if (_inputFocusHighlight && hasFocus && editable && enabled)
{
- QRect editField = querySubControlMetrics(control, widget, SC_ComboBoxEditField);
- QRect editFrame = r;
- QRect buttonFrame = r;
+ TQRect editField = querySubControlMetrics(control, widget, SC_ComboBoxEditField);
+ TQRect editFrame = r;
+ TQRect buttonFrame = r;
uint editFlags = contourFlags;
uint buttonFlags = contourFlags;
@@ -3854,9 +3854,9 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
p->drawLine(r.right()-handleWidth-1, r.top()+1, r.right()-handleWidth-1, r.bottom()-1);
}
- const QRect RbuttonSurface(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
+ const TQRect RbuttonSurface(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
handleWidth, r.height()-2);
- const QRect RcontentSurface(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
+ const TQRect RcontentSurface(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
r.width()-handleWidth-3, r.height()-2);
// handler
@@ -3894,7 +3894,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
surfaceFlags);
if (hasFocus) {
drawPrimitive(PE_FocusRect, p,
- QRect(RcontentSurface.x() + 2,
+ TQRect(RcontentSurface.x() + 2,
RcontentSurface.y() + 2,
RcontentSurface.width() - 4,
RcontentSurface.height() - 4), cg, Style_Default, opt);
@@ -3934,7 +3934,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
p->setPen(cg.foreground());
drawPrimitive(PE_SpinWidgetDown, p, RbuttonSurface, cg, Style_Default|Style_Enabled|Style_Raised);
- // QComboBox draws the text using cg.text(), we can override this
+ // TQComboBox draws the text using cg.text(), we can override this
// from here TODO: shadow here?
p->setPen( cg.buttonText() );
p->setBackgroundColor( cg.button() );
@@ -3944,16 +3944,16 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
// TOOLBUTTON
// ----------
case CC_ToolButton: {
- QToolButton *tb = (QToolButton *) widget;// **hack**: cast away const-ness for animation support!
+ TQToolButton *tb = (TQToolButton *) widget;// **hack**: cast away const-ness for animation support!
- QColorGroup g2 = cg;
+ TQColorGroup g2 = cg;
int animFrame = 0;
if( _animateButton && animWidgets.contains( tb )){
animFrame = animWidgets[tb].animFrame;
- g2.setColor( QColorGroup::Button, cg.button().light(100+animFrame) );
+ g2.setColor( TQColorGroup::Button, cg.button().light(100+animFrame) );
}
- QRect button, menuarea;
+ TQRect button, menuarea;
button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
@@ -3990,7 +3990,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
} else if (tb->parentWidget() &&
tb->parentWidget()->backgroundPixmap() &&
!tb->parentWidget()->backgroundPixmap()->isNull()) {
- QPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, tb->pos() );
}
}
@@ -4004,7 +4004,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
}
if (tb->hasFocus() && !tb->focusProxy()) {
- QRect fr = tb->rect();
+ TQRect fr = tb->rect();
fr.addCoords(2, 2, -2, -2);
drawPrimitive(PE_FocusRect, p, fr, g2, Style_Default, opt);
}
@@ -4020,7 +4020,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
case CC_SpinWidget: {
static const unsigned int handleWidth = 15;
- QSpinWidget *sw = (QSpinWidget *)(widget);// **hack**: cast away const-ness for animation support!
+ TQSpinWidget *sw = (TQSpinWidget *)(widget);// **hack**: cast away const-ness for animation support!
SFlags sflags = flags;
PrimitiveElement pe;
@@ -4033,17 +4033,17 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
animFrame = animWidgets[sw].animFrame;
}
- const QColor buttonColor = enabled?cg.button().light(100+animFrame):cg.background();
- const QColor highlightColor = (_animateButton?alphaBlendColors( getColor(cg,MouseOverHighlight),cg.button(), 20*animFrame ):getColor(cg,MouseOverHighlight));
- const QColor inputColor = enabled?cg.base():cg.background();
+ const TQColor buttonColor = enabled?cg.button().light(100+animFrame):cg.background();
+ const TQColor highlightColor = (_animateButton?alphaBlendColors( getColor(cg,MouseOverHighlight),cg.button(), 20*animFrame ):getColor(cg,MouseOverHighlight));
+ const TQColor inputColor = enabled?cg.base():cg.background();
// contour
const bool heightDividable = ((r.height()%2) == 0);
if (_inputFocusHighlight && hasFocus && enabled)
{
- QRect editField = querySubControlMetrics(control, widget, SC_SpinWidgetEditField);
- QRect editFrame = r;
- QRect buttonFrame = r;
+ TQRect editField = querySubControlMetrics(control, widget, SC_SpinWidgetEditField);
+ TQRect editFrame = r;
+ TQRect buttonFrame = r;
uint editFlags = 0;
uint buttonFlags = 0;
@@ -4088,14 +4088,14 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
// surface
- QRect upRect = QRect(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
+ TQRect upRect = TQRect(reverseLayout?r.left()+1:r.right()-handleWidth, r.top()+1,
handleWidth, (r.height()-2)/2);
- QRect downRect = QRect(reverseLayout?r.left()+1:r.right()-handleWidth,
+ TQRect downRect = TQRect(reverseLayout?r.left()+1:r.right()-handleWidth,
heightDividable?r.top()+1+((r.height()-2)/2):r.top()+1+((r.height()-2)/2)+1,
handleWidth, ((r.height()-2)/2) );
if(heightDividable) {
- //upRect = QRect(upRect.left(), upRect.top(), upRect.width(), upRect.height()-1 );
- downRect = QRect(downRect.left(), downRect.top()+1, downRect.width(), downRect.height()-1 );
+ //upRect = TQRect(upRect.left(), upRect.top(), upRect.width(), upRect.height()-1 );
+ downRect = TQRect(downRect.left(), downRect.top()+1, downRect.width(), downRect.height()-1 );
}
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
@@ -4134,7 +4134,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
sflags |= Style_Sunken;
} else
sflags |= Style_Raised;
- if (sw->buttonSymbols() == QSpinWidget::PlusMinus)
+ if (sw->buttonSymbols() == TQSpinWidget::PlusMinus)
pe = PE_SpinWidgetPlus;
else
pe = PE_SpinWidgetUp;
@@ -4147,7 +4147,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
sflags |= Style_Sunken;
} else
sflags |= Style_Raised;
- if (sw->buttonSymbols() == QSpinWidget::PlusMinus)
+ if (sw->buttonSymbols() == TQSpinWidget::PlusMinus)
pe = PE_SpinWidgetMinus;
else
pe = PE_SpinWidgetDown;
@@ -4155,7 +4155,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
drawPrimitive(pe, p, downRect, cg, sflags);
// thin frame around the input area
- const QRect Rcontent = QRect(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
+ const TQRect Rcontent = TQRect(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
r.width()-1-2-handleWidth, r.height()-2);
if (_inputFocusHighlight && hasFocus && enabled)
{
@@ -4193,7 +4193,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
}
-QRect PolyesterStyle::subRect(SubRect r, const QWidget *widget) const
+TQRect PolyesterStyle::subRect(SubRect r, const TQWidget *widget) const
{
switch (r) {
case SR_ComboBoxFocusRect: {
@@ -4203,12 +4203,12 @@ QRect PolyesterStyle::subRect(SubRect r, const QWidget *widget) const
// Don't use KStyles progressbar subrect
// TODO:
case SR_ProgressBarGroove: {
- return QRect(widget->rect());
+ return TQRect(widget->rect());
}
case SR_ProgressBarContents:
case SR_ProgressBarLabel: {
- QRect rw = widget->rect();
- return QRect(rw.left()+2, rw.top()+2, rw.width()-4, rw.height()-4 );
+ TQRect rw = widget->rect();
+ return TQRect(rw.left()+2, rw.top()+2, rw.width()-4, rw.height()-4 );
}
default: {
@@ -4217,22 +4217,22 @@ QRect PolyesterStyle::subRect(SubRect r, const QWidget *widget) const
}
}
-QRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
- const QWidget *widget,
+TQRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
+ const TQWidget *widget,
SubControl subcontrol,
- const QStyleOption &opt) const
+ const TQStyleOption &opt) const
{
if (!widget) {
- return QRect();
+ return TQRect();
}
- QRect r(widget->rect());
+ TQRect r(widget->rect());
switch (control) {
case CC_ComboBox: {
switch (subcontrol) {
case SC_ComboBoxEditField: {
// TODO: is the handler width in pixelmetric?
- return QRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4);
+ return TQRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4);
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
@@ -4245,11 +4245,11 @@ QRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
const bool heightDividable = ((r.height()%2) == 0);
- QSize bs;
+ TQSize bs;
if(heightDividable) {
- bs.setHeight(QMAX(8, (r.height()-2)/2));
+ bs.setHeight(TQMAX(8, (r.height()-2)/2));
} else {
- bs.setHeight(QMAX(8, (r.height()-2-1)/2));
+ bs.setHeight(TQMAX(8, (r.height()-2-1)/2));
}
bs.setWidth(15);
@@ -4257,26 +4257,26 @@ QRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
switch (subcontrol) {
case SC_SpinWidgetUp: {
- return QRect(buttonsLeft, r.top()+1, bs.width(), bs.height() );
+ return TQRect(buttonsLeft, r.top()+1, bs.width(), bs.height() );
}
case SC_SpinWidgetDown: {
if(heightDividable) {
- return QRect(buttonsLeft, r.top()+1+bs.height(),
+ return TQRect(buttonsLeft, r.top()+1+bs.height(),
bs.width(), r.height()-(bs.height()+2) );
} else {
- return QRect(buttonsLeft, r.top()+1+bs.height()+1,
+ return TQRect(buttonsLeft, r.top()+1+bs.height()+1,
bs.width(), r.height()-(bs.height()+2+1) );
}
}
case SC_SpinWidgetFrame: {
- return QRect(r.left(), r.top(), r.width(), r.height() );
+ return TQRect(r.left(), r.top(), r.width(), r.height() );
}
case SC_SpinWidgetEditField: {
- return QRect(r.left()+fw, r.top()+fw,
+ return TQRect(r.left()+fw, r.top()+fw,
r.width()-(bs.width()+1+2*fw), r.height()-2*fw);
}
case SC_SpinWidgetButtonField: {
- return QRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2);
+ return TQRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2);
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
@@ -4290,15 +4290,15 @@ QRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
}
}
-int PolyesterStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
+int PolyesterStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m) {
// TABS
// ----
case PM_TabBarTabVSpace: {
- const QTabBar * tb = (const QTabBar *) widget;
- if (tb->shape() == QTabBar::RoundedAbove ||
- tb->shape() == QTabBar::RoundedBelow)
+ const TQTabBar * tb = (const TQTabBar *) widget;
+ if (tb->shape() == TQTabBar::RoundedAbove ||
+ tb->shape() == TQTabBar::RoundedBelow)
return 12;
else
return 4;
@@ -4307,7 +4307,7 @@ int PolyesterStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
return 1;
}
-#if (QT_VERSION >= 0x030300) // requires Qt 3.3
+#if (TQT_VERSION >= 0x030300) // requires TQt 3.3
// extra space between menubar items
case PM_MenuBarItemSpacing: {
return 5;
@@ -4315,7 +4315,7 @@ int PolyesterStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
#endif
-// #if (QT_VERSION >= 0x030300) // requires Qt 3.3
+// #if (TQT_VERSION >= 0x030300) // requires TQt 3.3
// // extra space between toolbar items
// case PM_ToolBarItemSpacing: {
// return 4;
@@ -4371,7 +4371,7 @@ int PolyesterStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
return 1; //FIXME: change menubar height
case PM_DefaultFrameWidth: {
- if(widget && ::qt_cast<QPopupMenu*>(widget))
+ if(widget && ::tqt_cast<TQPopupMenu*>(widget))
return 1;
else
return 2;
@@ -4396,7 +4396,7 @@ int PolyesterStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
}
-int PolyesterStyle::kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) const
+int PolyesterStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const
{
switch(kpm)
{
@@ -4407,18 +4407,18 @@ int PolyesterStyle::kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) c
}
}
-QSize PolyesterStyle::sizeFromContents(ContentsType t,
- const QWidget *widget,
- const QSize &s,
- const QStyleOption &opt) const
+TQSize PolyesterStyle::sizeFromContents(ContentsType t,
+ const TQWidget *widget,
+ const TQSize &s,
+ const TQStyleOption &opt) const
{
switch (t) {
case CT_PopupMenuItem: {
if (!widget || opt.isDefault())
return s;
- const QPopupMenu *popup = dynamic_cast<const QPopupMenu *>(widget);
- QMenuItem *mi = opt.menuItem();
+ const TQPopupMenu *popup = dynamic_cast<const TQPopupMenu *>(widget);
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = s.width(), h = s.height();
bool checkable = popup->isCheckable();
@@ -4435,14 +4435,14 @@ QSize PolyesterStyle::sizeFromContents(ContentsType t,
h = 3;
} else {
if (mi->pixmap()) {
- h = QMAX(h, mi->pixmap()->height() + 2);
+ h = TQMAX(h, mi->pixmap()->height() + 2);
} else {
- h = QMAX(h, 16 + 2 );
- h = QMAX(h, popup->fontMetrics().height() + _menuItemSpacing );
+ h = TQMAX(h, 16 + 2 );
+ h = TQMAX(h, popup->fontMetrics().height() + _menuItemSpacing );
}
if (mi->iconSet()) {
- h = QMAX(h, mi->iconSet()->pixmap(QIconSet::Small, QIconSet::Normal).height() + 2);
+ h = TQMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height() + 2);
}
}
@@ -4464,24 +4464,24 @@ QSize PolyesterStyle::sizeFromContents(ContentsType t,
w += rightBorder;
- return QSize(w, h);
+ return TQSize(w, h);
}
case CT_PushButton:
{
- const QPushButton* btn = static_cast<const QPushButton*>(widget);
+ const TQPushButton* btn = static_cast<const TQPushButton*>(widget);
int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget);
int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget);
- if ( btn->text().isEmpty() && s.width() < 32 ) return QSize(w, h);
+ if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h);
- return QSize( w+25, h+5 );
+ return TQSize( w+25, h+5 );
}
case CT_ToolButton:
{
- if(widget->parent() && ::qt_cast<QToolBar*>(widget->parent()) )
- return QSize( s.width()+2*4, s.height()+2*4 );
+ if(widget->parent() && ::tqt_cast<TQToolBar*>(widget->parent()) )
+ return TQSize( s.width()+2*4, s.height()+2*4 );
else
return KStyle::sizeFromContents (t, widget, s, opt);
}
@@ -4494,33 +4494,33 @@ QSize PolyesterStyle::sizeFromContents(ContentsType t,
}
int PolyesterStyle::styleHint( StyleHint stylehint,
- const QWidget *widget,
- const QStyleOption &option,
- QStyleHintReturn* returnData ) const
+ const TQWidget *widget,
+ const TQStyleOption &option,
+ TQStyleHintReturn* returnData ) const
{
switch (stylehint) {
case SH_PopupMenu_SubMenuPopupDelay:
return 96; // Motif-like delay...
- case QStyle::SH_TabBar_Alignment:
+ case TQStyle::SH_TabBar_Alignment:
/*if reverseLayout is enabled, the centering of tabs
is disabled, due to a bug in rendering*/
- if (_centeredTabBar && !QApplication::reverseLayout())
- return Qt::AlignHCenter;
+ if (_centeredTabBar && !TQApplication::reverseLayout())
+ return TQt::AlignHCenter;
//Suggestion by Daniel Molkentin,
- //algorithm from QT4 QWindowsXPStyle Copyright 2006 Trolltech
-//this exists since Qt3.2
-#if (QT_VERSION >= 0x030200)
+ //algorithm from QT4 TQWindowsXPStyle Copyright 2006 Trolltech
+//this exists since TQt3.2
+#if (TQT_VERSION >= 0x030200)
case SH_LineEdit_PasswordCharacter:
{
if (widget)
{
- const QFontMetrics &fm = widget->fontMetrics();
- if (fm.inFont(QChar(0x25CF)))
+ const TQFontMetrics &fm = widget->fontMetrics();
+ if (fm.inFont(TQChar(0x25CF)))
{
return 0x25CF;
}
- else if (fm.inFont(QChar(0x2022)))
+ else if (fm.inFont(TQChar(0x2022)))
{
return 0x2022;
}
@@ -4536,7 +4536,7 @@ int PolyesterStyle::styleHint( StyleHint stylehint,
}
}
-bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
+bool PolyesterStyle::eventFilter(TQObject *obj, TQEvent *ev)
{
if (KStyle::eventFilter(obj, ev) )
@@ -4545,23 +4545,23 @@ bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
if (!obj->isWidgetType() ) return false;
//header mouse over
- if ( ::qt_cast<QHeader*>(obj) ) {
- QWidget* widget = static_cast<QWidget*>(obj);
- if ((ev->type() == QEvent::Leave) && static_cast<QWidget*>(obj)->isEnabled())
+ if ( ::tqt_cast<TQHeader*>(obj) ) {
+ TQWidget* widget = static_cast<TQWidget*>(obj);
+ if ((ev->type() == TQEvent::Leave) && static_cast<TQWidget*>(obj)->isEnabled())
{
hoverWidget = 0;
hoverHeaderId = -1;
widget->repaint(false);
}
- else if ((ev->type() == QEvent::MouseMove) && static_cast<QWidget*>(obj)->isEnabled())
+ else if ((ev->type() == TQEvent::MouseMove) && static_cast<TQWidget*>(obj)->isEnabled())
{
- QMouseEvent * mEvent = ( QMouseEvent * ) ev;
- QHeader* header = static_cast<QHeader*>(widget);
+ TQMouseEvent * mEvent = ( TQMouseEvent * ) ev;
+ TQHeader* header = static_cast<TQHeader*>(widget);
hoverWidget = widget;
int tempHover = hoverHeaderId;
- if( header->orientation()==Qt::Horizontal )
+ if( header->orientation()==TQt::Horizontal )
hoverHeaderId = header->sectionAt( mEvent->x()+header->offset() );
else
hoverHeaderId = header->sectionAt( mEvent->y()+header->offset() );
@@ -4571,54 +4571,54 @@ bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
}
}
/*Scrollbar Mouse over*/
- if ( ::qt_cast<QScrollBar*>(obj) ) {
- QWidget* widget = static_cast<QWidget*>(obj);
+ if ( ::tqt_cast<TQScrollBar*>(obj) ) {
+ TQWidget* widget = static_cast<TQWidget*>(obj);
- if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled())
+ if ((ev->type() == TQEvent::Enter) && static_cast<TQWidget*>(obj)->isEnabled())
{
hoverWidget = widget;
widget->repaint(false);
}
- else if ((ev->type() == QEvent::Leave) && static_cast<QWidget*>(obj)->isEnabled())
+ else if ((ev->type() == TQEvent::Leave) && static_cast<TQWidget*>(obj)->isEnabled())
{
hoverWidget = 0;
widget->repaint(false);
}
}
// focus highlight
- if ( ::qt_cast<QLineEdit*>(obj) ) {
- QWidget* widget = static_cast<QWidget*>(obj);
+ if ( ::tqt_cast<TQLineEdit*>(obj) ) {
+ TQWidget* widget = static_cast<TQWidget*>(obj);
- if ( ::qt_cast<QSpinWidget*>(widget->parentWidget()) )
+ if ( ::tqt_cast<TQSpinWidget*>(widget->parentWidget()) )
{
- QWidget* spinbox = widget->parentWidget();
- if ((ev->type() == QEvent::FocusIn) || (ev->type() == QEvent::FocusOut))
+ TQWidget* spinbox = widget->parentWidget();
+ if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
{
spinbox->repaint(false);
}
return false;
}
- if ((ev->type() == QEvent::FocusIn) || (ev->type() == QEvent::FocusOut))
+ if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
{
widget->repaint(false);
}
return false;
}
- //Hover highlight... use qt_cast to check if the widget inheits one of the classes.
- if ( ::qt_cast<QPushButton*>(obj) || ::qt_cast<QComboBox*>(obj) ||
- ::qt_cast<QSpinWidget*>(obj) || ::qt_cast<QCheckBox*>(obj) ||
- ::qt_cast<QRadioButton*>(obj) || ::qt_cast<QToolButton*>(obj) || obj->inherits("QSplitterHandle") )
+ //Hover highlight... use tqt_cast to check if the widget inheits one of the classes.
+ if ( ::tqt_cast<TQPushButton*>(obj) || ::tqt_cast<TQComboBox*>(obj) ||
+ ::tqt_cast<TQSpinWidget*>(obj) || ::tqt_cast<TQCheckBox*>(obj) ||
+ ::tqt_cast<TQRadioButton*>(obj) || ::tqt_cast<TQToolButton*>(obj) || obj->inherits("TQSplitterHandle") )
{
- if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled())
+ if ((ev->type() == TQEvent::Enter) && static_cast<TQWidget*>(obj)->isEnabled())
{
- QWidget* button = static_cast<QWidget*>(obj);
+ TQWidget* button = static_cast<TQWidget*>(obj);
hoverWidget = button;
//only animate widgets that support animation :-)
- if(_animateButton && !::qt_cast<QRadioButton*>(obj)
- && !::qt_cast<QCheckBox*>(obj)){
+ if(_animateButton && !::tqt_cast<TQRadioButton*>(obj)
+ && !::tqt_cast<TQCheckBox*>(obj)){
animWidgets[button].active = true;
// if timer isn't running, start it now for glow-in animation.
if( !btnAnimTimer->isActive() )
@@ -4627,14 +4627,14 @@ bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
button->repaint(false);
}
- else if ((ev->type() == QEvent::Leave) && (obj == hoverWidget) )
+ else if ((ev->type() == TQEvent::Leave) && (obj == hoverWidget) )
{
- QWidget* button = static_cast<QWidget*>(obj);
+ TQWidget* button = static_cast<TQWidget*>(obj);
hoverWidget = 0;
//only animate widgets that support animation :-)
- if(_animateButton && !::qt_cast<QRadioButton*>(obj)
- && !::qt_cast<QCheckBox*>(obj)){
+ if(_animateButton && !::tqt_cast<TQRadioButton*>(obj)
+ && !::tqt_cast<TQCheckBox*>(obj)){
animWidgets[button].active = false;
// if timer isn't running, start it now for glow-out animation.
if( !btnAnimTimer->isActive() )
@@ -4645,18 +4645,18 @@ bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
}
return false;
}
- if ( ::qt_cast<QTabBar*>(obj) ) {
- if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled())
+ if ( ::tqt_cast<TQTabBar*>(obj) ) {
+ if ((ev->type() == TQEvent::Enter) && static_cast<TQWidget*>(obj)->isEnabled())
{
- QWidget* tabbar = static_cast<QWidget*>(obj);
+ TQWidget* tabbar = static_cast<TQWidget*>(obj);
hoverWidget = tabbar;
hoverTab = 0;
tabbar->repaint(false);
}
- else if (ev->type() == QEvent::MouseMove)
+ else if (ev->type() == TQEvent::MouseMove)
{
- QTabBar *tabbar = dynamic_cast<QTabBar*>(obj);
- QMouseEvent *me = dynamic_cast<QMouseEvent*>(ev);
+ TQTabBar *tabbar = dynamic_cast<TQTabBar*>(obj);
+ TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(ev);
if (tabbar && me) {
// avoid unnecessary repaints (which otherwise would occour on every
@@ -4664,7 +4664,7 @@ bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
bool repaint = true;
- QTab *tab = tabbar->selectTab(me->pos() );
+ TQTab *tab = tabbar->selectTab(me->pos() );
if (hoverTab == tab)
repaint = false;
hoverTab = tab;
@@ -4673,9 +4673,9 @@ bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
tabbar->repaint(false);
}
}
- else if (ev->type() == QEvent::Leave)
+ else if (ev->type() == TQEvent::Leave)
{
- QWidget* tabbar = static_cast<QWidget*>(obj);
+ TQWidget* tabbar = static_cast<TQWidget*>(obj);
hoverWidget = 0;
hoverTab = 0;
tabbar->repaint(false);
@@ -4683,30 +4683,30 @@ bool PolyesterStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
// Track show events for progress bars
- if ( _animateProgressBar && ::qt_cast<QProgressBar*>(obj) )
+ if ( _animateProgressBar && ::tqt_cast<TQProgressBar*>(obj) )
{
- if ((ev->type() == QEvent::Show) && !animationTimer->isActive())
+ if ((ev->type() == TQEvent::Show) && !animationTimer->isActive())
{
animationTimer->start( 50, false );
}
}
if ( !qstrcmp(obj->name(), "kde toolbar widget") )
{
- QWidget* lb = static_cast<QWidget*>(obj);
- if (lb->backgroundMode() == Qt::PaletteButton)
- lb->setBackgroundMode(Qt::PaletteBackground);
+ TQWidget* lb = static_cast<TQWidget*>(obj);
+ if (lb->backgroundMode() == TQt::PaletteButton)
+ lb->setBackgroundMode(TQt::PaletteBackground);
lb->removeEventFilter(this);
}
return false;
}
-QColor PolyesterStyle::getColor(const QColorGroup &cg, const ColorType t, const bool enabled)const
+TQColor PolyesterStyle::getColor(const TQColorGroup &cg, const ColorType t, const bool enabled)const
{
return getColor(cg, t, enabled?IsEnabled:IsDisabled);
}
-QColor PolyesterStyle::getColor(const QColorGroup &cg, const ColorType t, const WidgetState s)const
+TQColor PolyesterStyle::getColor(const TQColorGroup &cg, const ColorType t, const WidgetState s)const
{
const bool enabled = (s != IsDisabled) &&
((s == IsEnabled) || (s == IsPressed) || (s == IsHighlighted));
diff --git a/style/polyester.h b/style/polyester.h
index 26ad080..a4a93d8 100755
--- a/style/polyester.h
+++ b/style/polyester.h
@@ -45,97 +45,97 @@
#define __POLYESTER_H
#include <kstyle.h>
-#include <qbitmap.h>
-#include <qintcache.h>
+#include <tqbitmap.h>
+#include <tqintcache.h>
#define u_arrow -4,1, 2,1, -3,0, 1,0, -2,-1, 0,-1, -1,-2
#define d_arrow -4,-2, 2,-2, -3,-1, 1,-1, -2,0, 0,0, -1,1
#define l_arrow 0,-3, 0,3,-1,-2,-1,2,-2,-1,-2,1,-3,0
#define r_arrow -2,-3,-2,3,-1,-2, -1,2,0,-1,0,1,1,0
-#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
+#define TQCOORDARRLEN(x) sizeof(x)/(sizeof(TQCOORD)*2)
-class QSettings;
-class QTab;
-class QTimer;
+class TQSettings;
+class TQTab;
+class TQTimer;
//a tiny reimplementation of max...
int max(int a, int b){return (a>b?a:b);}
class PolyesterStyle : public KStyle
{
- Q_OBJECT
+ TQ_OBJECT
public:
PolyesterStyle();
virtual ~PolyesterStyle();
- void polish(QApplication* app );
- void polish(QWidget* widget );
- void unPolish(QWidget* widget );
+ void polish(TQApplication* app );
+ void polish(TQWidget* widget );
+ void unPolish(TQWidget* widget );
void drawKStylePrimitive(KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive(PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption &opt = QStyleOption::Default ) const;
+ const TQStyleOption &opt = TQStyleOption::Default ) const;
void drawControl(ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
- void drawControlMask( ControlElement, QPainter *, const QWidget *, const QRect &, const QStyleOption &) const;
+ void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
void drawComplexControl(ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
int pixelMetric(PixelMetric m,
- const QWidget *widget = 0 ) const;
+ const TQWidget *widget = 0 ) const;
- int kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) const;
+ int kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const;
- QRect subRect(SubRect r,
- const QWidget *widget ) const;
+ TQRect subRect(SubRect r,
+ const TQWidget *widget ) const;
- QRect querySubControlMetrics(ComplexControl control,
- const QWidget *widget,
+ TQRect querySubControlMetrics(ComplexControl control,
+ const TQWidget *widget,
SubControl subcontrol,
- const QStyleOption &opt = QStyleOption::Default ) const;
+ const TQStyleOption &opt = TQStyleOption::Default ) const;
- void drawComplexControlMask(QStyle::ComplexControl c,
- QPainter *p,
- const QWidget *w,
- const QRect &r,
- const QStyleOption &o=QStyleOption::Default) const;
+ void drawComplexControlMask(TQStyle::ComplexControl c,
+ TQPainter *p,
+ const TQWidget *w,
+ const TQRect &r,
+ const TQStyleOption &o=TQStyleOption::Default) const;
- QSize sizeFromContents(QStyle::ContentsType t,
- const QWidget *w,
- const QSize &s,
- const QStyleOption &o) const;
+ TQSize sizeFromContents(TQStyle::ContentsType t,
+ const TQWidget *w,
+ const TQSize &s,
+ const TQStyleOption &o) const;
- int styleHint(StyleHint, const QWidget * = 0,
- const QStyleOption & = QStyleOption::Default,
- QStyleHintReturn * = 0 ) const;
+ int styleHint(StyleHint, const TQWidget * = 0,
+ const TQStyleOption & = TQStyleOption::Default,
+ TQStyleHintReturn * = 0 ) const;
protected:
enum TabPosition
@@ -205,39 +205,39 @@ protected:
Sharp_BottomRight = 0x00200000
};
- void renderContour(QPainter *p,
- const QRect &r,
- const QColor &backgroundColor,
- const QColor &contourColor,
+ void renderContour(TQPainter *p,
+ const TQRect &r,
+ const TQColor &backgroundColor,
+ const TQColor &contourColor,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
- void renderMask(QPainter *p,
- const QRect &r,
- const QColor &color,
+ void renderMask(TQPainter *p,
+ const TQRect &r,
+ const TQColor &color,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
- void renderSurface(QPainter *p,
- const QRect &r,
- const QColor &backgroundColor,
- const QColor &buttonColor,
- const QColor &highlightColor,
+ void renderSurface(TQPainter *p,
+ const TQRect &r,
+ const TQColor &backgroundColor,
+ const TQColor &buttonColor,
+ const TQColor &highlightColor,
int intensity = 5,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight|
Is_Horizontal) const;
- inline void renderPixel(QPainter *p,
- const QPoint &pos,
+ inline void renderPixel(TQPainter *p,
+ const TQPoint &pos,
const int alpha,
- const QColor &color,
- const QColor &background = QColor(),
+ const TQColor &color,
+ const TQColor &background = TQColor(),
bool fullAlphaBlend = true) const;
- void renderButton(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+ void renderButton(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
bool sunken = false,
bool mouseOver = false,
bool horizontal = true,
@@ -246,27 +246,27 @@ protected:
int animFrame = 0,
bool isDefault = false) const;
- void renderPanel(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+ void renderPanel(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
const bool pseudo3d = true,
const bool sunken = true) const;
- void renderDot(QPainter *p,
- const QPoint &point,
- const QColor &baseColor,
+ void renderDot(TQPainter *p,
+ const TQPoint &point,
+ const TQColor &baseColor,
const bool thick = false,
const bool sunken = false) const;
- void renderGradient(QPainter *p,
- const QRect &r,
- const QColor &c1,
- const QColor &c2,
+ void renderGradient(TQPainter *p,
+ const TQRect &r,
+ const TQColor &c1,
+ const TQColor &c2,
bool horizontal = true) const;
- void renderTab(QPainter *p,
- const QRect &r,
- const QColorGroup &g,
+ void renderTab(TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &g,
bool mouseOver = false,
const SelectedTab selected = OtherTab,
const bool bottom = false,
@@ -274,29 +274,29 @@ protected:
const bool triangular = false,
bool cornerWidget = false) const;
- virtual void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup& cg,
- const QPopupMenu* popup ) const;
+ virtual void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup& cg,
+ const TQPopupMenu* popup ) const;
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
// what widget has mouse over him?
- QWidget* hoverWidget;
+ TQWidget* hoverWidget;
// mouse over for listview headers
int hoverHeaderId;
protected slots:
- void khtmlWidgetDestroyed(QObject* w);
+ void khtmlWidgetDestroyed(TQObject* w);
void sliderThumbMoved(int val);
//Animation slots.
void updateProgressPos();
- void progressBarDestroyed(QObject* bar);
- void animWidgetDestroyed(QObject* w);
+ void progressBarDestroyed(TQObject* bar);
+ void animWidgetDestroyed(TQObject* w);
void animate();
- inline QColor getColor(const QColorGroup &cg, const ColorType t, const bool enabled = true)const;
- inline QColor getColor(const QColorGroup &cg, const ColorType t, const WidgetState s)const;
+ inline TQColor getColor(const TQColorGroup &cg, const ColorType t, const bool enabled = true)const;
+ inline TQColor getColor(const TQColorGroup &cg, const ColorType t, const WidgetState s)const;
private:
// Disable copy constructor and = operator
PolyesterStyle( const PolyesterStyle & );
@@ -309,7 +309,7 @@ private:
int _contrast;
bool _scrollBarLines;
- QString _scrollBarStyle;
+ TQString _scrollBarStyle;
int _scrollBarExtent;
KStyle::KStyleScrollBarType _scrollBarType;
bool _useLowerCaseText;
@@ -328,7 +328,7 @@ private:
bool _menuBarEmphasisBorder;
bool _customMenuBarEmphasisColor;
bool _menuStripe;
- QColor _menuBarEmphasisColor;
+ TQColor _menuBarEmphasisColor;
bool _shadowedMenuBarText;
bool _shadowedButtonsText;
bool _drawToolBarSeparator;
@@ -339,18 +339,18 @@ private:
bool _customOverHighlightColor;
bool _customFocusHighlightColor;
bool _customCheckMarkColor;
- QColor _overHighlightColor;
- QColor _focusHighlightColor;
- QColor _checkMarkColor;
- QString _buttonStyle;
+ TQColor _overHighlightColor;
+ TQColor _focusHighlightColor;
+ TQColor _checkMarkColor;
+ TQString _buttonStyle;
- QTab *hoverTab;
+ TQTab *hoverTab;
// track khtml widgets.
- QMap<const QWidget*,bool> khtmlWidgets;
+ TQMap<const TQWidget*,bool> khtmlWidgets;
//Animation support.
- QMap<QWidget*, int> progAnimWidgets;
+ TQMap<TQWidget*, int> progAnimWidgets;
// pixmap cache.
enum CacheEntryType {
@@ -363,14 +363,14 @@ private:
CacheEntryType type;
int width;
int height;
- QRgb c1Rgb;
- QRgb c2Rgb;
+ TQRgb c1Rgb;
+ TQRgb c2Rgb;
bool horizontal;
- QPixmap* pixmap;
+ TQPixmap* pixmap;
- CacheEntry(CacheEntryType t, int w, int h, QRgb c1, QRgb c2 = 0,
- bool hor = false, QPixmap* p = 0 ):
+ CacheEntry(CacheEntryType t, int w, int h, TQRgb c1, TQRgb c2 = 0,
+ bool hor = false, TQPixmap* p = 0 ):
type(t), width(w), height(h), c1Rgb(c1), c2Rgb(c2), horizontal(hor), pixmap(p)
{}
@@ -381,7 +381,7 @@ private:
int key()
{
- // create an int key from the properties which is used to refer to entries in the QIntCache.
+ // create an int key from the properties which is used to refer to entries in the TQIntCache.
// the result may not be 100% correct as we don't have so much space in one integer -- use
// == operator after find to make sure we got the right one. :)
return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22);
@@ -396,43 +396,43 @@ private:
(c1Rgb == other.c1Rgb) &&
(horizontal = other.horizontal);
// if(!match) {
-// qDebug("operator ==: CacheEntries don't match!");
-// qDebug("width: %d\t\tother width: %d", width, other.width);
-// qDebug("height: %d\t\tother height: %d", height, other.height);
-// qDebug("fgRgb: %d\t\tother fgRgb: %d", fgRgb, other.fgRgb);
-// qDebug("bgRgb: %d\t\tother bgRgb: %d", bgRgb, other.bgRgb);
-// qDebug("surfaceFlags: %d\t\tother surfaceFlags: %d", surfaceFlags, other.surfaceFlags);
+// tqDebug("operator ==: CacheEntries don't match!");
+// tqDebug("width: %d\t\tother width: %d", width, other.width);
+// tqDebug("height: %d\t\tother height: %d", height, other.height);
+// tqDebug("fgRgb: %d\t\tother fgRgb: %d", fgRgb, other.fgRgb);
+// tqDebug("bgRgb: %d\t\tother bgRgb: %d", bgRgb, other.bgRgb);
+// tqDebug("surfaceFlags: %d\t\tother surfaceFlags: %d", surfaceFlags, other.surfaceFlags);
// }
return match;
}
};
- QIntCache<CacheEntry> *pixmapCache;
+ TQIntCache<CacheEntry> *pixmapCache;
// For renderFocusRect
- mutable QBitmap *verticalDots;
- mutable QBitmap *horizontalDots;
+ mutable TQBitmap *verticalDots;
+ mutable TQBitmap *horizontalDots;
// For KPE_ListViewBranch
- mutable QBitmap *verticalLine;
- mutable QBitmap *horizontalLine;
+ mutable TQBitmap *verticalLine;
+ mutable TQBitmap *horizontalLine;
// For buttons animation
struct AnimInfo {
bool active;
uint animFrame;
};
- typedef QMap<QWidget*, AnimInfo>AnimWidgetMap;
+ typedef TQMap<TQWidget*, AnimInfo>AnimWidgetMap;
AnimWidgetMap animWidgets;
- QTimer *btnAnimTimer;
+ TQTimer *btnAnimTimer;
- typedef QMap<const QWidget*, int>SliderValuesMap;
+ typedef TQMap<const TQWidget*, int>SliderValuesMap;
SliderValuesMap sliderValues;
// For progress bar animation
- QTimer *animationTimer;
+ TQTimer *animationTimer;
//for the semi transparent menu stripe
- QImage *alphaStripe;
+ TQImage *alphaStripe;
};
#endif // __POLYESTER_H