Rename a number of old tq methods that are no longer tq specific

pull/1/head
Timothy Pearson 13 years ago
parent 1990438739
commit 5c194e6e70

@ -966,7 +966,7 @@ void KEuphoriaScreenSaver::setMode( int id )
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#include <tqlayout.h> #include <layout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqcombobox.h> #include <tqcombobox.h>
#include <kmessagebox.h> #include <kmessagebox.h>
@ -1024,7 +1024,7 @@ KEuphoriaSetup::KEuphoriaSetup( TQWidget* parent, const char* name )
modeW->setCurrentItem( _saver->mode() ); // set before we connect modeW->setCurrentItem( _saver->mode() ); // set before we connect
connect( modeW, TQT_SIGNAL(activated(int)), _saver, TQT_SLOT(setMode(int)) ); connect( modeW, TQT_SIGNAL(activated(int)), _saver, TQT_SLOT(setMode(int)) );
setMinimumSize( tqsizeHint() ); setMinimumSize( sizeHint() );
} }

@ -850,7 +850,7 @@ void KFluxScreenSaver::setMode( int id )
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#include <tqlayout.h> #include <layout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqcombobox.h> #include <tqcombobox.h>

@ -664,7 +664,7 @@ void KSWindsScreenSaver::setMode( int id )
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#include <tqlayout.h> #include <layout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqcombobox.h> #include <tqcombobox.h>
#include <kmessagebox.h> #include <kmessagebox.h>

@ -4,7 +4,7 @@
// //
// Copyright (c) Martin R. Jones 1996 // Copyright (c) Martin R. Jones 1996
// //
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
// clock function and color cycling added 2000/01/09 by Alexander Neundorf <alexander.neundorf@rz.tu-ilmenau.de> // clock function and color cycling added 2000/01/09 by Alexander Neundorf <alexander.neundorf@rz.tu-ilmenau.de>
// 2001/03/04 Converted to use libkscreensaver by Martin R. Jones // 2001/03/04 Converted to use libkscreensaver by Martin R. Jones
// 2002/04/07 Added random vertical position of text, // 2002/04/07 Added random vertical position of text,
@ -20,7 +20,7 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <tqslider.h> #include <tqslider.h>
#include <tqlayout.h> #include <layout.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <tqfontdatabase.h> #include <tqfontdatabase.h>
#include <tqpainter.h> #include <tqpainter.h>
@ -75,12 +75,12 @@ KBannerSetup::KBannerSetup( TQWidget *parent, const char *name )
tl1->addLayout(tl11); tl1->addLayout(tl11);
TQGroupBox *group = new TQGroupBox( 0,Qt::Vertical, i18n("Font"), main ); TQGroupBox *group = new TQGroupBox( 0,Qt::Vertical, i18n("Font"), main );
TQGridLayout *gl = new TQGridLayout(group->tqlayout(), 6, 2, spacingHint() ); TQGridLayout *gl = new TQGridLayout(group->layout(), 6, 2, spacingHint() );
label = new TQLabel( i18n("Family:"), group ); label = new TQLabel( i18n("Family:"), group );
gl->addWidget(label, 1, 0); gl->addWidget(label, 1, 0);
KFontCombo* comboFonts = new KFontCombo( TQFontDatabase().tqfamilies(), group ); KFontCombo* comboFonts = new KFontCombo( TQFontDatabase().families(), group );
comboFonts->setCurrentFont( fontFamily ); comboFonts->setCurrentFont( fontFamily );
gl->addWidget(comboFonts, 1, 1); gl->addWidget(comboFonts, 1, 1);
connect( comboFonts, TQT_SIGNAL( activated( const TQString& ) ), connect( comboFonts, TQT_SIGNAL( activated( const TQString& ) ),
@ -116,7 +116,7 @@ KBannerSetup::KBannerSetup( TQWidget *parent, const char *name )
TQT_SLOT( slotColor(const TQColor &) ) ); TQT_SLOT( slotColor(const TQColor &) ) );
TQCheckBox *cyclingColorCb=new TQCheckBox(i18n("Cycling color"),group); TQCheckBox *cyclingColorCb=new TQCheckBox(i18n("Cycling color"),group);
cyclingColorCb->setMinimumSize(cyclingColorCb->tqsizeHint()); cyclingColorCb->setMinimumSize(cyclingColorCb->sizeHint());
gl->addMultiCellWidget(cyclingColorCb,5,5,0,1); gl->addMultiCellWidget(cyclingColorCb,5,5,0,1);
connect(cyclingColorCb,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotCyclingColor(bool))); connect(cyclingColorCb,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotCyclingColor(bool)));
cyclingColorCb->setChecked(cyclingColor); cyclingColorCb->setChecked(cyclingColor);
@ -155,7 +155,7 @@ KBannerSetup::KBannerSetup( TQWidget *parent, const char *name )
TQT_SLOT( slotMessage( const TQString & ) ) ); TQT_SLOT( slotMessage( const TQString & ) ) );
TQCheckBox *timeCb=new TQCheckBox( i18n("Show current time"), main); TQCheckBox *timeCb=new TQCheckBox( i18n("Show current time"), main);
timeCb->setFixedSize(timeCb->tqsizeHint()); timeCb->setFixedSize(timeCb->sizeHint());
tl->addWidget(timeCb,0,TQt::AlignLeft); tl->addWidget(timeCb,0,TQt::AlignLeft);
connect(timeCb,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotTimeToggled(bool))); connect(timeCb,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotTimeToggled(bool)));
timeCb->setChecked(showTime); timeCb->setChecked(showTime);
@ -191,7 +191,7 @@ void KBannerSetup::fillFontSizes()
comboSizes->blockSignals( true ); comboSizes->blockSignals( true );
comboSizes->clear(); comboSizes->clear();
int i = 0; int i = 0;
sizes = TQFontDatabase().tqpointSizes( fontFamily ); sizes = TQFontDatabase().pointSizes( fontFamily );
sizes << 96 << 128 << 156 << 0; sizes << 96 << 128 << 156 << 0;
int current = 0; int current = 0;
while ( sizes[i] ) while ( sizes[i] )

@ -25,7 +25,7 @@
#include <tqcolor.h> #include <tqcolor.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlistbox.h> #include <tqlistbox.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpixmap.h> #include <tqpixmap.h>
#include <tqimage.h> #include <tqimage.h>

@ -95,7 +95,7 @@
2004-01-28 Enrico Ros <eros.kde@email.it> 2004-01-28 Enrico Ros <eros.kde@email.it>
* firesaverparticle.cpp: keep a particle independent from the * firesaverparticle.cpp: keep a particle independent from the
'tqshape' of the firework it belongs to. Added depth (level) of 'shape' of the firework it belongs to. Added depth (level) of
explosion (normal particles reach level 1, splitters reach 2). explosion (normal particles reach level 1, splitters reach 2).
* name syntax: converted filenames to match the style of the ones * name syntax: converted filenames to match the style of the ones

@ -479,7 +479,7 @@ void KFireSaver :: paintGL ()
glBegin( GL_QUADS ); glBegin( GL_QUADS );
flashedScreen = true; flashedScreen = true;
} }
// generating tqchildren and removing parent // generating children and removing parent
int elementIndex = particleList.at(); int elementIndex = particleList.at();
explodeFirework(particle); explodeFirework(particle);
particleList.remove(elementIndex); particleList.remove(elementIndex);

@ -94,7 +94,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>201</width> <width>201</width>
<height>31</height> <height>31</height>
@ -129,7 +129,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>30</width> <width>30</width>
<height>220</height> <height>220</height>
@ -146,7 +146,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>30</width> <width>30</width>
<height>210</height> <height>210</height>
@ -155,7 +155,7 @@
</spacer> </spacer>
<widget class="TQLayoutWidget" row="1" column="1"> <widget class="TQLayoutWidget" row="1" column="1">
<property name="name"> <property name="name">
<cstring>tqlayout118</cstring> <cstring>layout118</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
@ -171,7 +171,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>43</width> <width>43</width>
<height>180</height> <height>180</height>
@ -182,13 +182,13 @@
<property name="name"> <property name="name">
<cstring>previewFrame</cstring> <cstring>previewFrame</cstring>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>240</width> <width>240</width>
<height>180</height> <height>180</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>240</width> <width>240</width>
<height>180</height> <height>180</height>
@ -220,7 +220,7 @@
<property name="text"> <property name="text">
<string>P R E V I E W</string> <string>P R E V I E W</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -236,7 +236,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>30</width> <width>30</width>
<height>180</height> <height>180</height>
@ -333,7 +333,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>260</width> <width>260</width>
<height>21</height> <height>21</height>
@ -412,7 +412,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>125</width> <width>125</width>
<height>21</height> <height>21</height>
@ -488,7 +488,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>125</width> <width>125</width>
<height>21</height> <height>21</height>
@ -526,7 +526,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>16</width> <width>16</width>
<height>20</height> <height>20</height>
@ -562,7 +562,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>309</width> <width>309</width>
<height>21</height> <height>21</height>
@ -605,7 +605,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>31</width> <width>31</width>
<height>20</height> <height>20</height>
@ -635,7 +635,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>0</height> <height>0</height>
@ -714,7 +714,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>16</width> <width>16</width>
<height>80</height> <height>80</height>
@ -828,7 +828,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>16</width> <width>16</width>
<height>80</height> <height>80</height>
@ -903,7 +903,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>MinimumExpanding</enum> <enum>MinimumExpanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>41</width> <width>41</width>
<height>20</height> <height>20</height>
@ -954,7 +954,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>16</width> <width>16</width>
<height>70</height> <height>70</height>
@ -1097,7 +1097,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>91</width> <width>91</width>
<height>21</height> <height>21</height>
@ -1135,7 +1135,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>16</width> <width>16</width>
<height>50</height> <height>50</height>
@ -1247,7 +1247,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>149</width> <width>149</width>
<height>21</height> <height>21</height>
@ -1334,7 +1334,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>16</width> <width>16</width>
<height>20</height> <height>20</height>
@ -1400,7 +1400,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>131</width> <width>131</width>
<height>21</height> <height>21</height>
@ -1438,7 +1438,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>16</width> <width>16</width>
<height>20</height> <height>20</height>
@ -1504,7 +1504,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>117</width> <width>117</width>
<height>21</height> <height>21</height>
@ -1545,7 +1545,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>16</width> <width>16</width>
<height>20</height> <height>20</height>
@ -1611,7 +1611,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>110</width> <width>110</width>
<height>21</height> <height>21</height>
@ -1655,7 +1655,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>31</width> <width>31</width>
<height>20</height> <height>20</height>

@ -95,9 +95,9 @@ Writer::Writer( TQString descFileName )
return; return;
TQString welcomeString = i18n("Welcome to KDE %1.%2.%3") TQString welcomeString = i18n("Welcome to KDE %1.%2.%3")
.tqarg(TDE_VERSION_MAJOR) .arg(TDE_VERSION_MAJOR)
.tqarg(TDE_VERSION_MINOR) .arg(TDE_VERSION_MINOR)
.tqarg(TDE_VERSION_RELEASE); .arg(TDE_VERSION_RELEASE);
spawnWords(welcomeString, Fun1); spawnWords(welcomeString, Fun1);
} }

@ -9,7 +9,7 @@
// //
#include <stdlib.h> #include <stdlib.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <kapplication.h> #include <kapplication.h>
#include <klocale.h> #include <klocale.h>
#include <kconfig.h> #include <kconfig.h>
@ -218,8 +218,8 @@ Fountain::~Fountain()
/** load the particle file */ /** load the particle file */
bool Fountain::loadParticle() bool Fountain::loadParticle()
{ {
/* tqStatus indicator */ /* Status indicator */
bool tqStatus = TRUE; bool Status = TRUE;
TQImage buf; TQImage buf;
kdDebug() << "Loading: " << locate("data", "kscreensaver/particle.png") << endl; kdDebug() << "Loading: " << locate("data", "kscreensaver/particle.png") << endl;
@ -238,7 +238,7 @@ bool Fountain::loadParticle()
} }
/* Set the status to true */ /* Set the status to true */
//tqStatus = TRUE; //Status = TRUE;
glGenTextures(1, &texture[0]); /* create three textures */ glGenTextures(1, &texture[0]); /* create three textures */
glBindTexture(GL_TEXTURE_2D, texture[0]); glBindTexture(GL_TEXTURE_2D, texture[0]);
/* use linear filtering */ /* use linear filtering */
@ -250,7 +250,7 @@ bool Fountain::loadParticle()
return tqStatus; return Status;
} }
/** setup the GL enviroment */ /** setup the GL enviroment */
void Fountain::initializeGL () void Fountain::initializeGL ()

@ -29,7 +29,7 @@
#include "fountaincfg.h" #include "fountaincfg.h"
#include <kinstance.h> #include <kinstance.h>
#include <tqfile.h> #include <tqfile.h>
#include <tqtextstream.h> #include <textstream.h>
#define MAX_PARTICLES 1000 #define MAX_PARTICLES 1000

@ -12,7 +12,7 @@
<height>209</height> <height>209</height>
</rect> </rect>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>400</width> <width>400</width>
<height>209</height> <height>209</height>

@ -9,7 +9,7 @@
// //
#include <stdlib.h> #include <stdlib.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <kapplication.h> #include <kapplication.h>
#include <klocale.h> #include <klocale.h>
#include <kconfig.h> #include <kconfig.h>
@ -206,8 +206,8 @@ Gravity::~Gravity()
/** load the particle file */ /** load the particle file */
bool Gravity::loadParticle() bool Gravity::loadParticle()
{ {
/* tqStatus indicator */ /* Status indicator */
bool tqStatus = TRUE; bool Status = TRUE;
TQImage buf; TQImage buf;
kdDebug() << "Loading: " << locate("data", "kscreensaver/particle.png") << endl; kdDebug() << "Loading: " << locate("data", "kscreensaver/particle.png") << endl;
@ -226,7 +226,7 @@ bool Gravity::loadParticle()
} }
/* Set the status to true */ /* Set the status to true */
//tqStatus = TRUE; //Status = TRUE;
glGenTextures(1, &texture[0]); /* create three textures */ glGenTextures(1, &texture[0]); /* create three textures */
glBindTexture(GL_TEXTURE_2D, texture[0]); glBindTexture(GL_TEXTURE_2D, texture[0]);
/* use linear filtering */ /* use linear filtering */
@ -238,7 +238,7 @@ bool Gravity::loadParticle()
return tqStatus; return Status;
} }
/** setup the GL enviroment */ /** setup the GL enviroment */
void Gravity::initializeGL () void Gravity::initializeGL ()

@ -29,7 +29,7 @@
#include "gravitycfg.h" #include "gravitycfg.h"
#include <kinstance.h> #include <kinstance.h>
#include <tqfile.h> #include <tqfile.h>
#include <tqtextstream.h> #include <textstream.h>
#define MAX_PARTICLES 100 #define MAX_PARTICLES 100

@ -12,7 +12,7 @@
<height>209</height> <height>209</height>
</rect> </rect>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>400</width> <width>400</width>
<height>209</height> <height>209</height>

@ -17,7 +17,7 @@
#include <tqhbox.h> #include <tqhbox.h>
#include <tqimage.h> #include <tqimage.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqslider.h> #include <tqslider.h>
@ -85,7 +85,7 @@ KClockSetup::KClockSetup(TQWidget *parent, const char *name)
TQGroupBox *colgroup = new TQGroupBox(i18n("Colors"), main); TQGroupBox *colgroup = new TQGroupBox(i18n("Colors"), main);
colgroup->setColumnLayout( 0,Qt::Horizontal ); colgroup->setColumnLayout( 0,Qt::Horizontal );
TQGridLayout *grid = new TQGridLayout( colgroup->tqlayout(), TQGridLayout *grid = new TQGridLayout( colgroup->layout(),
5, 2, spacingHint() ); 5, 2, spacingHint() );
TQLabel *label = new TQLabel(i18n("&Hour-hand:"), colgroup); TQLabel *label = new TQLabel(i18n("&Hour-hand:"), colgroup);
@ -153,11 +153,11 @@ KClockSetup::KClockSetup(TQWidget *parent, const char *name)
bool rtl = kapp->reverseLayout(); bool rtl = kapp->reverseLayout();
TQHBox *qsscale = new TQHBox(main); TQHBox *qsscale = new TQHBox(main);
label = new TQLabel(i18n("Small"), qsscale); label = new TQLabel(i18n("Small"), qsscale);
label->tqsetAlignment(rtl ? AlignRight : AlignLeft); label->setAlignment(rtl ? AlignRight : AlignLeft);
label = new TQLabel(i18n("Medium"), qsscale); label = new TQLabel(i18n("Medium"), qsscale);
label->tqsetAlignment(AlignHCenter); label->setAlignment(AlignHCenter);
label = new TQLabel(i18n("Big"), qsscale); label = new TQLabel(i18n("Big"), qsscale);
label->tqsetAlignment(rtl ? AlignLeft : AlignRight); label->setAlignment(rtl ? AlignLeft : AlignRight);
top->addWidget(qsscale); top->addWidget(qsscale);
TQCheckBox *keepCentered = new TQCheckBox(i18n("&Keep clock centered"), main); TQCheckBox *keepCentered = new TQCheckBox(i18n("&Keep clock centered"), main);

@ -21,7 +21,7 @@
* implied warranty. * implied warranty.
* *
*/ */
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
@ -35,7 +35,7 @@
#include <tqcolor.h> #include <tqcolor.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <tqslider.h> #include <tqslider.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqbitmap.h> #include <tqbitmap.h>

@ -5,7 +5,7 @@
// based on kpolygon from Martin R. Jones 1996 // based on kpolygon from Martin R. Jones 1996
// mailto:dirk.staneker@student.uni-tuebingen.de // mailto:dirk.staneker@student.uni-tuebingen.de
// //
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
// 2001/03/04 Converted to libkscreensaver by Martin R. Jones // 2001/03/04 Converted to libkscreensaver by Martin R. Jones
#include <config.h> #include <config.h>
@ -23,7 +23,7 @@
#include "lines.h" #include "lines.h"
#include "lines.moc" #include "lines.moc"
#include <tqlayout.h> #include <layout.h>
#include <klocale.h> #include <klocale.h>
#include <kglobal.h> #include <kglobal.h>
#include <tqpainter.h> #include <tqpainter.h>

@ -13,7 +13,7 @@
#include <tqpainter.h> #include <tqpainter.h>
#include <tqslider.h> #include <tqslider.h>
#include <tqlayout.h> #include <layout.h>
#include <tqcolor.h> #include <tqcolor.h>
#include <tqlabel.h> #include <tqlabel.h>

@ -654,7 +654,7 @@ void KPendulumSaver::doTimeStep()
glArea->setEyePhi(eyePhi); // set new perspective glArea->setEyePhi(eyePhi); // set new perspective
} }
glArea->updateGL(); // tqrepaint scenery glArea->updateGL(); // repaint scenery
timer->start(deltaT, TRUE); // restart timer timer->start(deltaT, TRUE); // restart timer
} }
@ -704,28 +704,28 @@ KPendulumSetup::KPendulumSetup(TQWidget* parent, const char* name)
TQToolTip::add( TQToolTip::add(
mEdit, mEdit,
i18n("Ratio of 2nd mass to sum of both masses.\nValid values from %1 to %2.") i18n("Ratio of 2nd mass to sum of both masses.\nValid values from %1 to %2.")
.tqarg(KPendulumSaver::massRatioLimitLower, 0, 'f', 2) .arg(KPendulumSaver::massRatioLimitLower, 0, 'f', 2)
.tqarg(KPendulumSaver::massRatioLimitUpper, 0, 'f', 2)); .arg(KPendulumSaver::massRatioLimitUpper, 0, 'f', 2));
TQToolTip::add( TQToolTip::add(
lEdit, lEdit,
i18n("Ratio of 2nd pendulum part length to the sum of both part lengths.\nValid values from %1 to %2.") i18n("Ratio of 2nd pendulum part length to the sum of both part lengths.\nValid values from %1 to %2.")
.tqarg(KPendulumSaver::lengthRatioLimitLower, 0, 'f', 2) .arg(KPendulumSaver::lengthRatioLimitLower, 0, 'f', 2)
.tqarg(KPendulumSaver::lengthRatioLimitUpper, 0, 'f', 2)); .arg(KPendulumSaver::lengthRatioLimitUpper, 0, 'f', 2));
TQToolTip::add( TQToolTip::add(
gEdit, gEdit,
i18n("Gravitational constant in arbitrary units.\nValid values from %1 to %2.") i18n("Gravitational constant in arbitrary units.\nValid values from %1 to %2.")
.tqarg(KPendulumSaver::gLimitLower, 0, 'f', 2) .arg(KPendulumSaver::gLimitLower, 0, 'f', 2)
.tqarg(KPendulumSaver::gLimitUpper, 0, 'f', 2)); .arg(KPendulumSaver::gLimitUpper, 0, 'f', 2));
TQToolTip::add( TQToolTip::add(
eEdit, eEdit,
i18n("Energy in units of the maximum potential energy of the given configuration.\nValid values from %1 to %2.") i18n("Energy in units of the maximum potential energy of the given configuration.\nValid values from %1 to %2.")
.tqarg(KPendulumSaver::ELimitLower, 0, 'f', 2) .arg(KPendulumSaver::ELimitLower, 0, 'f', 2)
.tqarg(KPendulumSaver::ELimitUpper, 0, 'f', 2)); .arg(KPendulumSaver::ELimitUpper, 0, 'f', 2));
TQToolTip::add( TQToolTip::add(
persSpinBox, persSpinBox,
i18n("Time in seconds after which a random perspective change occurs.\nValid values from %1 to %2.") i18n("Time in seconds after which a random perspective change occurs.\nValid values from %1 to %2.")
.tqarg(KPendulumSaver::persChangeIntervalLimitLower) .arg(KPendulumSaver::persChangeIntervalLimitLower)
.tqarg(KPendulumSaver::persChangeIntervalLimitUpper)); .arg(KPendulumSaver::persChangeIntervalLimitUpper));
// init preview area // init preview area
preview->setBackgroundColor(black); preview->setBackgroundColor(black);

@ -20,13 +20,13 @@
<verstretch>2</verstretch> <verstretch>2</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>1200</width> <width>1200</width>
<height>900</height> <height>900</height>
@ -50,7 +50,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout18</cstring> <cstring>layout18</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -58,7 +58,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout16</cstring> <cstring>layout16</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -66,7 +66,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout15</cstring> <cstring>layout15</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -102,7 +102,7 @@ m&lt;sub&gt;1&lt;/sub&gt;+m&lt;sub&gt;2&lt;/sub&gt;
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>60</width>
<height>32767</height> <height>32767</height>
@ -116,7 +116,7 @@ m&lt;sub&gt;1&lt;/sub&gt;+m&lt;sub&gt;2&lt;/sub&gt;
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout14</cstring> <cstring>layout14</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -146,7 +146,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>60</width>
<height>32767</height> <height>32767</height>
@ -160,7 +160,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout13</cstring> <cstring>layout13</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -173,7 +173,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
<property name="text"> <property name="text">
<string>g</string> <string>g</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignCenter</set> <set>WordBreak|AlignCenter</set>
</property> </property>
</widget> </widget>
@ -189,7 +189,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>60</width>
<height>32767</height> <height>32767</height>
@ -203,7 +203,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout13_2</cstring> <cstring>layout13_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -216,7 +216,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
<property name="text"> <property name="text">
<string>E</string> <string>E</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignCenter</set> <set>WordBreak|AlignCenter</set>
</property> </property>
</widget> </widget>
@ -232,7 +232,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>60</width>
<height>32767</height> <height>32767</height>
@ -246,7 +246,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout18</cstring> <cstring>layout18</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -276,13 +276,13 @@ Change [s]</string>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>60</width> <width>60</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>60</width>
<height>32767</height> <height>32767</height>
@ -293,7 +293,7 @@ Change [s]</string>
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout15</cstring> <cstring>layout15</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -303,7 +303,7 @@ Change [s]</string>
<property name="name"> <property name="name">
<cstring>barColorButton</cstring> <cstring>barColorButton</cstring>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>40</width> <width>40</width>
<height>32767</height> <height>32767</height>
@ -317,7 +317,7 @@ Change [s]</string>
<property name="name"> <property name="name">
<cstring>m1ColorButton</cstring> <cstring>m1ColorButton</cstring>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>40</width> <width>40</width>
<height>32767</height> <height>32767</height>
@ -331,7 +331,7 @@ Change [s]</string>
<property name="name"> <property name="name">
<cstring>m2ColorButton</cstring> <cstring>m2ColorButton</cstring>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>40</width> <width>40</width>
<height>32767</height> <height>32767</height>
@ -353,7 +353,7 @@ Change [s]</string>
<property name="sizeType"> <property name="sizeType">
<enum>MinimumExpanding</enum> <enum>MinimumExpanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>0</height> <height>0</height>
@ -374,7 +374,7 @@ Change [s]</string>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
<height>150</height> <height>150</height>
@ -385,7 +385,7 @@ Change [s]</string>
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout19</cstring> <cstring>layout19</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -401,7 +401,7 @@ Change [s]</string>
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>66</width> <width>66</width>
<height>31</height> <height>31</height>
@ -445,7 +445,7 @@ Change [s]</string>
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>65</width> <width>65</width>
<height>31</height> <height>31</height>

@ -4,7 +4,7 @@
// //
// Copyright (c) Martin R. Jones 1996 // Copyright (c) Martin R. Jones 1996
// //
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
// 2001/03/04 Converted to libkscreensaver by Martin R. Jones // 2001/03/04 Converted to libkscreensaver by Martin R. Jones
#include <config.h> #include <config.h>
@ -13,7 +13,7 @@
#include <tqcolor.h> #include <tqcolor.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqslider.h> #include <tqslider.h>
#include <tqlayout.h> #include <layout.h>
#include <klocale.h> #include <klocale.h>
#include <kconfig.h> #include <kconfig.h>
#include <kglobal.h> #include <kglobal.h>
@ -102,7 +102,7 @@ kPolygonSetup::kPolygonSetup( TQWidget *parent, const char *name )
saver = new kPolygonSaver( preview->winId() ); saver = new kPolygonSaver( preview->winId() );
tl->addWidget(preview); tl->addWidget(preview);
setMinimumSize( tqsizeHint() ); setMinimumSize( sizeHint() );
} }
kPolygonSetup::~kPolygonSetup() kPolygonSetup::~kPolygonSetup()

@ -716,18 +716,18 @@ KRotationSetup::KRotationSetup(TQWidget* parent, const char* name)
TQToolTip::add( TQToolTip::add(
lengthEdit, lengthEdit,
i18n("Length of traces in seconds of visibility.\nValid values from %1 to %2.") i18n("Length of traces in seconds of visibility.\nValid values from %1 to %2.")
.tqarg(KRotationSaver::traceLengthSecondsLimitLower, 0, 'f', 2) .arg(KRotationSaver::traceLengthSecondsLimitLower, 0, 'f', 2)
.tqarg(KRotationSaver::traceLengthSecondsLimitUpper, 0, 'f', 2)); .arg(KRotationSaver::traceLengthSecondsLimitUpper, 0, 'f', 2));
TQToolTip::add( TQToolTip::add(
LzEdit, LzEdit,
i18n("Angular momentum in z direction in arbitrary units.\nValid values from %1 to %2.") i18n("Angular momentum in z direction in arbitrary units.\nValid values from %1 to %2.")
.tqarg(KRotationSaver::LzLimitLower, 0, 'f', 2) .arg(KRotationSaver::LzLimitLower, 0, 'f', 2)
.tqarg(KRotationSaver::LzLimitUpper, 0, 'f', 2)); .arg(KRotationSaver::LzLimitUpper, 0, 'f', 2));
TQToolTip::add( TQToolTip::add(
thetaEdit, thetaEdit,
i18n("Gravitational constant in arbitrary units.\nValid values from %1 to %2.") i18n("Gravitational constant in arbitrary units.\nValid values from %1 to %2.")
.tqarg(KRotationSaver::initEulerThetaLimitLower, 0, 'f', 2) .arg(KRotationSaver::initEulerThetaLimitLower, 0, 'f', 2)
.tqarg(KRotationSaver::initEulerThetaLimitUpper, 0, 'f', 2)); .arg(KRotationSaver::initEulerThetaLimitUpper, 0, 'f', 2));
// init preview area // init preview area
preview->setBackgroundColor(black); preview->setBackgroundColor(black);

@ -20,13 +20,13 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>1200</width> <width>1200</width>
<height>900</height> <height>900</height>
@ -50,7 +50,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout17</cstring> <cstring>layout17</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -58,7 +58,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout6</cstring> <cstring>layout6</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -85,7 +85,7 @@
</property> </property>
<widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>tqlayout5</cstring> <cstring>layout5</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
@ -148,7 +148,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>40</width> <width>40</width>
<height>32767</height> <height>32767</height>
@ -168,7 +168,7 @@
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout10</cstring> <cstring>layout10</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
@ -186,7 +186,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>50</width> <width>50</width>
<height>32767</height> <height>32767</height>
@ -240,7 +240,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>50</width> <width>50</width>
<height>32767</height> <height>32767</height>
@ -262,7 +262,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>31</width> <width>31</width>
<height>51</height> <height>51</height>
@ -275,7 +275,7 @@
<property name="name"> <property name="name">
<cstring>preview</cstring> <cstring>preview</cstring>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
<height>150</height> <height>150</height>
@ -286,7 +286,7 @@
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout9</cstring> <cstring>layout9</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -302,7 +302,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>51</width> <width>51</width>
<height>31</height> <height>31</height>
@ -311,7 +311,7 @@
</spacer> </spacer>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout4</cstring> <cstring>layout4</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -356,7 +356,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>61</width> <width>61</width>
<height>31</height> <height>31</height>

@ -18,7 +18,7 @@
#include <tqlistbox.h> #include <tqlistbox.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqslider.h> #include <tqslider.h>
#include <tqlayout.h> #include <layout.h>
#include <kapplication.h> #include <kapplication.h>
#include <kglobal.h> #include <kglobal.h>

