summaryrefslogtreecommitdiffstats
path: root/tdestyles/kthemestyle
diff options
context:
space:
mode:
Diffstat (limited to 'tdestyles/kthemestyle')
-rw-r--r--tdestyles/kthemestyle/CMakeLists.txt2
-rw-r--r--tdestyles/kthemestyle/kthemebase.cpp74
-rw-r--r--tdestyles/kthemestyle/kthemebase.h14
-rw-r--r--tdestyles/kthemestyle/kthemestyle.cpp77
-rw-r--r--tdestyles/kthemestyle/kthemestyle.h6
-rw-r--r--tdestyles/kthemestyle/tdestyledirs.cpp2
-rw-r--r--tdestyles/kthemestyle/tdestyledirs.h2
7 files changed, 88 insertions, 89 deletions
diff --git a/tdestyles/kthemestyle/CMakeLists.txt b/tdestyles/kthemestyle/CMakeLists.txt
index 8a1bd2a8c..e6673004f 100644
--- a/tdestyles/kthemestyle/CMakeLists.txt
+++ b/tdestyles/kthemestyle/CMakeLists.txt
@@ -36,6 +36,6 @@ set( ${target}_SRCS
tde_add_kpart( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
- LINK tdefx-shared tdecore-shared ${DL_LIBRARIES}
+ LINK tdefx-shared tdecore-shared ${CMAKE_DL_LIBS}
DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles
)
diff --git a/tdestyles/kthemestyle/kthemebase.cpp b/tdestyles/kthemestyle/kthemebase.cpp
index 8e1f5605f..c666e2c86 100644
--- a/tdestyles/kthemestyle/kthemebase.cpp
+++ b/tdestyles/kthemestyle/kthemebase.cpp
@@ -231,7 +231,7 @@ union kthemeKey{
unsigned int cacheKey;
};
-#define KDE_TQBITMAP_TO_TQPAINTDEVICE(x) TQT_TQPAINTDEVICE_CONST(static_cast<const TQPixmap*>(static_cast<const TQBitmap*>(x)))
+#define KDE_TQBITMAP_TO_TQPAINTDEVICE(x) static_cast<const TQPixmap*>(static_cast<const TQBitmap*>(x))
void KThemeBase::generateBorderPix( int i )
{
@@ -243,42 +243,42 @@ void KThemeBase::generateBorderPix( int i )
TQBitmap destMask( pbWidth[ i ], pbWidth[ i ] );
TQPixmap tmp( pbWidth[ i ], pbWidth[ i ] );
- bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), 0, 0, pbWidth[ i ], pbWidth[ i ],
+ bitBlt( &tmp, 0, 0, pbPixmaps[ i ], 0, 0, pbWidth[ i ], pbWidth[ i ],
TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, pbWidth[ i ], pbWidth[ i ],
+ bitBlt( &destMask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, pbWidth[ i ], pbWidth[ i ],
TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::TopLeft, tmp );
- bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbPixmaps[ i ] ->width() - pbWidth[ i ], 0,
+ bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbPixmaps[ i ] ->width() - pbWidth[ i ], 0,
pbWidth[ i ], pbWidth[ i ], TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( &destMask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
0, pbWidth[ i ], pbWidth[ i ], TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::TopRight, tmp );
- bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), 0, pbPixmaps[ i ] ->height() - pbWidth[ i ],
+ bitBlt( &tmp, 0, 0, pbPixmaps[ i ], 0, pbPixmaps[ i ] ->height() - pbWidth[ i ],
pbWidth[ i ], pbWidth[ i ], TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, pbPixmaps[ i ] ->height() - pbWidth[ i ],
+ bitBlt( &destMask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, pbPixmaps[ i ] ->height() - pbWidth[ i ],
pbWidth[ i ], pbWidth[ i ], TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::BottomLeft, tmp );
- bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbPixmaps[ i ] ->width() - pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ], pbWidth[ i ], pbWidth[ i ],
TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( &destMask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ], pbWidth[ i ], pbWidth[ i ],
TQt::CopyROP, false );
tmp.setMask( destMask );
@@ -287,23 +287,23 @@ void KThemeBase::generateBorderPix( int i )
tmp.resize( pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ] );
destMask.resize( pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ] );
- bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbWidth[ i ], 0,
+ bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbWidth[ i ], 0,
pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbWidth[ i ], 0,
+ bitBlt( &destMask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbWidth[ i ], 0,
pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ],
TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::Top, tmp );
- bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbWidth[ i ],
+ bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ],
pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbWidth[ i ],
+ bitBlt( &destMask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ],
pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], TQt::CopyROP, false );
tmp.setMask( destMask );
@@ -312,23 +312,23 @@ void KThemeBase::generateBorderPix( int i )
tmp.resize( pbWidth[ i ], pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2 );
destMask.resize( pbWidth[ i ], pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2 );
- bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), 0, pbWidth[ i ], pbWidth[ i ],
+ bitBlt( &tmp, 0, 0, pbPixmaps[ i ], 0, pbWidth[ i ], pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2, TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, pbWidth[ i ], pbWidth[ i ],
+ bitBlt( &destMask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, pbWidth[ i ], pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2, TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::Left, tmp );
- bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbPixmaps[ i ] ->width() - pbWidth[ i ],
pbWidth[ i ], pbWidth[ i ], pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2,
TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( &destMask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
pbWidth[ i ], pbWidth[ i ], pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2,
TQt::CopyROP, false );
tmp.setMask( destMask );
@@ -439,7 +439,7 @@ void KThemeBase::readConfig( TQt::GUIStyle /*style*/ )
{
if ( config.entryList( configFileName + widgetEntries[ i ] ).size() )
applyResourceGroup( &config, i );
-#ifndef Q_WS_QWS //FIXME
+#ifndef TQ_WS_QWS //FIXME
else
{
@@ -617,7 +617,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
d->overrideWindowForeground = false;
-#ifndef Q_WS_QWS //FIXME
+#ifndef TQ_WS_QWS //FIXME
for ( int input = 0; input < WIDGETS; ++input )
{
@@ -813,10 +813,10 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
const TQBitmap *srcMask = tmp->mask();
int bdWidth = tmp->width();
- bitBlt( TQT_TQPAINTDEVICE(pixmap), 0, 0, TQT_TQPAINTDEVICE(tmp), 0, 0, bdWidth, bdWidth,
+ bitBlt( pixmap, 0, 0, tmp, 0, 0, bdWidth, bdWidth,
TQt::CopyROP, false );
if ( srcMask )
- bitBlt( TQT_TQPAINTDEVICE(&mask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth, bdWidth,
+ bitBlt( &mask, 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth, bdWidth,
TQt::CopyROP, false );
else
mPainter.fillRect( 0, 0, bdWidth, bdWidth, color1 );
@@ -824,30 +824,30 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
tmp = borderPixmap( widget ) ->border( KThemePixmap::TopRight );
srcMask = tmp->mask();
- bitBlt( TQT_TQPAINTDEVICE(pixmap), w - bdWidth, 0, TQT_TQPAINTDEVICE(tmp), 0, 0, bdWidth,
+ bitBlt( pixmap, w - bdWidth, 0, tmp, 0, 0, bdWidth,
bdWidth, TQt::CopyROP, false );
if ( srcMask )
- bitBlt( TQT_TQPAINTDEVICE(&mask), w - bdWidth, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth,
+ bitBlt( &mask, w - bdWidth, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth,
bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, 0, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::BottomLeft );
srcMask = tmp->mask();
- bitBlt( TQT_TQPAINTDEVICE(pixmap), 0, h - bdWidth, TQT_TQPAINTDEVICE(tmp), 0, 0, bdWidth,
+ bitBlt( pixmap, 0, h - bdWidth, tmp, 0, 0, bdWidth,
bdWidth, TQt::CopyROP, false );
if ( srcMask )
- bitBlt( TQT_TQPAINTDEVICE(&mask), 0, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth,
+ bitBlt( &mask, 0, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth,
bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( 0, h - bdWidth, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::BottomRight );
srcMask = tmp->mask();
- bitBlt( TQT_TQPAINTDEVICE(pixmap), w - bdWidth, h - bdWidth, TQT_TQPAINTDEVICE(tmp), 0, 0,
+ bitBlt( pixmap, w - bdWidth, h - bdWidth, tmp, 0, 0,
bdWidth, bdWidth, TQt::CopyROP, false );
if ( srcMask )
- bitBlt( TQT_TQPAINTDEVICE(&mask), w - bdWidth, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ bitBlt( &mask, w - bdWidth, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
bdWidth, bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, h - bdWidth, bdWidth, bdWidth, color1 );
@@ -860,7 +860,7 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
srcMask = tmp->mask();
p.drawTiledPixmap( bdWidth, 0, w - bdWidth * 2, bdWidth, *tmp );
if ( srcMask )
- bitBlt( TQT_TQPAINTDEVICE(&mask), bdWidth, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ bitBlt( &mask, bdWidth, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
w - bdWidth * 2, bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( bdWidth, 0, w - bdWidth * 2, bdWidth, color1 );
@@ -870,7 +870,7 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
p.drawTiledPixmap( bdWidth, h - bdWidth, w - bdWidth * 2, bdWidth,
*tmp );
if ( srcMask )
- bitBlt( TQT_TQPAINTDEVICE(&mask), bdWidth, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ bitBlt( &mask, bdWidth, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
w - bdWidth * 2, bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( bdWidth, h - bdWidth, w - bdWidth * 2, bdWidth,
@@ -882,7 +882,7 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
srcMask = tmp->mask();
p.drawTiledPixmap( 0, bdWidth, bdWidth, h - bdWidth * 2, *tmp );
if ( srcMask )
- bitBlt( TQT_TQPAINTDEVICE(&mask), 0, bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ bitBlt( &mask, 0, bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
bdWidth, h - bdWidth * 2, TQt::CopyROP, false );
else
mPainter.fillRect( 0, bdWidth, bdWidth, h - bdWidth * 2, color1 );
@@ -892,7 +892,7 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
p.drawTiledPixmap( w - bdWidth, bdWidth, bdWidth, h - bdWidth * 2,
*tmp );
if ( srcMask )
- bitBlt( TQT_TQPAINTDEVICE(&mask), w - bdWidth, bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ bitBlt( &mask, w - bdWidth, bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
bdWidth, h - bdWidth * 2, TQt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, bdWidth, bdWidth, h - bdWidth * 2, color1 );
@@ -1111,7 +1111,7 @@ TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg,
void KThemeBase::applyMiscResourceGroup( TQSettings *config )
{
-#ifndef Q_WS_QWS //FIXME
+#ifndef TQ_WS_QWS //FIXME
d->props.erase( "Misc" ); // clear the old property
TQString base = configFileName + "Misc/";
@@ -1181,7 +1181,7 @@ static TQColor readColorEntry( Prop& prop, TQString setting, const TQColor& def
void KThemeBase::readMiscResourceGroup()
{
-#ifndef Q_WS_QWS //FIXME
+#ifndef TQ_WS_QWS //FIXME
Prop & prop = d->props[ "Misc" ];
sbPlacement = ( SButton ) readNumEntry( prop, "SButtonPosition",
@@ -1198,7 +1198,7 @@ void KThemeBase::readMiscResourceGroup()
void KThemeBase::applyResourceGroup( TQSettings *config, int i )
{
-#ifndef Q_WS_QWS //FIXME
+#ifndef TQ_WS_QWS //FIXME
TQString tmpStr;
int tmpVal;
@@ -1357,7 +1357,7 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdnames,
bool *loadArray )
{
-#ifndef Q_WS_QWS //FIXME
+#ifndef TQ_WS_QWS //FIXME
if ( loadArray[ i ] == true )
{
return ; // already been preloaded.
@@ -1636,7 +1636,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
disfg = disfg.light( highlightVal );
else
// black fg - use darkgray disabled fg
- disfg = Qt::darkGray;
+ disfg = TQt::darkGray;
TQColorGroup disabledgrp( disfg, background, //TODO:Convert this to the new ctor.
@@ -1738,7 +1738,7 @@ KThemeCache::KThemeCache( int maxSize, TQObject *parent, const char *name )
cache.setMaxCost( maxSize * 1024 );
cache.setAutoDelete( true );
flushTimer.start( 300000 ); // 5 minutes
- connect( &flushTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( flushTimeout() ) );
+ connect( &flushTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( flushTimeout() ) );
}
void KThemeCache::flushTimeout()
diff --git a/tdestyles/kthemestyle/kthemebase.h b/tdestyles/kthemestyle/kthemebase.h
index 01ecab138..0549af55f 100644
--- a/tdestyles/kthemestyle/kthemebase.h
+++ b/tdestyles/kthemestyle/kthemebase.h
@@ -122,7 +122,7 @@ inline bool KThemePixmap::isOld()
*/
class KThemeCache : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
/**
* The scale hints supported by the cache. Note that Tiled is not here
@@ -213,7 +213,7 @@ class KThemeBasePrivate;
*/
class KThemeBase: public TDEStyle
{
- Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a new KThemeBase object.
@@ -480,7 +480,7 @@ protected:
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
+ * colors. This is the same code used by KDE (tdeApp.cpp) in previous
* versions.
*/
TQColorGroup* makeColorGroup( const TQColor &fg, const TQColor &bg,
@@ -517,12 +517,12 @@ protected:
SFlags flags = Style_Default,
const TQStyleOption& option = TQStyleOption::Default ) const
{
- TDEStyle::tqdrawPrimitive ( pe, p, ceData, elementFlags, r, cg,
+ TDEStyle::drawPrimitive ( pe, p, ceData, elementFlags, r, cg,
flags, option );
}
- virtual void drawControl( TQ_ControlElement element,
+ virtual void drawControl( ControlElement element,
TQPainter *p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -536,7 +536,7 @@ protected:
r, cg, how, opt, widget );
}
- virtual void drawControlMask( TQ_ControlElement element,
+ virtual void drawControlMask( ControlElement element,
TQPainter *p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -548,7 +548,7 @@ protected:
}
- virtual void drawComplexControl( TQ_ComplexControl control,
+ virtual void drawComplexControl( ComplexControl control,
TQPainter *p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
diff --git a/tdestyles/kthemestyle/kthemestyle.cpp b/tdestyles/kthemestyle/kthemestyle.cpp
index 5ddbb3899..386f813bf 100644
--- a/tdestyles/kthemestyle/kthemestyle.cpp
+++ b/tdestyles/kthemestyle/kthemestyle.cpp
@@ -158,7 +158,7 @@ public:
}
};
-KDE_Q_EXPORT_PLUGIN( KThemeStylePlugin )
+TDE_EXPORT_PLUGIN( KThemeStylePlugin )
void kDrawWindowsArrow ( TQPainter *p, const TQStyleControlElementData &ceData, const TQStyle::ControlElementFlags elementFlags, const TQStyle* style, TQStyle::PrimitiveElement pe, bool down,
@@ -422,7 +422,7 @@ KThemeStyle::~KThemeStyle()
void KThemeStyle::applicationPolish( const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr )
{
- if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQApplication")) {
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
if (!qstrcmp(app->argv()[0], "kicker")) {
kickerMode = true;
@@ -450,7 +450,7 @@ void KThemeStyle::polish( TQPalette &p )
if ( isPixmap( Background ) )
{
- TQBrush bgBrush( p.color( TQPalette::Normal,
+ TQBrush bgBrush( p.color( TQPalette::Active,
TQColorGroup::Background ),
*uncached( Background ) );
brushHandle = uncached( Background )->handle();
@@ -470,7 +470,7 @@ void KThemeStyle::paletteChanged()
void KThemeStyle::applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr )
{
- if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQApplication")) {
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
app->setPalette( oldPalette, true );
}
@@ -478,7 +478,7 @@ void KThemeStyle::applicationUnPolish( const TQStyleControlElementData &ceData,
bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{
- if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQObject")) {
TQObject* object = reinterpret_cast<TQObject*>(source);
if( object->inherits("KActiveLabel"))
@@ -486,7 +486,7 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C
if(event->type() == TQEvent::Move || event->type() == TQEvent::Resize ||
event->type() == TQEvent::Show)
{
- TQWidget *w = TQT_TQWIDGET(object);
+ TQWidget *w = static_cast<TQWidget*>(object);
TQPoint pos(0, 0);
pos = w->mapTo(w->topLevelWidget(), pos);
TQPixmap pix(uncached( Background )->size());
@@ -499,16 +499,16 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C
pos.x(), pos.y());
p.end();
TQPalette pal(w->palette());
- TQBrush brush( pal.color( TQPalette::Normal,
+ TQBrush brush( pal.color( TQPalette::Active,
TQColorGroup::Background),
pix );
pal.setBrush(TQColorGroup::Base, brush);
w->setPalette(pal);
}
}
- if (!qstrcmp(object->name(), "tde toolbar widget") && object->inherits(TQLABEL_OBJECT_NAME_STRING))
+ if (!qstrcmp(object->name(), "tde toolbar widget") && object->inherits("TQLabel"))
{
- TQWidget* lb = TQT_TQWIDGET(object);
+ TQWidget* lb = static_cast<TQWidget*>(object);
if (lb->backgroundMode() == TQt::PaletteButton)
lb->setBackgroundMode(TQt::PaletteBackground);
removeObjectEventHandler(ceData, elementFlags, source, this);
@@ -520,13 +520,13 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C
void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
- if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget *w = reinterpret_cast<TQWidget*>(ptr);
- if (::tqqt_cast<TQStatusBar*>(w))
- w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Normal, TQColorGroup::Background));
+ if (::tqt_cast<TQStatusBar*>(w))
+ w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Active, TQColorGroup::Background));
- if (::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
+ if (::tqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
installObjectEventHandler(ceData, elementFlags, ptr, this);
if (w->backgroundPixmap() && !w->isTopLevel() &&
@@ -550,9 +550,9 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
{
polishLock = true;
- TQColorGroup clrGroup( Qt::black, TQColor( 255, 255, 220 ),
- TQColor( 96, 96, 96 ), Qt::black, Qt::black,
- Qt::black, TQColor( 255, 255, 220 ) );
+ TQColorGroup clrGroup( TQt::black, TQColor( 255, 255, 220 ),
+ TQColor( 96, 96, 96 ), TQt::black, TQt::black,
+ TQt::black, TQColor( 255, 255, 220 ) );
TQPalette toolTip ( clrGroup, clrGroup, clrGroup );
TQToolTip::setPalette( toolTip );
@@ -565,7 +565,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
return ;
}
- if ( ::tqqt_cast<TQMenuBar*>(w) )
+ if ( ::tqt_cast<TQMenuBar*>(w) )
{
w->setBackgroundMode( TQWidget::NoBackground );
}
@@ -573,7 +573,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
{
w->setBackgroundMode( TQWidget::PaletteBackground );
}
- else if ( ::tqqt_cast<TQPopupMenu*>(w) )
+ else if ( ::tqt_cast<TQPopupMenu*>(w) )
{
popupPalette = w->palette();
if ( isColor( MenuItem ) || isColor( MenuItemDown ) )
@@ -593,7 +593,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
w->setBackgroundMode( TQWidget::NoBackground );
}
- else if ( ::tqqt_cast<TQCheckBox*>(w) )
+ else if ( ::tqt_cast<TQCheckBox*>(w) )
{
if ( isColor( IndicatorOff ) || isColor( IndicatorOn ) )
{
@@ -608,7 +608,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
w->setPalette( newPal );
}
}
- else if ( ::tqqt_cast<TQRadioButton*>(w) )
+ else if ( ::tqt_cast<TQRadioButton*>(w) )
{
if ( isColor( ExIndicatorOff ) || isColor( ExIndicatorOn ) )
{
@@ -631,7 +631,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
- if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget *w = reinterpret_cast<TQWidget*>(ptr);
if (w->backgroundPixmap() && !w->isTopLevel())
@@ -644,21 +644,21 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem
}
//Toolbar labels should nornally be PaletteButton
- if ( ::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
+ if ( ::tqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
w->setBackgroundMode( TQWidget::PaletteButton );
//The same for menu bars, popup menus
- else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQPopupMenu*>(w) )
+ else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQPopupMenu*>(w) )
w->setBackgroundMode( TQWidget::PaletteButton );
- //For toolbar internal separators, return to button, too (can't use tqqt_cast here since don't have access to the class)
+ //For toolbar internal separators, return to button, too (can't use tqt_cast here since don't have access to the class)
else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
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 ( ::tqqt_cast<TQPopupMenu*>(w) || ::tqqt_cast<TQCheckBox*>(w) || ::tqqt_cast<TQRadioButton*>(w) || ::tqqt_cast<TQStatusBar*>(w) )
+ if ( ::tqt_cast<TQPopupMenu*>(w) || ::tqt_cast<TQCheckBox*>(w) || ::tqt_cast<TQRadioButton*>(w) || ::tqt_cast<TQStatusBar*>(w) )
w->unsetPalette();
}
@@ -677,7 +677,7 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h,
if ( gradientHint( type ) == GrReverseBevel )
{
int i;
- bitBlt( p->device(), x, y, TQT_TQPAINTDEVICE(scalePixmap( w, h, type )), 0, 0, w, h,
+ bitBlt( p->device(), x, y, 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 )
@@ -717,7 +717,7 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h,
}
if ( borderPixmap( type ) )
{
- bitBlt( p->device(), x, y, TQT_TQPAINTDEVICE(scaleBorder( w, h, type )), 0, 0, w, h,
+ bitBlt( p->device(), x, y, scaleBorder( w, h, type ), 0, 0, w, h,
TQt::CopyROP, false );
}
else
@@ -927,7 +927,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQSt
const TQBitmap * mask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->mask();
if ( mask )
{
- p->setPen( Qt::color1 );
+ p->setPen( TQt::color1 );
p->drawPixmap( x, y, *mask );
}
else
@@ -945,7 +945,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQSt
IndicatorOff ) ->mask();
if ( mask )
{
- p->setPen( Qt::color1 );
+ p->setPen( TQt::color1 );
p->drawPixmap( x, y, *mask );
}
else
@@ -1686,14 +1686,14 @@ void KThemeStyle::drawControl( ControlElement element,
// Draw the pixmap
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( Qt::OpaqueMode );
+ p->setBackgroundMode( TQt::OpaqueMode );
int diffw = ( ( w - pixmap->width() ) / 2 )
+ ( ( w - pixmap->width() ) % 2 );
p->drawPixmap( x + diffw, y + itemFrame, *pixmap );
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( Qt::TransparentMode );
+ p->setBackgroundMode( TQt::TransparentMode );
}
}
@@ -1851,7 +1851,7 @@ void KThemeStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
if ( !roundSlider() )
{
const TQSlider * slider = ( const TQSlider* ) widget;
- bool horizontal = slider->orientation() == Qt::Horizontal;
+ bool horizontal = slider->orientation() == TQt::Horizontal;
if ( horizontal )
{
drawBaseButton( p, x, y, w, h, *colorGroup( cg, SliderGroove ), true,
@@ -1867,7 +1867,7 @@ void KThemeStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
{
//This code is from HighColorDefault..
const TQSlider* slider = ( const TQSlider* ) widget;
- bool horizontal = slider->orientation() == Qt::Horizontal;
+ bool horizontal = slider->orientation() == TQt::Horizontal;
int gcenter = ( horizontal ? r.height() : r.width() ) / 2;
TQRect gr;
@@ -1903,7 +1903,7 @@ void KThemeStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
if ( isPixmap( Slider ) )
{
const TQSlider * slider = ( const TQSlider* ) widget;
- bool horizontal = slider->orientation() == Qt::Horizontal;
+ bool horizontal = slider->orientation() == TQt::Horizontal;
if ( horizontal )
{
bitBlt( p->device(), x, y + ( h - uncached( Slider ) ->height() ) / 2,
@@ -1928,7 +1928,7 @@ void KThemeStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
//This code again from HighColor..
//...except sans the gradient..
const TQSlider* slider = ( const TQSlider* ) widget;
- bool horizontal = slider->orientation() == Qt::Horizontal;
+ bool horizontal = slider->orientation() == TQt::Horizontal;
int x, y, w, h;
r.rect( &x, &y, &w, &h );
int x2 = x + w - 1;
@@ -2013,7 +2013,7 @@ void KThemeStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
-void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
+void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQRect & r, const TQColorGroup & g, SFlags how ,
SCFlags controls, SCFlags active,
const TQStyleOption & opt, const TQWidget * widget ) const
@@ -2115,7 +2115,7 @@ void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p,
{
const TQScrollBar *sb = ( const TQScrollBar* ) widget;
bool maxedOut = ( sb->minValue() == sb->maxValue() );
- bool horizontal = ( sb->orientation() == Qt::Horizontal );
+ bool horizontal = ( sb->orientation() == TQt::Horizontal );
SFlags sflags = ( ( horizontal ? Style_Horizontal : Style_Default ) |
( maxedOut ? Style_Default : Style_Enabled ) );
@@ -2374,7 +2374,7 @@ void KThemeStyle::drawShade( TQPainter *p, int x, int y, int w, int h,
++x, ++y;
--x2, --y2;
}
- p->setPen( Qt::black );
+ p->setPen( TQt::black );
p->drawPoints( bPntArray );
p->drawLineSegments( bLineArray );
p->setPen( highPen );
@@ -2456,4 +2456,3 @@ int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, TQMenuItem *mi,
}
#include "kthemestyle.moc"
-// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent on;
diff --git a/tdestyles/kthemestyle/kthemestyle.h b/tdestyles/kthemestyle/kthemestyle.h
index ca112ed14..029301aae 100644
--- a/tdestyles/kthemestyle/kthemestyle.h
+++ b/tdestyles/kthemestyle/kthemestyle.h
@@ -67,7 +67,7 @@ Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
class KThemeStyle: public KThemeBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a new KThemeStyle object.
@@ -104,7 +104,7 @@ public:
const TQWidget *widget = 0 ) const;
- virtual void drawComplexControl( TQ_ComplexControl control,
+ virtual void drawComplexControl( ComplexControl control,
TQPainter *p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -227,7 +227,7 @@ protected:
mutable TQPixmap* menuCache;
mutable TQPixmap* vsliderCache;
- Qt::HANDLE brushHandle;
+ TQt::HANDLE brushHandle;
bool brushHandleSet;
bool kickerMode;
diff --git a/tdestyles/kthemestyle/tdestyledirs.cpp b/tdestyles/kthemestyle/tdestyledirs.cpp
index 9f795e1e2..bcb208601 100644
--- a/tdestyles/kthemestyle/tdestyledirs.cpp
+++ b/tdestyles/kthemestyle/tdestyledirs.cpp
@@ -22,7 +22,7 @@
*/
#include <tqfile.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include "tdestyledirs.h"
TDEStyleDirs* TDEStyleDirs::instance = 0;
diff --git a/tdestyles/kthemestyle/tdestyledirs.h b/tdestyles/kthemestyle/tdestyledirs.h
index 2a42fd2ba..b70315c84 100644
--- a/tdestyles/kthemestyle/tdestyledirs.h
+++ b/tdestyles/kthemestyle/tdestyledirs.h
@@ -25,7 +25,7 @@
#include <tqsettings.h>
#include <tqstringlist.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
/**
* @short Access to the standard KDE directories for the pixmap style