Rename KStyle to TDEStyle to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent f7ed00bca5
commit b063e7d3b4

@ -109,7 +109,7 @@
14. Use split gradient for dock-widget titlebars. 14. Use split gradient for dock-widget titlebars.
15. Reduce number of supplied presets. 15. Reduce number of supplied presets.
16. Allow to compile style against just Qt3 - tarball includes a simplified copy 16. Allow to compile style against just Qt3 - tarball includes a simplified copy
of KStyle. Need to pass -DQTC_QT_ONLY=true to cmake. NOTE: May also need to set QTDIR of TDEStyle. Need to pass -DQTC_QT_ONLY=true to cmake. NOTE: May also need to set QTDIR
*before* calling cmake. *before* calling cmake.
17. If KDE3 development files not found, then automatically set -DQTC_QT_ONLY=true 17. If KDE3 development files not found, then automatically set -DQTC_QT_ONLY=true
@ -875,7 +875,7 @@
1. Restore pre 0.45 inactive window highlight. Option is 1. Restore pre 0.45 inactive window highlight. Option is
still there to re-activate. still there to re-activate.
2. Fix dark text appearing on progressbars. 2. Fix dark text appearing on progressbars.
3. Use KStyle to draw status bar elements - if enabled. 3. Use TDEStyle to draw status bar elements - if enabled.
0.45 0.45
---- ----
@ -1476,7 +1476,7 @@
3: ALL: V3 - Lighter background for disabled check/radios. 3: ALL: V3 - Lighter background for disabled check/radios.
4: ALL: V3 - Correct AA colour for radio indicator. 4: ALL: V3 - Correct AA colour for radio indicator.
5: KDE: Draw triangular tabs the same as rounded - prevous versions defaulted to 5: KDE: Draw triangular tabs the same as rounded - prevous versions defaulted to
KStyle. TDEStyle.
6: KDE: Add 10pix (2*10) border to non-default buttons. 6: KDE: Add 10pix (2*10) border to non-default buttons.
7: KDE: Implement masks for checks and radios - helps with tdehtml. 7: KDE: Implement masks for checks and radios - helps with tdehtml.