@ -13,7 +13,7 @@
#include <tqdir.h> #include <tqdir.h>
#include <tqcolor.h> #include <tqcolor.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <tqfile.h> #include <tqfile.h>
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
@ -95,7 +95,7 @@ kSlideShowSaver::kSlideShowSaver( WId id ): KScreenSaver(id)
connect(&mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); connect(&mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
TQDesktopWidget *d = TQApplication::desktop(); TQDesktopWidget *d = TQApplication::desktop();
if( tqgeometry() == d->tqgeometry() && d->numScreens() > 1) if( geometry() == d->geometry() && d->numScreens() > 1)
{ {
for(int i = 0; i < d->numScreens(); ++i) for(int i = 0; i < d->numScreens(); ++i)
{ {

@ -58,7 +58,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>161</width> <width>161</width>
<height>20</height> <height>20</height>
@ -94,7 +94,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>19</height> <height>19</height>

@ -6,7 +6,7 @@
// //
#include <stdlib.h> #include <stdlib.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <kapplication.h> #include <kapplication.h>
#include <klocale.h> #include <klocale.h>
#include <kconfig.h> #include <kconfig.h>
@ -288,8 +288,8 @@ void Wave::paintGL ()
bool Wave::LoadGLTextures() bool Wave::LoadGLTextures()
{ {
/* tqStatus indicator */ /* Status indicator */
bool tqStatus = TRUE; bool Status = TRUE;
TQImage buf; // = TQPixmap::grabWindow ( 0 ).convertToImage(); TQImage buf; // = TQPixmap::grabWindow ( 0 ).convertToImage();
kdDebug() << "Loading: " << locate("data", "kscreensaver/image.png") << endl; kdDebug() << "Loading: " << locate("data", "kscreensaver/image.png") << endl;
@ -307,7 +307,7 @@ bool Wave::LoadGLTextures()
tex = convertToGLFormat( buf ); tex = convertToGLFormat( buf );
} }
/* Set the status to true */ /* Set the status to true */
//tqStatus = TRUE; //Status = TRUE;
glGenTextures(1, &texture[0]); /* create three textures */ glGenTextures(1, &texture[0]); /* create three textures */
glBindTexture(GL_TEXTURE_2D, texture[0]); glBindTexture(GL_TEXTURE_2D, texture[0]);
/* use linear filtering */ /* use linear filtering */
@ -320,5 +320,5 @@ bool Wave::LoadGLTextures()
kdDebug() << "Texture Loaded: " << tex.width() << "," << tex.height() << endl; kdDebug() << "Texture Loaded: " << tex.width() << "," << tex.height() << endl;
return tqStatus; return Status;
} }

@ -20,7 +20,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>400</width> <width>400</width>
<height>209</height> <height>209</height>

@ -153,7 +153,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>21</height> <height>21</height>

@ -123,7 +123,7 @@ KPartSaver::KPartSaver( WId id )
// create background widget // create background widget
m_back = new TQLabel( i18n("The screen saver is not configured yet."), this ); m_back = new TQLabel( i18n("The screen saver is not configured yet."), this );
m_back->tqsetAlignment( AlignCenter ); m_back->setAlignment( AlignCenter );
embed( m_back ); embed( m_back );
m_back->show(); m_back->show();
@ -257,7 +257,7 @@ void KPartSaver::next( bool random )
// create background widget // create background widget
m_back = new TQLabel( i18n("All of your files are unsupported"), this ); m_back = new TQLabel( i18n("All of your files are unsupported"), this );
m_back->tqsetAlignment( AlignCenter ); m_back->setAlignment( AlignCenter );
embed( m_back ); embed( m_back );
m_back->show(); m_back->show();

@ -366,10 +366,10 @@
"*up.labelString: /\\\\ ", "*up.labelString: /\\\\ ",
"*frameLabel.labelString: ", "*frameLabel.labelString: ",
"*cmdLabel.labelString: Command Line:", "*cmdLabel.labelString: Command Line:",
"*cmdLabel.tqalignment: ALIGNMENT_BEGINNING", "*cmdLabel.alignment: ALIGNMENT_BEGINNING",
"*enabled.labelString: Enabled", "*enabled.labelString: Enabled",
"*visLabel.labelString: Visual:", "*visLabel.labelString: Visual:",
"*visLabel.tqalignment: ALIGNMENT_END", "*visLabel.alignment: ALIGNMENT_END",
"*visLabel.leftOffset: 20", "*visLabel.leftOffset: 20",
"*demo.labelString: Demo", "*demo.labelString: Demo",
"*man.labelString: Documentation...", "*man.labelString: Documentation...",

@ -37,7 +37,7 @@
#include <config.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
#include <tqlayout.h> #include <layout.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <tqvbox.h> #include <tqvbox.h>
#include <tqlabel.h> #include <tqlabel.h>
@ -92,11 +92,11 @@ KXSConfigDialog::KXSConfigDialog(const TQString &filename, const TQString &name)
bool KXSConfigDialog::create() bool KXSConfigDialog::create()
{ {
TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint()); TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
TQHBoxLayout *tqlayout = new TQHBoxLayout(topLayout, spacingHint()); TQHBoxLayout *layout = new TQHBoxLayout(topLayout, spacingHint());
TQVBox *controlLayout = new TQVBox(plainPage()); TQVBox *controlLayout = new TQVBox(plainPage());
controlLayout->setSpacing(spacingHint()); controlLayout->setSpacing(spacingHint());
tqlayout->addWidget(controlLayout); layout->addWidget(controlLayout);
((TQBoxLayout*)controlLayout->tqlayout())->addStrut(120); ((TQBoxLayout*)controlLayout->layout())->addStrut(120);
KConfig config(mConfigFile); KConfig config(mConfigFile);
@ -118,14 +118,14 @@ bool KXSConfigDialog::create()
descr.replace('\n',' '); descr.replace('\n',' ');
descr = descr.simplifyWhiteSpace(); descr = descr.simplifyWhiteSpace();
TQLabel *l = new TQLabel( i18n( descr.utf8() ), plainPage() ); TQLabel *l = new TQLabel( i18n( descr.utf8() ), plainPage() );
l->tqsetAlignment ( WordBreak ); l->setAlignment ( WordBreak );
topLayout->addWidget( l ); topLayout->addWidget( l );
} }
} else { } else {
// fall back to KDE's old config files. // fall back to KDE's old config files.
int idx = 0; int idx = 0;
while (true) { while (true) {
TQString group = TQString("Arg%1").tqarg(idx); TQString group = TQString("Arg%1").arg(idx);
if (config.hasGroup(group)) { if (config.hasGroup(group)) {
config.setGroup(group); config.setGroup(group);
TQString type = config.readEntry("Type"); TQString type = config.readEntry("Type");
@ -177,7 +177,7 @@ bool KXSConfigDialog::create()
// mPreview->setBackgroundMode(TQWidget::NoBackground); // mPreview->setBackgroundMode(TQWidget::NoBackground);
mPreview->setBackgroundColor(TQt::black); mPreview->setBackgroundColor(TQt::black);
tqlayout->add(mPreview); layout->add(mPreview);
show(); show();
// So that hacks can XSelectInput ButtonPressMask // So that hacks can XSelectInput ButtonPressMask
@ -229,7 +229,7 @@ void KXSConfigDialog::slotPreviewExited(KProcess *)
while ( !saver[i].isSpace() ) word += saver[i++]; while ( !saver[i].isSpace() ) word += saver[i++];
//work around a KStandarDirs::findExe() "feature" where it looks in $TDEDIR/bin first no matter what and sometimes finds the wrong executable //work around a KStandarDirs::findExe() "feature" where it looks in $TDEDIR/bin first no matter what and sometimes finds the wrong executable
TQFileInfo checkExe; TQFileInfo checkExe;
TQString saverdir = TQString("%1/%2").tqarg(XSCREENSAVER_HACKS_DIR).tqarg(word); TQString saverdir = TQString("%1/%2").arg(XSCREENSAVER_HACKS_DIR).arg(word);
TQString path; TQString path;
checkExe.setFile(saverdir); checkExe.setFile(saverdir);
if (checkExe.exists() && checkExe.isExecutable() && checkExe.isFile()) if (checkExe.exists() && checkExe.isExecutable() && checkExe.isFile())
@ -378,7 +378,7 @@ int main(int argc, char *argv[])
app.exec(); app.exec();
} else { } else {
KMessageBox::sorry(0, KMessageBox::sorry(0,
i18n("No configuration available for %1").tqarg(name), i18n("No configuration available for %1").arg(name),
name ); name );
} }

@ -21,7 +21,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqslider.h> #include <tqslider.h>
#include <tqlayout.h> #include <layout.h>
#include <tqcombobox.h> #include <tqcombobox.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tqspinbox.h> #include <tqspinbox.h>

@ -65,7 +65,7 @@ KXSRangeItem::KXSRangeItem(const TQString &name, const TQXmlAttributes &attr )
TQString KXSRangeItem::command() TQString KXSRangeItem::command()
{ {
return mSwitch.tqarg(mInvert?mMaximum-(mValue-mMinimum):mValue); return mSwitch.arg(mInvert?mMaximum-(mValue-mMinimum):mValue);
} }
void KXSRangeItem::read(KConfig &config) void KXSRangeItem::read(KConfig &config)
@ -109,7 +109,7 @@ KXSDoubleRangeItem::KXSDoubleRangeItem(const TQString &name, const TQXmlAttribut
TQString KXSDoubleRangeItem::command() TQString KXSDoubleRangeItem::command()
{ {
return mSwitch.tqarg(mInvert?mMaximum-(mValue-mMinimum):mValue); return mSwitch.arg(mInvert?mMaximum-(mValue-mMinimum):mValue);
} }
void KXSDoubleRangeItem::read(KConfig &config) void KXSDoubleRangeItem::read(KConfig &config)
@ -232,7 +232,7 @@ KXSStringItem::KXSStringItem(const TQString &name, const TQXmlAttributes &attr )
TQString KXSStringItem::command() TQString KXSStringItem::command()
{ {
if (!mValue.isEmpty()) if (!mValue.isEmpty())
return mSwitch.tqarg(mValue); return mSwitch.arg(mValue);
return ""; return "";
} }

@ -108,7 +108,7 @@ int main(int argc, char *argv[])
int idx = 0; int idx = 0;
while (true) while (true)
{ {
TQString group = TQString("Arg%1").tqarg(idx); TQString group = TQString("Arg%1").arg(idx);
if (config.hasGroup(group)) { if (config.hasGroup(group)) {
config.setGroup(group); config.setGroup(group);
TQString type = config.readEntry("Type"); TQString type = config.readEntry("Type");
@ -135,7 +135,7 @@ int main(int argc, char *argv[])
// find the xscreensaver executable // find the xscreensaver executable
//work around a KStandarDirs::findExe() "feature" where it looks in $TDEDIR/bin first no matter what and sometimes finds the wrong executable //work around a KStandarDirs::findExe() "feature" where it looks in $TDEDIR/bin first no matter what and sometimes finds the wrong executable
TQFileInfo checkExe; TQFileInfo checkExe;
TQString saverdir = TQString("%1/%2").tqarg(XSCREENSAVER_HACKS_DIR).tqarg(filename); TQString saverdir = TQString("%1/%2").arg(XSCREENSAVER_HACKS_DIR).arg(filename);
kdDebug() << "saverdir is" << saverdir << endl; kdDebug() << "saverdir is" << saverdir << endl;
TQString exeFile; TQString exeFile;
checkExe.setFile(saverdir); checkExe.setFile(saverdir);

@ -3,27 +3,27 @@
#include <kapplication.h> #include <kapplication.h>
void min_width(TQWidget *w) { void min_width(TQWidget *w) {
w->setMinimumWidth(w->tqsizeHint().width()); w->setMinimumWidth(w->sizeHint().width());
} }
void fixed_width(TQWidget *w) { void fixed_width(TQWidget *w) {
w->setFixedWidth(w->tqsizeHint().width()); w->setFixedWidth(w->sizeHint().width());
} }
void min_height(TQWidget *w) { void min_height(TQWidget *w) {
w->setMinimumHeight(w->tqsizeHint().height()); w->setMinimumHeight(w->sizeHint().height());
} }
void fixed_height(TQWidget *w) { void fixed_height(TQWidget *w) {
w->setFixedHeight(w->tqsizeHint().height()); w->setFixedHeight(w->sizeHint().height());
} }
void min_size(TQWidget *w) { void min_size(TQWidget *w) {
w->setMinimumSize(w->tqsizeHint()); w->setMinimumSize(w->sizeHint());
} }
void fixed_size(TQWidget *w) { void fixed_size(TQWidget *w) {
w->setFixedSize(w->tqsizeHint()); w->setFixedSize(w->sizeHint());
} }
KConfig *klock_config() KConfig *klock_config()

@ -38,7 +38,7 @@ typedef struct LockStruct_s {
ModeHook *init_hook; /* func to init a mode */ ModeHook *init_hook; /* func to init a mode */
ModeHook *callback_hook; /* func to run (tick) a mode */ ModeHook *callback_hook; /* func to run (tick) a mode */
ModeHook *release_hook; /* func to shutdown a mode */ ModeHook *release_hook; /* func to shutdown a mode */
ModeHook *refresh_hook; /* tells mode to tqrepaint */ ModeHook *refresh_hook; /* tells mode to repaint */
ModeHook *change_hook; /* user wants mode to change */ ModeHook *change_hook; /* user wants mode to change */
ModeHook *unused_hook; /* for future expansion */ ModeHook *unused_hook; /* for future expansion */
ModeSpecOpt *msopt; /* this mode's def resources */ ModeSpecOpt *msopt; /* this mode's def resources */
@ -313,10 +313,10 @@ extern ModeHook release_galaxy;
extern ModeHook refresh_galaxy; extern ModeHook refresh_galaxy;
extern ModeSpecOpt galaxy_opts; extern ModeSpecOpt galaxy_opts;
extern ModeHook init_tqgeometry; extern ModeHook init_geometry;
extern ModeHook draw_tqgeometry; extern ModeHook draw_geometry;
extern ModeHook release_tqgeometry; extern ModeHook release_geometry;
extern ModeHook refresh_tqgeometry; extern ModeHook refresh_geometry;
extern ModeSpecOpt geometry_opts; extern ModeSpecOpt geometry_opts;
extern ModeHook init_grav; extern ModeHook init_grav;
@ -504,11 +504,11 @@ extern ModeHook release_rotor;
extern ModeHook refresh_rotor; extern ModeHook refresh_rotor;
extern ModeSpecOpt rotor_opts; extern ModeSpecOpt rotor_opts;
extern ModeHook init_tqshape; extern ModeHook init_shape;
extern ModeHook draw_tqshape; extern ModeHook draw_shape;
extern ModeHook release_tqshape; extern ModeHook release_shape;
extern ModeHook refresh_tqshape; extern ModeHook refresh_shape;
extern ModeSpecOpt tqshape_opts; extern ModeSpecOpt shape_opts;
extern ModeHook init_slip; extern ModeHook init_slip;
extern ModeHook draw_slip; extern ModeHook draw_slip;

@ -50,7 +50,7 @@
//#define TQT_CLEAN_NAMESPACE //#define TQT_CLEAN_NAMESPACE
#include <tqslider.h> #include <tqslider.h>
#include <tqlayout.h> #include <layout.h>
#include <kglobal.h> #include <kglobal.h>
#include <kconfig.h> #include <kconfig.h>
#include <krandomsequence.h> #include <krandomsequence.h>
@ -275,7 +275,7 @@ static void Init(void)
glDisable(GL_DITHER); glDisable(GL_DITHER);
} }
void retqshape(int width, int height) void reshape(int width, int height)
{ {
windW = (GLint)width; windW = (GLint)width;
@ -444,7 +444,7 @@ initSpace(Window window)
glClearIndex(BlackPixel(display, screen)); glClearIndex(BlackPixel(display, screen));
} }
retqshape(xwa.width, xwa.height); reshape(xwa.width, xwa.height);
Init(); Init();
} }
@ -725,8 +725,8 @@ void main(int argc, char **argv)
Init(); Init();
tkExposeFunc(Retqshape); tkExposeFunc(Reshape);
tkRetqshapeFunc(Retqshape); tkReshapeFunc(Reshape);
tkKeyDownFunc(Key); tkKeyDownFunc(Key);
tkIdleFunc(Idle); tkIdleFunc(Idle);
tkExec(); tkExec();

@ -12,7 +12,7 @@
Contact me in case of problems, not the original author! Contact me in case of problems, not the original author!
Last revised: 10-Jul-97 Last revised: 10-Jul-97
*/ */
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
#define MAXSPEED 100 #define MAXSPEED 100
#define MINSPEED 0 #define MINSPEED 0
@ -220,7 +220,7 @@ drawswarm(Window win, KRandomSequence &rnd)
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqcolor.h> #include <tqcolor.h>
#include <tqlayout.h> #include <layout.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>

@ -139,7 +139,7 @@ extern char *text_pass;
extern char *text_info; extern char *text_info;
extern char *text_valid; extern char *text_valid;
extern char *text_invalid; extern char *text_invalid;
extern char *tqgeometry; extern char *geometry;
extern float saturation; extern float saturation;
extern int nicelevel; extern int nicelevel;
extern int delay; extern int delay;

@ -211,7 +211,7 @@ void dotNETstyle::renderButton(TQPainter *p,
p->setBrush(TQBrush::NoBrush); p->setBrush(TQBrush::NoBrush);
p->drawConvexPolygon(outline); p->drawConvexPolygon(outline);
p->setPen(g.button().light()); p->setPen(g.button().light());
p->tqdrawPolyline(outline, 0, 3); p->drawPolyline(outline, 0, 3);
} else { } else {
p->setPen(g.button().dark()); p->setPen(g.button().dark());
p->setBrush(g.button()); p->setBrush(g.button());
@ -335,13 +335,13 @@ void dotNETstyle::renderPanel(TQPainter *p,
p->setPen(g.background().dark()); p->setPen(g.background().dark());
p->drawConvexPolygon(TQPointArray(4, corners)); p->drawConvexPolygon(TQPointArray(4, corners));
p->setPen(g.background().light()); p->setPen(g.background().light());
p->tqdrawPolyline(TQPointArray(4, corners), 0, 3); p->drawPolyline(TQPointArray(4, corners), 0, 3);
} else { } else {
const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 }; const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
p->setPen(g.background().dark()); p->setPen(g.background().dark());
p->drawPolygon(TQPointArray(4, corners)); p->drawPolygon(TQPointArray(4, corners));
p->setPen(g.background().light()); p->setPen(g.background().light());
p->tqdrawPolyline(TQPointArray(4, corners), 0, 3); p->drawPolyline(TQPointArray(4, corners), 0, 3);
} }
} }
@ -353,13 +353,13 @@ void dotNETstyle::renderPanel(TQPainter *p,
p->setPen(g.background().dark()); p->setPen(g.background().dark());
p->drawConvexPolygon(TQPointArray(4, corners)); p->drawConvexPolygon(TQPointArray(4, corners));
p->setPen(g.background().light()); p->setPen(g.background().light());
p->tqdrawPolyline(TQPointArray(4, corners), 0, 3); p->drawPolyline(TQPointArray(4, corners), 0, 3);
} else { } else {
const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 }; const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
p->setPen(g.background().dark()); p->setPen(g.background().dark());
p->drawPolygon(TQPointArray(4, corners)); p->drawPolygon(TQPointArray(4, corners));
p->setPen(g.background().light()); p->setPen(g.background().light());
p->tqdrawPolyline(TQPointArray(4, corners), 0, 3); p->drawPolyline(TQPointArray(4, corners), 0, 3);
} }
} }
} }
@ -719,8 +719,8 @@ void dotNETstyle::tqdrawPrimitive(TQ_PrimitiveElement pe,
p->save(); p->save();
if (flags & Style_Down) { if (flags & Style_Down) {
p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), p->translate(pixelMetric(PM_ButtonShiftHorizontal),
tqpixelMetric(PM_ButtonShiftVertical)); pixelMetric(PM_ButtonShiftVertical));
} }
if (flags & Style_Enabled) { if (flags & Style_Enabled) {
@ -757,7 +757,7 @@ void dotNETstyle::tqdrawPrimitive(TQ_PrimitiveElement pe,
} }
void dotNETstyle::tqdrawControl(TQ_ControlElement element, void dotNETstyle::drawControl(TQ_ControlElement element,
TQPainter *p, TQPainter *p,
const TQWidget *widget, const TQWidget *widget,
const TQRect &r, const TQRect &r,
@ -827,7 +827,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
p->setPen(cg.highlight().dark(120)); p->setPen(cg.highlight().dark(120));
p->drawConvexPolygon(corners); p->drawConvexPolygon(corners);
p->setPen(cg.highlight().light(120)); p->setPen(cg.highlight().light(120));
p->tqdrawPolyline(corners, 0, 3); p->drawPolyline(corners, 0, 3);
if (roundedCorners) { if (roundedCorners) {
p->setPen(cg.background().dark()); p->setPen(cg.background().dark());
p->drawPoints(corners); p->drawPoints(corners);
@ -857,7 +857,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
case CE_TabBarTab: { case CE_TabBarTab: {
const TQTabBar *tb = (const TQTabBar *) widget; const TQTabBar *tb = (const TQTabBar *) widget;
bool cornerWidget = false; bool cornerWidget = false;
TQTabBar::Shape tbs = tb->tqshape(); TQTabBar::Shape tbs = tb->shape();
bool selected = flags & Style_Selected; bool selected = flags & Style_Selected;
int x, x2, y, y2, w, h; int x, x2, y, y2, w, h;
r.rect(&x, &y, &w, &h); r.rect(&x, &y, &w, &h);
@ -878,7 +878,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
p->setPen(cg.background().dark()); p->setPen(cg.background().dark());
if (selected) { if (selected) {
const TQCOORD oCorners[] = { x, y2, x, y, x2, y, x2, y2 }; const TQCOORD oCorners[] = { x, y2, x, y, x2, y, x2, y2 };
p->tqdrawPolyline(TQPointArray(4, oCorners)); p->drawPolyline(TQPointArray(4, oCorners));
if (roundedCorners) { if (roundedCorners) {
p->setPen(cg.background()); p->setPen(cg.background());
@ -898,7 +898,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
p->fillRect(r2, TQColor(cg.mid().light(105))); p->fillRect(r2, TQColor(cg.mid().light(105)));
const TQCOORD oCorners[] = { x, y2, x, y + 2, x2, y + 2, x2, y2 }; const TQCOORD oCorners[] = { x, y2, x, y + 2, x2, y + 2, x2, y2 };
p->tqdrawPolyline(TQPointArray(4, oCorners)); p->drawPolyline(TQPointArray(4, oCorners));
p->setPen(cg.background()); p->setPen(cg.background());
@ -952,7 +952,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
p->setPen(cg.background().dark()); p->setPen(cg.background().dark());
if (selected) { if (selected) {
const TQCOORD oCorners[] = { x, y + 1, x, y2, x2, y2, x2, y + 1 }; const TQCOORD oCorners[] = { x, y + 1, x, y2, x2, y2, x2, y + 1 };
p->tqdrawPolyline(TQPointArray(4, oCorners)); p->drawPolyline(TQPointArray(4, oCorners));
p->setPen(cg.background().dark(115)); p->setPen(cg.background().dark(115));
p->drawLine(x + 1, y + h - 2, x + w - 2, y + h - 2); p->drawLine(x + 1, y + h - 2, x + w - 2, y + h - 2);
@ -967,7 +967,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
TQRect r2(x + 1, y + 2, w - 2, h - 5); TQRect r2(x + 1, y + 2, w - 2, h - 5);
p->fillRect(r2, cg.mid().light(105)); p->fillRect(r2, cg.mid().light(105));
p->tqdrawPolyline(TQPointArray(4, oCorners)); p->drawPolyline(TQPointArray(4, oCorners));
p->setPen(cg.mid().dark(115)); p->setPen(cg.mid().dark(115));
/* Inner right border */ /* Inner right border */
@ -1019,7 +1019,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
} }
default: default:
winstyle->tqdrawControl(element, p, widget, r, cg, flags, opt); winstyle->drawControl(element, p, widget, r, cg, flags, opt);
} }
break; break;
@ -1039,8 +1039,8 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
p->setPen(flags & Style_Enabled ? TQColor(cg.foreground()) : TQColor(cg.mid().dark())); p->setPen(flags & Style_Enabled ? TQColor(cg.foreground()) : TQColor(cg.mid().dark()));
if (!flags & Style_Selected) { if (!flags & Style_Selected) {
p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), p->translate(pixelMetric(PM_ButtonShiftHorizontal),
tqpixelMetric(PM_ButtonShiftVertical)); pixelMetric(PM_ButtonShiftVertical));
} }
p->drawText(r, text_flags, opt.tab()->text()); p->drawText(r, text_flags, opt.tab()->text());
@ -1057,7 +1057,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
TQRect br = r; TQRect br = r;
bool btnDefault = button->isDefault(); bool btnDefault = button->isDefault();
static int di = tqpixelMetric(PM_ButtonDefaultIndicator); static int di = pixelMetric(PM_ButtonDefaultIndicator);
br.addCoords(di, di, -di, -di); br.addCoords(di, di, -di, -di);
if (btnDefault) { if (btnDefault) {
@ -1076,8 +1076,8 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
TQRect ur(r); TQRect ur(r);
if (flags & Style_Down) { if (flags & Style_Down) {
p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), p->translate(pixelMetric(PM_ButtonShiftHorizontal),
tqpixelMetric(PM_ButtonShiftVertical)); pixelMetric(PM_ButtonShiftVertical));
} }
if (!pb->text().isEmpty() && (flags & Style_ButtonDefault)) { if (!pb->text().isEmpty() && (flags & Style_ButtonDefault)) {
@ -1120,13 +1120,13 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
} }
if (!pb->text().isEmpty()) { if (!pb->text().isEmpty()) {
p->setPen(enabled ? cg.foreground() : pb->tqpalette().disabled().buttonText()); p->setPen(enabled ? cg.foreground() : pb->palette().disabled().buttonText());
p->drawText(ur, text_flags, pb->text()); p->drawText(ur, text_flags, pb->text());
} }
if ( flags & Style_HasFocus ) if ( flags & Style_HasFocus )
tqdrawPrimitive( PE_FocusRect, p, tqdrawPrimitive( PE_FocusRect, p,
tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, flags ); cg, flags );
break; break;
@ -1257,7 +1257,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
pmr.moveCenter(cr.center()); pmr.moveCenter(cr.center());
if (TQApplication::reverseLayout()) if (TQApplication::reverseLayout())
pmr = tqvisualRect( pmr, r ); pmr = visualRect( pmr, r );
p->setPen(cg.highlightedText()); p->setPen(cg.highlightedText());
p->drawPixmap(pmr.topLeft(), pixmap); p->drawPixmap(pmr.topLeft(), pixmap);
@ -1295,7 +1295,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
TQRect rr = TQRect(xp, y+m, tab, h-(2*m)); TQRect rr = TQRect(xp, y+m, tab, h-(2*m));
if (TQApplication::reverseLayout()) if (TQApplication::reverseLayout())
rr = tqvisualRect(rr, r); rr = visualRect(rr, r);
if (useTextShadows) { if (useTextShadows) {
TQPen op = p->pen(); TQPen op = p->pen();
@ -1310,7 +1310,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
TQRect rr = TQRect(xpos, y+m, w-xm-tab+1, h-(2*m)); TQRect rr = TQRect(xpos, y+m, w-xm-tab+1, h-(2*m));
if (TQApplication::reverseLayout()) { if (TQApplication::reverseLayout()) {
rr = tqvisualRect(rr, r); rr = visualRect(rr, r);
text_flags |= AlignRight; text_flags |= AlignRight;
} }
@ -1335,7 +1335,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
} }
if (mi->popup()) { if (mi->popup()) {
int dim = tqpixelMetric(PM_MenuButtonIndicator); int dim = pixelMetric(PM_MenuButtonIndicator);
xpos = x+w - arrowHMargin - 2*itemFrame - dim; xpos = x+w - arrowHMargin - 2*itemFrame - dim;
@ -1347,7 +1347,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
TQRect rr = TQRect(xpos, y + h/2 - dim/2, dim, dim); TQRect rr = TQRect(xpos, y + h/2 - dim/2, dim, dim);
if (TQApplication::reverseLayout()) if (TQApplication::reverseLayout())
rr = tqvisualRect( rr, r ); rr = visualRect( rr, r );
tqdrawPrimitive((TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight), p, rr, cg, Style_Enabled); tqdrawPrimitive((TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight), p, rr, cg, Style_Enabled);
} }
@ -1364,7 +1364,7 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
TQRect rr = TQRect( xp + 6, y + 6, 16, h - 6 ); TQRect rr = TQRect( xp + 6, y + 6, 16, h - 6 );
if (TQApplication::reverseLayout()) if (TQApplication::reverseLayout())
rr = tqvisualRect( rr, r ); rr = visualRect( rr, r );
tqdrawPrimitive(PE_CheckMark, p, rr, cg, cflags); tqdrawPrimitive(PE_CheckMark, p, rr, cg, cflags);
} }
@ -1380,11 +1380,11 @@ void dotNETstyle::tqdrawControl(TQ_ControlElement element,
p->fillRect(r, cg.button()); p->fillRect(r, cg.button());
break; break;
default: default:
winstyle->tqdrawControl(element, p, widget, r, cg, flags, opt); winstyle->drawControl(element, p, widget, r, cg, flags, opt);
} }
} }
void dotNETstyle::tqdrawControlMask(TQ_ControlElement element, void dotNETstyle::drawControlMask(TQ_ControlElement element,
TQPainter *p, TQPainter *p,
const TQWidget *w, const TQWidget *w,
const TQRect &r, const TQRect &r,
@ -1407,12 +1407,12 @@ void dotNETstyle::tqdrawControlMask(TQ_ControlElement element,
} }
default: { default: {
KStyle::tqdrawControlMask (element, p, w, r, opt); KStyle::drawControlMask (element, p, w, r, opt);
} }
} }
} }
void dotNETstyle::tqdrawComplexControlMask(ComplexControl c, void dotNETstyle::drawComplexControlMask(ComplexControl c,
TQPainter *p, TQPainter *p,
const TQWidget *w, const TQWidget *w,
const TQRect &r, const TQRect &r,
@ -1434,12 +1434,12 @@ void dotNETstyle::tqdrawComplexControlMask(ComplexControl c,
break; break;
} }
default: { default: {
KStyle::tqdrawComplexControlMask (c, p, w, r, o); KStyle::drawComplexControlMask (c, p, w, r, o);
} }
} }
} }
void dotNETstyle::tqdrawComplexControl(ComplexControl control, void dotNETstyle::drawComplexControl(ComplexControl control,
TQPainter *p, TQPainter *p,
const TQWidget *widget, const TQWidget *widget,
const TQRect &r, const TQRect &r,
@ -1489,13 +1489,13 @@ void dotNETstyle::tqdrawComplexControl(ComplexControl control,
} }
TQRect hr = (pseudo3D ? TQRect(w - handle_offset - 1, y, handle_width + 2, h) : TQRect(w - handle_offset - 1, y + 1, handle_width + 2, h - 1)); TQRect hr = (pseudo3D ? TQRect(w - handle_offset - 1, y, handle_width + 2, h) : TQRect(w - handle_offset - 1, y + 1, handle_width + 2, h - 1));
if (TQApplication::reverseLayout()) { hr = tqvisualRect(hr, r); } if (TQApplication::reverseLayout()) { hr = visualRect(hr, r); }
p->drawRect(hr); p->drawRect(hr);
p->setBrush(NoBrush); p->setBrush(NoBrush);
TQRect rr = (pseudo3D ? TQRect(x + 1, y + 1, w - 2, h - 2) : TQRect(x + 1, y + 1, w - 1, h - 1)); TQRect rr = (pseudo3D ? TQRect(x + 1, y + 1, w - 2, h - 2) : TQRect(x + 1, y + 1, w - 1, h - 1));
if (TQApplication::reverseLayout()) { rr = tqvisualRect( rr, r ); } if (TQApplication::reverseLayout()) { rr = visualRect( rr, r ); }
if (flags & Style_HasFocus || cg.highlight() == cg.midlight() || if (flags & Style_HasFocus || cg.highlight() == cg.midlight() ||
(cb->listBox() && cb->listBox()->isVisible())) { (cb->listBox() && cb->listBox()->isVisible())) {
@ -1516,10 +1516,10 @@ void dotNETstyle::tqdrawComplexControl(ComplexControl control,
ca.setPoint(1, hr.bottomRight()); ca.setPoint(1, hr.bottomRight());
ca.setPoint(2, hr.bottomLeft()); ca.setPoint(2, hr.bottomLeft());
p->setPen(test.dark(120)); p->setPen(test.dark(120));
p->tqdrawPolyline(ca); p->drawPolyline(ca);
p->setPen(test.light(120)); p->setPen(test.light(120));
ca.setPoint(1, hr.topLeft()); ca.setPoint(1, hr.topLeft());
p->tqdrawPolyline(ca); p->drawPolyline(ca);
p->restore(); p->restore();
} }
@ -1544,7 +1544,7 @@ void dotNETstyle::tqdrawComplexControl(ComplexControl control,
TQRect pmr(0, 0, 7, 4); TQRect pmr(0, 0, 7, 4);
pmr.moveCenter(cr.center()); pmr.moveCenter(cr.center());
if (TQApplication::reverseLayout()) { if (TQApplication::reverseLayout()) {
pmr = tqvisualRect( pmr, r ); pmr = visualRect( pmr, r );
} }
p->drawPixmap(pmr.topLeft(), downArrow); p->drawPixmap(pmr.topLeft(), downArrow);
@ -1608,7 +1608,7 @@ void dotNETstyle::tqdrawComplexControl(ComplexControl control,
TQ_PrimitiveElement pe; TQ_PrimitiveElement pe;
TQRect swf = querySubControlMetrics(control, sw, SC_SpinWidgetFrame); TQRect swf = querySubControlMetrics(control, sw, SC_SpinWidgetFrame);
swf = tqvisualRect( swf, sw ); swf = visualRect( swf, sw );
if (controls & SC_SpinWidgetFrame) { if (controls & SC_SpinWidgetFrame) {
// Don't draw the WindowsStyle thick frame. // Don't draw the WindowsStyle thick frame.
@ -1629,7 +1629,7 @@ void dotNETstyle::tqdrawComplexControl(ComplexControl control,
pe = PE_SpinWidgetUp; pe = PE_SpinWidgetUp;
TQRect re = sw->upRect(); TQRect re = sw->upRect();
TQColorGroup ucg = sw->isUpEnabled() ? cg : sw->tqpalette().disabled(); TQColorGroup ucg = sw->isUpEnabled() ? cg : sw->palette().disabled();
p->fillRect(re.x() + 1, re.y() + 1, re.width() - 2, re.height() - 1, flags & Style_Raised ? ucg.background() : ucg.highlight()); p->fillRect(re.x() + 1, re.y() + 1, re.width() - 2, re.height() - 1, flags & Style_Raised ? ucg.background() : ucg.highlight());
if (pseudo3D) { if (pseudo3D) {
const TQCOORD corners[] = { re.x(), re.bottom(), re.x(), re.y() + 1, re.x() + 1, re.y(), re.right() - 1, re.y(), re.right(), re.y() + 1, re.right(), re.bottom() }; const TQCOORD corners[] = { re.x(), re.bottom(), re.x(), re.y() + 1, re.x() + 1, re.y(), re.right() - 1, re.y(), re.right(), re.y() + 1, re.right(), re.bottom() };
@ -1661,7 +1661,7 @@ void dotNETstyle::tqdrawComplexControl(ComplexControl control,
pe = PE_SpinWidgetDown; pe = PE_SpinWidgetDown;
TQRect re = sw->downRect(); TQRect re = sw->downRect();
TQColorGroup dcg = sw->isDownEnabled() ? cg : sw->tqpalette().disabled(); TQColorGroup dcg = sw->isDownEnabled() ? cg : sw->palette().disabled();
p->fillRect(re.x() + 1, re.y(), re.width() - 2, re.height() - 1, flags & Style_Raised ? dcg.background() : dcg.highlight()); p->fillRect(re.x() + 1, re.y(), re.width() - 2, re.height() - 1, flags & Style_Raised ? dcg.background() : dcg.highlight());
if (pseudo3D) { if (pseudo3D) {
const TQCOORD corners[] = { const TQCOORD corners[] = {
@ -1690,7 +1690,7 @@ void dotNETstyle::tqdrawComplexControl(ComplexControl control,
} }
default: default:
KStyle::tqdrawComplexControl(control, p, widget, KStyle::drawComplexControl(control, p, widget,
r, cg, flags, controls, r, cg, flags, controls,
active, opt); active, opt);
break; break;
@ -1708,7 +1708,7 @@ TQRect dotNETstyle::subRect(SubRect r, const TQWidget *widget) const
case SR_PushButtonFocusRect: { case SR_PushButtonFocusRect: {
TQRect rect = widget->rect(); TQRect rect = widget->rect();
int margin = tqpixelMetric(PM_ButtonDefaultIndicator, widget) + tqpixelMetric(PM_DefaultFrameWidth, widget) + 2; int margin = pixelMetric(PM_ButtonDefaultIndicator, widget) + pixelMetric(PM_DefaultFrameWidth, widget) + 2;
rect.addCoords(margin, margin, -margin, -margin); rect.addCoords(margin, margin, -margin, -margin);
return rect; return rect;
@ -1749,7 +1749,7 @@ TQRect dotNETstyle::querySubControlMetrics(ComplexControl control,
} }
case CC_SpinWidget: { case CC_SpinWidget: {
int fw = tqpixelMetric(PM_SpinBoxFrameWidth, widget); int fw = pixelMetric(PM_SpinBoxFrameWidth, widget);
TQSize bs; TQSize bs;
bs.setHeight(TQMAX(8, widget->height()/2)); bs.setHeight(TQMAX(8, widget->height()/2));
bs.setWidth(TQMIN(bs.height() * 8 / 5, widget->width() / 4)); bs.setWidth(TQMIN(bs.height() * 8 / 5, widget->width() / 4));
@ -1787,15 +1787,15 @@ TQRect dotNETstyle::querySubControlMetrics(ComplexControl control,
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt); return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
} }
int dotNETstyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const int dotNETstyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{ {
switch(m) { switch(m) {
// TABS // TABS
// ---- // ----
case PM_TabBarTabVSpace: { case PM_TabBarTabVSpace: {
const TQTabBar * tb = (const TQTabBar *) widget; const TQTabBar * tb = (const TQTabBar *) widget;
if (tb->tqshape() == TQTabBar::RoundedAbove || if (tb->shape() == TQTabBar::RoundedAbove ||
tb->tqshape() == TQTabBar::RoundedBelow) tb->shape() == TQTabBar::RoundedBelow)
return 12; return 12;
else else
return 0; return 0;
@ -1803,8 +1803,8 @@ int dotNETstyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
case PM_TabBarTabOverlap: { case PM_TabBarTabOverlap: {
const TQTabBar* tb = (const TQTabBar*)widget; const TQTabBar* tb = (const TQTabBar*)widget;
if (tb->tqshape() != TQTabBar::RoundedAbove && if (tb->shape() != TQTabBar::RoundedAbove &&
tb->tqshape() != TQTabBar::RoundedBelow) tb->shape() != TQTabBar::RoundedBelow)
return 3; // Leave standard size alone return 3; // Leave standard size alone
else else
return 1; // Change size for our tabs only return 1; // Change size for our tabs only
@ -1878,7 +1878,7 @@ int dotNETstyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
} }
default: default:
return KStyle::tqpixelMetric(m, widget); return KStyle::pixelMetric(m, widget);
} }
} }
@ -1901,8 +1901,8 @@ TQSize dotNETstyle::tqsizeFromContents(ContentsType t,
bool checkable = popup->isCheckable(); bool checkable = popup->isCheckable();
if (mi->custom()) { if (mi->custom()) {
w = mi->custom()->tqsizeHint().width(); w = mi->custom()->sizeHint().width();
h = mi->custom()->tqsizeHint().height(); h = mi->custom()->sizeHint().height();
} else if (mi->widget()) { } else if (mi->widget()) {
// don't change the size in this case. // don't change the size in this case.
} else if (mi->isSeparator()) { } else if (mi->isSeparator()) {
@ -1945,8 +1945,8 @@ TQSize dotNETstyle::tqsizeFromContents(ContentsType t,
const TQPushButton* button = (const TQPushButton*) widget; const TQPushButton* button = (const TQPushButton*) widget;
int w = s.width(); int w = s.width();
int h = s.height(); int h = s.height();
int bm = tqpixelMetric( PM_ButtonMargin, widget ); int bm = pixelMetric( PM_ButtonMargin, widget );
int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
//We use bold font sometimes, so that make take more space than TQt allocated. //We use bold font sometimes, so that make take more space than TQt allocated.
TQFontMetrics origFM = button->fontMetrics(); TQFontMetrics origFM = button->fontMetrics();
@ -1968,7 +1968,7 @@ TQSize dotNETstyle::tqsizeFromContents(ContentsType t,
// Compensate for default indicator. Doing it for all widgets lets us // Compensate for default indicator. Doing it for all widgets lets us
// workaround changes in auto-default behavior in KDialogBase in 3.3 // workaround changes in auto-default behavior in KDialogBase in 3.3
int di = tqpixelMetric( PM_ButtonDefaultIndicator ); int di = pixelMetric( PM_ButtonDefaultIndicator );
w += di * 2; w += di * 2;
h += di * 2; h += di * 2;
@ -2011,7 +2011,7 @@ void dotNETstyle::paletteChanged()
void dotNETstyle::updatePalette( TQComboBox *combo ) void dotNETstyle::updatePalette( TQComboBox *combo )
{ {
TQPalette pal = TQApplication::tqpalette(); TQPalette pal = TQApplication::palette();
pal.setColor(TQColorGroup::Dark, pal.setColor(TQColorGroup::Dark,
pal.active().color(TQColorGroup::Base)); pal.active().color(TQColorGroup::Base));
pal.setColor(TQColorGroup::Midlight, pal.setColor(TQColorGroup::Midlight,
@ -2021,7 +2021,7 @@ void dotNETstyle::updatePalette( TQComboBox *combo )
void dotNETstyle::updatePalette( TQToolBar *bar ) void dotNETstyle::updatePalette( TQToolBar *bar )
{ {
TQPalette pal = TQApplication::tqpalette(); TQPalette pal = TQApplication::palette();
pal.setColor(TQColorGroup::Button, pal.setColor(TQColorGroup::Button,
pal.active().color(TQColorGroup::Background)); pal.active().color(TQColorGroup::Background));
bar->setPalette(pal); bar->setPalette(pal);
@ -2029,7 +2029,7 @@ void dotNETstyle::updatePalette( TQToolBar *bar )
void dotNETstyle::updatePalette( TQMenuBar *bar ) void dotNETstyle::updatePalette( TQMenuBar *bar )
{ {
TQPalette pal = TQApplication::tqpalette(); TQPalette pal = TQApplication::palette();
pal.setColor(TQColorGroup::Button, pal.setColor(TQColorGroup::Button,
pal.active().color(TQColorGroup::Background)); pal.active().color(TQColorGroup::Background));
bar->setPalette(pal); bar->setPalette(pal);
@ -2046,7 +2046,7 @@ bool dotNETstyle::eventFilter(TQObject *obj, TQEvent *ev)
if (ev->type() == TQEvent::Enter) { if (ev->type() == TQEvent::Enter) {
TQWidget *btn = (TQWidget *)obj; TQWidget *btn = (TQWidget *)obj;
if (btn->isEnabled()) { if (btn->isEnabled()) {
TQPalette pal = btn->tqpalette(); TQPalette pal = btn->palette();
pal.setColor(TQColorGroup::Dark, pal.setColor(TQColorGroup::Dark,
pal.active().color(TQColorGroup::Highlight).dark()); pal.active().color(TQColorGroup::Highlight).dark());
pal.setColor(TQColorGroup::Midlight, pal.setColor(TQColorGroup::Midlight,
@ -2055,7 +2055,7 @@ bool dotNETstyle::eventFilter(TQObject *obj, TQEvent *ev)
} }
} else if (ev->type() == TQEvent::Leave) { } else if (ev->type() == TQEvent::Leave) {
TQWidget *btn = (TQWidget *)obj; TQWidget *btn = (TQWidget *)obj;
TQPalette pal = btn->tqpalette(); TQPalette pal = btn->palette();
pal.setColor(TQColorGroup::Dark, pal.setColor(TQColorGroup::Dark,
pal.active().color(TQColorGroup::Base)); pal.active().color(TQColorGroup::Base));
pal.setColor(TQColorGroup::Midlight, pal.setColor(TQColorGroup::Midlight,
@ -2064,7 +2064,7 @@ bool dotNETstyle::eventFilter(TQObject *obj, TQEvent *ev)
} }
} else if (obj->inherits(TQBUTTON_OBJECT_NAME_STRING)) { } else if (obj->inherits(TQBUTTON_OBJECT_NAME_STRING)) {
TQWidget *btn = (TQWidget *)obj; TQWidget *btn = (TQWidget *)obj;
TQPalette pal = btn->tqpalette(); TQPalette pal = btn->palette();
pal.setColor(TQColorGroup::Button, pal.setColor(TQColorGroup::Button,
pal.active().color(TQColorGroup::Background)); pal.active().color(TQColorGroup::Background));
btn->setPalette(pal); btn->setPalette(pal);

@ -62,7 +62,7 @@ public:
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption &opt = TQStyleOption::Default ) const; const TQStyleOption &opt = TQStyleOption::Default ) const;
void tqdrawControl( TQ_ControlElement element, void drawControl( TQ_ControlElement element,
TQPainter *p, TQPainter *p,
const TQWidget *widget, const TQWidget *widget,
const TQRect &r, const TQRect &r,
@ -70,9 +70,9 @@ public:
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
void tqdrawControlMask( TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const; void drawControlMask( TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
void tqdrawComplexControl( ComplexControl control, void drawComplexControl( ComplexControl control,
TQPainter *p, TQPainter *p,
const TQWidget *widget, const TQWidget *widget,
const TQRect &r, const TQRect &r,
@ -82,7 +82,7 @@ public:
SCFlags active = SC_None, SCFlags active = SC_None,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
int tqpixelMetric( PixelMetric m, int pixelMetric( PixelMetric m,
const TQWidget *widget = 0 ) const; const TQWidget *widget = 0 ) const;
TQRect subRect( SubRect r, TQRect subRect( SubRect r,
@ -93,7 +93,7 @@ public:
SubControl subcontrol, SubControl subcontrol,
const TQStyleOption &opt = TQStyleOption::Default ) const; const TQStyleOption &opt = TQStyleOption::Default ) const;
void tqdrawComplexControlMask(TQStyle::ComplexControl c, void drawComplexControlMask(TQStyle::ComplexControl c,
TQPainter *p, TQPainter *p,
const TQWidget *w, const TQWidget *w,
const TQRect &r, const TQRect &r,

@ -421,7 +421,7 @@ void PhaseStyle::drawPhaseTab(TQPainter *painter,
edge = false; edge = false;
} }
switch (TQTabBar::Shape(bar->tqshape())) { switch (TQTabBar::Shape(bar->shape())) {
case TQTabBar::RoundedAbove: case TQTabBar::RoundedAbove:
case TQTabBar::TriangularAbove: { case TQTabBar::TriangularAbove: {
// is there a corner widget? // is there a corner widget?
@ -727,8 +727,8 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
case PE_Indicator: case PE_Indicator:
drawPhasePanel(painter, x+1, y+1, w-2, h-2, group, true, enabled ? drawPhasePanel(painter, x+1, y+1, w-2, h-2, group, true, enabled ?
&group.tqbrush(TQColorGroup::Base) : &group.brush(TQColorGroup::Base) :
&group.tqbrush(TQColorGroup::Background)); &group.brush(TQColorGroup::Background));
if (on) { if (on) {
painter->setPen(mouseover painter->setPen(mouseover
@ -736,7 +736,7 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
: group.dark()); : group.dark());
painter->drawRect(x+4, y+4, w-8, h-8); painter->drawRect(x+4, y+4, w-8, h-8);
painter->fillRect(x+5, y+5, w-10, h-10, painter->fillRect(x+5, y+5, w-10, h-10,
group.tqbrush(TQColorGroup::Highlight)); group.brush(TQColorGroup::Highlight));
} else if (mouseover) { } else if (mouseover) {
painter->setPen(TQColor(group.highlight().dark(contrast))); painter->setPen(TQColor(group.highlight().dark(contrast)));
painter->drawRect(x+4, y+4, w-8, h-8); painter->drawRect(x+4, y+4, w-8, h-8);
@ -749,7 +749,7 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
break; break;
case PE_ExclusiveIndicator: { case PE_ExclusiveIndicator: {
// note that this requires an even size from tqpixelMetric // note that this requires an even size from pixelMetric
cx = (x + x2) / 2; cx = (x + x2) / 2;
cy = (y + y2) / 2; cy = (y + y2) / 2;
@ -761,14 +761,14 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
parray.putPoints(0, 8, parray.putPoints(0, 8,
x+1,cy+1, x+1,cy, cx,y+1, cx+1,y+1, x+1,cy+1, x+1,cy, cx,y+1, cx+1,y+1,
x2-1,cy, x2-1,cy+1, cx+1,y2-1, cx,y2-1); x2-1,cy, x2-1,cy+1, cx+1,y2-1, cx,y2-1);
painter->tqdrawConvexPolygon(parray, 0, 8); painter->drawConvexPolygon(parray, 0, 8);
painter->setPen(group.mid()); painter->setPen(group.mid());
parray.putPoints(0, 4, x,cy, cx,y, cx+1,y, x2,cy); parray.putPoints(0, 4, x,cy, cx,y, cx+1,y, x2,cy);
painter->tqdrawPolyline(parray, 0, 4); painter->drawPolyline(parray, 0, 4);
painter->setPen(group.midlight()); painter->setPen(group.midlight());
parray.putPoints(0, 4, x2,cy+1, cx+1,y2, cx,y2, x,cy+1); parray.putPoints(0, 4, x2,cy+1, cx+1,y2, cx,y2, x,cy+1);
painter->tqdrawPolyline(parray, 0, 4); painter->drawPolyline(parray, 0, 4);
if (on) { if (on) {
painter->setBrush(group.brush(TQColorGroup::Highlight)); painter->setBrush(group.brush(TQColorGroup::Highlight));
@ -778,14 +778,14 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
parray.putPoints(0, 8, parray.putPoints(0, 8,
x+4,cy+1, x+4,cy, cx,y+4, cx+1,y+4, x+4,cy+1, x+4,cy, cx,y+4, cx+1,y+4,
x2-4,cy, x2-4,cy+1, cx+1,y2-4, cx,y2-4); x2-4,cy, x2-4,cy+1, cx+1,y2-4, cx,y2-4);
painter->tqdrawConvexPolygon(parray, 0, 8); painter->drawConvexPolygon(parray, 0, 8);
} else if (mouseover) { } else if (mouseover) {
painter->setPen(TQColor(group.highlight().dark(contrast))); painter->setPen(TQColor(group.highlight().dark(contrast)));
parray.putPoints(0, 9, parray.putPoints(0, 9,
x+4,cy+1, x+4,cy, cx,y+4, cx+1,y+4, x+4,cy+1, x+4,cy, cx,y+4, cx+1,y+4,
x2-4,cy, x2-4,cy+1, cx+1,y2-4, cx,y2-4, x2-4,cy, x2-4,cy+1, cx+1,y2-4, cx,y2-4,
x+4,cy+1); x+4,cy+1);
painter->tqdrawPolyline(parray, 0, 9); painter->drawPolyline(parray, 0, 9);
} }
break; break;
} }
@ -798,13 +798,13 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
parray.putPoints(0, 8, parray.putPoints(0, 8,
x,cy+1, x,cy, cx,y, cx+1,y, x,cy+1, x,cy, cx,y, cx+1,y,
x2,cy, x2,cy+1, cx+1,y2, cx,y2); x2,cy, x2,cy+1, cx+1,y2, cx,y2);
painter->tqdrawConvexPolygon(parray, 0, 8); painter->drawConvexPolygon(parray, 0, 8);
painter->setPen(TQt::color0); painter->setPen(TQt::color0);
break; break;
case PE_DockWindowResizeHandle: case PE_DockWindowResizeHandle:
drawPhasePanel(painter, x, y, w, h, group, false, drawPhasePanel(painter, x, y, w, h, group, false,
&group.tqbrush(TQColorGroup::Background)); &group.brush(TQColorGroup::Background));
break; break;
case PE_Splitter: case PE_Splitter:
@ -1095,7 +1095,7 @@ void PhaseStyle::drawKStylePrimitive(KStylePrimitive element,
} }
} }
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Mid)); &group.brush(TQColorGroup::Mid));
break; break;
} }
@ -1127,11 +1127,11 @@ void PhaseStyle::drawKStylePrimitive(KStylePrimitive element,
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// tqdrawControl() // drawControl()
// ------------- // -------------
// Draw the control // Draw the control
void PhaseStyle::tqdrawControl(TQ_ControlElement element, void PhaseStyle::drawControl(TQ_ControlElement element,
TQPainter *painter, TQPainter *painter,
const TQWidget *widget, const TQWidget *widget,
const TQRect &rect, const TQRect &rect,
@ -1153,11 +1153,11 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
switch (element) { switch (element) {
case CE_PushButton: { case CE_PushButton: {
depress = flags & (Style_Down | Style_On); depress = flags & (Style_Down | Style_On);
int bd = tqpixelMetric(PM_ButtonDefaultIndicator, widget) + 1; int bd = pixelMetric(PM_ButtonDefaultIndicator, widget) + 1;
if ((flags & Style_ButtonDefault) && !depress) { if ((flags & Style_ButtonDefault) && !depress) {
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Mid)); &group.brush(TQColorGroup::Mid));
drawPhaseBevel(painter, x+bd, y+bd, w-bd*2, h-bd*2, group, drawPhaseBevel(painter, x+bd, y+bd, w-bd*2, h-bd*2, group,
(widget==hover_) (widget==hover_)
? TQColor(group.button().light(contrast)) ? TQColor(group.button().light(contrast))
@ -1181,7 +1181,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
case CE_PushButtonLabel: { case CE_PushButtonLabel: {
const TQPushButton* button = ::tqqt_cast<const TQPushButton*>(widget); const TQPushButton* button = ::tqqt_cast<const TQPushButton*>(widget);
if (!button) { if (!button) {
KStyle::tqdrawControl(element, painter, widget, rect, group, KStyle::drawControl(element, painter, widget, rect, group,
flags, option); flags, option);
return; return;
} }
@ -1193,7 +1193,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
} }
if (button->isMenuButton()) { // menu indicator if (button->isMenuButton()) { // menu indicator
int dx = tqpixelMetric(PM_MenuButtonIndicator, widget); int dx = pixelMetric(PM_MenuButtonIndicator, widget);
tqdrawPrimitive(PE_ArrowDown, painter, tqdrawPrimitive(PE_ArrowDown, painter,
TQRect(x+w-dx-2, y+2, dx, h-4), TQRect(x+w-dx-2, y+2, dx, h-4),
group, flags, option); group, flags, option);
@ -1232,24 +1232,24 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
for(int n=0; n<2; n++) { for(int n=0; n<2; n++) {
drawItem(painter, TQRect(x+n, y, w, h), drawItem(painter, TQRect(x+n, y, w, h),
AlignCenter | ShowPrefix, AlignCenter | ShowPrefix,
button->tqcolorGroup(), button->colorGroup(),
button->isEnabled(), button->isEnabled(),
button->pixmap(), button->pixmap(),
button->text(), -1, button->text(), -1,
(button->isEnabled()) ? (button->isEnabled()) ?
&button->tqcolorGroup().buttonText() : &button->colorGroup().buttonText() :
&button->tqcolorGroup().mid()); &button->colorGroup().mid());
} }
} else { // normal button } else { // normal button
drawItem(painter, TQRect(x, y, w, h), drawItem(painter, TQRect(x, y, w, h),
AlignCenter | ShowPrefix, AlignCenter | ShowPrefix,
button->tqcolorGroup(), button->colorGroup(),
button->isEnabled(), button->isEnabled(),
button->pixmap(), button->pixmap(),
button->text(), -1, button->text(), -1,
(button->isEnabled()) ? (button->isEnabled()) ?
&button->tqcolorGroup().buttonText() : &button->colorGroup().buttonText() :
&button->tqcolorGroup().mid()); &button->colorGroup().mid());
} }
break; break;
} }
@ -1259,14 +1259,14 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
const TQButton *b = ::tqqt_cast<const TQButton*>(widget); const TQButton *b = ::tqqt_cast<const TQButton*>(widget);
if (!b) return; if (!b) return;
int tqalignment = reverse_ ? AlignRight : AlignLeft; int alignment = reverse_ ? AlignRight : AlignLeft;
drawItem(painter, rect, tqalignment | AlignVCenter | ShowPrefix, drawItem(painter, rect, alignment | AlignVCenter | ShowPrefix,
group, flags & Style_Enabled, b->pixmap(), b->text()); group, flags & Style_Enabled, b->pixmap(), b->text());
// only draw focus if content (forms on html won't) // only draw focus if content (forms on html won't)
if ((flags & Style_HasFocus) && ((!b->text().isNull()) || b->pixmap())) { if ((flags & Style_HasFocus) && ((!b->text().isNull()) || b->pixmap())) {
tqdrawPrimitive(PE_FocusRect, painter, tqdrawPrimitive(PE_FocusRect, painter,
tqvisualRect(subRect(SR_RadioButtonFocusRect, visualRect(subRect(SR_RadioButtonFocusRect,
widget), widget), widget), widget),
group, flags); group, flags);
} }
@ -1296,7 +1296,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
case CE_MenuBarItem: { case CE_MenuBarItem: {
const TQMenuBar *mbar = ::tqqt_cast<const TQMenuBar*>(widget); const TQMenuBar *mbar = ::tqqt_cast<const TQMenuBar*>(widget);
if (!mbar) { if (!mbar) {
KStyle::tqdrawControl(element, painter, widget, rect, group, KStyle::drawControl(element, painter, widget, rect, group,
flags, option); flags, option);
return; return;
} }
@ -1306,7 +1306,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
if ((flags & Style_Active) && (flags & Style_HasFocus)) { if ((flags & Style_Active) && (flags & Style_HasFocus)) {
if (flags & Style_Down) { if (flags & Style_Down) {
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Background)); &group.brush(TQColorGroup::Background));
} else { } else {
drawPhaseBevel(painter, x, y, w, h, drawPhaseBevel(painter, x, y, w, h,
group, group.background(), group, group.background(),
@ -1327,7 +1327,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
case CE_PopupMenuItem: { case CE_PopupMenuItem: {
const TQPopupMenu *popup = ::tqqt_cast<const TQPopupMenu*>(widget); const TQPopupMenu *popup = ::tqqt_cast<const TQPopupMenu*>(widget);
if (!popup) { if (!popup) {
KStyle::tqdrawControl(element, painter, widget, rect, group, KStyle::drawControl(element, painter, widget, rect, group,
flags, option); flags, option);
return; return;
} }
@ -1341,7 +1341,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
int tabwidth = option.tabWidth(); int tabwidth = option.tabWidth();
int checkwidth = option.maxIconWidth(); int checkwidth = option.maxIconWidth();
bool checkable = popup->isCheckable(); bool checkable = popup->isCheckable();
bool etchtext = tqstyleHint(SH_EtchDisabledText); bool etchtext = styleHint(SH_EtchDisabledText);
active = flags & Style_Active; active = flags & Style_Active;
enabled = mi->isEnabled(); enabled = mi->isEnabled();
TQRect vrect; TQRect vrect;
@ -1380,7 +1380,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
pixmap = mi->iconSet()->pixmap(TQIconSet::Small, mode); pixmap = mi->iconSet()->pixmap(TQIconSet::Small, mode);
TQRect pmrect(0, 0, pixmap.width(), pixmap.height()); TQRect pmrect(0, 0, pixmap.width(), pixmap.height());
vrect = tqvisualRect(TQRect(x, y, checkwidth, h), rect); vrect = visualRect(TQRect(x, y, checkwidth, h), rect);
pmrect.moveCenter(vrect.center()); pmrect.moveCenter(vrect.center());
painter->drawPixmap(pmrect.topLeft(), pixmap); painter->drawPixmap(pmrect.topLeft(), pixmap);
} }
@ -1477,7 +1477,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
if (mi->popup()) { // draw submenu arrow if (mi->popup()) { // draw submenu arrow
TQ_PrimitiveElement arrow = reverse_ ? PE_ArrowLeft : PE_ArrowRight; TQ_PrimitiveElement arrow = reverse_ ? PE_ArrowLeft : PE_ArrowRight;
int dim = (h-2*ITEMFRAME) / 2; int dim = (h-2*ITEMFRAME) / 2;
vrect = tqvisualRect(TQRect(x + w - ARROWMARGIN - ITEMFRAME - dim, vrect = visualRect(TQRect(x + w - ARROWMARGIN - ITEMFRAME - dim,
y + h / 2 - dim / 2, dim, dim), rect); y + h / 2 - dim / 2, dim, dim), rect);
tqdrawPrimitive(arrow, painter, vrect, group, tqdrawPrimitive(arrow, painter, vrect, group,
enabled ? Style_Enabled : Style_Default); enabled ? Style_Enabled : Style_Default);
@ -1495,7 +1495,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
drawPhaseTab(painter, x, y, w, h, group, tab, option, drawPhaseTab(painter, x, y, w, h, group, tab, option,
flags); flags);
} else { // not a tabbar } else { // not a tabbar
KStyle::tqdrawControl(element, painter, widget, rect, group, KStyle::drawControl(element, painter, widget, rect, group,
flags, option); flags, option);
return; return;
} }
@ -1504,14 +1504,14 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
case CE_ProgressBarGroove: { case CE_ProgressBarGroove: {
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Base)); &group.brush(TQColorGroup::Base));
break; break;
} }
case CE_ProgressBarContents: { case CE_ProgressBarContents: {
const TQProgressBar* pbar = ::tqqt_cast<const TQProgressBar*>(widget); const TQProgressBar* pbar = ::tqqt_cast<const TQProgressBar*>(widget);
if (!pbar) { if (!pbar) {
KStyle::tqdrawControl(element, painter, widget, rect, group, KStyle::drawControl(element, painter, widget, rect, group,
flags, option); flags, option);
return; return;
} }
@ -1522,7 +1522,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
if (!pbar->totalSteps()) { if (!pbar->totalSteps()) {
// busy indicator // busy indicator
int bar = tqpixelMetric(PM_ProgressBarChunkWidth, widget) + 2; int bar = pixelMetric(PM_ProgressBarChunkWidth, widget) + 2;
int progress = pbar->progress() % ((w-bar) * 2); int progress = pbar->progress() % ((w-bar) * 2);
if (progress > (w-bar)) progress = 2 * (w-bar) - progress; if (progress > (w-bar)) progress = 2 * (w-bar) - progress;
painter->drawRect(x+progress+1, y+1, bar-2, h-2); painter->drawRect(x+progress+1, y+1, bar-2, h-2);
@ -1540,7 +1540,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
case CE_ToolBoxTab: { case CE_ToolBoxTab: {
const TQToolBox *box = ::tqqt_cast<const TQToolBox*>(widget); const TQToolBox *box = ::tqqt_cast<const TQToolBox*>(widget);
if (!box) { if (!box) {
KStyle::tqdrawControl(element, painter, widget, rect, group, KStyle::drawControl(element, painter, widget, rect, group,
flags, option); flags, option);
return; return;
} }
@ -1556,7 +1556,7 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
if (box->currentItem() && (flags & Style_Selected)) { if (box->currentItem() && (flags & Style_Selected)) {
painter->setPen(group.dark()); painter->setPen(group.dark());
painter->setBrush(box->currentItem()->paletteBackgroundColor()); painter->setBrush(box->currentItem()->paletteBackgroundColor());
painter->tqdrawConvexPolygon(parray, 0, 6); painter->drawConvexPolygon(parray, 0, 6);
painter->setBrush(NoBrush); painter->setBrush(NoBrush);
} else { } else {
painter->setClipRegion(parray, TQPainter::CoordPainter); painter->setClipRegion(parray, TQPainter::CoordPainter);
@ -1564,28 +1564,28 @@ void PhaseStyle::tqdrawControl(TQ_ControlElement element,
group.background(), group.background(),
false, 0, 0, 0, h*2, false); false, 0, 0, 0, h*2, false);
painter->setClipping(false); painter->setClipping(false);
painter->tqdrawPolyline(parray, 0, 4); painter->drawPolyline(parray, 0, 4);
} }
parray.putPoints(0, 4, x,y+1, cx,y+1, rx-2,y2-1, x2,y2-1); parray.putPoints(0, 4, x,y+1, cx,y+1, rx-2,y2-1, x2,y2-1);
painter->setPen(group.midlight()); painter->setPen(group.midlight());
painter->tqdrawPolyline(parray, 0, 4); painter->drawPolyline(parray, 0, 4);
break; break;
} }
default: default:
KStyle::tqdrawControl(element, painter, widget, rect, group, KStyle::drawControl(element, painter, widget, rect, group,
flags, option); flags, option);
} }
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// tqdrawControlMask() // drawControlMask()
// ----------------- // -----------------
// Draw a bitmask for the element // Draw a bitmask for the element
void PhaseStyle::tqdrawControlMask(TQ_ControlElement element, void PhaseStyle::drawControlMask(TQ_ControlElement element,
TQPainter *painter, TQPainter *painter,
const TQWidget *widget, const TQWidget *widget,
const TQRect &rect, const TQRect &rect,
@ -1598,16 +1598,16 @@ void PhaseStyle::tqdrawControlMask(TQ_ControlElement element,
break; break;
default: default:
KStyle::tqdrawControlMask(element, painter, widget, rect, option); KStyle::drawControlMask(element, painter, widget, rect, option);
} }
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// tqdrawComplexControl() // drawComplexControl()
// -------------------- // --------------------
// Draw a complex control // Draw a complex control
void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control, void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
TQPainter *painter, TQPainter *painter,
const TQWidget *widget, const TQWidget *widget,
const TQRect &rect, const TQRect &rect,
@ -1629,7 +1629,7 @@ void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control,
case CC_ComboBox: { case CC_ComboBox: {
const TQComboBox * combo = ::tqqt_cast<const TQComboBox*>(widget); const TQComboBox * combo = ::tqqt_cast<const TQComboBox*>(widget);
if (!combo) { if (!combo) {
KStyle::tqdrawComplexControl(control, painter, widget, rect, group, KStyle::drawComplexControl(control, painter, widget, rect, group,
flags, controls, active, option); flags, controls, active, option);
return; return;
} }
@ -1641,20 +1641,20 @@ void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control,
: group.button(), sunken); : group.button(), sunken);
if (controls & SC_ComboBoxArrow) { // draw arrow box if (controls & SC_ComboBoxArrow) { // draw arrow box
subrect = tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, subrect = visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow), widget); SC_ComboBoxArrow), widget);
subrect.rect(&x, &y, &w, &h); subrect.rect(&x, &y, &w, &h);
int slot = TQMAX(h/4, 6) + (h % 2); int slot = TQMAX(h/4, 6) + (h % 2);
drawPhasePanel(painter, x+3, y+(h/2)-(slot/2), w-6, drawPhasePanel(painter, x+3, y+(h/2)-(slot/2), w-6,
slot, group, true, slot, group, true,
sunken ? &group.tqbrush(TQColorGroup::Midlight) sunken ? &group.brush(TQColorGroup::Midlight)
: &group.tqbrush(TQColorGroup::Mid)); : &group.brush(TQColorGroup::Mid));
} }
if (controls & SC_ComboBoxEditField) { // draw edit box if (controls & SC_ComboBoxEditField) { // draw edit box
if (combo->editable()) { // editable box if (combo->editable()) { // editable box
subrect = tqvisualRect(querySubControlMetrics(CC_ComboBox, subrect = visualRect(querySubControlMetrics(CC_ComboBox,
widget, SC_ComboBoxEditField), widget); widget, SC_ComboBoxEditField), widget);
x2 = subrect.right(); y2 = subrect.bottom(); x2 = subrect.right(); y2 = subrect.bottom();
painter->setPen(group.dark()); painter->setPen(group.dark());
@ -1664,7 +1664,7 @@ void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control,
painter->setPen(group.button()); painter->setPen(group.button());
painter->drawPoint(x2+2, y2); painter->drawPoint(x2+2, y2);
} else if (combo->hasFocus()) { // non editable box } else if (combo->hasFocus()) { // non editable box
subrect = tqvisualRect(subRect(SR_ComboBoxFocusRect, subrect = visualRect(subRect(SR_ComboBoxFocusRect,
combo), widget); combo), widget);
tqdrawPrimitive(PE_FocusRect, painter, subrect, group, tqdrawPrimitive(PE_FocusRect, painter, subrect, group,
Style_FocusAtBorder, Style_FocusAtBorder,
@ -1680,7 +1680,7 @@ void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control,
// always a three button scrollbar // always a three button scrollbar
const TQScrollBar *sb = ::tqqt_cast<const TQScrollBar*>(widget); const TQScrollBar *sb = ::tqqt_cast<const TQScrollBar*>(widget);
if (!sb) { if (!sb) {
KStyle::tqdrawComplexControl(control, painter, widget, rect, group, KStyle::drawComplexControl(control, painter, widget, rect, group,
flags, controls, active, option); flags, controls, active, option);
return; return;
} }
@ -1777,7 +1777,7 @@ void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control,
case CC_SpinWidget: { case CC_SpinWidget: {
const TQSpinWidget *spin = ::tqqt_cast<const TQSpinWidget*>(widget); const TQSpinWidget *spin = ::tqqt_cast<const TQSpinWidget*>(widget);
if (!spin) { if (!spin) {
KStyle::tqdrawComplexControl(control, painter, widget, rect, group, KStyle::drawComplexControl(control, painter, widget, rect, group,
flags, controls, active, option); flags, controls, active, option);
return; return;
} }
@ -1837,7 +1837,7 @@ void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control,
case CC_ToolButton: { case CC_ToolButton: {
const TQToolButton *btn = ::tqqt_cast<const TQToolButton*>(widget); const TQToolButton *btn = ::tqqt_cast<const TQToolButton*>(widget);
if (!btn) { if (!btn) {
KStyle::tqdrawComplexControl(control, painter, widget, rect, group, KStyle::drawComplexControl(control, painter, widget, rect, group,
flags, controls, active, option); flags, controls, active, option);
return; return;
} }
@ -1905,7 +1905,7 @@ void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control,
// now draw active buttons // now draw active buttons
if (down || on) { if (down || on) {
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Button)); &group.brush(TQColorGroup::Button));
} else if (raised) { } else if (raised) {
drawPhaseBevel(painter, x, y, w, h, group, group.button(), drawPhaseBevel(painter, x, y, w, h, group, group.button(),
false, !horiz, true); false, !horiz, true);
@ -1915,18 +1915,18 @@ void PhaseStyle::tqdrawComplexControl(TQ_ComplexControl control,
} }
default: default:
KStyle::tqdrawComplexControl(control, painter, widget, rect, group, KStyle::drawComplexControl(control, painter, widget, rect, group,
flags, controls, active, option); flags, controls, active, option);
break; break;
} }
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// tqdrawComplexControlMask() // drawComplexControlMask()
// ------------------------ // ------------------------
// Draw a bitmask for the control // Draw a bitmask for the control
void PhaseStyle::tqdrawComplexControlMask(TQ_ComplexControl control, void PhaseStyle::drawComplexControlMask(TQ_ComplexControl control,
TQPainter *painter, TQPainter *painter,
const TQWidget *widget, const TQWidget *widget,
const TQRect &rect, const TQRect &rect,
@ -1941,16 +1941,16 @@ void PhaseStyle::tqdrawComplexControlMask(TQ_ComplexControl control,
} }
default: default:
KStyle::tqdrawComplexControlMask(control,painter,widget,rect,option); KStyle::drawComplexControlMask(control,painter,widget,rect,option);
} }
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// tqpixelMetric() // pixelMetric()
// ------------- // -------------
// Get the pixel metric for metric // Get the pixel metric for metric
int PhaseStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) const int PhaseStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const
{ {
// not using widget's font, so that all metrics are uniform // not using widget's font, so that all metrics are uniform
int em = TQMAX(TQApplication::fontMetrics().strikeOutPos() * 3, 17); int em = TQMAX(TQApplication::fontMetrics().strikeOutPos() * 3, 17);
@ -1973,7 +1973,7 @@ int PhaseStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) const
case PM_TabBarTabVSpace: case PM_TabBarTabVSpace:
if (const TQTabBar *tb = ::tqqt_cast<const TQTabBar*>(widget)) { if (const TQTabBar *tb = ::tqqt_cast<const TQTabBar*>(widget)) {
if (tb->tqshape() == TQTabBar::RoundedAbove) { if (tb->shape() == TQTabBar::RoundedAbove) {
return 10; return 10;
} else { } else {
return 6; return 6;
@ -2000,7 +2000,7 @@ int PhaseStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) const
return em; return em;
default: default:
return KStyle::tqpixelMetric(metric, widget); return KStyle::pixelMetric(metric, widget);
} }
} }
@ -2036,7 +2036,7 @@ TQRect PhaseStyle::querySubControlMetrics(TQ_ComplexControl control,
{ {
TQRect rect; TQRect rect;
const int fw = tqpixelMetric(PM_DefaultFrameWidth, widget); const int fw = pixelMetric(PM_DefaultFrameWidth, widget);
int w = widget->width(), h = widget->height(); int w = widget->width(), h = widget->height();
int xc; int xc;
@ -2143,8 +2143,8 @@ TQSize PhaseStyle::tqsizeFromContents(ContentsType contents,
return KStyle::tqsizeFromContents(contents, widget, contentsize, return KStyle::tqsizeFromContents(contents, widget, contentsize,
option); option);
} }
int margin = tqpixelMetric(PM_ButtonMargin, widget) int margin = pixelMetric(PM_ButtonMargin, widget)
+ tqpixelMetric(PM_DefaultFrameWidth, widget) + 4; + pixelMetric(PM_DefaultFrameWidth, widget) + 4;
w += margin + 6; // add room for bold font w += margin + 6; // add room for bold font
h += margin; h += margin;
@ -2167,8 +2167,8 @@ TQSize PhaseStyle::tqsizeFromContents(ContentsType contents,
TQMenuItem *item = option.menuItem(); TQMenuItem *item = option.menuItem();
if (item->custom()) { if (item->custom()) {
w = item->custom()->tqsizeHint().width(); w = item->custom()->sizeHint().width();
h = item->custom()->tqsizeHint().height(); h = item->custom()->sizeHint().height();
if (!item->custom()->fullSpan()) if (!item->custom()->fullSpan())
h += ITEMVMARGIN*2 + ITEMFRAME*2; h += ITEMVMARGIN*2 + ITEMFRAME*2;
} else if (item->widget()) { // a menu item that is a widget } else if (item->widget()) { // a menu item that is a widget
@ -2273,17 +2273,17 @@ bool PhaseStyle::eventFilter(TQObject *object, TQEvent *event)
TQPainter painter(widget); TQPainter painter(widget);
if (flatToolbar(toolbar)) { if (flatToolbar(toolbar)) {
painter.fillRect(widget->rect(), painter.fillRect(widget->rect(),
parent->tqcolorGroup().background()); parent->colorGroup().background());
} else { } else {
drawPhaseGradient(&painter, widget->rect(), drawPhaseGradient(&painter, widget->rect(),
parent->tqcolorGroup().background(), parent->colorGroup().background(),
!horiz, px, py, !horiz, px, py,
prect.width(), prect.height(), true); prect.width(), prect.height(), true);
if (horiz && (h==prect.height()-2)) { if (horiz && (h==prect.height()-2)) {
painter.setPen(parent->tqcolorGroup().mid()); painter.setPen(parent->colorGroup().mid());
painter.drawLine(x, h-1, w-1, h-1); painter.drawLine(x, h-1, w-1, h-1);
} else if (!horiz && (w==prect.width()-2)) { } else if (!horiz && (w==prect.width()-2)) {
painter.setPen(parent->tqcolorGroup().mid()); painter.setPen(parent->colorGroup().mid());
painter.drawLine(w-1, y, w-1, h-1); painter.drawLine(w-1, y, w-1, h-1);
} }
} }
@ -2298,42 +2298,42 @@ bool PhaseStyle::eventFilter(TQObject *object, TQEvent *event)
TQT_TQRECT_OBJECT(widget->rect()).rect(&x, &y, &w, &h); TQT_TQRECT_OBJECT(widget->rect()).rect(&x, &y, &w, &h);
// draw the extension // draw the extension
drawPhaseGradient(&painter, widget->rect(), drawPhaseGradient(&painter, widget->rect(),
toolbar->tqcolorGroup().background(), toolbar->colorGroup().background(),
!horiz, x, y, w-1, h-1, true); !horiz, x, y, w-1, h-1, true);
if (horiz) { if (horiz) {
painter.setPen(toolbar->tqcolorGroup().dark()); painter.setPen(toolbar->colorGroup().dark());
painter.drawLine(w-1, 0, w-1, h-1); painter.drawLine(w-1, 0, w-1, h-1);
painter.setPen(toolbar->tqcolorGroup().mid()); painter.setPen(toolbar->colorGroup().mid());
painter.drawLine(w-2, 0, w-2, h-2); painter.drawLine(w-2, 0, w-2, h-2);
painter.drawLine(x, h-1, w-2, h-1); painter.drawLine(x, h-1, w-2, h-1);
painter.drawLine(x, y, x, h-2); painter.drawLine(x, y, x, h-2);
painter.setPen(toolbar->tqcolorGroup().midlight()); painter.setPen(toolbar->colorGroup().midlight());
painter.drawLine(x+1, y, x+1, h-2); painter.drawLine(x+1, y, x+1, h-2);
} else { } else {
painter.setPen(toolbar->tqcolorGroup().dark()); painter.setPen(toolbar->colorGroup().dark());
painter.drawLine(0, h-1, w-1, h-1); painter.drawLine(0, h-1, w-1, h-1);
painter.setPen(toolbar->tqcolorGroup().mid()); painter.setPen(toolbar->colorGroup().mid());
painter.drawLine(0, h-2, w-2, h-2); painter.drawLine(0, h-2, w-2, h-2);
painter.drawLine(w-1, y, w-1, h-2); painter.drawLine(w-1, y, w-1, h-2);
painter.drawLine(x, y, w-2, y); painter.drawLine(x, y, w-2, y);
painter.setPen(toolbar->tqcolorGroup().midlight()); painter.setPen(toolbar->colorGroup().midlight());
painter.drawLine(x, y+1, w-2, y+1); painter.drawLine(x, y+1, w-2, y+1);
} }
} }
// TQFrame lines (do this guy last) // TQFrame lines (do this guy last)
else if (0 != (frame = ::tqqt_cast<TQFrame*>(object))) { else if (0 != (frame = ::tqqt_cast<TQFrame*>(object))) {
TQFrame::Shape tqshape = frame->frameShape(); TQFrame::Shape shape = frame->frameShape();
switch (tqshape) { switch (shape) {
case TQFrame::HLine: case TQFrame::HLine:
case TQFrame::VLine: { case TQFrame::VLine: {
// NOTE: assuming lines have no content // NOTE: assuming lines have no content
TQPainter painter(frame); TQPainter painter(frame);
TQT_TQRECT_OBJECT(frame->rect()).rect(&x, &y, &w, &h); TQT_TQRECT_OBJECT(frame->rect()).rect(&x, &y, &w, &h);
painter.setPen(frame->tqcolorGroup().dark()); painter.setPen(frame->colorGroup().dark());
if (tqshape == TQFrame::HLine) { if (shape == TQFrame::HLine) {
painter.drawLine(0, h/2, w, h/2); painter.drawLine(0, h/2, w, h/2);
} else if (tqshape == TQFrame::VLine) { } else if (shape == TQFrame::VLine) {
painter.drawLine(w/2, 0, w/2, h); painter.drawLine(w/2, 0, w/2, h);
} }
return true; return true;
@ -2355,12 +2355,12 @@ bool PhaseStyle::eventFilter(TQObject *object, TQEvent *event)
if (0 != (widget = ::tqqt_cast<TQWidget*>(object)) && if (0 != (widget = ::tqqt_cast<TQWidget*>(object)) &&
widget->isEnabled()) { widget->isEnabled()) {
hover_ = widget; hover_ = widget;
widget->tqrepaint(false); widget->repaint(false);
} }
} else if (event->type() == TQEvent::Leave) { } else if (event->type() == TQEvent::Leave) {
if (0 != (widget = ::tqqt_cast<TQWidget*>(object))) { if (0 != (widget = ::tqqt_cast<TQWidget*>(object))) {
hover_ = 0; hover_ = 0;
widget->tqrepaint(false); widget->repaint(false);
} }
} }
} else if (::tqqt_cast<TQTabBar*>(object)) { // special case for qtabbar } else if (::tqqt_cast<TQTabBar*>(object)) { // special case for qtabbar
@ -2369,13 +2369,13 @@ bool PhaseStyle::eventFilter(TQObject *object, TQEvent *event)
widget->isEnabled()) { widget->isEnabled()) {
hover_ = widget; hover_ = widget;
hovertab_ = 0;; hovertab_ = 0;;
widget->tqrepaint(false); widget->repaint(false);
} }
} else if (event->type() == TQEvent::Leave) { } else if (event->type() == TQEvent::Leave) {
if (0 != (widget = ::tqqt_cast<TQWidget*>(object))) { if (0 != (widget = ::tqqt_cast<TQWidget*>(object))) {
hover_ = 0; hover_ = 0;
hovertab_ = 0;; hovertab_ = 0;;
widget->tqrepaint(false); widget->repaint(false);
} }
} else if (event->type() == TQEvent::MouseMove) { } else if (event->type() == TQEvent::MouseMove) {
TQTabBar *tabbar; TQTabBar *tabbar;
@ -2385,7 +2385,7 @@ bool PhaseStyle::eventFilter(TQObject *object, TQEvent *event)
TQTab *tab = tabbar->selectTab(me->pos()); TQTab *tab = tabbar->selectTab(me->pos());
if (hovertab_ != tab) { if (hovertab_ != tab) {
hovertab_ = tab; hovertab_ = tab;
tabbar->tqrepaint(false); tabbar->repaint(false);
} }
} }
} }

@ -82,7 +82,7 @@ public:
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption &option = TQStyleOption::Default) const; const TQStyleOption &option = TQStyleOption::Default) const;
void tqdrawControl(TQ_ControlElement element, void drawControl(TQ_ControlElement element,
TQPainter *painter, TQPainter *painter,
const TQWidget *widget, const TQWidget *widget,
const TQRect &rect, const TQRect &rect,
@ -90,13 +90,13 @@ public:
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption &option = TQStyleOption::Default) const; const TQStyleOption &option = TQStyleOption::Default) const;
void tqdrawControlMask(TQ_ControlElement element, void drawControlMask(TQ_ControlElement element,
TQPainter *painter, TQPainter *painter,
const TQWidget *widget, const TQWidget *widget,
const TQRect &rect, const TQRect &rect,
const TQStyleOption &option = TQStyleOption::Default) const; const TQStyleOption &option = TQStyleOption::Default) const;
void tqdrawComplexControl(TQ_ComplexControl control, void drawComplexControl(TQ_ComplexControl control,
TQPainter *painter, TQPainter *painter,
const TQWidget *widget, const TQWidget *widget,
const TQRect &rect, const TQRect &rect,
@ -106,13 +106,13 @@ public:
SCFlags active = SC_None, SCFlags active = SC_None,
const TQStyleOption &option = TQStyleOption::Default) const; const TQStyleOption &option = TQStyleOption::Default) const;
void tqdrawComplexControlMask(TQ_ComplexControl control, void drawComplexControlMask(TQ_ComplexControl control,
TQPainter *painter, TQPainter *painter,
const TQWidget *widget, const TQWidget *widget,
const TQRect &rect, const TQRect &rect,
const TQStyleOption &option = TQStyleOption::Default) const; const TQStyleOption &option = TQStyleOption::Default) const;
int tqpixelMetric(PixelMetric metric, int pixelMetric(PixelMetric metric,
const TQWidget *widget = 0) const; const TQWidget *widget = 0) const;
TQRect subRect(SubRect rect, const TQWidget *widget) const; TQRect subRect(SubRect rect, const TQWidget *widget) const;

@ -19,7 +19,7 @@
#include "cdeclient.h" #include "cdeclient.h"
#include <tqdatetime.h> #include <tqdatetime.h>
#include <tqlayout.h> #include <layout.h>
#include <tqbutton.h> #include <tqbutton.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <tqlabel.h> #include <tqlabel.h>
@ -114,9 +114,9 @@ static inline const KDecorationOptions* options()
return KDecoration::options(); return KDecoration::options();
} }
static void fixColorGroup(TQColorGroup & tqcolorGroup) static void fixColorGroup(TQColorGroup & colorGroup)
{ {
TQColor light = tqcolorGroup.light(); TQColor light = colorGroup.light();
int hue, saturation, value; int hue, saturation, value;
@ -125,17 +125,17 @@ static void fixColorGroup(TQColorGroup & tqcolorGroup)
if (value < 128) if (value < 128)
{ {
light.setHsv(hue, saturation, 128); light.setHsv(hue, saturation, 128);
tqcolorGroup.setColor(TQColorGroup::Light, light); colorGroup.setColor(TQColorGroup::Light, light);
} }
TQColor dark = tqcolorGroup.dark(); TQColor dark = colorGroup.dark();
dark.hsv(&hue, &saturation, &value); dark.hsv(&hue, &saturation, &value);
if (value < 84) if (value < 84)
{ {
dark.setHsv(hue, saturation, 84); dark.setHsv(hue, saturation, 84);
tqcolorGroup.setColor(TQColorGroup::Dark, dark); colorGroup.setColor(TQColorGroup::Dark, dark);
} }
} }
@ -381,7 +381,7 @@ void CdeClient::addClientButtons( const TQString& s )
void CdeClient::captionChange() void CdeClient::captionChange()
{ {
widget()->tqrepaint(titlebar->tqgeometry(), false); widget()->repaint(titlebar->geometry(), false);
} }
void CdeClient::activeChange() void CdeClient::activeChange()
@ -389,7 +389,7 @@ void CdeClient::activeChange()
for ( int i=0; i < BtnCount; i++ ) for ( int i=0; i < BtnCount; i++ )
if ( button[i] ) button[i]->reset(); if ( button[i] ) button[i]->reset();
widget()->tqrepaint(false); widget()->repaint(false);
} }
void CdeClient::maximizeChange() void CdeClient::maximizeChange()
@ -398,7 +398,7 @@ void CdeClient::maximizeChange()
bool m = maximizeMode() == MaximizeFull; bool m = maximizeMode() == MaximizeFull;
TQToolTip::remove(button[BtnMax]); TQToolTip::remove(button[BtnMax]);
TQToolTip::add(button[BtnMax], m ? i18n("Restore") : i18n("Maximize")); TQToolTip::add(button[BtnMax], m ? i18n("Restore") : i18n("Maximize"));
button[BtnMax]->tqrepaint(); button[BtnMax]->repaint();
} }
} }
@ -412,7 +412,7 @@ void CdeClient::shadeChange()
void CdeClient::showEvent(TQShowEvent *) void CdeClient::showEvent(TQShowEvent *)
{ {
widget()->tqrepaint(); widget()->repaint();
} }
void CdeClient::desktopChange() void CdeClient::desktopChange()
@ -420,7 +420,7 @@ void CdeClient::desktopChange()
// Nothing to do yet // Nothing to do yet
} }
TQSize CdeClient::tqminimumSize() const TQSize CdeClient::minimumSize() const
{ {
return TQSize(2 * (s_buttonSize + s_frameWidth), return TQSize(2 * (s_buttonSize + s_frameWidth),
2 * s_frameWidth + s_buttonSize); 2 * s_frameWidth + s_buttonSize);
@ -489,12 +489,12 @@ void CdeClient::resizeEvent( TQResizeEvent* e)
{ {
widget()->update( width() - dx + 1, 0, dx, height() ); widget()->update( width() - dx + 1, 0, dx, height() );
widget()->update( TQRect( TQPoint(4,4), widget()->update( TQRect( TQPoint(4,4),
titlebar->tqgeometry().bottomLeft() - TQPoint(1,0) ) ); titlebar->geometry().bottomLeft() - TQPoint(1,0) ) );
widget()->update(TQRect(titlebar->tqgeometry().topRight(), widget()->update(TQRect(titlebar->geometry().topRight(),
TQPoint(width() - 4, titlebar->tqgeometry().bottom()))); TQPoint(width() - 4, titlebar->geometry().bottom())));
// Titlebar needs no paint event // Titlebar needs no paint event
TQApplication::postEvent( this, new TQPaintEvent( titlebar->tqgeometry(), false ) ); TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), false ) );
} }
} }
} }
@ -503,16 +503,16 @@ void CdeClient::paintEvent( TQPaintEvent* )
{ {
TQPainter p(widget()); TQPainter p(widget());
TQColorGroup tqcolorGroup; TQColorGroup colorGroup;
if ( coloredFrame ) if ( coloredFrame )
tqcolorGroup = options()->tqcolorGroup( KDecoration::ColorTitleBar, isActive() ); colorGroup = options()->colorGroup( KDecoration::ColorTitleBar, isActive() );
else else
tqcolorGroup = options()->tqcolorGroup( KDecoration::ColorFrame, isActive() ); colorGroup = options()->colorGroup( KDecoration::ColorFrame, isActive() );
fixColorGroup( tqcolorGroup ); fixColorGroup( colorGroup );
TQRect trect = titlebar->tqgeometry(); TQRect trect = titlebar->geometry();
TQRect mrect = widget()->rect(); TQRect mrect = widget()->rect();
if ( s_frameWidth > 0 ) if ( s_frameWidth > 0 )
@ -523,7 +523,7 @@ void CdeClient::paintEvent( TQPaintEvent* )
} }
p.setPen( TQt::NoPen ); p.setPen( TQt::NoPen );
p.setBrush( tqcolorGroup.background() ); p.setBrush( colorGroup.background() );
if ( s_frameWidth > 1 ) if ( s_frameWidth > 1 )
@ -546,24 +546,24 @@ void CdeClient::paintEvent( TQPaintEvent* )
// draw left and right frames: // draw left and right frames:
qDrawShadePanel( &p, 1, longSide + 1, qDrawShadePanel( &p, 1, longSide + 1,
s_frameWidth, mrect.height() - 2 * (longSide + 1), s_frameWidth, mrect.height() - 2 * (longSide + 1),
tqcolorGroup ); colorGroup );
qDrawShadePanel( &p, mrect.width() - s_frameWidth - 1, longSide + 1, qDrawShadePanel( &p, mrect.width() - s_frameWidth - 1, longSide + 1,
s_frameWidth, mrect.height() - 2 * (longSide + 1), s_frameWidth, mrect.height() - 2 * (longSide + 1),
tqcolorGroup ); colorGroup );
} }
// draw top and bottom frames: // draw top and bottom frames:
qDrawShadePanel( &p, longSide + 1, 1, qDrawShadePanel( &p, longSide + 1, 1,
mrect.width() - 2 * (longSide + 1), s_frameWidth, mrect.width() - 2 * (longSide + 1), s_frameWidth,
tqcolorGroup ); colorGroup );
qDrawShadePanel( &p, longSide + 1, mrect.height() - s_frameWidth - 1, qDrawShadePanel( &p, longSide + 1, mrect.height() - s_frameWidth - 1,
mrect.width() - 2 * (longSide + 1), s_frameWidth, mrect.width() - 2 * (longSide + 1), s_frameWidth,
tqcolorGroup ); colorGroup );
// draw light corner parts: // draw light corner parts:
p.setPen( tqcolorGroup.light() ); p.setPen( colorGroup.light() );
// tl corner: // tl corner:
p.drawLine( 1, 1, longSide - 1, 1 ); p.drawLine( 1, 1, longSide - 1, 1 );
@ -601,7 +601,7 @@ void CdeClient::paintEvent( TQPaintEvent* )
s_frameWidth + 1, mrect.height() - s_frameWidth - 1 ); s_frameWidth + 1, mrect.height() - s_frameWidth - 1 );
// draw dark corner parts: // draw dark corner parts:
p.setPen( tqcolorGroup.dark() ); p.setPen( colorGroup.dark() );
// tl corner: // tl corner:
if ( !shaded ) if ( !shaded )
@ -640,14 +640,14 @@ void CdeClient::paintEvent( TQPaintEvent* )
if ( !coloredFrame ) if ( !coloredFrame )
{ {
tqcolorGroup = options()->tqcolorGroup( KDecoration::ColorTitleBar, isActive() ); colorGroup = options()->colorGroup( KDecoration::ColorTitleBar, isActive() );
fixColorGroup( tqcolorGroup ); fixColorGroup( colorGroup );
p.setBrush( tqcolorGroup.background() ); p.setBrush( colorGroup.background() );
} }
// draw titlebar: // draw titlebar:
p.drawRect( trect ); p.drawRect( trect );
qDrawShadePanel( &p, trect, tqcolorGroup, titlebarPressed ); qDrawShadePanel( &p, trect, colorGroup, titlebarPressed );
// draw caption: // draw caption:
if ( titlebarPressed ) // move the caption right and down if the titlebar is pressed if ( titlebarPressed ) // move the caption right and down if the titlebar is pressed
@ -672,7 +672,7 @@ void CdeClient::paintEvent( TQPaintEvent* )
// Draw a line behind the wrapped window to prevent having // Draw a line behind the wrapped window to prevent having
// unpainted areas when we're shaded. // unpainted areas when we're shaded.
p.setPen( tqcolorGroup.dark() ); p.setPen( colorGroup.dark() );
p.drawLine(s_frameWidth + 1, mrect.height() - s_frameWidth - 2, p.drawLine(s_frameWidth + 1, mrect.height() - s_frameWidth - 2,
mrect.width() - s_frameWidth - 2, mrect.height() - s_frameWidth - 2); mrect.width() - s_frameWidth - 2, mrect.height() - s_frameWidth - 2);
@ -712,24 +712,24 @@ KDecoration::Position CdeClient::mousePosition( const TQPoint& p ) const
void CdeClient::mouseDoubleClickEvent( TQMouseEvent * e ) void CdeClient::mouseDoubleClickEvent( TQMouseEvent * e )
{ {
if ( e->button() == Qt::LeftButton && titlebar->tqgeometry().contains( e->pos() ) ) if ( e->button() == Qt::LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
void CdeClient::wheelEvent( TQWheelEvent * e ) void CdeClient::wheelEvent( TQWheelEvent * e )
{ {
if (isSetShade() || titleLayout->tqgeometry().contains( e->pos() ) ) if (isSetShade() || titleLayout->geometry().contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta()); titlebarMouseWheelOperation( e->delta());
} }
void CdeClient::mousePressEvent( TQMouseEvent * e ) void CdeClient::mousePressEvent( TQMouseEvent * e )
{ {
if ( e->button() == Qt::LeftButton && titlebar->tqgeometry().contains( e->pos() ) ) if ( e->button() == Qt::LeftButton && titlebar->geometry().contains( e->pos() ) )
{ {
if ( titlebarButtonMode ) if ( titlebarButtonMode )
{ {
titlebarPressed = true; titlebarPressed = true;
widget()->tqrepaint(titlebar->tqgeometry(), false); widget()->repaint(titlebar->geometry(), false);
} }
} }
} }
@ -745,7 +745,7 @@ void CdeClient::mouseReleaseEvent( TQMouseEvent * e )
if ( e->button() == Qt::LeftButton && titlebarPressed ) if ( e->button() == Qt::LeftButton && titlebarPressed )
{ {
titlebarPressed = false; titlebarPressed = false;
widget()->tqrepaint(titlebar->tqgeometry(), false); widget()->repaint(titlebar->geometry(), false);
} }
} }
@ -797,7 +797,7 @@ CdeButton::CdeButton(CdeClient* parent,
void CdeButton::reset() void CdeButton::reset()
{ {
tqrepaint( false ); repaint( false );
} }
void CdeButton::drawButton( TQPainter* p ) void CdeButton::drawButton( TQPainter* p )
@ -805,36 +805,36 @@ void CdeButton::drawButton( TQPainter* p )
p->setBrush( options()->color( KDecoration::ColorTitleBar, m_parent->isActive() ) ); p->setBrush( options()->color( KDecoration::ColorTitleBar, m_parent->isActive() ) );
p->drawRect( 0, 0, s_buttonSize, s_buttonSize ); p->drawRect( 0, 0, s_buttonSize, s_buttonSize );
TQColorGroup tqcolorGroup = TQColorGroup colorGroup =
options()->tqcolorGroup( KDecoration::ColorTitleBar, m_parent->isActive() ); options()->colorGroup( KDecoration::ColorTitleBar, m_parent->isActive() );
fixColorGroup(tqcolorGroup); fixColorGroup(colorGroup);
qDrawShadePanel( p, 0, 0, s_buttonSize, s_buttonSize, qDrawShadePanel( p, 0, 0, s_buttonSize, s_buttonSize,
tqcolorGroup, isDown() ); colorGroup, isDown() );
switch ( m_btnType ) switch ( m_btnType )
{ {
case (BtnMenu): case (BtnMenu):
qDrawShadePanel( p, s_o1, s_o2, s_w1, s_w2, tqcolorGroup ); qDrawShadePanel( p, s_o1, s_o2, s_w1, s_w2, colorGroup );
break; break;
case (BtnHelp): case (BtnHelp):
p->setPen( tqcolorGroup.light() ); p->setPen( colorGroup.light() );
p->drawLineSegments( TQPointArray(16, helpLLines) ); p->drawLineSegments( TQPointArray(16, helpLLines) );
p->setPen( tqcolorGroup.dark() ); p->setPen( colorGroup.dark() );
p->drawLineSegments( TQPointArray(14, helpDLines) ); p->drawLineSegments( TQPointArray(14, helpDLines) );
break; break;
case (BtnIconify): case (BtnIconify):
qDrawShadePanel( p, s_o2, s_o2, s_w2, s_w2, tqcolorGroup ); qDrawShadePanel( p, s_o2, s_o2, s_w2, s_w2, colorGroup );
break; break;
case (BtnMax): case (BtnMax):
qDrawShadePanel( p, s_o1, s_o1, s_w1, s_w1, tqcolorGroup, qDrawShadePanel( p, s_o1, s_o1, s_w1, s_w1, colorGroup,
m_parent->maximizeMode() == KDecoration::MaximizeFull ); m_parent->maximizeMode() == KDecoration::MaximizeFull );
break; break;
case (BtnClose): case (BtnClose):
p->setPen( tqcolorGroup.dark() ); p->setPen( colorGroup.dark() );
p->drawLineSegments( TQPointArray(18, closeDLines) ); p->drawLineSegments( TQPointArray(18, closeDLines) );
p->setPen( tqcolorGroup.light() ); p->setPen( colorGroup.light() );
p->drawLineSegments( TQPointArray(15, closeLLines) ); p->drawLineSegments( TQPointArray(15, closeLLines) );
break; break;
} }

@ -78,7 +78,7 @@ protected:
void activeChange(); void activeChange();
void shadeChange(); void shadeChange();
void iconChange(); void iconChange();
TQSize tqminimumSize() const; TQSize minimumSize() const;
void resize(const TQSize &size); void resize(const TQSize &size);
void borders(int &left, int &right, int &top, int &bottom) const; void borders(int &left, int &right, int &top, int &bottom) const;
void mousePressEvent( TQMouseEvent* ); void mousePressEvent( TQMouseEvent* );

@ -30,7 +30,7 @@ CdeConfig::CdeConfig( KConfig* conf, TQWidget* parent )
bgAlign = new TQButtonGroup( 3, Qt::Horizontal, i18n("Text &Alignment"), groupBox ); bgAlign = new TQButtonGroup( 3, Qt::Horizontal, i18n("Text &Alignment"), groupBox );
bgAlign->setExclusive( true ); bgAlign->setExclusive( true );
TQWhatsThis::add( bgAlign, i18n("Use these buttons to set the tqalignment of the titlebar caption text.") ); TQWhatsThis::add( bgAlign, i18n("Use these buttons to set the alignment of the titlebar caption text.") );
new TQRadioButton( i18n("Left"), bgAlign, "AlignLeft" ); new TQRadioButton( i18n("Left"), bgAlign, "AlignLeft" );
TQRadioButton *radio2 = new TQRadioButton( i18n("Centered"), bgAlign, "AlignHCenter" ); TQRadioButton *radio2 = new TQRadioButton( i18n("Centered"), bgAlign, "AlignHCenter" );
radio2->setChecked( true ); radio2->setChecked( true );

@ -23,7 +23,7 @@
#include <tqfileinfo.h> #include <tqfileinfo.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <tqlistview.h> #include <tqlistview.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqsignalmapper.h> #include <tqsignalmapper.h>
@ -59,7 +59,7 @@ GlowConfigDialog::GlowConfigDialog( KConfig * conf, TQWidget * parent )
_main_group_box = new TQWidget(parent); _main_group_box = new TQWidget(parent);
TQVBoxLayout *main_group_boxLayout = new TQVBoxLayout(_main_group_box); TQVBoxLayout *main_group_boxLayout = new TQVBoxLayout(_main_group_box);
main_group_boxLayout->tqsetAlignment(TQt::AlignTop | TQt::AlignLeft); main_group_boxLayout->setAlignment(TQt::AlignTop | TQt::AlignLeft);
main_group_boxLayout->setSpacing(6); main_group_boxLayout->setSpacing(6);
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@ -79,7 +79,7 @@ GlowConfigDialog::GlowConfigDialog( KConfig * conf, TQWidget * parent )
_button_glow_color_group_box = new TQGroupBox( _button_glow_color_group_box = new TQGroupBox(
0, Qt::Horizontal, i18n("Button Glow Colors"), _main_group_box); 0, Qt::Horizontal, i18n("Button Glow Colors"), _main_group_box);
TQHBoxLayout *colorHBoxLayout = TQHBoxLayout *colorHBoxLayout =
new TQHBoxLayout(_button_glow_color_group_box->tqlayout()); new TQHBoxLayout(_button_glow_color_group_box->layout());
// create buttons // create buttons
TQSize buttonSize(BITMAP_SIZE, BITMAP_SIZE); TQSize buttonSize(BITMAP_SIZE, BITMAP_SIZE);
@ -139,7 +139,7 @@ GlowConfigDialog::GlowConfigDialog( KConfig * conf, TQWidget * parent )
_titlebarGradientTypeComboBox = new TQComboBox(_main_group_box); _titlebarGradientTypeComboBox = new TQComboBox(_main_group_box);
KConfig *c = KGlobal::config(); KConfig *c = KGlobal::config();
KConfigGroupSaver cgs( c, TQString::tqfromLatin1("WM") ); KConfigGroupSaver cgs( c, TQString::fromLatin1("WM") );
TQColor activeBackground = c->readColorEntry("activeBackground"); TQColor activeBackground = c->readColorEntry("activeBackground");
TQColor activeBlend = c->readColorEntry("activeBlend"); TQColor activeBlend = c->readColorEntry("activeBlend");

@ -92,7 +92,7 @@ GlowButton::GlowButton(TQWidget *parent, const char *name,
m_timer = new TQTimer(this); m_timer = new TQTimer(this);
connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
m_pos = 0; m_pos = 0;
m_timertqStatus = Stop; m_timerStatus = Stop;
setTipText (tip); setTipText (tip);
setCursor(arrowCursor); setCursor(arrowCursor);
@ -132,7 +132,7 @@ void GlowButton::setPixmapName(const TQString& pixmapName)
// set steps // set steps
_steps = pixmap->height()/pixmap->width() - 1; _steps = pixmap->height()/pixmap->width() - 1;
tqrepaint(false); repaint(false);
} }
void GlowButton::paintEvent( TQPaintEvent *e ) void GlowButton::paintEvent( TQPaintEvent *e )
@ -160,7 +160,7 @@ void GlowButton::enterEvent( TQEvent *e )
{ {
if( m_pos<0 ) if( m_pos<0 )
m_pos=-m_pos; m_pos=-m_pos;
m_timertqStatus = Run; m_timerStatus = Run;
if( ! m_timer->isActive() ) if( ! m_timer->isActive() )
m_timer->start(m_updateTime); m_timer->start(m_updateTime);
TQButton::enterEvent(e); TQButton::enterEvent(e);
@ -168,7 +168,7 @@ void GlowButton::enterEvent( TQEvent *e )
void GlowButton::leaveEvent( TQEvent *e ) void GlowButton::leaveEvent( TQEvent *e )
{ {
m_timertqStatus = Stop; m_timerStatus = Stop;
if( ! m_timer->isActive() ) if( ! m_timer->isActive() )
m_timer->start(m_updateTime); m_timer->start(m_updateTime);
TQButton::leaveEvent(e); TQButton::leaveEvent(e);
@ -180,7 +180,7 @@ void GlowButton::mousePressEvent( TQMouseEvent *e )
if( m_timer->isActive() ) if( m_timer->isActive() )
m_timer->stop(); m_timer->stop();
m_pos = _steps; m_pos = _steps;
tqrepaint(false); repaint(false);
// without pretending LeftButton, clicking on the button with MidButton // without pretending LeftButton, clicking on the button with MidButton
// or RightButton would cause unwanted titlebar action // or RightButton would cause unwanted titlebar action
TQMouseEvent me (e->type(), e->pos(), e->globalPos(), TQMouseEvent me (e->type(), e->pos(), e->globalPos(),
@ -195,8 +195,8 @@ void GlowButton::mouseReleaseEvent( TQMouseEvent *e )
if( ! m_timer->isActive() ) { if( ! m_timer->isActive() ) {
m_timer->start(m_updateTime); m_timer->start(m_updateTime);
} }
if( ! tqgeometry().contains(p) ) { if( ! geometry().contains(p) ) {
m_timertqStatus = Stop; m_timerStatus = Stop;
} }
TQMouseEvent me (e->type(), e->pos(), e->globalPos(), TQMouseEvent me (e->type(), e->pos(), e->globalPos(),
(e->button()&m_realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state()); (e->button()&m_realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state());
@ -205,12 +205,12 @@ void GlowButton::mouseReleaseEvent( TQMouseEvent *e )
void GlowButton::slotTimeout() void GlowButton::slotTimeout()
{ {
tqrepaint(false); repaint(false);
if( m_pos>=_steps-1 ) { if( m_pos>=_steps-1 ) {
m_pos = -m_pos; m_pos = -m_pos;
} }
if( m_timertqStatus==Stop ) { if( m_timerStatus==Stop ) {
if( m_pos==0 ) { if( m_pos==0 ) {
m_timer->stop(); m_timer->stop();
return; return;

@ -73,7 +73,7 @@ protected slots:
void slotTimeout(); void slotTimeout();
private: private:
enum TimertqStatus { Run, Stop }; enum TimerStatus { Run, Stop };
int m_updateTime; int m_updateTime;
int _steps; int _steps;
@ -81,7 +81,7 @@ private:
TQTimer *m_timer; TQTimer *m_timer;
int m_pos; int m_pos;
TimertqStatus m_timertqStatus; TimerStatus m_timerStatus;
int m_realizeButtons; int m_realizeButtons;
ButtonState _last_button; ButtonState _last_button;

@ -18,7 +18,7 @@
#include <tqapplication.h> #include <tqapplication.h>
#include <tqbitmap.h> #include <tqbitmap.h>
#include <tqimage.h> #include <tqimage.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpixmap.h> #include <tqpixmap.h>
#include <kconfig.h> #include <kconfig.h>
@ -404,20 +404,20 @@ GlowClient::~GlowClient()
void GlowClient::resizeEvent( TQResizeEvent * ) void GlowClient::resizeEvent( TQResizeEvent * )
{ {
doShape(); doShape();
widget()->tqrepaint(false); widget()->repaint(false);
} }
void GlowClient::paintEvent( TQPaintEvent * ) void GlowClient::paintEvent( TQPaintEvent * )
{ {
GlowClientConfig *conf = GlowClientGlobals::instance()->config(); GlowClientConfig *conf = GlowClientGlobals::instance()->config();
TQRect r_this = widget()->rect(); TQRect r_this = widget()->rect();
TQRect r_title = _title_spacer->tqgeometry(); TQRect r_title = _title_spacer->geometry();
TQColorGroup titleCg = options()->tqcolorGroup(ColorTitleBar, isActive()); TQColorGroup titleCg = options()->colorGroup(ColorTitleBar, isActive());
TQColorGroup titleBlendCg=options()->tqcolorGroup(ColorTitleBlend, isActive()); TQColorGroup titleBlendCg=options()->colorGroup(ColorTitleBlend, isActive());
TQColorGroup cg = widget()->tqcolorGroup(); TQColorGroup cg = widget()->colorGroup();
TQColor titleColor = options()->color(ColorTitleBar, isActive()); TQColor titleColor = options()->color(ColorTitleBar, isActive());
TQColor titleBlendColor = options()->color(ColorTitleBlend, isActive()); TQColor titleBlendColor = options()->color(ColorTitleBlend, isActive());
TQColor bgColor = widget()->tqcolorGroup().background(); TQColor bgColor = widget()->colorGroup().background();
TQPainter p; TQPainter p;
TQPointArray pArray, pArray2, pArray3, pArray4; TQPointArray pArray, pArray2, pArray3, pArray4;
@ -489,7 +489,7 @@ void GlowClient::paintEvent( TQPaintEvent * )
bitBlt(widget(), 0, 0, title_buffer); bitBlt(widget(), 0, 0, title_buffer);
for (unsigned int i=0; i<m_buttonList.size(); ++i) for (unsigned int i=0; i<m_buttonList.size(); ++i)
m_buttonList[i]->tqrepaint(false); m_buttonList[i]->repaint(false);
p.begin(widget()); p.begin(widget());
p.setPen(TQt::black); p.setPen(TQt::black);
@ -503,7 +503,7 @@ void GlowClient::paintEvent( TQPaintEvent * )
// fill content widget // fill content widget
p.fillRect(1, tBSize.height(), p.fillRect(1, tBSize.height(),
r_this.width()-2, r_this.height()-tBSize.height()-1, r_this.width()-2, r_this.height()-tBSize.height()-1,
options()->tqcolorGroup(ColorFrame, isActive()).background()); options()->colorGroup(ColorFrame, isActive()).background());
p.end(); p.end();
// paint resize handle if necessary // paint resize handle if necessary
@ -521,12 +521,12 @@ void GlowClient::paintEvent( TQPaintEvent * )
void GlowClient::showEvent( TQShowEvent * ) void GlowClient::showEvent( TQShowEvent * )
{ {
doShape(); doShape();
widget()->tqrepaint(false); widget()->repaint(false);
} }
void GlowClient::mouseDoubleClickEvent( TQMouseEvent *e ) void GlowClient::mouseDoubleClickEvent( TQMouseEvent *e )
{ {
if(e->button() == Qt::LeftButton && _title_spacer->tqgeometry().contains(e->pos())) if(e->button() == Qt::LeftButton && _title_spacer->geometry().contains(e->pos()))
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
@ -539,7 +539,7 @@ void GlowClient::wheelEvent( TQWheelEvent *e )
void GlowClient::activeChange() void GlowClient::activeChange()
{ {
updateButtonPixmaps(); updateButtonPixmaps();
widget()->tqrepaint(false); widget()->repaint(false);
} }
void GlowClient::iconChange() void GlowClient::iconChange()
@ -553,12 +553,12 @@ void GlowClient::shadeChange()
void GlowClient::captionChange() void GlowClient::captionChange()
{ {
widget()->update(_title_spacer->tqgeometry()); widget()->update(_title_spacer->geometry());
} }
TQSize GlowClient::tqminimumSize() const TQSize GlowClient::minimumSize() const
{ {
return widget()->tqminimumSize(); return widget()->minimumSize();
} }
void GlowClient::resize( const TQSize& s ) void GlowClient::resize( const TQSize& s )
@ -746,7 +746,7 @@ void GlowClient::updateButtonPositions()
m_leftButtonList.clear(); m_leftButtonList.clear();
m_rightButtonList.clear(); m_rightButtonList.clear();
// reset left and right button tqlayout // reset left and right button layout
if(m_leftButtonLayout) if(m_leftButtonLayout)
delete m_leftButtonLayout; delete m_leftButtonLayout;
m_leftButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0); m_leftButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);

@ -152,7 +152,7 @@ public:
virtual void init(); virtual void init();
virtual void borders( int&, int&, int&, int& ) const; virtual void borders( int&, int&, int&, int& ) const;
virtual void resize( const TQSize& ); virtual void resize( const TQSize& );
virtual TQSize tqminimumSize() const; virtual TQSize minimumSize() const;
protected: protected:
virtual void resizeEvent( TQResizeEvent * ); virtual void resizeEvent( TQResizeEvent * );

@ -772,7 +772,7 @@ IceWMButton::IceWMButton(IceWMClient *parent, const char *name, TQPixmap* (*p)[2
setBackgroundMode( TQWidget::NoBackground ); setBackgroundMode( TQWidget::NoBackground );
client = parent; client = parent;
usePixmap( p ); usePixmap( p );
setFixedSize( tqsizeHint() ); setFixedSize( sizeHint() );
setToggleButton( isToggle ); setToggleButton( isToggle );
} }
@ -785,7 +785,7 @@ void IceWMButton::setTipText(const TQString &tip) {
} }
TQSize IceWMButton::tqsizeHint() const TQSize IceWMButton::sizeHint() const
{ {
// Check for invalid data // Check for invalid data
if ( validPixmaps( (TQPixmap**) (*pix) ) ) // Cast to avoid dumb warning if ( validPixmaps( (TQPixmap**) (*pix) ) ) // Cast to avoid dumb warning
@ -802,7 +802,7 @@ void IceWMButton::usePixmap( TQPixmap* (*p)[2] )
if (validPixmaps( *p )) { if (validPixmaps( *p )) {
pix = p; pix = p;
setFixedSize( (*pix)[Active]->width(), titleBarHeight ); setFixedSize( (*pix)[Active]->width(), titleBarHeight );
tqrepaint( false ); repaint( false );
} else } else
pix = NULL; pix = NULL;
} }
@ -892,7 +892,7 @@ void IceWMClient::init()
// No flicker thanks // No flicker thanks
widget()->setBackgroundMode( NoBackground ); widget()->setBackgroundMode( NoBackground );
// Pack the windowWrapper() window within a grid tqlayout // Pack the windowWrapper() window within a grid layout
grid = new TQGridLayout(widget(), 0, 0, 0); grid = new TQGridLayout(widget(), 0, 0, 0);
grid->setResizeMode(TQLayout::FreeResize); grid->setResizeMode(TQLayout::FreeResize);
grid->addRowSpacing(0, borderSizeY); // Top grab bar grid->addRowSpacing(0, borderSizeY); // Top grab bar
@ -956,7 +956,7 @@ void IceWMClient::init()
} }
// Adds the buttons to the hbox tqlayout as per the buttons specified // Adds the buttons to the hbox layout as per the buttons specified
// in the button string 's' // in the button string 's'
void IceWMClient::addClientButtons( const TQString& s ) void IceWMClient::addClientButtons( const TQString& s )
{ {
@ -1057,7 +1057,7 @@ void IceWMClient::addClientButtons( const TQString& s )
} }
// Adds a pixmap to the titlebar tqlayout via the use of a nice TQSpacerItem // Adds a pixmap to the titlebar layout via the use of a nice TQSpacerItem
TQSpacerItem* IceWMClient::addPixmapSpacer( TQPixmap* p[], TQSizePolicy::SizeType s, int hsize ) TQSpacerItem* IceWMClient::addPixmapSpacer( TQPixmap* p[], TQSizePolicy::SizeType s, int hsize )
{ {
TQSpacerItem* sp; TQSpacerItem* sp;
@ -1157,9 +1157,9 @@ void IceWMClient::resize( const TQSize& s )
} }
TQSize IceWMClient::tqminimumSize() const TQSize IceWMClient::minimumSize() const
{ {
return widget()->tqminimumSize(); return widget()->minimumSize();
} }
@ -1186,9 +1186,9 @@ void IceWMClient::resizeEvent( TQResizeEvent* e )
if ( dx ) if ( dx )
{ {
widget()->update( width() - dx + 1, 0, dx, height() ); widget()->update( width() - dx + 1, 0, dx, height() );
widget()->update( TQRect( TQPoint(4,4), titlebar->tqgeometry().bottomLeft() - TQPoint(1,0) ) ); widget()->update( TQRect( TQPoint(4,4), titlebar->geometry().bottomLeft() - TQPoint(1,0) ) );
widget()->update( TQRect( titlebar->tqgeometry().topRight(), TQPoint( width() - 4, titlebar->tqgeometry().bottom() ) ) ); widget()->update( TQRect( titlebar->geometry().topRight(), TQPoint( width() - 4, titlebar->geometry().bottom() ) ) );
widget()->tqrepaint(titlebar->tqgeometry(), false); widget()->repaint(titlebar->geometry(), false);
} }
} }
} }
@ -1377,46 +1377,46 @@ void IceWMClient::paintEvent( TQPaintEvent* )
TQPainter p2( titleBuffer, this ); TQPainter p2( titleBuffer, this );
titleBuffer->fill( act ? *colorActiveTitleBar : *colorInActiveTitleBar ); titleBuffer->fill( act ? *colorActiveTitleBar : *colorInActiveTitleBar );
r = titleSpacerJ->tqgeometry(); r = titleSpacerJ->geometry();
if (!r.isEmpty() && titleJ[ act ]) if (!r.isEmpty() && titleJ[ act ])
p2.drawPixmap( r.x()-borderSizeX, 0, *titleJ[ act ]); p2.drawPixmap( r.x()-borderSizeX, 0, *titleJ[ act ]);
r = titleSpacerL->tqgeometry(); r = titleSpacerL->geometry();
if (!r.isEmpty() && titleL[ act ]) if (!r.isEmpty() && titleL[ act ])
p2.drawPixmap( r.x()-borderSizeX, 0, *titleL[ act ]); p2.drawPixmap( r.x()-borderSizeX, 0, *titleL[ act ]);
r = titleSpacerS->tqgeometry(); r = titleSpacerS->geometry();
if (!r.isEmpty() && titleS[ act ]) if (!r.isEmpty() && titleS[ act ])
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleS[ act ]); p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleS[ act ]);
r = titleSpacerP->tqgeometry(); r = titleSpacerP->geometry();
if (!r.isEmpty() && titleP[ act ]) if (!r.isEmpty() && titleP[ act ])
p2.drawPixmap( r.x()-borderSizeX, 0, *titleP[ act ]); p2.drawPixmap( r.x()-borderSizeX, 0, *titleP[ act ]);
r = titlebar->tqgeometry(); r = titlebar->geometry();
if (!r.isEmpty() && titleT[ act ] ) if (!r.isEmpty() && titleT[ act ] )
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleT[ act ]); p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleT[ act ]);
r = titleSpacerM->tqgeometry(); r = titleSpacerM->geometry();
if (!r.isEmpty() && titleM[ act ]) if (!r.isEmpty() && titleM[ act ])
p2.drawPixmap( r.x()-borderSizeX, 0, *titleM[ act ], 0, 0, r.width(), r.height()); p2.drawPixmap( r.x()-borderSizeX, 0, *titleM[ act ], 0, 0, r.width(), r.height());
r = titleSpacerB->tqgeometry(); r = titleSpacerB->geometry();
if (!r.isEmpty() && titleB[ act ]) if (!r.isEmpty() && titleB[ act ])
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleB[ act ]); p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleB[ act ]);
r = titleSpacerR->tqgeometry(); r = titleSpacerR->geometry();
if (!r.isEmpty() && titleR[ act ]) if (!r.isEmpty() && titleR[ act ])
p2.drawPixmap( r.x()-borderSizeX, 0, *titleR[ act ], 0, 0, r.width(), r.height()); p2.drawPixmap( r.x()-borderSizeX, 0, *titleR[ act ], 0, 0, r.width(), r.height());
r = titleSpacerQ->tqgeometry(); r = titleSpacerQ->geometry();
if (!r.isEmpty() && titleQ[ act ]) if (!r.isEmpty() && titleQ[ act ])
p2.drawPixmap( r.x()-borderSizeX, 0, *titleQ[ act ], 0, 0, r.width(), r.height()); p2.drawPixmap( r.x()-borderSizeX, 0, *titleQ[ act ], 0, 0, r.width(), r.height());
p2.setFont( options()->font(true) ); p2.setFont( options()->font(true) );
// Pre-compute as much as possible // Pre-compute as much as possible
r = titlebar->tqgeometry(); r = titlebar->geometry();
rx = r.x() - borderSizeX; rx = r.x() - borderSizeX;
rw = width()-(2*borderSizeX)-r.x(); rw = width()-(2*borderSizeX)-r.x();
@ -1432,7 +1432,7 @@ void IceWMClient::paintEvent( TQPaintEvent* )
p2.drawText(rx, 0, rw, titleBarHeight, AlignLeft|AlignVCenter, caption()); p2.drawText(rx, 0, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
p2.end(); p2.end();
bitBlt( widget(), borderSizeX, hb->tqgeometry().y(), titleBuffer ); bitBlt( widget(), borderSizeX, hb->geometry().y(), titleBuffer );
delete titleBuffer; delete titleBuffer;
} }
@ -1486,7 +1486,7 @@ void IceWMClient::iconChange()
renderMenuIcons(); renderMenuIcons();
button[BtnSysMenu]->usePixmap( &menuButtonWithIconPix ); button[BtnSysMenu]->usePixmap( &menuButtonWithIconPix );
if (button[BtnSysMenu]->isVisible()) if (button[BtnSysMenu]->isVisible())
button[BtnSysMenu]->tqrepaint(false); button[BtnSysMenu]->repaint(false);
} }
} }
} }
@ -1497,13 +1497,13 @@ void IceWMClient::desktopChange()
if (button[BtnDepth]) if (button[BtnDepth])
{ {
button[BtnDepth]->turnOn( isOnAllDesktops() ); button[BtnDepth]->turnOn( isOnAllDesktops() );
button[BtnDepth]->tqrepaint(false); button[BtnDepth]->repaint(false);
button[BtnDepth]->setTipText(isOnAllDesktops() ? i18n("Not on all desktops") : i18n("On all desktops")); button[BtnDepth]->setTipText(isOnAllDesktops() ? i18n("Not on all desktops") : i18n("On all desktops"));
} }
} }
// Please don't modify the following unless you want tqlayout problems // Please don't modify the following unless you want layout problems
void IceWMClient::captionChange() void IceWMClient::captionChange()
{ {
TQRect r( 0, borderSizeY, geometry().width(), titleBarHeight); TQRect r( 0, borderSizeY, geometry().width(), titleBarHeight);
@ -1512,7 +1512,7 @@ void IceWMClient::captionChange()
TQSizePolicy::Preferred, TQSizePolicy::Fixed ); TQSizePolicy::Preferred, TQSizePolicy::Fixed );
titlebar->invalidate(); titlebar->invalidate();
grid->activate(); grid->activate();
widget()->tqrepaint( r, false ); widget()->repaint( r, false );
} }
@ -1541,12 +1541,12 @@ void IceWMClient::shadeChange()
void IceWMClient::activeChange() void IceWMClient::activeChange()
{ {
widget()->tqrepaint(false); widget()->repaint(false);
// Reset the button pixmaps. // Reset the button pixmaps.
for(int i= IceWMClient::BtnSysMenu; i < IceWMClient::BtnCount; i++) for(int i= IceWMClient::BtnSysMenu; i < IceWMClient::BtnCount; i++)
if(button[i]) if(button[i])
button[i]->tqrepaint( false ); button[i]->repaint( false );
} }

@ -43,7 +43,7 @@
#define __KDEGALLIUM_ICEWM_H #define __KDEGALLIUM_ICEWM_H
#include <tqbutton.h> #include <tqbutton.h>
#include <tqlayout.h> #include <layout.h>
#include <kpixmap.h> #include <kpixmap.h>
#include <kdecoration.h> #include <kdecoration.h>
#include <kdecorationfactory.h> #include <kdecorationfactory.h>
@ -104,7 +104,7 @@ class IceWMButton : public TQButton
const TQString& tip=NULL, const int realizeBtns = Qt::LeftButton ); const TQString& tip=NULL, const int realizeBtns = Qt::LeftButton );
void setTipText(const TQString &tip); void setTipText(const TQString &tip);
void usePixmap( TQPixmap* (*p)[2] ); void usePixmap( TQPixmap* (*p)[2] );
TQSize tqsizeHint() const; TQSize sizeHint() const;
void turnOn( bool isOn ); void turnOn( bool isOn );
ButtonState last_button; ButtonState last_button;
@ -150,7 +150,7 @@ class IceWMClient : public KDecoration
void iconChange(); void iconChange();
virtual void desktopChange( ); virtual void desktopChange( );
virtual void borders(int&, int&, int&, int&) const; virtual void borders(int&, int&, int&, int&) const;
virtual TQSize tqminimumSize() const; virtual TQSize minimumSize() const;
protected slots: protected slots:
void slotMaximize(); void slotMaximize();

@ -5,7 +5,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/ ******************************************************************/
#include "kde1client.h" #include "kde1client.h"
#include <tqcursor.h> #include <tqcursor.h>
#include <tqlayout.h> #include <layout.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqdrawutil.h> #include <tqdrawutil.h>
@ -19,7 +19,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
#include "kde1client_bitmaps.h" #include "kde1client_bitmaps.h"
// Default button tqlayout // Default button layout
const char default_left[] = "MS"; const char default_left[] = "MS";
const char default_right[] = "H_IAX"; const char default_right[] = "H_IAX";
@ -55,8 +55,8 @@ void create_pixmaps()
if ( pixmaps_created ) if ( pixmaps_created )
return; return;
pixmaps_created = true; pixmaps_created = true;
TQColorGroup aGrp = options()->tqcolorGroup(KDecorationOptions::ColorButtonBg, true); TQColorGroup aGrp = options()->colorGroup(KDecorationOptions::ColorButtonBg, true);
TQColorGroup iGrp = options()->tqcolorGroup(KDecorationOptions::ColorButtonBg, false); TQColorGroup iGrp = options()->colorGroup(KDecorationOptions::ColorButtonBg, false);
TQPainter aPainter, iPainter; TQPainter aPainter, iPainter;
close_pix = new TQPixmap(16, 16); close_pix = new TQPixmap(16, 16);
@ -398,7 +398,7 @@ void StdClient::activeChange()
button[ButtonClose]->setIconSet(on ? *close_pix : *dis_close_pix); button[ButtonClose]->setIconSet(on ? *close_pix : *dis_close_pix);
if (button[ButtonHelp]) if (button[ButtonHelp])
button[ButtonHelp]->setIconSet(on ? *question_mark_pix : *dis_question_mark_pix); button[ButtonHelp]->setIconSet(on ? *question_mark_pix : *dis_question_mark_pix);
widget()->tqrepaint( titlebar->tqgeometry(), false ); widget()->repaint( titlebar->geometry(), false );
} }
@ -413,7 +413,7 @@ StdClient::~StdClient()
void StdClient::resizeEvent( TQResizeEvent* ) void StdClient::resizeEvent( TQResizeEvent* )
{ {
TQRegion rr = widget()->rect(); TQRegion rr = widget()->rect();
TQRect t = titlebar->tqgeometry(); TQRect t = titlebar->geometry();
// t.setTop( 0 ); // t.setTop( 0 );
// TQRegion r = rr.subtract( TQRect( t.x()+1, 0, t.width()-2, 1 ) ); // TQRegion r = rr.subtract( TQRect( t.x()+1, 0, t.width()-2, 1 ) );
// setMask( r ); // setMask( r );
@ -429,7 +429,7 @@ void StdClient::resizeEvent( TQResizeEvent* )
*/ */
void StdClient::captionChange() void StdClient::captionChange()
{ {
widget()->tqrepaint( titlebar->tqgeometry(), FALSE ); widget()->repaint( titlebar->geometry(), FALSE );
} }
@ -461,11 +461,11 @@ void StdClient::desktopChange()
void StdClient::paintEvent( TQPaintEvent* ) void StdClient::paintEvent( TQPaintEvent* )
{ {
TQPainter p( widget() ); TQPainter p( widget() );
TQRect t = titlebar->tqgeometry(); TQRect t = titlebar->geometry();
TQRegion r = widget()->rect(); TQRegion r = widget()->rect();
r = r.subtract( t ); r = r.subtract( t );
p.setClipRegion( r ); p.setClipRegion( r );
qDrawWinPanel( &p, widget()->rect(), widget()->tqcolorGroup() ); qDrawWinPanel( &p, widget()->rect(), widget()->colorGroup() );
// t.setTop( 1 ); // t.setTop( 1 );
// p.setClipRegion( t ); // p.setClipRegion( t );
// t.setTop( 0 ); // t.setTop( 0 );
@ -480,7 +480,7 @@ void StdClient::paintEvent( TQPaintEvent* )
// p.drawLine(t.left(), t.top()+1, t.right(), t.top()+1); // p.drawLine(t.left(), t.top()+1, t.right(), t.top()+1);
if ( isActive() ) if ( isActive() )
qDrawShadePanel( &p2, 0, 0, titleRect.width(), titleRect.height(), qDrawShadePanel( &p2, 0, 0, titleRect.width(), titleRect.height(),
widget()->tqcolorGroup(), true, 1 ); widget()->colorGroup(), true, 1 );
titleRect.setLeft( 4 ); titleRect.setLeft( 4 );
titleRect.setWidth( titleRect.width() - 2 ); titleRect.setWidth( titleRect.width() - 2 );
p2.setPen(options()->color(KDecorationOptions::ColorFont, isActive())); p2.setPen(options()->color(KDecorationOptions::ColorFont, isActive()));
@ -494,14 +494,14 @@ void StdClient::paintEvent( TQPaintEvent* )
void StdClient::mouseDoubleClickEvent( TQMouseEvent * e ) void StdClient::mouseDoubleClickEvent( TQMouseEvent * e )
{ {
if ( e->button() == Qt::LeftButton && titlebar->tqgeometry().contains( e->pos() ) ) if ( e->button() == Qt::LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
void StdClient::wheelEvent( TQWheelEvent * e ) void StdClient::wheelEvent( TQWheelEvent * e )
{ {
if (isSetShade() || TQRect( 0, 0, width(), titlebar->tqgeometry().height() ).contains( e->pos() ) ) if (isSetShade() || TQRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta()); titlebarMouseWheelOperation( e->delta());
} }
@ -513,7 +513,7 @@ void StdClient::iconChange()
button[ButtonMenu]->setIconSet(isActive() ? *menu_pix : *dis_menu_pix); button[ButtonMenu]->setIconSet(isActive() ? *menu_pix : *dis_menu_pix);
else else
button[ButtonMenu]->setIconSet( icon().pixmap( TQIconSet::Small, TQIconSet::Normal ) ); button[ButtonMenu]->setIconSet( icon().pixmap( TQIconSet::Small, TQIconSet::Normal ) );
button[ButtonMenu]->tqrepaint( FALSE ); button[ButtonMenu]->repaint( FALSE );
} }
} }
@ -572,9 +572,9 @@ bool StdClient::eventFilter( TQObject* o, TQEvent* e )
} }
} }
TQSize StdClient::tqminimumSize() const TQSize StdClient::minimumSize() const
{ {
return widget()->tqminimumSize().expandedTo( TQSize( 100, 50 )); return widget()->minimumSize().expandedTo( TQSize( 100, 50 ));
} }
void StdClient::borders( int& left, int& right, int& top, int& bottom ) const void StdClient::borders( int& left, int& right, int& top, int& bottom ) const
@ -636,7 +636,7 @@ StdToolClient::~StdToolClient()
void StdToolClient::resizeEvent( TQResizeEvent* ) void StdToolClient::resizeEvent( TQResizeEvent* )
{ {
// TQRegion r = rect(); // TQRegion r = rect();
// TQRect t = titlebar->tqgeometry(); // TQRect t = titlebar->geometry();
// t.setTop( 0 ); // t.setTop( 0 );
// r = r.subtract( TQRect(0, 0, width(), 1) ); // r = r.subtract( TQRect(0, 0, width(), 1) );
// r = r.subtract (TQRect( 0, 0, 1, t.height() ) ); // r = r.subtract (TQRect( 0, 0, 1, t.height() ) );
@ -647,11 +647,11 @@ void StdToolClient::resizeEvent( TQResizeEvent* )
void StdToolClient::paintEvent( TQPaintEvent* ) void StdToolClient::paintEvent( TQPaintEvent* )
{ {
TQPainter p( widget() ); TQPainter p( widget() );
TQRect t = titlebar->tqgeometry(); TQRect t = titlebar->geometry();
TQRect r = widget()->rect(); TQRect r = widget()->rect();
qDrawWinPanel( &p, r, widget()->tqcolorGroup() ); qDrawWinPanel( &p, r, widget()->colorGroup() );
r.setTop( t.bottom()+1 ); r.setTop( t.bottom()+1 );
qDrawWinPanel( &p, r, widget()->tqcolorGroup() ); qDrawWinPanel( &p, r, widget()->colorGroup() );
p.fillRect( TQRect( TQPoint(t.topLeft() ), TQPoint( width() - t.left(), t.bottom() ) ), p.fillRect( TQRect( TQPoint(t.topLeft() ), TQPoint( width() - t.left(), t.bottom() ) ),
options()->color(KDecorationOptions::ColorTitleBar, isActive())); options()->color(KDecorationOptions::ColorTitleBar, isActive()));
p.setPen( options()->color(KDecorationOptions::ColorTitleBar, isActive()).light() ); p.setPen( options()->color(KDecorationOptions::ColorTitleBar, isActive()).light() );
@ -665,19 +665,19 @@ void StdToolClient::paintEvent( TQPaintEvent* )
void StdToolClient::mouseDoubleClickEvent( TQMouseEvent * e ) void StdToolClient::mouseDoubleClickEvent( TQMouseEvent * e )
{ {
if ( e->button() == Qt::LeftButton && titlebar->tqgeometry().contains( e->pos() ) ) if ( e->button() == Qt::LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
void StdToolClient::wheelEvent( TQWheelEvent * e ) void StdToolClient::wheelEvent( TQWheelEvent * e )
{ {
if (isSetShade() || TQRect( 0, 0, width(), titlebar->tqgeometry().height() ).contains( e->pos() ) ) if (isSetShade() || TQRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta()); titlebarMouseWheelOperation( e->delta());
} }
void StdToolClient::captionChange() void StdToolClient::captionChange()
{ {
widget()->tqrepaint( titlebar->tqgeometry(), FALSE ); widget()->repaint( titlebar->geometry(), FALSE );
} }
void StdToolClient::reset( unsigned long ) void StdToolClient::reset( unsigned long )
@ -721,9 +721,9 @@ bool StdToolClient::eventFilter( TQObject* o, TQEvent* e )
} }
} }
TQSize StdToolClient::tqminimumSize() const TQSize StdToolClient::minimumSize() const
{ {
return widget()->tqminimumSize().expandedTo( TQSize( 100, 50 )); return widget()->minimumSize().expandedTo( TQSize( 100, 50 ));
} }
void StdToolClient::borders( int& left, int& right, int& top, int& bottom ) const void StdToolClient::borders( int& left, int& right, int& top, int& bottom ) const

@ -5,7 +5,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/ ******************************************************************/
#ifndef STDCLIENT_H #ifndef STDCLIENT_H
#define STDCLIENT_H #define STDCLIENT_H
#include <tqlayout.h> #include <layout.h>
#include <tqvariant.h> #include <tqvariant.h>
#include <kdecoration.h> #include <kdecoration.h>
#include <kdecorationfactory.h> #include <kdecorationfactory.h>
@ -33,7 +33,7 @@ public:
StdClient( KDecorationBridge* b, KDecorationFactory* f ); StdClient( KDecorationBridge* b, KDecorationFactory* f );
~StdClient(); ~StdClient();
void init(); void init();
TQSize tqminimumSize() const; TQSize minimumSize() const;
void borders( int& left, int& right, int& top, int& bottom ) const; void borders( int& left, int& right, int& top, int& bottom ) const;
void reset( unsigned long mask ); void reset( unsigned long mask );
void resize( const TQSize& s ); void resize( const TQSize& s );
@ -72,7 +72,7 @@ public:
StdToolClient( KDecorationBridge* b, KDecorationFactory* f ); StdToolClient( KDecorationBridge* b, KDecorationFactory* f );
~StdToolClient(); ~StdToolClient();
void init(); void init();
TQSize tqminimumSize() const; TQSize minimumSize() const;
void borders( int& left, int& right, int& top, int& bottom ) const; void borders( int& left, int& right, int& top, int& bottom ) const;
void reset( unsigned long mask ); void reset( unsigned long mask );
void resize( const TQSize& s ); void resize( const TQSize& s );

@ -1,7 +1,7 @@
#include "nextclient.h" #include "nextclient.h"
#include <tqdatetime.h> #include <tqdatetime.h>
#include <tqdrawutil.h> #include <tqdrawutil.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqbitmap.h> #include <tqbitmap.h>
#include <tqlabel.h> #include <tqlabel.h>
@ -340,14 +340,14 @@ NextButton::NextButton(NextClient *parent, const char *name,
void NextButton::reset() void NextButton::reset()
{ {
tqrepaint(false); repaint(false);
} }
void NextButton::setBitmap(const unsigned char *bitmap, int w, int h) void NextButton::setBitmap(const unsigned char *bitmap, int w, int h)
{ {
deco = new TQBitmap(w, h, bitmap, true); deco = new TQBitmap(w, h, bitmap, true);
deco->setMask(*deco); deco->setMask(*deco);
tqrepaint(); repaint();
} }
void NextButton::drawButton(TQPainter *p) void NextButton::drawButton(TQPainter *p)
@ -602,7 +602,7 @@ bool NextClient::mustDrawHandle() const
void NextClient::iconChange() void NextClient::iconChange()
{ {
if (button[MENU_IDX] && button[MENU_IDX]->isVisible()) if (button[MENU_IDX] && button[MENU_IDX]->isVisible())
button[MENU_IDX]->tqrepaint(false); button[MENU_IDX]->repaint(false);
} }
void NextClient::menuButtonPressed() void NextClient::menuButtonPressed()
@ -658,9 +658,9 @@ void NextClient::resizeEvent(TQResizeEvent *)
// TODO ? update border area only? // TODO ? update border area only?
widget()->update(); widget()->update();
#if 0 #if 0
widget()->update(titlebar->tqgeometry()); widget()->update(titlebar->geometry());
TQPainter p(widget()); TQPainter p(widget());
TQRect t = titlebar->tqgeometry(); TQRect t = titlebar->geometry();
t.setTop( 0 ); t.setTop( 0 );
TQRegion r = widget()->rect(); TQRegion r = widget()->rect();
r = r.subtract( t ); r = r.subtract( t );
@ -672,7 +672,7 @@ void NextClient::resizeEvent(TQResizeEvent *)
void NextClient::captionChange() void NextClient::captionChange()
{ {
widget()->tqrepaint(titlebar->tqgeometry(), false); widget()->repaint(titlebar->geometry(), false);
} }
@ -686,12 +686,12 @@ void NextClient::paintEvent( TQPaintEvent* )
p.drawRect(fr); p.drawRect(fr);
// Draw title bar // Draw title bar
TQRect t = titlebar->tqgeometry(); TQRect t = titlebar->geometry();
t.setTop(1); t.setTop(1);
p.drawTiledPixmap(t.x()+1, t.y()+1, t.width()-2, t.height()-2, p.drawTiledPixmap(t.x()+1, t.y()+1, t.width()-2, t.height()-2,
isActive() ? *aTitlePix : *iTitlePix); isActive() ? *aTitlePix : *iTitlePix);
qDrawShadePanel(&p, t.x(), t.y(), t.width(), t.height()-1, qDrawShadePanel(&p, t.x(), t.y(), t.width(), t.height()-1,
options()->tqcolorGroup(KDecoration::ColorTitleBar, isActive())); options()->colorGroup(KDecoration::ColorTitleBar, isActive()));
p.drawLine(t.x(), t.bottom(), t.right(), t.bottom()); p.drawLine(t.x(), t.bottom(), t.right(), t.bottom());
#if 0 #if 0
@ -716,7 +716,7 @@ void NextClient::paintEvent( TQPaintEvent* )
int corner = 16 + 3*handleSize/2; int corner = 16 + 3*handleSize/2;
qDrawShadePanel(&p, qDrawShadePanel(&p,
fr.x() + 1, fr.bottom() - handleSize, corner-1, handleSize, fr.x() + 1, fr.bottom() - handleSize, corner-1, handleSize,
options()->tqcolorGroup(KDecoration::ColorHandle, isActive()), options()->colorGroup(KDecoration::ColorHandle, isActive()),
false); false);
p.drawTiledPixmap(fr.x() + 2, fr.bottom() - handleSize + 1, p.drawTiledPixmap(fr.x() + 2, fr.bottom() - handleSize + 1,
corner - 3, handleSize - 2, isActive() ? *aHandlePix : *iHandlePix); corner - 3, handleSize - 2, isActive() ? *aHandlePix : *iHandlePix);
@ -724,7 +724,7 @@ void NextClient::paintEvent( TQPaintEvent* )
qDrawShadePanel(&p, qDrawShadePanel(&p,
fr.x() + corner, fr.bottom() - handleSize, fr.x() + corner, fr.bottom() - handleSize,
fr.width() - 2*corner, handleSize, fr.width() - 2*corner, handleSize,
options()->tqcolorGroup(KDecoration::ColorFrame, isActive()), options()->colorGroup(KDecoration::ColorFrame, isActive()),
false); false);
p.drawTiledPixmap(fr.x() + corner + 1, fr.bottom() - handleSize + 1, p.drawTiledPixmap(fr.x() + corner + 1, fr.bottom() - handleSize + 1,
fr.width() - 2*corner - 2, handleSize - 2, fr.width() - 2*corner - 2, handleSize - 2,
@ -732,7 +732,7 @@ void NextClient::paintEvent( TQPaintEvent* )
qDrawShadePanel(&p, qDrawShadePanel(&p,
fr.right() - corner + 1, fr.bottom() - handleSize, corner - 1, handleSize, fr.right() - corner + 1, fr.bottom() - handleSize, corner - 1, handleSize,
options()->tqcolorGroup(KDecoration::ColorHandle, isActive()), options()->colorGroup(KDecoration::ColorHandle, isActive()),
false); false);
p.drawTiledPixmap(fr.right() - corner + 2, fr.bottom() - handleSize + 1, p.drawTiledPixmap(fr.right() - corner + 2, fr.bottom() - handleSize + 1,
corner - 3, handleSize - 2, isActive() ? *aHandlePix : *iHandlePix); corner - 3, handleSize - 2, isActive() ? *aHandlePix : *iHandlePix);
@ -741,7 +741,7 @@ void NextClient::paintEvent( TQPaintEvent* )
void NextClient::mouseDoubleClickEvent( TQMouseEvent * e ) void NextClient::mouseDoubleClickEvent( TQMouseEvent * e )
{ {
if (e->button() == Qt::LeftButton && titlebar->tqgeometry().contains( e->pos() ) ) if (e->button() == Qt::LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
@ -753,7 +753,7 @@ void NextClient::wheelEvent( TQWheelEvent * e )
void NextClient::showEvent(TQShowEvent *) void NextClient::showEvent(TQShowEvent *)
{ {
widget()->tqrepaint(); widget()->repaint();
} }
void NextClient::desktopChange() void NextClient::desktopChange()
@ -782,7 +782,7 @@ void NextClient::maximizeChange()
void NextClient::activeChange() void NextClient::activeChange()
{ {
widget()->tqrepaint(false); widget()->repaint(false);
slotReset(); slotReset();
} }
@ -839,7 +839,7 @@ void NextClient::keepAboveChange(bool above)
TQToolTip::remove(b); TQToolTip::remove(b);
TQToolTip::add(b, above ? TQToolTip::add(b, above ?
i18n("Do not keep above others") : i18n("Keep above others")); i18n("Do not keep above others") : i18n("Keep above others"));
b->tqrepaint(false); b->repaint(false);
} }
} }
@ -850,11 +850,11 @@ void NextClient::keepBelowChange(bool below)
TQToolTip::remove(b); TQToolTip::remove(b);
TQToolTip::add(b, below ? TQToolTip::add(b, below ?
i18n("Do not keep below others") : i18n("Keep below others")); i18n("Do not keep below others") : i18n("Keep below others"));
b->tqrepaint(false); b->repaint(false);
} }
} }
TQSize NextClient::tqminimumSize() const TQSize NextClient::minimumSize() const
{ {
return TQSize(titleHeight * 6 + 2, titleHeight + handleSize + 2); return TQSize(titleHeight * 6 + 2, titleHeight + handleSize + 2);
} }
@ -870,7 +870,7 @@ void NextClient::reset(unsigned long)
if (button[i]) if (button[i])
button[i]->reset(); button[i]->reset();
} }
widget()->tqrepaint(); widget()->repaint();
} }
bool NextClient::eventFilter(TQObject *o, TQEvent *e) bool NextClient::eventFilter(TQObject *o, TQEvent *e)

@ -4,7 +4,7 @@
#include <tqvariant.h> #include <tqvariant.h>
#include <tqbitmap.h> #include <tqbitmap.h>
#include <kpixmap.h> #include <kpixmap.h>
#include <tqlayout.h> #include <layout.h>
#include <tqbutton.h> #include <tqbutton.h>
#include <kdecoration.h> #include <kdecoration.h>
#include <kdecorationfactory.h> #include <kdecorationfactory.h>
@ -61,7 +61,7 @@ protected:
void activeChange(); void activeChange();
void shadeChange(); void shadeChange();
void iconChange(); void iconChange();
TQSize tqminimumSize() const; TQSize minimumSize() const;
void resize(const TQSize &size); void resize(const TQSize &size);
void borders(int &left, int &right, int &top, int &bottom) const; void borders(int &left, int &right, int &top, int &bottom) const;
void reset(unsigned long changed); void reset(unsigned long changed);

@ -26,7 +26,7 @@
#include <unistd.h> // for usleep #include <unistd.h> // for usleep
#include <math.h> #include <math.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqdrawutil.h> #include <tqdrawutil.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
@ -215,7 +215,7 @@ OpenLook::shadeChange()
{ {
} }
TQSize OpenLook::tqminimumSize() const TQSize OpenLook::minimumSize() const
{ {
int left, right, top, bottom; int left, right, top, bottom;
borders(left, right, top, bottom); borders(left, right, top, bottom);
@ -226,7 +226,7 @@ TQSize OpenLook::tqminimumSize() const
OpenLook::resize(const TQSize& s) OpenLook::resize(const TQSize& s)
{ {
widget()->resize(s); widget()->resize(s);
widget()->tqrepaint(); //there is some strange wrong tqrepaint of the frame without widget()->repaint(); //there is some strange wrong repaint of the frame without
} }
void void
@ -252,9 +252,9 @@ OpenLook::paintEvent(TQPaintEvent * pe)
TQBrush titleBackground(options()->color(KDecoration::ColorTitleBar, true)); TQBrush titleBackground(options()->color(KDecoration::ColorTitleBar, true));
if (isActive()) if (isActive())
qDrawShadePanel(&p, tr, widget()->tqcolorGroup(), true, 1, &titleBackground); qDrawShadePanel(&p, tr, widget()->colorGroup(), true, 1, &titleBackground);
else else
p.fillRect(tr, widget()->tqcolorGroup().brush(TQColorGroup::Background)); p.fillRect(tr, widget()->colorGroup().brush(TQColorGroup::Background));
p.setClipRegion(clipRegion); p.setClipRegion(clipRegion);
@ -272,7 +272,7 @@ OpenLook::paintEvent(TQPaintEvent * pe)
void void
OpenLook::showEvent(TQShowEvent *) OpenLook::showEvent(TQShowEvent *)
{ {
widget()->tqrepaint(); widget()->repaint();
} }
void void
@ -302,7 +302,7 @@ OpenLook::resizeEvent(TQResizeEvent* e)
void void
OpenLook::activeChange() OpenLook::activeChange()
{ {
widget()->tqrepaint(); widget()->repaint();
} }
KDecoration::Position KDecoration::Position
@ -333,13 +333,13 @@ OpenLook::desktopChange()
void void
OpenLook::maximizeChange() OpenLook::maximizeChange()
{ {
widget()->tqrepaint(false); widget()->repaint(false);
} }
void void
OpenLook::doLayout() OpenLook::doLayout()
{ {
TQVBoxLayout * tqlayout = new TQVBoxLayout(widget(), openLookMargin); TQVBoxLayout * layout = new TQVBoxLayout(widget(), openLookMargin);
titleSpacer_ = titleSpacer_ =
new TQSpacerItem new TQSpacerItem
@ -350,12 +350,12 @@ OpenLook::doLayout()
TQSizePolicy::Fixed TQSizePolicy::Fixed
); );
tqlayout->addItem(titleSpacer_); layout->addItem(titleSpacer_);
tqlayout->addSpacing(2); layout->addSpacing(2);
TQBoxLayout * midLayout = TQBoxLayout * midLayout =
new TQBoxLayout(tqlayout, TQBoxLayout::LeftToRight, 0, 0); new TQBoxLayout(layout, TQBoxLayout::LeftToRight, 0, 0);
if (isPreview()) { if (isPreview()) {
midLayout->addWidget(new TQLabel( midLayout->addWidget(new TQLabel(
@ -377,7 +377,7 @@ OpenLook::animateMinimize(bool /*iconify*/)
if (!icongeom.isValid()) if (!icongeom.isValid())
return false; return false;
TQRect wingeom(tqgeometry()); TQRect wingeom(geometry());
TQPainter p(workspaceWidget()); TQPainter p(workspaceWidget());
@ -482,7 +482,7 @@ OpenLook::paintTopLeftRect(TQPainter & p) const
int x2(r.right()); int x2(r.right());
int y2(r.bottom()); int y2(r.bottom());
p.setPen(widget()->tqcolorGroup().light()); p.setPen(widget()->colorGroup().light());
p.drawLine(x1, y1, x2, y1); p.drawLine(x1, y1, x2, y1);
p.drawLine(x1, y1 + 1, x1, y2); p.drawLine(x1, y1 + 1, x1, y2);
@ -490,7 +490,7 @@ OpenLook::paintTopLeftRect(TQPainter & p) const
p.fillRect(x1 + 1, y1 + 1, r.width()-2, openLookMargin-2, handleColour); p.fillRect(x1 + 1, y1 + 1, r.width()-2, openLookMargin-2, handleColour);
p.fillRect(x1 + 1, y1 + 1, openLookMargin-2, r.height()-2, handleColour); p.fillRect(x1 + 1, y1 + 1, openLookMargin-2, r.height()-2, handleColour);
p.setPen(widget()->tqcolorGroup().dark()); p.setPen(widget()->colorGroup().dark());
p.drawLine(x2, y1 + 1, x2, y1 + openLookMargin-1); p.drawLine(x2, y1 + 1, x2, y1 + openLookMargin-1);
@ -513,7 +513,7 @@ OpenLook::paintTopRightRect(TQPainter & p) const
int x2(r.right()); int x2(r.right());
int y2(r.bottom()); int y2(r.bottom());
p.setPen(widget()->tqcolorGroup().light()); p.setPen(widget()->colorGroup().light());
p.drawLine(x1, y1, x2, y1); p.drawLine(x1, y1, x2, y1);
p.drawLine(x1, y1 + 1, x1, y1 + openLookMargin-1); p.drawLine(x1, y1 + 1, x1, y1 + openLookMargin-1);
@ -522,7 +522,7 @@ OpenLook::paintTopRightRect(TQPainter & p) const
p.fillRect(x1 + 1, y1 + 1, r.width()-2, openLookMargin-2, handleColour); p.fillRect(x1 + 1, y1 + 1, r.width()-2, openLookMargin-2, handleColour);
p.fillRect(x2 - openLookMargin + 2, y1 + 1, openLookMargin-2, r.height()-2, handleColour); p.fillRect(x2 - openLookMargin + 2, y1 + 1, openLookMargin-2, r.height()-2, handleColour);
p.setPen(widget()->tqcolorGroup().dark()); p.setPen(widget()->colorGroup().dark());
p.drawLine(x1 + 1, y1 + openLookMargin-1, x2 - openLookMargin+1, y1 + openLookMargin-1); p.drawLine(x1 + 1, y1 + openLookMargin-1, x2 - openLookMargin+1, y1 + openLookMargin-1);
p.drawLine(x2, y1 + 1, x2, y2); p.drawLine(x2, y1 + 1, x2, y2);
@ -541,7 +541,7 @@ OpenLook::paintBottomLeftRect(TQPainter & p) const
int x2(r.right()); int x2(r.right());
int y2(r.bottom()); int y2(r.bottom());
p.setPen(widget()->tqcolorGroup().light()); p.setPen(widget()->colorGroup().light());
p.drawLine(x1, y1, x1 + openLookMargin-1, y1); p.drawLine(x1, y1, x1 + openLookMargin-1, y1);
p.drawLine(x1, y1 + 1, x1, y2); p.drawLine(x1, y1 + 1, x1, y2);
@ -550,7 +550,7 @@ OpenLook::paintBottomLeftRect(TQPainter & p) const
p.fillRect(x1 + 1, y2 - openLookMargin + 2, r.width()-2, openLookMargin-2, handleColour); p.fillRect(x1 + 1, y2 - openLookMargin + 2, r.width()-2, openLookMargin-2, handleColour);
p.fillRect(x1 + 1, y1 + 1, openLookMargin-2, r.height()-2, handleColour); p.fillRect(x1 + 1, y1 + 1, openLookMargin-2, r.height()-2, handleColour);
p.setPen(widget()->tqcolorGroup().dark()); p.setPen(widget()->colorGroup().dark());
p.drawLine(x1 + openLookMargin-1, y1 + 1, x1 + openLookMargin-1, y2 - openLookMargin); p.drawLine(x1 + openLookMargin-1, y1 + 1, x1 + openLookMargin-1, y2 - openLookMargin);
p.drawLine(x1 + 1, y2, x2, y2); p.drawLine(x1 + 1, y2, x2, y2);
@ -569,7 +569,7 @@ OpenLook::paintBottomRightRect(TQPainter & p) const
int x2(r.right()); int x2(r.right());
int y2(r.bottom()); int y2(r.bottom());
p.setPen(widget()->tqcolorGroup().light()); p.setPen(widget()->colorGroup().light());
p.drawLine(x1, y2 - openLookMargin+1, x1, y2); p.drawLine(x1, y2 - openLookMargin+1, x1, y2);
p.drawLine(x1 + 1, y2 - openLookMargin+1, x2 - openLookMargin+1, y2 - openLookMargin+1); p.drawLine(x1 + 1, y2 - openLookMargin+1, x2 - openLookMargin+1, y2 - openLookMargin+1);
@ -579,7 +579,7 @@ OpenLook::paintBottomRightRect(TQPainter & p) const
p.fillRect(x1 + 1, y2 - openLookMargin + 2, r.width()-2, openLookMargin-2, handleColour); p.fillRect(x1 + 1, y2 - openLookMargin + 2, r.width()-2, openLookMargin-2, handleColour);
p.fillRect(x2 - openLookMargin + 2, y1 + 1, openLookMargin-2, r.height()-2, handleColour); p.fillRect(x2 - openLookMargin + 2, y1 + 1, openLookMargin-2, r.height()-2, handleColour);
p.setPen(widget()->tqcolorGroup().dark()); p.setPen(widget()->colorGroup().dark());
p.drawLine(x1 + 1, y2, x2, y2); p.drawLine(x1 + 1, y2, x2, y2);
p.drawLine(x2, y1 + 1, x2, y2 - 1); p.drawLine(x2, y1 + 1, x2, y2 - 1);
@ -609,16 +609,16 @@ OpenLook::paintButton(TQPainter & p) const
r.width() - 2, r.width() - 2,
r.height() - 2, r.height() - 2,
buttonDown_ buttonDown_
? widget()->tqcolorGroup().dark() ? widget()->colorGroup().dark()
: options()->color(KDecoration::ColorButtonBg, isActive()) : options()->color(KDecoration::ColorButtonBg, isActive())
); );
p.setPen(buttonDown_ ? widget()->tqcolorGroup().dark() : widget()->tqcolorGroup().light()); p.setPen(buttonDown_ ? widget()->colorGroup().dark() : widget()->colorGroup().light());
p.drawLine(r.left() + 1, r.top(), r.right() - 1, r.top()); p.drawLine(r.left() + 1, r.top(), r.right() - 1, r.top());
p.drawLine(r.left(), r.top() + 1, r.left(), r.bottom() - 1); p.drawLine(r.left(), r.top() + 1, r.left(), r.bottom() - 1);
p.setPen(buttonDown_ ? widget()->tqcolorGroup().light() : widget()->tqcolorGroup().dark()); p.setPen(buttonDown_ ? widget()->colorGroup().light() : widget()->colorGroup().dark());
p.drawLine(r.right(), r.top() + 1, r.right(), r.bottom() - 1); p.drawLine(r.right(), r.top() + 1, r.right(), r.bottom() - 1);
p.drawLine(r.left() + 1, r.bottom(), r.right() - 1, r.bottom()); p.drawLine(r.left() + 1, r.bottom(), r.right() - 1, r.bottom());
@ -638,7 +638,7 @@ OpenLook::paintArrow(TQPainter & p) const
TQPointArray poly(3); TQPointArray poly(3);
p.setBrush(widget()->tqcolorGroup().mid()); p.setBrush(widget()->colorGroup().mid());
poly.setPoint(0, x, y); poly.setPoint(0, x, y);
poly.setPoint(1, x + w - 1, y); poly.setPoint(1, x + w - 1, y);
@ -646,13 +646,13 @@ OpenLook::paintArrow(TQPainter & p) const
p.drawPolygon(poly); p.drawPolygon(poly);
p.setPen(widget()->tqcolorGroup().dark()); p.setPen(widget()->colorGroup().dark());
p.drawLine(x, y, x + w - 1, y); p.drawLine(x, y, x + w - 1, y);
p.drawLine(x, y, x + (w / 2), y + h - 1); p.drawLine(x, y, x + (w / 2), y + h - 1);
p.setPen(widget()->tqcolorGroup().light()); p.setPen(widget()->colorGroup().light());
p.drawLine(x + (w / 2), y + h - 1, x + w - 1, y); p.drawLine(x + (w / 2), y + h - 1, x + w - 1, y);
} }
@ -669,10 +669,10 @@ OpenLook::paintBorder(TQPainter & p) const
uint r = widget()->rect().right(); uint r = widget()->rect().right();
uint b = widget()->rect().bottom(); uint b = widget()->rect().bottom();
p.fillRect(x + cs, y, w - cs - cs, 2, widget()->tqcolorGroup().shadow()); p.fillRect(x + cs, y, w - cs - cs, 2, widget()->colorGroup().shadow());
p.fillRect(x + cs, b - 1, w - cs - cs, 2, widget()->tqcolorGroup().shadow()); p.fillRect(x + cs, b - 1, w - cs - cs, 2, widget()->colorGroup().shadow());
p.fillRect(x, y + cs, 2, h - cs - cs, widget()->tqcolorGroup().shadow()); p.fillRect(x, y + cs, 2, h - cs - cs, widget()->colorGroup().shadow());
p.fillRect(r - 1, y + cs, 2, h - cs - cs, widget()->tqcolorGroup().shadow()); p.fillRect(r - 1, y + cs, 2, h - cs - cs, widget()->colorGroup().shadow());
TQColor frameColour(options()->color(KDecoration::ColorFrame, isActive())); TQColor frameColour(options()->color(KDecoration::ColorFrame, isActive()));
@ -687,14 +687,14 @@ OpenLook::paintBorder(TQPainter & p) const
titleRect().bottom() + 1, titleRect().bottom() + 1,
width() - 2 * openLookMargin, width() - 2 * openLookMargin,
2, 2,
widget()->tqcolorGroup().background() widget()->colorGroup().background()
); );
} }
TQRect TQRect
OpenLook::titleRect() const OpenLook::titleRect() const
{ {
return titleSpacer_->tqgeometry(); return titleSpacer_->geometry();
} }
bool bool
@ -704,7 +704,7 @@ OpenLook::isButtonPress(TQMouseEvent * e)
buttonDown_ = buttonRect().contains(mousePressPoint_); buttonDown_ = buttonRect().contains(mousePressPoint_);
widget()->tqrepaint(buttonRect()); widget()->repaint(buttonRect());
return buttonDown_; return buttonDown_;
} }
@ -717,7 +717,7 @@ OpenLook::isButtonRelease(TQMouseEvent * e)
return true; return true;
} }
buttonDown_ = false; buttonDown_ = false;
widget()->tqrepaint(buttonRect()); widget()->repaint(buttonRect());
return false; return false;
} }

