summaryrefslogtreecommitdiffstats
path: root/kstyles/kthemestyle/kthemebase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kstyles/kthemestyle/kthemebase.cpp')
-rw-r--r--kstyles/kthemestyle/kthemebase.cpp126
1 files changed, 63 insertions, 63 deletions
diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp
index 6b5c0961d..f2b133d23 100644
--- a/kstyles/kthemestyle/kthemebase.cpp
+++ b/kstyles/kthemestyle/kthemebase.cpp
@@ -77,8 +77,8 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
else
{
bool bOK;
- // find first part (red)
- int nIndex = aValue.find( ',' );
+ // tqfind first part (red)
+ int nIndex = aValue.tqfind( ',' );
if ( nIndex == -1 )
{
// return a sensible default -- Bernd
@@ -89,9 +89,9 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
nRed = aValue.left( nIndex ).toInt( &bOK );
- // find second part (green)
+ // tqfind second part (green)
int nOldIndex = nIndex;
- nIndex = aValue.find( ',', nOldIndex + 1 );
+ nIndex = aValue.tqfind( ',', nOldIndex + 1 );
if ( nIndex == -1 )
{
@@ -103,7 +103,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
nGreen = aValue.mid( nOldIndex + 1,
nIndex - nOldIndex - 1 ).toInt( &bOK );
- // find third part (blue)
+ // tqfind third part (blue)
nBlue = aValue.right( aValue.length() - nIndex - 1 ).toInt( &bOK );
aRetColor.setRgb( nRed, nGreen, nBlue );
@@ -176,7 +176,7 @@ public:
*/
TQColor pixmapAveColor( const TQPixmap* p )
{
- if ( colorCache.contains( p ) )
+ if ( colorCache.tqcontains( p ) )
return colorCache[ p ];
TQImage to_ave = p->convertToImage();
@@ -209,7 +209,7 @@ public:
-// This is used to encode the keys. I used to use masks but I think this
+// This is used to encode the keys. I used to use tqmasks but I think this
// bitfield is nicer :) I don't know why C++ coders don't use these more..
// (mosfet)
struct kthemeKeyData
@@ -222,7 +222,7 @@ unsigned int height :
12;
unsigned int border :
1;
-unsigned int mask :
+unsigned int tqmask :
1;
};
@@ -236,8 +236,8 @@ void KThemeBase::generateBorderPix( int i )
// separate pixmap into separate components
if ( pbPixmaps[ i ] )
{
- // evidently I have to do masks manually...
- const TQBitmap * srcMask = pbPixmaps[ i ] ->mask();
+ // evidently I have to do tqmasks manually...
+ const TQBitmap * srcMask = pbPixmaps[ i ] ->tqmask();
TQBitmap destMask( pbWidth[ i ], pbWidth[ i ] );
TQPixmap tmp( pbWidth[ i ], pbWidth[ i ] );
@@ -563,7 +563,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
{
TQStringList keys = config.entryList( configFileName );
- if ( keys.contains( "foreground" ) )
+ if ( keys.tqcontains( "foreground" ) )
{
d->overrideForeground = true;
d->overrideForegroundCol = readColorEntry( &config, ( configFileName + "foreground" ).latin1(), 0 );
@@ -571,7 +571,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideForeground = false;
- if ( keys.contains( "background" ) )
+ if ( keys.tqcontains( "background" ) )
{
d->overrideBackground = true;
d->overrideBackgroundCol = readColorEntry( &config, ( configFileName + "background" ).latin1(), 0 );
@@ -581,7 +581,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
- if ( keys.contains( "selectForeground" ) )
+ if ( keys.tqcontains( "selectForeground" ) )
{
d->overrideSelectForeground = true;
d->overrideSelectForegroundCol = readColorEntry( &config, ( configFileName + "selectForeground" ).latin1(), 0 );
@@ -589,7 +589,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideSelectForeground = false;
- if ( keys.contains( "selectBackground" ) )
+ if ( keys.tqcontains( "selectBackground" ) )
{
d->overrideSelectBackground = true;
d->overrideSelectBackgroundCol = readColorEntry( &config, ( configFileName + "selectBackground" ).latin1(), 0 );
@@ -597,7 +597,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideSelectBackground = false;
- if ( keys.contains( "windowBackground" ) )
+ if ( keys.tqcontains( "windowBackground" ) )
{
d->overrideWindowBackground = true;
d->overrideWindowBackgroundCol = readColorEntry( &config, ( configFileName + "windowBackground" ).latin1(), 0 );
@@ -606,7 +606,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
d->overrideWindowBackground = false;
- if ( keys.contains( "windowForeground" ) )
+ if ( keys.tqcontains( "windowForeground" ) )
{
d->overrideWindowForeground = true;
d->overrideWindowForegroundCol = readColorEntry( &config, ( configFileName + "windowForeground" ).latin1(), 0 );
@@ -801,51 +801,51 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
{
pixmap = new KThemePixmap();
pixmap->resize( w, h );
- TQBitmap mask;
- mask.resize( w, h );
- mask.fill( color0 );
+ TQBitmap tqmask;
+ tqmask.resize( w, h );
+ tqmask.fill( color0 );
TQPainter mPainter;
- mPainter.begin( &mask );
+ mPainter.begin( &tqmask );
TQPixmap *tmp = borderPixmap( widget ) ->border( KThemePixmap::TopLeft );
- const TQBitmap *srcMask = tmp->mask();
+ const TQBitmap *srcMask = tmp->tqmask();
int bdWidth = tmp->width();
bitBlt( pixmap, 0, 0, tmp, 0, 0, bdWidth, bdWidth,
Qt::CopyROP, false );
if ( srcMask )
- bitBlt( &mask, 0, 0, srcMask, 0, 0, bdWidth, bdWidth,
+ bitBlt( &tqmask, 0, 0, srcMask, 0, 0, bdWidth, bdWidth,
Qt::CopyROP, false );
else
mPainter.fillRect( 0, 0, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::TopRight );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
bitBlt( pixmap, w - bdWidth, 0, tmp, 0, 0, bdWidth,
bdWidth, Qt::CopyROP, false );
if ( srcMask )
- bitBlt( &mask, w - bdWidth, 0, srcMask, 0, 0, bdWidth,
+ bitBlt( &tqmask, w - bdWidth, 0, srcMask, 0, 0, bdWidth,
bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, 0, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::BottomLeft );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
bitBlt( pixmap, 0, h - bdWidth, tmp, 0, 0, bdWidth,
bdWidth, Qt::CopyROP, false );
if ( srcMask )
- bitBlt( &mask, 0, h - bdWidth, srcMask, 0, 0, bdWidth,
+ bitBlt( &tqmask, 0, h - bdWidth, srcMask, 0, 0, bdWidth,
bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( 0, h - bdWidth, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::BottomRight );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
bitBlt( pixmap, w - bdWidth, h - bdWidth, tmp, 0, 0,
bdWidth, bdWidth, Qt::CopyROP, false );
if ( srcMask )
- bitBlt( &mask, w - bdWidth, h - bdWidth, srcMask, 0, 0,
+ bitBlt( &tqmask, w - bdWidth, h - bdWidth, srcMask, 0, 0,
bdWidth, bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, h - bdWidth, bdWidth, bdWidth, color1 );
@@ -855,20 +855,20 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
if ( w - bdWidth * 2 > 0 )
{
tmp = borderPixmap( widget ) ->border( KThemePixmap::Top );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
p.drawTiledPixmap( bdWidth, 0, w - bdWidth * 2, bdWidth, *tmp );
if ( srcMask )
- bitBlt( &mask, bdWidth, 0, srcMask, 0, 0,
+ bitBlt( &tqmask, bdWidth, 0, srcMask, 0, 0,
w - bdWidth * 2, bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( bdWidth, 0, w - bdWidth * 2, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::Bottom );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
p.drawTiledPixmap( bdWidth, h - bdWidth, w - bdWidth * 2, bdWidth,
*tmp );
if ( srcMask )
- bitBlt( &mask, bdWidth, h - bdWidth, srcMask, 0, 0,
+ bitBlt( &tqmask, bdWidth, h - bdWidth, srcMask, 0, 0,
w - bdWidth * 2, bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( bdWidth, h - bdWidth, w - bdWidth * 2, bdWidth,
@@ -877,30 +877,30 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
if ( h - bdWidth * 2 > 0 )
{
tmp = borderPixmap( widget ) ->border( KThemePixmap::Left );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
p.drawTiledPixmap( 0, bdWidth, bdWidth, h - bdWidth * 2, *tmp );
if ( srcMask )
- bitBlt( &mask, 0, bdWidth, srcMask, 0, 0,
+ bitBlt( &tqmask, 0, bdWidth, srcMask, 0, 0,
bdWidth, h - bdWidth * 2, Qt::CopyROP, false );
else
mPainter.fillRect( 0, bdWidth, bdWidth, h - bdWidth * 2, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::Right );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
p.drawTiledPixmap( w - bdWidth, bdWidth, bdWidth, h - bdWidth * 2,
*tmp );
if ( srcMask )
- bitBlt( &mask, w - bdWidth, bdWidth, srcMask, 0, 0,
+ bitBlt( &tqmask, w - bdWidth, bdWidth, srcMask, 0, 0,
bdWidth, h - bdWidth * 2, Qt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, bdWidth, bdWidth, h - bdWidth * 2, color1 );
}
p.end();
mPainter.end();
- pixmap->setMask( mask );
+ pixmap->setMask( tqmask );
cache->insert( pixmap, KThemeCache::FullScale, widget, true );
- if ( !pixmap->mask() )
- qWarning( "No mask for border pixmap!\n" );
+ if ( !pixmap->tqmask() )
+ qWarning( "No tqmask for border pixmap!\n" );
}
return ( pixmap );
}
@@ -1269,22 +1269,22 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
TQStringList keys = config->entryList( base );
// Gradient low color or blend background
- if ( keys.contains( "GradientLow" ) )
+ if ( keys.tqcontains( "GradientLow" ) )
prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(),
&TQApplication::palette().active().background() ).name();
// Gradient high color
- if ( keys.contains( "GradientHigh" ) )
+ if ( keys.tqcontains( "GradientHigh" ) )
prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(),
&TQApplication::palette().active().foreground() ).name();
// Extended color attributes
- if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) )
+ if ( keys.tqcontains( "Foreground" ) || keys.tqcontains( "Background" ) )
{
TQColor fg, bg;
- if ( keys.contains( "Background" ) )
+ if ( keys.tqcontains( "Background" ) )
bg = readColorEntry( config, TQString( base + "Background" ).latin1(), &bg );
- if ( keys.contains( "Foreground" ) )
+ if ( keys.tqcontains( "Foreground" ) )
fg = readColorEntry( config, TQString( base + "Foreground" ).latin1(), &fg );
prop[ "Foreground" ] = fg.name();
prop[ "Background" ] = bg.name();
@@ -1318,7 +1318,7 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
prop[ "Width" ] = TQString::number( config->readNumEntry( base + "Width", 10 ) );
else if ( i == ComboBox || i == ComboBoxDown )
{
- if ( keys.contains( "Round" ) )
+ if ( keys.tqcontains( "Round" ) )
prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000"; // invalid, used w/multiple groups
@@ -1326,25 +1326,25 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
}
else if ( i == PushButton || i == PushButtonDown )
{
- if ( keys.contains( "XShift" ) )
+ if ( keys.tqcontains( "XShift" ) )
prop[ "XShift" ] = TQString::number( config->readNumEntry( base + "XShift", 0 ) );
else
prop[ "XShift" ] = "5000";
- if ( keys.contains( "YShift" ) )
+ if ( keys.tqcontains( "YShift" ) )
prop[ "YShift" ] = TQString::number( config->readNumEntry( base + "YShift", 0 ) );
else
prop[ "YShift" ] = "5000";
- if ( keys.contains( "3DFocusRect" ) )
+ if ( keys.tqcontains( "3DFocusRect" ) )
prop[ "3DFRect" ] = TQString::number( config->
readBoolEntry( base + "3DFocusRect", false ) );
else
prop[ "3DFRect" ] = "5000";
- if ( keys.contains( "3DFocusOffset" ) )
+ if ( keys.tqcontains( "3DFocusOffset" ) )
prop[ "3DFOffset" ] = TQString::number( config->
readBoolEntry( base + "3DFocusOffset", 0 ) );
else
prop[ "3DFOffset" ] = "5000";
- if ( keys.contains( "Round" ) )
+ if ( keys.tqcontains( "Round" ) )
prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000";
@@ -1411,7 +1411,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
// Blend intensity
tmpStr = prop[ "Blend" ];
if ( tmpStr.isEmpty() )
- tmpStr = TQString::fromLatin1( "0.0" );
+ tmpStr = TQString::tqfromLatin1( "0.0" );
blends[ i ] = tmpStr.toFloat();
// Bevel contrast
@@ -1607,7 +1607,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
{
if ( isColor( Background ) )
{
- background = colorGroup( pal.active(), Background )
+ background = tqcolorGroup( pal.active(), Background )
->background();
}
if ( isPixmap( Background ) )
@@ -1620,7 +1620,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
background.dark( lowlightVal ), background.dark( 120 ),
baseText, buttonText /*CHECKME: BrightText*/, base, background );
- buttonText = colorGroup( pre, PushButton ) ->foreground();
+ buttonText = tqcolorGroup( pre, PushButton ) ->foreground();
}
TQColor disfg = foreground;
@@ -1752,7 +1752,7 @@ void KThemeCache::flushTimeout()
}
KThemePixmap* KThemeCache::pixmap( int w, int h, int widgetID, bool border,
- bool mask )
+ bool tqmask )
{
kthemeKey key;
@@ -1761,9 +1761,9 @@ KThemePixmap* KThemeCache::pixmap( int w, int h, int widgetID, bool border,
key.data.width = w;
key.data.height = h;
key.data.border = border;
- key.data.mask = mask;
+ key.data.tqmask = tqmask;
- KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
+ KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
@@ -1777,8 +1777,8 @@ KThemePixmap* KThemeCache::horizontalPixmap( int w, int widgetID )
key.data.width = w;
key.data.height = 0;
key.data.border = false;
- key.data.mask = false;
- KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
+ key.data.tqmask = false;
+ KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
@@ -1792,15 +1792,15 @@ KThemePixmap* KThemeCache::verticalPixmap( int h, int widgetID )
key.data.width = 0;
key.data.height = h;
key.data.border = false;
- key.data.mask = false;
- KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
+ key.data.tqmask = false;
+ KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
}
bool KThemeCache::insert( KThemePixmap *pixmap, ScaleHint scale, int widgetID,
- bool border, bool mask )
+ bool border, bool tqmask )
{
kthemeKey key;
key.cacheKey = 0; // shut up, gcc
@@ -1810,9 +1810,9 @@ bool KThemeCache::insert( KThemePixmap *pixmap, ScaleHint scale, int widgetID,
key.data.height = ( scale == FullScale || scale == VerticalScale ) ?
pixmap->height() : 0;
key.data.border = border;
- key.data.mask = mask;
+ key.data.tqmask = tqmask;
- if ( cache.find( ( unsigned long ) key.cacheKey, true ) != NULL )
+ if ( cache.tqfind( ( unsigned long ) key.cacheKey, true ) != NULL )
{
return ( true ); // a pixmap of this scale is already in there
}