@ -1,6 +1,6 @@
/* /*
* *
* TQtCKStyle * TQtCTDEStyle
* Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org> * Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
* *
* TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech, * TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
@ -56,7 +56,7 @@
#include <limits.h> #include <limits.h>
struct TQtCKStylePrivate struct TQtCTDEStylePrivate
{ {
bool highcolor : 1; bool highcolor : 1;
bool useFilledFrameWorkaround : 1; bool useFilledFrameWorkaround : 1;
@ -68,8 +68,8 @@ struct TQtCKStylePrivate
int popupMenuDelay; int popupMenuDelay;
float menuOpacity; float menuOpacity;
TQtCKStyle::KStyleScrollBarType scrollbarType; TQtCTDEStyle::TDEStyleScrollBarType scrollbarType;
TQtCKStyle::KStyleFlags flags; TQtCTDEStyle::TDEStyleFlags flags;
//For KPE_ListViewBranch //For KPE_ListViewBranch
TQBitmap *verticalLine; TQBitmap *verticalLine;
@ -79,8 +79,8 @@ struct TQtCKStylePrivate
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
TQtCKStyle::TQtCKStyle( KStyleFlags flags, KStyleScrollBarType sbtype ) TQtCTDEStyle::TQtCTDEStyle( TDEStyleFlags flags, TDEStyleScrollBarType sbtype )
: TQCommonStyle(), d(new TQtCKStylePrivate) : TQCommonStyle(), d(new TQtCTDEStylePrivate)
{ {
d->flags = flags; d->flags = flags;
d->useFilledFrameWorkaround = (flags & FilledFrameWorkaround); d->useFilledFrameWorkaround = (flags & FilledFrameWorkaround);
@ -89,19 +89,19 @@ TQtCKStyle::TQtCKStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
// Read style settings // Read style settings
TQSettings settings; TQSettings settings;
d->popupMenuDelay = settings.readNumEntry ("/TQtCKStyle/Settings/PopupMenuDelay", 256); d->popupMenuDelay = settings.readNumEntry ("/TQtCTDEStyle/Settings/PopupMenuDelay", 256);
d->sloppySubMenus = settings.readBoolEntry("/TQtCKStyle/Settings/SloppySubMenus", false); d->sloppySubMenus = settings.readBoolEntry("/TQtCTDEStyle/Settings/SloppySubMenus", false);
d->etchDisabledText = settings.readBoolEntry("/TQtCKStyle/Settings/EtchDisabledText", true); d->etchDisabledText = settings.readBoolEntry("/TQtCTDEStyle/Settings/EtchDisabledText", true);
d->menuAltKeyNavigation = settings.readBoolEntry("/TQtCKStyle/Settings/MenuAltKeyNavigation", true); d->menuAltKeyNavigation = settings.readBoolEntry("/TQtCTDEStyle/Settings/MenuAltKeyNavigation", true);
d->scrollablePopupmenus = settings.readBoolEntry("/TQtCKStyle/Settings/ScrollablePopupMenus", false); d->scrollablePopupmenus = settings.readBoolEntry("/TQtCTDEStyle/Settings/ScrollablePopupMenus", false);
d->menuDropShadow = settings.readBoolEntry("/TQtCKStyle/Settings/MenuDropShadow", false); d->menuDropShadow = settings.readBoolEntry("/TQtCTDEStyle/Settings/MenuDropShadow", false);
d->verticalLine = 0; d->verticalLine = 0;
d->horizontalLine = 0; d->horizontalLine = 0;
} }
TQtCKStyle::~TQtCKStyle() TQtCTDEStyle::~TQtCTDEStyle()
{ {
delete d->verticalLine; delete d->verticalLine;
delete d->horizontalLine; delete d->horizontalLine;
@ -110,7 +110,7 @@ TQtCKStyle::~TQtCKStyle()
} }
TQString TQtCKStyle::defaultStyle() TQString TQtCTDEStyle::defaultStyle()
{ {
if (TQPixmap::defaultDepth() > 8) if (TQPixmap::defaultDepth() > 8)
return TQString("plastik"); return TQString("plastik");
@ -119,7 +119,7 @@ TQString TQtCKStyle::defaultStyle()
} }
void TQtCKStyle::polish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) void TQtCTDEStyle::polish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr )
{ {
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -136,7 +136,7 @@ void TQtCKStyle::polish( TQStyleControlElementData ceData, ControlElementFlags e
} }
void TQtCKStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) void TQtCTDEStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr )
{ {
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -154,7 +154,7 @@ void TQtCKStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags
// Style changes (should) always re-polish popups. // Style changes (should) always re-polish popups.
void TQtCKStyle::polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) void TQtCTDEStyle::polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr )
{ {
if ( !(ceData.windowState & WState_Polished ) ) { if ( !(ceData.windowState & WState_Polished ) ) {
widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable); widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable);
@ -163,20 +163,20 @@ void TQtCKStyle::polishPopupMenu( TQStyleControlElementData ceData, ControlEleme
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// TQtCKStyle extensions // TQtCTDEStyle extensions
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void TQtCKStyle::setScrollBarType(KStyleScrollBarType sbtype) void TQtCTDEStyle::setScrollBarType(TDEStyleScrollBarType sbtype)
{ {
d->scrollbarType = sbtype; d->scrollbarType = sbtype;
} }
TQtCKStyle::KStyleFlags TQtCKStyle::styleFlags() const TQtCTDEStyle::TDEStyleFlags TQtCTDEStyle::styleFlags() const
{ {
return d->flags; return d->flags;
} }
void TQtCKStyle::drawKStylePrimitive( KStylePrimitive kpe, void TQtCTDEStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
TQPainter* p, TQPainter* p,
TQStyleControlElementData ceData, TQStyleControlElementData ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
@ -364,7 +364,7 @@ void TQtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
} }
int TQtCKStyle::kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const int TQtCTDEStyle::kPixelMetric( TDEStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const
{ {
int value; int value;
switch(kpm) switch(kpm)
@ -391,7 +391,7 @@ int TQtCKStyle::kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData c
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void TQtCKStyle::drawPrimitive( PrimitiveElement pe, void TQtCTDEStyle::drawPrimitive( PrimitiveElement pe,
TQPainter* p, TQPainter* p,
TQStyleControlElementData ceData, TQStyleControlElementData ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
@ -419,16 +419,16 @@ void TQtCKStyle::drawPrimitive( PrimitiveElement pe,
(parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock (parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock
// Draw a toolbar handle // 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 ( widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) else if ( widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
// Draw a dock window handle // 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 else
// General handle, probably a kicker applet handle. // 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 );
} else } else
TQCommonStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt ); TQCommonStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt );
@ -436,7 +436,7 @@ void TQtCKStyle::drawPrimitive( PrimitiveElement pe,
void TQtCKStyle::drawControl( ControlElement element, void TQtCTDEStyle::drawControl( ControlElement element,
TQPainter* p, TQPainter* p,
TQStyleControlElementData ceData, TQStyleControlElementData ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
@ -741,7 +741,7 @@ void TQtCKStyle::drawControl( ControlElement element,
} }
TQRect TQtCKStyle::subRect(SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget* widget) const TQRect TQtCTDEStyle::subRect(SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget* widget) const
{ {
switch(r) switch(r)
{ {
@ -763,7 +763,7 @@ TQRect TQtCKStyle::subRect(SubRect r, const TQStyleControlElementData ceData, co
} }
int TQtCKStyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* widget) const int TQtCTDEStyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* widget) const
{ {
switch(m) switch(m)
{ {
@ -888,7 +888,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
return sibling; return sibling;
} }
void TQtCKStyle::drawComplexControl( ComplexControl control, void TQtCTDEStyle::drawComplexControl( ComplexControl control,
TQPainter* p, TQPainter* p,
TQStyleControlElementData ceData, TQStyleControlElementData ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
@ -1004,7 +1004,7 @@ void TQtCKStyle::drawComplexControl( ComplexControl control,
// Draw slider groove // Draw slider groove
if ((controls & SC_SliderGroove) && groove.isValid()) { 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 // Draw the focus rect around the groove
if (slider->hasFocus()) if (slider->hasFocus())
@ -1020,7 +1020,7 @@ void TQtCKStyle::drawComplexControl( ComplexControl control,
if ((controls & SC_SliderHandle) && handle.isValid()) { if ((controls & SC_SliderHandle) && handle.isValid()) {
if (active == SC_SliderHandle) if (active == SC_SliderHandle)
flags |= Style_Active; 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(); p2.end();
@ -1100,8 +1100,8 @@ void TQtCKStyle::drawComplexControl( ComplexControl control,
boxrect = TQRect( bx-4, linebot-4, 9, 9 ); boxrect = TQRect( bx-4, linebot-4, 9, 9 );
boxflags = child->isOpen() ? TQStyle::Style_Off : TQStyle::Style_On; boxflags = child->isOpen() ? TQStyle::Style_Off : TQStyle::Style_On;
// TQtCKStyle extension: Draw the box and expand/collapse indicator // TQtCTDEStyle extension: Draw the box and expand/collapse indicator
drawKStylePrimitive( KPE_ListViewExpander, p, ceData, elementFlags, boxrect, cg, boxflags, opt, NULL ); drawTDEStylePrimitive( KPE_ListViewExpander, p, ceData, elementFlags, boxrect, cg, boxflags, opt, NULL );
// dotlinery // dotlinery
p->setPen( cg.mid() ); p->setPen( cg.mid() );
@ -1154,8 +1154,8 @@ void TQtCKStyle::drawComplexControl( ComplexControl control,
branchrect = TQRect( point, other-(thickness/2), end-point, thickness ); branchrect = TQRect( point, other-(thickness/2), end-point, thickness );
branchflags = TQStyle::Style_Horizontal; branchflags = TQStyle::Style_Horizontal;
// TQtCKStyle extension: Draw the horizontal branch // TQtCTDEStyle extension: Draw the horizontal branch
drawKStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); drawTDEStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL );
} else { } else {
// Vertical branch // Vertical branch
@ -1170,8 +1170,8 @@ void TQtCKStyle::drawComplexControl( ComplexControl control,
else else
branchflags = TQStyle::Style_Default; branchflags = TQStyle::Style_Default;
// TQtCKStyle extension: Draw the vertical branch // TQtCTDEStyle extension: Draw the vertical branch
drawKStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); drawTDEStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL );
} }
} }
} }
@ -1186,7 +1186,7 @@ void TQtCKStyle::drawComplexControl( ComplexControl control,
} }
TQStyle::SubControl TQtCKStyle::querySubControl( ComplexControl control, TQStyle::SubControl TQtCTDEStyle::querySubControl( ComplexControl control,
TQStyleControlElementData ceData, TQStyleControlElementData ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
const TQPoint &pos, const TQPoint &pos,
@ -1204,7 +1204,7 @@ TQStyle::SubControl TQtCKStyle::querySubControl( ComplexControl control,
} }
TQRect TQtCKStyle::querySubControlMetrics( ComplexControl control, TQRect TQtCTDEStyle::querySubControlMetrics( ComplexControl control,
TQStyleControlElementData ceData, TQStyleControlElementData ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
SubControl sc, SubControl sc,
@ -1591,7 +1591,7 @@ static const char* const critical_xpm[]={
"...........aaaaaaaaaaa..........", "...........aaaaaaaaaaa..........",
".............aaaaaaa............"}; ".............aaaaaaa............"};
TQPixmap TQtCKStyle::stylePixmap( StylePixmap stylepixmap, TQPixmap TQtCTDEStyle::stylePixmap( StylePixmap stylepixmap,
TQStyleControlElementData ceData, TQStyleControlElementData ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
const TQStyleOption& opt, const TQStyleOption& opt,
@ -1625,7 +1625,7 @@ TQPixmap TQtCKStyle::stylePixmap( StylePixmap stylepixmap,
} }
int TQtCKStyle::styleHint( StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags, int TQtCTDEStyle::styleHint( StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQStyleOption &opt, TQStyleHintReturn* shr, const TQWidget* w) const const TQStyleOption &opt, TQStyleHintReturn* shr, const TQWidget* w) const
{ {
switch (sh) switch (sh)
@ -1680,7 +1680,7 @@ int TQtCKStyle::styleHint( StyleHint sh, TQStyleControlElementData ceData, Contr
} }
} }
bool TQtCKStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) bool TQtCTDEStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{ {
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
TQObject* object = reinterpret_cast<TQObject*>(source); TQObject* object = reinterpret_cast<TQObject*>(source);
@ -1734,7 +1734,7 @@ bool TQtCKStyle::objectEventHandler( TQStyleControlElementData ceData, ControlEl
return false; return false;
} }
void TQtCKStyle::virtual_hook( int, void* ) void TQtCTDEStyle::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ } { /*BASE::virtual_hook( id, data );*/ }
// vim: set noet ts=4 sw=4: // vim: set noet ts=4 sw=4:

@ -1,7 +1,7 @@
/* /*
* $Id$ * $Id$
* *
* KStyle * TDEStyle
* Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org> * Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
* *
* TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech, * TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
@ -34,11 +34,11 @@
#include <tqcommonstyle.h> #include <tqcommonstyle.h>
struct TQtCKStylePrivate; struct TQtCTDEStylePrivate;
/** /**
* Simplifies and extends the TQStyle API to make style coding easier. * 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, * which attempts to use XRender for accelerated blending where requested,
* or falls back to fast internal software tinting/blending routines. * or falls back to fast internal software tinting/blending routines.
* It also simplifies more complex portions of the TQStyle API, such as * It also simplifies more complex portions of the TQStyle API, such as
@ -50,7 +50,7 @@ struct TQtCKStylePrivate;
* @author Karol Szwed (gallium@kde.org) * @author Karol Szwed (gallium@kde.org)
* @version $Id$ * @version $Id$
*/ */
class TQtCKStyle: public TQCommonStyle class TQtCTDEStyle: public TQCommonStyle
{ {
Q_OBJECT Q_OBJECT
@ -58,12 +58,12 @@ class TQtCKStyle: public TQCommonStyle
public: public:
/** /**
* TQtCKStyle Flags: * TQtCTDEStyle Flags:
* *
* @li Default - Default style setting, where menu transparency * @li Default - Default style setting, where menu transparency
* and the FilledFrameWorkaround are disabled. * and the FilledFrameWorkaround are disabled.
* *
* @li AllowMenuTransparency - Enable this flag to use TQtCKStyle's * @li AllowMenuTransparency - Enable this flag to use TQtCTDEStyle's
* internal menu transparency engine. * internal menu transparency engine.
* *
* @li FilledFrameWorkaround - Enable this flag to facilitate * @li FilledFrameWorkaround - Enable this flag to facilitate
@ -73,15 +73,15 @@ class TQtCKStyle: public TQCommonStyle
* this workaround to enable painting of gradients in menubars and * this workaround to enable painting of gradients in menubars and
* toolbars. * toolbars.
*/ */
typedef uint KStyleFlags; typedef uint TDEStyleFlags;
enum KStyleOption { enum TDEStyleOption {
Default = 0x00000000, //!< All options disabled Default = 0x00000000, //!< All options disabled
AllowMenuTransparency = 0x00000001, //!< Internal transparency enabled AllowMenuTransparency = 0x00000001, //!< Internal transparency enabled
FilledFrameWorkaround = 0x00000002 //!< Filled frames enabled FilledFrameWorkaround = 0x00000002 //!< Filled frames enabled
}; };
/** /**
* KStyle ScrollBarType: * TDEStyle ScrollBarType:
* *
* Allows the style writer to easily select what type of scrollbar * Allows the style writer to easily select what type of scrollbar
* should be used without having to duplicate large amounts of source * should be used without having to duplicate large amounts of source
@ -101,9 +101,9 @@ class TQtCKStyle: public TQCommonStyle
* @li NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but * @li NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but
* with the buttons grouped on the opposite end of the scrollbar. * 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 WindowsStyleScrollBar = 0x00000000, //!< two button, windows style
PlatinumStyleScrollBar = 0x00000001, //!< two button, platinum style PlatinumStyleScrollBar = 0x00000001, //!< two button, platinum style
ThreeButtonScrollBar = 0x00000002, //!< three buttons, %KDE style ThreeButtonScrollBar = 0x00000002, //!< three buttons, %KDE style
@ -111,31 +111,31 @@ class TQtCKStyle: 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 * for your style. The user's style preferences selected in KControl
* are read by using TQSettings and are automatically applied to the style. * 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. * TQCommonStyle for speed, so don't expect much to be implemented.
* *
* It is advisable to use a currently implemented style such as the HighColor * 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. * drawing fallbacks should not prove problematic.
* *
* @param flags the style to be applied * @param flags the style to be applied
* @param sbtype the scroll bar type * @param sbtype the scroll bar type
* @see KStyle::KStyleFlags * @see TDEStyle::TDEStyleFlags
* @see KStyle::KStyleScrollBarType * @see TDEStyle::TDEStyleScrollBarType
* @author Karol Szwed (gallium@kde.org) * @author Karol Szwed (gallium@kde.org)
*/ */
TQtCKStyle( KStyleFlags flags = TQtCKStyle::Default, TQtCTDEStyle( TDEStyleFlags flags = TQtCTDEStyle::Default,
KStyleScrollBarType sbtype = TQtCKStyle::WindowsStyleScrollBar ); TDEStyleScrollBarType sbtype = TQtCTDEStyle::WindowsStyleScrollBar );
/** /**
* Destructs the TQtCKStyle object. * Destructs the TQtCTDEStyle object.
*/ */
~TQtCKStyle(); ~TQtCTDEStyle();
/** /**
* Returns the default widget style depending on color depth. * Returns the default widget style depending on color depth.
@ -148,35 +148,35 @@ class TQtCKStyle: public TQCommonStyle
* This function is only provided for convenience. It allows * This function is only provided for convenience. It allows
* you to make a late decision about what scrollbar type to use for the * you to make a late decision about what scrollbar type to use for the
* style after performing some processing in your style's constructor. * style after performing some processing in your style's constructor.
* In most situations however, setting the scrollbar type via the TQtCKStyle * In most situations however, setting the scrollbar type via the TQtCTDEStyle
* constructor should suffice. * constructor should suffice.
* @param sbtype the scroll bar type * @param sbtype the scroll bar type
* @see TQtCKStyle::KStyleScrollBarType * @see TQtCTDEStyle::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. * This is used solely for the kcmstyle module, and hence is internal.
*/ */
KStyleFlags styleFlags() const; TDEStyleFlags styleFlags() const;
/** /**
* KStyle Primitive Elements: * TDEStyle Primitive Elements:
* *
* The KStyle class extends the TQt's Style API by providing certain * The TDEStyle class extends the TQt's Style API by providing certain
* simplifications for parts of TQStyle. To do this, the KStylePrimitive * simplifications for parts of TQStyle. To do this, the TDEStylePrimitive
* elements were defined, which are very similar to TQt's PrimitiveElement. * elements were defined, which are very similar to TQt's PrimitiveElement.
* *
* The first three Handle primitives simplify and extend PE_DockWindowHandle, * 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, * simplifications to be operable. Similarly do not reimplement CC_Slider,
* SC_SliderGroove and SC_SliderHandle when using the KStyle slider * SC_SliderGroove and SC_SliderHandle when using the TDEStyle slider
* primitives. KStyle automatically double-buffers slider painting * primitives. TDEStyle automatically double-buffers slider painting
* when they are drawn via these KStyle primitives to avoid flicker. * 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 * 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 * this primitive to perform other more fancy effects when drawing the dock window
* handle. * handle.
@ -198,14 +198,14 @@ class TQtCKStyle: public TQCommonStyle
* paint the slider handle. The default implementation paints a filled rect of * paint the slider handle. The default implementation paints a filled rect of
* arbitrary color. * 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 TQListViews. To indicate the * is used to draw the Expand/Collapse element in TQListViews. To indicate the
* expanded state, the style flags are set to Style_Off, while Style_On implies collapsed. * 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. * used to draw the ListView branches where necessary.
*/ */
enum KStylePrimitive { enum TDEStylePrimitive {
KPE_DockWindowHandle, KPE_DockWindowHandle,
KPE_ToolBarHandle, KPE_ToolBarHandle,
KPE_GeneralHandle, KPE_GeneralHandle,
@ -220,13 +220,13 @@ class TQtCKStyle: public TQCommonStyle
/** /**
* This function is identical to TQt's TQStyle::drawPrimitive(), except that * This function is identical to TQt's TQStyle::drawPrimitive(), except that
* it adds one further parameter, 'widget', that can be used to determine * 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::drawPrimitive * @see TQStyle::drawPrimitive
* @see TQStyle::drawComplexControl * @see TQStyle::drawComplexControl
*/ */
virtual void drawKStylePrimitive( KStylePrimitive kpe, virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe,
TQPainter* p, TQPainter* p,
TQStyleControlElementData ceData, TQStyleControlElementData ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
@ -237,7 +237,7 @@ class TQtCKStyle: public TQCommonStyle
const TQWidget* widget = 0 ) const; const TQWidget* widget = 0 ) const;
enum KStylePixelMetric { enum TDEStylePixelMetric {
KPM_MenuItemSeparatorHeight = 0x00000001, KPM_MenuItemSeparatorHeight = 0x00000001,
KPM_MenuItemHMargin = 0x00000002, KPM_MenuItemHMargin = 0x00000002,
KPM_MenuItemVMargin = 0x00000004, KPM_MenuItemVMargin = 0x00000004,
@ -249,7 +249,7 @@ class TQtCKStyle: public TQCommonStyle
KPM_ListViewBranchThickness = 0x00000100 KPM_ListViewBranchThickness = 0x00000100
}; };
int kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const; int kPixelMetric( TDEStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -324,13 +324,13 @@ class TQtCKStyle: public TQCommonStyle
private: private:
// Disable copy constructor and = operator // Disable copy constructor and = operator
TQtCKStyle( const TQtCKStyle & ); TQtCTDEStyle( const TQtCTDEStyle & );
TQtCKStyle& operator=( const TQtCKStyle & ); TQtCTDEStyle& operator=( const TQtCTDEStyle & );
protected: protected:
virtual void virtual_hook( int id, void* data ); virtual void virtual_hook( int id, void* data );
private: private:
TQtCKStylePrivate *d; TQtCTDEStylePrivate *d;
}; };

@ -4477,7 +4477,7 @@ static TQString elliditide(const TQString &text, const TQFontMetrics &fontMetric
return title; return title;
} }
void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleOption &opt, const TQWidget *widget) const const TQStyleOption &opt, const TQWidget *widget) const
{ {
@ -4630,7 +4630,7 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const
} }
break; break;
default: default:
BASE_STYLE::drawKStylePrimitive(kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); BASE_STYLE::drawTDEStylePrimitive(kpe, p, ceData, elementFlags, r, cg, flags, opt, widget);
} }
} }
@ -5337,7 +5337,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty
if (!cr.isValid()) if (!cr.isValid())
return; return;
if(opts.boldProgress) // This is the only change fro the KStyle code! if(opts.boldProgress) // This is the only change fro the TDEStyle code!
{ {
TQFont font = p->font(); TQFont font = p->font();
font.setBold(true); font.setBold(true);
@ -6322,7 +6322,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
} }
case CC_Slider: case CC_Slider:
// //
// Note: Can't use KStyle's drawing routine, as this doesnt work for sliders on gradient // Note: Can't use TDEStyle's drawing routine, as this doesnt work for sliders on gradient
// toolbars. It also draws groove, focus, slider - wherease QtCurve needs groove, // toolbars. It also draws groove, focus, slider - wherease QtCurve needs groove,
// slider, focus. We also ony double-buffer if not on a toolbar, as we dont know // slider, focus. We also ony double-buffer if not on a toolbar, as we dont know
// the background, etc, if on a toolbar - and that is handled in eventFilter // the background, etc, if on a toolbar - and that is handled in eventFilter
@ -6885,7 +6885,7 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const TQStyleControlElementDat
} }
} }
int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const int QtCurveStyle::kPixelMetric(TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{ {
switch(kpm) switch(kpm)
{ {

@ -69,9 +69,9 @@ class TQTimer;
class TQSlider; class TQSlider;
#ifdef TQTC_TQT_ONLY #ifdef TQTC_TQT_ONLY
#define BASE_STYLE TQtCKStyle #define BASE_STYLE TQtCTDEStyle
#else #else
#define BASE_STYLE KStyle #define BASE_STYLE TDEStyle
#endif #endif
class QtCurveStyle : public BASE_STYLE class QtCurveStyle : public BASE_STYLE
@ -160,7 +160,7 @@ class QtCurveStyle : public BASE_STYLE
TQ_PrimitiveElement pe, bool small=false, bool checkActive=false) const; TQ_PrimitiveElement pe, bool small=false, bool checkActive=false) const;
void drawPrimitive(TQ_PrimitiveElement, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &, void drawPrimitive(TQ_PrimitiveElement, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const;
void drawKStylePrimitive(KStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, void drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt, const TQWidget* widget = 0 ) const; const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt, const TQWidget* widget = 0 ) const;
void drawControl(ControlElement, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &, void drawControl(ControlElement, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const;
@ -175,7 +175,7 @@ class QtCurveStyle : public BASE_STYLE
TQRect querySubControlMetrics(TQ_ComplexControl, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl, TQRect querySubControlMetrics(TQ_ComplexControl, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl,
const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const;
int pixelMetric(PixelMetric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget= 0) const; int pixelMetric(PixelMetric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget= 0) const;
int kPixelMetric(KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const; int kPixelMetric(TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const;
TQSize sizeFromContents(ContentsType, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQSize &, TQSize sizeFromContents(ContentsType, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQSize &,
const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const;
int styleHint(StyleHint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default, int styleHint(StyleHint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default,

Loading…
Cancel
Save