@ -60,7 +60,7 @@ namespace OpenLook
void iconChange(); void iconChange();
void maximizeChange(); void maximizeChange();
void borders(int &left, int &right, int &top, int &bottom) const; void borders(int &left, int &right, int &top, int &bottom) const;
TQSize tqminimumSize() const; TQSize minimumSize() const;
void resize( const TQSize& ); void resize( const TQSize& );
virtual void mouseDoubleClickEvent(TQMouseEvent *); virtual void mouseDoubleClickEvent(TQMouseEvent *);
virtual void wheelEvent(TQWheelEvent *e); virtual void wheelEvent(TQWheelEvent *e);

@ -48,19 +48,19 @@ Button::~Button()
// Empty. // Empty.
} }
void Button::tqsetAlignment(Alignment a) void Button::setAlignment(Alignment a)
{ {
alignment_ = a; alignment_ = a;
tqrepaint(); repaint();
} }
void Button::setActive(bool b) void Button::setActive(bool b)
{ {
active_ = b; active_ = b;
tqrepaint(); repaint();
} }
Button::Alignment Button::tqalignment() const Button::Alignment Button::alignment() const
{ {
return alignment_; return alignment_;
} }
@ -69,7 +69,7 @@ void Button::mousePressEvent(TQMouseEvent *e)
{ {
down_ = true; down_ = true;
lastButton_ = e->button(); lastButton_ = e->button();
tqrepaint(); repaint();
TQMouseEvent me(e->type(), e->pos(), e->globalPos(), TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
(e->button()&realizeButtons_) ? Qt::LeftButton : Qt::NoButton, (e->button()&realizeButtons_) ? Qt::LeftButton : Qt::NoButton,
@ -81,7 +81,7 @@ void Button::mouseReleaseEvent(TQMouseEvent *e)
{ {
down_ = false; down_ = false;
lastButton_ = e->button(); lastButton_ = e->button();
tqrepaint(); repaint();
TQMouseEvent me(e->type(), e->pos(), e->globalPos(), TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
(e->button()&realizeButtons_) ? Qt::LeftButton : Qt::NoButton, (e->button()&realizeButtons_) ? Qt::LeftButton : Qt::NoButton,
e->state()); e->state());
@ -133,7 +133,7 @@ void Button::setPixmap(const TQPixmap &p)
iPixmap_.setMask(*p.mask()); iPixmap_.setMask(*p.mask());
} }
} }
tqrepaint(); repaint();
} }
void Button::paintEvent(TQPaintEvent *) void Button::paintEvent(TQPaintEvent *)

