summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2024-03-10 19:56:27 +0200
committerMavridis Philippe <[email protected]>2024-03-10 20:04:10 +0200
commitdb5c38267db65110beb4ad895a1fe38b42d8001f (patch)
tree66e0eb45b6db27d468589aa56b089408600baf77 /client
parentbf8023245ca81129b27778d9e38f4cbdcdd1dc5b (diff)
downloadtde-style-polyester-db5c38267db65110beb4ad895a1fe38b42d8001f.tar.gz
tde-style-polyester-db5c38267db65110beb4ad895a1fe38b42d8001f.zip
Port to TQt
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'client')
-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
25 files changed, 420 insertions, 420 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_;