Port to TQt

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/3/head
Mavridis Philippe 3 months ago
parent bf8023245c
commit db5c38267d
No known key found for this signature in database
GPG Key ID: 93F66F98F906147D

@ -11,179 +11,179 @@
#include "configdialog.h" #include "configdialog.h"
#include <qvariant.h> #include <tqvariant.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
/* /*
* Constructs a ConfigDialog as a child of 'parent', with the * Constructs a ConfigDialog as a child of 'parent', with the
* name 'name' and widget flags set to 'f'. * name 'name' and widget flags set to 'f'.
*/ */
ConfigDialog::ConfigDialog( QWidget* parent, const char* name, WFlags fl ) ConfigDialog::ConfigDialog( TQWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl ) : TQWidget( parent, name, fl )
{ {
if ( !name ) if ( !name )
setName( "ConfigDialog" ); setName( "ConfigDialog" );
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) ); setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
ConfigDialogLayout = new QVBoxLayout( this, 0, 6, "ConfigDialogLayout"); ConfigDialogLayout = new TQVBoxLayout( this, 0, 6, "ConfigDialogLayout");
tabWidget3 = new QTabWidget( this, "tabWidget3" ); tabWidget3 = new TQTabWidget( this, "tabWidget3" );
tab = new QWidget( tabWidget3, "tab" ); tab = new TQWidget( tabWidget3, "tab" );
tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout"); tabLayout = new TQGridLayout( tab, 1, 1, 11, 6, "tabLayout");
titlesize = new QSpinBox( tab, "titlesize" ); titlesize = new TQSpinBox( tab, "titlesize" );
titlesize->setMaxValue( 64 ); titlesize->setMaxValue( 64 );
titlesize->setMinValue( 16 ); titlesize->setMinValue( 16 );
tabLayout->addWidget( titlesize, 1, 2 ); tabLayout->addWidget( titlesize, 1, 2 );
framesize = new QSpinBox( tab, "framesize" ); framesize = new TQSpinBox( tab, "framesize" );
framesize->setMaxValue( 64 ); framesize->setMaxValue( 64 );
framesize->setMinValue( 1 ); framesize->setMinValue( 1 );
framesize->setValue( 4 ); framesize->setValue( 4 );
tabLayout->addWidget( framesize, 2, 2 ); tabLayout->addWidget( framesize, 2, 2 );
titleshadow = new QCheckBox( tab, "titleshadow" ); titleshadow = new TQCheckBox( tab, "titleshadow" );
titleshadow->setChecked( TRUE ); titleshadow->setChecked( TRUE );
tabLayout->addWidget( titleshadow, 3, 2 ); tabLayout->addWidget( titleshadow, 3, 2 );
roundCorners = new QCheckBox( tab, "roundCorners" ); roundCorners = new TQCheckBox( tab, "roundCorners" );
roundCorners->setChecked( TRUE ); roundCorners->setChecked( TRUE );
tabLayout->addWidget( roundCorners, 4, 2 ); tabLayout->addWidget( roundCorners, 4, 2 );
titleBarStyle = new QComboBox( FALSE, tab, "titleBarStyle" ); titleBarStyle = new TQComboBox( FALSE, tab, "titleBarStyle" );
tabLayout->addWidget( titleBarStyle, 5, 2 ); tabLayout->addWidget( titleBarStyle, 5, 2 );
textLabel1_4 = new QLabel( tab, "textLabel1_4" ); textLabel1_4 = new TQLabel( tab, "textLabel1_4" );
textLabel1_4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); textLabel1_4->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout->addWidget( textLabel1_4, 5, 1 ); tabLayout->addWidget( textLabel1_4, 5, 1 );
textLabel1_2 = new QLabel( tab, "textLabel1_2" ); textLabel1_2 = new TQLabel( tab, "textLabel1_2" );
textLabel1_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); textLabel1_2->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout->addWidget( textLabel1_2, 2, 1 ); tabLayout->addWidget( textLabel1_2, 2, 1 );
textLabel1 = new QLabel( tab, "textLabel1" ); textLabel1 = new TQLabel( tab, "textLabel1" );
textLabel1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); textLabel1->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout->addWidget( textLabel1, 1, 1 ); tabLayout->addWidget( textLabel1, 1, 1 );
textLabel1_3 = new QLabel( tab, "textLabel1_3" ); textLabel1_3 = new TQLabel( tab, "textLabel1_3" );
textLabel1_3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); textLabel1_3->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout->addMultiCellWidget( textLabel1_3, 0, 0, 0, 1 ); 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 ); 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 ); tabLayout->addItem( spacer4, 2, 3 );
titlealign = new QButtonGroup( tab, "titlealign" ); titlealign = new TQButtonGroup( tab, "titlealign" );
titlealign->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, titlealign->sizePolicy().hasHeightForWidth() ) ); titlealign->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, titlealign->sizePolicy().hasHeightForWidth() ) );
titlealign->setLineWidth( 0 ); titlealign->setLineWidth( 0 );
titlealign->setColumnLayout(0, Qt::Vertical ); titlealign->setColumnLayout(0, TQt::Vertical );
titlealign->layout()->setSpacing( 6 ); titlealign->layout()->setSpacing( 6 );
titlealign->layout()->setMargin( 0 ); titlealign->layout()->setMargin( 0 );
titlealignLayout = new QHBoxLayout( titlealign->layout() ); titlealignLayout = new TQHBoxLayout( titlealign->layout() );
titlealignLayout->setAlignment( Qt::AlignTop ); titlealignLayout->setAlignment( TQt::AlignTop );
AlignLeft = new QRadioButton( titlealign, "AlignLeft" ); AlignLeft = new TQRadioButton( titlealign, "AlignLeft" );
titlealignLayout->addWidget( AlignLeft ); titlealignLayout->addWidget( AlignLeft );
AlignHCenter = new QRadioButton( titlealign, "AlignHCenter" ); AlignHCenter = new TQRadioButton( titlealign, "AlignHCenter" );
AlignHCenter->setChecked( TRUE ); AlignHCenter->setChecked( TRUE );
titlealignLayout->addWidget( AlignHCenter ); titlealignLayout->addWidget( AlignHCenter );
AlignRight = new QRadioButton( titlealign, "AlignRight" ); AlignRight = new TQRadioButton( titlealign, "AlignRight" );
titlealignLayout->addWidget( AlignRight ); titlealignLayout->addWidget( AlignRight );
tabLayout->addWidget( titlealign, 0, 2 ); tabLayout->addWidget( titlealign, 0, 2 );
tabWidget3->insertTab( tab, QString::fromLatin1("") ); tabWidget3->insertTab( tab, TQString::fromLatin1("") );
tab_2 = new QWidget( tabWidget3, "tab_2" ); tab_2 = new TQWidget( tabWidget3, "tab_2" );
tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2");
textLabel1_5 = new QLabel( tab_2, "textLabel1_5" ); textLabel1_5 = new TQLabel( tab_2, "textLabel1_5" );
textLabel1_5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); textLabel1_5->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout_2->addWidget( textLabel1_5, 1, 0 ); 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 ); tabLayout_2->addWidget( buttonStyle, 1, 1 );
textLabel4 = new QLabel( tab_2, "textLabel4" ); textLabel4 = new TQLabel( tab_2, "textLabel4" );
textLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, textLabel4->sizePolicy().hasHeightForWidth() ) ); textLabel4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, textLabel4->sizePolicy().hasHeightForWidth() ) );
textLabel4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); textLabel4->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
tabLayout_2->addWidget( textLabel4, 0, 0 ); tabLayout_2->addWidget( textLabel4, 0, 0 );
buttonsize = new QSpinBox( tab_2, "buttonsize" ); buttonsize = new TQSpinBox( tab_2, "buttonsize" );
buttonsize->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, buttonsize->sizePolicy().hasHeightForWidth() ) ); buttonsize->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, buttonsize->sizePolicy().hasHeightForWidth() ) );
buttonsize->setButtonSymbols( QSpinBox::UpDownArrows ); buttonsize->setButtonSymbols( TQSpinBox::UpDownArrows );
buttonsize->setMaxValue( 64 ); buttonsize->setMaxValue( 64 );
buttonsize->setMinValue( 1 ); buttonsize->setMinValue( 1 );
buttonsize->setValue( 16 ); buttonsize->setValue( 16 );
tabLayout_2->addWidget( buttonsize, 0, 1 ); tabLayout_2->addWidget( buttonsize, 0, 1 );
animatebuttons = new QCheckBox( tab_2, "animatebuttons" ); animatebuttons = new TQCheckBox( tab_2, "animatebuttons" );
animatebuttons->setEnabled( TRUE ); animatebuttons->setEnabled( TRUE );
animatebuttons->setChecked( TRUE ); animatebuttons->setChecked( TRUE );
tabLayout_2->addWidget( animatebuttons, 2, 1 ); tabLayout_2->addWidget( animatebuttons, 2, 1 );
layout11 = new QHBoxLayout( 0, 0, 6, "layout11"); layout11 = new TQHBoxLayout( 0, 0, 6, "layout11");
spacer3 = new QSpacerItem( 30, 20, QSizePolicy::Maximum, QSizePolicy::Minimum ); spacer3 = new TQSpacerItem( 30, 20, TQSizePolicy::Maximum, TQSizePolicy::Minimum );
layout11->addItem( spacer3 ); layout11->addItem( spacer3 );
textLabel2 = new QLabel( tab_2, "textLabel2" ); textLabel2 = new TQLabel( tab_2, "textLabel2" );
layout11->addWidget( textLabel2 ); layout11->addWidget( textLabel2 );
btnComboBox = new QComboBox( FALSE, tab_2, "btnComboBox" ); btnComboBox = new TQComboBox( FALSE, tab_2, "btnComboBox" );
btnComboBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, btnComboBox->sizePolicy().hasHeightForWidth() ) ); btnComboBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, btnComboBox->sizePolicy().hasHeightForWidth() ) );
layout11->addWidget( btnComboBox ); layout11->addWidget( btnComboBox );
tabLayout_2->addLayout( layout11, 3, 1 ); tabLayout_2->addLayout( layout11, 3, 1 );
squareButton = new QCheckBox( tab_2, "squareButton" ); squareButton = new TQCheckBox( tab_2, "squareButton" );
squareButton->setChecked( TRUE ); squareButton->setChecked( TRUE );
tabLayout_2->addMultiCellWidget( squareButton, 4, 4, 1, 2 ); 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 ); tabLayout_2->addMultiCellWidget( lightBorder, 5, 5, 1, 2 );
nomodalbuttons = new QCheckBox( tab_2, "nomodalbuttons" ); nomodalbuttons = new TQCheckBox( tab_2, "nomodalbuttons" );
nomodalbuttons->setChecked( TRUE ); nomodalbuttons->setChecked( TRUE );
tabLayout_2->addWidget( nomodalbuttons, 6, 1 ); tabLayout_2->addWidget( nomodalbuttons, 6, 1 );
menuClose = new QCheckBox( tab_2, "menuClose" ); menuClose = new TQCheckBox( tab_2, "menuClose" );
menuClose->setEnabled( TRUE ); menuClose->setEnabled( TRUE );
tabLayout_2->addMultiCellWidget( menuClose, 7, 7, 1, 2 ); 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 ); tabLayout_2->addItem( spacer3_3, 1, 2 );
tabWidget3->insertTab( tab_2, QString::fromLatin1("") ); tabWidget3->insertTab( tab_2, TQString::fromLatin1("") );
ConfigDialogLayout->addWidget( tabWidget3 ); ConfigDialogLayout->addWidget( tabWidget3 );
languageChange(); languageChange();
resize( QSize(388, 265).expandedTo(minimumSizeHint()) ); resize( TQSize(388, 265).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
// signals and slots connections // signals and slots connections
@ -208,7 +208,7 @@ ConfigDialog::ConfigDialog( QWidget* parent, const char* name, WFlags fl )
*/ */
ConfigDialog::~ConfigDialog() 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->setSuffix( tr2i18n( " pixels" ) );
framesize->setSpecialValueText( tr2i18n( "1 pixel" ) ); framesize->setSpecialValueText( tr2i18n( "1 pixel" ) );
titleshadow->setText( tr2i18n( "&Use shadowed text" ) ); titleshadow->setText( tr2i18n( "&Use shadowed text" ) );
titleshadow->setAccel( QKeySequence( tr2i18n( "Alt+U" ) ) ); titleshadow->setAccel( TQKeySequence( 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." ) ); 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->setText( tr2i18n( "R&ound top corners" ) );
roundCorners->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) ); roundCorners->setAccel( TQKeySequence( tr2i18n( "Alt+O" ) ) );
titleBarStyle->clear(); titleBarStyle->clear();
titleBarStyle->insertItem( tr2i18n( "Gradients" ) ); titleBarStyle->insertItem( tr2i18n( "Gradients" ) );
titleBarStyle->insertItem( tr2i18n( "Glass" ) ); titleBarStyle->insertItem( tr2i18n( "Glass" ) );
@ -233,16 +233,16 @@ void ConfigDialog::languageChange()
textLabel1_2->setText( tr2i18n( "Frame width:" ) ); textLabel1_2->setText( tr2i18n( "Frame width:" ) );
textLabel1->setText( tr2i18n( "Title height:" ) ); textLabel1->setText( tr2i18n( "Title height:" ) );
textLabel1_3->setText( tr2i18n( "Text alignment:" ) ); textLabel1_3->setText( tr2i18n( "Text alignment:" ) );
titlealign->setTitle( QString::null ); titlealign->setTitle( TQString::null );
AlignLeft->setText( tr2i18n( "L&eft" ) ); AlignLeft->setText( tr2i18n( "L&eft" ) );
AlignLeft->setAccel( QKeySequence( tr2i18n( "Alt+E" ) ) ); AlignLeft->setAccel( TQKeySequence( tr2i18n( "Alt+E" ) ) );
QToolTip::add( AlignLeft, QString::null ); TQToolTip::add( AlignLeft, TQString::null );
AlignHCenter->setText( tr2i18n( "Ce&nter" ) ); AlignHCenter->setText( tr2i18n( "Ce&nter" ) );
AlignHCenter->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) ); AlignHCenter->setAccel( TQKeySequence( tr2i18n( "Alt+N" ) ) );
QToolTip::add( AlignHCenter, QString::null ); TQToolTip::add( AlignHCenter, TQString::null );
AlignRight->setText( tr2i18n( "Ri&ght" ) ); AlignRight->setText( tr2i18n( "Ri&ght" ) );
AlignRight->setAccel( QKeySequence( tr2i18n( "Alt+G" ) ) ); AlignRight->setAccel( TQKeySequence( tr2i18n( "Alt+G" ) ) );
QToolTip::add( AlignRight, QString::null ); TQToolTip::add( AlignRight, TQString::null );
tabWidget3->changeTab( tab, tr2i18n( "Titleb&ar" ) ); tabWidget3->changeTab( tab, tr2i18n( "Titleb&ar" ) );
textLabel1_5->setText( tr2i18n( "Button Style:" ) ); textLabel1_5->setText( tr2i18n( "Button Style:" ) );
buttonStyle->clear(); buttonStyle->clear();
@ -255,21 +255,21 @@ void ConfigDialog::languageChange()
buttonsize->setSuffix( tr2i18n( " pixels" ) ); buttonsize->setSuffix( tr2i18n( " pixels" ) );
buttonsize->setSpecialValueText( tr2i18n( "1 pixel" ) ); buttonsize->setSpecialValueText( tr2i18n( "1 pixel" ) );
animatebuttons->setText( tr2i18n( "&Animate buttons" ) ); animatebuttons->setText( tr2i18n( "&Animate buttons" ) );
animatebuttons->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) ); animatebuttons->setAccel( TQKeySequence( tr2i18n( "Alt+A" ) ) );
QWhatsThis::add( animatebuttons, tr2i18n( "Check this option if you want to use button animations when hovering with the mouse." ) ); TQWhatsThis::add( animatebuttons, tr2i18n( "Check this option if you want to use button animations when hovering with the mouse." ) );
textLabel2->setText( tr2i18n( "Animation style:" ) ); textLabel2->setText( tr2i18n( "Animation style:" ) );
btnComboBox->clear(); btnComboBox->clear();
btnComboBox->insertItem( tr2i18n( "Colorize" ) ); btnComboBox->insertItem( tr2i18n( "Colorize" ) );
btnComboBox->insertItem( tr2i18n( "Intensify" ) ); btnComboBox->insertItem( tr2i18n( "Intensify" ) );
btnComboBox->insertItem( tr2i18n( "Fade" ) ); btnComboBox->insertItem( tr2i18n( "Fade" ) );
squareButton->setText( tr2i18n( "S&quare buttons" ) ); 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->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->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->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" ) ); tabWidget3->changeTab( tab_2, tr2i18n( "&Buttons appearance" ) );
} }

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class> <class>ConfigDialog</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>ConfigDialog</cstring> <cstring>ConfigDialog</cstring>
</property> </property>
@ -30,11 +30,11 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>tabWidget3</cstring> <cstring>tabWidget3</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -45,7 +45,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QSpinBox" row="1" column="2"> <widget class="TQSpinBox" row="1" column="2">
<property name="name"> <property name="name">
<cstring>titlesize</cstring> <cstring>titlesize</cstring>
</property> </property>
@ -59,7 +59,7 @@
<number>16</number> <number>16</number>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="2" column="2"> <widget class="TQSpinBox" row="2" column="2">
<property name="name"> <property name="name">
<cstring>framesize</cstring> <cstring>framesize</cstring>
</property> </property>
@ -79,7 +79,7 @@
<number>4</number> <number>4</number>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="3" column="2"> <widget class="TQCheckBox" row="3" column="2">
<property name="name"> <property name="name">
<cstring>titleshadow</cstring> <cstring>titleshadow</cstring>
</property> </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> <string>Check this option if you want the titlebar text to have a 3D look with a shadow behind it.</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="4" column="2"> <widget class="TQCheckBox" row="4" column="2">
<property name="name"> <property name="name">
<cstring>roundCorners</cstring> <cstring>roundCorners</cstring>
</property> </property>
@ -110,7 +110,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QComboBox" row="5" column="2"> <widget class="TQComboBox" row="5" column="2">
<item> <item>
<property name="text"> <property name="text">
<string>Gradients</string> <string>Gradients</string>
@ -125,7 +125,7 @@
<cstring>titleBarStyle</cstring> <cstring>titleBarStyle</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="5" column="1"> <widget class="TQLabel" row="5" column="1">
<property name="name"> <property name="name">
<cstring>textLabel1_4</cstring> <cstring>textLabel1_4</cstring>
</property> </property>
@ -136,7 +136,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -147,7 +147,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -158,7 +158,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </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"> <property name="name">
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -203,7 +203,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QButtonGroup" row="0" column="2"> <widget class="TQButtonGroup" row="0" column="2">
<property name="name"> <property name="name">
<cstring>titlealign</cstring> <cstring>titlealign</cstring>
</property> </property>
@ -228,7 +228,7 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>AlignLeft</cstring> <cstring>AlignLeft</cstring>
</property> </property>
@ -242,7 +242,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>AlignHCenter</cstring> <cstring>AlignHCenter</cstring>
</property> </property>
@ -259,7 +259,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>AlignRight</cstring> <cstring>AlignRight</cstring>
</property> </property>
@ -277,7 +277,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -288,7 +288,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_5</cstring> <cstring>textLabel1_5</cstring>
</property> </property>
@ -299,7 +299,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QComboBox" row="1" column="1"> <widget class="TQComboBox" row="1" column="1">
<item> <item>
<property name="text"> <property name="text">
<string>Gradients</string> <string>Gradients</string>
@ -327,7 +327,7 @@
<number>1</number> <number>1</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel4</cstring> <cstring>textLabel4</cstring>
</property> </property>
@ -346,7 +346,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="0" column="1"> <widget class="TQSpinBox" row="0" column="1">
<property name="name"> <property name="name">
<cstring>buttonsize</cstring> <cstring>buttonsize</cstring>
</property> </property>
@ -377,7 +377,7 @@
<number>16</number> <number>16</number>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="2" column="1"> <widget class="TQCheckBox" row="2" column="1">
<property name="name"> <property name="name">
<cstring>animatebuttons</cstring> <cstring>animatebuttons</cstring>
</property> </property>
@ -397,7 +397,7 @@
<string>Check this option if you want to use button animations when hovering with the mouse.</string> <string>Check this option if you want to use button animations when hovering with the mouse.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="3" column="1"> <widget class="TQLayoutWidget" row="3" column="1">
<property name="name"> <property name="name">
<cstring>layout11</cstring> <cstring>layout11</cstring>
</property> </property>
@ -422,7 +422,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -430,7 +430,7 @@
<string>Animation style:</string> <string>Animation style:</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Colorize</string> <string>Colorize</string>
@ -460,7 +460,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </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"> <property name="name">
<cstring>squareButton</cstring> <cstring>squareButton</cstring>
</property> </property>
@ -474,7 +474,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>lightBorder</cstring> <cstring>lightBorder</cstring>
</property> </property>
@ -485,7 +485,7 @@
<string>Alt+G</string> <string>Alt+G</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="6" column="1"> <widget class="TQCheckBox" row="6" column="1">
<property name="name"> <property name="name">
<cstring>nomodalbuttons</cstring> <cstring>nomodalbuttons</cstring>
</property> </property>
@ -499,7 +499,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>menuClose</cstring> <cstring>menuClose</cstring>
</property> </property>