@ -46,9 +46,9 @@ class Button : public TQWidget
const ButtonState realizeButton = Qt::LeftButton); const ButtonState realizeButton = Qt::LeftButton);
virtual ~Button(); virtual ~Button();
void tqsetAlignment(Alignment); void setAlignment(Alignment);
Alignment tqalignment() const; Alignment alignment() const;
protected slots: protected slots:

@ -27,7 +27,7 @@
#include <tqapplication.h> #include <tqapplication.h>
#include <tqimage.h> #include <tqimage.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <netwm.h> #include <netwm.h>
@ -134,22 +134,22 @@ void Manager::resize(const TQSize &s)
widget()->resize(s); widget()->resize(s);
} }
TQSize Manager::tqminimumSize() const TQSize Manager::minimumSize() const
{ {
return widget()->tqminimumSize(); return widget()->minimumSize();
} }
void Manager::activeChange() void Manager::activeChange()
{ {
updateTitleBuffer(); updateTitleBuffer();
widget()->tqrepaint(); widget()->repaint();
emit(activeChanged(isActive())); emit(activeChanged(isActive()));
} }
void Manager::captionChange() void Manager::captionChange()
{ {
updateTitleBuffer(); updateTitleBuffer();
widget()->tqrepaint(); widget()->repaint();
} }
void Manager::iconChange() void Manager::iconChange()
@ -197,7 +197,7 @@ void Manager::paintEvent(TQPaintEvent *e)
// Title bar. // Title bar.
TQRect tr = titleSpacer_->tqgeometry(); TQRect tr = titleSpacer_->geometry();
bitBlt(widget(), tr.topLeft(), &titleBuf_); bitBlt(widget(), tr.topLeft(), &titleBuf_);
// Resize bar. // Resize bar.
@ -224,7 +224,7 @@ void Manager::resizeEvent(TQResizeEvent*)
{ {
updateButtonVisibility(); updateButtonVisibility();
updateTitleBuffer(); updateTitleBuffer();
widget()->tqrepaint(); widget()->repaint();
} }
void Manager::updateButtonVisibility() void Manager::updateButtonVisibility()
@ -282,7 +282,7 @@ void Manager::updateButtonVisibility()
break; break;
} }
tqlayout()->activate(); layout()->activate();
#endif #endif
} }
@ -292,7 +292,7 @@ void Manager::updateTitleBuffer()
Static * s = Static::instance(); Static * s = Static::instance();
TQRect tr = titleSpacer_->tqgeometry(); TQRect tr = titleSpacer_->geometry();
if (tr.width() == 0 || tr.height() == 0) if (tr.width() == 0 || tr.height() == 0)
titleBuf_.resize(8, 8); titleBuf_.resize(8, 8);
@ -352,13 +352,13 @@ KDecoration::Position Manager::mousePosition(const TQPoint& p) const
void Manager::mouseDoubleClickEvent(TQMouseEvent *e) void Manager::mouseDoubleClickEvent(TQMouseEvent *e)
{ {
if (e->button() == Qt::LeftButton && titleSpacer_->tqgeometry().contains(e->pos())) if (e->button() == Qt::LeftButton && titleSpacer_->geometry().contains(e->pos()))
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
void Manager::wheelEvent(TQWheelEvent *e) void Manager::wheelEvent(TQWheelEvent *e)
{ {
if (isSetShade() || titleLayout_->tqgeometry().contains(e->pos()) ) if (isSetShade() || titleLayout_->geometry().contains(e->pos()) )
titlebarMouseWheelOperation( e->delta()); titlebarMouseWheelOperation( e->delta());
} }
@ -678,7 +678,7 @@ void Manager::createTitle()
for (TQPtrListIterator<Button> it(leftButtonList_); it.current(); ++it) for (TQPtrListIterator<Button> it(leftButtonList_); it.current(); ++it)
{ {
it.current()->tqsetAlignment(Button::Left); it.current()->setAlignment(Button::Left);
titleLayout_->addWidget(it.current()); titleLayout_->addWidget(it.current());
} }
@ -689,7 +689,7 @@ void Manager::createTitle()
for (TQPtrListIterator<Button> it(rightButtonList_); it.current(); ++it) for (TQPtrListIterator<Button> it(rightButtonList_); it.current(); ++it)
{ {
it.current()->tqsetAlignment(Button::Right); it.current()->setAlignment(Button::Right);
titleLayout_->addWidget(it.current()); titleLayout_->addWidget(it.current());
} }
} }

