summaryrefslogtreecommitdiffstats
path: root/kstyles/kthemestyle
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kstyles/kthemestyle
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstyles/kthemestyle')
-rw-r--r--kstyles/kthemestyle/kstyledirs.cpp10
-rw-r--r--kstyles/kthemestyle/kstyledirs.h10
-rw-r--r--kstyles/kthemestyle/kthemebase.cpp312
-rw-r--r--kstyles/kthemestyle/kthemebase.h166
-rw-r--r--kstyles/kthemestyle/kthemestyle.cpp496
-rw-r--r--kstyles/kthemestyle/kthemestyle.h120
6 files changed, 557 insertions, 557 deletions
diff --git a/kstyles/kthemestyle/kstyledirs.cpp b/kstyles/kthemestyle/kstyledirs.cpp
index b77d4d56b..7e548d0d5 100644
--- a/kstyles/kthemestyle/kstyledirs.cpp
+++ b/kstyles/kthemestyle/kstyledirs.cpp
@@ -1,7 +1,7 @@
/*
$Id$
- Simple helper routines for style's use of KStandardDirs with QSettings, etc.
+ Simple helper routines for style's use of KStandardDirs with TQSettings, etc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -21,7 +21,7 @@
This file is part of the KDE libraries
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include "kstyledirs.h"
@@ -37,12 +37,12 @@ KStyleDirs::~KStyleDirs()
{
}
-void KStyleDirs::addToSearch( const char* type, QSettings& s ) const
+void KStyleDirs::addToSearch( const char* type, TQSettings& s ) const
{
- const QStringList & dirs = resourceDirs(type);
+ const TQStringList & dirs = resourceDirs(type);
for ( int c = dirs.size()-1; c >= 0 ; c-- )
{
- s.insertSearchPath( QSettings::Unix, dirs[ c ]);
+ s.insertSearchPath( TQSettings::Unix, dirs[ c ]);
}
}
diff --git a/kstyles/kthemestyle/kstyledirs.h b/kstyles/kthemestyle/kstyledirs.h
index b23457a07..9d2635136 100644
--- a/kstyles/kthemestyle/kstyledirs.h
+++ b/kstyles/kthemestyle/kstyledirs.h
@@ -23,8 +23,8 @@
#define KSTYLE_DIRS_H
-#include <qsettings.h>
-#include <qstringlist.h>
+#include <tqsettings.h>
+#include <tqstringlist.h>
#include <kstandarddirs.h>
/**
@@ -34,7 +34,7 @@
* @version $Id$
*
* This class provides a this wrapper for styles around KStandardDirs,
-* permitting integration with QSettings and easy loading of pixmaps
+* permitting integration with TQSettings and easy loading of pixmaps
*
* It add share/apps/kstyle/themes as "themerc",
* share/apps/kstyle/pixmaps "themepixmap"
@@ -59,13 +59,13 @@ public:
Adds all of KDE directories of type type to the seach path of q.
For example, when one does the following:
- QSettings settings;
+ TQSettings settings;
KStyleDirs dirs;
dirs.addToSearch("config",settings);
The one can do settings.readEntry("kstyle/KDE/WidgetStyle") to access a settings in kstylerc.
*/
- void addToSearch( const char* type, QSettings& q) const; //Better name?
+ void addToSearch( const char* type, TQSettings& q) const; //Better name?
protected:
static KStyleDirs* instance;
diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp
index bd463e28e..eb8bcc615 100644
--- a/kstyles/kthemestyle/kthemebase.cpp
+++ b/kstyles/kthemestyle/kthemebase.cpp
@@ -41,18 +41,18 @@
#include "kthemebase.h"
#include <kpixmapeffect.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
#include <stdlib.h>
-#include <qsettings.h>
-#include <qapplication.h>
-#include <qscrollbar.h>
+#include <tqsettings.h>
+#include <tqapplication.h>
+#include <tqscrollbar.h>
-typedef QMap<QString, QString> Prop;
+typedef TQMap<TQString, TQString> Prop;
-template class QIntCache<KThemePixmap>
+template class TQIntCache<KThemePixmap>
;
/*
@@ -61,13 +61,13 @@ Can't delete old slider image when calculating the rotated one for some reason.
*/
//Shamelessly stolen from KConfigBase
-static QColor readColorEntry( QSettings* s, const char *pKey,
- const QColor* pDefault )
+static TQColor readColorEntry( TQSettings* s, const char *pKey,
+ const TQColor* pDefault )
{
- QColor aRetColor;
+ TQColor aRetColor;
int nRed = 0, nGreen = 0, nBlue = 0;
- QString aValue = s->readEntry( pKey );
+ TQString aValue = s->readEntry( pKey );
if ( !aValue.isEmpty() )
{
if ( aValue.at( 0 ) == '#' )
@@ -156,36 +156,36 @@ public:
/**
* Colors to override defaults with..
*/
- QColor overrideForegroundCol;
- QColor overrideBackgroundCol;
- QColor overrideSelectForegroundCol;
- QColor overrideSelectBackgroundCol;
- QColor overrideWindowForegroundCol;
- QColor overrideWindowBackgroundCol;
+ TQColor overrideForegroundCol;
+ TQColor overrideBackgroundCol;
+ TQColor overrideSelectForegroundCol;
+ TQColor overrideSelectBackgroundCol;
+ TQColor overrideWindowForegroundCol;
+ TQColor overrideWindowBackgroundCol;
int contrast;
- QMap <QString, QMap<QString, QString> > props;
+ TQMap <TQString, TQMap<TQString, TQString> > props;
- QMap<const QPixmap*, QColor> colorCache;
+ TQMap<const TQPixmap*, TQColor> colorCache;
/*
A heuristic routine that tries to determine the avergae color of the image
Wouldn't work for things like sliders, etc.
*/
- QColor pixmapAveColor( const QPixmap* p )
+ TQColor pixmapAveColor( const TQPixmap* p )
{
if ( colorCache.contains( p ) )
return colorCache[ p ];
- QImage to_ave = p->convertToImage();
+ TQImage to_ave = p->convertToImage();
double h = 0, s = 0, v = 0;
int count = 0;
int dh, ds, dv;
for ( int x = 0; x < p->width(); x++ )
{
- QColor pix( to_ave.pixel( x, p->height() / 2 ) );
+ TQColor pix( to_ave.pixel( x, p->height() / 2 ) );
pix.hsv( &dh, &ds, &dv );
h += dh;
s += ds;
@@ -195,14 +195,14 @@ public:
for ( int y = 0; y < p->height(); y++ )
{
- QColor pix( to_ave.pixel( p->width() / 2, y ) );
+ TQColor pix( to_ave.pixel( p->width() / 2, y ) );
pix.hsv( &dh, &ds, &dv );
h += dh;
s += ds;
v += dv;
count++;
}
- colorCache[ p ] = QColor( int( h / count + 0.5 ), int( s / count + 0.5 ), int( v / count + 0.5 ), QColor::Hsv );
+ colorCache[ p ] = TQColor( int( h / count + 0.5 ), int( s / count + 0.5 ), int( v / count + 0.5 ), TQColor::Hsv );
return colorCache[ p ];
}
};
@@ -237,9 +237,9 @@ void KThemeBase::generateBorderPix( int i )
if ( pbPixmaps[ i ] )
{
// evidently I have to do masks manually...
- const QBitmap * srcMask = pbPixmaps[ i ] ->mask();
- QBitmap destMask( pbWidth[ i ], pbWidth[ i ] );
- QPixmap tmp( pbWidth[ i ], pbWidth[ i ] );
+ const TQBitmap * srcMask = pbPixmaps[ i ] ->mask();
+ TQBitmap destMask( pbWidth[ i ], pbWidth[ i ] );
+ TQPixmap tmp( pbWidth[ i ], pbWidth[ i ] );
bitBlt( &tmp, 0, 0, pbPixmaps[ i ], 0, 0, pbWidth[ i ], pbWidth[ i ],
Qt::CopyROP, false );
@@ -338,8 +338,8 @@ void KThemeBase::generateBorderPix( int i )
}
-void KThemeBase::copyWidgetConfig( int sourceID, int destID, QString *pixnames,
- QString *brdnames )
+void KThemeBase::copyWidgetConfig( int sourceID, int destID, TQString *pixnames,
+ TQString *brdnames )
{
scaleHints[ destID ] = scaleHints[ sourceID ];
gradients[ destID ] = gradients[ sourceID ];
@@ -349,17 +349,17 @@ void KThemeBase::copyWidgetConfig( int sourceID, int destID, QString *pixnames,
highlights[ destID ] = highlights[ sourceID ];
if ( grLowColors[ sourceID ] )
- grLowColors[ destID ] = new QColor( *grLowColors[ sourceID ] );
+ grLowColors[ destID ] = new TQColor( *grLowColors[ sourceID ] );
else
grLowColors[ destID ] = NULL;
if ( grHighColors[ sourceID ] )
- grHighColors[ destID ] = new QColor( *grHighColors[ sourceID ] );
+ grHighColors[ destID ] = new TQColor( *grHighColors[ sourceID ] );
else
grHighColors[ destID ] = NULL;
if ( colors[ sourceID ] )
- colors[ destID ] = new QColorGroup( *colors[ sourceID ] );
+ colors[ destID ] = new TQColorGroup( *colors[ sourceID ] );
else
colors[ destID ] = NULL;
@@ -413,17 +413,17 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
};
int i;
- QString tmpStr;
- QString pixnames[ WIDGETS ]; // used for duplicate check
- QString brdnames[ WIDGETS ];
+ TQString tmpStr;
+ TQString pixnames[ WIDGETS ]; // used for duplicate check
+ TQString brdnames[ WIDGETS ];
bool loaded[ WIDGETS ]; // used for preloading for CopyWidget
- QSettings config;
+ TQSettings config;
if (configDirName.isEmpty() || configDirName == ".")
{
KStyleDirs::dirs()->addToSearch( "themerc", config );
}
- else config.insertSearchPath( QSettings::Unix, configDirName );
+ else config.insertSearchPath( TQSettings::Unix, configDirName );
applyConfigFile( config );
@@ -442,7 +442,7 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
else
{
Prop& copyProp = d->props[ widgetEntries[ i ] ];
- copyProp[ "CopyWidget" ] = QString( widgetEntries[ i - INHERIT_ITEMS ] );
+ copyProp[ "CopyWidget" ] = TQString( widgetEntries[ i - INHERIT_ITEMS ] );
}
#endif
@@ -473,20 +473,20 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
if ( pixmaps[ RotSliderGroove ] )
{
- QWMatrix r270; //TODO: 90 if reverse?
+ TQWMatrix r270; //TODO: 90 if reverse?
r270.rotate( 270 );
KThemePixmap* bf = new KThemePixmap( pixmaps[ RotSliderGroove ], pixmaps[ RotSliderGroove ] ->xForm( r270 ) ); //
pixmaps[ RotSliderGroove ] = bf;
if ( images[ RotSliderGroove ] )
{
delete images[ RotSliderGroove ];
- images[ RotSliderGroove ] = new QImage( bf->convertToImage() );
+ images[ RotSliderGroove ] = new TQImage( bf->convertToImage() );
}
}
if ( pixmaps[ RotActiveTab ] )
{
- QWMatrix r180;
+ TQWMatrix r180;
r180.rotate( 180 );
KThemePixmap* bf = new KThemePixmap( pixmaps[ RotActiveTab ], pixmaps[ RotActiveTab ] ->xForm( r180 ) );
@@ -494,13 +494,13 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
if ( images[ RotActiveTab ] )
{
delete images[ RotActiveTab ];
- images[ RotActiveTab ] = new QImage( bf->convertToImage() );
+ images[ RotActiveTab ] = new TQImage( bf->convertToImage() );
}
}
if ( pixmaps[ RotInactiveTab ] )
{
- QWMatrix r180;
+ TQWMatrix r180;
r180.rotate( 180 );
KThemePixmap* bf = new KThemePixmap( pixmaps[ RotInactiveTab ], pixmaps[ RotInactiveTab ] ->xForm( r180 ) );
@@ -508,7 +508,7 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
if ( images[ RotInactiveTab ] )
{
delete images[ RotInactiveTab ];
- images[ RotInactiveTab ] = new QImage( bf->convertToImage() );
+ images[ RotInactiveTab ] = new TQImage( bf->convertToImage() );
}
}
@@ -522,7 +522,7 @@ void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
d->props.clear();
}
-KThemeBase::KThemeBase( const QString& dir, const QString & configFile )
+KThemeBase::KThemeBase( const TQString& dir, const TQString & configFile )
: KStyle( FilledFrameWorkaround ), configFileName( configFile )
{
d = new KThemeBasePrivate;
@@ -559,9 +559,9 @@ KThemeBase::KThemeBase( const QString& dir, const QString & configFile )
;
}
-void KThemeBase::applyConfigFile( QSettings& config )
+void KThemeBase::applyConfigFile( TQSettings& config )
{
- QStringList keys = config.entryList( configFileName );
+ TQStringList keys = config.entryList( configFileName );
if ( keys.contains( "foreground" ) )
{
@@ -651,10 +651,10 @@ KThemeBase::~KThemeBase()
delete d;
}
-QImage* KThemeBase::loadImage( const QString &name )
+TQImage* KThemeBase::loadImage( const TQString &name )
{
- QImage * image = new QImage;
- QString path = KStyleDirs::dirs()->findResource( "themepixmap",name );
+ TQImage * image = new QImage;
+ TQString path = KStyleDirs::dirs()->findResource( "themepixmap",name );
image->load( path );
if ( !image->isNull() )
return ( image );
@@ -663,10 +663,10 @@ QImage* KThemeBase::loadImage( const QString &name )
return ( NULL );
}
-KThemePixmap* KThemeBase::loadPixmap( const QString &name )
+KThemePixmap* KThemeBase::loadPixmap( const TQString &name )
{
KThemePixmap * pixmap = new KThemePixmap( false );
- QString path = KStyleDirs::dirs()->findResource( "themepixmap", name );
+ TQString path = KStyleDirs::dirs()->findResource( "themepixmap", name );
pixmap->load( path );
if ( !pixmap->isNull() )
return pixmap;
@@ -697,7 +697,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
else
{
cache->insert( pixmaps[ widget ], KThemeCache::FullScale, widget );
- QImage tmpImg = images[ widget ] ->smoothScale( w, h );
+ TQImage tmpImg = images[ widget ] ->smoothScale( w, h );
pixmaps[ widget ] = new KThemePixmap;
pixmaps[ widget ] ->convertFromImage( tmpImg );
if ( blends[ widget ] != 0.0 )
@@ -722,7 +722,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
else
{
cache->insert( pixmaps[ widget ], KThemeCache::HorizontalScale, widget );
- QImage tmpImg = images[ widget ] ->
+ TQImage tmpImg = images[ widget ] ->
smoothScale( w, images[ widget ] ->height() );
pixmaps[ widget ] = new KThemePixmap;
pixmaps[ widget ] ->convertFromImage( tmpImg );
@@ -748,7 +748,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
else
{
cache->insert( pixmaps[ widget ], KThemeCache::VerticalScale, widget );
- QImage tmpImg =
+ TQImage tmpImg =
images[ widget ] ->smoothScale( images[ widget ] ->width(), h );
pixmaps[ widget ] = new KThemePixmap;
pixmaps[ widget ] ->convertFromImage( tmpImg );
@@ -773,11 +773,11 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
else
{
cache->insert( pixmaps[ widget ], KThemeCache::FullScale, widget );
- QPixmap tile;
+ TQPixmap tile;
tile.convertFromImage( *images[ widget ] );
pixmaps[ widget ] = new KThemePixmap;
pixmaps[ widget ] ->resize( w, h );
- QPainter p( pixmaps[ widget ] );
+ TQPainter p( pixmaps[ widget ] );
p.drawTiledPixmap( 0, 0, w, h, tile );
if ( blends[ widget ] != 0.0 )
blend( widget );
@@ -801,14 +801,14 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
{
pixmap = new KThemePixmap();
pixmap->resize( w, h );
- QBitmap mask;
+ TQBitmap mask;
mask.resize( w, h );
mask.fill( color0 );
- QPainter mPainter;
+ TQPainter mPainter;
mPainter.begin( &mask );
- QPixmap *tmp = borderPixmap( widget ) ->border( KThemePixmap::TopLeft );
- const QBitmap *srcMask = tmp->mask();
+ TQPixmap *tmp = borderPixmap( widget ) ->border( KThemePixmap::TopLeft );
+ const TQBitmap *srcMask = tmp->mask();
int bdWidth = tmp->width();
bitBlt( pixmap, 0, 0, tmp, 0, 0, bdWidth, bdWidth,
@@ -850,7 +850,7 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
else
mPainter.fillRect( w - bdWidth, h - bdWidth, bdWidth, bdWidth, color1 );
- QPainter p;
+ TQPainter p;
p.begin( pixmap );
if ( w - bdWidth * 2 > 0 )
{
@@ -1014,8 +1014,8 @@ KThemePixmap* KThemeBase::gradient( int w, int h, WidgetType widget ) const
KPixmap s;
int offset = decoWidth( widget );
s.resize( w - offset * 2, h - offset * 2 );
- QColor lc( *grLowColors[ widget ] );
- QColor hc( *grHighColors[ widget ] );
+ TQColor lc( *grLowColors[ widget ] );
+ TQColor hc( *grHighColors[ widget ] );
if ( bevelContrast( widget ) )
{
int bc = bevelContrast( widget );
@@ -1088,7 +1088,7 @@ KThemePixmap* KThemeBase::scalePixmap( int w, int h, WidgetType widget ) const
return ( scale( w, h, widget ) );
}
-QColorGroup* KThemeBase::makeColorGroup( const QColor &fg, const QColor &bg,
+TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg,
Qt::GUIStyle )
{
if ( shading == Motif )
@@ -1096,82 +1096,82 @@ QColorGroup* KThemeBase::makeColorGroup( const QColor &fg, const QColor &bg,
int highlightVal, lowlightVal;
highlightVal = 100 + ( 2 * d->contrast + 4 ) * 16 / 10;
lowlightVal = 100 + ( ( 2 * d->contrast + 4 ) * 10 );
- return ( new QColorGroup( fg, bg, bg.light( highlightVal ),
+ return ( new TQColorGroup( fg, bg, bg.light( highlightVal ),
bg.dark( lowlightVal ), bg.dark( 120 ),
- fg, QApplication::palette().active().base() ) );
+ fg, TQApplication::palette().active().base() ) );
}
else
- return ( new QColorGroup( fg, bg, bg.light( 150 ), bg.dark(),
+ return ( new TQColorGroup( fg, bg, bg.light( 150 ), bg.dark(),
bg.dark( 120 ), fg,
- QApplication::palette().active().base() ) );
+ TQApplication::palette().active().base() ) );
}
-void KThemeBase::applyMiscResourceGroup( QSettings *config )
+void KThemeBase::applyMiscResourceGroup( TQSettings *config )
{
#ifndef Q_WS_QWS //FIXME
d->props.erase( "Misc" ); // clear the old property
- QString base = configFileName + "Misc/";
+ TQString base = configFileName + "Misc/";
Prop& prop = d->props[ "Misc" ];
- QString tmpStr;
+ TQString tmpStr;
tmpStr = config->readEntry( base + "SButtonPosition" );
if ( tmpStr == "BottomLeft" )
- prop[ "SButtonPosition" ] = QString::number( ( int ) SBBottomLeft );
+ prop[ "SButtonPosition" ] = TQString::number( ( int ) SBBottomLeft );
else if ( tmpStr == "BottomRight" )
- prop[ "SButtonPosition" ] = QString::number( ( int ) SBBottomRight );
+ prop[ "SButtonPosition" ] = TQString::number( ( int ) SBBottomRight );
else
{
if ( tmpStr != "Opposite" && !tmpStr.isEmpty() )
qWarning( "KThemeBase: Unrecognized sb button option %s, using Opposite.\n", tmpStr.latin1() );
;
- prop[ "SButtonPosition" ] = QString::number( ( int ) SBOpposite );
+ prop[ "SButtonPosition" ] = TQString::number( ( int ) SBOpposite );
}
tmpStr = config->readEntry( base + "ArrowType" );
if ( tmpStr == "Small" )
- prop[ "ArrowType" ] = QString::number( ( int ) SmallArrow );
+ prop[ "ArrowType" ] = TQString::number( ( int ) SmallArrow );
else if ( tmpStr == "3D" )
- prop[ "ArrowType" ] = QString::number( ( int ) MotifArrow );
+ prop[ "ArrowType" ] = TQString::number( ( int ) MotifArrow );
else
{
if ( tmpStr != "Normal" && !tmpStr.isEmpty() )
qWarning( "KThemeBase: Unrecognized arrow option %s, using Normal.\n", tmpStr.latin1() );
- prop[ "ArrowType" ] = QString::number( ( int ) LargeArrow );
+ prop[ "ArrowType" ] = TQString::number( ( int ) LargeArrow );
}
tmpStr = config->readEntry( base + "ShadeStyle" );
if ( tmpStr == "Motif" )
- prop[ "ShadeStyle" ] = QString::number( ( int ) Motif );
+ prop[ "ShadeStyle" ] = TQString::number( ( int ) Motif );
else if ( tmpStr == "Next" )
- prop[ "ShadeStyle" ] = QString::number( ( int ) Next );
+ prop[ "ShadeStyle" ] = TQString::number( ( int ) Next );
else if ( tmpStr == "KDE" )
- prop[ "ShadeStyle" ] = QString::number( ( int ) KDE );
+ prop[ "ShadeStyle" ] = TQString::number( ( int ) KDE );
else
- prop[ "ShadeStyle" ] = QString::number( ( int ) Windows );
+ prop[ "ShadeStyle" ] = TQString::number( ( int ) Windows );
- prop[ "FrameWidth" ] = QString::number( config->readNumEntry( base + "FrameWidth", 2 ) );
- prop[ "Cache" ] = QString::number( config->readNumEntry( base + "Cache", 1024 ) );
- prop[ "ScrollBarExtent" ] = QString::number( config->readNumEntry( base + "ScrollBarExtent", 16 ) );
+ prop[ "FrameWidth" ] = TQString::number( config->readNumEntry( base + "FrameWidth", 2 ) );
+ prop[ "Cache" ] = TQString::number( config->readNumEntry( base + "Cache", 1024 ) );
+ prop[ "ScrollBarExtent" ] = TQString::number( config->readNumEntry( base + "ScrollBarExtent", 16 ) );
#endif
}
-static int readNumEntry( Prop& prop, QString setting, int def )
+static int readNumEntry( Prop& prop, TQString setting, int def )
{
bool ok;
- QString s_val = prop[ setting ];
+ TQString s_val = prop[ setting ];
int val = s_val.toInt( &ok );
if ( ok )
return val;
return def;
}
-static QColor readColorEntry( Prop& prop, QString setting, const QColor& def )
+static TQColor readColorEntry( Prop& prop, TQString setting, const TQColor& def )
{
- QString s_val = prop[ setting ];
+ TQString s_val = prop[ setting ];
if ( !s_val.isEmpty() )
{
- QColor c( s_val );
+ TQColor c( s_val );
return c;
}
return def;
@@ -1194,16 +1194,16 @@ void KThemeBase::readMiscResourceGroup()
}
-void KThemeBase::applyResourceGroup( QSettings *config, int i )
+void KThemeBase::applyResourceGroup( TQSettings *config, int i )
{
#ifndef Q_WS_QWS //FIXME
- QString tmpStr;
+ TQString tmpStr;
int tmpVal;
// clear the old property
d->props.erase( widgetEntries[ i ] );
- QString base = configFileName + widgetEntries[ i ] + "/";
+ TQString base = configFileName + widgetEntries[ i ] + "/";
Prop& prop = d->props[ widgetEntries[ i ] ];
@@ -1227,7 +1227,7 @@ void KThemeBase::applyResourceGroup( QSettings *config, int i )
qWarning( "KThemeBase: Unrecognized scale option %s, using Tile.\n", tmpStr.latin1() );
tmpVal = ( int ) TileScale;
}
- prop[ "ScaleHint" ] = QString::number( tmpVal );
+ prop[ "ScaleHint" ] = TQString::number( tmpVal );
// Gradient type
tmpStr = config->readEntry( base + "Gradient" );
@@ -1251,41 +1251,41 @@ void KThemeBase::applyResourceGroup( QSettings *config, int i )
qWarning( "KThemeBase: Unrecognized gradient option %s, using None.\n", tmpStr.latin1() );
tmpVal = ( int ) GrNone;
}
- prop[ "Gradient" ] = QString::number( tmpVal );
+ prop[ "Gradient" ] = TQString::number( tmpVal );
// Blend intensity
tmpStr.setNum( config->readDoubleEntry( base + "BlendIntensity", 0.0 ) );
prop[ "Blend" ] = tmpStr;
// Bevel contrast
- prop[ "BContrast" ] = QString::number( config->readNumEntry( base + "BevelContrast", 0 ) );
+ prop[ "BContrast" ] = TQString::number( config->readNumEntry( base + "BevelContrast", 0 ) );
// Border width
- prop[ "Border" ] = QString::number( config->readNumEntry( base + "Border", 1 ) );
+ prop[ "Border" ] = TQString::number( config->readNumEntry( base + "Border", 1 ) );
// Highlight width
- prop[ "Highlight" ] = QString::number( config->readNumEntry( base + "Highlight", 1 ) );
+ prop[ "Highlight" ] = TQString::number( config->readNumEntry( base + "Highlight", 1 ) );
- QStringList keys = config->entryList( base );
+ TQStringList keys = config->entryList( base );
// Gradient low color or blend background
if ( keys.contains( "GradientLow" ) )
- prop[ "GrLow" ] = readColorEntry( config, QString( base + "GradientLow" ).latin1(),
- &QApplication::palette().active().background() ).name();
+ prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(),
+ &TQApplication::palette().active().background() ).name();
// Gradient high color
if ( keys.contains( "GradientHigh" ) )
- prop[ "GrHigh" ] = readColorEntry( config, QString( base + "GradientHigh" ).latin1(),
- &QApplication::palette().active().foreground() ).name();
+ prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(),
+ &TQApplication::palette().active().foreground() ).name();
// Extended color attributes
if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) )
{
- QColor fg, bg;
+ TQColor fg, bg;
if ( keys.contains( "Background" ) )
- bg = readColorEntry( config, QString( base + "Background" ).latin1(), &bg );
+ bg = readColorEntry( config, TQString( base + "Background" ).latin1(), &bg );
if ( keys.contains( "Foreground" ) )
- fg = readColorEntry( config, QString( base + "Foreground" ).latin1(), &fg );
+ fg = readColorEntry( config, TQString( base + "Foreground" ).latin1(), &fg );
prop[ "Foreground" ] = fg.name();
prop[ "Background" ] = bg.name();
@@ -1302,24 +1302,24 @@ void KThemeBase::applyResourceGroup( QSettings *config, int i )
if ( !tmpStr.isEmpty() )
{
prop[ "PixmapBorder" ] = tmpStr;
- prop[ "PixmapBWidth" ] = QString::number(
+ prop[ "PixmapBWidth" ] = TQString::number(
config->readNumEntry( base + "PixmapBWidth", 0 ) );
}
// Various widget specific settings. This was more efficient when bunched
// together in the misc group, but this makes an easier to read config.
if ( i == SliderGroove )
- prop[ "SmallGroove" ] = QString::number(
+ prop[ "SmallGroove" ] = TQString::number(
config->readBoolEntry( base + "SmallGroove", false ) );
else if ( i == ActiveTab || i == InactiveTab )
- prop[ "BottomLine" ] = QString::number(
+ prop[ "BottomLine" ] = TQString::number(
config->readBoolEntry( base + "BottomLine", true ) );
else if ( i == Splitter )
- prop[ "Width" ] = QString::number( config->readNumEntry( base + "Width", 10 ) );
+ prop[ "Width" ] = TQString::number( config->readNumEntry( base + "Width", 10 ) );
else if ( i == ComboBox || i == ComboBoxDown )
{
if ( keys.contains( "Round" ) )
- prop[ "Round" ] = QString::number( config->readBoolEntry( base + "Round", false ) );
+ prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000"; // invalid, used w/multiple groups
@@ -1327,32 +1327,32 @@ void KThemeBase::applyResourceGroup( QSettings *config, int i )
else if ( i == PushButton || i == PushButtonDown )
{
if ( keys.contains( "XShift" ) )
- prop[ "XShift" ] = QString::number( config->readNumEntry( base + "XShift", 0 ) );
+ prop[ "XShift" ] = TQString::number( config->readNumEntry( base + "XShift", 0 ) );
else
prop[ "XShift" ] = "5000";
if ( keys.contains( "YShift" ) )
- prop[ "YShift" ] = QString::number( config->readNumEntry( base + "YShift", 0 ) );
+ prop[ "YShift" ] = TQString::number( config->readNumEntry( base + "YShift", 0 ) );
else
prop[ "YShift" ] = "5000";
if ( keys.contains( "3DFocusRect" ) )
- prop[ "3DFRect" ] = QString::number( config->
+ prop[ "3DFRect" ] = TQString::number( config->
readBoolEntry( base + "3DFocusRect", false ) );
else
prop[ "3DFRect" ] = "5000";
if ( keys.contains( "3DFocusOffset" ) )
- prop[ "3DFOffset" ] = QString::number( config->
+ prop[ "3DFOffset" ] = TQString::number( config->
readBoolEntry( base + "3DFocusOffset", 0 ) );
else
prop[ "3DFOffset" ] = "5000";
if ( keys.contains( "Round" ) )
- prop[ "Round" ] = QString::number( config->readBoolEntry( base + "Round", false ) );
+ prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000";
}
#endif
}
-void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
+void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdnames,
bool *loadArray )
{
#ifndef Q_WS_QWS //FIXME
@@ -1363,7 +1363,7 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
int tmpVal;
Prop prop = d->props[ widgetEntries[ i ] ];
- QString tmpStr;
+ TQString tmpStr;
tmpStr = prop[ "CopyWidget" ];
if ( !tmpStr.isEmpty() )
@@ -1411,7 +1411,7 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
// Blend intensity
tmpStr = prop[ "Blend" ];
if ( tmpStr.isEmpty() )
- tmpStr = QString::fromLatin1( "0.0" );
+ tmpStr = TQString::fromLatin1( "0.0" );
blends[ i ] = tmpStr.toFloat();
// Bevel contrast
@@ -1426,8 +1426,8 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
// Gradient low color or blend background
if ( gradients[ i ] != GrNone || blends[ i ] != 0.0 )
grLowColors[ i ] =
- new QColor( readColorEntry( prop, "GrLow",
- QApplication::palette().active().
+ new TQColor( readColorEntry( prop, "GrLow",
+ TQApplication::palette().active().
background() ) );
else
grLowColors[ i ] = NULL;
@@ -1435,22 +1435,22 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
// Gradient high color
if ( gradients[ i ] != GrNone )
grHighColors[ i ] =
- new QColor( readColorEntry( prop, "GrHigh",
- QApplication::palette().active().
+ new TQColor( readColorEntry( prop, "GrHigh",
+ TQApplication::palette().active().
background() ) );
else
grHighColors[ i ] = NULL;
// Extended color attributes
- QColor fg, bg;
+ TQColor fg, bg;
fg = readColorEntry( prop, "Foreground", fg );
bg = readColorEntry( prop, "Background", bg );
if ( fg.isValid() || bg.isValid() )
{
if ( !fg.isValid() )
- fg = QApplication::palette().active().foreground();
+ fg = TQApplication::palette().active().foreground();
if ( !bg.isValid() )
- bg = QApplication::palette().active().background();
+ bg = TQApplication::palette().active().background();
colors[ i ] = makeColorGroup( fg, bg, Qt::WindowsStyle );
}
else
@@ -1563,17 +1563,17 @@ void KThemeBase::readResourceGroup( int i, QString *pixnames, QString *brdnames,
}
-QPalette KThemeBase::overridePalette( const QPalette& pal )
+TQPalette KThemeBase::overridePalette( const TQPalette& pal )
{
//Read current settings for colors..
- QColor background = pal.active().background();
- QColor foreground = pal.active().foreground();
- QColor button = background; //CHECKME
- QColor highlight = pal.active().highlight();
- QColor highlightedText = pal.active().highlightedText(); //CHECKME
- QColor base = pal.active().base(); //config->readColorEntry( "windowBackground", &white );
- QColor baseText = pal.active().text(); //CHECKME
+ TQColor background = pal.active().background();
+ TQColor foreground = pal.active().foreground();
+ TQColor button = background; //CHECKME
+ TQColor highlight = pal.active().highlight();
+ TQColor highlightedText = pal.active().highlightedText(); //CHECKME
+ TQColor base = pal.active().base(); //config->readColorEntry( "windowBackground", &white );
+ TQColor baseText = pal.active().text(); //CHECKME
//See whether there are any immediate overrides.
if ( d->overrideBackground )
@@ -1596,7 +1596,7 @@ QPalette KThemeBase::overridePalette( const QPalette& pal )
if ( uncached( Bevel ) )
button = d->pixmapAveColor( uncached( Bevel ) );
- QColor buttonText = foreground;
+ TQColor buttonText = foreground;
int highlightVal, lowlightVal;
highlightVal = 100 + ( 2 * d->contrast + 4 ) * 16 / 10;
@@ -1616,14 +1616,14 @@ QPalette KThemeBase::overridePalette( const QPalette& pal )
}
- QColorGroup pre( foreground, button, background.light( highlightVal ),
+ TQColorGroup pre( foreground, button, background.light( highlightVal ),
background.dark( lowlightVal ), background.dark( 120 ),
baseText, buttonText /*CHECKME: BrightText*/, base, background );
buttonText = colorGroup( pre, PushButton ) ->foreground();
}
- QColor disfg = foreground;
+ TQColor disfg = foreground;
int h, s, v;
disfg.hsv( &h, &s, &v );
if ( v > 128 )
@@ -1637,31 +1637,31 @@ QPalette KThemeBase::overridePalette( const QPalette& pal )
disfg = Qt::darkGray;
- QColorGroup disabledgrp( disfg, background, //TODO:Convert this to the new ctor.
+ TQColorGroup disabledgrp( disfg, background, //TODO:Convert this to the new ctor.
background.light( highlightVal ),
background.dark( lowlightVal ),
background.dark( 120 ),
background.dark( 120 ), base );
- QColorGroup colgrp( foreground, button, background.light( highlightVal ),
+ TQColorGroup colgrp( foreground, button, background.light( highlightVal ),
background.dark( lowlightVal ), background.dark( 120 ),
baseText, buttonText /*CHECKME: BrightText*/, base, background );
- colgrp.setColor( QColorGroup::Highlight, highlight );
- colgrp.setColor( QColorGroup::HighlightedText, highlightedText );
- colgrp.setColor( QColorGroup::ButtonText, buttonText );
- colgrp.setColor( QColorGroup::Midlight, button.light( 110 ) );
+ colgrp.setColor( TQColorGroup::Highlight, highlight );
+ colgrp.setColor( TQColorGroup::HighlightedText, highlightedText );
+ colgrp.setColor( TQColorGroup::ButtonText, buttonText );
+ colgrp.setColor( TQColorGroup::Midlight, button.light( 110 ) );
- disabledgrp.setColor( QColorGroup::Base, base );
- disabledgrp.setColor( QColorGroup::Button, button );
- disabledgrp.setColor( QColorGroup::ButtonText, buttonText );
- disabledgrp.setColor( QColorGroup::Midlight, button.light( 110 ) );
+ disabledgrp.setColor( TQColorGroup::Base, base );
+ disabledgrp.setColor( TQColorGroup::Button, button );
+ disabledgrp.setColor( TQColorGroup::ButtonText, buttonText );
+ disabledgrp.setColor( TQColorGroup::Midlight, button.light( 110 ) );
- QPalette newPal( colgrp, disabledgrp, colgrp );
+ TQPalette newPal( colgrp, disabledgrp, colgrp );
return newPal;
@@ -1695,12 +1695,12 @@ KThemePixmap::KThemePixmap( const KThemePixmap &p )
int i;
for ( i = 0; i < 8; ++i )
if ( p.b[ i ] )
- b[ i ] = new QPixmap( *p.b[ i ] );
+ b[ i ] = new TQPixmap( *p.b[ i ] );
else
b[ i ] = NULL;
}
-KThemePixmap::KThemePixmap( const KThemePixmap &p, const QPixmap &p2 )
+KThemePixmap::KThemePixmap( const KThemePixmap &p, const TQPixmap &p2 )
: KPixmap( p2 )
{
if ( p.t )
@@ -1713,7 +1713,7 @@ KThemePixmap::KThemePixmap( const KThemePixmap &p, const QPixmap &p2 )
int i;
for ( i = 0; i < 8; ++i )
if ( p.b[ i ] )
- b[ i ] = new QPixmap( *p.b[ i ] );
+ b[ i ] = new TQPixmap( *p.b[ i ] );
else
b[ i ] = NULL;
}
@@ -1730,18 +1730,18 @@ KThemePixmap::~KThemePixmap()
delete b[ i ];
}
-KThemeCache::KThemeCache( int maxSize, QObject *parent, const char *name )
- : QObject( parent, name )
+KThemeCache::KThemeCache( int maxSize, TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
cache.setMaxCost( maxSize * 1024 );
cache.setAutoDelete( true );
flushTimer.start( 300000 ); // 5 minutes
- connect( &flushTimer, SIGNAL( timeout() ), SLOT( flushTimeout() ) );
+ connect( &flushTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( flushTimeout() ) );
}
void KThemeCache::flushTimeout()
{
- QIntCacheIterator<KThemePixmap> it( cache );
+ TQIntCacheIterator<KThemePixmap> it( cache );
while ( it.current() )
{
if ( it.current() ->isOld() )
diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h
index 8f8041464..b821e1c7c 100644
--- a/kstyles/kthemestyle/kthemebase.h
+++ b/kstyles/kthemestyle/kthemebase.h
@@ -29,16 +29,16 @@ Copyright (C) 1998, 1999, 2000 KDE Team
#ifndef KTHEMEBASE_H
#define KTHEMEBASE_H
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
#include <kpixmap.h>
-#include <qintcache.h>
-#include <qstring.h>
+#include <tqintcache.h>
+#include <tqstring.h>
#include <kstyle.h>
-#include <qsettings.h>
-#include <qpalette.h> // for QColorGroup
+#include <tqsettings.h>
+#include <tqpalette.h> // for QColorGroup
#include "kstyledirs.h"
-#include <qmap.h>
+#include <tqmap.h>
class QImage;
@@ -58,34 +58,34 @@ public:
KThemePixmap( bool timer = true );
KThemePixmap( const KThemePixmap &p );
- KThemePixmap( const KThemePixmap &p, const QPixmap& rp );
+ KThemePixmap( const KThemePixmap &p, const TQPixmap& rp );
~KThemePixmap();
- QPixmap* border( BorderType type );
- void setBorder( BorderType type, const QPixmap &p );
+ TQPixmap* border( BorderType type );
+ void setBorder( BorderType type, const TQPixmap &p );
void updateAccessed();
bool isOld();
protected:
- QTime *t;
- QPixmap *b[ 8 ];
+ TQTime *t;
+ TQPixmap *b[ 8 ];
private:
class KThemePixmapPrivate;
KThemePixmapPrivate *d;
};
-inline QPixmap* KThemePixmap::border( BorderType type )
+inline TQPixmap* KThemePixmap::border( BorderType type )
{
return ( b[ type ] );
}
-inline void KThemePixmap::setBorder( BorderType type, const QPixmap &p )
+inline void KThemePixmap::setBorder( BorderType type, const TQPixmap &p )
{
if ( b[ type ] )
{
qWarning( "KThemePixmap: Overwriting existing border!" );
delete( b[ type ] );
}
- b[ type ] = new QPixmap( p );
+ b[ type ] = new TQPixmap( p );
}
inline void KThemePixmap::updateAccessed()
@@ -100,14 +100,14 @@ inline bool KThemePixmap::isOld()
}
/**
- * A very simple pixmap cache for theme plugins. QPixmapCache is not used
- * since it uses QString keys which are not needed. All the information we
- * need can be encoded in a numeric key. Using QIntCache instead allows us to
+ * A very simple pixmap cache for theme plugins. TQPixmapCache is not used
+ * since it uses TQString keys which are not needed. All the information we
+ * need can be encoded in a numeric key. Using TQIntCache instead allows us to
* skip the string operations.
*
* This class is mostly just inline methods that do bit operations on a key
* composed of the widget ID, width and/or height, and then calls
- * QIntCache::find().
+ * TQIntCache::find().
*
* One other thing to note is that full, horizontal, and vertically scaled
* pixmaps are not used interchangeably. For example, if you insert a fully
@@ -136,7 +136,7 @@ public:
* @param parent The parent object.
* @param name The name of the object.
*/
- KThemeCache( int maxSize, QObject *parent = 0, const char *name = 0 );
+ KThemeCache( int maxSize, TQObject *parent = 0, const char *name = 0 );
/**
* Inserts a new pixmap into the cache.
*
@@ -188,8 +188,8 @@ public:
protected slots:
void flushTimeout();
protected:
- QIntCache<KThemePixmap> cache;
- QTimer flushTimer;
+ TQIntCache<KThemePixmap> cache;
+ TQTimer flushTimer;
private:
class KThemeCachePrivate;
@@ -218,7 +218,7 @@ public:
/**
* Constructs a new KThemeBase object.
*/
- KThemeBase( const QString &dirs, const QString &configFile );
+ KThemeBase( const TQString &dirs, const TQString &configFile );
~KThemeBase();
/**
* Describes if a pixmap should be scaled fully, horizontally, vertically,
@@ -305,10 +305,10 @@ public:
* @param widget The widget whose color group to retrieve.
*
*/
- const QColorGroup* colorGroup( const QColorGroup &defaultGroup,
+ const TQColorGroup* colorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const;
- QBrush pixmapBrush( const QColorGroup &group, QColorGroup::ColorRole role,
+ TQBrush pixmapBrush( const TQColorGroup &group, TQColorGroup::ColorRole role,
int w, int h, WidgetType widget );
/**
* True if the widget has a pixmap or gradient specified.
@@ -424,7 +424,7 @@ public:
* height. This will return NULL if no pixmap or gradient is specified.
* It may also return a different sized pixmap if the scaling
* is set to Tiled. When using this method, you should call it using
- * the needed width and height then use QPainter::drawTiledPixmap to
+ * the needed width and height then use TQPainter::drawTiledPixmap to
* paint it. Doing this, if the pixmap is scaled it will be the proper
* size, otherwise it will be tiled.
*
@@ -443,29 +443,29 @@ protected:
*
* @param config The configuration file to apply.
*/
- void applyConfigFile( QSettings & config );
+ void applyConfigFile( TQSettings & config );
/*
* Generates a new palette based on the values for which have been specified explicitly
* in the .themerc file.
*/
- QPalette overridePalette( const QPalette& pal );
+ TQPalette overridePalette( const TQPalette& pal );
/**
- * Returns a QImage for the given widget if the widget is scaled, NULL
+ * Returns a TQImage for the given widget if the widget is scaled, NULL
* otherwise. QImages of the original pixmap are stored for scaled
* widgets in order to facilitate fast and accurate smooth-scaling. This
* also saves us a conversion from a pixmap to an image then back again.
*/
- QImage* image( WidgetType widget ) const;
+ TQImage* image( WidgetType widget ) const;
/**
* Returns the gradient high color if one is specified, NULL otherwise.
*/
- QColor* gradientHigh( WidgetType widget ) const;
+ TQColor* gradientHigh( WidgetType widget ) const;
/**
* Returns the gradient low color if one is specified, NULL otherwise.
*/
- QColor* gradientLow( WidgetType widget ) const;
+ TQColor* gradientLow( WidgetType widget ) const;
/**
* Reads in all the configuration file entries supported.
*
@@ -474,48 +474,48 @@ protected:
* is obsolete.
*/
void readConfig( Qt::GUIStyle colorStyle = Qt::WindowsStyle );
- void readWidgetConfig( int i, QSettings *config, QString *pixnames,
- QString *brdnames, bool *loadArray );
- void copyWidgetConfig( int sourceID, int destID, QString *pixnames,
- QString *brdnames );
+ void readWidgetConfig( int i, TQSettings *config, TQString *pixnames,
+ TQString *brdnames, bool *loadArray );
+ void copyWidgetConfig( int sourceID, int destID, TQString *pixnames,
+ TQString *brdnames );
/**
* Makes a full color group based on the given foreground and background
* colors. This is the same code used by KDE (kapp.cpp) in previous
* versions.
*/
- QColorGroup* makeColorGroup( const QColor &fg, const QColor &bg,
+ TQColorGroup* makeColorGroup( const TQColor &fg, const TQColor &bg,
Qt::GUIStyle style = Qt::WindowsStyle );
KThemePixmap* scale( int w, int h, WidgetType widget ) const;
KThemePixmap* scaleBorder( int w, int h, WidgetType type ) const;
KThemePixmap* gradient( int w, int h, WidgetType widget ) const ;
KThemePixmap* blend( WidgetType widget ) const;
void generateBorderPix( int i );
- void applyResourceGroup( QSettings *config, int i );
- void applyMiscResourceGroup( QSettings *config );
- void readResourceGroup( int i, QString *pixnames, QString *brdnames,
+ void applyResourceGroup( TQSettings *config, int i );
+ void applyMiscResourceGroup( TQSettings *config );
+ void readResourceGroup( int i, TQString *pixnames, TQString *brdnames,
bool *loadArray );
void readMiscResourceGroup();
/**
* Attempts to load a pixmap from the default KThemeBase locations.
*/
- KThemePixmap* loadPixmap( const QString &name );
+ KThemePixmap* loadPixmap( const TQString &name );
/**
* Attempts to load a image from the default KThemeBase locations.
*/
- QImage* loadImage( const QString &name );
+ TQImage* loadImage( const TQString &name );
/**
These are included for fuuture extension purposes..
*/
- virtual int pixelMetric ( PixelMetric metric, const QWidget * widget = 0 ) const
+ virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const
{
return KStyle::pixelMetric( metric, widget );
}
- virtual void drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & cg,
+ virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
SFlags flags = Style_Default,
- const QStyleOption& option = QStyleOption::Default ) const
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
KStyle::drawPrimitive ( pe, p, r, cg,
flags, option );
@@ -523,48 +523,48 @@ protected:
virtual void drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags how = Style_Default,
- const QStyleOption& opt = QStyleOption::Default ) const
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
KStyle::drawControl( element, p, widget,
r, cg, how, opt );
}
virtual void drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt = QStyleOption::Default ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
KStyle::drawControlMask( element, p, widget, r, opt );
}
virtual void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& opt = QStyleOption::Default ) const
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
}
virtual void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& opt = QStyleOption::Default ) const
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
KStyle::drawKStylePrimitive( kpe,
p, widget, r,
@@ -573,8 +573,8 @@ protected:
virtual int styleHint( StyleHint sh,
- const QWidget *widget = 0,
- const QStyleOption& opt = QStyleOption::Default,
+ const TQWidget *widget = 0,
+ const TQStyleOption& opt = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const
{
return KStyle::styleHint( sh,
@@ -583,10 +583,10 @@ protected:
returnData );
}
- virtual QSize sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentsSize,
- const QStyleOption& opt = QStyleOption::Default ) const
+ virtual TQSize sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentsSize,
+ const TQStyleOption& opt = TQStyleOption::Default ) const
{
return KStyle::sizeFromContents( contents,
widget, contentsSize, opt );
@@ -610,8 +610,8 @@ private:
bool focus3D;
KThemeCache *cache;
int cacheSize;
- QString configFileName;
- QString configDirName;
+ TQString configFileName;
+ TQString configDirName;
/**
* The theme pixmaps. Many of these may be NULL if no pixmap is specified.
@@ -625,7 +625,7 @@ private:
* The theme images. These are for scaled images and are kept in order
* to maintain fast smoothscaling.
*/
- mutable QImage *images[ WIDGETS ];
+ mutable TQImage *images[ WIDGETS ];
/**
* The border widths
*/
@@ -641,15 +641,15 @@ private:
/**
* All the color groups.
*/
- mutable QColorGroup *colors[ WIDGETS ];
+ mutable TQColorGroup *colors[ WIDGETS ];
/**
* Gradient low colors (or blend background).
*/
- mutable QColor *grLowColors[ WIDGETS ];
+ mutable TQColor *grLowColors[ WIDGETS ];
/**
* Gradient high colors.
*/
- mutable QColor *grHighColors[ WIDGETS ];
+ mutable TQColor *grHighColors[ WIDGETS ];
/**
* Gradient types.
*/
@@ -721,17 +721,17 @@ inline KThemePixmap* KThemeBase::uncached( WidgetType widget ) const
return ( pixmaps[ widget ] );
}
-inline QBrush KThemeBase::pixmapBrush( const QColorGroup &group,
- QColorGroup::ColorRole role,
+inline TQBrush KThemeBase::pixmapBrush( const TQColorGroup &group,
+ TQColorGroup::ColorRole role,
int w, int h, WidgetType widget )
{
if ( pixmaps[ widget ] || images[ widget ] )
- return ( QBrush( group.color( role ), *scalePixmap( w, h, widget ) ) );
+ return ( TQBrush( group.color( role ), *scalePixmap( w, h, widget ) ) );
else
return ( group.color( role ) );
}
-inline const QColorGroup* KThemeBase::colorGroup( const QColorGroup &defaultGroup,
+inline const TQColorGroup* KThemeBase::colorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const
{
return ( ( colors[ widget ] ) ? colors[ widget ] : &defaultGroup );
@@ -757,17 +757,17 @@ inline int KThemeBase::decoWidth( WidgetType widget ) const
return ( pbWidth[ widget ] ? pbWidth[ widget ] : borders[ widget ] + highlights[ widget ] );
}
-inline QColor* KThemeBase::gradientHigh( WidgetType widget ) const
+inline TQColor* KThemeBase::gradientHigh( WidgetType widget ) const
{
return ( grHighColors[ widget ] );
}
-inline QColor* KThemeBase::gradientLow( WidgetType widget ) const
+inline TQColor* KThemeBase::gradientLow( WidgetType widget ) const
{
return ( grLowColors[ widget ] );
}
-inline QImage* KThemeBase::image( WidgetType widget ) const
+inline TQImage* KThemeBase::image( WidgetType widget ) const
{
return ( images[ widget ] );
}
diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp
index cdb419772..5ed132eea 100644
--- a/kstyles/kthemestyle/kthemestyle.cpp
+++ b/kstyles/kthemestyle/kthemestyle.cpp
@@ -40,35 +40,35 @@ Port version 0.9.7
#include "kthemestyle.h"
#include "kthemebase.h"
-#include <qstyleplugin.h>
-#include <qstylefactory.h>
+#include <tqstyleplugin.h>
+#include <tqstylefactory.h>
#include <kimageeffect.h>
-#include <qbitmap.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqbitmap.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#define INCLUDE_MENUITEM_DEF
-#include <qmenudata.h>
-#include <qpopupmenu.h>
-#include <qpalette.h>
-#include <qtabbar.h>
-#include <qtoolbutton.h>
+#include <tqmenudata.h>
+#include <tqpopupmenu.h>
+#include <tqpalette.h>
+#include <tqtabbar.h>
+#include <tqtoolbutton.h>
#include <kglobalsettings.h>
#include <kdrawutil.h>
-#include <qdrawutil.h>
-#include <qprogressbar.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include <qmenubar.h>
-#include <qrangecontrol.h>
-#include <qslider.h>
-#include <qtooltip.h>
-#include <qobjectlist.h>
-#include <qradiobutton.h>
-#include <qstatusbar.h>
+#include <tqdrawutil.h>
+#include <tqprogressbar.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqmenubar.h>
+#include <tqrangecontrol.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
+#include <tqobjectlist.h>
+#include <tqradiobutton.h>
+#include <tqstatusbar.h>
#include "kstyledirs.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <limits.h>
@@ -127,12 +127,12 @@ public:
~KThemeStylePlugin()
{}
- QStringList keys() const
+ TQStringList keys() const
{
- QSettings cfg;
+ TQSettings cfg;
KStyleDirs::dirs()->addToSearch( "config", cfg );
- QStringList keys;
+ TQStringList keys;
bool ok;
keys = cfg.readListEntry( "/kthemestyle/themes", &ok);
@@ -142,15 +142,15 @@ public:
return keys;
}
- QStyle* create( const QString& key )
+ TQStyle* create( const TQString& key )
{
- QSettings cfg;
+ TQSettings cfg;
KStyleDirs::dirs()->addToSearch( "config", cfg );
- QString file = cfg.readEntry( "/kthemestyle/" + key + "/file" );
+ TQString file = cfg.readEntry( "/kthemestyle/" + key + "/file" );
if ( !key.isEmpty() )
{
- QFileInfo fi( file );
+ TQFileInfo fi( file );
return new KThemeStyle( fi.dirPath(), fi.fileName() );
}
@@ -161,22 +161,22 @@ public:
KDE_Q_EXPORT_PLUGIN( KThemeStylePlugin )
-void kDrawWindowsArrow ( QPainter *p, const QStyle* style, QStyle::PrimitiveElement pe, bool down,
+void kDrawWindowsArrow ( TQPainter *p, const TQStyle* style, TQStyle::PrimitiveElement pe, bool down,
int x, int y, int w, int h,
- const QColorGroup &cg, bool enabled )
+ const TQColorGroup &cg, bool enabled )
{
- QPointArray a;
+ TQPointArray a;
switch ( pe )
{
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints( QCOORDARRLEN( win_style_u_arrow ), win_style_u_arrow );
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints( QCOORDARRLEN( win_style_d_arrow ), win_style_d_arrow );
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints( QCOORDARRLEN( win_style_l_arrow ), win_style_l_arrow );
break;
default:
@@ -186,8 +186,8 @@ void kDrawWindowsArrow ( QPainter *p, const QStyle* style, QStyle::PrimitiveElem
p->save();
if ( down )
{
- p->translate( style->pixelMetric( QStyle::PM_ButtonShiftHorizontal ),
- style->pixelMetric( QStyle::PM_ButtonShiftVertical ) );
+ p->translate( style->pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ style->pixelMetric( TQStyle::PM_ButtonShiftVertical ) );
}
if ( enabled )
@@ -212,10 +212,10 @@ void kDrawWindowsArrow ( QPainter *p, const QStyle* style, QStyle::PrimitiveElem
-QSize KThemeStyle::sizeFromContents( ContentsType contents,
- const QWidget* widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const
+TQSize KThemeStyle::sizeFromContents( ContentsType contents,
+ const TQWidget* widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const
{
switch ( contents )
{
@@ -223,7 +223,7 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
// ------------------------------------------------------------------
case CT_PushButton:
{
- const QPushButton * button = ( const QPushButton* ) widget;
+ const TQPushButton * button = ( const TQPushButton* ) widget;
int w = contentSize.width();
int h = contentSize.height();
int bm = pixelMetric( PM_ButtonMargin, widget );
@@ -242,7 +242,7 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
if ( h < 22 )
h = 22;
- return QSize( w, h );
+ return TQSize( w, h );
}
// POPUPMENU ITEM SIZE
@@ -252,9 +252,9 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
if ( ! widget || opt.isDefault() )
return contentSize;
- const QPopupMenu *popup = ( const QPopupMenu * ) widget;
+ const TQPopupMenu *popup = ( const TQPopupMenu * ) widget;
bool checkable = popup->isCheckable();
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = contentSize.width(), h = contentSize.height();
@@ -282,7 +282,7 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
if ( mi->iconSet() )
h = QMAX( h, mi->iconSet() ->pixmap(
- QIconSet::Small, QIconSet::Normal ).height() +
+ TQIconSet::Small, TQIconSet::Normal ).height() +
2 * itemFrame );
}
@@ -300,7 +300,7 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
w += rightBorder;
- return QSize( w, h );
+ return TQSize( w, h );
}
default:
@@ -309,21 +309,21 @@ QSize KThemeStyle::sizeFromContents( ContentsType contents,
}
-QRect KThemeStyle::subRect(SubRect sr, const QWidget* widget) const
+TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const
{
if (sr == SR_CheckBoxFocusRect)
{
- const QCheckBox* cb = static_cast<const QCheckBox*>(widget);
+ const TQCheckBox* cb = static_cast<const TQCheckBox*>(widget);
//Only checkbox, no label
if (cb->text().isEmpty() && (cb->pixmap() == 0) )
{
- QRect bounding = cb->rect();
+ TQRect bounding = cb->rect();
int cw = pixelMetric(PM_IndicatorWidth, widget);
int ch = pixelMetric(PM_IndicatorHeight, widget);
- QRect checkbox(bounding.x() + 2, bounding.y() + 2 + (bounding.height() - ch)/2, cw - 4, ch - 4);
+ TQRect checkbox(bounding.x() + 2, bounding.y() + 2 + (bounding.height() - ch)/2, cw - 4, ch - 4);
return checkbox;
}
@@ -331,7 +331,7 @@ QRect KThemeStyle::subRect(SubRect sr, const QWidget* widget) const
return KStyle::subRect(sr, widget);
}
-int KThemeStyle::pixelMetric ( PixelMetric metric, const QWidget * widget ) const
+int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) const
{
switch ( metric )
{
@@ -395,13 +395,13 @@ int KThemeStyle::pixelMetric ( PixelMetric metric, const QWidget * widget ) cons
-KThemeStyle::KThemeStyle( const QString& configDir, const QString &configFile )
+KThemeStyle::KThemeStyle( const TQString& configDir, const TQString &configFile )
: KThemeBase( configDir, configFile ), paletteSaved( false ), polishLock( false ), menuCache( 0 ), vsliderCache( 0 ),
brushHandle( 0 ), brushHandleSet( false ), kickerMode( false )
{
- mtfstyle = QStyleFactory::create( "Motif" );
+ mtfstyle = TQStyleFactory::create( "Motif" );
if ( !mtfstyle )
- mtfstyle = QStyleFactory::create( *( QStyleFactory::keys().begin() ) );
+ mtfstyle = TQStyleFactory::create( *( TQStyleFactory::keys().begin() ) );
}
KThemeStyle::~KThemeStyle()
@@ -412,14 +412,14 @@ KThemeStyle::~KThemeStyle()
}
-void KThemeStyle::polish( QApplication * app )
+void KThemeStyle::polish( TQApplication * app )
{
if (!qstrcmp(app->argv()[0], "kicker"))
kickerMode = true;
}
-void KThemeStyle::polish( QPalette &p )
+void KThemeStyle::polish( TQPalette &p )
{
if ( polishLock )
{
@@ -438,41 +438,41 @@ void KThemeStyle::polish( QPalette &p )
if ( isPixmap( Background ) )
{
- QBrush bgBrush( p.color( QPalette::Normal,
- QColorGroup::Background ),
+ TQBrush bgBrush( p.color( TQPalette::Normal,
+ TQColorGroup::Background ),
*uncached( Background ) );
brushHandle = uncached( Background )->handle();
brushHandleSet = true;
- p.setBrush( QColorGroup::Background, bgBrush );
+ p.setBrush( TQColorGroup::Background, bgBrush );
}
}
void KThemeStyle::paletteChanged()
{
- QPalette p = QApplication::palette();
+ TQPalette p = TQApplication::palette();
polish( p );
- QApplication::setPalette( p );
+ TQApplication::setPalette( p );
}
-void KThemeStyle::unPolish( QApplication *app )
+void KThemeStyle::unPolish( TQApplication *app )
{
app->setPalette( oldPalette, true );
}
-bool KThemeStyle::eventFilter( QObject* object, QEvent* event )
+bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
{
if( object->inherits("KActiveLabel"))
{
- if(event->type() == QEvent::Move || event->type() == QEvent::Resize ||
- event->type() == QEvent::Show)
+ if(event->type() == TQEvent::Move || event->type() == TQEvent::Resize ||
+ event->type() == TQEvent::Show)
{
- QWidget *w = static_cast<QWidget*>(object);
- QPoint pos(0, 0);
+ TQWidget *w = static_cast<TQWidget*>(object);
+ TQPoint pos(0, 0);
pos = w->mapTo(w->topLevelWidget(), pos);
- QPixmap pix(uncached( Background )->size());
- QPainter p;
+ TQPixmap pix(uncached( Background )->size());
+ TQPainter p;
p.begin(&pix);
p.drawTiledPixmap(0, 0,
uncached( Background )->width(),
@@ -480,17 +480,17 @@ bool KThemeStyle::eventFilter( QObject* object, QEvent* event )
*uncached( Background ),
pos.x(), pos.y());
p.end();
- QPalette pal(w->palette());
- QBrush brush( pal.color( QPalette::Normal,
- QColorGroup::Background),
+ TQPalette pal(w->palette());
+ TQBrush brush( pal.color( TQPalette::Normal,
+ TQColorGroup::Background),
pix );
- pal.setBrush(QColorGroup::Base, brush);
+ pal.setBrush(TQColorGroup::Base, brush);
w->setPalette(pal);
}
}
- if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits("QLabel"))
+ if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits("TQLabel"))
{
- QWidget* lb = static_cast<QWidget*>(object);
+ TQWidget* lb = static_cast<TQWidget*>(object);
if (lb->backgroundMode() == Qt::PaletteButton)
lb->setBackgroundMode(Qt::PaletteBackground);
lb->removeEventFilter(this);
@@ -499,12 +499,12 @@ bool KThemeStyle::eventFilter( QObject* object, QEvent* event )
return KStyle::eventFilter(object, event);
}
-void KThemeStyle::polish( QWidget *w )
+void KThemeStyle::polish( TQWidget *w )
{
- if (::qt_cast<QStatusBar*>(w))
- w->setPaletteBackgroundColor(QApplication::palette().color(QPalette::Normal, QColorGroup::Background));
+ if (::qt_cast<TQStatusBar*>(w))
+ w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Normal, TQColorGroup::Background));
- if (::qt_cast<QLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
+ if (::qt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
w->installEventFilter(this);
if (w->backgroundPixmap() && !w->isTopLevel() &&
@@ -514,7 +514,7 @@ void KThemeStyle::polish( QWidget *w )
//The brushHandle check verifies that the bg pixmap is actually the brush..
if (!brushHandleSet || brushHandle == w->backgroundPixmap()->handle())
{
- w->setBackgroundOrigin( QWidget::WindowOrigin );
+ w->setBackgroundOrigin( TQWidget::WindowOrigin );
}
}
@@ -528,12 +528,12 @@ void KThemeStyle::polish( QWidget *w )
{
polishLock = true;
- QColorGroup clrGroup( Qt::black, QColor( 255, 255, 220 ),
- QColor( 96, 96, 96 ), Qt::black, Qt::black,
- Qt::black, QColor( 255, 255, 220 ) );
- QPalette toolTip ( clrGroup, clrGroup, clrGroup );
+ TQColorGroup clrGroup( Qt::black, TQColor( 255, 255, 220 ),
+ TQColor( 96, 96, 96 ), Qt::black, Qt::black,
+ Qt::black, TQColor( 255, 255, 220 ) );
+ TQPalette toolTip ( clrGroup, clrGroup, clrGroup );
- QToolTip::setPalette( toolTip );
+ TQToolTip::setPalette( toolTip );
polishLock = false;
}
@@ -543,20 +543,20 @@ void KThemeStyle::polish( QWidget *w )
return ;
}
- if ( ::qt_cast<QMenuBar*>(w) )
+ if ( ::qt_cast<TQMenuBar*>(w) )
{
- w->setBackgroundMode( QWidget::NoBackground );
+ w->setBackgroundMode( TQWidget::NoBackground );
}
else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
{
- w->setBackgroundMode( QWidget::PaletteBackground );
+ w->setBackgroundMode( TQWidget::PaletteBackground );
}
- else if ( ::qt_cast<QPopupMenu*>(w) )
+ else if ( ::qt_cast<TQPopupMenu*>(w) )
{
popupPalette = w->palette();
if ( isColor( MenuItem ) || isColor( MenuItemDown ) )
{
- QPalette newPal( w->palette() );
+ TQPalette newPal( w->palette() );
if ( isColor( MenuItem ) )
{
newPal.setActive( *colorGroup( newPal.active(), MenuItem ) );
@@ -569,13 +569,13 @@ void KThemeStyle::polish( QWidget *w )
w->setPalette( newPal );
}
- w->setBackgroundMode( QWidget::NoBackground );
+ w->setBackgroundMode( TQWidget::NoBackground );
}
- else if ( ::qt_cast<QCheckBox*>(w) )
+ else if ( ::qt_cast<TQCheckBox*>(w) )
{
if ( isColor( IndicatorOff ) || isColor( IndicatorOn ) )
{
- QPalette newPal( w->palette() );
+ TQPalette newPal( w->palette() );
if ( isColor( IndicatorOff ) )
{
newPal.setActive( *colorGroup( newPal.active(), IndicatorOff ) );
@@ -586,11 +586,11 @@ void KThemeStyle::polish( QWidget *w )
w->setPalette( newPal );
}
}
- else if ( ::qt_cast<QRadioButton*>(w) )
+ else if ( ::qt_cast<TQRadioButton*>(w) )
{
if ( isColor( ExIndicatorOff ) || isColor( ExIndicatorOn ) )
{
- QPalette newPal( w->palette() );
+ TQPalette newPal( w->palette() );
if ( isColor( ExIndicatorOff ) )
{
newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOff ) );
@@ -606,45 +606,45 @@ void KThemeStyle::polish( QWidget *w )
KStyle::polish( w );
}
-void KThemeStyle::unPolish( QWidget* w )
+void KThemeStyle::unPolish( TQWidget* w )
{
if (w->backgroundPixmap() && !w->isTopLevel())
{
//The brushHandle check verifies that the bg pixmap is actually the brush..
if (!brushHandleSet || brushHandle ==w->backgroundPixmap()->handle())
{
- w->setBackgroundOrigin( QWidget::WidgetOrigin );
+ w->setBackgroundOrigin( TQWidget::WidgetOrigin );
}
}
//Toolbar labels should nornally be PaletteButton
- if ( ::qt_cast<QLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
- w->setBackgroundMode( QWidget::PaletteButton );
+ if ( ::qt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
+ w->setBackgroundMode( TQWidget::PaletteButton );
//The same for menu bars, popup menus
- else if ( ::qt_cast<QMenuBar*>(w) || ::qt_cast<QPopupMenu*>(w) )
- w->setBackgroundMode( QWidget::PaletteButton );
+ else if ( ::qt_cast<TQMenuBar*>(w) || ::qt_cast<TQPopupMenu*>(w) )
+ w->setBackgroundMode( TQWidget::PaletteButton );
//For toolbar internal separators, return to button, too (can't use qt_cast here since don't have access to the class)
else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
- w->setBackgroundMode( QWidget::PaletteButton );
+ w->setBackgroundMode( TQWidget::PaletteButton );
//For scrollbars, we don't do much, since the widget queries the style on the switch
//Drop some custom palettes. ### this really should check the serial number to be 100% correct.
- if ( ::qt_cast<QPopupMenu*>(w) || ::qt_cast<QCheckBox*>(w) || ::qt_cast<QRadioButton*>(w) || ::qt_cast<QStatusBar*>(w) )
+ if ( ::qt_cast<TQPopupMenu*>(w) || ::qt_cast<TQCheckBox*>(w) || ::qt_cast<TQRadioButton*>(w) || ::qt_cast<TQStatusBar*>(w) )
w->unsetPalette();
KStyle::unPolish( w );
}
-void KThemeStyle::drawBaseButton( QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, bool
+void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, bool
rounded, WidgetType type ) const
{
int offset = borderPixmap( type ) ? 0 : decoWidth( type ) ; //##### This is wrong, but the code relies on it..
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
// handle reverse bevel here since it uses decowidth differently
if ( gradientHint( type ) == GrReverseBevel )
@@ -666,7 +666,7 @@ void KThemeStyle::drawBaseButton( QPainter *p, int x, int y, int w, int h,
type ) );
else
p->fillRect( x + 4, y + 4, w - 6, h - offset * 6,
- g.brush( QColorGroup::Button ) );
+ g.brush( TQColorGroup::Button ) );
}
else
@@ -685,7 +685,7 @@ void KThemeStyle::drawBaseButton( QPainter *p, int x, int y, int w, int h,
//Sometimes border covers the whole thing - in that case, avoid drawing the base.
{
p->fillRect( x + offset, y + offset, w - offset * 2, h - offset * 2,
- g.brush( QColorGroup::Button ) );
+ g.brush( TQColorGroup::Button ) );
}
}
if ( borderPixmap( type ) )
@@ -700,8 +700,8 @@ void KThemeStyle::drawBaseButton( QPainter *p, int x, int y, int w, int h,
p->setPen( oldPen );
}
-void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & g_base,
- SFlags flags, const QStyleOption & opt ) const
+void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & g_base,
+ SFlags flags, const TQStyleOption & opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -711,7 +711,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
bool enabled = ( flags & Style_Enabled );
bool down = ( flags & Style_Down );
bool on = flags & Style_On;
- QColorGroup g = g_base;
+ TQColorGroup g = g_base;
switch ( pe )
{
@@ -720,7 +720,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
case PE_ArrowRight:
case PE_ArrowLeft:
{
- QRect r( x, y, w, h );
+ TQRect r( x, y, w, h );
if ( r.width() > 12 )
{
r.setRect( r.x() + ( r.width() - 12 ) / 2, r.y(), 12, r.height() );
@@ -757,7 +757,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
return ;
}
- const QColorGroup *cg = colorGroup( g, widget );
+ const TQColorGroup *cg = colorGroup( g, widget );
// Standard arrow types
if ( arrowType() == MotifArrow )
{
@@ -768,7 +768,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
else if ( arrowType() == SmallArrow )
{
// #### FIXME: This should be like the Platinum style - uses HighColor look for now
- QPointArray a;
+ TQPointArray a;
switch ( pe )
{
@@ -810,7 +810,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
}
else
{
- QPointArray a;
+ TQPointArray a;
int x2 = x + w - 1, y2 = y + h - 1;
switch ( pe )
{
@@ -827,9 +827,9 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
a.setPoints( 4, x, y, x, y2, x2, y + h / 2, x, y );
break;
}
- QBrush oldBrush = p->brush();
- QPen oldPen = p->pen();
- p->setBrush( cg->brush( QColorGroup::Shadow ) );
+ TQBrush oldBrush = p->brush();
+ TQPen oldPen = p->pen();
+ p->setBrush( cg->brush( TQColorGroup::Shadow ) );
p->setPen( cg->shadow() );
p->drawPolygon( a );
p->setBrush( oldBrush );
@@ -876,7 +876,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
}
else //Small hack to ensure the checkmark gets painter proper color..
{
- g.setColor( QColorGroup::Text, g.buttonText() );
+ g.setColor( TQColorGroup::Text, g.buttonText() );
}
break;
}
@@ -895,14 +895,14 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
{
if ( isPixmap( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) )
{
- const QBitmap * mask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->mask();
+ const TQBitmap * mask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->mask();
if ( mask )
{
p->setPen( Qt::color1 );
p->drawPixmap( x, y, *mask );
}
else
- p->fillRect( x, y, w, h, QBrush( color1, SolidPattern ) );
+ p->fillRect( x, y, w, h, TQBrush( color1, SolidPattern ) );
handled = true;
}
break;
@@ -912,7 +912,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
{
if ( isPixmap( ( flags & Style_On ) ? IndicatorOn : IndicatorOff ) )
{
- const QBitmap * mask = uncached( ( flags & Style_On ) ? IndicatorOn :
+ const TQBitmap * mask = uncached( ( flags & Style_On ) ? IndicatorOn :
IndicatorOff ) ->mask();
if ( mask )
{
@@ -920,7 +920,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
p->drawPixmap( x, y, *mask );
}
else
- p->fillRect( x, y, w, h, QBrush( color1, SolidPattern ) );
+ p->fillRect( x, y, w, h, TQBrush( color1, SolidPattern ) );
handled = true;
}
break;
@@ -965,7 +965,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
}
case PE_PanelMenuBar:
{
- QPixmap* cache = makeMenuBarCache(w, h);
+ TQPixmap* cache = makeMenuBarCache(w, h);
p->drawPixmap( x, y, *cache);
handled = true;
break;
@@ -977,7 +977,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
if ( !isPixmap( widget ) )
{
- p->fillRect( r, colorGroup( g, widget ) ->brush( QColorGroup::Background ) );
+ p->fillRect( r, colorGroup( g, widget ) ->brush( TQColorGroup::Background ) );
// Do the borders and frame
drawShade( p, r.x(), r.y(), r.width(),
r.height(), *colorGroup( g, widget ), true, false,
@@ -1006,7 +1006,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
down, false, down ? ScrollButtonDown : ScrollButton );
drawPrimitive( ( horizontal ) ? PE_ArrowRight : PE_ArrowDown, p ,
- QRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
+ TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
*colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
flags );
@@ -1021,7 +1021,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
down, false, down ? ScrollButtonDown : ScrollButton );
drawPrimitive( ( horizontal ) ? PE_ArrowLeft : PE_ArrowUp, p ,
- QRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
+ TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
*colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
flags );
handled = true;
@@ -1029,7 +1029,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
}
case PE_ScrollBarSlider:
{
- bool active = ( flags & Style_Active ) || ( flags & Style_Down ); //activeControl == QStyle::AddLine;
+ bool active = ( flags & Style_Active ) || ( flags & Style_Down ); //activeControl == TQStyle::AddLine;
bool horizontal = ( flags & Style_Horizontal );
int offsetH = horizontal ? 0: decoWidth(VScrollGroove) ;
int offsetV = horizontal ? decoWidth(HScrollGroove):0;
@@ -1074,7 +1074,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect
-QPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
+TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
{
if (menuCache)
{
@@ -1086,10 +1086,10 @@ QPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
return menuCache;
}
- const QColorGroup *g = colorGroup( QApplication::palette().active(), MenuBar);
+ const TQColorGroup *g = colorGroup( TQApplication::palette().active(), MenuBar);
- menuCache = new QPixmap ( w, h );
- QPainter p(menuCache);
+ menuCache = new TQPixmap ( w, h );
+ TQPainter p(menuCache);
drawBaseButton( &p, 0, 0, w, h, *g, false, false, MenuBar );
p.end();
return menuCache;
@@ -1097,12 +1097,12 @@ QPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
void KThemeStyle::drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags how ,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -1113,7 +1113,7 @@ void KThemeStyle::drawControl( ControlElement element,
{
case CE_PushButton:
{
- const QPushButton * btn = ( const QPushButton* ) widget;
+ const TQPushButton * btn = ( const TQPushButton* ) widget;
bool sunken = btn->isOn() || btn->isDown();
int diw = pixelMetric( PM_ButtonDefaultIndicator, btn );
drawBaseButton( p, diw, diw, w - 2 * diw, h - 2 * diw,
@@ -1126,7 +1126,7 @@ void KThemeStyle::drawControl( ControlElement element,
}
case CE_PushButtonLabel:
{
- const QPushButton* button = ( const QPushButton* ) widget;
+ const TQPushButton* button = ( const TQPushButton* ) widget;
bool active = button->isOn() || button->isDown();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1143,7 +1143,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( button->isMenuButton() )
{
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
- drawPrimitive( PE_ArrowDown, p, QRect( x + w - dx - 2, y + 2, dx, h - 4 ),
+ drawPrimitive( PE_ArrowDown, p, TQRect( x + w - dx - 2, y + 2, dx, h - 4 ),
cg, how, opt );
w -= dx;
}
@@ -1151,15 +1151,15 @@ void KThemeStyle::drawControl( ControlElement element,
// Draw the icon if there is one
if ( button->iconSet() && !button->iconSet() ->isNull() )
{
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if ( button->isEnabled() )
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if ( button->isToggleButton() && button->isOn() )
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pixmap = button->iconSet() ->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pixmap = button->iconSet() ->pixmap( TQIconSet::Small, mode, state );
// Center the iconset if there's no text or pixmap
if (button->text().isEmpty() && !button->pixmap())
@@ -1177,20 +1177,20 @@ void KThemeStyle::drawControl( ControlElement element,
if ( active || button->isDefault() && button->isEnabled() )
{
// Draw "fake" bold text - this enables the font metrics to remain
- // the same as computed in QPushButton::sizeHint(), but gives
+ // the same as computed in TQPushButton::sizeHint(), but gives
// a reasonable bold effect.
int i;
// Text shadow
for ( i = 0; i < 2; i++ )
- drawItem( p, QRect( x + i + 1, y + 1, w, h ), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect( x + i + 1, y + 1, w, h ), AlignCenter | ShowPrefix,
button->colorGroup(), button->isEnabled(), NULL,
button->text(), -1,
active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
// Normal Text
for ( i = 0; i < 2; i++ )
- drawItem( p, QRect( x + i, y, w, h ), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix,
button->colorGroup(), true, i == 0 ? button->pixmap() : NULL,
button->text(), -1,
active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
@@ -1199,18 +1199,18 @@ void KThemeStyle::drawControl( ControlElement element,
{
if ( button->isEnabled() )
{
- drawItem( p, QRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
}
else
{
//TODO: Handle reversed
- drawItem( p, QRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
&button->colorGroup().light() );
- drawItem( p, QRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
&button->colorGroup().buttonText() );
}
@@ -1219,7 +1219,7 @@ void KThemeStyle::drawControl( ControlElement element,
// Draw a focus rect if the button has focus
if ( how & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- QStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, how );
handled = true;
break;
@@ -1229,7 +1229,7 @@ void KThemeStyle::drawControl( ControlElement element,
{
//Expand to cover entire region
drawPrimitive(PE_PanelMenuBar, p,
- QRect(0,0,r.width()+r.x()*2, r.height()+r.y()*2),
+ TQRect(0,0,r.width()+r.x()*2, r.height()+r.y()*2),
cg, Style_Default);
handled = true;
break;
@@ -1237,22 +1237,22 @@ void KThemeStyle::drawControl( ControlElement element,
case CE_TabBarTab:
{
- const QTabBar* tb = ( const QTabBar* ) widget;
- QTabBar::Shape tbs = tb->shape();
+ const TQTabBar* tb = ( const TQTabBar* ) widget;
+ TQTabBar::Shape tbs = tb->shape();
bool selected = how & Style_Selected;
WidgetType widget = selected ? ActiveTab : InactiveTab;
- const QColorGroup *cg = colorGroup( tb->colorGroup(), widget );
+ const TQColorGroup *cg = colorGroup( tb->colorGroup(), widget );
int i;
int x2 = x + w - 1, y2 = y + h - 1;
int bWidth = borderWidth( widget );
int hWidth = highlightWidth( widget );
handled = true;
- if ( tbs == QTabBar::RoundedAbove || tbs == QTabBar::TriangularAbove )
+ if ( tbs == TQTabBar::RoundedAbove || tbs == TQTabBar::TriangularAbove )
{
if ( !selected )
{
p->fillRect( x, y, x2 - x + 1, 2,
- tb->palette().active().brush( QColorGroup::Background ) );
+ tb->palette().active().brush( TQColorGroup::Background ) );
y += 2;
}
p->setPen( cg->text() );
@@ -1314,8 +1314,8 @@ void KThemeStyle::drawControl( ControlElement element,
else
p->fillRect( x, y, x2 - x + 1, y2 - y + 1, cg->background() );
}
- else if ( tb->shape() == QTabBar::RoundedBelow ||
- tb->shape() == QTabBar::TriangularBelow )
+ else if ( tb->shape() == TQTabBar::RoundedBelow ||
+ tb->shape() == TQTabBar::TriangularBelow )
{
if ( widget == ActiveTab )
widget = RotActiveTab;
@@ -1325,7 +1325,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( !selected )
{
p->fillRect( x, y2 - 2, x2 - x + 1, 2,
- tb->palette().active().brush( QColorGroup::Background ) );
+ tb->palette().active().brush( TQColorGroup::Background ) );
y2 -= 2;
}
p->setPen( cg->text() );
@@ -1392,20 +1392,20 @@ void KThemeStyle::drawControl( ControlElement element,
{
r.rect( &x, &y, &w, &h );
- QMenuItem *mi = opt.menuItem();
- QMenuBar *mb = ( QMenuBar* ) widget;
- QRect pr = mb->rect();
+ TQMenuItem *mi = opt.menuItem();
+ TQMenuBar *mb = ( TQMenuBar* ) widget;
+ TQRect pr = mb->rect();
bool active = how & Style_Active;
//bool focused = how & Style_HasFocus;
- const QColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar );
- QColor btext = g->buttonText();
+ const TQColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar );
+ TQColor btext = g->buttonText();
- QPixmap* cache = makeMenuBarCache(pr.width(), pr.height());
+ TQPixmap* cache = makeMenuBarCache(pr.width(), pr.height());
- QPixmap buf( w, pr.height() );
+ TQPixmap buf( w, pr.height() );
bitBlt(&buf, 0, 0, cache, x, y, w, pr.height());
- QPainter p2( &buf );
+ TQPainter p2( &buf );
if ( active )
{
@@ -1415,7 +1415,7 @@ void KThemeStyle::drawControl( ControlElement element,
p2.end();
p->drawPixmap( x, y, buf, 0, 0, w, h );
- drawItem( p, QRect(x,y,w,h), AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine,
+ drawItem( p, TQRect(x,y,w,h), AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine,
*g, mi->isEnabled(), mi->pixmap(), mi->text(),
-1, &btext );
handled = true;
@@ -1427,8 +1427,8 @@ void KThemeStyle::drawControl( ControlElement element,
int x, y, w, h;
r.rect( &x, &y, &w, &h );
- const QPopupMenu *popupmenu = ( const QPopupMenu * ) widget;
- QMenuItem *mi = opt.menuItem();
+ const TQPopupMenu *popupmenu = ( const TQPopupMenu * ) widget;
+ TQMenuItem *mi = opt.menuItem();
if ( mi )
{
separator = mi->isSeparator();
@@ -1440,10 +1440,10 @@ void KThemeStyle::drawControl( ControlElement element,
bool checkable = popupmenu->isCheckable();
bool active = how & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText, 0 );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
- const QColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem );
- //QColor btext = cg_ours.buttonText();
+ const TQColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem );
+ //TQColor btext = cg_ours.buttonText();
if ( checkable )
@@ -1472,9 +1472,9 @@ void KThemeStyle::drawControl( ControlElement element,
{
p->fillRect(
x + dw, y + dw, w - dw * 2, h - dw * 2,
- cg_ours.brush( QColorGroup::Background ) );
- //cg.brush( QColorGroup::Background ));
- //colorGroup( cg_ours, MenuItem ) ->brush( QColorGroup::Background ) );
+ cg_ours.brush( TQColorGroup::Background ) );
+ //cg.brush( TQColorGroup::Background ));
+ //colorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) );
}
else
{
@@ -1491,14 +1491,14 @@ void KThemeStyle::drawControl( ControlElement element,
// Do we have an icon?
if ( mi->iconSet() )
{
- QIconSet::Mode mode;
- QRect cr = visualRect( QRect( x, y, checkcol, h ), r );
+ TQIconSet::Mode mode;
+ TQRect cr = visualRect( TQRect( x, y, checkcol, h ), r );
// Select the correct icon from the iconset
if ( active )
- mode = enabled ? QIconSet::Active : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Active : TQIconSet::Disabled;
else
- mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Normal : TQIconSet::Disabled;
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
@@ -1506,10 +1506,10 @@ void KThemeStyle::drawControl( ControlElement element,
drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *colorGroup( cg_ours, BevelDown ), true, false, BevelDown );
// Draw the icon
- QPixmap pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode );
+ TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode );
int pixw = pixmap.width();
int pixh = pixmap.height();
- QRect pmr( 0, 0, pixw, pixh );
+ TQRect pmr( 0, 0, pixw, pixh );
pmr.moveCenter( cr.center() );
p->setPen( cg_ours.highlightedText() );
p->drawPixmap( pmr.topLeft(), pixmap );
@@ -1524,13 +1524,13 @@ void KThemeStyle::drawControl( ControlElement element,
// if it's active the "pressed" background is already drawn
//if ( ! active )
// qDrawShadePanel( p, cx, y, checkcol, h, cg_ours, true, 1,
- // &cg_ours.brush(QColorGroup::Midlight) );
+ // &cg_ours.brush(TQColorGroup::Midlight) );
// Draw the checkmark
SFlags cflags = Style_Default;
cflags |= active ? Style_Enabled : Style_On;
- drawPrimitive( PE_CheckMark, p, QRect( cx + itemFrame, y + itemFrame,
+ drawPrimitive( PE_CheckMark, p, TQRect( cx + itemFrame, y + itemFrame,
checkcol - itemFrame * 2, h - itemFrame * 2 ), cg_ours, cflags );
}
@@ -1552,7 +1552,7 @@ void KThemeStyle::drawControl( ControlElement element,
// This color will be used instead of the above if the menu item
// is active and disabled at the same time. (etched text)
- QColor discol = cg_ours.mid();
+ TQColor discol = cg_ours.mid();
// Does the menu item draw it's own label?
if ( mi->custom() )
@@ -1575,7 +1575,7 @@ void KThemeStyle::drawControl( ControlElement element,
else
{
// The menu item doesn't draw it's own label
- QString s = mi->text();
+ TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() )
@@ -1623,7 +1623,7 @@ void KThemeStyle::drawControl( ControlElement element,
// Check if it has a pixmap instead
else if ( mi->pixmap() )
{
- QPixmap * pixmap = mi->pixmap();
+ TQPixmap * pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -1643,7 +1643,7 @@ void KThemeStyle::drawControl( ControlElement element,
{
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = 10 - itemFrame; //We're not very useful to inherit off, so just hardcode..
- QRect vr = visualRect( QRect( x + w - arrowHMargin - itemFrame - dim,
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
y + h / 2 - dim / 2, dim, dim ), r );
// Draw an arrow at the far end of the menu item
@@ -1652,7 +1652,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( enabled )
discol = cg_ours.buttonText();
- QColorGroup g2( discol, cg_ours.highlight(), white, white,
+ TQColorGroup g2( discol, cg_ours.highlight(), white, white,
enabled ? white : discol, discol, white );
drawPrimitive( arrow, p, vr, g2, Style_Enabled | Style_Down );
@@ -1666,10 +1666,10 @@ void KThemeStyle::drawControl( ControlElement element,
}
case CE_ProgressBarGroove:
{
- QBrush bg;
- const QColorGroup * cg2 = colorGroup( cg, ProgressBg );
+ TQBrush bg;
+ const TQColorGroup * cg2 = colorGroup( cg, ProgressBg );
qDrawWinPanel( p, r, *cg2, true );
- bg.setColor( cg2->color( QColorGroup::Background ) );
+ bg.setColor( cg2->color( TQColorGroup::Background ) );
if ( isPixmap( ProgressBg ) )
bg.setPixmap( *uncached( ProgressBg ) );
p->fillRect( x + 2, y + 2, w - 4, h - 4, bg );
@@ -1679,10 +1679,10 @@ void KThemeStyle::drawControl( ControlElement element,
}
case CE_ProgressBarContents:
{
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect cr = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect cr = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
int pstep = 0;
@@ -1718,11 +1718,11 @@ void KThemeStyle::drawControl( ControlElement element,
else
{
//TODO:Optimize
- QPixmap buf( width, h );
- QPainter p2( &buf );
+ TQPixmap buf( width, h );
+ TQPainter p2( &buf );
drawBaseButton( &p2, 0, 0, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar );
p2.end();
- QPixmap mirroredPix = QPixmap( buf.convertToImage().mirror( true, false ) );
+ TQPixmap mirroredPix = TQPixmap( buf.convertToImage().mirror( true, false ) );
bitBlt( p->device(), x + w - width - pstep, y, &mirroredPix );
}
}
@@ -1741,10 +1741,10 @@ void KThemeStyle::drawControl( ControlElement element,
void KThemeStyle::drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -1771,12 +1771,12 @@ void KThemeStyle::drawControlMask( ControlElement element,
void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -1787,7 +1787,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
if ( !roundSlider() )
{
- const QSlider * slider = ( const QSlider* ) widget;
+ const TQSlider * slider = ( const TQSlider* ) widget;
bool horizontal = slider->orientation() == Horizontal;
if ( horizontal )
{
@@ -1803,15 +1803,15 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
else
{
//This code is from HighColorDefault..
- const QSlider* slider = ( const QSlider* ) widget;
+ const TQSlider* slider = ( const TQSlider* ) widget;
bool horizontal = slider->orientation() == Horizontal;
int gcenter = ( horizontal ? r.height() : r.width() ) / 2;
- QRect gr;
+ TQRect gr;
if ( horizontal )
- gr = QRect( r.x(), r.y() + gcenter - 3, r.width(), 7 );
+ gr = TQRect( r.x(), r.y() + gcenter - 3, r.width(), 7 );
else
- gr = QRect( r.x() + gcenter - 3, r.y(), 7, r.height() );
+ gr = TQRect( r.x() + gcenter - 3, r.y(), 7, r.height() );
int x, y, w, h;
gr.rect( &x, &y, &w, &h );
@@ -1839,7 +1839,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
if ( isPixmap( Slider ) )
{
- const QSlider * slider = ( const QSlider* ) widget;
+ const TQSlider * slider = ( const TQSlider* ) widget;
bool horizontal = slider->orientation() == Horizontal;
if ( horizontal )
{
@@ -1850,9 +1850,9 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
if ( !vsliderCache )
{
- QWMatrix r270;
+ TQWMatrix r270;
r270.rotate( 270 );
- vsliderCache = new QPixmap( uncached( Slider ) ->xForm( r270 ) );
+ vsliderCache = new TQPixmap( uncached( Slider ) ->xForm( r270 ) );
if ( uncached( Slider ) ->mask() )
vsliderCache->setMask( uncached( Slider ) ->mask() ->xForm( r270 ) );
}
@@ -1864,7 +1864,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
//This code again from HighColor..
//...except sans the gradient..
- const QSlider* slider = ( const QSlider* ) widget;
+ const TQSlider* slider = ( const TQSlider* ) widget;
bool horizontal = slider->orientation() == Horizontal;
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1890,7 +1890,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
p->setPen( cg.mid() );
p->drawLine( x + 3, y2 - 2, x2 - 2, y2 - 2 );
p->drawLine( x2 - 2, y + 3, x2 - 2, y2 - 2 );
- p->fillRect( QRect( x + 3, y + 3, w - 6, h - 6 ),
+ p->fillRect( TQRect( x + 3, y + 3, w - 6, h - 6 ),
cg.button() );
// Paint riffles
@@ -1950,10 +1950,10 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
-void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, const QWidget * widget,
- const QRect & r, const QColorGroup & g, SFlags how ,
+void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget,
+ const TQRect & r, const TQColorGroup & g, SFlags how ,
SCFlags controls, SCFlags active,
- const QStyleOption & opt ) const
+ const TQStyleOption & opt ) const
{
bool handled = false;
int x, y, w, h;
@@ -1967,8 +1967,8 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
{
case CC_ToolButton:
{
- const QToolButton * toolbutton = ( const QToolButton * ) widget;
- QRect button, menu;
+ const TQToolButton * toolbutton = ( const TQToolButton * ) widget;
+ TQRect button, menu;
button = querySubControlMetrics( control, widget, SC_ToolButton, opt );
menu = querySubControlMetrics( control, widget, SC_ToolButtonMenu, opt );
@@ -1996,7 +1996,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
if ( toolbutton->hasFocus() && !toolbutton->focusProxy() )
{
- QRect fr = toolbutton->rect();
+ TQRect fr = toolbutton->rect();
fr.addCoords( 3, 3, -3, -3 );
drawPrimitive( PE_FocusRect, p, fr, g );
}
@@ -2022,7 +2022,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
if ( controls & SC_ComboBoxArrow )
{
bool sunken = ( active == SC_ComboBoxArrow );
- QRect ar = QStyle::visualRect(
+ TQRect ar = TQStyle::visualRect(
querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxArrow ),
widget );
ar.rect( &x, &y, &w, &h );
@@ -2041,7 +2041,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
else
{
- mtfstyle->drawPrimitive( PE_ArrowDown, p, QRect( x, y, w, h ), *colorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt );
+ mtfstyle->drawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *colorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt );
qDrawShadeRect( p, x, y, w, h, *colorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3,
}
controls ^= SC_ComboBoxArrow;
@@ -2050,14 +2050,14 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
}
case CC_ScrollBar:
{
- const QScrollBar *sb = ( const QScrollBar* ) widget;
+ const TQScrollBar *sb = ( const TQScrollBar* ) widget;
bool maxedOut = ( sb->minValue() == sb->maxValue() );
bool horizontal = ( sb->orientation() == Qt::Horizontal );
SFlags sflags = ( ( horizontal ? Style_Horizontal : Style_Default ) |
( maxedOut ? Style_Default : Style_Enabled ) );
//Here, we don't do add page, subpage, etc.,
- QRect addline, subline, subline2, groove, slider;
+ TQRect addline, subline, subline2, groove, slider;
subline = querySubControlMetrics( control, widget, SC_ScrollBarSubLine, opt );
addline = querySubControlMetrics( control, widget, SC_ScrollBarAddLine, opt );
groove = querySubControlMetrics( control, widget, SC_ScrollBarGroove, opt );
@@ -2065,12 +2065,12 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
slider = querySubControlMetrics( control, widget, SC_ScrollBarSlider, opt );
subline2 = addline;
- QPixmap buf( sb->width(), sb->height() );
- QPainter p2( &buf );
+ TQPixmap buf( sb->width(), sb->height() );
+ TQPainter p2( &buf );
if ( groove.isValid() )
{
- p2.fillRect( groove, QColor( 255, 0, 0 ) );
+ p2.fillRect( groove, TQColor( 255, 0, 0 ) );
drawPrimitive( PE_ScrollBarSubPage, &p2, groove, g,
sflags | ( ( active == SC_ScrollBarSubPage ) ?
Style_Down : Style_Default ) );
@@ -2098,7 +2098,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
// Draw focus rect
if ( sb->hasFocus() )
{
- QRect fr( slider.x() + 2, slider.y() + 2,
+ TQRect fr( slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5 );
drawPrimitive( PE_FocusRect, &p2, fr, g, Style_Default );
}
@@ -2124,7 +2124,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, QPainter * p, con
}
-void KThemeStyle::drawBaseMask( QPainter *p, int x, int y, int w, int h,
+void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h,
bool round ) const
{
// round edge fills
@@ -2152,13 +2152,13 @@ void KThemeStyle::drawBaseMask( QPainter *p, int x, int y, int w, int h,
3, 1, 3, 2, 3, 3, 3, 4, 3, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4
};
- QBrush fillBrush( color1, SolidPattern );
+ TQBrush fillBrush( color1, SolidPattern );
p->setPen( color1 );
if ( round && w > 19 && h > 19 )
{
int x2 = x + w - 1;
int y2 = y + h - 1;
- QPointArray a( QCOORDARRLEN( top_left_fill ), top_left_fill );
+ TQPointArray a( QCOORDARRLEN( top_left_fill ), top_left_fill );
a.translate( 1, 1 );
p->drawPoints( a );
a.setPoints( QCOORDARRLEN( btm_left_fill ), btm_left_fill );
@@ -2184,7 +2184,7 @@ void KThemeStyle::drawBaseMask( QPainter *p, int x, int y, int w, int h,
p->fillRect( x, y, w, h, fillBrush );
}
-int KThemeStyle::styleHint( StyleHint sh, const QWidget *w, const QStyleOption &opt, QStyleHintReturn *shr ) const
+int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, QStyleHintReturn *shr ) const
{
switch ( sh )
{
@@ -2220,12 +2220,12 @@ int KThemeStyle::styleHint( StyleHint sh, const QWidget *w, const QStyleOption &
* about excessive cache misses. This is a memory/speed tradeoff that I
* have to test.
*/
-void KThemeStyle::drawShade( QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, bool rounded,
+void KThemeStyle::drawShade( TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, bool rounded,
int hWidth, int bWidth, ShadeStyle style ) const
{
int i, sc, bc, x2, y2;
- QPen highPen, lowPen;
+ TQPen highPen, lowPen;
if ( style == Motif )
{
@@ -2242,8 +2242,8 @@ void KThemeStyle::drawShade( QPainter *p, int x, int y, int w, int h,
if ( rounded && w > 19 && h > 19 )
{
x2 = x + w - 1, y2 = y + h - 1;
- QPointArray bPntArray, hPntArray, lPntArray;
- QPointArray bLineArray, hLineArray, lLineArray;
+ TQPointArray bPntArray, hPntArray, lPntArray;
+ TQPointArray bLineArray, hLineArray, lLineArray;
// borders
for ( i = 0, bc = 0; i < bWidth; ++i )
{
@@ -2312,8 +2312,8 @@ void KThemeStyle::drawShade( QPainter *p, int x, int y, int w, int h,
// Rectangular buttons
else
{
- QPointArray highShade( hWidth * 4 );
- QPointArray lowShade( hWidth * 4 );
+ TQPointArray highShade( hWidth * 4 );
+ TQPointArray lowShade( hWidth * 4 );
p->setPen( g.shadow() );
for ( i = 0; i < bWidth && w > 2 && h > 2; ++i, ++x, ++y, w -= 2, h -= 2 )
@@ -2353,8 +2353,8 @@ void KThemeStyle::drawShade( QPainter *p, int x, int y, int w, int h,
-int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem *mi,
- const QFontMetrics &fm )
+int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, TQMenuItem *mi,
+ const TQFontMetrics &fm )
{
int h2, h = 0;
int offset = QMAX( decoWidth( MenuItemDown ), decoWidth( MenuItem ) ) + 4;
@@ -2372,7 +2372,7 @@ int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem *mi,
if ( mi->iconSet() )
{
h2 = mi->iconSet() ->
- pixmap( QIconSet::Small, QIconSet::Normal ).height() + offset;
+ pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + offset;
h = h2 > h ? h2 : h;
}
h2 = fm.height() + offset;
diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h
index 9b7d54b60..00d6256e7 100644
--- a/kstyles/kthemestyle/kthemestyle.h
+++ b/kstyles/kthemestyle/kthemestyle.h
@@ -40,18 +40,18 @@ Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
#ifndef KTHEMESTYLE_H
#define KTHEMESTYLE_H
-#include <qglobal.h>
+#include <tqglobal.h>
#include "kthemebase.h"
-#include <qwindowdefs.h>
-#include <qobject.h>
-#include <qbutton.h>
-#include <qpushbutton.h>
-#include <qscrollbar.h>
-#include <qtabbar.h>
-#include <qstring.h>
-#include <qintdict.h>
-#include <qmap.h>
+#include <tqwindowdefs.h>
+#include <tqobject.h>
+#include <tqbutton.h>
+#include <tqpushbutton.h>
+#include <tqscrollbar.h>
+#include <tqtabbar.h>
+#include <tqstring.h>
+#include <tqintdict.h>
+#include <tqmap.h>
/**
@@ -76,74 +76,74 @@ public:
* @param configFile A KConfig file to use as the theme configuration.
* Defaults to ~/.kderc.
*/
- KThemeStyle( const QString& configDir, const QString &configFile = QString::null );
+ KThemeStyle( const TQString& configDir, const TQString &configFile = TQString::null );
~KThemeStyle();
- virtual int pixelMetric ( PixelMetric metric, const QWidget * widget = 0 ) const;
+ virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const;
- virtual void drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QColorGroup & cg,
+ virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual void drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags how = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual void drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
virtual int styleHint( StyleHint sh,
- const QWidget *widget = 0,
- const QStyleOption& = QStyleOption::Default,
+ const TQWidget *widget = 0,
+ const TQStyleOption& = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const;
- virtual QSize sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentsSize,
- const QStyleOption& = QStyleOption::Default ) const;
+ virtual TQSize sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentsSize,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- virtual QRect subRect(SubRect, const QWidget *) const;
+ virtual TQRect subRect(SubRect, const TQWidget *) const;
- virtual void polish( QWidget* );
- virtual void unPolish( QWidget* );
- virtual bool eventFilter( QObject* object, QEvent* event );
+ virtual void polish( TQWidget* );
+ virtual void unPolish( TQWidget* );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
/**
* By default this just sets the background brushes to the pixmapped
* background.
*/
- virtual void polish( QApplication *app );
- virtual void unPolish( QApplication* );
+ virtual void polish( TQApplication *app );
+ virtual void unPolish( TQApplication* );
/** \internal */
// to make it possible for derived classes to overload this function
- virtual void polish( QPalette& pal );
+ virtual void polish( TQPalette& pal );
/**
* This is a convenience method for drawing widgets with
@@ -155,14 +155,14 @@ public:
* @param y The y coordinate of the buttons' upper left hand corner.
* @param w The button width.
* @param h The button height.
- * @param p The QPainter to draw on.
+ * @param p The TQPainter to draw on.
* @param g The color group to use.
* @param sunken The button is drawn with a sunken style if @p true
* @param rounded @p true if the widget is rounded, @p false if rectangular.
* @param type The widget type to paint.
*/
- virtual void drawBaseButton( QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken = false,
+ virtual void drawBaseButton( TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken = false,
bool rounded = false, WidgetType type = Bevel ) const;
/**
* Draw a mask with for widgets that may be rounded.
@@ -170,14 +170,14 @@ public:
*Currently used
* by pushbuttons and comboboxes.
*
- * @param p The QPainter to draw on.
+ * @param p The TQPainter to draw on.
* @param x The x coordinate of the widget's upper left hand corner.
* @param y The y coordinate of the widget's upper left hand corner.
* @param w The widget width.
* @param h The widget height.
* @param rounded @p true if the widget is rounded, @p false if rectangular.
*/
- virtual void drawBaseMask( QPainter *p, int x, int y, int w, int h,
+ virtual void drawBaseMask( TQPainter *p, int x, int y, int w, int h,
bool rounded ) const;
@@ -198,22 +198,22 @@ public:
* @param bWidth The border width.
* @param style The shading style to use.
*/
- virtual void drawShade( QPainter *p, int x, int y, int w, int h,
- const QColorGroup &g, bool sunken, bool rounded,
+ virtual void drawShade( TQPainter *p, int x, int y, int w, int h,
+ const TQColorGroup &g, bool sunken, bool rounded,
int hWidth, int bWidth, ShadeStyle style ) const;
- int popupMenuItemHeight( bool checkable, QMenuItem *mi,
- const QFontMetrics &fm );
+ int popupMenuItemHeight( bool checkable, TQMenuItem *mi,
+ const TQFontMetrics &fm );
protected:
- QPalette oldPalette, popupPalette, indiPalette, exIndiPalette;
+ TQPalette oldPalette, popupPalette, indiPalette, exIndiPalette;
bool paletteSaved;
bool polishLock;
- QStyle *mtfstyle;
+ TQStyle *mtfstyle;
- QPixmap* makeMenuBarCache(int w, int h) const;
+ TQPixmap* makeMenuBarCache(int w, int h) const;
- mutable QPixmap* menuCache;
- mutable QPixmap* vsliderCache;
+ mutable TQPixmap* menuCache;
+ mutable TQPixmap* vsliderCache;
Qt::HANDLE brushHandle;
bool brushHandleSet;