summaryrefslogtreecommitdiffstats
path: root/tdefx
diff options
context:
space:
mode:
Diffstat (limited to 'tdefx')
-rw-r--r--tdefx/Mainpage.dox2
-rw-r--r--tdefx/kdrawutil.h20
-rw-r--r--tdefx/kstyle.cpp116
-rw-r--r--tdefx/kstyle.h94
4 files changed, 116 insertions, 116 deletions
diff --git a/tdefx/Mainpage.dox b/tdefx/Mainpage.dox
index 65fcadfc8..6352e6198 100644
--- a/tdefx/Mainpage.dox
+++ b/tdefx/Mainpage.dox
@@ -23,7 +23,7 @@
* architecture extensions that are useful when processing images,
* such as MMX, SSE, 3DNow! and AltiVec.
*
- * KStyle is the base class for the %Trinity widget styles. It simplifies
+ * TDEStyle is the base class for the %Trinity widget styles. It simplifies
* and extends the QStyle API in order to make style coding easier.
* It also provides an internal menu transparency and drop shadow
* engine, which means that all styles inheriting this class will
diff --git a/tdefx/kdrawutil.h b/tdefx/kdrawutil.h
index a229625a4..909792817 100644
--- a/tdefx/kdrawutil.h
+++ b/tdefx/kdrawutil.h
@@ -33,7 +33,7 @@
*/
/**
- * @relates KStyle
+ * @relates TDEStyle
* @c \#include @c <kdrawutil.h>
*
* Draws a Next-style button (solid black shadow with light and midlight highlight).
@@ -49,7 +49,7 @@ TDEFX_EXPORT void kDrawNextButton(TQPainter *p, const TQRect &r, const TQColorGr
bool sunken=false, const TQBrush *fill=0);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @overload
*/
TDEFX_EXPORT void kDrawNextButton(TQPainter *p, int x, int y, int w, int h,
@@ -57,7 +57,7 @@ TDEFX_EXPORT void kDrawNextButton(TQPainter *p, int x, int y, int w, int h,
const TQBrush *fill=0);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @c \#include @c <kdrawutil.h>
*
* Draws a Be-style button.
@@ -73,7 +73,7 @@ TDEFX_EXPORT void kDrawBeButton(TQPainter *p, TQRect &r, const TQColorGroup &g,
bool sunken=false, const TQBrush *fill=0);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @c \#include @c <kdrawutil.h>
* @overload
*/
@@ -82,7 +82,7 @@ TDEFX_EXPORT void kDrawBeButton(TQPainter *p, int x, int y, int w, int h,
const TQBrush *fill=0);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @c \#include @c <kdrawutil.h>
*
* Draws a rounded oval button. This function doesn't fill the button.
@@ -97,14 +97,14 @@ TDEFX_EXPORT void kDrawRoundButton(TQPainter *p, const TQRect &r, const TQColorG
bool sunken=false);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @overload
*/
TDEFX_EXPORT void kDrawRoundButton(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, bool sunken=false);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @c \#include @c <kdrawutil.h>
*
* Sets a region to the pixels covered by a round button of the given
@@ -121,7 +121,7 @@ TDEFX_EXPORT void kDrawRoundButton(TQPainter *p, int x, int y, int w, int h,
TDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @c \#include @c <kdrawutil.h>
*
* Paints the pixels covered by a round button of the given size with
@@ -138,7 +138,7 @@ TDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h);
TDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool clear=false);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @c \#include @c <kdrawutil.h>
*
* Paints the provided bitmaps in the painter, using the supplied colorgroup for
@@ -167,7 +167,7 @@ TDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int
TQBitmap *blackColor=0, TQBitmap *whiteColor=0);
/**
- * @relates KStyle
+ * @relates TDEStyle
* @c \#include @c <kdrawutil.h>
* @overload
*/
diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp
index dde47eeb2..29663faf3 100644
--- a/tdefx/kstyle.cpp
+++ b/tdefx/kstyle.cpp
@@ -1,6 +1,6 @@
/*
*
- * KStyle
+ * TDEStyle
* Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
*
* TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
@@ -124,7 +124,7 @@ namespace
static bool useDropShadow(TQWidget* w)
{
return w && w->metaObject() &&
- w->metaObject()->findProperty("KStyleMenuDropShadow") != -1;
+ w->metaObject()->findProperty("TDEStyleMenuDropShadow") != -1;
}
}
@@ -133,7 +133,7 @@ namespace
class TransparencyHandler : public TQObject
{
public:
- TransparencyHandler(KStyle* style, TransparencyEngine tEngine,
+ TransparencyHandler(TDEStyle* style, TransparencyEngine tEngine,
float menuOpacity, bool useDropShadow);
~TransparencyHandler();
bool eventFilter(TQObject* object, TQEvent* event);
@@ -154,12 +154,12 @@ class TransparencyHandler : public TQObject
bool dropShadow;
float opacity;
TQPixmap pix;
- KStyle* kstyle;
+ TDEStyle* kstyle;
TransparencyEngine te;
};
} // namespace
-struct KStylePrivate
+struct TDEStylePrivate
{
bool highcolor : 1;
bool useFilledFrameWorkaround : 1;
@@ -174,9 +174,9 @@ struct KStylePrivate
float menuOpacity;
TransparencyEngine transparencyEngine;
- KStyle::KStyleScrollBarType scrollbarType;
+ TDEStyle::TDEStyleScrollBarType scrollbarType;
TransparencyHandler* menuHandler;
- KStyle::KStyleFlags flags;
+ TDEStyle::TDEStyleFlags flags;
//For KPE_ListViewBranch
TQBitmap *verticalLine;
@@ -186,8 +186,8 @@ struct KStylePrivate
// -----------------------------------------------------------------------------
-KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
- : TQCommonStyle(), d(new KStylePrivate)
+TDEStyle::TDEStyle( TDEStyleFlags flags, TDEStyleScrollBarType sbtype )
+ : TQCommonStyle(), d(new TDEStylePrivate)
{
d->flags = flags;
bool useMenuTransparency = (flags & AllowMenuTransparency);
@@ -197,18 +197,18 @@ KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
// Read style settings
TQSettings settings;
- d->popupMenuDelay = settings.readNumEntry ("/KStyle/Settings/PopupMenuDelay", 256);
- d->sloppySubMenus = settings.readBoolEntry("/KStyle/Settings/SloppySubMenus", false);
- d->etchDisabledText = settings.readBoolEntry("/KStyle/Settings/EtchDisabledText", true);
- d->menuAltKeyNavigation = settings.readBoolEntry("/KStyle/Settings/MenuAltKeyNavigation", true);
- d->scrollablePopupmenus = settings.readBoolEntry("/KStyle/Settings/ScrollablePopupMenus", false);
- d->autoHideAccelerators = settings.readBoolEntry("/KStyle/Settings/AutoHideAccelerators", false);
- d->menuDropShadow = settings.readBoolEntry("/KStyle/Settings/MenuDropShadow", false);
- d->semiTransparentRubberband = settings.readBoolEntry("/KStyle/Settings/SemiTransparentRubberband", false);
+ d->popupMenuDelay = settings.readNumEntry ("/TDEStyle/Settings/PopupMenuDelay", 256);
+ d->sloppySubMenus = settings.readBoolEntry("/TDEStyle/Settings/SloppySubMenus", false);
+ d->etchDisabledText = settings.readBoolEntry("/TDEStyle/Settings/EtchDisabledText", true);
+ d->menuAltKeyNavigation = settings.readBoolEntry("/TDEStyle/Settings/MenuAltKeyNavigation", true);
+ d->scrollablePopupmenus = settings.readBoolEntry("/TDEStyle/Settings/ScrollablePopupMenus", false);
+ d->autoHideAccelerators = settings.readBoolEntry("/TDEStyle/Settings/AutoHideAccelerators", false);
+ d->menuDropShadow = settings.readBoolEntry("/TDEStyle/Settings/MenuDropShadow", false);
+ d->semiTransparentRubberband = settings.readBoolEntry("/TDEStyle/Settings/SemiTransparentRubberband", false);
d->menuHandler = NULL;
if (useMenuTransparency) {
- TQString effectEngine = settings.readEntry("/KStyle/Settings/MenuTransparencyEngine", "Disabled");
+ TQString effectEngine = settings.readEntry("/TDEStyle/Settings/MenuTransparencyEngine", "Disabled");
#ifdef HAVE_XRENDER
if (effectEngine == "XRender")
@@ -226,7 +226,7 @@ KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
if (d->transparencyEngine != Disabled) {
// Create an instance of the menu transparency handler
- d->menuOpacity = settings.readDoubleEntry("/KStyle/Settings/MenuOpacity", 0.90);
+ d->menuOpacity = settings.readDoubleEntry("/TDEStyle/Settings/MenuOpacity", 0.90);
d->menuHandler = new TransparencyHandler(this, d->transparencyEngine,
d->menuOpacity, d->menuDropShadow);
}
@@ -241,7 +241,7 @@ KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
}
-KStyle::~KStyle()
+TDEStyle::~TDEStyle()
{
delete d->verticalLine;
delete d->horizontalLine;
@@ -253,7 +253,7 @@ KStyle::~KStyle()
}
-TQString KStyle::defaultStyle()
+TQString TDEStyle::defaultStyle()
{
if (TQPixmap::defaultDepth() > 8)
return TQString("plastik");
@@ -261,7 +261,7 @@ TQString KStyle::defaultStyle()
return TQString("light, 3rd revision");
}
-void KStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
+void TDEStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget* widget = reinterpret_cast<TQWidget*>(ptr);
@@ -285,7 +285,7 @@ void KStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlag
}
-void KStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
+void TDEStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget* widget = reinterpret_cast<TQWidget*>(ptr);
@@ -304,7 +304,7 @@ void KStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFl
// Style changes (should) always re-polish popups.
-void KStyle::polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
+void TDEStyle::polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
if ( !(ceData.windowState & WState_Polished ) ) {
widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable);
@@ -324,26 +324,26 @@ void KStyle::polishPopupMenu( const TQStyleControlElementData &ceData, ControlEl
// -----------------------------------------------------------------------------
-// KStyle extensions
+// TDEStyle extensions
// -----------------------------------------------------------------------------
-void KStyle::setScrollBarType(KStyleScrollBarType sbtype)
+void TDEStyle::setScrollBarType(TDEStyleScrollBarType sbtype)
{
d->scrollbarType = sbtype;
}
-KStyle::KStyleFlags KStyle::styleFlags() const
+TDEStyle::TDEStyleFlags TDEStyle::styleFlags() const
{
return d->flags;
}
-void KStyle::renderMenuBlendPixmap( KPixmap &pix, const TQColorGroup &cg,
+void TDEStyle::renderMenuBlendPixmap( KPixmap &pix, const TQColorGroup &cg,
const TQPopupMenu* /* popup */ ) const
{
pix.fill(cg.button()); // Just tint as the default behavior
}
-void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
+void TDEStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
TQPainter* p,
const TQWidget* widget,
const TQRect &r,
@@ -352,10 +352,10 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
const TQStyleOption &opt ) const
{
TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption());
- drawKStylePrimitive(kpe, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, cg, flags, opt);
+ drawTDEStylePrimitive(kpe, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, cg, flags, opt);
}
-void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
+void TDEStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -543,7 +543,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
}
-int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const
+int TDEStyle::kPixelMetric( TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const
{
int value;
switch(kpm)
@@ -571,7 +571,7 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData
// #ifdef USE_QT4 // tdebindings / smoke needs this function declaration available at all times. Furthermore I don't think it would hurt to have the declaration available at all times...so leave these commented out for now
-//void KStyle::drawPrimitive( TQ_ControlElement pe,
+//void TDEStyle::drawPrimitive( TQ_ControlElement pe,
// TQPainter* p,
// const TQStyleControlElementData &ceData,
// ControlElementFlags elementFlags,
@@ -591,7 +591,7 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData
// -----------------------------------------------------------------------------
-void KStyle::drawPrimitive( TQ_PrimitiveElement pe,
+void TDEStyle::drawPrimitive( TQ_PrimitiveElement pe,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -619,16 +619,16 @@ void KStyle::drawPrimitive( TQ_PrimitiveElement pe,
(parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock
// Draw a toolbar handle
- drawKStylePrimitive( KPE_ToolBarHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
+ drawTDEStylePrimitive( KPE_ToolBarHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
else if (ceData.widgetObjectTypes.contains(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING))
// Draw a dock window handle
- drawKStylePrimitive( KPE_DockWindowHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
+ drawTDEStylePrimitive( KPE_DockWindowHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
else
// General handle, probably a kicker applet handle.
- drawKStylePrimitive( KPE_GeneralHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
+ drawTDEStylePrimitive( KPE_GeneralHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
#if TQT_VERSION >= 0x030300
#ifdef HAVE_XRENDER
} else if ( d->semiTransparentRubberband && pe == TQStyle::PE_RubberBand ) {
@@ -686,7 +686,7 @@ void KStyle::drawPrimitive( TQ_PrimitiveElement pe,
-void KStyle::drawControl( TQ_ControlElement element,
+void TDEStyle::drawControl( TQ_ControlElement element,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -988,7 +988,7 @@ void KStyle::drawControl( TQ_ControlElement element,
}
-TQRect KStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget* widget) const
+TQRect TDEStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget* widget) const
{
switch(r)
{
@@ -1010,7 +1010,7 @@ TQRect KStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, const
}
-int KStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* widget) const
+int TDEStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* widget) const
{
switch(m)
{
@@ -1132,7 +1132,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
return sibling;
}
-void KStyle::drawComplexControl( TQ_ComplexControl control,
+void TDEStyle::drawComplexControl( TQ_ComplexControl control,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -1248,7 +1248,7 @@ void KStyle::drawComplexControl( TQ_ComplexControl control,
// Draw slider groove
if ((controls & SC_SliderGroove) && groove.isValid()) {
- drawKStylePrimitive( KPE_SliderGroove, &p2, ceData, elementFlags, groove, cg, flags, opt, widget );
+ drawTDEStylePrimitive( KPE_SliderGroove, &p2, ceData, elementFlags, groove, cg, flags, opt, widget );
// Draw the focus rect around the groove
if (elementFlags & CEF_HasFocus) {
@@ -1265,7 +1265,7 @@ void KStyle::drawComplexControl( TQ_ComplexControl control,
if ((controls & SC_SliderHandle) && handle.isValid()) {
if (active == SC_SliderHandle)
flags |= Style_Active;
- drawKStylePrimitive( KPE_SliderHandle, &p2, ceData, elementFlags, handle, cg, flags, opt, widget );
+ drawTDEStylePrimitive( KPE_SliderHandle, &p2, ceData, elementFlags, handle, cg, flags, opt, widget );
}
p2.end();
@@ -1352,8 +1352,8 @@ void KStyle::drawComplexControl( TQ_ComplexControl control,
boxrect = TQRect( bx-4, linebot-4, 9, 9 );
boxflags = child->isOpen() ? TQStyle::Style_Off : TQStyle::Style_On;
- // KStyle extension: Draw the box and expand/collapse indicator
- drawKStylePrimitive( KPE_ListViewExpander, p, ceData, elementFlags, boxrect, cg, boxflags, opt, NULL );
+ // TDEStyle extension: Draw the box and expand/collapse indicator
+ drawTDEStylePrimitive( KPE_ListViewExpander, p, ceData, elementFlags, boxrect, cg, boxflags, opt, NULL );
// dotlinery
p->setPen( cg.mid() );
@@ -1406,8 +1406,8 @@ void KStyle::drawComplexControl( TQ_ComplexControl control,
branchrect = TQRect( point, other-(thickness/2), end-point, thickness );
branchflags = TQStyle::Style_Horizontal;
- // KStyle extension: Draw the horizontal branch
- drawKStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL );
+ // TDEStyle extension: Draw the horizontal branch
+ drawTDEStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL );
} else {
// Vertical branch
@@ -1422,8 +1422,8 @@ void KStyle::drawComplexControl( TQ_ComplexControl control,
else
branchflags = TQStyle::Style_Default;
- // KStyle extension: Draw the vertical branch
- drawKStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL );
+ // TDEStyle extension: Draw the vertical branch
+ drawTDEStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL );
}
}
}
@@ -1438,7 +1438,7 @@ void KStyle::drawComplexControl( TQ_ComplexControl control,
}
-TQStyle::SubControl KStyle::querySubControl( TQ_ComplexControl control,
+TQStyle::SubControl TDEStyle::querySubControl( TQ_ComplexControl control,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQPoint &pos,
@@ -1456,7 +1456,7 @@ TQStyle::SubControl KStyle::querySubControl( TQ_ComplexControl control,
}
-TQRect KStyle::querySubControlMetrics( TQ_ComplexControl control,
+TQRect TDEStyle::querySubControlMetrics( TQ_ComplexControl control,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
SubControl sc,
@@ -1842,7 +1842,7 @@ static const char* const critical_xpm[]={
"...........aaaaaaaaaaa..........",
".............aaaaaaa............"};
-TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap,
+TQPixmap TDEStyle::stylePixmap( StylePixmap stylepixmap,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQStyleOption& opt,
@@ -1876,7 +1876,7 @@ TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap,
}
-int KStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
+int TDEStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQStyleOption &opt, TQStyleHintReturn* shr, const TQWidget* w) const
{
switch (sh)
@@ -1935,7 +1935,7 @@ int KStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceData,
}
-bool KStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
+bool TDEStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
TQObject* object = reinterpret_cast<TQObject*>(source);
@@ -1990,10 +1990,10 @@ bool KStyle::objectEventHandler( const TQStyleControlElementData &ceData, Contro
// -----------------------------------------------------------------------------
-// I N T E R N A L - KStyle menu transparency handler
+// I N T E R N A L - TDEStyle menu transparency handler
// -----------------------------------------------------------------------------
-TransparencyHandler::TransparencyHandler( KStyle* style,
+TransparencyHandler::TransparencyHandler( TDEStyle* style,
TransparencyEngine tEngine, float menuOpacity, bool useDropShadow )
: TQObject()
{
@@ -2401,7 +2401,7 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p)
}
#endif
-void KStyle::virtual_hook( int, void* )
+void TDEStyle::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
// HACK for gtk-qt-engine
@@ -2409,7 +2409,7 @@ void KStyle::virtual_hook( int, void* )
extern "C" KDE_EXPORT
void kde_kstyle_set_scrollbar_type_windows( void* style )
{
- ((KStyle*)style)->setScrollBarType( KStyle::WindowsStyleScrollBar );
+ ((TDEStyle*)style)->setScrollBarType( TDEStyle::WindowsStyleScrollBar );
}
// vim: set noet ts=4 sw=4:
diff --git a/tdefx/kstyle.h b/tdefx/kstyle.h
index c8a704381..9c3867bb3 100644
--- a/tdefx/kstyle.h
+++ b/tdefx/kstyle.h
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * KStyle
+ * TDEStyle
* Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
*
* TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
@@ -38,11 +38,11 @@
class KPixmap;
-struct KStylePrivate;
+struct TDEStylePrivate;
/**
* Simplifies and extends the TQStyle API to make style coding easier.
*
- * The KStyle class provides a simple internal menu transparency engine
+ * The TDEStyle class provides a simple internal menu transparency engine
* which attempts to use XRender for accelerated blending where requested,
* or falls back to fast internal software tinting/blending routines.
* It also simplifies more complex portions of the TQStyle API, such as
@@ -54,7 +54,7 @@ struct KStylePrivate;
* @author Karol Szwed (gallium@kde.org)
* @version $Id$
*/
-class TDEFX_EXPORT KStyle: public TQCommonStyle
+class TDEFX_EXPORT TDEStyle: public TQCommonStyle
{
Q_OBJECT
@@ -62,12 +62,12 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
public:
/**
- * KStyle Flags:
+ * TDEStyle Flags:
*
* @li Default - Default style setting, where menu transparency
* and the FilledFrameWorkaround are disabled.
*
- * @li AllowMenuTransparency - Enable this flag to use KStyle's
+ * @li AllowMenuTransparency - Enable this flag to use TDEStyle's
* internal menu transparency engine.
*
* @li FilledFrameWorkaround - Enable this flag to facilitate
@@ -77,15 +77,15 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
* this workaround to enable painting of gradients in menubars and
* toolbars.
*/
- typedef uint KStyleFlags;
- enum KStyleOption {
+ typedef uint TDEStyleFlags;
+ enum TDEStyleOption {
Default = 0x00000000, //!< All options disabled
AllowMenuTransparency = 0x00000001, //!< Internal transparency enabled
FilledFrameWorkaround = 0x00000002 //!< Filled frames enabled
};
/**
- * KStyle ScrollBarType:
+ * TDEStyle ScrollBarType:
*
* Allows the style writer to easily select what type of scrollbar
* should be used without having to duplicate large amounts of source
@@ -105,9 +105,9 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
* @li NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but
* with the buttons grouped on the opposite end of the scrollbar.
*
- * @see KStyle::KStyle()
+ * @see TDEStyle::TDEStyle()
*/
- enum KStyleScrollBarType {
+ enum TDEStyleScrollBarType {
WindowsStyleScrollBar = 0x00000000, //!< two button, windows style
PlatinumStyleScrollBar = 0x00000001, //!< two button, platinum style
ThreeButtonScrollBar = 0x00000002, //!< three buttons, %KDE style
@@ -115,31 +115,31 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
};
/**
- * Constructs a KStyle object.
+ * Constructs a TDEStyle object.
*
- * Select the appropriate KStyle flags and scrollbar type
+ * Select the appropriate TDEStyle flags and scrollbar type
* for your style. The user's style preferences selected in KControl
* are read by using TQSettings and are automatically applied to the style.
- * As a fallback, KStyle paints progressbars and tabbars. It inherits from
+ * As a fallback, TDEStyle paints progressbars and tabbars. It inherits from
* TQCommonStyle for speed, so don't expect much to be implemented.
*
* It is advisable to use a currently implemented style such as the HighColor
- * style as a foundation for any new KStyle, so the limited number of
+ * style as a foundation for any new TDEStyle, so the limited number of
* drawing fallbacks should not prove problematic.
*
* @param flags the style to be applied
* @param sbtype the scroll bar type
- * @see KStyle::KStyleFlags
- * @see KStyle::KStyleScrollBarType
+ * @see TDEStyle::TDEStyleFlags
+ * @see TDEStyle::TDEStyleScrollBarType
* @author Karol Szwed (gallium@kde.org)
*/
- KStyle( KStyleFlags flags = KStyle::Default,
- KStyleScrollBarType sbtype = KStyle::WindowsStyleScrollBar );
+ TDEStyle( TDEStyleFlags flags = TDEStyle::Default,
+ TDEStyleScrollBarType sbtype = TDEStyle::WindowsStyleScrollBar );
/**
- * Destructs the KStyle object.
+ * Destructs the TDEStyle object.
*/
- ~KStyle();
+ ~TDEStyle();
/**
* Returns the default widget style depending on color depth.
@@ -152,19 +152,19 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
* This function is only provided for convenience. It allows
* you to make a late decision about what scrollbar type to use for the
* style after performing some processing in your style's constructor.
- * In most situations however, setting the scrollbar type via the KStyle
+ * In most situations however, setting the scrollbar type via the TDEStyle
* constructor should suffice.
* @param sbtype the scroll bar type
- * @see KStyle::KStyleScrollBarType
+ * @see TDEStyle::TDEStyleScrollBarType
*/
- void setScrollBarType(KStyleScrollBarType sbtype);
+ void setScrollBarType(TDEStyleScrollBarType sbtype);
/**
- * Returns the KStyle flags used to initialize the style.
+ * Returns the TDEStyle flags used to initialize the style.
*
* This is used solely for the kcmstyle module, and hence is internal.
*/
- KStyleFlags styleFlags() const;
+ TDEStyleFlags styleFlags() const;
// ---------------------------------------------------------------------------
@@ -173,7 +173,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
* menu and the background to create different menu transparency effects.
* For example, you can fill the pixmap "pix" with a gradient based on the
* popup's colorGroup, a texture, or some other fancy painting routine.
- * KStyle will then internally blend this pixmap with a snapshot of the
+ * TDEStyle will then internally blend this pixmap with a snapshot of the
* background behind the popupMenu to create the illusion of transparency.
*
* This virtual is never called if XRender/Software blending is disabled by
@@ -183,20 +183,20 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
const TQPopupMenu* popup ) const;
/**
- * KStyle Primitive Elements:
+ * TDEStyle Primitive Elements:
*
- * The KStyle class extends the Qt's Style API by providing certain
- * simplifications for parts of TQStyle. To do this, the KStylePrimitive
+ * The TDEStyle class extends the Qt's Style API by providing certain
+ * simplifications for parts of TQStyle. To do this, the TDEStylePrimitive
* elements were defined, which are very similar to Qt's PrimitiveElement.
*
* The first three Handle primitives simplify and extend PE_DockWindowHandle,
- * so do not reimplement PE_DockWindowHandle if you want the KStyle handle
+ * so do not reimplement PE_DockWindowHandle if you want the TDEStyle handle
* simplifications to be operable. Similarly do not reimplement CC_Slider,
- * SC_SliderGroove and SC_SliderHandle when using the KStyle slider
- * primitives. KStyle automatically double-buffers slider painting
- * when they are drawn via these KStyle primitives to avoid flicker.
+ * SC_SliderGroove and SC_SliderHandle when using the TDEStyle slider
+ * primitives. TDEStyle automatically double-buffers slider painting
+ * when they are drawn via these TDEStyle primitives to avoid flicker.
*
- * @li KPE_DockWindowHandle - This primitive is already implemented in KStyle,
+ * @li KPE_DockWindowHandle - This primitive is already implemented in TDEStyle,
* and paints a bevelled rect with the DockWindow caption text. Re-implement
* this primitive to perform other more fancy effects when drawing the dock window
* handle.
@@ -218,14 +218,14 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
* paint the slider handle. The default implementation paints a filled rect of
* arbitrary color.
*
- * @li KPE_ListViewExpander - This primitive is already implemented in KStyle. It
+ * @li KPE_ListViewExpander - This primitive is already implemented in TDEStyle. It
* is used to draw the Expand/Collapse element in QListViews. To indicate the
* expanded state, the style flags are set to Style_Off, while Style_On implies collapsed.
*
- * @li KPE_ListViewBranch - This primitive is already implemented in KStyle. It is
+ * @li KPE_ListViewBranch - This primitive is already implemented in TDEStyle. It is
* used to draw the ListView branches where necessary.
*/
- enum KStylePrimitive {
+ enum TDEStylePrimitive {
KPE_DockWindowHandle,
KPE_ToolBarHandle,
KPE_GeneralHandle,
@@ -239,7 +239,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
// Old API
// DEPRECATED
- virtual void drawKStylePrimitive( KStylePrimitive kpe,
+ virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe,
TQPainter* p,
const TQWidget* widget,
const TQRect &r,
@@ -250,13 +250,13 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
/**
* This function is identical to Qt's TQStyle::tqdrawPrimitive(), except that
* it adds one further parameter, 'widget', that can be used to determine
- * the widget state of the KStylePrimitive in question.
+ * the widget state of the TDEStylePrimitive in question.
*
- * @see KStyle::KStylePrimitive
+ * @see TDEStyle::TDEStylePrimitive
* @see TQStyle::tqdrawPrimitive
* @see TQStyle::drawComplexControl
*/
- virtual void drawKStylePrimitive( KStylePrimitive kpe,
+ virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe,
TQPainter* p,
const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
@@ -267,7 +267,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
const TQWidget* widget = 0 ) const;
- enum KStylePixelMetric {
+ enum TDEStylePixelMetric {
KPM_MenuItemSeparatorHeight = 0x00000001,
KPM_MenuItemHMargin = 0x00000002,
KPM_MenuItemVMargin = 0x00000004,
@@ -279,7 +279,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
KPM_ListViewBranchThickness = 0x00000100
};
- int kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const;
+ int kPixelMetric( TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const;
// ---------------------------------------------------------------------------
@@ -368,13 +368,13 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle
private:
// Disable copy constructor and = operator
- KStyle( const KStyle & );
- KStyle& operator=( const KStyle & );
+ TDEStyle( const TDEStyle & );
+ TDEStyle& operator=( const TDEStyle & );
protected:
virtual void virtual_hook( int id, void* data );
private:
- KStylePrivate *d;
+ TDEStylePrivate *d;
};