@ -56,7 +56,7 @@ class Manager : public KDecoration
void reset(unsigned long changed); void reset(unsigned long changed);
void borders(int&, int&, int&, int&) const; void borders(int&, int&, int&, int&) const;
void resize(const TQSize&); void resize(const TQSize&);
TQSize tqminimumSize() const; TQSize minimumSize() const;
void activeChange(); void activeChange();
void captionChange(); void captionChange();
void iconChange(); void iconChange();

@ -78,7 +78,7 @@ void MaximiseButton::setOn(bool on)
on_ = on; on_ = on;
setPixmap(on_ ? TQPixmap((const char **)unmaximise_xpm) setPixmap(on_ ? TQPixmap((const char **)unmaximise_xpm)
: TQPixmap((const char **)maximise_xpm)); : TQPixmap((const char **)maximise_xpm));
tqrepaint(); repaint();
TQToolTip::remove(this); TQToolTip::remove(this);
TQToolTip::add(this, on_ ? i18n("Restore") : i18n("Maximize")); TQToolTip::add(this, on_ ? i18n("Restore") : i18n("Maximize"));
} }

@ -372,22 +372,22 @@ void Static::_drawTitleTextAreaSides()
_drawBorder(temp, 4, titleHeight_ - 2); _drawBorder(temp, 4, titleHeight_ - 2);
painter_.begin(&aTitleTextLeft_); painter_.begin(&aTitleTextLeft_);
painter_.tqdrawPixmap(1, 1, temp, 0, 1); painter_.drawPixmap(1, 1, temp, 0, 1);
painter_.end(); painter_.end();
painter_.begin(&aTitleTextRight_); painter_.begin(&aTitleTextRight_);
painter_.tqdrawPixmap(0, 1, temp, 2, 1); painter_.drawPixmap(0, 1, temp, 2, 1);
painter_.end(); painter_.end();
palette_ = iTitlePal_; palette_ = iTitlePal_;
_drawBorder(temp, 4, titleHeight_ - 2); _drawBorder(temp, 4, titleHeight_ - 2);
painter_.begin(&iTitleTextLeft_); painter_.begin(&iTitleTextLeft_);
painter_.tqdrawPixmap(1, 1, temp, 0, 1); painter_.drawPixmap(1, 1, temp, 0, 1);
painter_.end(); painter_.end();
painter_.begin(&iTitleTextRight_); painter_.begin(&iTitleTextRight_);
painter_.tqdrawPixmap(0, 1, temp, 2, 1); painter_.drawPixmap(0, 1, temp, 2, 1);
painter_.end(); painter_.end();
} }
@ -403,22 +403,22 @@ void Static::_drawResizeCentralAreaSides()
_drawBorder(temp, 4, resizeHeight_ - 3); _drawBorder(temp, 4, resizeHeight_ - 3);
painter_.begin(&aResizeMidLeft_); painter_.begin(&aResizeMidLeft_);
painter_.tqdrawPixmap(0, 1, temp, 0, 1); painter_.drawPixmap(0, 1, temp, 0, 1);
painter_.end(); painter_.end();
painter_.begin(&aResizeMidRight_); painter_.begin(&aResizeMidRight_);
painter_.tqdrawPixmap(0, 1, temp, 2, 1); painter_.drawPixmap(0, 1, temp, 2, 1);
painter_.end(); painter_.end();
palette_ = iResizePal_; palette_ = iResizePal_;
_drawBorder(temp, 4, resizeHeight_ - 3); _drawBorder(temp, 4, resizeHeight_ - 3);
painter_.begin(&iResizeMidLeft_); painter_.begin(&iResizeMidLeft_);
painter_.tqdrawPixmap(0, 1, temp, 0, 1); painter_.drawPixmap(0, 1, temp, 0, 1);
painter_.end(); painter_.end();
painter_.begin(&iResizeMidRight_); painter_.begin(&iResizeMidRight_);
painter_.tqdrawPixmap(0, 1, temp, 2, 1); painter_.drawPixmap(0, 1, temp, 2, 1);
painter_.end(); painter_.end();
} }
@ -433,7 +433,7 @@ void Static::_drawTitleTextAreaBackground()
_drawBorder(temp, 70, titleHeight_ - 3); _drawBorder(temp, 70, titleHeight_ - 3);
painter_.begin(&aTitleTextMid_); painter_.begin(&aTitleTextMid_);
painter_.tqdrawPixmap(0, 1, temp, 2, 0); painter_.drawPixmap(0, 1, temp, 2, 0);
if (hicolour_) if (hicolour_)
painter_.drawTiledPixmap(0, 4, 64, titleHeight_ - 8, aTexture_); painter_.drawTiledPixmap(0, 4, 64, titleHeight_ - 8, aTexture_);
painter_.end(); painter_.end();
@ -442,7 +442,7 @@ void Static::_drawTitleTextAreaBackground()
_drawBorder(temp, 70, titleHeight_ - 3); _drawBorder(temp, 70, titleHeight_ - 3);
painter_.begin(&iTitleTextMid_); painter_.begin(&iTitleTextMid_);
painter_.tqdrawPixmap(0, 1, temp, 2, 0); painter_.drawPixmap(0, 1, temp, 2, 0);
if (hicolour_) if (hicolour_)
painter_.drawTiledPixmap(0, 4, 64, titleHeight_ - 8, iTexture_); painter_.drawTiledPixmap(0, 4, 64, titleHeight_ - 8, iTexture_);
painter_.end(); painter_.end();
@ -459,7 +459,7 @@ void Static::_drawResizeCentralAreaBackground()
_drawBorder(temp, 70, resizeHeight_ - 3); _drawBorder(temp, 70, resizeHeight_ - 3);
painter_.begin(&aResizeMid_); painter_.begin(&aResizeMid_);
painter_.tqdrawPixmap(0, 0, temp, 2, 0); painter_.drawPixmap(0, 0, temp, 2, 0);
if (hicolour_) if (hicolour_)
painter_.drawTiledPixmap(0, 4, 64, resizeHeight_ - 8, aTexture_); painter_.drawTiledPixmap(0, 4, 64, resizeHeight_ - 8, aTexture_);
painter_.end(); painter_.end();
@ -468,7 +468,7 @@ void Static::_drawResizeCentralAreaBackground()
_drawBorder(temp, 70, 7); _drawBorder(temp, 70, 7);
painter_.begin(&iResizeMid_); painter_.begin(&iResizeMid_);
painter_.tqdrawPixmap(0, 0, temp, 2, 0); painter_.drawPixmap(0, 0, temp, 2, 0);
if (hicolour_) if (hicolour_)
painter_.drawTiledPixmap(0, 4, 64, resizeHeight_ - 8, iTexture_); painter_.drawTiledPixmap(0, 4, 64, resizeHeight_ - 8, iTexture_);
painter_.end(); painter_.end();