@ -13,13 +13,13 @@
#include <kconfig.h> #include <kconfig.h>
#include <klocale.h> #include <klocale.h>
#include <kglobal.h> #include <kglobal.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include "polyesterconfig.h" #include "polyesterconfig.h"
#include "configdialog.h" #include "configdialog.h"
@ -29,8 +29,8 @@
// ------------- // -------------
// Constructor // Constructor
polyesterConfig::polyesterConfig(KConfig* config, QWidget* parent) polyesterConfig::polyesterConfig(KConfig* config, TQWidget* parent)
: QObject(parent), config_(0), dialog_(0) { : TQObject(parent), config_(0), dialog_(0) {
// create the configuration object // create the configuration object
config_ = new KConfig("kwinpolyesterrc"); config_ = new KConfig("kwinpolyesterrc");
KGlobal::locale()->insertCatalogue("kwin_polyester_config"); KGlobal::locale()->insertCatalogue("kwin_polyester_config");
@ -107,8 +107,8 @@ void polyesterConfig::selectionChanged(int) {
void polyesterConfig::load(KConfig*) { void polyesterConfig::load(KConfig*) {
config_->setGroup("General"); config_->setGroup("General");
QString value = config_->readEntry("TitleAlignment", "AlignHCenter"); TQString value = config_->readEntry("TitleAlignment", "AlignHCenter");
QRadioButton *button = (QRadioButton*)dialog_->titlealign->child(value); TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child(value);
if (button) if (button)
{ {
button->setChecked(true); button->setChecked(true);
@ -144,10 +144,10 @@ void polyesterConfig::load(KConfig*) {
void polyesterConfig::save(KConfig*) { void polyesterConfig::save(KConfig*) {
config_->setGroup("General"); config_->setGroup("General");
QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected(); TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected();
if (button) if (button)
{ {
config_->writeEntry("TitleAlignment", QString(button->name())); config_->writeEntry("TitleAlignment", TQString(button->name()));
} }
config_->writeEntry("RoundCorners", dialog_->roundCorners->isChecked() ); config_->writeEntry("RoundCorners", dialog_->roundCorners->isChecked() );
config_->writeEntry("TitleSize", dialog_->titlesize->value() ); config_->writeEntry("TitleSize", dialog_->titlesize->value() );
@ -172,7 +172,7 @@ void polyesterConfig::save(KConfig*) {
// Set configuration defaults // Set configuration defaults
void polyesterConfig::defaults() { void polyesterConfig::defaults() {
QRadioButton *button = (QRadioButton*)dialog_->titlealign->child("AlignHCenter"); TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child("AlignHCenter");
if (button) if (button)
{ {
button->setChecked(true); button->setChecked(true);
@ -197,7 +197,7 @@ void polyesterConfig::defaults() {
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
extern "C" { extern "C" {
QObject* allocate_config(KConfig* config, QWidget* parent) { TQObject* allocate_config(KConfig* config, TQWidget* parent) {
return (new polyesterConfig(config, parent)); return (new polyesterConfig(config, parent));
} }
} }

@ -30,15 +30,15 @@
#ifndef polyesterCONFIG_H #ifndef polyesterCONFIG_H
#define polyesterCONFIG_H #define polyesterCONFIG_H
#include <qobject.h> #include <tqobject.h>
class KConfig; class KConfig;
class ConfigDialog; class ConfigDialog;
class polyesterConfig : public QObject { class polyesterConfig : public TQObject {
Q_OBJECT TQ_OBJECT
public: public:
polyesterConfig(KConfig* config, QWidget* parent); polyesterConfig(KConfig* config, TQWidget* parent);
~polyesterConfig(); ~polyesterConfig();
signals: signals:

@ -11,7 +11,7 @@ done
# composite -compose overlay images/button.png $f $f # composite -compose overlay images/button.png $f $f
#done #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 sed -e "s/factory/bfactory/" buttons.h >buttons.h.temp
mv buttons.h.temp buttons.h mv buttons.h.temp buttons.h

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

@ -24,14 +24,14 @@
#include <kpixmapeffect.h> #include <kpixmapeffect.h>
#include <kpixmap.h> #include <kpixmap.h>
#include <qbitmap.h> #include <tqbitmap.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qsettings.h> #include <tqsettings.h>
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
@ -48,7 +48,7 @@ using namespace polyester;
polyesterFactory* factory=NULL; polyesterFactory* factory=NULL;
bool polyesterFactory::initialized_ = false; bool polyesterFactory::initialized_ = false;
Qt::AlignmentFlags polyesterFactory::titlealign_ = Qt::AlignHCenter; TQt::AlignmentFlags polyesterFactory::titlealign_ = TQt::AlignHCenter;
int polyesterFactory::contrast_ = 6; int polyesterFactory::contrast_ = 6;
bool polyesterFactory::cornerflags_ = true; bool polyesterFactory::cornerflags_ = true;
int polyesterFactory::titlesize_ = 22; int polyesterFactory::titlesize_ = 22;
@ -140,16 +140,16 @@ bool polyesterFactory::readConfig() {
config.setGroup("General"); config.setGroup("General");
// grab settings // grab settings
QString value = config.readEntry("TitleAlignment", "AlignHCenter"); TQString value = config.readEntry("TitleAlignment", "AlignHCenter");
if (value == "AlignLeft") if (value == "AlignLeft")
titlealign_ = Qt::AlignLeft; titlealign_ = TQt::AlignLeft;
else if (value == "AlignHCenter") else if (value == "AlignHCenter")
titlealign_ = Qt::AlignHCenter; titlealign_ = TQt::AlignHCenter;
else if (value == "AlignRight") else if (value == "AlignRight")
titlealign_ = Qt::AlignRight; titlealign_ = TQt::AlignRight;
QSettings globalSettings; TQSettings globalSettings;
contrast_ = globalSettings.readNumEntry("/Qt/KDE/contrast", 6); contrast_ = globalSettings.readNumEntry("/TQt/KDE/contrast", 6);
cornerflags_ = config.readBoolEntry("RoundCorners", true); cornerflags_ = config.readBoolEntry("RoundCorners", true);
titlesize_ = config.readNumEntry("TitleSize",20); titlesize_ = config.readNumEntry("TitleSize",20);
titleBarStyle_ = config.readNumEntry("TitleBarStyle", 0); titleBarStyle_ = config.readNumEntry("TitleBarStyle", 0);
@ -184,7 +184,7 @@ bool polyesterFactory::readConfig() {
// polyesterButton() // polyesterButton()
// --------------- // ---------------
// Constructor // 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), client_(parent),
type_(type), type_(type),
size_(button_size), size_(button_size),
@ -210,13 +210,13 @@ polyesterButton::polyesterButton(polyesterClient *parent, const char *name, cons
setFixedSize( buttonWidth, button_size); setFixedSize( buttonWidth, button_size);
setCursor(arrowCursor); setCursor(arrowCursor);
QToolTip::add(this, tip); TQToolTip::add(this, tip);
setToggleButton(toggle); setToggleButton(toggle);
//button animation setup //button animation setup
animTmr = new QTimer(this); animTmr = new TQTimer(this);
connect(animTmr, SIGNAL(timeout() ), this, SLOT(animate() ) ); connect(animTmr, TQ_SIGNAL(timeout() ), this, TQ_SLOT(animate() ) );
connect(this, SIGNAL(pressed() ), this, SLOT(buttonClicked() ) ); connect(this, TQ_SIGNAL(pressed() ), this, TQ_SLOT(buttonClicked() ) );
connect(this, SIGNAL(released() ), this, SLOT(buttonReleased() ) ); connect(this, TQ_SIGNAL(released() ), this, TQ_SLOT(buttonReleased() ) );
animProgress = 0; animProgress = 0;
m_clicked=false; m_clicked=false;
} }
@ -231,8 +231,8 @@ polyesterButton::~polyesterButton() {
// ---------- // ----------
// Return size hint // Return size hint
QSize polyesterButton::sizeHint() const { TQSize polyesterButton::sizeHint() const {
return QSize(size_, size_); return TQSize(size_, size_);
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -245,7 +245,7 @@ void polyesterButton::buttonClicked() {
animProgress=0; animProgress=0;
} }
void polyesterButton::buttonReleased() { 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; //m_clicked=false;
} }
@ -276,9 +276,9 @@ void polyesterButton::animate() {
// ------------ // ------------
// Mouse has entered the button // Mouse has entered the button
void polyesterButton::enterEvent(QEvent *e) { void polyesterButton::enterEvent(TQEvent *e) {
// we wanted to pass on the event // we wanted to pass on the event
QButton::enterEvent(e); TQButton::enterEvent(e);
// we want to do mouseovers, so keep track of it here // we want to do mouseovers, so keep track of it here
hover_=true; hover_=true;
if(!m_clicked) if(!m_clicked)
@ -292,9 +292,9 @@ void polyesterButton::enterEvent(QEvent *e) {
// ------------ // ------------
// Mouse has left the button // Mouse has left the button
void polyesterButton::leaveEvent(QEvent *e) { void polyesterButton::leaveEvent(TQEvent *e) {
// we wanted to pass on the event // we wanted to pass on the event
QButton::leaveEvent(e); TQButton::leaveEvent(e);
// we want to do mouseovers, so keep track of it here // we want to do mouseovers, so keep track of it here
hover_=false; hover_=false;
if(!m_clicked) if(!m_clicked)
@ -308,7 +308,7 @@ void polyesterButton::leaveEvent(QEvent *e) {
// ----------------- // -----------------
// Button has been pressed // Button has been pressed
void polyesterButton::mousePressEvent(QMouseEvent* e) { void polyesterButton::mousePressEvent(TQMouseEvent* e) {
lastmouse_ = e->button(); lastmouse_ = e->button();
// translate and pass on mouse event // translate and pass on mouse event
@ -316,9 +316,9 @@ void polyesterButton::mousePressEvent(QMouseEvent* e) {
if ((type_ != ButtonMax) && (e->button() != LeftButton)) { if ((type_ != ButtonMax) && (e->button() != LeftButton)) {
button = NoButton; // middle & right buttons inappropriate 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()); button, e->state());
QButton::mousePressEvent(&me); TQButton::mousePressEvent(&me);
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -326,7 +326,7 @@ void polyesterButton::mousePressEvent(QMouseEvent* e) {
// ----------------- // -----------------
// Button has been released // Button has been released
void polyesterButton::mouseReleaseEvent(QMouseEvent* e) { void polyesterButton::mouseReleaseEvent(TQMouseEvent* e) {
lastmouse_ = e->button(); lastmouse_ = e->button();
// translate and pass on mouse event // translate and pass on mouse event
@ -334,8 +334,8 @@ void polyesterButton::mouseReleaseEvent(QMouseEvent* e) {
if ((type_ != ButtonMax) && (e->button() != LeftButton)) { if ((type_ != ButtonMax) && (e->button() != LeftButton)) {
button = NoButton; // middle & right buttons inappropriate button = NoButton; // middle & right buttons inappropriate
} }
QMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state()); TQMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state());
QButton::mouseReleaseEvent(&me); TQButton::mouseReleaseEvent(&me);
if(m_clicked) if(m_clicked)
{ {
m_clicked=false; m_clicked=false;
@ -344,21 +344,21 @@ void polyesterButton::mouseReleaseEvent(QMouseEvent* e) {
void polyesterButton::setOn(bool on) void polyesterButton::setOn(bool on)
{ {
QButton::setOn(on); TQButton::setOn(on);
} }
void polyesterButton::setDown(bool on) void polyesterButton::setDown(bool on)
{ {
QButton::setDown(on); TQButton::setDown(on);
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// getButtonImage() // getButtonImage()
// ---------------- // ----------------
// get the button QImage based on type and window mode // get the button TQImage based on type and window mode
QImage polyesterButton::getButtonImage(ButtonType type) TQImage polyesterButton::getButtonImage(ButtonType type)
{ {
QImage finalImage; TQImage finalImage;
switch(type) { switch(type) {
case ButtonClose: case ButtonClose:
finalImage = uic_findImage( "close.png" ); finalImage = uic_findImage( "close.png" );
@ -423,7 +423,7 @@ QImage polyesterButton::getButtonImage(ButtonType type)
finalImage = uic_findImage( "splat.png" ); finalImage = uic_findImage( "splat.png" );
break; 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(); finalImage.invertPixels();
return finalImage; return finalImage;
@ -434,7 +434,7 @@ QImage polyesterButton::getButtonImage(ButtonType type)
// ------------------------- // -------------------------
// draw the pixmap button // draw the pixmap button
void polyesterButton::drawButton( QPainter *painter ) { void polyesterButton::drawButton( TQPainter *painter ) {
if ( !polyesterFactory::initialized() ) if ( !polyesterFactory::initialized() )
return ; return ;
@ -442,14 +442,14 @@ void polyesterButton::drawButton( QPainter *painter ) {
int newHeight = height() - 2; int newHeight = height() - 2;
int dx = (width() - newWidth) / 2; int dx = (width() - newWidth) / 2;
int dy = (height() - newHeight) / 2; int dy = (height() - newHeight) / 2;
QImage tmpResult; TQImage tmpResult;
QColorGroup group; TQColorGroup group;
QColor redColor(red); TQColor redColor(red);
bool active = client_->isActive(); bool active = client_->isActive();
genButtonPix(active); genButtonPix(active);
QPixmap backgroundTile = client_->getTitleBarTile(active); TQPixmap backgroundTile = client_->getTitleBarTile(active);
group = KDecoration::options()->colorGroup(KDecoration::ColorButtonBg, active); group = KDecoration::options()->colorGroup(KDecoration::ColorButtonBg, active);
//draw the titlebar behind the buttons and app icons //draw the titlebar behind the buttons and app icons
@ -471,10 +471,10 @@ void polyesterButton::drawButton( QPainter *painter ) {
dx++; dx++;
dy++; dy++;
} }
QPixmap menuButtonPixmap(client_->icon().pixmap(QIconSet::Small, QIconSet::Normal)); TQPixmap menuButtonPixmap(client_->icon().pixmap(TQIconSet::Small, TQIconSet::Normal));
QImage menuButtonImage(menuButtonPixmap.convertToImage()); TQImage menuButtonImage(menuButtonPixmap.convertToImage());
//draw the menu button the same size as the other buttons //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 //that may produce pixilation of the image
//painter->setPen(group.background()); //painter->setPen(group.background());
@ -483,7 +483,7 @@ void polyesterButton::drawButton( QPainter *painter ) {
} }
//build the button image with the icon superimposed to the button //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, KImageEffect::blendOnLower( (int)round(abs(width()-size_)/2), 0,
getButtonImage(type_).smoothScale( size_,size_), getButtonImage(type_).smoothScale( size_,size_),
buttonImage ); buttonImage );
@ -498,7 +498,7 @@ void polyesterButton::drawButton( QPainter *painter ) {
//always colorize with a threatening red color the close button //always colorize with a threatening red color the close button
if( type_ == ButtonClose) 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::desaturate( tmpResult, factor );
KImageEffect::channelIntensity( tmpResult, factor/3, KImageEffect::Red ); KImageEffect::channelIntensity( tmpResult, factor/3, KImageEffect::Red );
KImageEffect::channelIntensity( tmpResult, -factor/2, KImageEffect::Green ); 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 ); painter->drawPixmap( 0, 0, finalButton );
} }
@ -563,10 +563,10 @@ void polyesterButton::genButtonPix( bool active )
else if(!active && buttonImgInactive_created) return; else if(!active && buttonImgInactive_created) return;
KPixmap tempPixmap; KPixmap tempPixmap;
QPixmap *tempButton = new QPixmap(width(), height()); TQPixmap *tempButton = new TQPixmap(width(), height());
QPainter painter(tempButton); TQPainter painter(tempButton);
QColorGroup group; TQColorGroup group;
group = KDecoration::options()->colorGroup(KDecoration::ColorButtonBg, client_->isActive()); group = KDecoration::options()->colorGroup(KDecoration::ColorButtonBg, client_->isActive());
if( ::factory->buttonStyle() == BUTTON_GLASS ) if( ::factory->buttonStyle() == BUTTON_GLASS )
@ -649,7 +649,7 @@ void polyesterButton::genButtonPix( bool active )
} }
//border //border
QColor borderColor = group.background().dark(160); TQColor borderColor = group.background().dark(160);
painter.setPen( borderColor ); painter.setPen( borderColor );
painter.drawLine(0, 2, 0, height()-3); painter.drawLine(0, 2, 0, height()-3);
painter.drawLine(width()-1, 2, width()-1, height()-3); painter.drawLine(width()-1, 2, width()-1, height()-3);
@ -671,29 +671,29 @@ void polyesterButton::genButtonPix( bool active )
painter.end(); painter.end();
//border antialiasing //border antialiasing
QImage *tempAlphaImg = new QImage( tempButton->convertToImage() ); TQImage *tempAlphaImg = new TQImage( tempButton->convertToImage() );
//tempAlphaImg = tempPixmap.convertToImage(); //tempAlphaImg = tempPixmap.convertToImage();
tempAlphaImg->setAlphaBuffer(true); tempAlphaImg->setAlphaBuffer(true);
int borderRed = borderColor.red(); int borderRed = borderColor.red();
int borderGreen = borderColor.green(); int borderGreen = borderColor.green();
int borderBlue = borderColor.blue(); int borderBlue = borderColor.blue();
tempAlphaImg->setPixel(0,0, qRgba(borderRed, borderGreen , borderBlue, 40)); tempAlphaImg->setPixel(0,0, tqRgba(borderRed, borderGreen , borderBlue, 40));
tempAlphaImg->setPixel(width()-1, 0, qRgba(borderRed, borderGreen , borderBlue, 40)); tempAlphaImg->setPixel(width()-1, 0, tqRgba(borderRed, borderGreen , borderBlue, 40));
tempAlphaImg->setPixel(0,height()-1, qRgba(borderRed, borderGreen , borderBlue, 40)); tempAlphaImg->setPixel(0,height()-1, tqRgba(borderRed, borderGreen , borderBlue, 40));
tempAlphaImg->setPixel(width()-1,height()-1, qRgba(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(0,1, tqRgba(borderRed, borderGreen , borderBlue, 127));
tempAlphaImg->setPixel(1,0, qRgba(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()-2,0, tqRgba(borderRed, borderGreen , borderBlue, 127));
tempAlphaImg->setPixel(width()-1,1, qRgba(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(0,height()-2, tqRgba(borderRed, borderGreen , borderBlue, 127));
tempAlphaImg->setPixel(1,height()-1, qRgba(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()-1,height()-2, tqRgba(borderRed, borderGreen , borderBlue, 127));
tempAlphaImg->setPixel(width()-2,height()-1, qRgba(borderRed, borderGreen , borderBlue, 127)); tempAlphaImg->setPixel(width()-2,height()-1, tqRgba(borderRed, borderGreen , borderBlue, 127));
if( client_->isActive() ) if( client_->isActive() )
@ -734,13 +734,13 @@ polyesterClient::polyesterClient(KDecorationBridge *b, KDecorationFactory *f)
//captionBufferDirty(true), //captionBufferDirty(true),
closing(false), closing(false),
s_titleHeight(0), s_titleHeight(0),
s_titleFont(QFont()), s_titleFont(TQFont()),
maskDirty(true), maskDirty(true),
aDoubleBufferDirty(true), aDoubleBufferDirty(true),
iDoubleBufferDirty(true) iDoubleBufferDirty(true)
{ {
aCaptionBuffer = new QPixmap(); aCaptionBuffer = new TQPixmap();
iCaptionBuffer = new QPixmap(); iCaptionBuffer = new TQPixmap();
//copying the most used configuration options //copying the most used configuration options
frameSize = ::factory->frameSize(); frameSize = ::factory->frameSize();
@ -784,7 +784,7 @@ void polyesterClient::create_pixmaps() {
if(pixmaps_created) if(pixmaps_created)
return; return;
KPixmap tempPixmap; KPixmap tempPixmap;
QPainter painter; TQPainter painter;
// active top title bar tile // active top title bar tile
@ -795,7 +795,7 @@ void polyesterClient::create_pixmaps() {
KPixmapEffect::VerticalGradient KPixmapEffect::VerticalGradient
); );
// tempPixmap.fill(KDecoration::options()->color(ColorTitleBar, true).light(150)); // 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.begin(aTitleBarTopTile);
painter.drawPixmap(0, 0, tempPixmap); painter.drawPixmap(0, 0, tempPixmap);
painter.end(); painter.end();
@ -806,7 +806,7 @@ void polyesterClient::create_pixmaps() {
KDecoration::options()->color(ColorTitleBlend, false), KDecoration::options()->color(ColorTitleBlend, false),
KPixmapEffect::VerticalGradient KPixmapEffect::VerticalGradient
); );
iTitleBarTopTile = new QPixmap(1, s_titleHeight+frameSize); iTitleBarTopTile = new TQPixmap(1, s_titleHeight+frameSize);
painter.begin(iTitleBarTopTile); painter.begin(iTitleBarTopTile);
painter.drawPixmap(0, 0, tempPixmap); painter.drawPixmap(0, 0, tempPixmap);
painter.end(); painter.end();
@ -817,9 +817,9 @@ void polyesterClient::create_pixmaps() {
else else
tempPixmap.resize(1, s_titleHeight+frameSize); tempPixmap.resize(1, s_titleHeight+frameSize);
QColor color1; TQColor color1;
QColor color2; TQColor color2;
QColor glassColor; TQColor glassColor;
if( ::factory->titleBarStyle() == TITLEBAR_GLASS ) if( ::factory->titleBarStyle() == TITLEBAR_GLASS )
{ {
glassColor = alphaBlendColors( KDecoration::options()->color(ColorTitleBar, true), glassColor = alphaBlendColors( KDecoration::options()->color(ColorTitleBar, true),
@ -840,7 +840,7 @@ void polyesterClient::create_pixmaps() {
KPixmapEffect::VerticalGradient KPixmapEffect::VerticalGradient
); );
aTitleBarTile = new QPixmap(1, s_titleHeight+frameSize); aTitleBarTile = new TQPixmap(1, s_titleHeight+frameSize);
painter.begin(aTitleBarTile); painter.begin(aTitleBarTile);
painter.drawPixmap(0, 0, tempPixmap); painter.drawPixmap(0, 0, tempPixmap);
@ -867,7 +867,7 @@ void polyesterClient::create_pixmaps() {
KDecoration::options()->color(ColorTitleBlend, false), KDecoration::options()->color(ColorTitleBlend, false),
KPixmapEffect::VerticalGradient KPixmapEffect::VerticalGradient
); );
iTitleBarTile = new QPixmap(1, s_titleHeight+frameSize); iTitleBarTile = new TQPixmap(1, s_titleHeight+frameSize);
painter.begin(iTitleBarTile); painter.begin(iTitleBarTile);
painter.drawPixmap(0, 0, tempPixmap); painter.drawPixmap(0, 0, tempPixmap);
painter.end(); painter.end();
@ -940,26 +940,26 @@ void polyesterClient::_resetLayout()
delete bottomSpacer_; delete bottomSpacer_;
delete windowSpacer_; delete windowSpacer_;
mainLayout_ = new QVBoxLayout(widget()); mainLayout_ = new TQVBoxLayout(widget());
// title // title
titleLayout_ = new QHBoxLayout(); titleLayout_ = new TQHBoxLayout();
QHBoxLayout *windowLayout_ = new QHBoxLayout(); TQHBoxLayout *windowLayout_ = new TQHBoxLayout();
topSpacer_ = new QSpacerItem(1, frameSize, QSizePolicy::Expanding, QSizePolicy::Fixed); topSpacer_ = new TQSpacerItem(1, frameSize, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
titlebar_ = new QSpacerItem(1, s_titleHeight, titlebar_ = new TQSpacerItem(1, s_titleHeight,
QSizePolicy::Expanding, QSizePolicy::Fixed); TQSizePolicy::Expanding, TQSizePolicy::Fixed);
leftTitleSpacer_ = new QSpacerItem(frameSize, s_titleHeight, leftTitleSpacer_ = new TQSpacerItem(frameSize, s_titleHeight,
QSizePolicy::Fixed, QSizePolicy::Fixed); TQSizePolicy::Fixed, TQSizePolicy::Fixed);
rightTitleSpacer_ = new QSpacerItem(frameSize, s_titleHeight, rightTitleSpacer_ = new TQSpacerItem(frameSize, s_titleHeight,
QSizePolicy::Fixed, QSizePolicy::Fixed); TQSizePolicy::Fixed, TQSizePolicy::Fixed);
decoSpacer_ = new QSpacerItem(1, frameSize, QSizePolicy::Expanding, QSizePolicy::Fixed); decoSpacer_ = new TQSpacerItem(1, frameSize, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
leftSpacer_ = new QSpacerItem(frameSize, 1, leftSpacer_ = new TQSpacerItem(frameSize, 1,
QSizePolicy::Fixed, QSizePolicy::Expanding); TQSizePolicy::Fixed, TQSizePolicy::Expanding);
rightSpacer_ = new QSpacerItem(frameSize, 1, rightSpacer_ = new TQSpacerItem(frameSize, 1,
QSizePolicy::Fixed, QSizePolicy::Expanding); TQSizePolicy::Fixed, TQSizePolicy::Expanding);
bottomSpacer_ = new QSpacerItem(1, frameSize, bottomSpacer_ = new TQSpacerItem(1, frameSize,
QSizePolicy::Expanding, QSizePolicy::Fixed); TQSizePolicy::Expanding, TQSizePolicy::Fixed);
// sizeof(...) is calculated at compile time // sizeof(...) is calculated at compile time
memset(button, 0, sizeof(polyesterButton *) * ButtonTypeCount); memset(button, 0, sizeof(polyesterButton *) * ButtonTypeCount);
@ -967,9 +967,9 @@ void polyesterClient::_resetLayout()
// message in preview widget // message in preview widget
if (isPreview()) { if (isPreview()) {
windowLayout_->addWidget( 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 { } else {
windowLayout_->addItem(new QSpacerItem(0, 0)); windowLayout_->addItem(new TQSpacerItem(0, 0));
} }
// setup titlebar buttons // setup titlebar buttons
@ -980,17 +980,17 @@ void polyesterClient::_resetLayout()
if( !::factory->noModalButtons() || !isModal() || isResizable()) if( !::factory->noModalButtons() || !isModal() || isResizable())
addButtons(titleLayout_, addButtons(titleLayout_,
options()->customButtonPositions() ? options()->titleButtonsLeft() : QString(default_left), options()->customButtonPositions() ? options()->titleButtonsLeft() : TQString(default_left),
buttonSize); buttonSize);
titleLayout_->addItem(titlebar_); titleLayout_->addItem(titlebar_);
if( !::factory->noModalButtons() || !isModal() || isResizable()) if( !::factory->noModalButtons() || !isModal() || isResizable())
addButtons(titleLayout_, addButtons(titleLayout_,
options()->customButtonPositions() ? options()->titleButtonsRight() : QString(default_right), options()->customButtonPositions() ? options()->titleButtonsRight() : TQString(default_right),
buttonSize); buttonSize);
titleLayout_->addItem(rightTitleSpacer_); titleLayout_->addItem(rightTitleSpacer_);
//Mid - left side, middle contents and right side //Mid - left side, middle contents and right side
QHBoxLayout * midLayout_ = new QHBoxLayout(); TQHBoxLayout * midLayout_ = new TQHBoxLayout();
midLayout_->addItem(leftSpacer_); midLayout_->addItem(leftSpacer_);
midLayout_->addLayout(windowLayout_); midLayout_->addLayout(windowLayout_);
midLayout_->addItem(rightSpacer_); midLayout_->addItem(rightSpacer_);
@ -1004,8 +1004,8 @@ void polyesterClient::_resetLayout()
// connections // connections
//TODO: probably these two connections could be removed //TODO: probably these two connections could be removed
// connect(this, SIGNAL(keepAboveChanged(bool)), SLOT(keepAboveChange(bool))); // connect(this, TQ_SIGNAL(keepAboveChanged(bool)), TQ_SLOT(keepAboveChange(bool)));
// connect(this, SIGNAL(keepBelowChanged(bool)), SLOT(keepBelowChange(bool))); // connect(this, TQ_SIGNAL(keepBelowChanged(bool)), TQ_SLOT(keepBelowChange(bool)));
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -1013,8 +1013,8 @@ void polyesterClient::_resetLayout()
// ------------ // ------------
// Add buttons to title layout // Add buttons to title layout
void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int button_size) { void polyesterClient::addButtons(TQBoxLayout *layout, const TQString& s, int button_size) {
QString tip; TQString tip;
if (s.length() > 0) { if (s.length() > 0) {
for (unsigned n=0; n < s.length(); n++) { for (unsigned n=0; n < s.length(); n++) {
switch (s[n]) { switch (s[n]) {
@ -1022,8 +1022,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
if (!button[ButtonMenu]) { if (!button[ButtonMenu]) {
button[ButtonMenu] = button[ButtonMenu] =
new polyesterButton(this, "splat.png", i18n("Menu"),ButtonMenu,button_size,::factory->squareButton()); new polyesterButton(this, "splat.png", i18n("Menu"),ButtonMenu,button_size,::factory->squareButton());
connect(button[ButtonMenu], SIGNAL(pressed()), this, SLOT(menuButtonPressed())); connect(button[ButtonMenu], TQ_SIGNAL(pressed()), this, TQ_SLOT(menuButtonPressed()));
connect(button[ButtonMenu], SIGNAL(released()), this, SLOT(menuButtonReleased())); connect(button[ButtonMenu], TQ_SIGNAL(released()), this, TQ_SLOT(menuButtonReleased()));
layout->addWidget(button[ButtonMenu]); layout->addWidget(button[ButtonMenu]);
if (n < s.length()-1) layout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
@ -1038,8 +1038,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
} }
button[ButtonSticky] = button[ButtonSticky] =
new polyesterButton(this, "circle.png", tip, ButtonSticky, button_size,::factory->squareButton(), true); new polyesterButton(this, "circle.png", tip, ButtonSticky, button_size,::factory->squareButton(), true);
connect(button[ButtonSticky], SIGNAL(clicked()), connect(button[ButtonSticky], TQ_SIGNAL(clicked()),
this, SLOT(toggleOnAllDesktops())); this, TQ_SLOT(toggleOnAllDesktops()));
layout->addWidget(button[ButtonSticky]); layout->addWidget(button[ButtonSticky]);
if (n < s.length()-1) layout->addSpacing(1); 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()) { if ((!button[ButtonHelp]) && providesContextHelp()) {
button[ButtonHelp] = button[ButtonHelp] =
new polyesterButton(this, "help.png", i18n("Help"), ButtonHelp, button_size, ::factory->squareButton()); new polyesterButton(this, "help.png", i18n("Help"), ButtonHelp, button_size, ::factory->squareButton());
connect(button[ButtonHelp], SIGNAL(clicked()), connect(button[ButtonHelp], TQ_SIGNAL(clicked()),
this, SLOT(showContextHelp())); this, TQ_SLOT(showContextHelp()));
layout->addWidget(button[ButtonHelp]); layout->addWidget(button[ButtonHelp]);
if (n < s.length()-1) layout->addSpacing(1); 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()) { if ((!button[ButtonMin]) && isMinimizable()) {
button[ButtonMin] = button[ButtonMin] =
new polyesterButton(this, "minimize.png", i18n("Minimize"), ButtonMin, button_size,::factory->squareButton()); new polyesterButton(this, "minimize.png", i18n("Minimize"), ButtonMin, button_size,::factory->squareButton());
connect(button[ButtonMin], SIGNAL(clicked()), connect(button[ButtonMin], TQ_SIGNAL(clicked()),
this, SLOT(minimize())); this, TQ_SLOT(minimize()));
layout->addWidget(button[ButtonMin]); layout->addWidget(button[ButtonMin]);
if (n < s.length()-1) layout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
@ -1076,8 +1076,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
} }
button[ButtonMax] = button[ButtonMax] =
new polyesterButton(this, "maximize.png", tip, ButtonMax, button_size,::factory->squareButton(), true); new polyesterButton(this, "maximize.png", tip, ButtonMax, button_size,::factory->squareButton(), true);
connect(button[ButtonMax], SIGNAL(clicked()), connect(button[ButtonMax], TQ_SIGNAL(clicked()),
this, SLOT(maxButtonPressed())); this, TQ_SLOT(maxButtonPressed()));
layout->addWidget(button[ButtonMax]); layout->addWidget(button[ButtonMax]);
if (n < s.length()-1) layout->addSpacing(1); 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()) { if ((!button[ButtonClose]) && isCloseable()) {
button[ButtonClose] = button[ButtonClose] =
new polyesterButton(this, "close.png", i18n("Close"), ButtonClose, button_size, ::factory->squareButton()); new polyesterButton(this, "close.png", i18n("Close"), ButtonClose, button_size, ::factory->squareButton());
connect(button[ButtonClose], SIGNAL(clicked()), connect(button[ButtonClose], TQ_SIGNAL(clicked()),
this, SLOT(closeWindow())); this, TQ_SLOT(closeWindow()));
layout->addWidget(button[ButtonClose]); layout->addWidget(button[ButtonClose]);
if (n < s.length()-1) layout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
@ -1099,8 +1099,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
button[ButtonAbove] = button[ButtonAbove] =
new polyesterButton(this, "keep_above.png", new polyesterButton(this, "keep_above.png",
i18n("Keep Above Others"), ButtonAbove, button_size, ::factory->squareButton(), true); i18n("Keep Above Others"), ButtonAbove, button_size, ::factory->squareButton(), true);
connect(button[ButtonAbove], SIGNAL(clicked()), connect(button[ButtonAbove], TQ_SIGNAL(clicked()),
this, SLOT(aboveButtonPressed())); this, TQ_SLOT(aboveButtonPressed()));
layout->addWidget(button[ButtonAbove]); layout->addWidget(button[ButtonAbove]);
if (n < s.length()-1) layout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
@ -1111,8 +1111,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
button[ButtonBelow] = button[ButtonBelow] =
new polyesterButton(this, "keep_below.png", new polyesterButton(this, "keep_below.png",
i18n("Keep Below Others"), ButtonBelow, button_size, ::factory->squareButton(), true); i18n("Keep Below Others"), ButtonBelow, button_size, ::factory->squareButton(), true);
connect(button[ButtonBelow], SIGNAL(clicked()), connect(button[ButtonBelow], TQ_SIGNAL(clicked()),
this, SLOT(belowButtonPressed())); this, TQ_SLOT(belowButtonPressed()));
layout->addWidget(button[ButtonBelow]); layout->addWidget(button[ButtonBelow]);
if (n < s.length()-1) layout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
@ -1127,8 +1127,8 @@ void polyesterClient::addButtons(QBoxLayout *layout, const QString& s, int butto
} }
button[ButtonShade] = button[ButtonShade] =
new polyesterButton(this, "splat.png", tip, ButtonShade, button_size, ::factory->squareButton(), true); new polyesterButton(this, "splat.png", tip, ButtonShade, button_size, ::factory->squareButton(), true);
connect(button[ButtonShade], SIGNAL(clicked()), connect(button[ButtonShade], TQ_SIGNAL(clicked()),
this, SLOT(shadeButtonPressed())); this, TQ_SLOT(shadeButtonPressed()));
layout->addWidget(button[ButtonShade]); layout->addWidget(button[ButtonShade]);
if (n < s.length()-1) layout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
@ -1172,8 +1172,8 @@ void polyesterClient::captionChange() {
void polyesterClient::desktopChange() { void polyesterClient::desktopChange() {
bool d = isOnAllDesktops(); bool d = isOnAllDesktops();
if (button[ButtonSticky]) { if (button[ButtonSticky]) {
QToolTip::remove(button[ButtonSticky]); TQToolTip::remove(button[ButtonSticky]);
QToolTip::add(button[ButtonSticky], d ? i18n("Un-Sticky") : i18n("Sticky")); TQToolTip::add(button[ButtonSticky], d ? i18n("Un-Sticky") : i18n("Sticky"));
button[ButtonSticky]->repaint(false); button[ButtonSticky]->repaint(false);
} }
} }
@ -1198,8 +1198,8 @@ void polyesterClient::maximizeChange() {
maskDirty = aDoubleBufferDirty = iDoubleBufferDirty = true; maskDirty = aDoubleBufferDirty = iDoubleBufferDirty = true;
bool m = (maximizeMode() == MaximizeFull); bool m = (maximizeMode() == MaximizeFull);
if (button[ButtonMax]) { if (button[ButtonMax]) {
QToolTip::remove(button[ButtonMax]); TQToolTip::remove(button[ButtonMax]);
QToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize")); TQToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize"));
button[ButtonMax]->repaint(false); button[ButtonMax]->repaint(false);
} }
} }
@ -1212,8 +1212,8 @@ void polyesterClient::maximizeChange() {
void polyesterClient::shadeChange() { void polyesterClient::shadeChange() {
bool s = isSetShade(); bool s = isSetShade();
if (button[ButtonShade]) { if (button[ButtonShade]) {
QToolTip::remove(button[ButtonShade]); TQToolTip::remove(button[ButtonShade]);
QToolTip::add(button[ButtonShade], s ? i18n("Unshade") : i18n("Shade")); TQToolTip::add(button[ButtonShade], s ? i18n("Unshade") : i18n("Shade"));
button[ButtonShade]->repaint(false); button[ButtonShade]->repaint(false);
} }
} }
@ -1255,13 +1255,13 @@ void polyesterClient::borders(int &left, int &right, int &top, int &bottom) cons
top = s_titleHeight; top = s_titleHeight;
// update layout etc. // update layout etc.
topSpacer_->changeSize(1, -1, QSizePolicy::Expanding, QSizePolicy::Fixed); topSpacer_->changeSize(1, -1, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
decoSpacer_->changeSize(1, 0, QSizePolicy::Expanding, QSizePolicy::Fixed); decoSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
leftSpacer_->changeSize(left, 1, QSizePolicy::Fixed, QSizePolicy::Expanding); leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
leftTitleSpacer_->changeSize(left, s_titleHeight, QSizePolicy::Fixed, QSizePolicy::Fixed); leftTitleSpacer_->changeSize(left, s_titleHeight, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
rightSpacer_->changeSize(right, 1, QSizePolicy::Fixed, QSizePolicy::Expanding); rightSpacer_->changeSize(right, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
rightTitleSpacer_->changeSize(right, s_titleHeight, QSizePolicy::Fixed, QSizePolicy::Fixed); rightTitleSpacer_->changeSize(right, s_titleHeight, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
bottomSpacer_->changeSize(1, bottom, QSizePolicy::Expanding, QSizePolicy::Fixed); bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
} else { } else {
/*if the borders are rounded add more left and right borders*/ /*if the borders are rounded add more left and right borders*/
if( roundedCorners ) if( roundedCorners )
@ -1271,13 +1271,13 @@ void polyesterClient::borders(int &left, int &right, int &top, int &bottom) cons
top = titleSize + (frameSize*2); top = titleSize + (frameSize*2);
// update layout etc. // update layout etc.
topSpacer_->changeSize(1, frameSize, QSizePolicy::Expanding, QSizePolicy::Fixed); topSpacer_->changeSize(1, frameSize, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
decoSpacer_->changeSize(1, frameSize, QSizePolicy::Expanding, QSizePolicy::Fixed); decoSpacer_->changeSize(1, frameSize, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
leftSpacer_->changeSize(left, 1, QSizePolicy::Fixed, QSizePolicy::Expanding); leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
leftTitleSpacer_->changeSize(left, s_titleHeight, QSizePolicy::Fixed, QSizePolicy::Fixed); leftTitleSpacer_->changeSize(left, s_titleHeight, TQSizePolicy::Fixed, TQSizePolicy::Fixed);
rightSpacer_->changeSize(right, 1, QSizePolicy::Fixed, QSizePolicy::Expanding); rightSpacer_->changeSize(right, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
rightTitleSpacer_->changeSize(right,s_titleHeight,QSizePolicy::Fixed, QSizePolicy::Fixed); rightTitleSpacer_->changeSize(right,s_titleHeight,TQSizePolicy::Fixed, TQSizePolicy::Fixed);
bottomSpacer_->changeSize(1, bottom, QSizePolicy::Expanding, QSizePolicy::Fixed); bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
} }
widget()->layout()->activate(); widget()->layout()->activate();
} }
@ -1287,7 +1287,7 @@ void polyesterClient::borders(int &left, int &right, int &top, int &bottom) cons
// -------- // --------
// Called to resize the window // Called to resize the window
void polyesterClient::resize(const QSize &size) { void polyesterClient::resize(const TQSize &size) {
widget()->resize(size); widget()->resize(size);
} }
@ -1296,7 +1296,7 @@ void polyesterClient::resize(const QSize &size) {
// ------------- // -------------
// Return the minimum allowable size for this window // Return the minimum allowable size for this window
QSize polyesterClient::minimumSize() const { TQSize polyesterClient::minimumSize() const {
return widget()->minimumSize(); return widget()->minimumSize();
} }
@ -1305,7 +1305,7 @@ QSize polyesterClient::minimumSize() const {
// --------------- // ---------------
// Return logical mouse position // Return logical mouse position
KDecoration::Position polyesterClient::mousePosition(const QPoint &point) const { KDecoration::Position polyesterClient::mousePosition(const TQPoint &point) const {
const int corner = 24; const int corner = 24;
Position pos; Position pos;
int fs = frameSize + handlebar; int fs = frameSize + handlebar;
@ -1355,33 +1355,33 @@ KDecoration::Position polyesterClient::mousePosition(const QPoint &point) const
// ------------- // -------------
// Event filter // Event filter
bool polyesterClient::eventFilter(QObject *obj, QEvent *e) { bool polyesterClient::eventFilter(TQObject *obj, TQEvent *e) {
if (obj != widget()) if (obj != widget())
return false; return false;
switch (e->type()) { switch (e->type()) {
case QEvent::MouseButtonDblClick: { case TQEvent::MouseButtonDblClick: {
mouseDoubleClickEvent(static_cast<QMouseEvent *>(e)); mouseDoubleClickEvent(static_cast<TQMouseEvent *>(e));
return true; return true;
} }
case QEvent::MouseButtonPress: { case TQEvent::MouseButtonPress: {
processMousePressEvent(static_cast<QMouseEvent *>(e)); processMousePressEvent(static_cast<TQMouseEvent *>(e));
return true; return true;
} }
case QEvent::Wheel: { case TQEvent::Wheel: {
wheelEvent(static_cast< QWheelEvent* >(e)); wheelEvent(static_cast< TQWheelEvent* >(e));
return true; return true;
} }
case QEvent::Paint: { case TQEvent::Paint: {
paintEvent(static_cast<QPaintEvent *>(e)); paintEvent(static_cast<TQPaintEvent *>(e));
return true; return true;
} }
case QEvent::Resize: { case TQEvent::Resize: {
resizeEvent(static_cast<QResizeEvent *>(e)); resizeEvent(static_cast<TQResizeEvent *>(e));
return true; return true;
} }
case QEvent::Show: { case TQEvent::Show: {
showEvent(static_cast<QShowEvent *>(e)); showEvent(static_cast<TQShowEvent *>(e));
return true; return true;
} }
default: { default: {
@ -1397,7 +1397,7 @@ bool polyesterClient::eventFilter(QObject *obj, QEvent *e) {
// ----------------------- // -----------------------
// Doubleclick on title // Doubleclick on title
void polyesterClient::mouseDoubleClickEvent(QMouseEvent *e) { void polyesterClient::mouseDoubleClickEvent(TQMouseEvent *e) {
if (titlebar_->geometry().contains(e->pos())) if (titlebar_->geometry().contains(e->pos()))
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
@ -1407,7 +1407,7 @@ void polyesterClient::mouseDoubleClickEvent(QMouseEvent *e) {
// ----------------------- // -----------------------
// Mousewheel over titlebar // Mousewheel over titlebar
void polyesterClient::wheelEvent(QWheelEvent * e) { void polyesterClient::wheelEvent(TQWheelEvent * e) {
#if KDE_VERSION > KDE_MAKE_VERSION(3,4,3) #if KDE_VERSION > KDE_MAKE_VERSION(3,4,3)
if (titleLayout_->geometry().contains(e->pos())) if (titleLayout_->geometry().contains(e->pos()))
titlebarMouseWheelOperation(e->delta()); titlebarMouseWheelOperation(e->delta());
@ -1419,7 +1419,7 @@ titlebarMouseWheelOperation(e->delta());
// ------------ // ------------
// Repaint the window // Repaint the window
void polyesterClient::paintEvent(QPaintEvent* e) { void polyesterClient::paintEvent(TQPaintEvent* e) {
if (!::factory->initialized()) if (!::factory->initialized())
{ {
return; return;
@ -1429,21 +1429,21 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
const uint maxCaptionLength = 200; // truncate captions longer than this! const uint maxCaptionLength = 200; // truncate captions longer than this!
// FIXME: truncate related to window size // FIXME: truncate related to window size
//titlebar_->geometry().width()/(widget()->font().pointSize()); //titlebar_->geometry().width()/(widget()->font().pointSize());
QString captionText(caption()); TQString captionText(caption());
if (captionText.length() > maxCaptionLength) { if (captionText.length() > maxCaptionLength) {
captionText.truncate(maxCaptionLength); captionText.truncate(maxCaptionLength);
captionText.append(" [...]"); captionText.append(" [...]");
} }
QColor blackColor(black); TQColor blackColor(black);
QColor redColor(red); TQColor redColor(red);
QColorGroup group,widgetGroup; TQColorGroup group,widgetGroup;
bool active = isActive(); bool active = isActive();
//doublebuffering everything to avoid the flicker //doublebuffering everything to avoid the flicker
QPainter finalPainter(widget()); TQPainter finalPainter(widget());
//an ugly debug red border used to thest the speed... //an ugly debug red border used to thest the speed...
//finalPainter.fillRect(e->rect(),red);return; //finalPainter.fillRect(e->rect(),red);return;
@ -1467,39 +1467,39 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
if( active ) if( active )
activeBuff = QPixmap(widget()->width(), widget()->height()); activeBuff = TQPixmap(widget()->width(), widget()->height());
else 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 //get group information first
group = options()->colorGroup(KDecoration::ColorTitleBlend, active); group = options()->colorGroup(KDecoration::ColorTitleBlend, active);
widgetGroup = widget()->colorGroup(); widgetGroup = widget()->colorGroup();
QRect topRect( topSpacer_->geometry() ); TQRect topRect( topSpacer_->geometry() );
QRect titleRect( titleLayout_->geometry() ); TQRect titleRect( titleLayout_->geometry() );
QRect textRect( titlebar_->geometry() ); TQRect textRect( titlebar_->geometry() );
QRect Rltitle( leftTitleSpacer_->geometry() ); TQRect Rltitle( leftTitleSpacer_->geometry() );
QRect Rrtitle( rightTitleSpacer_->geometry() ); TQRect Rrtitle( rightTitleSpacer_->geometry() );
QRect Rdeco( decoSpacer_->geometry() ); TQRect Rdeco( decoSpacer_->geometry() );
QRect Rleft( leftSpacer_->geometry() ); TQRect Rleft( leftSpacer_->geometry() );
QRect Rright( rightSpacer_->geometry() ); TQRect Rright( rightSpacer_->geometry() );
QRect Rbottom( bottomSpacer_->geometry() ); TQRect Rbottom( bottomSpacer_->geometry() );
QRect tempRect; TQRect tempRect;
/* /*
if(active) if(active)
{ {
qDebug("topRect.y() = %i\tbottom() = %i",topRect.top(),topRect.bottom()); tqDebug("topRect.y() = %i\tbottom() = %i",topRect.top(),topRect.bottom());
qDebug("titleRect.y() = %i\tbottom() = %i",titleRect.top(),titleRect.bottom()); tqDebug("titleRect.y() = %i\tbottom() = %i",titleRect.top(),titleRect.bottom());
qDebug("textRect.y() = %i\tbottom() = %i",textRect.top(),textRect.bottom()); tqDebug("textRect.y() = %i\tbottom() = %i",textRect.top(),textRect.bottom());
qDebug("Rltitle.y() = %i\tbottom() = %i",Rltitle.top(),Rltitle.bottom()); tqDebug("Rltitle.y() = %i\tbottom() = %i",Rltitle.top(),Rltitle.bottom());
qDebug("Rrtitle.y() = %i\tbottom() = %i",Rrtitle.top(),Rrtitle.bottom()); tqDebug("Rrtitle.y() = %i\tbottom() = %i",Rrtitle.top(),Rrtitle.bottom());
qDebug("Rdeco.y() = %i\tbottom() = %i",Rdeco.top(),Rdeco.bottom()); tqDebug("Rdeco.y() = %i\tbottom() = %i",Rdeco.top(),Rdeco.bottom());
qDebug("Rleft.y() = %i\tbottom() = %i",Rleft.top(),Rleft.bottom()); tqDebug("Rleft.y() = %i\tbottom() = %i",Rleft.top(),Rleft.bottom());
qDebug("Rright.y() = %i\tbottom() = %i",Rright.top(),Rright.bottom()); tqDebug("Rright.y() = %i\tbottom() = %i",Rright.top(),Rright.bottom());
qDebug("Rbottom.y() = %i\tbottom() = %i",Rbottom.top(),Rbottom.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? //is the title text too long?
bool titleTooLong = false; bool titleTooLong = false;
Qt::AlignmentFlags titleAlign = ::factory->titleAlign(); TQt::AlignmentFlags titleAlign = ::factory->titleAlign();
const int gradientWidth = 60; const int gradientWidth = 60;
if( QFontMetrics(widget()->font()).width(captionText) > (textRect.width() - gradientWidth) ) if( TQFontMetrics(widget()->font()).width(captionText) > (textRect.width() - gradientWidth) )
{ {
titleTooLong = true; titleTooLong = true;
titleAlign = Qt::AlignLeft; titleAlign = TQt::AlignLeft;
} }
//we are shadowing title bar text only if there is some text //we are shadowing title bar text only if there is some text
if(::factory->titleShadow() && textRect.width()>0 && textRect.height()>0) if(::factory->titleShadow() && textRect.width()>0 && textRect.height()>0)
{ {
QPixmap textPixmap; TQPixmap textPixmap;
QPainter tempPainter; TQPainter tempPainter;
QColor shadowColor; TQColor shadowColor;
textPixmap = QPixmap(textRect.width(), textRect.height()); textPixmap = TQPixmap(textRect.width(), textRect.height());
textPixmap.fill(QColor(0,0,0)); textPixmap.fill(TQColor(0,0,0));
textPixmap.setMask( textPixmap.createHeuristicMask(TRUE) ); textPixmap.setMask( textPixmap.createHeuristicMask(TRUE) );
tempPainter.begin(&textPixmap); tempPainter.begin(&textPixmap);
@ -1546,16 +1546,16 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
tempPainter.setPen(white); tempPainter.setPen(white);
tempPainter.drawText(1, 1, textRect.width(), textRect.height(), tempPainter.drawText(1, 1, textRect.width(), textRect.height(),
titleAlign | AlignVCenter | Qt::SingleLine, titleAlign | AlignVCenter | TQt::SingleLine,
captionText); captionText);
tempPainter.end(); tempPainter.end();
// make the cute blurred text shadow from Plastik engine // make the cute blurred text shadow from Plastik engine
QImage shadow; TQImage shadow;
ShadowEngine se; ShadowEngine se;
//deciding if the shadow will be black or white //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; shadowColor = blackColor;
else else
shadowColor = white; shadowColor = white;
@ -1570,7 +1570,7 @@ void polyesterClient::paintEvent(QPaintEvent* e) {
painter.setFont(options()->font(isActive(), false)); painter.setFont(options()->font(isActive(), false));
painter.setPen(options()->color(KDecoration::ColorFont, isActive())); painter.setPen(options()->color(KDecoration::ColorFont, isActive()));
painter.drawText(textRect, painter.drawText(textRect,
titleAlign | AlignVCenter | Qt::SingleLine, titleAlign | AlignVCenter | TQt::SingleLine,
captionText); captionText);
// make title fade out when the caption is too long, veery slow but veery cool :-) // 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); int xGradient = textRect.right()-(gradientWidth-1);
QPixmap backLayerP = QPixmap(gradientWidth, textRect.height()); TQPixmap backLayerP = TQPixmap(gradientWidth, textRect.height());
QPainter layerPainter(&backLayerP); TQPainter layerPainter(&backLayerP);
layerPainter.drawTiledPixmap(backLayerP.rect(), active ? *aTitleBarTile:*iTitleBarTile); layerPainter.drawTiledPixmap(backLayerP.rect(), active ? *aTitleBarTile:*iTitleBarTile);
layerPainter.end(); layerPainter.end();
QImage backLayer = backLayerP.convertToImage(); TQImage backLayer = backLayerP.convertToImage();
QImage textLayer = ( active ? TQImage textLayer = ( active ?
activeBuff.convertToImage(): activeBuff.convertToImage():
inactiveBuff.convertToImage() inactiveBuff.convertToImage()
).copy( xGradient, textRect.y(), ).copy( xGradient, textRect.y(),
@ -1698,35 +1698,35 @@ void polyesterClient::updateMask() {
if ( (!options()->moveResizeMaximizedWindows() && maximizeMode() & MaximizeFull ) ) if ( (!options()->moveResizeMaximizedWindows() && maximizeMode() & MaximizeFull ) )
{ {
setMask(QRegion(widget()->rect())); setMask(TQRegion(widget()->rect()));
return; return;
} }
int r(width()); int r(width());
int b(height()); int b(height());
QRegion mask; TQRegion mask;
mask=QRegion(widget()->rect()); mask=TQRegion(widget()->rect());
mask=QRegion( 0, 0, r, b ); mask=TQRegion( 0, 0, r, b );
// Remove top-left corner. // Remove top-left corner.
if( roundedCorners && if( roundedCorners &&
maximizeMode() != KDecorationDefines::MaximizeFull ) maximizeMode() != KDecorationDefines::MaximizeFull )
{ {
mask -= QRegion(0, 0, 5, 1); mask -= TQRegion(0, 0, 5, 1);
mask -= QRegion(0, 1, 3, 1); mask -= TQRegion(0, 1, 3, 1);
mask -= QRegion(0, 2, 2, 1); mask -= TQRegion(0, 2, 2, 1);
mask -= QRegion(0, 3, 1, 2); mask -= TQRegion(0, 3, 1, 2);
mask -= QRegion(r - 5, 0, 5, 1); mask -= TQRegion(r - 5, 0, 5, 1);
mask -= QRegion(r - 3, 1, 3, 1); mask -= TQRegion(r - 3, 1, 3, 1);
mask -= QRegion(r - 2, 2, 2, 1); mask -= TQRegion(r - 2, 2, 2, 1);
mask -= QRegion(r - 1, 3, 1, 2); mask -= TQRegion(r - 1, 3, 1, 2);
} }
//always remove one corner pixel so it simulates a soft corner like plastik //always remove one corner pixel so it simulates a soft corner like plastik
mask -= QRegion(0,0,1,1); mask -= TQRegion(0,0,1,1);
mask -= QRegion(r-1,0,1,1); mask -= TQRegion(r-1,0,1,1);
mask -= QRegion(0, b-1, 1,1); mask -= TQRegion(0, b-1, 1,1);
mask -= QRegion(r-1,b-1,1,1); mask -= TQRegion(r-1,b-1,1,1);
setMask(mask, 1); setMask(mask, 1);
@ -1738,10 +1738,10 @@ void polyesterClient::updateMask() {
// ------------- // -------------
// Window is being resized // Window is being resized
void polyesterClient::resizeEvent(QResizeEvent *) { void polyesterClient::resizeEvent(TQResizeEvent *) {
maskDirty = aDoubleBufferDirty = iDoubleBufferDirty = true; maskDirty = aDoubleBufferDirty = iDoubleBufferDirty = true;
if (widget()->isShown()) { if (widget()->isShown()) {
QRegion region = widget()->rect(); TQRegion region = widget()->rect();
region = region.subtract(titlebar_->geometry()); region = region.subtract(titlebar_->geometry());
widget()->erase(region); widget()->erase(region);
} }
@ -1753,7 +1753,7 @@ void polyesterClient::resizeEvent(QResizeEvent *) {
// ----------- // -----------
// Window is being shown // Window is being shown
void polyesterClient::showEvent(QShowEvent *) { void polyesterClient::showEvent(TQShowEvent *) {
widget()->repaint(); widget()->repaint();
updateMask(); updateMask();
} }
@ -1824,16 +1824,16 @@ void polyesterClient::belowButtonPressed() {
// Menu button was pressed (popup the menu) // Menu button was pressed (popup the menu)
void polyesterClient::menuButtonPressed() { void polyesterClient::menuButtonPressed() {
static QTime* t = NULL; static TQTime* t = NULL;
static polyesterClient* lastClient = NULL; static polyesterClient* lastClient = NULL;
if (t == NULL) if (t == NULL)
t = new QTime; t = new TQTime;
bool dbl = (lastClient==this && t->elapsed() <= QApplication::doubleClickInterval()); bool dbl = (lastClient==this && t->elapsed() <= TQApplication::doubleClickInterval());
lastClient = this; lastClient = this;
t->start(); t->start();
//if (button[ButtonMenu] && !dbl && !::factory->menuClosed()) { //if (button[ButtonMenu] && !dbl && !::factory->menuClosed()) {
if ( !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()); button[ButtonMenu]->rect().bottomLeft().y());
KDecorationFactory* f = factory(); KDecorationFactory* f = factory();
showWindowMenu(button[ButtonMenu]->mapToGlobal(p)); showWindowMenu(button[ButtonMenu]->mapToGlobal(p));

@ -30,7 +30,7 @@
#ifndef polyester_H #ifndef polyester_H
#define polyester_H #define polyester_H
#include <qbutton.h> #include <tqbutton.h>
#include <kdecoration.h> #include <kdecoration.h>
#include <kdecorationfactory.h> #include <kdecorationfactory.h>
@ -41,8 +41,8 @@
#define BUTTON_REVGRADIENT 2 #define BUTTON_REVGRADIENT 2
#define BUTTON_FLAT 3 #define BUTTON_FLAT 3
class QSpacerItem; class TQSpacerItem;
class QPoint; class TQPoint;
namespace polyester { namespace polyester {
@ -77,7 +77,7 @@ public:
virtual KDecoration *createDecoration(KDecorationBridge *b); virtual KDecoration *createDecoration(KDecorationBridge *b);
virtual bool reset(unsigned long changed); virtual bool reset(unsigned long changed);
static bool initialized(); static bool initialized();
static Qt::AlignmentFlags titleAlign(); static TQt::AlignmentFlags titleAlign();
static int contrast(); static int contrast();
static bool roundedCorners(); static bool roundedCorners();
static int titleSize(); static int titleSize();
@ -85,7 +85,7 @@ public:
static bool squareButton(); static bool squareButton();
static int frameSize(); static int frameSize();
static int roundSize(); static int roundSize();
static QFont titleFontTool() { return m_titleFontTool; } static TQFont titleFontTool() { return m_titleFontTool; }
static bool titleShadow(); static bool titleShadow();
static int titleBarStyle() { return titleBarStyle_;} static int titleBarStyle() { return titleBarStyle_;}
static int buttonStyle() { return buttonStyle_;} static int buttonStyle() { return buttonStyle_;}
@ -100,7 +100,7 @@ private:
private: private:
static bool initialized_; static bool initialized_;
static Qt::AlignmentFlags titlealign_; static TQt::AlignmentFlags titlealign_;
static int contrast_; static int contrast_;
static bool cornerflags_; static bool cornerflags_;
static int titlesize_; static int titlesize_;
@ -111,7 +111,7 @@ private:
static int titleBarStyle_; static int titleBarStyle_;
static int buttonStyle_; static int buttonStyle_;
static int roundsize_; static int roundsize_;
static QFont m_titleFontTool; static TQFont m_titleFontTool;
static bool titleshadow_; static bool titleshadow_;
static bool animatebuttons; static bool animatebuttons;
static bool nomodalbuttons; static bool nomodalbuttons;
@ -122,7 +122,7 @@ private:
inline bool polyesterFactory::initialized() { inline bool polyesterFactory::initialized() {
return initialized_; return initialized_;
} }
inline Qt::AlignmentFlags polyesterFactory::titleAlign() { inline TQt::AlignmentFlags polyesterFactory::titleAlign() {
return titlealign_; return titlealign_;
} }
@ -154,11 +154,11 @@ inline bool polyesterFactory::titleShadow() {
// polyesterButton ////////////////////////////////////////////////////////// // polyesterButton //////////////////////////////////////////////////////////
class polyesterButton : public QButton { class polyesterButton : public TQButton {
Q_OBJECT TQ_OBJECT
public: public:
polyesterButton(polyesterClient *parent=0, const char *name=0, polyesterButton(polyesterClient *parent=0, const char *name=0,
const QString &tip=NULL, const TQString &tip=NULL,
ButtonType type=ButtonHelp, ButtonType type=ButtonHelp,
int button_size=18, int button_size=18,
bool squareButton = true, bool squareButton = true,
@ -167,10 +167,10 @@ public:
~polyesterButton(); ~polyesterButton();
void setBitmap(const unsigned char *bitmap); void setBitmap(const unsigned char *bitmap);
QSize sizeHint() const; TQSize sizeHint() const;
ButtonState lastMousePress() const; ButtonState lastMousePress() const;
void reset(); void reset();
QImage getButtonImage(ButtonType type); TQImage getButtonImage(ButtonType type);
virtual void setOn(bool on); virtual void setOn(bool on);
virtual void setDown(bool on); virtual void setDown(bool on);
@ -180,11 +180,11 @@ protected slots:
void buttonReleased(); void buttonReleased();
private: private:
void enterEvent(QEvent *e); void enterEvent(TQEvent *e);
void leaveEvent(QEvent *e); void leaveEvent(TQEvent *e);
void mousePressEvent(QMouseEvent *e); void mousePressEvent(TQMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e); void mouseReleaseEvent(TQMouseEvent *e);
void drawButton(QPainter *painter); void drawButton(TQPainter *painter);
void genButtonPix( bool active ); void genButtonPix( bool active );
private: private:
@ -192,20 +192,20 @@ private:
ButtonType type_; ButtonType type_;
int size_; int size_;
double buttonProportions_; double buttonProportions_;
QBitmap *deco_; TQBitmap *deco_;
QPixmap *pixmap[2][4]; TQPixmap *pixmap[2][4];
QImage *buttonImgActive; TQImage *buttonImgActive;
QImage *buttonImgInactive; TQImage *buttonImgInactive;
ButtonState lastmouse_; ButtonState lastmouse_;
bool buttonImgActive_created; bool buttonImgActive_created;
bool buttonImgInactive_created; bool buttonImgInactive_created;
bool hover_; bool hover_;
bool m_clicked; bool m_clicked;
QTimer *animTmr; TQTimer *animTmr;
uint animProgress; uint animProgress;
}; };
inline Qt::ButtonState polyesterButton::lastMousePress() const { inline TQt::ButtonState polyesterButton::lastMousePress() const {
return lastmouse_; return lastmouse_;
} }
inline void polyesterButton::reset() { inline void polyesterButton::reset() {
@ -215,7 +215,7 @@ inline void polyesterButton::reset() {
// polyesterClient ////////////////////////////////////////////////////////// // polyesterClient //////////////////////////////////////////////////////////
class polyesterClient : public KDecoration { class polyesterClient : public KDecoration {
Q_OBJECT TQ_OBJECT
public: public:
polyesterClient(KDecorationBridge *b, KDecorationFactory *f); polyesterClient(KDecorationBridge *b, KDecorationFactory *f);
virtual ~polyesterClient(); virtual ~polyesterClient();
@ -231,37 +231,37 @@ public:
virtual void borders(int &l, int &r, int &t, int &b) const; virtual void borders(int &l, int &r, int &t, int &b) const;
virtual void resize(const QSize &size); virtual void resize(const TQSize &size);
virtual QSize minimumSize() const; virtual TQSize minimumSize() const;
virtual Position mousePosition(const QPoint &point) const; virtual Position mousePosition(const TQPoint &point) const;
QPixmap getTitleBarTile(bool active) const TQPixmap getTitleBarTile(bool active) const
{ {
return active ? *aTitleBarTile : *iTitleBarTile; return active ? *aTitleBarTile : *iTitleBarTile;
} }
private: private:
void addButtons(QBoxLayout* layout, const QString& buttons, int buttonSize = 18); void addButtons(TQBoxLayout* layout, const TQString& buttons, int buttonSize = 18);
bool eventFilter(QObject *obj, QEvent *e); bool eventFilter(TQObject *obj, TQEvent *e);
void mouseDoubleClickEvent(QMouseEvent *e); void mouseDoubleClickEvent(TQMouseEvent *e);
void wheelEvent(QWheelEvent *e); void wheelEvent(TQWheelEvent *e);
void paintEvent(QPaintEvent *e); void paintEvent(TQPaintEvent *e);
void resizeEvent(QResizeEvent *); void resizeEvent(TQResizeEvent *);
void showEvent(QShowEvent *); void showEvent(TQShowEvent *);
void updateMask(); void updateMask();
void _resetLayout(); void _resetLayout();
int frameSize, titleSize, buttonSize; int frameSize, titleSize, buttonSize;
bool roundedCorners; bool roundedCorners;
QVBoxLayout *mainLayout_; TQVBoxLayout *mainLayout_;
QHBoxLayout *titleLayout_; TQHBoxLayout *titleLayout_;
QSpacerItem *topSpacer_, TQSpacerItem *topSpacer_,
*titleSpacer_, *titleSpacer_,
*leftTitleSpacer_, *rightTitleSpacer_, *leftTitleSpacer_, *rightTitleSpacer_,
*decoSpacer_, *decoSpacer_,
*leftSpacer_, *rightSpacer_, *leftSpacer_, *rightSpacer_,
*bottomSpacer_, *windowSpacer_; *bottomSpacer_, *windowSpacer_;
QPixmap *aCaptionBuffer, *iCaptionBuffer; TQPixmap *aCaptionBuffer, *iCaptionBuffer;
private slots: private slots:
void maxButtonPressed(); void maxButtonPressed();
@ -278,16 +278,16 @@ signals:
void keepBelowChanged(bool); void keepBelowChanged(bool);
private: private:
QPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile; TQPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile;
polyesterButton *button[ButtonTypeCount]; polyesterButton *button[ButtonTypeCount];
QSpacerItem *titlebar_; TQSpacerItem *titlebar_;
bool pixmaps_created; bool pixmaps_created;
bool closing; bool closing;
int s_titleHeight; int s_titleHeight;
QFont s_titleFont; TQFont s_titleFont;
int handlebar; int handlebar;
bool maskDirty, aDoubleBufferDirty, iDoubleBufferDirty; bool maskDirty, aDoubleBufferDirty, iDoubleBufferDirty;
QPixmap activeBuff, inactiveBuff; TQPixmap activeBuff, inactiveBuff;
void create_pixmaps(); void create_pixmaps();
void delete_pixmaps(); void delete_pixmaps();

@ -27,7 +27,7 @@
*/ */
#include "shadow.h" #include "shadow.h"
#include <qcolor.h> #include <tqcolor.h>
ShadowEngine::ShadowEngine() 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 // create a new image for for the shaddow
int w = textPixmap.width(); int w = textPixmap.width();
@ -57,7 +57,7 @@ QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor
/* /*
* This is the source pixmap * This is the source pixmap
*/ */
QImage img = textPixmap.convertToImage().convertDepth(32); TQImage img = textPixmap.convertToImage().convertDepth(32);
/* /*
* Resize the image if necessary * Resize the image if necessary
@ -77,13 +77,13 @@ QImage ShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor
alphaShadow = decay(img, i, j); alphaShadow = decay(img, i, j);
alphaShadow = (alphaShadow > 180.0) ? 180.0 : alphaShadow; alphaShadow = (alphaShadow > 180.0) ? 180.0 : alphaShadow;
// update the shadow's i,j pixel. // 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; 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 // create a new image for the shadow
int w = source.width(); int w = source.width();
@ -115,7 +115,7 @@ double ShadowEngine::decay(QImage& source, int i, int j)
else else
sy = j + m; sy = j + m;
opacity += qGray(source.pixel(sx, sy)); opacity += tqGray(source.pixel(sx, sy));
} }
} }
alphaShadow += opacity / multiplicationFactor_; alphaShadow += opacity / multiplicationFactor_;

@ -29,9 +29,9 @@
#ifndef __FX_SHADOW #ifndef __FX_SHADOW
#define __FX_SHADOW #define __FX_SHADOW
#include <qpixmap.h> #include <tqpixmap.h>
#include <qimage.h> #include <tqimage.h>
#include <qcolor.h> #include <tqcolor.h>
class ShadowEngine class ShadowEngine
{ {
@ -40,9 +40,9 @@ class ShadowEngine
~ShadowEngine(); ~ShadowEngine();
void setThickness(int thickness) { thickness_ = thickness; } void setThickness(int thickness) { thickness_ = thickness; }
void setMultiplicationFactor(double factor) { multiplicationFactor_ = factor; } void setMultiplicationFactor(double factor) { multiplicationFactor_ = factor; }
QImage makeShadow(const QPixmap& textPixmap, const QColor &bgColor); TQImage makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor);
private: private:
double decay(QImage& source, int x, int y); double decay(TQImage& source, int x, int y);
int thickness_; int thickness_;
double multiplicationFactor_; double multiplicationFactor_;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class> <class>ConfigDialog</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>ConfigDialog</cstring> <cstring>ConfigDialog</cstring>
</property> </property>
@ -31,7 +31,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>tabWidget2</cstring> <cstring>tabWidget2</cstring>
</property> </property>
@ -41,7 +41,7 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -52,7 +52,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>buttons</cstring> <cstring>buttons</cstring>
</property> </property>
@ -68,7 +68,7 @@
<set>AlignBottom</set> <set>AlignBottom</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="5" column="0"> <widget class="TQLabel" row="5" column="0">
<property name="name"> <property name="name">
<cstring>animations</cstring> <cstring>animations</cstring>
</property> </property>
@ -84,7 +84,7 @@
<set>AlignBottom</set> <set>AlignBottom</set>
</property> </property>
</widget> </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"> <property name="name">
<cstring>lightBorder</cstring> <cstring>lightBorder</cstring>
</property> </property>
@ -101,7 +101,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>layout1</cstring> <cstring>layout1</cstring>
</property> </property>
@ -126,7 +126,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>animateButtonToDark</cstring> <cstring>animateButtonToDark</cstring>
</property> </property>
@ -139,7 +139,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </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"> <property name="name">
<cstring>shadowedButtonsText</cstring> <cstring>shadowedButtonsText</cstring>
</property> </property>
@ -153,7 +153,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QComboBox" row="1" column="1" rowspan="1" colspan="2"> <widget class="TQComboBox" row="1" column="1" rowspan="1" colspan="2">
<item> <item>
<property name="text"> <property name="text">
<string>Glass buttons</string> <string>Glass buttons</string>
@ -178,7 +178,7 @@
<cstring>buttonStyle</cstring> <cstring>buttonStyle</cstring>
</property> </property>
</widget> </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"> <property name="name">
<cstring>animateButton</cstring> <cstring>animateButton</cstring>
</property> </property>
@ -189,7 +189,7 @@
<string>Alt+M</string> <string>Alt+M</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>animateProgressBar</cstring> <cstring>animateProgressBar</cstring>
</property> </property>
@ -234,7 +234,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -262,7 +262,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="11" column="0"> <widget class="TQLabel" row="11" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_4</cstring> <cstring>textLabel1_4</cstring>
</property> </property>
@ -273,7 +273,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </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"> <property name="name">
<cstring>coloredScrollBar</cstring> <cstring>coloredScrollBar</cstring>
</property> </property>
@ -287,7 +287,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>scrollBarLines</cstring> <cstring>scrollBarLines</cstring>
</property> </property>
@ -298,7 +298,7 @@
<string>Alt+S</string> <string>Alt+S</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox" row="10" column="1" rowspan="1" colspan="2"> <widget class="TQComboBox" row="10" column="1" rowspan="1" colspan="2">
<item> <item>
<property name="text"> <property name="text">
<string>KDE style</string> <string>KDE style</string>
@ -323,7 +323,7 @@
<cstring>scrollBarStyle</cstring> <cstring>scrollBarStyle</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="10" column="0"> <widget class="TQLabel" row="10" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -334,7 +334,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="9" column="0"> <widget class="TQLabel" row="9" column="0">
<property name="name"> <property name="name">
<cstring>scrollbars</cstring> <cstring>scrollbars</cstring>
</property> </property>
@ -350,7 +350,7 @@
<set>AlignBottom</set> <set>AlignBottom</set>
</property> </property>
</widget> </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"> <property name="name">
<cstring>layout21</cstring> <cstring>layout21</cstring>
</property> </property>
@ -358,7 +358,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>customCheckMarkColor</cstring> <cstring>customCheckMarkColor</cstring>
</property> </property>
@ -387,7 +387,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="17" column="0"> <widget class="TQLabel" row="17" column="0">
<property name="name"> <property name="name">
<cstring>textLabel10</cstring> <cstring>textLabel10</cstring>
</property> </property>
@ -401,7 +401,7 @@
<cstring>customCheckMarkColor</cstring> <cstring>customCheckMarkColor</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="16" column="0"> <widget class="TQLabel" row="16" column="0">
<property name="name"> <property name="name">
<cstring>textLabel9</cstring> <cstring>textLabel9</cstring>
</property> </property>
@ -415,7 +415,7 @@
<cstring>customOverHighlightColor</cstring> <cstring>customOverHighlightColor</cstring>
</property> </property>
</widget> </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"> <property name="name">
<cstring>layout20</cstring> <cstring>layout20</cstring>
</property> </property>
@ -423,7 +423,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>customOverHighlightColor</cstring> <cstring>customOverHighlightColor</cstring>
</property> </property>
@ -452,7 +452,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="15" column="0"> <widget class="TQLabel" row="15" column="0">
<property name="name"> <property name="name">
<cstring>textLabel8</cstring> <cstring>textLabel8</cstring>
</property> </property>
@ -466,7 +466,7 @@
<cstring>customFocusHighlightColor</cstring> <cstring>customFocusHighlightColor</cstring>
</property> </property>
</widget> </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"> <property name="name">
<cstring>layout22</cstring> <cstring>layout22</cstring>
</property> </property>
@ -474,7 +474,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>customFocusHighlightColor</cstring> <cstring>customFocusHighlightColor</cstring>
</property> </property>
@ -503,7 +503,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="14" column="0"> <widget class="TQLabel" row="14" column="0">
<property name="name"> <property name="name">
<cstring>textLabel7</cstring> <cstring>textLabel7</cstring>
</property> </property>
@ -519,7 +519,7 @@
<set>AlignBottom</set> <set>AlignBottom</set>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="11" column="1"> <widget class="TQSpinBox" row="11" column="1">
<property name="name"> <property name="name">
<cstring>scrollBarSize</cstring> <cstring>scrollBarSize</cstring>
</property> </property>
@ -553,7 +553,7 @@
</size> </size>
</property> </property>
</spacer> </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"> <property name="name">
<cstring>useLowerCaseText</cstring> <cstring>useLowerCaseText</cstring>
</property> </property>
@ -566,7 +566,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>TabPage</cstring> <cstring>TabPage</cstring>
</property> </property>
@ -577,7 +577,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </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"> <property name="name">
<cstring>buttonMenuItem</cstring> <cstring>buttonMenuItem</cstring>
</property> </property>
@ -594,7 +594,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>menuStripe</cstring> <cstring>menuStripe</cstring>
</property> </property>
@ -608,7 +608,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>shadowedMenuBarText</cstring> <cstring>shadowedMenuBarText</cstring>
</property> </property>
@ -622,7 +622,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>menuBarEmphasis</cstring> <cstring>menuBarEmphasis</cstring>
</property> </property>
@ -633,7 +633,7 @@
<string>Alt+U</string> <string>Alt+U</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>layout9</cstring> <cstring>layout9</cstring>
</property> </property>
@ -658,7 +658,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>menuBarEmphasisBorder</cstring> <cstring>menuBarEmphasisBorder</cstring>
</property> </property>
@ -682,7 +682,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -693,7 +693,7 @@
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </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"> <property name="name">
<cstring>highLightTab</cstring> <cstring>highLightTab</cstring>
</property> </property>
@ -707,7 +707,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>statusBarFrame</cstring> <cstring>statusBarFrame</cstring>
</property> </property>
@ -721,7 +721,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>drawTriangularExpander</cstring> <cstring>drawTriangularExpander</cstring>
</property> </property>
@ -732,7 +732,7 @@
<string>Alt+X</string> <string>Alt+X</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>centeredTabBar</cstring> <cstring>centeredTabBar</cstring>
</property> </property>
@ -743,7 +743,7 @@
<string>Alt+C</string> <string>Alt+C</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>colorizeSortedHeader</cstring> <cstring>colorizeSortedHeader</cstring>
</property> </property>
@ -757,7 +757,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>inputFocusHighlight</cstring> <cstring>inputFocusHighlight</cstring>
</property> </property>
@ -768,7 +768,7 @@
<string>Alt+I</string> <string>Alt+I</string>
</property> </property>
</widget> </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"> <property name="name">
<cstring>drawToolBarItemSeparator</cstring> <cstring>drawToolBarItemSeparator</cstring>
</property> </property>
@ -782,7 +782,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </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"> <property name="name">
<cstring>drawToolBarSeparator</cstring> <cstring>drawToolBarSeparator</cstring>
</property> </property>
@ -813,7 +813,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="11" column="0"> <widget class="TQLabel" row="11" column="0">
<property name="name"> <property name="name">
<cstring>misc</cstring> <cstring>misc</cstring>
</property> </property>
@ -829,7 +829,7 @@
<set>AlignBottom</set> <set>AlignBottom</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="8" column="0"> <widget class="TQLabel" row="8" column="0">
<property name="name"> <property name="name">
<cstring>toolbars</cstring> <cstring>toolbars</cstring>
</property> </property>
@ -845,7 +845,7 @@
<set>AlignBottom</set> <set>AlignBottom</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>menus</cstring> <cstring>menus</cstring>
</property> </property>
@ -861,7 +861,7 @@
<set>AlignBottom</set> <set>AlignBottom</set>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="1" column="1"> <widget class="TQSpinBox" row="1" column="1">
<property name="name"> <property name="name">
<cstring>menuItemSpacing</cstring> <cstring>menuItemSpacing</cstring>
</property> </property>
@ -946,7 +946,7 @@
</size> </size>
</property> </property>
</spacer> </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"> <property name="name">
<cstring>frameCustomEmphColor</cstring> <cstring>frameCustomEmphColor</cstring>
</property> </property>
@ -983,7 +983,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>customMenuBarEmphasisColor</cstring> <cstring>customMenuBarEmphasisColor</cstring>
</property> </property>
@ -1017,7 +1017,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -1028,7 +1028,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTextBrowser"> <widget class="TQTextBrowser">
<property name="name"> <property name="name">
<cstring>textBrowser1</cstring> <cstring>textBrowser1</cstring>
</property> </property>
@ -1060,7 +1060,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>TabPage</cstring> <cstring>TabPage</cstring>
</property> </property>
@ -1071,7 +1071,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTextBrowser"> <widget class="TQTextBrowser">
<property name="name"> <property name="name">
<cstring>textBrowser2</cstring> <cstring>textBrowser2</cstring>
</property> </property>

@ -27,15 +27,15 @@ DEALINGS IN THE SOFTWARE.
*/ */
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qsettings.h> #include <tqsettings.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <kglobal.h> #include <kglobal.h>
#include <klocale.h> #include <klocale.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
@ -46,18 +46,18 @@ DEALINGS IN THE SOFTWARE.
extern "C" extern "C"
{ {
KDE_EXPORT QWidget* allocate_kstyle_config(QWidget* parent) KDE_EXPORT TQWidget* allocate_kstyle_config(TQWidget* parent)
{ {
KGlobal::locale()->insertCatalogue("polyester"); KGlobal::locale()->insertCatalogue("polyester");
return new PolyesterStyleConfig(parent); 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 //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); dialog_ = new ConfigDialog(this);
KGlobal::locale()->insertCatalogue("kstyle_polyester_config"); KGlobal::locale()->insertCatalogue("kstyle_polyester_config");
@ -65,7 +65,7 @@ PolyesterStyleConfig::PolyesterStyleConfig(QWidget* parent): QWidget(parent)
layout->addWidget(dialog_); layout->addWidget(dialog_);
dialog_->show(); dialog_->show();
QSettings s; TQSettings s;
origScrollBarLines = s.readBoolEntry("/polyesterstyle/Settings/scrollBarLines", false); origScrollBarLines = s.readBoolEntry("/polyesterstyle/Settings/scrollBarLines", false);
dialog_->scrollBarLines->setChecked(origScrollBarLines); dialog_->scrollBarLines->setChecked(origScrollBarLines);
origColoredScrollBar = s.readBoolEntry("/polyesterstyle/Settings/coloredScrollBar", true); 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_->menuBarEmphasis, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->menuBarEmphasisBorder, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(dialog_->menuBarEmphasisBorder, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->customMenuBarEmphasisColor, 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_->menuStripe, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->shadowedButtonsText, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) ); connect(dialog_->shadowedButtonsText, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->shadowedMenuBarText, 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_->colorizeSortedHeader, SIGNAL( toggled(bool) ), SLOT( updateChanged() ) );
connect(dialog_->buttonStyle, SIGNAL( activated(int) ), SLOT( updateChanged() ) ); connect(dialog_->buttonStyle, SIGNAL( activated(int) ), SLOT( updateChanged() ) );
connect(dialog_->customOverHighlightColor, SIGNAL( toggled(bool) ), 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_->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_->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() ) if ( dialog_->animateButton->isChecked() )
dialog_->animateButtonToDark->setEnabled(true); dialog_->animateButtonToDark->setEnabled(true);
@ -220,7 +220,7 @@ PolyesterStyleConfig::~PolyesterStyleConfig()
void PolyesterStyleConfig::save() void PolyesterStyleConfig::save()
{ {
QSettings s; TQSettings s;
s.writeEntry("/polyesterstyle/Settings/useLowerCaseText", dialog_->useLowerCaseText->isChecked()); s.writeEntry("/polyesterstyle/Settings/useLowerCaseText", dialog_->useLowerCaseText->isChecked());
s.writeEntry("/polyesterstyle/Settings/scrollBarLines", dialog_->scrollBarLines->isChecked()); s.writeEntry("/polyesterstyle/Settings/scrollBarLines", dialog_->scrollBarLines->isChecked());
s.writeEntry("/polyesterstyle/Settings/scrollBarStyle", s.writeEntry("/polyesterstyle/Settings/scrollBarStyle",
@ -236,7 +236,7 @@ void PolyesterStyleConfig::save()
s.writeEntry("/polyesterstyle/Settings/colorizeSortedHeader", dialog_->colorizeSortedHeader->isChecked()); s.writeEntry("/polyesterstyle/Settings/colorizeSortedHeader", dialog_->colorizeSortedHeader->isChecked());
s.writeEntry("/polyesterstyle/Settings/menuBarEmphasisBorder", dialog_->menuBarEmphasisBorder->isChecked()); s.writeEntry("/polyesterstyle/Settings/menuBarEmphasisBorder", dialog_->menuBarEmphasisBorder->isChecked());
s.writeEntry("/polyesterstyle/Settings/customMenuBarEmphasisColor", dialog_->customMenuBarEmphasisColor->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/menuStripe", dialog_->menuStripe->isChecked());
s.writeEntry("/polyesterstyle/Settings/shadowedButtonsText", dialog_->shadowedButtonsText->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/inputFocusHighlight", dialog_->inputFocusHighlight->isChecked());
s.writeEntry("/polyesterstyle/Settings/buttonStyle", buttonType(dialog_->buttonStyle->currentItem())); s.writeEntry("/polyesterstyle/Settings/buttonStyle", buttonType(dialog_->buttonStyle->currentItem()));
s.writeEntry("/polyesterstyle/Settings/customOverHighlightColor", dialog_->customOverHighlightColor->isChecked()); 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/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/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() void PolyesterStyleConfig::defaults()
@ -336,21 +336,21 @@ void PolyesterStyleConfig::updateChanged()
} }
//button types //button types
QString PolyesterStyleConfig::buttonType( int listnr ) TQString PolyesterStyleConfig::buttonType( int listnr )
{ {
switch ( listnr ) { switch ( listnr ) {
case 1: case 1:
return QString("gradients"); return TQString("gradients");
case 2: case 2:
return QString("reverseGradients"); return TQString("reverseGradients");
case 3: case 3:
return QString("flat"); return TQString("flat");
default: default:
return QString("glass"); return TQString("glass");
} }
} }
int PolyesterStyleConfig::buttonItem( QString kBType ) int PolyesterStyleConfig::buttonItem( TQString kBType )
{ {
if( !strcmp(kBType,"gradients") ) if( !strcmp(kBType,"gradients") )
return 1; return 1;
@ -363,21 +363,21 @@ int PolyesterStyleConfig::buttonItem( QString kBType )
} }
//scrollBar types //scrollBar types
QString PolyesterStyleConfig::scrollBarType( int listnr ) TQString PolyesterStyleConfig::scrollBarType( int listnr )
{ {
switch ( listnr ) { switch ( listnr ) {
case 1: case 1:
return QString("PlatinumStyleScrollBar"); return TQString("PlatinumStyleScrollBar");
case 2: case 2:
return QString("NextStyleScrollBar"); return TQString("NextStyleScrollBar");
case 3: case 3:
return QString("WindowsStyleScrollBar"); return TQString("WindowsStyleScrollBar");
default: default:
return QString("ThreeButtonScrollBar"); return TQString("ThreeButtonScrollBar");
} }
} }
int PolyesterStyleConfig::scrollBarItem( QString kSType ) int PolyesterStyleConfig::scrollBarItem( TQString kSType )
{ {
if( !strcmp(kSType,"PlatinumStyleScrollBar") ) if( !strcmp(kSType,"PlatinumStyleScrollBar") )
return 1; return 1;

@ -30,15 +30,15 @@ DEALINGS IN THE SOFTWARE.
#ifndef POLYMER_CONF_H #ifndef POLYMER_CONF_H
#define POLYMER_CONF_H #define POLYMER_CONF_H
class QCheckBox; class TQCheckBox;
class QComboBox; class TQComboBox;
class ConfigDialog; class ConfigDialog;
class PolyesterStyleConfig: public QWidget class PolyesterStyleConfig: public TQWidget
{ {
Q_OBJECT TQ_OBJECT
public: public:
PolyesterStyleConfig(QWidget* parent); PolyesterStyleConfig(TQWidget* parent);
~PolyesterStyleConfig(); ~PolyesterStyleConfig();
//This signal and the next two slots are the plugin //This signal and the next two slots are the plugin
@ -55,15 +55,15 @@ protected slots:
void updateChanged(); void updateChanged();
protected: protected:
QString buttonType( int listnr ); TQString buttonType( int listnr );
int buttonItem( QString kBType ); int buttonItem( TQString kBType );
QString scrollBarType( int listnr ); TQString scrollBarType( int listnr );
int scrollBarItem( QString kSType ); int scrollBarItem( TQString kSType );
//Original settings, for accurate dirtiness tracking //Original settings, for accurate dirtiness tracking
bool origUseLowerCaseText; bool origUseLowerCaseText;
bool origScrollBarLines; bool origScrollBarLines;
QString origScrollBarStyle; TQString origScrollBarStyle;
int origScrollBarSize; int origScrollBarSize;
bool origColoredScrollBar; bool origColoredScrollBar;
bool origCenteredTabBar; bool origCenteredTabBar;
@ -74,7 +74,7 @@ protected:
bool origMenuBarEmphasis; bool origMenuBarEmphasis;
bool origMenuBarEmphasisBorder; bool origMenuBarEmphasisBorder;
bool origCustomMenuBarEmphasisColor; bool origCustomMenuBarEmphasisColor;
QColor origMenuBarEmphasisColor; TQColor origMenuBarEmphasisColor;
bool origMenuStripe; bool origMenuStripe;
bool origColorizeSortedHeader; bool origColorizeSortedHeader;
bool origShadowedButtonsText; bool origShadowedButtonsText;
@ -88,13 +88,13 @@ protected:
// bool origDrawFocusRect; // bool origDrawFocusRect;
bool origDrawTriangularExpander; bool origDrawTriangularExpander;
bool origInputFocusHighlight; bool origInputFocusHighlight;
QString origButtonStyle; TQString origButtonStyle;
bool origCustomOverHighlightColor; bool origCustomOverHighlightColor;
QColor origOverHighlightColor; TQColor origOverHighlightColor;
bool origCustomFocusHighlightColor; bool origCustomFocusHighlightColor;
QColor origFocusHighlightColor; TQColor origFocusHighlightColor;
bool origCustomCheckMarkColor; bool origCustomCheckMarkColor;
QColor origCheckMarkColor; TQColor origCheckMarkColor;
private: private:
ConfigDialog *dialog_; ConfigDialog *dialog_;

@ -16,23 +16,23 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include <qcolor.h> #include <tqcolor.h>
#include "misc.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... // normal button...
QRgb rgb = bgColor.rgb(); TQRgb rgb = bgColor.rgb();
QRgb rgb_b = fgColor.rgb(); TQRgb rgb_b = fgColor.rgb();
int alpha = a; int alpha = a;
if(alpha>255) alpha = 255; if(alpha>255) alpha = 255;
if(alpha<0) alpha = 0; if(alpha<0) alpha = 0;
int inv_alpha = 255 - alpha; int inv_alpha = 255 - alpha;
QColor result = QColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255, TQColor result = TQColor( tqRgb(tqRed(rgb_b)*inv_alpha/255 + tqRed(rgb)*alpha/255,
qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255, tqGreen(rgb_b)*inv_alpha/255 + tqGreen(rgb)*alpha/255,
qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) ); tqBlue(rgb_b)*inv_alpha/255 + tqBlue(rgb)*alpha/255) );
return result; return result;
} }

@ -19,6 +19,6 @@
#ifndef __MISC_H #ifndef __MISC_H
#define __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 #endif // __MISC_H

File diff suppressed because it is too large Load Diff

@ -45,97 +45,97 @@
#define __POLYESTER_H #define __POLYESTER_H
#include <kstyle.h> #include <kstyle.h>
#include <qbitmap.h> #include <tqbitmap.h>
#include <qintcache.h> #include <tqintcache.h>
#define u_arrow -4,1, 2,1, -3,0, 1,0, -2,-1, 0,-1, -1,-2 #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 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 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 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 TQSettings;
class QTab; class TQTab;
class QTimer; class TQTimer;
//a tiny reimplementation of max... //a tiny reimplementation of max...
int max(int a, int b){return (a>b?a:b);} int max(int a, int b){return (a>b?a:b);}
class PolyesterStyle : public KStyle class PolyesterStyle : public KStyle
{ {
Q_OBJECT TQ_OBJECT
public: public:
PolyesterStyle(); PolyesterStyle();
virtual ~PolyesterStyle(); virtual ~PolyesterStyle();
void polish(QApplication* app ); void polish(TQApplication* app );
void polish(QWidget* widget ); void polish(TQWidget* widget );
void unPolish(QWidget* widget ); void unPolish(TQWidget* widget );
void drawKStylePrimitive(KStylePrimitive kpe, void drawKStylePrimitive(KStylePrimitive kpe,
QPainter* p, TQPainter* p,
const QWidget* widget, const TQWidget* widget,
const QRect &r, const TQRect &r,
const QColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const QStyleOption& = QStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive(PrimitiveElement pe, void drawPrimitive(PrimitiveElement pe,
QPainter *p, TQPainter *p,
const QRect &r, const TQRect &r,
const QColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const QStyleOption &opt = QStyleOption::Default ) const; const TQStyleOption &opt = TQStyleOption::Default ) const;
void drawControl(ControlElement element, void drawControl(ControlElement element,
QPainter *p, TQPainter *p,
const QWidget *widget, const TQWidget *widget,
const QRect &r, const TQRect &r,
const QColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, 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, void drawComplexControl(ComplexControl control,
QPainter *p, TQPainter *p,
const QWidget *widget, const TQWidget *widget,
const QRect &r, const TQRect &r,
const QColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
SCFlags controls = SC_All, SCFlags controls = SC_All,
SCFlags active = SC_None, SCFlags active = SC_None,
const QStyleOption& = QStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
int pixelMetric(PixelMetric m, 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, TQRect subRect(SubRect r,
const QWidget *widget ) const; const TQWidget *widget ) const;
QRect querySubControlMetrics(ComplexControl control, TQRect querySubControlMetrics(ComplexControl control,
const QWidget *widget, const TQWidget *widget,
SubControl subcontrol, SubControl subcontrol,
const QStyleOption &opt = QStyleOption::Default ) const; const TQStyleOption &opt = TQStyleOption::Default ) const;
void drawComplexControlMask(QStyle::ComplexControl c, void drawComplexControlMask(TQStyle::ComplexControl c,
QPainter *p, TQPainter *p,
const QWidget *w, const TQWidget *w,
const QRect &r, const TQRect &r,
const QStyleOption &o=QStyleOption::Default) const; const TQStyleOption &o=TQStyleOption::Default) const;
QSize sizeFromContents(QStyle::ContentsType t, TQSize sizeFromContents(TQStyle::ContentsType t,
const QWidget *w, const TQWidget *w,
const QSize &s, const TQSize &s,
const QStyleOption &o) const; const TQStyleOption &o) const;
int styleHint(StyleHint, const QWidget * = 0, int styleHint(StyleHint, const TQWidget * = 0,
const QStyleOption & = QStyleOption::Default, const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const; TQStyleHintReturn * = 0 ) const;
protected: protected:
enum TabPosition enum TabPosition
@ -205,39 +205,39 @@ protected:
Sharp_BottomRight = 0x00200000 Sharp_BottomRight = 0x00200000
}; };
void renderContour(QPainter *p, void renderContour(TQPainter *p,
const QRect &r, const TQRect &r,
const QColor &backgroundColor, const TQColor &backgroundColor,
const QColor &contourColor, const TQColor &contourColor,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom| const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const; Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
void renderMask(QPainter *p, void renderMask(TQPainter *p,
const QRect &r, const TQRect &r,
const QColor &color, const TQColor &color,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom| const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const; Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight) const;
void renderSurface(QPainter *p, void renderSurface(TQPainter *p,
const QRect &r, const TQRect &r,
const QColor &backgroundColor, const TQColor &backgroundColor,
const QColor &buttonColor, const TQColor &buttonColor,
const QColor &highlightColor, const TQColor &highlightColor,
int intensity = 5, int intensity = 5,
const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom| const uint flags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|
Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight| Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight|
Is_Horizontal) const; Is_Horizontal) const;
inline void renderPixel(QPainter *p, inline void renderPixel(TQPainter *p,
const QPoint &pos, const TQPoint &pos,
const int alpha, const int alpha,
const QColor &color, const TQColor &color,
const QColor &background = QColor(), const TQColor &background = TQColor(),
bool fullAlphaBlend = true) const; bool fullAlphaBlend = true) const;
void renderButton(QPainter *p, void renderButton(TQPainter *p,
const QRect &r, const TQRect &r,
const QColorGroup &g, const TQColorGroup &g,
bool sunken = false, bool sunken = false,
bool mouseOver = false, bool mouseOver = false,
bool horizontal = true, bool horizontal = true,
@ -246,27 +246,27 @@ protected:
int animFrame = 0, int animFrame = 0,
bool isDefault = false) const; bool isDefault = false) const;
void renderPanel(QPainter *p, void renderPanel(TQPainter *p,
const QRect &r, const TQRect &r,
const QColorGroup &g, const TQColorGroup &g,
const bool pseudo3d = true, const bool pseudo3d = true,
const bool sunken = true) const; const bool sunken = true) const;
void renderDot(QPainter *p, void renderDot(TQPainter *p,
const QPoint &point, const TQPoint &point,
const QColor &baseColor, const TQColor &baseColor,
const bool thick = false, const bool thick = false,
const bool sunken = false) const; const bool sunken = false) const;
void renderGradient(QPainter *p, void renderGradient(TQPainter *p,
const QRect &r, const TQRect &r,
const QColor &c1, const TQColor &c1,
const QColor &c2, const TQColor &c2,
bool horizontal = true) const; bool horizontal = true) const;
void renderTab(QPainter *p, void renderTab(TQPainter *p,
const QRect &r, const TQRect &r,
const QColorGroup &g, const TQColorGroup &g,
bool mouseOver = false, bool mouseOver = false,
const SelectedTab selected = OtherTab, const SelectedTab selected = OtherTab,
const bool bottom = false, const bool bottom = false,
@ -274,29 +274,29 @@ protected:
const bool triangular = false, const bool triangular = false,
bool cornerWidget = false) const; bool cornerWidget = false) const;
virtual void renderMenuBlendPixmap( KPixmap& pix, const QColorGroup& cg, virtual void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup& cg,
const QPopupMenu* popup ) const; const TQPopupMenu* popup ) const;
bool eventFilter(QObject *, QEvent *); bool eventFilter(TQObject *, TQEvent *);
// what widget has mouse over him? // what widget has mouse over him?
QWidget* hoverWidget; TQWidget* hoverWidget;
// mouse over for listview headers // mouse over for listview headers
int hoverHeaderId; int hoverHeaderId;
protected slots: protected slots:
void khtmlWidgetDestroyed(QObject* w); void khtmlWidgetDestroyed(TQObject* w);
void sliderThumbMoved(int val); void sliderThumbMoved(int val);
//Animation slots. //Animation slots.
void updateProgressPos(); void updateProgressPos();
void progressBarDestroyed(QObject* bar); void progressBarDestroyed(TQObject* bar);
void animWidgetDestroyed(QObject* w); void animWidgetDestroyed(TQObject* w);
void animate(); void animate();
inline QColor getColor(const QColorGroup &cg, const ColorType t, const bool enabled = true)const; inline TQColor getColor(const TQColorGroup &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 WidgetState s)const;
private: private:
// Disable copy constructor and = operator // Disable copy constructor and = operator
PolyesterStyle( const PolyesterStyle & ); PolyesterStyle( const PolyesterStyle & );
@ -309,7 +309,7 @@ private:
int _contrast; int _contrast;
bool _scrollBarLines; bool _scrollBarLines;
QString _scrollBarStyle; TQString _scrollBarStyle;
int _scrollBarExtent; int _scrollBarExtent;
KStyle::KStyleScrollBarType _scrollBarType; KStyle::KStyleScrollBarType _scrollBarType;
bool _useLowerCaseText; bool _useLowerCaseText;
@ -328,7 +328,7 @@ private:
bool _menuBarEmphasisBorder; bool _menuBarEmphasisBorder;
bool _customMenuBarEmphasisColor; bool _customMenuBarEmphasisColor;
bool _menuStripe; bool _menuStripe;
QColor _menuBarEmphasisColor; TQColor _menuBarEmphasisColor;
bool _shadowedMenuBarText; bool _shadowedMenuBarText;
bool _shadowedButtonsText; bool _shadowedButtonsText;
bool _drawToolBarSeparator; bool _drawToolBarSeparator;
@ -339,18 +339,18 @@ private:
bool _customOverHighlightColor; bool _customOverHighlightColor;
bool _customFocusHighlightColor; bool _customFocusHighlightColor;
bool _customCheckMarkColor; bool _customCheckMarkColor;
QColor _overHighlightColor; TQColor _overHighlightColor;
QColor _focusHighlightColor; TQColor _focusHighlightColor;
QColor _checkMarkColor; TQColor _checkMarkColor;
QString _buttonStyle; TQString _buttonStyle;
QTab *hoverTab; TQTab *hoverTab;
// track khtml widgets. // track khtml widgets.
QMap<const QWidget*,bool> khtmlWidgets; TQMap<const TQWidget*,bool> khtmlWidgets;
//Animation support. //Animation support.
QMap<QWidget*, int> progAnimWidgets; TQMap<TQWidget*, int> progAnimWidgets;
// pixmap cache. // pixmap cache.
enum CacheEntryType { enum CacheEntryType {
@ -363,14 +363,14 @@ private:
CacheEntryType type; CacheEntryType type;
int width; int width;
int height; int height;
QRgb c1Rgb; TQRgb c1Rgb;
QRgb c2Rgb; TQRgb c2Rgb;
bool horizontal; bool horizontal;
QPixmap* pixmap; TQPixmap* pixmap;
CacheEntry(CacheEntryType t, int w, int h, QRgb c1, QRgb c2 = 0, CacheEntry(CacheEntryType t, int w, int h, TQRgb c1, TQRgb c2 = 0,
bool hor = false, QPixmap* p = 0 ): bool hor = false, TQPixmap* p = 0 ):
type(t), width(w), height(h), c1Rgb(c1), c2Rgb(c2), horizontal(hor), pixmap(p) type(t), width(w), height(h), c1Rgb(c1), c2Rgb(c2), horizontal(hor), pixmap(p)
{} {}
@ -381,7 +381,7 @@ private:
int key() 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 // 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. :) // == operator after find to make sure we got the right one. :)
return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22); return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22);
@ -396,43 +396,43 @@ private:
(c1Rgb == other.c1Rgb) && (c1Rgb == other.c1Rgb) &&
(horizontal = other.horizontal); (horizontal = other.horizontal);
// if(!match) { // if(!match) {
// qDebug("operator ==: CacheEntries don't match!"); // tqDebug("operator ==: CacheEntries don't match!");
// qDebug("width: %d\t\tother width: %d", width, other.width); // tqDebug("width: %d\t\tother width: %d", width, other.width);
// qDebug("height: %d\t\tother height: %d", height, other.height); // tqDebug("height: %d\t\tother height: %d", height, other.height);
// qDebug("fgRgb: %d\t\tother fgRgb: %d", fgRgb, other.fgRgb); // tqDebug("fgRgb: %d\t\tother fgRgb: %d", fgRgb, other.fgRgb);
// qDebug("bgRgb: %d\t\tother bgRgb: %d", bgRgb, other.bgRgb); // tqDebug("bgRgb: %d\t\tother bgRgb: %d", bgRgb, other.bgRgb);
// qDebug("surfaceFlags: %d\t\tother surfaceFlags: %d", surfaceFlags, other.surfaceFlags); // tqDebug("surfaceFlags: %d\t\tother surfaceFlags: %d", surfaceFlags, other.surfaceFlags);
// } // }
return match; return match;
} }
}; };
QIntCache<CacheEntry> *pixmapCache; TQIntCache<CacheEntry> *pixmapCache;
// For renderFocusRect // For renderFocusRect
mutable QBitmap *verticalDots; mutable TQBitmap *verticalDots;
mutable QBitmap *horizontalDots; mutable TQBitmap *horizontalDots;
// For KPE_ListViewBranch // For KPE_ListViewBranch
mutable QBitmap *verticalLine; mutable TQBitmap *verticalLine;
mutable QBitmap *horizontalLine; mutable TQBitmap *horizontalLine;
// For buttons animation // For buttons animation
struct AnimInfo { struct AnimInfo {
bool active; bool active;
uint animFrame; uint animFrame;
}; };
typedef QMap<QWidget*, AnimInfo>AnimWidgetMap; typedef TQMap<TQWidget*, AnimInfo>AnimWidgetMap;
AnimWidgetMap animWidgets; AnimWidgetMap animWidgets;
QTimer *btnAnimTimer; TQTimer *btnAnimTimer;
typedef QMap<const QWidget*, int>SliderValuesMap; typedef TQMap<const TQWidget*, int>SliderValuesMap;
SliderValuesMap sliderValues; SliderValuesMap sliderValues;
// For progress bar animation // For progress bar animation
QTimer *animationTimer; TQTimer *animationTimer;
//for the semi transparent menu stripe //for the semi transparent menu stripe
QImage *alphaStripe; TQImage *alphaStripe;
}; };
#endif // __POLYESTER_H #endif // __POLYESTER_H

Loading…
Cancel
Save