Port to TDE

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/3/head
Mavridis Philippe 2 months ago
parent db5c38267d
commit 8dbc6179f8
No known key found for this signature in database
GPG Key ID: 93F66F98F906147D

@ -3,7 +3,7 @@
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = polyester.kdevelop
PROJECT_NAME = polyester.tdevelop
PROJECT_NUMBER = 0.1
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO

@ -1 +1 @@
Polyester is a kde widget style and a kwin decoration both aimed to be a good balance between eye candy and simplicity.
Polyester is a TDE widget style and a twin decoration both aimed to be a good balance between eye candy and simplicity.

@ -1,5 +1,5 @@
#include <kdialog.h>
#include <klocale.h>
#include <tdelocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './configdialog.ui'
**

@ -10,9 +10,9 @@
// Please see the header file for copyright and license information.
//////////////////////////////////////////////////////////////////////////////
#include <kconfig.h>
#include <klocale.h>
#include <kglobal.h>
#include <tdeconfig.h>
#include <tdelocale.h>
#include <tdeglobal.h>
#include <tqbuttongroup.h>
#include <tqgroupbox.h>
#include <tqradiobutton.h>
@ -29,11 +29,11 @@
// -------------
// Constructor
polyesterConfig::polyesterConfig(KConfig* config, TQWidget* parent)
polyesterConfig::polyesterConfig(TDEConfig* config, TQWidget* parent)
: TQObject(parent), config_(0), dialog_(0) {
// create the configuration object
config_ = new KConfig("kwinpolyesterrc");
KGlobal::locale()->insertCatalogue("kwin_polyester_config");
config_ = new TDEConfig("twinpolyesterrc");
TDEGlobal::locale()->insertCatalogue("twin_polyester_config");
// create and show the configuration dialog
dialog_ = new ConfigDialog(parent);
@ -104,7 +104,7 @@ void polyesterConfig::selectionChanged(int) {
// ------
// Load configuration data
void polyesterConfig::load(KConfig*) {
void polyesterConfig::load(TDEConfig*) {
config_->setGroup("General");
TQString value = config_->readEntry("TitleAlignment", "AlignHCenter");
@ -141,7 +141,7 @@ void polyesterConfig::load(KConfig*) {
// ------
// Save configuration data
void polyesterConfig::save(KConfig*) {
void polyesterConfig::save(TDEConfig*) {
config_->setGroup("General");
TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected();
@ -197,7 +197,7 @@ void polyesterConfig::defaults() {
//////////////////////////////////////////////////////////////////////////////
extern "C" {
TQObject* allocate_config(KConfig* config, TQWidget* parent) {
TQObject* allocate_config(TDEConfig* config, TQWidget* parent) {
return (new polyesterConfig(config, parent));
}
}

@ -32,28 +32,28 @@
#include <tqobject.h>
class KConfig;
class TDEConfig;
class ConfigDialog;
class polyesterConfig : public TQObject {
TQ_OBJECT
public:
polyesterConfig(KConfig* config, TQWidget* parent);
polyesterConfig(TDEConfig* config, TQWidget* parent);
~polyesterConfig();
signals:
void changed();
public slots:
void load(KConfig*);
void save(KConfig*);
void load(TDEConfig*);
void save(TDEConfig*);
void defaults();
protected slots:
void selectionChanged(int);
private:
KConfig *config_;
TDEConfig *config_;
ConfigDialog *dialog_;
};

@ -14,11 +14,11 @@
//////////////////////////////////////////////////////////////////////////////
#include <kconfig.h>
#include <kdeversion.h>
#include <kglobal.h>
#include <kglobalsettings.h>
#include <klocale.h>
#include <tdeconfig.h>
#include <tdeversion.h>
#include <tdeglobal.h>
#include <tdeglobalsettings.h>
#include <tdelocale.h>
#include <kpixmap.h>
#include <kimageeffect.h>
#include <kpixmapeffect.h>
@ -136,7 +136,7 @@ bool polyesterFactory::reset(unsigned long changed) {
bool polyesterFactory::readConfig() {
// create a config object
KConfig config("kwinpolyesterrc");
TDEConfig config("twinpolyesterrc");
config.setGroup("General");
// grab settings
@ -1408,7 +1408,7 @@ void polyesterClient::mouseDoubleClickEvent(TQMouseEvent *e) {
// Mousewheel over titlebar
void polyesterClient::wheelEvent(TQWheelEvent * e) {
#if KDE_VERSION > KDE_MAKE_VERSION(3,4,3)
#if TDE_VERSION > TDE_MAKE_VERSION(3,4,3)
if (titleLayout_->geometry().contains(e->pos()))
titlebarMouseWheelOperation(e->delta());
#endif

@ -2,4 +2,4 @@
[Desktop Entry]
Encoding=UTF-8
Name=Polyester
X-KDE-Library=kwin3_polyester
X-TDE-Library=twin3_polyester

@ -1,6 +1,6 @@
/* Copyright (C) 2003 by Sandro Giessl
* based on the nice CVS KDesktop KShadowEngine class. thanks!
* looking forward to see KShadowEngine in kdefx somewhen btw.. :)
* looking forward to see KShadowEngine in tdefx somewhen btw.. :)
* ------------------------------------------------------------------------
* these are the original copyright notes:
* This file is proposed to be part of the KDE libraries.

@ -1,6 +1,6 @@
/* Copyright (C) 2003 by Sandro Giessl
* based on the nice CVS KDesktop KShadowEngine class. thanks!
* looking forward to see KShadowEngine in kdefx somewhen btw.. :)
* looking forward to see KShadowEngine in tdefx somewhen btw.. :)
* ------------------------------------------------------------------------
* these are the original copyright notes:
* This file is proposed to be part of the KDE libraries.

@ -38,7 +38,7 @@
<executable path="" params="" />
<valgrind path="" params="" />
<calltree path="" params="" />
<kcachegrind path="" />
<tdecachegrind path="" />
</kdevvalgrind>
</pluginList>
</KDevPrjSession>

@ -1,5 +1,5 @@
<?xml version = '1.0'?>
<kdevelop>
<tdevelop>
<general>
<author>Marco Martin</author>
<email>notmart@gmail.com</email>
@ -178,7 +178,7 @@
<custom>false</custom>
<bzip>false</bzip>
<archname/>
<appname>polyester.kdevelop</appname>
<appname>polyester.tdevelop</appname>
<version>0.7</version>
<release>1</release>
<vendor>suse</vendor>
@ -186,7 +186,7 @@
<summary>A glossy kde theme</summary>
<group>System/GUI/KDE</group>
<packager>Marco Martin</packager>
<description>Widget style + kwin decoration both aimed to be a good balance between eye candy and simplicity</description>
<description>Widget style + twin decoration both aimed to be a good balance between eye candy and simplicity</description>
<changelog>Polyester 0.7:misc:-(hopefully) fixed gentoo ebuild (i don't have gentoo installed atm, so let me know)widget:-some little code cleanups-menubar text shadow configurable-as requested the look has been made a little bit similar to http://kdelook.org/content/show.php?content=33522 (but not identical)-active menu item more button-like-new option (default off) &quot;menubar emphasis&quot; that makes the menubar more glass-likedeco:-litte modification of the titlebar border-titlebar buttons with more contrast-when a dark color is chosen for the titlebar buttons, their icons become white</changelog>
<devpackage>false</devpackage>
<docspackage>false</docspackage>
@ -198,4 +198,4 @@
<appskde>false</appskde>
<url/>
</dist>
</kdevelop>
</tdevelop>

@ -36,8 +36,8 @@ DEALINGS IN THE SOFTWARE.
#include <tqsettings.h>
#include <tqcolor.h>
#include <tqgroupbox.h>
#include <kglobal.h>
#include <klocale.h>
#include <tdeglobal.h>
#include <tdelocale.h>
#include <kcolorbutton.h>
#include <kdemacros.h>
@ -48,7 +48,7 @@ extern "C"
{
KDE_EXPORT TQWidget* allocate_kstyle_config(TQWidget* parent)
{
KGlobal::locale()->insertCatalogue("polyester");
TDEGlobal::locale()->insertCatalogue("polyester");
return new PolyesterStyleConfig(parent);
}
}
@ -59,7 +59,7 @@ PolyesterStyleConfig::PolyesterStyleConfig(TQWidget* parent): TQWidget(parent)
//Should have no margins here, the dialog provides them
TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0);
dialog_ = new ConfigDialog(this);
KGlobal::locale()->insertCatalogue("kstyle_polyester_config");
TDEGlobal::locale()->insertCatalogue("kstyle_polyester_config");
layout->addWidget(dialog_);

@ -23,7 +23,7 @@
Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
(C) 2000 Dirk Mueller <mueller@kde.org>
(C) 2001 Martijn Klingens <klingens@kde.org>
Progressbar code based on KStyle,
Progressbar code based on TDEStyle,
Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
This library is free software; you can redistribute it and/or
@ -73,7 +73,7 @@
#include <tqsettings.h>
#include <kpixmap.h>
#include <kimageeffect.h>
#include <kglobal.h>
#include <tdeglobal.h>
#include "polyester.h"
#include "polyester.moc"
@ -160,7 +160,7 @@ class PolyesterStylePlugin : public TQStylePlugin
KDE_Q_EXPORT_PLUGIN( PolyesterStylePlugin )
// -- end --
PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScrollBar),
PolyesterStyle::PolyesterStyle() : TDEStyle( AllowMenuTransparency, ThreeButtonScrollBar),
kickerMode(false),
kornMode(false),
flatMode(false)
@ -236,19 +236,19 @@ PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScr
this hack may be disabled in the future, let's see...*/
if( !qstrcmp( tqApp->argv() [ 0 ], "unknown" ) )
{
_scrollBarType = KStyle::WindowsStyleScrollBar;
_scrollBarType = TDEStyle::WindowsStyleScrollBar;
_menuStripe = false;
}
//Thanks, Lipstik :-)
else if( !strcmp(_scrollBarStyle,"ThreeButtonScrollBar" ) )
_scrollBarType = KStyle::ThreeButtonScrollBar;
_scrollBarType = TDEStyle::ThreeButtonScrollBar;
else if( !strcmp(_scrollBarStyle,"WindowsStyleScrollBar" ) )
_scrollBarType = KStyle::WindowsStyleScrollBar;
_scrollBarType = TDEStyle::WindowsStyleScrollBar;
else if( !strcmp(_scrollBarStyle,"PlatinumStyleScrollBar" ) )
_scrollBarType = KStyle::PlatinumStyleScrollBar;
_scrollBarType = TDEStyle::PlatinumStyleScrollBar;
else if( !strcmp(_scrollBarStyle,"NextStyleScrollBar" ) )
_scrollBarType = KStyle::NextStyleScrollBar;
_scrollBarType = TDEStyle::NextStyleScrollBar;
//HACK for gtk-qt: if setScrollBarType is called wxwidgets applications will broke
/*if( qstrcmp( tqApp->argv() [ 0 ], "unknown" ) )
@ -363,9 +363,9 @@ void PolyesterStyle::polish(TQApplication* app)
void PolyesterStyle::polish(TQWidget* widget)
{
if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...?
khtmlWidgets[widget] = true;
connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(khtmlWidgetDestroyed(TQObject*)));
if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
tdehtmlWidgets[widget] = true;
connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(tdehtmlWidgetDestroyed(TQObject*)));
}
// use tqt_cast where possible to check if the widget inheits one of the classes. might improve
@ -401,7 +401,7 @@ void PolyesterStyle::polish(TQWidget* widget)
widget->installEventFilter(this);
} else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( NoBackground );
} else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
} else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) {
widget->installEventFilter(this);
} else if (::tqt_cast<TQHeader*>(widget)) {
connect(widget->parent(), SIGNAL(contentsMoving(int, int)), widget, SLOT(update()));
@ -421,13 +421,13 @@ void PolyesterStyle::polish(TQWidget* widget)
KStyle::polish(widget);
TDEStyle::polish(widget);
}
void PolyesterStyle::unPolish(TQWidget* widget)
{
if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...?
khtmlWidgets.remove(widget);
if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
tdehtmlWidgets.remove(widget);
}
// use tqt_cast to check if the widget inheits one of the classes.
@ -446,7 +446,7 @@ void PolyesterStyle::unPolish(TQWidget* widget)
widget->removeEventFilter(this);
} else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( PaletteBackground );
} else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
} else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) {
widget->removeEventFilter(this);
}
@ -459,13 +459,13 @@ void PolyesterStyle::unPolish(TQWidget* widget)
progAnimWidgets.remove(widget);
}
KStyle::unPolish(widget);
TDEStyle::unPolish(widget);
}
/*a bunch of slots stuff...*/
void PolyesterStyle::khtmlWidgetDestroyed(TQObject* obj)
void PolyesterStyle::tdehtmlWidgetDestroyed(TQObject* obj)
{
khtmlWidgets.remove(static_cast<TQWidget*>(obj));
tdehtmlWidgets.remove(static_cast<TQWidget*>(obj));
}
void PolyesterStyle::progressBarDestroyed(TQObject* obj)
@ -962,7 +962,7 @@ void PolyesterStyle::renderButton(TQPainter *p,
bool mouseOver,
bool horizontal,
bool enabled,
bool khtmlMode,
bool tdehtmlMode,
int animFrame,
bool isDefault //TODO: move here all the default-button related code?
) const
@ -975,7 +975,7 @@ void PolyesterStyle::renderButton(TQPainter *p,
uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
if(!enabled) contourFlags|=Is_Disabled;
if(khtmlMode) contourFlags|=Draw_AlphaBlend;
if(tdehtmlMode) contourFlags|=Draw_AlphaBlend;
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom;
if(horizontal) surfaceFlags|=Is_Horizontal;
@ -1547,7 +1547,7 @@ void PolyesterStyle::sliderThumbMoved(int val)
}
}
void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
void PolyesterStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe,
TQPainter *p,
const TQWidget* widget,
const TQRect &r,
@ -1844,7 +1844,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
break;
}
// copied and slightly modified from KStyle.
// copied and slightly modified from TDEStyle.
case KPE_ListViewBranch: {
// Typical Windows style listview branch element (dotted line).
@ -1917,7 +1917,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
}
default:
KStyle::drawKStylePrimitive(kpe, p, widget, r, cg, flags, opt);
TDEStyle::drawTDEStylePrimitive(kpe, p, widget, r, cg, flags, opt);
}
}
@ -2093,12 +2093,12 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
case PE_ButtonTool:
case PE_ButtonDropDown:
case PE_ButtonCommand: {
bool khtmlMode = khtmlWidgets.contains(opt.widget());
bool tdehtmlMode = tdehtmlWidgets.contains(opt.widget());
int animFrame = 0;
if( _animateButton && animWidgets.contains(opt.widget()) )
animFrame = (int)animWidgets[opt.widget()].animFrame;
renderButton(p, r, cg, (on||down), mouseOver, true, enabled,
khtmlMode, animFrame, flags & Style_ButtonDefault );
tdehtmlMode, animFrame, flags & Style_ButtonDefault );
break;
}
@ -2222,14 +2222,14 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
//coordinates for the surface
uint xs=x,ws=w;
if( pe == PE_ScrollBarSubPage && ( _scrollBarType == KStyle::PlatinumStyleScrollBar ) )
if( pe == PE_ScrollBarSubPage && ( _scrollBarType == TDEStyle::PlatinumStyleScrollBar ) )
{
contourFlags |= Draw_Left|Round_UpperLeft|Round_BottomLeft;
surfaceFlags |= Round_UpperLeft|Round_BottomLeft;
xs++;
ws--;
}
else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == KStyle::NextStyleScrollBar ) )
else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == TDEStyle::NextStyleScrollBar ) )
{
contourFlags |= Draw_Right|Round_UpperRight|Round_BottomRight;
surfaceFlags |= Round_UpperRight|Round_BottomRight;
@ -2255,14 +2255,14 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
//coordinates for the surface
uint ys=y,hs=h;
if( pe == PE_ScrollBarSubPage && ( _scrollBarType == KStyle::PlatinumStyleScrollBar ) )
if( pe == PE_ScrollBarSubPage && ( _scrollBarType == TDEStyle::PlatinumStyleScrollBar ) )
{
contourFlags |= Draw_Top|Round_UpperLeft|Round_UpperRight;
surfaceFlags |= Round_UpperLeft|Round_UpperRight;
ys++;
hs--;
}
else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == KStyle::NextStyleScrollBar ) )
else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == TDEStyle::NextStyleScrollBar ) )
{
contourFlags |= Draw_Bottom|Round_BottomLeft|Round_BottomRight;
surfaceFlags |= Round_BottomLeft|Round_BottomRight;
@ -2349,7 +2349,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
case PE_ScrollBarAddLine: {
uint isNext = _scrollBarType == KStyle::NextStyleScrollBar;
uint isNext = _scrollBarType == TDEStyle::NextStyleScrollBar;
uint contourFlags = (!isNext||!horiz||down?Draw_Left:0)|
Draw_Right|
(!isNext||horiz||down?Draw_Top:0)|
@ -2378,13 +2378,13 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
if( horiz )
{
contourFlags |= Sharp_UpperLeft|Sharp_BottomLeft;
if( _scrollBarType == KStyle::NextStyleScrollBar )
if( _scrollBarType == TDEStyle::NextStyleScrollBar )
contourFlags |= Sharp_UpperRight|Sharp_BottomRight;
}
else
{
contourFlags |= Sharp_UpperLeft|Sharp_UpperRight;
if( _scrollBarType == KStyle::NextStyleScrollBar )
if( _scrollBarType == TDEStyle::NextStyleScrollBar )
contourFlags |= Sharp_BottomLeft|Sharp_BottomRight;
}
@ -2561,12 +2561,12 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
// HACK!!
//
// In order to draw nice edges in khtml, we need to paint alpha-blended.
// In order to draw nice edges in tdehtml, we need to paint alpha-blended.
// On the other hand, we can't paint alpha-blended in normal widgets.
//
// In this place there is no reliable way to detect if we are in khtml; the
// only thing we know is that khtml buffers its widgets into a pixmap. So
// when the paint device is a TQPixmap, chances are high that we are in khtml.
// In this place there is no reliable way to detect if we are in tdehtml; the
// only thing we know is that tdehtml buffers its widgets into a pixmap. So
// when the paint device is a TQPixmap, chances are high that we are in tdehtml.
// It's possible that this breaks other things, so let's see how it works...
if (p->device() && dynamic_cast<TQPixmap*>(p->device() ) ) {
contourFlags += Draw_AlphaBlend;
@ -2873,7 +2873,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
default: {
return KStyle::drawPrimitive(pe, p, r, cg, flags, opt);
return TDEStyle::drawPrimitive(pe, p, r, cg, flags, opt);
}
}
}
@ -3169,7 +3169,7 @@ void PolyesterStyle::drawControl(ControlElement element,
renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
break;
default:
KStyle::drawControl(element, p, widget, r, cg, flags, opt);
TDEStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
break;
@ -3720,7 +3720,7 @@ void PolyesterStyle::drawControl(ControlElement element,
}
default:
KStyle::drawControl(element, p, widget, r, cg, flags, opt);
TDEStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
}
@ -3739,7 +3739,7 @@ void PolyesterStyle::drawControlMask(ControlElement element,
}
default: {
KStyle::drawControlMask (element, p, w, r, opt);
TDEStyle::drawControlMask (element, p, w, r, opt);
}
}
}
@ -3760,7 +3760,7 @@ void PolyesterStyle::drawComplexControlMask(ComplexControl c,
break;
}
default: {
KStyle::drawComplexControlMask (c, p, w, r, o);
TDEStyle::drawComplexControlMask (c, p, w, r, o);
}
}
}
@ -3806,7 +3806,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
:cg.background();
uint contourFlags = 0;
if( khtmlWidgets.contains(cb) )
if( tdehtmlWidgets.contains(cb) )
contourFlags |= Draw_AlphaBlend;
if (_inputFocusHighlight && hasFocus && editable && enabled)
@ -4185,7 +4185,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
}
default:
KStyle::drawComplexControl(control, p, widget,
TDEStyle::drawComplexControl(control, p, widget,
r, cg, flags, controls,
active, opt);
break;
@ -4200,7 +4200,7 @@ TQRect PolyesterStyle::subRect(SubRect r, const TQWidget *widget) const
return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField );
}
// Don't use KStyles progressbar subrect
// Don't use TDEStyles progressbar subrect
// TODO:
case SR_ProgressBarGroove: {
return TQRect(widget->rect());
@ -4212,7 +4212,7 @@ TQRect PolyesterStyle::subRect(SubRect r, const TQWidget *widget) const
}
default: {
return KStyle::subRect(r, widget);
return TDEStyle::subRect(r, widget);
}
}
}
@ -4235,7 +4235,7 @@ TQRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
return TQRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4);
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt);
}
}
break;
@ -4279,13 +4279,13 @@ TQRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
return TQRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2);
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt);
}
}
break;
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt);
}
}
}
@ -4391,19 +4391,19 @@ int PolyesterStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
}
default:
return KStyle::pixelMetric(m, widget);
return TDEStyle::pixelMetric(m, widget);
}
}
int PolyesterStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const
int PolyesterStyle::kPixelMetric(TDEStylePixelMetric kpm, const TQWidget *widget) const
{
switch(kpm)
{
case KPM_MenuItemSeparatorHeight:
return 2;
default:
return KStyle::kPixelMetric(kpm, widget);
return TDEStyle::kPixelMetric(kpm, widget);
}
}
@ -4483,14 +4483,14 @@ TQSize PolyesterStyle::sizeFromContents(ContentsType t,
if(widget->parent() && ::tqt_cast<TQToolBar*>(widget->parent()) )
return TQSize( s.width()+2*4, s.height()+2*4 );
else
return KStyle::sizeFromContents (t, widget, s, opt);
return TDEStyle::sizeFromContents (t, widget, s, opt);
}
default:
return KStyle::sizeFromContents (t, widget, s, opt);
return TDEStyle::sizeFromContents (t, widget, s, opt);
}
return KStyle::sizeFromContents (t, widget, s, opt);
return TDEStyle::sizeFromContents (t, widget, s, opt);
}
int PolyesterStyle::styleHint( StyleHint stylehint,
@ -4532,14 +4532,14 @@ int PolyesterStyle::styleHint( StyleHint stylehint,
}
#endif
default:
return KStyle::styleHint(stylehint, widget, option, returnData);
return TDEStyle::styleHint(stylehint, widget, option, returnData);
}
}
bool PolyesterStyle::eventFilter(TQObject *obj, TQEvent *ev)
{
if (KStyle::eventFilter(obj, ev) )
if (TDEStyle::eventFilter(obj, ev) )
return true;
if (!obj->isWidgetType() ) return false;
@ -4690,7 +4690,7 @@ bool PolyesterStyle::eventFilter(TQObject *obj, TQEvent *ev)
animationTimer->start( 50, false );
}
}
if ( !qstrcmp(obj->name(), "kde toolbar widget") )
if ( !qstrcmp(obj->name(), "tde toolbar widget") )
{
TQWidget* lb = static_cast<TQWidget*>(obj);
if (lb->backgroundMode() == TQt::PaletteButton)

@ -23,7 +23,7 @@
Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
(C) 2000 Dirk Mueller <mueller@kde.org>
(C) 2001 Martijn Klingens <klingens@kde.org>
Progressbar code based on KStyle,
Progressbar code based on TDEStyle,
Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
This library is free software; you can redistribute it and/or
@ -44,7 +44,7 @@
#ifndef __POLYESTER_H
#define __POLYESTER_H
#include <kstyle.h>
#include <tdestyle.h>
#include <tqbitmap.h>
#include <tqintcache.h>
@ -62,7 +62,7 @@ class TQTimer;
//a tiny reimplementation of max...
int max(int a, int b){return (a>b?a:b);}
class PolyesterStyle : public KStyle
class PolyesterStyle : public TDEStyle
{
TQ_OBJECT
@ -74,7 +74,7 @@ public:
void polish(TQWidget* widget );
void unPolish(TQWidget* widget );
void drawKStylePrimitive(KStylePrimitive kpe,
void drawTDEStylePrimitive(TDEStylePrimitive kpe,
TQPainter* p,
const TQWidget* widget,
const TQRect &r,
@ -112,7 +112,7 @@ public:
int pixelMetric(PixelMetric m,
const TQWidget *widget = 0 ) const;
int kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const;
int kPixelMetric(TDEStylePixelMetric kpm, const TQWidget *widget) const;
TQRect subRect(SubRect r,
const TQWidget *widget ) const;
@ -242,7 +242,7 @@ protected:
bool mouseOver = false,
bool horizontal = true,
bool enabled = true,
bool khtmlMode = false,
bool tdehtmlMode = false,
int animFrame = 0,
bool isDefault = false) const;
@ -285,7 +285,7 @@ protected:
int hoverHeaderId;
protected slots:
void khtmlWidgetDestroyed(TQObject* w);
void tdehtmlWidgetDestroyed(TQObject* w);
void sliderThumbMoved(int val);
@ -311,7 +311,7 @@ private:
bool _scrollBarLines;
TQString _scrollBarStyle;
int _scrollBarExtent;
KStyle::KStyleScrollBarType _scrollBarType;
TDEStyle::TDEStyleScrollBarType _scrollBarType;
bool _useLowerCaseText;
bool _animateProgressBar;
bool _animateButton;
@ -346,8 +346,8 @@ private:
TQTab *hoverTab;
// track khtml widgets.
TQMap<const TQWidget*,bool> khtmlWidgets;
// track tdehtml widgets.
TQMap<const TQWidget*,bool> tdehtmlWidgets;
//Animation support.
TQMap<TQWidget*, int> progAnimWidgets;

Loading…
Cancel
Save