@ -77,7 +77,7 @@ void StickyButton::setOn(bool on)
on_ = on; on_ = on;
setPixmap(on_ ? TQPixmap((const char **)unsticky_xpm) : setPixmap(on_ ? TQPixmap((const char **)unsticky_xpm) :
TQPixmap((const char **)sticky_xpm)); TQPixmap((const char **)sticky_xpm));
tqrepaint(); repaint();
TQToolTip::remove(this); TQToolTip::remove(this);
TQToolTip::add(this, on_ ? i18n("Not on all desktops") TQToolTip::add(this, on_ ? i18n("Not on all desktops")
: i18n("On all desktops")); : i18n("On all desktops"));

@ -124,7 +124,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>30</width> <width>30</width>
<height>20</height> <height>20</height>
@ -172,7 +172,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>180</width> <width>180</width>
<height>140</height> <height>140</height>
@ -197,7 +197,7 @@
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Text tqalignment:</string> <string>Text alignment:</string>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
@ -274,14 +274,14 @@
<property name="title"> <property name="title">
<string></string> <string></string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
<property name="toolTip" stdset="0"> <property name="toolTip" stdset="0">
<string></string> <string></string>
</property> </property>
<property name="whatsThis" stdset="0"> <property name="whatsThis" stdset="0">
<string>Use these buttons to set the tqalignment of the window title</string> <string>Use these buttons to set the alignment of the window title</string>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -292,7 +292,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout14</cstring> <cstring>layout14</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -348,7 +348,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>231</width> <width>231</width>
<height>71</height> <height>71</height>

