summaryrefslogtreecommitdiffstats
path: root/kstyles/kthemestyle
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:48:49 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:48:49 -0600
commit13281e2856a2ef43bbab78c5528470309c23aa77 (patch)
tree936bcf8145dc235004c73e9fb3d6b3dca9aa370b /kstyles/kthemestyle
parente81c741bb2cf337a43524e75f22f7728ce17a343 (diff)
downloadtdelibs-13281e2856a2ef43bbab78c5528470309c23aa77.tar.gz
tdelibs-13281e2856a2ef43bbab78c5528470309c23aa77.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kstyles/kthemestyle')
-rw-r--r--kstyles/kthemestyle/kthemebase.cpp24
-rw-r--r--kstyles/kthemestyle/kthemebase.h28
-rw-r--r--kstyles/kthemestyle/kthemestyle.cpp182
-rw-r--r--kstyles/kthemestyle/kthemestyle.h12
4 files changed, 123 insertions, 123 deletions
diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp
index 772dd41bc..9da0fdabd 100644
--- a/kstyles/kthemestyle/kthemebase.cpp
+++ b/kstyles/kthemestyle/kthemebase.cpp
@@ -70,7 +70,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
TQString aValue = s->readEntry( pKey );
if ( !aValue.isEmpty() )
{
- if ( aValue.tqat( 0 ) == '#' )
+ if ( aValue.at( 0 ) == '#' )
{
aRetColor.setNamedColor( aValue );
}
@@ -1100,12 +1100,12 @@ TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg,
lowlightVal = 100 + ( ( 2 * d->contrast + 4 ) * 10 );
return ( new TQColorGroup( fg, bg, bg.light( highlightVal ),
bg.dark( lowlightVal ), bg.dark( 120 ),
- fg, TQApplication::tqpalette().active().base() ) );
+ fg, TQApplication::palette().active().base() ) );
}
else
return ( new TQColorGroup( fg, bg, bg.light( 150 ), bg.dark(),
bg.dark( 120 ), fg,
- TQApplication::tqpalette().active().base() ) );
+ TQApplication::palette().active().base() ) );
}
@@ -1273,12 +1273,12 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
// Gradient low color or blend background
if ( keys.contains( "GradientLow" ) )
prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(),
- &TQApplication::tqpalette().active().background() ).name();
+ &TQApplication::palette().active().background() ).name();
// Gradient high color
if ( keys.contains( "GradientHigh" ) )
prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(),
- &TQApplication::tqpalette().active().foreground() ).name();
+ &TQApplication::palette().active().foreground() ).name();
// Extended color attributes
if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) )
@@ -1413,7 +1413,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
// Blend intensity
tmpStr = prop[ "Blend" ];
if ( tmpStr.isEmpty() )
- tmpStr = TQString::tqfromLatin1( "0.0" );
+ tmpStr = TQString::fromLatin1( "0.0" );
blends[ i ] = tmpStr.toFloat();
// Bevel contrast
@@ -1429,7 +1429,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( gradients[ i ] != GrNone || blends[ i ] != 0.0 )
grLowColors[ i ] =
new TQColor( readColorEntry( prop, "GrLow",
- TQApplication::tqpalette().active().
+ TQApplication::palette().active().
background() ) );
else
grLowColors[ i ] = NULL;
@@ -1438,7 +1438,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( gradients[ i ] != GrNone )
grHighColors[ i ] =
new TQColor( readColorEntry( prop, "GrHigh",
- TQApplication::tqpalette().active().
+ TQApplication::palette().active().
background() ) );
else
grHighColors[ i ] = NULL;
@@ -1450,9 +1450,9 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( fg.isValid() || bg.isValid() )
{
if ( !fg.isValid() )
- fg = TQApplication::tqpalette().active().foreground();
+ fg = TQApplication::palette().active().foreground();
if ( !bg.isValid() )
- bg = TQApplication::tqpalette().active().background();
+ bg = TQApplication::palette().active().background();
colors[ i ] = makeColorGroup( fg, bg, TQt::WindowsStyle );
}
else
@@ -1609,7 +1609,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
{
if ( isColor( Background ) )
{
- background = tqcolorGroup( pal.active(), Background )
+ background = colorGroup( pal.active(), Background )
->background();
}
if ( isPixmap( Background ) )
@@ -1622,7 +1622,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
background.dark( lowlightVal ), background.dark( 120 ),
baseText, buttonText /*CHECKME: BrightText*/, base, background );
- buttonText = tqcolorGroup( pre, PushButton ) ->foreground();
+ buttonText = colorGroup( pre, PushButton ) ->foreground();
}
TQColor disfg = foreground;
diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h
index 96faf57d5..63126337f 100644
--- a/kstyles/kthemestyle/kthemebase.h
+++ b/kstyles/kthemestyle/kthemebase.h
@@ -36,7 +36,7 @@ Copyright (C) 1998, 1999, 2000 KDE Team
#include <tqstring.h>
#include <kstyle.h>
#include <tqsettings.h>
-#include <tqpalette.h> // for QColorGroup
+#include <palette.h> // for QColorGroup
#include "kstyledirs.h"
#include <tqmap.h>
@@ -300,12 +300,12 @@ public:
* If a color group is set in the theme configuration
* that is used, otherwise defaultColor is returned.
*
- * @param defaultGroup The tqcolorGroup to set if one is available.
+ * @param defaultGroup The colorGroup to set if one is available.
*
* @param widget The widget whose color group to retrieve.
*
*/
- const TQColorGroup* tqcolorGroup( const TQColorGroup &defaultGroup,
+ const TQColorGroup* colorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const;
TQBrush pixmapBrush( const TQColorGroup &group, TQColorGroup::ColorRole role,
@@ -508,9 +508,9 @@ protected:
/**
These are included for fuuture extension purposes..
*/
- virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const
+ virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const
{
- return KStyle::tqpixelMetric( metric, widget );
+ return KStyle::pixelMetric( metric, widget );
}
virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
@@ -522,7 +522,7 @@ protected:
}
- virtual void tqdrawControl( TQ_ControlElement element,
+ virtual void drawControl( TQ_ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -530,21 +530,21 @@ protected:
SFlags how = Style_Default,
const TQStyleOption& opt = TQStyleOption::Default ) const
{
- KStyle::tqdrawControl( element, p, widget,
+ KStyle::drawControl( element, p, widget,
r, cg, how, opt );
}
- virtual void tqdrawControlMask( TQ_ControlElement element,
+ virtual void drawControlMask( TQ_ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& opt = TQStyleOption::Default ) const
{
- KStyle::tqdrawControlMask( element, p, widget, r, opt );
+ KStyle::drawControlMask( element, p, widget, r, opt );
}
- virtual void tqdrawComplexControl( TQ_ComplexControl control,
+ virtual void drawComplexControl( TQ_ComplexControl control,
TQPainter *p,
const TQWidget* widget,
const TQRect &r,
@@ -554,7 +554,7 @@ protected:
SCFlags active = SC_None,
const TQStyleOption& opt = TQStyleOption::Default ) const
{
- KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
}
@@ -572,12 +572,12 @@ protected:
}
- virtual int tqstyleHint( StyleHint sh,
+ virtual int styleHint( StyleHint sh,
const TQWidget *widget = 0,
const TQStyleOption& opt = TQStyleOption::Default,
TQStyleHintReturn* returnData = 0 ) const
{
- return KStyle::tqstyleHint( sh,
+ return KStyle::styleHint( sh,
widget,
opt,
returnData );
@@ -731,7 +731,7 @@ inline TQBrush KThemeBase::pixmapBrush( const TQColorGroup &group,
return ( group.color( role ) );
}
-inline const TQColorGroup* KThemeBase::tqcolorGroup( const TQColorGroup &defaultGroup,
+inline const TQColorGroup* KThemeBase::colorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const
{
return ( ( colors[ widget ] ) ? colors[ widget ] : &defaultGroup );
diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp
index b9f2b4ba1..4fe0ea9b0 100644
--- a/kstyles/kthemestyle/kthemestyle.cpp
+++ b/kstyles/kthemestyle/kthemestyle.cpp
@@ -50,7 +50,7 @@ Port version 0.9.7
#define INCLUDE_MENUITEM_DEF
#include <tqmenudata.h>
#include <tqpopupmenu.h>
-#include <tqpalette.h>
+#include <palette.h>
#include <tqtabbar.h>
#include <tqtoolbutton.h>
#include <kglobalsettings.h>
@@ -186,8 +186,8 @@ void kDrawWindowsArrow ( TQPainter *p, const TQStyle* style, TQStyle::PrimitiveE
p->save();
if ( down )
{
- p->translate( style->tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
- style->tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) );
+ p->translate( style->pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ style->pixelMetric( TQStyle::PM_ButtonShiftVertical ) );
}
if ( enabled )
@@ -226,8 +226,8 @@ TQSize KThemeStyle::tqsizeFromContents( ContentsType contents,
const TQPushButton * button = ( const TQPushButton* ) widget;
int w = contentSize.width();
int h = contentSize.height();
- int bm = tqpixelMetric( PM_ButtonMargin, widget );
- int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int bm = pixelMetric( PM_ButtonMargin, widget );
+ int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
w += bm + fw + 6; // ### Add 6 to make way for bold font.
h += bm + fw;
@@ -320,8 +320,8 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const
{
TQRect bounding = cb->rect();
- int cw = tqpixelMetric(PM_IndicatorWidth, widget);
- int ch = tqpixelMetric(PM_IndicatorHeight, widget);
+ int cw = pixelMetric(PM_IndicatorWidth, widget);
+ int ch = pixelMetric(PM_IndicatorHeight, widget);
TQRect checkbox(bounding.x() + 2, bounding.y() + 2 + (bounding.height() - ch)/2, cw - 4, ch - 4);
@@ -331,7 +331,7 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const
return KStyle::subRect(sr, widget);
}
-int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) const
+int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) const
{
switch ( metric )
{
@@ -361,26 +361,26 @@ int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) c
if ( isPixmap( ExIndicatorOn ) )
return ( uncached( ExIndicatorOn ) ->size().width() );
else
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
case PM_ExclusiveIndicatorHeight:
if ( isPixmap( ExIndicatorOn ) )
return ( uncached( ExIndicatorOn ) ->size().height() );
else
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
case PM_IndicatorWidth:
if ( isPixmap( IndicatorOn ) )
return ( uncached( IndicatorOn ) ->size().width() );
else
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
case PM_IndicatorHeight:
if ( isPixmap( IndicatorOn ) )
return ( uncached( IndicatorOn ) ->size().height() );
else
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
case PM_SliderLength:
return ( sliderButtonLength() );
@@ -389,7 +389,7 @@ int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) c
return ( splitWidth() );
default:
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
}
}
@@ -458,7 +458,7 @@ void KThemeStyle::paletteChanged()
void KThemeStyle::unPolish( TQApplication *app )
{
- app->tqsetPalette( oldPalette, true );
+ app->setPalette( oldPalette, true );
}
bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
@@ -470,7 +470,7 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
{
TQWidget *w = TQT_TQWIDGET(object);
TQPoint pos(0, 0);
- pos = w->mapTo(w->tqtopLevelWidget(), pos);
+ pos = w->mapTo(w->topLevelWidget(), pos);
TQPixmap pix(uncached( Background )->size());
TQPainter p;
p.begin(&pix);
@@ -559,12 +559,12 @@ void KThemeStyle::polish( TQWidget *w )
TQPalette newPal( w->palette() );
if ( isColor( MenuItem ) )
{
- newPal.setActive( *tqcolorGroup( newPal.active(), MenuItem ) );
- newPal.setDisabled( *tqcolorGroup( newPal.active(), MenuItem ) );
+ newPal.setActive( *colorGroup( newPal.active(), MenuItem ) );
+ newPal.setDisabled( *colorGroup( newPal.active(), MenuItem ) );
}
if ( isColor( MenuItemDown ) )
{
- newPal.setActive( *tqcolorGroup( newPal.active(), MenuItemDown ) );
+ newPal.setActive( *colorGroup( newPal.active(), MenuItemDown ) );
}
w->setPalette( newPal );
}
@@ -578,11 +578,11 @@ void KThemeStyle::polish( TQWidget *w )
TQPalette newPal( w->palette() );
if ( isColor( IndicatorOff ) )
{
- newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOff ) );
- newPal.setDisabled( *tqcolorGroup( newPal.active(), IndicatorOff ) );
+ newPal.setActive( *colorGroup( newPal.active(), IndicatorOff ) );
+ newPal.setDisabled( *colorGroup( newPal.active(), IndicatorOff ) );
}
if ( isColor( IndicatorOn ) )
- newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOn ) );
+ newPal.setActive( *colorGroup( newPal.active(), IndicatorOn ) );
w->setPalette( newPal );
}
}
@@ -593,12 +593,12 @@ void KThemeStyle::polish( TQWidget *w )
TQPalette newPal( w->palette() );
if ( isColor( ExIndicatorOff ) )
{
- newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOff ) );
- newPal.setDisabled( *tqcolorGroup( newPal.active(),
+ newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOff ) );
+ newPal.setDisabled( *colorGroup( newPal.active(),
ExIndicatorOff ) );
}
if ( isColor( ExIndicatorOn ) )
- newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOn ) );
+ newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOn ) );
w->setPalette( newPal );
}
}
@@ -650,7 +650,7 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h,
if ( gradientHint( type ) == GrReverseBevel )
{
int i;
- bitBlt( p->tqdevice(), x, y, TQT_TQPAINTDEVICE(scalePixmap( w, h, type )), 0, 0, w, h,
+ bitBlt( p->device(), x, y, TQT_TQPAINTDEVICE(scalePixmap( w, h, type )), 0, 0, w, h,
TQt::CopyROP, true );
p->setPen( g.text() );
for ( i = 0; i < borderWidth( type ); ++i, ++x, ++y, w -= 2, h -= 2 )
@@ -690,7 +690,7 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h,
}
if ( borderPixmap( type ) )
{
- bitBlt( p->tqdevice(), x, y, TQT_TQPAINTDEVICE(scaleBorder( w, h, type )), 0, 0, w, h,
+ bitBlt( p->device(), x, y, TQT_TQPAINTDEVICE(scaleBorder( w, h, type )), 0, 0, w, h,
TQt::CopyROP, false );
}
else
@@ -757,7 +757,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
return ;
}
- const TQColorGroup *cg = tqcolorGroup( g, widget );
+ const TQColorGroup *cg = colorGroup( g, widget );
// Standard arrow types
if ( arrowType() == MotifArrow )
{
@@ -791,8 +791,8 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
p->save();
if ( flags & Style_Down )
- p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ),
- tqpixelMetric( PM_ButtonShiftVertical ) );
+ p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
+ pixelMetric( PM_ButtonShiftVertical ) );
if ( flags & Style_Enabled )
{
@@ -847,7 +847,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
case PE_ButtonBevel:
{
WidgetType type = ( sunken || on || down ) ? BevelDown : Bevel;
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, type ), ( sunken || on || down ), false, type );
+ drawBaseButton( p, x, y, w, h, *colorGroup( g, type ), ( sunken || on || down ), false, type );
handled = true;
break;
}
@@ -860,7 +860,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
}
case PE_PanelDockWindow:
{
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, ToolBar ), false, false,
+ drawBaseButton( p, x, y, w, h, *colorGroup( g, ToolBar ), false, false,
ToolBar );
handled = true;
break;
@@ -939,7 +939,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
}
case PE_Splitter:
{
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, Splitter ), false, false,
+ drawBaseButton( p, x, y, w, h, *colorGroup( g, Splitter ), false, false,
Splitter );
handled = true;
break;
@@ -978,10 +978,10 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
if ( !isPixmap( widget ) )
{
- p->fillRect( r, tqcolorGroup( g, widget ) ->brush( TQColorGroup::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(), *tqcolorGroup( g, widget ), true, false,
+ r.height(), *colorGroup( g, widget ), true, false,
highlightWidth( widget ), borderWidth( widget ), shade() );
}
else
@@ -992,7 +992,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
*scalePixmap( r.width(), r.height(),
widget ) );
drawShade( p, r.x(), r.y(), r.width(),
- r.height(), *tqcolorGroup( g, widget ), true, false,
+ r.height(), *colorGroup( g, widget ), true, false,
highlightWidth( widget ), borderWidth( widget ), shade() );
}
@@ -1003,12 +1003,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
{
bool horizontal = ( flags & Style_Horizontal );
drawBaseButton( p, r.x(), r.y(), r.width(), r.height(),
- *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
down, false, down ? ScrollButtonDown : ScrollButton );
tqdrawPrimitive( ( horizontal ) ? PE_ArrowRight : PE_ArrowDown, p ,
TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
- *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
flags );
handled = true;
@@ -1018,12 +1018,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
{
bool horizontal = ( flags & Style_Horizontal );
drawBaseButton( p, r.x(), r.y(), r.width(), r.height(),
- *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
down, false, down ? ScrollButtonDown : ScrollButton );
tqdrawPrimitive( ( horizontal ) ? PE_ArrowLeft : PE_ArrowUp, p ,
TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
- *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
flags );
handled = true;
break;
@@ -1039,7 +1039,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
active ? HScrollBarSliderDown : HScrollBarSlider :
active ? VScrollBarSliderDown : VScrollBarSlider;
drawBaseButton( p, r.x()+offsetH, r.y()+offsetV, r.width()-2*offsetH,
- r.height()-2*offsetV, *tqcolorGroup( g, widget ), active, false,
+ r.height()-2*offsetV, *colorGroup( g, widget ), active, false,
widget );
int spaceW = horizontal ? r.width() - decoWidth( widget ) - 4 :
@@ -1087,7 +1087,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
return menuCache;
}
- const TQColorGroup *g = tqcolorGroup( TQApplication::tqpalette().active(), MenuBar);
+ const TQColorGroup *g = colorGroup( TQApplication::palette().active(), MenuBar);
menuCache = new TQPixmap ( w, h );
TQPainter p(menuCache);
@@ -1097,7 +1097,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
}
-void KThemeStyle::tqdrawControl( ControlElement element,
+void KThemeStyle::drawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1116,9 +1116,9 @@ void KThemeStyle::tqdrawControl( ControlElement element,
{
const TQPushButton * btn = ( const TQPushButton* ) widget;
bool sunken = btn->isOn() || btn->isDown();
- int diw = tqpixelMetric( PM_ButtonDefaultIndicator, btn );
+ int diw = pixelMetric( PM_ButtonDefaultIndicator, btn );
drawBaseButton( p, diw, diw, w - 2 * diw, h - 2 * diw,
- *tqcolorGroup( btn->tqcolorGroup(), sunken ? PushButtonDown :
+ *colorGroup( btn->colorGroup(), sunken ? PushButtonDown :
PushButton ), sunken, roundButton(),
sunken ? PushButtonDown : PushButton );
// TODO if diw, draw fancy default button indicator
@@ -1135,15 +1135,15 @@ void KThemeStyle::tqdrawControl( ControlElement element,
// Shift button contents if pushed.
if ( active )
{
- x += tqpixelMetric( PM_ButtonShiftHorizontal, widget );
- y += tqpixelMetric( PM_ButtonShiftVertical, widget );
+ x += pixelMetric( PM_ButtonShiftHorizontal, widget );
+ y += pixelMetric( PM_ButtonShiftVertical, widget );
how |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() )
{
- int dx = tqpixelMetric( PM_MenuButtonIndicator, widget );
+ int dx = pixelMetric( PM_MenuButtonIndicator, widget );
tqdrawPrimitive( PE_ArrowDown, p, TQRect( x + w - dx - 2, y + 2, dx, h - 4 ),
cg, how, opt );
w -= dx;
@@ -1185,42 +1185,42 @@ void KThemeStyle::tqdrawControl( ControlElement element,
// Text shadow
for ( i = 0; i < 2; i++ )
drawItem( p, TQRect( x + i + 1, y + 1, w, h ), AlignCenter | ShowPrefix,
- button->tqcolorGroup(), button->isEnabled(), NULL,
+ button->colorGroup(), button->isEnabled(), NULL,
button->text(), -1,
- active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() );
+ active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
// Normal Text
for ( i = 0; i < 2; i++ )
drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix,
- button->tqcolorGroup(), true, i == 0 ? button->pixmap() : NULL,
+ button->colorGroup(), true, i == 0 ? button->pixmap() : NULL,
button->text(), -1,
- active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
+ active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
}
else
{
if ( button->isEnabled() )
{
- drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
- active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
+ active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
}
else
{
//TODO: Handle reversed
- drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
+ drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
- &button->tqcolorGroup().light() );
+ &button->colorGroup().light() );
- drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
- &button->tqcolorGroup().buttonText() );
+ &button->colorGroup().buttonText() );
}
}
// Draw a focus rect if the button has focus
if ( how & Style_HasFocus )
tqdrawPrimitive( PE_FocusRect, p,
- TQStyle::tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, how );
handled = true;
break;
@@ -1239,10 +1239,10 @@ void KThemeStyle::tqdrawControl( ControlElement element,
case CE_TabBarTab:
{
const TQTabBar* tb = ( const TQTabBar* ) widget;
- TQTabBar::Shape tbs = tb->tqshape();
+ TQTabBar::Shape tbs = tb->shape();
bool selected = how & Style_Selected;
WidgetType widget = selected ? ActiveTab : InactiveTab;
- const TQColorGroup *cg = tqcolorGroup( tb->tqcolorGroup(), widget );
+ const TQColorGroup *cg = colorGroup( tb->colorGroup(), widget );
int i;
int x2 = x + w - 1, y2 = y + h - 1;
int bWidth = borderWidth( widget );
@@ -1253,7 +1253,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
if ( !selected )
{
p->fillRect( x, y, x2 - x + 1, 2,
- tb->tqpalette().active().brush( TQColorGroup::Background ) );
+ tb->palette().active().brush( TQColorGroup::Background ) );
y += 2;
}
p->setPen( cg->text() );
@@ -1315,8 +1315,8 @@ void KThemeStyle::tqdrawControl( ControlElement element,
else
p->fillRect( x, y, x2 - x + 1, y2 - y + 1, cg->background() );
}
- else if ( tb->tqshape() == TQTabBar::RoundedBelow ||
- tb->tqshape() == TQTabBar::TriangularBelow )
+ else if ( tb->shape() == TQTabBar::RoundedBelow ||
+ tb->shape() == TQTabBar::TriangularBelow )
{
if ( widget == ActiveTab )
widget = RotActiveTab;
@@ -1326,7 +1326,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
if ( !selected )
{
p->fillRect( x, y2 - 2, x2 - x + 1, 2,
- tb->tqpalette().active().brush( TQColorGroup::Background ) );
+ tb->palette().active().brush( TQColorGroup::Background ) );
y2 -= 2;
}
p->setPen( cg->text() );
@@ -1398,7 +1398,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
TQRect pr = mb->rect();
bool active = how & Style_Active;
//bool focused = how & Style_HasFocus;
- const TQColorGroup *g = tqcolorGroup( cg, active ? MenuBarItem : MenuBar );
+ const TQColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar );
TQColor btext = g->buttonText();
TQPixmap* cache = makeMenuBarCache(pr.width(), pr.height());
@@ -1440,10 +1440,10 @@ void KThemeStyle::tqdrawControl( ControlElement element,
bool enabled = (mi? mi->isEnabled():true);
bool checkable = popupmenu->isCheckable();
bool active = how & Style_Active;
- bool etchtext = tqstyleHint( SH_EtchDisabledText, 0 );
+ bool etchtext = styleHint( SH_EtchDisabledText, 0 );
bool reverse = TQApplication::reverseLayout();
- const TQColorGroup& cg_ours = *tqcolorGroup( cg, active ? MenuItemDown : MenuItem );
+ const TQColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem );
//TQColor btext = cg_ours.buttonText();
@@ -1465,7 +1465,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
drawBaseButton( p, x, y, w, h, cg_ours, true, false, MenuItemDown );
else
{
- drawShade( p, x, y, w, h, *tqcolorGroup( cg_ours, MenuItem ), false, false,
+ drawShade( p, x, y, w, h, *colorGroup( cg_ours, MenuItem ), false, false,
highlightWidth( MenuItem ), borderWidth( MenuItem ),
shade() );
int dw = decoWidth( MenuItem );
@@ -1475,7 +1475,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
x + dw, y + dw, w - dw * 2, h - dw * 2,
cg_ours.brush( TQColorGroup::Background ) );
//cg.brush( TQColorGroup::Background ));
- //tqcolorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) );
+ //colorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) );
}
else
{
@@ -1493,7 +1493,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
if ( mi->iconSet() )
{
TQIconSet::Mode mode;
- TQRect cr = tqvisualRect( TQRect( x, y, checkcol, h ), r );
+ TQRect cr = visualRect( TQRect( x, y, checkcol, h ), r );
// Select the correct icon from the iconset
if ( active )
@@ -1504,7 +1504,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( checkable && mi->isChecked() ) //!active && -- ??
- drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *tqcolorGroup( cg_ours, BevelDown ), true, false, BevelDown );
+ drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *colorGroup( cg_ours, BevelDown ), true, false, BevelDown );
// Draw the icon
TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode );
@@ -1644,7 +1644,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
{
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = 10 - itemFrame; //We're not very useful to inherit off, so just hardcode..
- TQRect vr = tqvisualRect( TQRect( 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
@@ -1668,7 +1668,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
case CE_ProgressBarGroove:
{
TQBrush bg;
- const TQColorGroup * cg2 = tqcolorGroup( cg, ProgressBg );
+ const TQColorGroup * cg2 = colorGroup( cg, ProgressBg );
qDrawWinPanel( p, r, *cg2, true );
bg.setColor( cg2->color( TQColorGroup::Background ) );
if ( isPixmap( ProgressBg ) )
@@ -1715,13 +1715,13 @@ void KThemeStyle::tqdrawControl( ControlElement element,
}
if ( !reverse )
- drawBaseButton( p, x + pstep, y, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar );
+ drawBaseButton( p, x + pstep, y, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar );
else
{
//TODO:Optimize
TQPixmap buf( width, h );
TQPainter p2( &buf );
- drawBaseButton( &p2, 0, 0, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar );
+ drawBaseButton( &p2, 0, 0, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar );
p2.end();
TQPixmap mirroredPix = TQPixmap( TQImage(buf.convertToImage()).mirror( true, false ) );
bitBlt( p->device(), x + w - width - pstep, y, &mirroredPix );
@@ -1736,12 +1736,12 @@ void KThemeStyle::tqdrawControl( ControlElement element,
};
if ( !handled )
- KThemeBase::tqdrawControl( element,
+ KThemeBase::drawControl( element,
p, widget, r, cg, how, opt );
}
-void KThemeStyle::tqdrawControlMask( ControlElement element,
+void KThemeStyle::drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1765,7 +1765,7 @@ void KThemeStyle::tqdrawControlMask( ControlElement element,
};
if ( !handled )
- KThemeBase::tqdrawControlMask( element,
+ KThemeBase::drawControlMask( element,
p, widget, r, opt );
}
@@ -1792,12 +1792,12 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
bool horizontal = slider->orientation() == Qt::Horizontal;
if ( horizontal )
{
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, SliderGroove ), true,
+ drawBaseButton( p, x, y, w, h, *colorGroup( cg, SliderGroove ), true,
false, SliderGroove );
}
else
{
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, RotSliderGroove ), true,
+ drawBaseButton( p, x, y, w, h, *colorGroup( cg, RotSliderGroove ), true,
false, RotSliderGroove );
}
}
@@ -1926,10 +1926,10 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
case KPE_GeneralHandle:
{
if ( w > h )
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, HBarHandle ), false, false,
+ drawBaseButton( p, x, y, w, h, *colorGroup( cg, HBarHandle ), false, false,
HBarHandle );
else
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, VBarHandle ), false, false,
+ drawBaseButton( p, x, y, w, h, *colorGroup( cg, VBarHandle ), false, false,
VBarHandle );
handled = true;
@@ -1951,7 +1951,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
-void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter * p, const TQWidget * widget,
+void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, const TQWidget * widget,
const TQRect & r, const TQColorGroup & g, SFlags how ,
SCFlags controls, SCFlags active,
const TQStyleOption & opt ) const
@@ -1978,7 +1978,7 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter *
{
WidgetType widget = ( down || on ) ? ToolButtonDown : ToolButton;
- drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *tqcolorGroup( g, widget ), down || on, false,
+ drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *colorGroup( g, widget ), down || on, false,
widget );
// int m = decoWidth( widget );
@@ -2014,7 +2014,7 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter *
bool sunken = ( active == SC_ComboBoxArrow );
//No frame, edit box and button for now?
WidgetType widget = sunken ? ComboBoxDown : ComboBox;
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, widget ), sunken,
+ drawBaseButton( p, x, y, w, h, *colorGroup( g, widget ), sunken,
roundComboBox(), widget );
controls ^= SC_ComboBoxFrame;
@@ -2023,7 +2023,7 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter *
if ( controls & SC_ComboBoxArrow )
{
bool sunken = ( active == SC_ComboBoxArrow );
- TQRect ar = TQStyle::tqvisualRect(
+ TQRect ar = TQStyle::visualRect(
querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxArrow ),
widget );
ar.rect( &x, &y, &w, &h );
@@ -2042,8 +2042,8 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter *
else
{
- mtfstyle->tqdrawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *tqcolorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt );
- qDrawShadeRect( p, x, y, w, h, *tqcolorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3,
+ mtfstyle->tqdrawPrimitive( 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;
}
@@ -2116,7 +2116,7 @@ void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter *
if ( !handled )
{
- KThemeBase::tqdrawComplexControl ( control, p, widget,
+ KThemeBase::drawComplexControl ( control, p, widget,
r, g, how ,
controls, active,
opt );
@@ -2185,7 +2185,7 @@ void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h,
p->fillRect( x, y, w, h, fillBrush );
}
-int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, TQStyleHintReturn *shr ) const
+int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, TQStyleHintReturn *shr ) const
{
switch ( sh )
{
@@ -2207,7 +2207,7 @@ int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOpti
return NoBackground;
default:
- return KThemeBase::tqstyleHint( sh, w, opt, shr );
+ return KThemeBase::styleHint( sh, w, opt, shr );
};
}
diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h
index 4fbde91b1..6c2c0e332 100644
--- a/kstyles/kthemestyle/kthemestyle.h
+++ b/kstyles/kthemestyle/kthemestyle.h
@@ -79,13 +79,13 @@ public:
KThemeStyle( const TQString& configDir, const TQString &configFile = TQString::null );
~KThemeStyle();
- virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const;
+ virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const;
virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual void tqdrawControl( ControlElement element,
+ virtual void drawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -93,14 +93,14 @@ public:
SFlags how = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual void tqdrawControlMask( ControlElement element,
+ virtual void drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual void tqdrawComplexControl( TQ_ComplexControl control,
+ virtual void drawComplexControl( TQ_ComplexControl control,
TQPainter *p,
const TQWidget* widget,
const TQRect &r,
@@ -119,7 +119,7 @@ public:
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual int tqstyleHint( StyleHint sh,
+ virtual int styleHint( StyleHint sh,
const TQWidget *widget = 0,
const TQStyleOption& = TQStyleOption::Default,
TQStyleHintReturn* returnData = 0 ) const;
@@ -192,7 +192,7 @@ public:
* @param w The rectangle width.
* @param h The rectangle height.
* @param sunken Draws a sunken style if @p true.
- * @param rounded Draws a rounded tqshape if @p true. Requires bWidth to be
+ * @param rounded Draws a rounded shape if @p true. Requires bWidth to be
* at least 1.
* @param hWidth The highlight width.
* @param bWidth The border width.