summaryrefslogtreecommitdiffstats
path: root/style/qtc_kstyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'style/qtc_kstyle.h')
-rw-r--r--style/qtc_kstyle.h157
1 files changed, 79 insertions, 78 deletions
diff --git a/style/qtc_kstyle.h b/style/qtc_kstyle.h
index 9c8b059..9cf17b6 100644
--- a/style/qtc_kstyle.h
+++ b/style/qtc_kstyle.h
@@ -4,7 +4,7 @@
* KStyle
* Copyright (C) 2001-2002 Karol Szwed <[email protected]>
*
- * QWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
+ * TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech,
* Copyright (C) 1998-2000 TrollTech AS.
*
* Many thanks to Bradley T. Hughes for the 3 button scrollbar code.
@@ -24,50 +24,51 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __QTC_KSTYLE_H
-#define __QTC_KSTYLE_H
+#ifndef __TQTC_KSTYLE_H
+#define __TQTC_KSTYLE_H
// W A R N I N G
// -------------
// This API is still subject to change.
// I will remove this warning when I feel the API is sufficiently flexible.
-#include <qcommonstyle.h>
+#include <tqcommonstyle.h>
-struct QtCKStylePrivate;
+struct TQtCKStylePrivate;
/**
- * Simplifies and extends the QStyle 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
* 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 QStyle API, such as
+ * It also simplifies more complex portions of the TQStyle API, such as
* the PopupMenuItems, ScrollBars and Sliders by providing extra "primitive
* elements" which are simple to implement by the style writer.
*
- * @see QStyle::QStyle
- * @see QCommonStyle::QCommonStyle
+ * @see TQStyle::TQStyle
+ * @see TQCommonStyle::TQCommonStyle
* @author Karol Szwed ([email protected])
* @version $Id$
*/
-class QtCKStyle: public QCommonStyle
+class TQtCKStyle: public TQCommonStyle
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * QtCKStyle Flags:
+ * TQtCKStyle Flags:
*
* @li Default - Default style setting, where menu transparency
* and the FilledFrameWorkaround are disabled.
*
- * @li AllowMenuTransparency - Enable this flag to use QtCKStyle's
+ * @li AllowMenuTransparency - Enable this flag to use TQtCKStyle's
* internal menu transparency engine.
*
* @li FilledFrameWorkaround - Enable this flag to facilitate
- * proper repaints of QMenuBars and QToolBars when the style chooses
- * to paint the interior of a QFrame. The style primitives in question
+ * proper tqrepaints of TQMenuBars and TQToolBars when the style chooses
+ * to paint the interior of a TQFrame. The style primitives in question
* are PE_PanelMenuBar and PE_PanelDockWindow. The HighColor style uses
* this workaround to enable painting of gradients in menubars and
* toolbars.
@@ -114,9 +115,9 @@ class QtCKStyle: public QCommonStyle
*
* Select the appropriate KStyle flags and scrollbar type
* for your style. The user's style preferences selected in KControl
- * are read by using QSettings 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
- * QCommonStyle 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
* style as a foundation for any new KStyle, so the limited number of
@@ -128,18 +129,18 @@ class QtCKStyle: public QCommonStyle
* @see KStyle::KStyleScrollBarType
* @author Karol Szwed ([email protected])
*/
- QtCKStyle( KStyleFlags flags = QtCKStyle::Default,
- KStyleScrollBarType sbtype = QtCKStyle::WindowsStyleScrollBar );
+ TQtCKStyle( KStyleFlags flags = TQtCKStyle::Default,
+ KStyleScrollBarType sbtype = TQtCKStyle::WindowsStyleScrollBar );
/**
- * Destructs the QtCKStyle object.
+ * Destructs the TQtCKStyle object.
*/
- ~QtCKStyle();
+ ~TQtCKStyle();
/**
* Returns the default widget style depending on color depth.
*/
- static QString defaultStyle();
+ static TQString defaultStyle();
/**
* Modifies the scrollbar type used by the style.
@@ -147,10 +148,10 @@ class QtCKStyle: public QCommonStyle
* 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 QtCKStyle
+ * In most situations however, setting the scrollbar type via the TQtCKStyle
* constructor should suffice.
* @param sbtype the scroll bar type
- * @see QtCKStyle::KStyleScrollBarType
+ * @see TQtCKStyle::KStyleScrollBarType
*/
void setScrollBarType(KStyleScrollBarType sbtype);
@@ -164,9 +165,9 @@ class QtCKStyle: public QCommonStyle
/**
* KStyle Primitive Elements:
*
- * The KStyle class extends the Qt's Style API by providing certain
- * simplifications for parts of QStyle. To do this, the KStylePrimitive
- * elements were defined, which are very similar to Qt's PrimitiveElement.
+ * The KStyle class extends the TQt's Style API by providing certain
+ * simplifications for parts of TQStyle. To do this, the KStylePrimitive
+ * elements were defined, which are very similar to TQt's PrimitiveElement.
*
* The first three Handle primitives simplify and extend PE_DockWindowHandle,
* so do not reimplement PE_DockWindowHandle if you want the KStyle handle
@@ -182,10 +183,10 @@ class QtCKStyle: public QCommonStyle
*
* @li KPE_ToolBarHandle - This primitive must be reimplemented. It currently
* only paints a filled rectangle as default behavior. This primitive is used
- * to render QToolBar handles.
+ * to render TQToolBar handles.
*
* @li KPE_GeneralHandle - This primitive must be reimplemented. It is used
- * to render general handles that are not part of a QToolBar or QDockWindow, such
+ * to render general handles that are not part of a TQToolBar or TQDockWindow, such
* as the applet handles used in Kicker. The default implementation paints a filled
* rect of arbitrary color.
*
@@ -198,7 +199,7 @@ class QtCKStyle: public QCommonStyle
* arbitrary color.
*
* @li KPE_ListViewExpander - This primitive is already implemented in KStyle. It
- * is used to draw the Expand/Collapse element in QListViews. 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.
*
* @li KPE_ListViewBranch - This primitive is already implemented in KStyle. It is
@@ -217,21 +218,21 @@ class QtCKStyle: public QCommonStyle
};
/**
- * This function is identical to Qt's QStyle::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
* the widget state of the KStylePrimitive in question.
*
* @see KStyle::KStylePrimitive
- * @see QStyle::drawPrimitive
- * @see QStyle::drawComplexControl
+ * @see TQStyle::drawPrimitive
+ * @see TQStyle::tqdrawComplexControl
*/
virtual void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
enum KStylePixelMetric {
@@ -246,76 +247,76 @@ class QtCKStyle: public QCommonStyle
KPM_ListViewBranchThickness = 0x00000100
};
- int kPixelMetric( KStylePixelMetric kpm, const QWidget* widget = 0 ) const;
+ int kPixelMetric( KStylePixelMetric kpm, const TQWidget* widget = 0 ) const;
// ---------------------------------------------------------------------------
- void polish( QWidget* widget );
- void unPolish( QWidget* widget );
- void polishPopupMenu( QPopupMenu* );
+ void polish( TQWidget* widget );
+ void unPolish( TQWidget* widget );
+ void polishPopupMenu( TQPopupMenu* );
void drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
- void drawControl( ControlElement element,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ void tqdrawControl( ControlElement element,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
- void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ void tqdrawComplexControl( ComplexControl control,
+ TQPainter *p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
SubControl querySubControl( ComplexControl control,
- const QWidget* widget,
- const QPoint &pos,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQWidget* widget,
+ const TQPoint &pos,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- QRect querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+ TQRect querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl sc,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
- int pixelMetric( PixelMetric m,
- const QWidget* widget = 0 ) const;
+ int tqpixelMetric( PixelMetric m,
+ const TQWidget* widget = 0 ) const;
- QRect subRect( SubRect r,
- const QWidget* widget ) const;
+ TQRect subRect( SubRect r,
+ const TQWidget* widget ) const;
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget* widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget* widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
- int styleHint( StyleHint sh,
- const QWidget* w = 0,
- const QStyleOption &opt = QStyleOption::Default,
- QStyleHintReturn* shr = 0 ) const;
+ int tqstyleHint( StyleHint sh,
+ const TQWidget* w = 0,
+ const TQStyleOption &opt = TQStyleOption::Default,
+ TQStyleHintReturn* shr = 0 ) const;
protected:
- bool eventFilter( QObject* object, QEvent* event );
+ bool eventFilter( TQObject* object, TQEvent* event );
private:
// Disable copy constructor and = operator
- QtCKStyle( const QtCKStyle & );
- QtCKStyle& operator=( const QtCKStyle & );
+ TQtCKStyle( const TQtCKStyle & );
+ TQtCKStyle& operator=( const TQtCKStyle & );
protected:
virtual void virtual_hook( int id, void* data );
private:
- QtCKStylePrivate *d;
+ TQtCKStylePrivate *d;
};