@ -19,7 +19,7 @@
#include <tqbitmap.h> #include <tqbitmap.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqtimer.h> #include <tqtimer.h>
@ -51,7 +51,7 @@ bool smoothblendFactory::menuClose = false;
static const int TOPMARGIN = 4; // do not change static const int TOPMARGIN = 4; // do not change
static const int DECOHEIGHT = 4; // do not change static const int DECOHEIGHT = 4; // do not change
static const int SIDETITLEMARGIN = 2; static const int SIDETITLEMARGIN = 2;
// Default button tqlayout // Default button layout
const char default_left[] = "M"; const char default_left[] = "M";
const char default_right[] = "HIAX"; const char default_right[] = "HIAX";
@ -94,7 +94,7 @@ KDecoration* smoothblendFactory::createDecoration(KDecorationBridge* b) {
// reset() // reset()
// ------- // -------
// Reset the handler. Returns true if decorations need to be remade, false if // Reset the handler. Returns true if decorations need to be remade, false if
// only a tqrepaint is necessary // only a repaint is necessary
bool smoothblendFactory::reset(unsigned long changed) { bool smoothblendFactory::reset(unsigned long changed) {
// read in the configuration // read in the configuration
@ -184,11 +184,11 @@ smoothblendButton::~smoothblendButton() {
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// tqsizeHint() // sizeHint()
// ---------- // ----------
// Return size hint // Return size hint
TQSize smoothblendButton::tqsizeHint() const { TQSize smoothblendButton::sizeHint() const {
return TQSize(::factory->buttonSize(), ::factory->buttonSize()); return TQSize(::factory->buttonSize(), ::factory->buttonSize());
} }
@ -232,7 +232,7 @@ void smoothblendButton::animate() {
animTmr->start(TIMERINTERVAL, true); // single-shot animTmr->start(TIMERINTERVAL, true); // single-shot
} }
} }
tqrepaint(false); repaint(false);
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// enterEvent() // enterEvent()
@ -407,7 +407,7 @@ void smoothblendButton::drawButton( TQPainter *painter ) {
TQColor redColor(red); TQColor redColor(red);
bool active = client_->isActive(); bool active = client_->isActive();
TQPixmap backgroundTile = client_->getTitleBarTile(active); TQPixmap backgroundTile = client_->getTitleBarTile(active);
group = KDecoration::options()->tqcolorGroup(KDecoration::ColorTitleBar, active); group = KDecoration::options()->colorGroup(KDecoration::ColorTitleBar, active);
//draw the titlebar behind the buttons and app icons //draw the titlebar behind the buttons and app icons
if ((client_->maximizeMode()==client_->MaximizeFull) && !KDecoration::options()->moveResizeMaximizedWindows()) if ((client_->maximizeMode()==client_->MaximizeFull) && !KDecoration::options()->moveResizeMaximizedWindows())
@ -434,7 +434,7 @@ void smoothblendButton::drawButton( TQPainter *painter ) {
//that may produce pixilation of the image //that may produce pixilation of the image
painter->drawImage( dx, dy, menuButtonImage.smoothScale(newWidth, newHeight) ); painter->drawImage( dx, dy, menuButtonImage.smoothScale(newWidth, newHeight) );
} else { } else {
//highlight on a mouse over tqrepaint //highlight on a mouse over repaint
double factor = animProgress * 0.13; double factor = animProgress * 0.13;
if(!isDown()) if(!isDown())
@ -508,8 +508,8 @@ void smoothblendClient::create_pixmaps() {
TQColorGroup group,widgetGroup; TQColorGroup group,widgetGroup;
int FRAMESIZE = ::factory->frameSize(); int FRAMESIZE = ::factory->frameSize();
// Get the color groups we need for the gradients // Get the color groups we need for the gradients
group = options()->tqcolorGroup(KDecoration::ColorTitleBar, true); group = options()->colorGroup(KDecoration::ColorTitleBar, true);
widgetGroup = widget()->tqcolorGroup(); widgetGroup = widget()->colorGroup();
// active top title bar tile // active top title bar tile
tempPixmap.resize(1, TOPMARGIN); tempPixmap.resize(1, TOPMARGIN);
@ -525,7 +525,7 @@ void smoothblendClient::create_pixmaps() {
painter.end(); painter.end();
// inactive top title bar tile // inactive top title bar tile
group = options()->tqcolorGroup(KDecoration::ColorTitleBar, false); group = options()->colorGroup(KDecoration::ColorTitleBar, false);
tempPixmap = KPixmapEffect::unbalancedGradient(tempPixmap, tempPixmap = KPixmapEffect::unbalancedGradient(tempPixmap,
group.background(), group.background(),
widgetGroup.background(), widgetGroup.background(),
@ -539,7 +539,7 @@ void smoothblendClient::create_pixmaps() {
// active title bar tile // active title bar tile
tempPixmap.resize(1, s_titleHeight+FRAMESIZE); tempPixmap.resize(1, s_titleHeight+FRAMESIZE);
group = options()->tqcolorGroup(KDecoration::ColorTitleBar, true); group = options()->colorGroup(KDecoration::ColorTitleBar, true);
tempPixmap = KPixmapEffect::unbalancedGradient(tempPixmap, tempPixmap = KPixmapEffect::unbalancedGradient(tempPixmap,
group.background(), group.background(),
widgetGroup.background(), widgetGroup.background(),
@ -552,7 +552,7 @@ void smoothblendClient::create_pixmaps() {
painter.end(); painter.end();
// inactive title bar tile // inactive title bar tile
group = options()->tqcolorGroup(KDecoration::ColorTitleBar, false); group = options()->colorGroup(KDecoration::ColorTitleBar, false);
tempPixmap = KPixmapEffect::unbalancedGradient(tempPixmap, tempPixmap = KPixmapEffect::unbalancedGradient(tempPixmap,
group.background(), group.background(),
widgetGroup.background(), widgetGroup.background(),
@ -600,7 +600,7 @@ void smoothblendClient::init() {
} }
void smoothblendClient::_resetLayout() void smoothblendClient::_resetLayout()
{ {
// basic tqlayout: // basic layout:
// _______________________________________________________________ // _______________________________________________________________
// | topSpacer | // | topSpacer |
// |_______________________________________________________________| // |_______________________________________________________________|
@ -697,9 +697,9 @@ void smoothblendClient::_resetLayout()
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// addButtons() // addButtons()
// ------------ // ------------
// Add buttons to title tqlayout // Add buttons to title layout
void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int button_size) { void smoothblendClient::addButtons(TQBoxLayout *layout, const TQString& s, int button_size) {
TQString 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++) {
@ -710,8 +710,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "splat.png", i18n("Menu"),ButtonMenu,button_size); new smoothblendButton(this, "splat.png", i18n("Menu"),ButtonMenu,button_size);
connect(button[ButtonMenu], TQT_SIGNAL(pressed()), this, TQT_SLOT(menuButtonPressed())); connect(button[ButtonMenu], TQT_SIGNAL(pressed()), this, TQT_SLOT(menuButtonPressed()));
connect(button[ButtonMenu], TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased())); connect(button[ButtonMenu], TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased()));
tqlayout->addWidget(button[ButtonMenu]); layout->addWidget(button[ButtonMenu]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -726,8 +726,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "circle.png", tip, ButtonSticky, button_size, true); new smoothblendButton(this, "circle.png", tip, ButtonSticky, button_size, true);
connect(button[ButtonSticky], TQT_SIGNAL(clicked()), connect(button[ButtonSticky], TQT_SIGNAL(clicked()),
this, TQT_SLOT(toggleOnAllDesktops())); this, TQT_SLOT(toggleOnAllDesktops()));
tqlayout->addWidget(button[ButtonSticky]); layout->addWidget(button[ButtonSticky]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -737,8 +737,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "help.png", i18n("Help"), ButtonHelp, button_size); new smoothblendButton(this, "help.png", i18n("Help"), ButtonHelp, button_size);
connect(button[ButtonHelp], TQT_SIGNAL(clicked()), connect(button[ButtonHelp], TQT_SIGNAL(clicked()),
this, TQT_SLOT(showContextHelp())); this, TQT_SLOT(showContextHelp()));
tqlayout->addWidget(button[ButtonHelp]); layout->addWidget(button[ButtonHelp]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -748,8 +748,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "minimize.png", i18n("Minimize"), ButtonMin, button_size); new smoothblendButton(this, "minimize.png", i18n("Minimize"), ButtonMin, button_size);
connect(button[ButtonMin], TQT_SIGNAL(clicked()), connect(button[ButtonMin], TQT_SIGNAL(clicked()),
this, TQT_SLOT(minimize())); this, TQT_SLOT(minimize()));
tqlayout->addWidget(button[ButtonMin]); layout->addWidget(button[ButtonMin]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -764,8 +764,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "maximize.png", tip, ButtonMax, button_size, true); new smoothblendButton(this, "maximize.png", tip, ButtonMax, button_size, true);
connect(button[ButtonMax], TQT_SIGNAL(clicked()), connect(button[ButtonMax], TQT_SIGNAL(clicked()),
this, TQT_SLOT(maxButtonPressed())); this, TQT_SLOT(maxButtonPressed()));
tqlayout->addWidget(button[ButtonMax]); layout->addWidget(button[ButtonMax]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -775,8 +775,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "close.png", i18n("Close"), ButtonClose, button_size); new smoothblendButton(this, "close.png", i18n("Close"), ButtonClose, button_size);
connect(button[ButtonClose], TQT_SIGNAL(clicked()), connect(button[ButtonClose], TQT_SIGNAL(clicked()),
this, TQT_SLOT(closeWindow())); this, TQT_SLOT(closeWindow()));
tqlayout->addWidget(button[ButtonClose]); layout->addWidget(button[ButtonClose]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -787,8 +787,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
i18n("Keep Above Others"), ButtonAbove, button_size, true); i18n("Keep Above Others"), ButtonAbove, button_size, true);
connect(button[ButtonAbove], TQT_SIGNAL(clicked()), connect(button[ButtonAbove], TQT_SIGNAL(clicked()),
this, TQT_SLOT(aboveButtonPressed())); this, TQT_SLOT(aboveButtonPressed()));
tqlayout->addWidget(button[ButtonAbove]); layout->addWidget(button[ButtonAbove]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -799,8 +799,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
i18n("Keep Below Others"), ButtonBelow, button_size, true); i18n("Keep Below Others"), ButtonBelow, button_size, true);
connect(button[ButtonBelow], TQT_SIGNAL(clicked()), connect(button[ButtonBelow], TQT_SIGNAL(clicked()),
this, TQT_SLOT(belowButtonPressed())); this, TQT_SLOT(belowButtonPressed()));
tqlayout->addWidget(button[ButtonBelow]); layout->addWidget(button[ButtonBelow]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -815,13 +815,13 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "shade.png", tip, ButtonShade, button_size, true); new smoothblendButton(this, "shade.png", tip, ButtonShade, button_size, true);
connect(button[ButtonShade], TQT_SIGNAL(clicked()), connect(button[ButtonShade], TQT_SIGNAL(clicked()),
this, TQT_SLOT(shadeButtonPressed())); this, TQT_SLOT(shadeButtonPressed()));
tqlayout->addWidget(button[ButtonShade]); layout->addWidget(button[ButtonShade]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
case '_': // Spacer item case '_': // Spacer item
tqlayout->addSpacing(::factory->frameSize()); layout->addSpacing(::factory->frameSize());
} }
} }
} }
@ -836,7 +836,7 @@ void smoothblendClient::activeChange() {
for (int n=0; n<ButtonTypeCount; n++) for (int n=0; n<ButtonTypeCount; n++)
if (button[n]) if (button[n])
button[n]->reset(); button[n]->reset();
widget()->tqrepaint(false); widget()->repaint(false);
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -845,7 +845,7 @@ void smoothblendClient::activeChange() {
// The title has changed // The title has changed
void smoothblendClient::captionChange() { void smoothblendClient::captionChange() {
widget()->tqrepaint(titlebar_->tqgeometry(), false); widget()->repaint(titlebar_->geometry(), false);
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -858,7 +858,7 @@ void smoothblendClient::desktopChange() {
if (button[ButtonSticky]) { if (button[ButtonSticky]) {
TQToolTip::remove(button[ButtonSticky]); TQToolTip::remove(button[ButtonSticky]);
TQToolTip::add(button[ButtonSticky], d ? i18n("Un-Sticky") : i18n("Sticky")); TQToolTip::add(button[ButtonSticky], d ? i18n("Un-Sticky") : i18n("Sticky"));
button[ButtonSticky]->tqrepaint(false); button[ButtonSticky]->repaint(false);
} }
} }
@ -869,7 +869,7 @@ void smoothblendClient::desktopChange() {
void smoothblendClient::iconChange() { void smoothblendClient::iconChange() {
if (button[ButtonMenu]) { if (button[ButtonMenu]) {
button[ButtonMenu]->tqrepaint(false); button[ButtonMenu]->repaint(false);
} }
} }
@ -883,7 +883,7 @@ void smoothblendClient::maximizeChange() {
if (button[ButtonMax]) { if (button[ButtonMax]) {
TQToolTip::remove(button[ButtonMax]); TQToolTip::remove(button[ButtonMax]);
TQToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize")); TQToolTip::add(button[ButtonMax], m ? i18n("Restore") : i18n("Maximize"));
button[ButtonMax]->tqrepaint(false); button[ButtonMax]->repaint(false);
} }
} }
@ -897,7 +897,7 @@ void smoothblendClient::shadeChange() {
if (button[ButtonShade]) { if (button[ButtonShade]) {
TQToolTip::remove(button[ButtonShade]); TQToolTip::remove(button[ButtonShade]);
TQToolTip::add(button[ButtonShade], s ? i18n("Unshade") : i18n("Shade")); TQToolTip::add(button[ButtonShade], s ? i18n("Unshade") : i18n("Shade"));
button[ButtonShade]->tqrepaint(false); button[ButtonShade]->repaint(false);
} }
} }
@ -909,7 +909,7 @@ void smoothblendClient::shadeChange() {
void smoothblendClient::keepAboveChange(bool a) { void smoothblendClient::keepAboveChange(bool a) {
if (button[ButtonAbove]) { if (button[ButtonAbove]) {
button[ButtonAbove]->setOn(a); button[ButtonAbove]->setOn(a);
button[ButtonAbove]->tqrepaint(false); button[ButtonAbove]->repaint(false);
} }
} }
@ -921,7 +921,7 @@ void smoothblendClient::keepAboveChange(bool a) {
void smoothblendClient::keepBelowChange(bool b) { void smoothblendClient::keepBelowChange(bool b) {
if (button[ButtonBelow]) { if (button[ButtonBelow]) {
button[ButtonBelow]->setOn(b); button[ButtonBelow]->setOn(b);
button[ButtonBelow]->tqrepaint(false); button[ButtonBelow]->repaint(false);
} }
} }
@ -937,7 +937,7 @@ void smoothblendClient::borders(int &left, int &right, int &top, int &bottom) co
left = right = bottom = 0; left = right = bottom = 0;
top = ::factory->buttonSize(); top = ::factory->buttonSize();
// update tqlayout etc. // update layout etc.
topSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed); topSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
decoSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed); decoSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding); leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
@ -949,7 +949,7 @@ void smoothblendClient::borders(int &left, int &right, int &top, int &bottom) co
left = right = bottom = ::factory->frameSize(); left = right = bottom = ::factory->frameSize();
top = ::factory->titleSize() + (FRAMESIZE*2); top = ::factory->titleSize() + (FRAMESIZE*2);
// update tqlayout etc. // update layout etc.
topSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed); topSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
decoSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed); decoSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding); leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
@ -958,7 +958,7 @@ void smoothblendClient::borders(int &left, int &right, int &top, int &bottom) co
rightTitleSpacer_->changeSize(right,s_titleHeight,TQSizePolicy::Fixed, TQSizePolicy::Fixed); rightTitleSpacer_->changeSize(right,s_titleHeight,TQSizePolicy::Fixed, TQSizePolicy::Fixed);
bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed); bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
} }
widget()->tqlayout()->activate(); widget()->layout()->activate();
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -971,12 +971,12 @@ void smoothblendClient::resize(const TQSize &size) {
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// tqminimumSize() // minimumSize()
// ------------- // -------------
// Return the minimum allowable size for this window // Return the minimum allowable size for this window
TQSize smoothblendClient::tqminimumSize() const { TQSize smoothblendClient::minimumSize() const {
return widget()->tqminimumSize(); return widget()->minimumSize();
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -1077,7 +1077,7 @@ bool smoothblendClient::eventFilter(TQObject *obj, TQEvent *e) {
// Doubleclick on title // Doubleclick on title
void smoothblendClient::mouseDoubleClickEvent(TQMouseEvent *e) { void smoothblendClient::mouseDoubleClickEvent(TQMouseEvent *e) {
if (titlebar_->tqgeometry().contains(e->pos())) if (titlebar_->geometry().contains(e->pos()))
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
@ -1088,7 +1088,7 @@ void smoothblendClient::mouseDoubleClickEvent(TQMouseEvent *e) {
void smoothblendClient::wheelEvent(TQWheelEvent *e) void smoothblendClient::wheelEvent(TQWheelEvent *e)
{ {
if (titleLayout_->tqgeometry().contains(e->pos()) ) if (titleLayout_->geometry().contains(e->pos()) )
titlebarMouseWheelOperation( e->delta()); titlebarMouseWheelOperation( e->delta());
} }
@ -1117,18 +1117,18 @@ void smoothblendClient::paintEvent(TQPaintEvent*) {
TQPainter painter(widget()); TQPainter painter(widget());
bool active = isActive(); bool active = isActive();
//get group information first //get group information first
group = options()->tqcolorGroup(KDecoration::ColorTitleBar, isActive()); group = options()->colorGroup(KDecoration::ColorTitleBar, isActive());
widgetGroup = widget()->tqcolorGroup(); widgetGroup = widget()->colorGroup();
TQRect topRect( topSpacer_->tqgeometry() ); TQRect topRect( topSpacer_->geometry() );
TQRect titleRect( titleLayout_->tqgeometry() ); TQRect titleRect( titleLayout_->geometry() );
TQRect textRect( titlebar_->tqgeometry() ); TQRect textRect( titlebar_->geometry() );
TQRect Rltitle( leftTitleSpacer_->tqgeometry() ); TQRect Rltitle( leftTitleSpacer_->geometry() );
TQRect Rrtitle( rightTitleSpacer_->tqgeometry() ); TQRect Rrtitle( rightTitleSpacer_->geometry() );
TQRect Rdeco( decoSpacer_->tqgeometry() ); TQRect Rdeco( decoSpacer_->geometry() );
TQRect Rleft( leftSpacer_->tqgeometry() ); TQRect Rleft( leftSpacer_->geometry() );
TQRect Rright( rightSpacer_->tqgeometry() ); TQRect Rright( rightSpacer_->geometry() );
TQRect Rbottom( bottomSpacer_->tqgeometry() ); TQRect Rbottom( bottomSpacer_->geometry() );
TQRect tempRect; TQRect tempRect;
@ -1183,7 +1183,7 @@ void smoothblendClient::paintEvent(TQPaintEvent*) {
Rltitle.width(), Rltitle.width(),
Rltitle.height()+Rdeco.height(), Rltitle.height()+Rdeco.height(),
active ? *aTitleBarTile:*iTitleBarTile); active ? *aTitleBarTile:*iTitleBarTile);
// left mid tqlayout // left mid layout
painter.fillRect(Rleft,widgetGroup.background()); painter.fillRect(Rleft,widgetGroup.background());
// right of buttons and title // right of buttons and title
@ -1192,7 +1192,7 @@ void smoothblendClient::paintEvent(TQPaintEvent*) {
Rrtitle.width(), Rrtitle.width(),
Rrtitle.height()+Rdeco.height(), Rrtitle.height()+Rdeco.height(),
active ? *aTitleBarTile:*iTitleBarTile); active ? *aTitleBarTile:*iTitleBarTile);
// right mid tqlayout // right mid layout
painter.fillRect(Rright,widgetGroup.background()); painter.fillRect(Rright,widgetGroup.background());
// bottom // bottom
@ -1280,7 +1280,7 @@ void smoothblendClient::updateMask() {
void smoothblendClient::resizeEvent(TQResizeEvent *) { void smoothblendClient::resizeEvent(TQResizeEvent *) {
if (widget()->isShown()) { if (widget()->isShown()) {
TQRegion region = widget()->rect(); TQRegion region = widget()->rect();
region = region.subtract(titlebar_->tqgeometry()); region = region.subtract(titlebar_->geometry());
widget()->erase(region); widget()->erase(region);
updateMask(); updateMask();
} }
@ -1293,7 +1293,7 @@ void smoothblendClient::resizeEvent(TQResizeEvent *) {
void smoothblendClient::showEvent(TQShowEvent *) { void smoothblendClient::showEvent(TQShowEvent *) {
updateMask(); updateMask();
widget()->tqrepaint(); widget()->repaint();
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

@ -135,7 +135,7 @@ public:
~smoothblendButton(); ~smoothblendButton();
void setBitmap(const unsigned char *bitmap); void setBitmap(const unsigned char *bitmap);
TQSize tqsizeHint() const; TQSize sizeHint() const;
ButtonState lastMousePress() const; ButtonState lastMousePress() const;
void reset(); void reset();
TQImage getButtonImage(ButtonType type); TQImage getButtonImage(ButtonType type);
@ -171,7 +171,7 @@ inline TQt::ButtonState smoothblendButton::lastMousePress() const {
return lastmouse_; return lastmouse_;
} }
inline void smoothblendButton::reset() { inline void smoothblendButton::reset() {
tqrepaint(false); repaint(false);
} }
// smoothblendClient ////////////////////////////////////////////////////////// // smoothblendClient //////////////////////////////////////////////////////////
@ -195,7 +195,7 @@ 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 TQSize &size); virtual void resize(const TQSize &size);
virtual TQSize tqminimumSize() const; virtual TQSize minimumSize() const;
virtual Position mousePosition(const TQPoint &point) const; virtual Position mousePosition(const TQPoint &point) const;
TQPixmap getTitleBarTile(bool active) const TQPixmap getTitleBarTile(bool active) const
@ -204,7 +204,7 @@ public:
} }
private: private:
void addButtons(TQBoxLayout* tqlayout, const TQString& buttons, int buttonSize = 18); void addButtons(TQBoxLayout* layout, const TQString& buttons, int buttonSize = 18);
bool eventFilter(TQObject *obj, TQEvent *e); bool eventFilter(TQObject *obj, TQEvent *e);
void mouseDoubleClickEvent(TQMouseEvent *e); void mouseDoubleClickEvent(TQMouseEvent *e);
void wheelEvent(TQWheelEvent *e); void wheelEvent(TQWheelEvent *e);

@ -1,6 +1,6 @@
#include "systemclient.h" #include "systemclient.h"
#include <tqlayout.h> #include <layout.h>
#include <tqdrawutil.h> #include <tqdrawutil.h>
#include <tqbitmap.h> #include <tqbitmap.h>
#include <tqtooltip.h> #include <tqtooltip.h>
@ -13,7 +13,7 @@
#include <kapplication.h> #include <kapplication.h>
#include <kdebug.h> #include <kdebug.h>
// Default button tqlayout // Default button layout
const char default_left[] = "X"; const char default_left[] = "X";
const char default_right[] = "HSIA"; const char default_right[] = "HSIA";
@ -78,7 +78,7 @@ static void create_pixmaps()
aUpperGradient->resize(32, 18); aUpperGradient->resize(32, 18);
iUpperGradient = new KPixmap; iUpperGradient = new KPixmap;
iUpperGradient->resize(32, 18); iUpperGradient->resize(32, 18);
TQColor bgColor = kapp->tqpalette().active().background(); TQColor bgColor = kapp->palette().active().background();
KPixmapEffect::gradient(*aUpperGradient, KPixmapEffect::gradient(*aUpperGradient,
KDecoration::options()->color(KDecorationOptions::ColorFrame, true).light(130), KDecoration::options()->color(KDecorationOptions::ColorFrame, true).light(130),
bgColor, bgColor,
@ -124,12 +124,12 @@ static void create_pixmaps()
btnPix = new KPixmap; btnPix = new KPixmap;
btnPix->resize(14, 14); btnPix->resize(14, 14);
bitBlt(TQT_TQPAINTDEVICE(btnPix), 2, 2, TQT_TQPAINTDEVICE(&aPix), 0, 0, 10, 10, TQt::CopyROP, true); bitBlt(TQT_TQPAINTDEVICE(btnPix), 2, 2, TQT_TQPAINTDEVICE(&aPix), 0, 0, 10, 10, TQt::CopyROP, true);
drawButtonFrame(btnPix, KDecoration::options()->tqcolorGroup(KDecorationOptions::ColorFrame, true)); drawButtonFrame(btnPix, KDecoration::options()->colorGroup(KDecorationOptions::ColorFrame, true));
iBtnPix = new KPixmap; iBtnPix = new KPixmap;
iBtnPix->resize(14, 14); iBtnPix->resize(14, 14);
bitBlt(TQT_TQPAINTDEVICE(iBtnPix), 2, 2, TQT_TQPAINTDEVICE(&iPix), 0, 0, 10, 10, TQt::CopyROP, true); bitBlt(TQT_TQPAINTDEVICE(iBtnPix), 2, 2, TQT_TQPAINTDEVICE(&iPix), 0, 0, 10, 10, TQt::CopyROP, true);
drawButtonFrame(iBtnPix, KDecoration::options()->tqcolorGroup(KDecorationOptions::ColorFrame, false)); drawButtonFrame(iBtnPix, KDecoration::options()->colorGroup(KDecorationOptions::ColorFrame, false));
// pressed buttons // pressed buttons
@ -158,13 +158,13 @@ static void create_pixmaps()
btnPixDown = new KPixmap; btnPixDown = new KPixmap;
btnPixDown->resize(14, 14); btnPixDown->resize(14, 14);
bitBlt(TQT_TQPAINTDEVICE(btnPixDown), 2, 2, TQT_TQPAINTDEVICE(&aPix), 0, 0, 10, 10, TQt::CopyROP, true); bitBlt(TQT_TQPAINTDEVICE(btnPixDown), 2, 2, TQT_TQPAINTDEVICE(&aPix), 0, 0, 10, 10, TQt::CopyROP, true);
drawButtonFrame(btnPixDown, KDecoration::options()->tqcolorGroup(KDecorationOptions::ColorFrame, drawButtonFrame(btnPixDown, KDecoration::options()->colorGroup(KDecorationOptions::ColorFrame,
true)); true));
iBtnPixDown = new KPixmap; iBtnPixDown = new KPixmap;
iBtnPixDown->resize(14, 14); iBtnPixDown->resize(14, 14);
bitBlt(TQT_TQPAINTDEVICE(iBtnPixDown), 2, 2, TQT_TQPAINTDEVICE(&iPix), 0, 0, 10, 10, TQt::CopyROP, true); bitBlt(TQT_TQPAINTDEVICE(iBtnPixDown), 2, 2, TQT_TQPAINTDEVICE(&iPix), 0, 0, 10, 10, TQt::CopyROP, true);
drawButtonFrame(iBtnPixDown, KDecoration::options()->tqcolorGroup(KDecorationOptions::ColorFrame, drawButtonFrame(iBtnPixDown, KDecoration::options()->colorGroup(KDecorationOptions::ColorFrame,
false)); false));
} }
if(tqGray(KDecoration::options()->color(KDecorationOptions::ColorButtonBg, true).rgb()) > 128) if(tqGray(KDecoration::options()->color(KDecorationOptions::ColorButtonBg, true).rgb()) > 128)
@ -211,21 +211,21 @@ void SystemButton::setTipText(const TQString &tip)
} }
TQSize SystemButton::tqsizeHint() const TQSize SystemButton::sizeHint() const
{ {
return(TQSize(14, 14)); return(TQSize(14, 14));
} }
void SystemButton::reset() void SystemButton::reset()
{ {
tqrepaint(false); repaint(false);
} }
void SystemButton::setBitmap(const unsigned char *bitmap) void SystemButton::setBitmap(const unsigned char *bitmap)
{ {
deco = TQBitmap(8, 8, bitmap, true); deco = TQBitmap(8, 8, bitmap, true);
deco.setMask(deco); deco.setMask(deco);
tqrepaint(); repaint();
} }
void SystemButton::drawButton(TQPainter *p) void SystemButton::drawButton(TQPainter *p)
@ -237,7 +237,7 @@ void SystemButton::drawButton(TQPainter *p)
p->drawPixmap(0, 0, isDown() ? *iBtnPixDown : *iBtnPix); p->drawPixmap(0, 0, isDown() ? *iBtnPixDown : *iBtnPix);
} }
else{ else{
TQColorGroup g = KDecoration::options()->tqcolorGroup(KDecorationOptions::ColorFrame, TQColorGroup g = KDecoration::options()->colorGroup(KDecorationOptions::ColorFrame,
client->isActive()); client->isActive());
int x2 = width()-1; int x2 = width()-1;
int y2 = height()-1; int y2 = height()-1;
@ -251,7 +251,7 @@ void SystemButton::drawButton(TQPainter *p)
p->setPen(g.dark()); p->setPen(g.dark());
p->drawRect(1, 1, width()-2, height()-2); p->drawRect(1, 1, width()-2, height()-2);
// inner frame // inner frame
g = KDecoration::options()->tqcolorGroup(KDecorationOptions::ColorButtonBg, client->isActive()); g = KDecoration::options()->colorGroup(KDecorationOptions::ColorButtonBg, client->isActive());
p->fillRect(3, 3, width()-6, height()-6, g.background()); p->fillRect(3, 3, width()-6, height()-6, g.background());
p->setPen(isDown() ? g.mid() : g.light()); p->setPen(isDown() ? g.mid() : g.light());
p->drawLine(2, 2, x2-2, 2); p->drawLine(2, 2, x2-2, 2);
@ -440,7 +440,7 @@ void SystemClient::reset(unsigned long)
{ {
titleBuffer.resize(0, 0); titleBuffer.resize(0, 0);
recalcTitleBuffer(); recalcTitleBuffer();
widget()->tqrepaint(); widget()->repaint();
if (button[ButtonClose]) if (button[ButtonClose])
button[ButtonClose]->reset(); button[ButtonClose]->reset();
if (button[ButtonSticky]) if (button[ButtonSticky])
@ -466,7 +466,7 @@ void SystemClient::resizeEvent( TQResizeEvent* )
/* /*
if ( isVisibleToTLW() && !testWFlags( WStaticContents )) { if ( isVisibleToTLW() && !testWFlags( WStaticContents )) {
TQPainter p( this ); TQPainter p( this );
TQRect t = titlebar->tqgeometry(); TQRect t = titlebar->geometry();
t.setTop( 0 ); t.setTop( 0 );
TQRegion r = rect(); TQRegion r = rect();
r = r.subtract( t ); r = r.subtract( t );
@ -481,9 +481,9 @@ void SystemClient::resize( const TQSize& s )
} }
TQSize SystemClient::tqminimumSize() const TQSize SystemClient::minimumSize() const
{ {
return widget()->tqminimumSize(); return widget()->minimumSize();
} }
@ -499,10 +499,10 @@ void SystemClient::recalcTitleBuffer()
p.drawTiledPixmap(0, 0, width(), 18, *aUpperGradient); p.drawTiledPixmap(0, 0, width(), 18, *aUpperGradient);
else else
p.fillRect(0, 0, width(), 18, p.fillRect(0, 0, width(), 18,
options()->tqcolorGroup(KDecorationOptions::ColorFrame, true). options()->colorGroup(KDecorationOptions::ColorFrame, true).
brush(TQColorGroup::Button)); brush(TQColorGroup::Button));
TQRect t = titlebar->tqgeometry(); TQRect t = titlebar->geometry();
t.setTop( 2 ); t.setTop( 2 );
t.setLeft( t.left() + 4 ); t.setLeft( t.left() + 4 );
t.setRight( t.right() - 2 ); t.setRight( t.right() - 2 );
@ -532,24 +532,24 @@ void SystemClient::recalcTitleBuffer()
void SystemClient::captionChange() void SystemClient::captionChange()
{ {
recalcTitleBuffer(); recalcTitleBuffer();
widget()->tqrepaint(titlebar->tqgeometry(), false); widget()->repaint(titlebar->geometry(), false);
} }
void SystemClient::drawRoundFrame(TQPainter &p, int x, int y, int w, int h) void SystemClient::drawRoundFrame(TQPainter &p, int x, int y, int w, int h)
{ {
kDrawRoundButton(&p, x, y, w, h, kDrawRoundButton(&p, x, y, w, h,
options()->tqcolorGroup(KDecorationOptions::ColorFrame, isActive()), false); options()->colorGroup(KDecorationOptions::ColorFrame, isActive()), false);
} }
void SystemClient::paintEvent( TQPaintEvent* ) void SystemClient::paintEvent( TQPaintEvent* )
{ {
TQPainter p(widget()); TQPainter p(widget());
TQRect t = titlebar->tqgeometry(); TQRect t = titlebar->geometry();
TQBrush fillBrush(TQBrush(widget()->tqcolorGroup().brush(TQColorGroup::Background)).pixmap() ? TQBrush fillBrush(TQBrush(widget()->colorGroup().brush(TQColorGroup::Background)).pixmap() ?
widget()->tqcolorGroup().brush(TQColorGroup::Background) : widget()->colorGroup().brush(TQColorGroup::Background) :
options()->tqcolorGroup(KDecorationOptions::ColorFrame, isActive()). options()->colorGroup(KDecorationOptions::ColorFrame, isActive()).
brush(TQColorGroup::Button)); brush(TQColorGroup::Button));
p.fillRect(1, 18, width()-2, height()-19, fillBrush); p.fillRect(1, 18, width()-2, height()-19, fillBrush);
@ -570,10 +570,10 @@ void SystemClient::paintEvent( TQPaintEvent* )
p.drawText(t, AlignCenter, caption() ); p.drawText(t, AlignCenter, caption() );
} }
p.setPen(options()->tqcolorGroup(KDecorationOptions::ColorFrame, isActive()).light()); p.setPen(options()->colorGroup(KDecorationOptions::ColorFrame, isActive()).light());
p.drawLine(width()-20, height()-7, width()-10, height()-7); p.drawLine(width()-20, height()-7, width()-10, height()-7);
p.drawLine(width()-20, height()-5, width()-10, height()-5); p.drawLine(width()-20, height()-5, width()-10, height()-5);
p.setPen(options()->tqcolorGroup(KDecorationOptions::ColorFrame, isActive()).dark()); p.setPen(options()->colorGroup(KDecorationOptions::ColorFrame, isActive()).dark());
p.drawLine(width()-20, height()-6, width()-10, height()-6); p.drawLine(width()-20, height()-6, width()-10, height()-6);
p.drawLine(width()-20, height()-4, width()-10, height()-4); p.drawLine(width()-20, height()-4, width()-10, height()-4);
@ -597,7 +597,7 @@ void SystemClient::showEvent(TQShowEvent *)
// Client::showEvent(ev); // Client::showEvent(ev);
doShape(); doShape();
widget()->show(); widget()->show();
// widget()->tqrepaint(); // widget()->repaint();
} }
/*void SystemClient::windowWrapperShowEvent( TQShowEvent* ) /*void SystemClient::windowWrapperShowEvent( TQShowEvent* )
@ -607,13 +607,13 @@ void SystemClient::showEvent(TQShowEvent *)
void SystemClient::mouseDoubleClickEvent( TQMouseEvent * e ) void SystemClient::mouseDoubleClickEvent( TQMouseEvent * e )
{ {
if ( e->button() == Qt::LeftButton && titlebar->tqgeometry().contains( e->pos() ) ) if ( e->button() == Qt::LeftButton && titlebar->geometry().contains( e->pos() ) )
titlebarDblClickOperation(); titlebarDblClickOperation();
} }
void SystemClient::wheelEvent( TQWheelEvent *e ) void SystemClient::wheelEvent( TQWheelEvent *e )
{ {
if (isSetShade() || TQRect( 0, 0, width(), titlebar->tqgeometry().height() ).contains( e->pos() ) ) if (isSetShade() || TQRect( 0, 0, width(), titlebar->geometry().height() ).contains( e->pos() ) )
titlebarMouseWheelOperation( e->delta()); titlebarMouseWheelOperation( e->delta());
} }
@ -633,7 +633,7 @@ void SystemClient::maximizeChange()
void SystemClient::activeChange() void SystemClient::activeChange()
{ {
widget()->tqrepaint(false); widget()->repaint(false);
if (button[ButtonClose]) if (button[ButtonClose])
button[ButtonClose]->reset(); button[ButtonClose]->reset();
if (button[ButtonSticky]) if (button[ButtonSticky])
@ -649,7 +649,7 @@ void SystemClient::activeChange()
void SystemClient::iconChange() void SystemClient::iconChange()
{ {
// if (button[BtnMenu] && button[BtnMenu]->isVisible()) // if (button[BtnMenu] && button[BtnMenu]->isVisible())
// button[BtnMenu]->tqrepaint(false); // button[BtnMenu]->repaint(false);
} }
void SystemClient::desktopChange() void SystemClient::desktopChange()

@ -45,7 +45,7 @@ class SystemClient : public KDecoration
virtual void iconChange(); virtual void iconChange();
virtual void desktopChange(); virtual void desktopChange();
virtual void activeChange(); virtual void activeChange();
virtual TQSize tqminimumSize() const; virtual TQSize minimumSize() const;
virtual void borders(int&, int&, int&, int&) const; virtual void borders(int&, int&, int&, int&) const;
virtual void reset( unsigned long changed ); virtual void reset( unsigned long changed );
void drawRoundFrame(TQPainter &p, int x, int y, int w, int h); void drawRoundFrame(TQPainter &p, int x, int y, int w, int h);
@ -75,7 +75,7 @@ class SystemButton : public TQButton
const unsigned char *bitmap=NULL, const TQString& tip=NULL); const unsigned char *bitmap=NULL, const TQString& tip=NULL);
void setBitmap(const unsigned char *bitmap); void setBitmap(const unsigned char *bitmap);
void reset(); void reset();
TQSize tqsizeHint() const; TQSize sizeHint() const;
void setTipText(const TQString &tip); void setTipText(const TQString &tip);
ButtonState last_button; ButtonState last_button;
protected: protected:

Loading…
Cancel
Save