summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-06 22:09:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-06 22:09:18 +0000
commitd1fb90134ab8504932ee36de6157f846b50f7415 (patch)
tree191f2f1f1ed00a754687d1258d47f78e99723182
parentb23b8edce7cbd48165084dbd852875afeb800735 (diff)
downloadtde-style-qtcurve-d1fb9013.tar.gz
tde-style-qtcurve-d1fb9013.zip
TQt4 port kde-style-qtcurve
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-style-qtcurve@1230744 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--CMakeLists.txt12
-rw-r--r--common/colorutils.c10
-rw-r--r--common/common.h220
-rw-r--r--common/config_file.c338
-rw-r--r--common/config_file.c-orig324
-rw-r--r--style/pixmaps.h18
-rw-r--r--style/qtc_fixx11h.h30
-rw-r--r--style/qtc_kstyle.cpp540
-rw-r--r--style/qtc_kstyle.h157
-rw-r--r--style/qtcurve.cpp2871
-rw-r--r--style/qtcurve.h255
11 files changed, 2396 insertions, 2379 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad2c3ed..032ec8a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,7 +40,8 @@ else (NOT QTC_QT_ONLY)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
include(QtCurveQt3)
if (QT_PLUGINS_DIR MATCHES NOTFOUND)
- message(SEND_ERROR "ERROR: Failed to detemine Qt3 plugins folder. Please pass -DQT_PLUGINS_DIR=<folder> to cmake")
+ MESSAGE(STATUS_ERROR "Qt3 package not found--assuming TQt4")
+ SET(QT_INCLUDE_DIR "/usr/include/qt4")
endif (QT_PLUGINS_DIR MATCHES NOTFOUND)
endif (NOT QTC_QT_ONLY)
@@ -50,6 +51,15 @@ exec_program(kde-config
OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX)
endif (NOT QTC_QT_ONLY)
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT")
+
+# NASTY HACK TO FORCE COMPILATION
+# REMOVE WHEN FIXED
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/trinity/include")
+
+SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt" CACHE FILEPATH "")
+SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc" CACHE FILEPATH "")
+
exec_program(kde-config
ARGS --install locale --expandvars
OUTPUT_VARIABLE KDE3_LOCALE_PREFIX)
diff --git a/common/colorutils.c b/common/colorutils.c
index 05aaaea..ba89752 100644
--- a/common/colorutils.c
+++ b/common/colorutils.c
@@ -1,6 +1,6 @@
/*
This file is taken from kcolorspaces.cpp and kcolorutils.cpp from kdelibs
-The code has been modified to work with QColor (Qt3 &Qt4) and GdkColor
+The code has been modified to work with TQColor (TQt3 &TQt4) and GdkColor
*/
/* This file is part of the KDE project
@@ -26,12 +26,12 @@ The code has been modified to work with QColor (Qt3 &Qt4) and GdkColor
#include <math.h>
#ifdef __cplusplus
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
#define FLOAT_COLOR(VAL, COL) (VAL).COL##F()
-#define TO_COLOR(R, G, B) QColor::fromRgbF(R, G, B)
+#define TO_COLOR(R, G, B) TQColor::fromRgbF(R, G, B)
#else
#define FLOAT_COLOR(VAL, COL) ((double)(((VAL).COL()*1.0)/255.0))
-#define TO_COLOR(R, G, B) QColor(limit(R*255.0), limit(G*255.0), limit(B*255.0))
+#define TO_COLOR(R, G, B) TQColor(limit(R*255.0), limit(G*255.0), limit(B*255.0))
#endif
#else
#define inline
@@ -67,7 +67,7 @@ static inline double ColorUtils_wrap(double a)
static const double yc[3] = { 0.299, 0.587, 0.114 };
#elif HCY_REC == 709
static const double yc[3] = {0.2126, 0.7152, 0.0722};
-#else // use Qt values
+#else // use TQt values
static const double yc[3] = { 0.34375, 0.5, 0.15625 };
#endif
diff --git a/common/common.h b/common/common.h
index c64872b..e7b1974 100644
--- a/common/common.h
+++ b/common/common.h
@@ -2,7 +2,7 @@
#define __COMMON_H__
/*
- QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
+ TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
----
@@ -22,14 +22,14 @@
*/
/* This file is quite 'hacky' as it contains lots of static function definitions - but I want to share the code
- between Qt and Gtk, but not polute the namespace with exported functions... */
+ between TQt and Gtk, but not polute the namespace with exported functions... */
#include <string.h>
#include <stdarg.h>
#include <math.h>
#include "config.h"
-#if defined _WIN32 && defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if defined _WIN32 && (0x039999 >= 0x040000)
#include <sys/stat.h>
#include <float.h>
#include <direct.h>
@@ -66,28 +66,28 @@ typedef enum
} EShading;
#ifdef __cplusplus
-#include <qconfig.h>
+#include <tqconfig.h>
#ifdef CONFIG_DIALOG
-#include <qapplication.h>
+#include <tqapplication.h>
#endif
#include <map>
#include <set>
-#if !defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000)
-#include <QtCore/QString>
+#if !defined CONFIG_DIALOG && (0x039999 >= 0x040000)
+#include <TQtCore/TQString>
#endif
#else
#include <glib.h>
#endif
#ifdef __cplusplus
-#include <qpixmap.h>
-typedef QColor color;
+#include <tqpixmap.h>
+typedef TQColor color;
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
-#include <QtCore/QSet>
-typedef QSet<QString> Strings;
+#if (0x039999 >= 0x040000)
+#include <TQtCore/TQSet>
+typedef TQSet<TQString> Strings;
#else
-typedef QStringList Strings;
+typedef TQStringList Strings;
#endif
#else
@@ -182,14 +182,14 @@ enum
#define SUNKEN_BEVEL_DARK_ALPHA(X) (X.value()/800.0) // 0.25
#define SUNKEN_BEVEL_LIGHT_ALPHA(X) (X.value()/500.0) // 0.40
-#define MENU_SIZE_ATOM "_QTCURVE_MENUBAR_SIZE_"
-#define STATUSBAR_ATOM "_QTCURVE_STATUSBAR_"
-#define TITLEBAR_SIZE_ATOM "_QTCURVE_TITLEBAR_SIZE_"
-#define ACTIVE_WINDOW_ATOM "_QTCURVE_ACTIVE_WINDOW_"
-#define TOGGLE_MENUBAR_ATOM "_QTCURVE_TOGGLE_MENUBAR_"
-#define TOGGLE_STATUSBAR_ATOM "_QTCURVE_TOGGLE_STATUSBAR_"
-#define OPACITY_ATOM "_QTCURVE_OPACITY_"
-#define BGND_ATOM "_QTCURVE_BGND_"
+#define MENU_SIZE_ATOM "_TQTCURVE_MENUBAR_SIZE_"
+#define STATUSBAR_ATOM "_TQTCURVE_STATUSBAR_"
+#define TITLEBAR_SIZE_ATOM "_TQTCURVE_TITLEBAR_SIZE_"
+#define ACTIVE_WINDOW_ATOM "_TQTCURVE_ACTIVE_WINDOW_"
+#define TOGGLE_MENUBAR_ATOM "_TQTCURVE_TOGGLE_MENUBAR_"
+#define TOGGLE_STATUSBAR_ATOM "_TQTCURVE_TOGGLE_STATUSBAR_"
+#define OPACITY_ATOM "_TQTCURVE_OPACITY_"
+#define BGND_ATOM "_TQTCURVE_BGND_"
#define BLEND_TITLEBAR (opts.menubarAppearance==opts.titlebarAppearance && opts.menubarAppearance==opts.inactiveTitlebarAppearance && \
!(opts.windowBorder&WINDOW_BORDER_BLEND_TITLEBAR) && SHADE_WINDOW_BORDER==opts.shadeMenubars && opts.windowDrag)
@@ -372,19 +372,19 @@ enum
#define FULLLY_ROUNDED (opts.round>=ROUND_FULL)
#define DO_EFFECT (EFFECT_NONE!=opts.buttonEffect)
-#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || ( (0x039999 >= 0x040000))
#define SLIDER_GLOW (DO_EFFECT && MO_GLOW==opts.coloredMouseOver /*&& SLIDER_TRIANGULAR!=opts.sliderStyle*/ ? 2 : 0)
#endif
#define ENTRY_MO (opts.unifyCombo && opts.unifySpin)
-#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || ( (0x039999 >= 0x040000))
#define FOCUS_ALPHA 0.08
#define FOCUS_GLOW_LINE_ALPHA 0.5
#define BORDER_BLEND_ALPHA 0.7
#define ETCH_TOP_ALPHA 0.055
#define ETCH_BOTTOM_ALPHA 0.1
-// #if defined QT_VERSION && (QT_VERSION >= 0x040000)
+// #if (0x039999 >= 0x040000)
// #define ETCH_RADIO_TOP_ALPHA 0.055
// #define ETCH_RADIO_BOTTOM_ALPHA 0.80
// #else
@@ -394,15 +394,15 @@ enum
#define RINGS_INNER_ALPHA(T) qtcRingAlpha[IMG_PLAIN_RINGS==(T) ? 1 : 0] //(IMG_PLAIN_RINGS==opts.bgndImage.type ? 0.25 : 0.125)
#define RINGS_OUTER_ALPHA qtcRingAlpha[2] //0.5
-#define RINGS_WIDTH(T) (IMG_SQUARE_RINGS==T ? 260 : 450)
-#define RINGS_HEIGHT(T) (IMG_SQUARE_RINGS==T ? 220 : 360)
+#define RINGS_WIDTH(T) (IMG_STQUARE_RINGS==T ? 260 : 450)
+#define RINGS_HEIGHT(T) (IMG_STQUARE_RINGS==T ? 220 : 360)
-#define RINGS_SQUARE_LARGE_ALPHA (RINGS_OUTER_ALPHA*0.675)
-#define RINGS_SQUARE_SMALL_ALPHA (RINGS_OUTER_ALPHA*0.50)
-#define RINGS_SQUARE_LINE_WIDTH 20.0
-#define RINGS_SQUARE_RADIUS 18.0
-#define RINGS_SQUARE_LARGE_SIZE 120.0
-#define RINGS_SQUARE_SMALL_SIZE 100.0
+#define RINGS_STQUARE_LARGE_ALPHA (RINGS_OUTER_ALPHA*0.675)
+#define RINGS_STQUARE_SMALL_ALPHA (RINGS_OUTER_ALPHA*0.50)
+#define RINGS_STQUARE_LINE_WIDTH 20.0
+#define RINGS_STQUARE_RADIUS 18.0
+#define RINGS_STQUARE_LARGE_SIZE 120.0
+#define RINGS_STQUARE_SMALL_SIZE 100.0
#if !defined __cplusplus
#define MENU_AND_TOOLTIP_RADIUS (opts.round>=ROUND_FULL ? 5.0 : 3.5)
@@ -416,48 +416,48 @@ enum
#endif
-#if defined __cplusplus && defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if defined __cplusplus && (0x039999 >= 0x040000)
-#include <qstyle.h>
+#include <tqstyle.h>
typedef enum
{
- QtC_Round = QStyle::PM_CustomBase,
- QtC_TitleBarButtonAppearance,
- QtC_TitleAlignment,
- QtC_TitleBarButtons,
- QtC_TitleBarIcon,
- QtC_TitleBarIconColor,
- QtC_TitleBarEffect,
- QtC_BlendMenuAndTitleBar,
- QtC_ShadeMenubarOnlyWhenActive,
- QtC_ToggleButtons,
- QtC_MenubarColor,
- QtC_WindowBorder,
- QtC_CustomBgnd,
- QtC_TitleBarApp
-} QtCMetrics;
-
-#define QtC_StateKWin ((QStyle::StateFlag)0x10000000)
+ TQtC_Round = TQStyle::PM_CustomBase,
+ TQtC_TitleBarButtonAppearance,
+ TQtC_TitleAlignment,
+ TQtC_TitleBarButtons,
+ TQtC_TitleBarIcon,
+ TQtC_TitleBarIconColor,
+ TQtC_TitleBarEffect,
+ TQtC_BlendMenuAndTitleBar,
+ TQtC_ShadeMenubarOnlyWhenActive,
+ TQtC_ToggleButtons,
+ TQtC_MenubarColor,
+ TQtC_WindowBorder,
+ TQtC_CustomBgnd,
+ TQtC_TitleBarApp
+} TQtCMetrics;
+
+#define TQtC_StateKWin ((TQStyle::StateFlag)0x10000000)
// PE_FrameWindow
-#define QtC_StateKWinNotFull ((QStyle::StateFlag)0x20000000)
+#define TQtC_StateKWinNotFull ((TQStyle::StateFlag)0x20000000)
// CC_TitleBar
-#define QtC_StateKWinFillBgnd ((QStyle::StateFlag)0x20000000)
-#define QtC_StateKWinNoBorder ((QStyle::StateFlag)0x40000000)
-#define QtC_StateKWinCompositing ((QStyle::StateFlag)0x80000000)
-#define QtC_StateKWinTabDrag ((QStyle::StateFlag)0x00000001)
+#define TQtC_StateKWinFillBgnd ((TQStyle::StateFlag)0x20000000)
+#define TQtC_StateKWinNoBorder ((TQStyle::StateFlag)0x40000000)
+#define TQtC_StateKWinCompositing ((TQStyle::StateFlag)0x80000000)
+#define TQtC_StateKWinTabDrag ((TQStyle::StateFlag)0x00000001)
-#define QtC_PE_DrawBackground ((QStyle::PrimitiveElement)(QStyle::PE_CustomBase+10000))
+#define TQtC_PE_DrawBackground ((TQStyle::PrimitiveElement)(TQStyle::PE_CustomBase+10000))
-#define CLOSE_COLOR QColor(191, 82, 82)
+#define CLOSE_COLOR TQColor(191, 82, 82)
#define DARK_WINDOW_TEXT(A) ((A).red()<230 || (A).green()<230 || (A).blue()<230)
#define HOVER_BUTTON_ALPHA(A) (DARK_WINDOW_TEXT(A) ? 0.25 : 0.65)
#define WINDOW_TEXT_SHADOW_ALPHA(A) (EFFECT_SHADOW==(A) ? 0.10 : 0.60)
-#define WINDOW_SHADOW_COLOR(A) (EFFECT_SHADOW==(A) ? Qt::black : Qt::white)
+#define WINDOW_SHADOW_COLOR(A) (EFFECT_SHADOW==(A) ? TQt::black : TQt::white)
#endif
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
-#define QTCURVE_PREVIEW_CONFIG "QTCURVE_PREVIEW_CONFIG"
-#define QTCURVE_PREVIEW_CONFIG_FULL "QTCURVE_PREVIEW_CONFIG_FULL"
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
+#define TQTCURVE_PREVIEW_CONFIG "TQTCURVE_PREVIEW_CONFIG"
+#define TQTCURVE_PREVIEW_CONFIG_FULL "TQTCURVE_PREVIEW_CONFIG_FULL"
typedef enum
{
@@ -512,7 +512,7 @@ typedef enum
#define TBAR_VERSION_HACK 65535
#define TBAR_BORDER_VERSION_HACK (TBAR_VERSION_HACK+1000)
-typedef std::map<int, QColor> TBCols;
+typedef std::map<int, TQColor> TBCols;
#endif
typedef enum
@@ -529,7 +529,7 @@ typedef enum
IMG_NONE,
IMG_BORDERED_RINGS,
IMG_PLAIN_RINGS,
- IMG_SQUARE_RINGS,
+ IMG_STQUARE_RINGS,
IMG_FILE
} EImageType;
@@ -538,29 +538,29 @@ typedef struct
EImageType type;
bool loaded;
#if defined __cplusplus
- QString file;
- QPixmap pix;
+ TQString file;
+ TQPixmap pix;
#else // __cplusplus
const char *file;
GdkPixbuf *pix;
#endif // __cplusplus
int width, height;
-} QtCImage;
+} TQtCImage;
typedef enum
{
- SQUARE_NONE = 0x0000,
- SQUARE_ENTRY = 0x0001,
- SQUARE_PROGRESS = 0x0002,
- SQUARE_SCROLLVIEW = 0x0004,
- SQUARE_LISTVIEW_SELECTION = 0x0008,
- SQUARE_FRAME = 0x0010,
- SQUARE_TAB_FRAME = 0x0020,
- SQUARE_SLIDER = 0x0040,
- SQUARE_SB_SLIDER = 0x0080,
- SQUARE_WINDOWS = 0x0100,
- SQUARE_TOOLTIPS = 0x0200,
- SQUARE_POPUP_MENUS = 0x0400
+ STQUARE_NONE = 0x0000,
+ STQUARE_ENTRY = 0x0001,
+ STQUARE_PROGRESS = 0x0002,
+ STQUARE_SCROLLVIEW = 0x0004,
+ STQUARE_LISTVIEW_SELECTION = 0x0008,
+ STQUARE_FRAME = 0x0010,
+ STQUARE_TAB_FRAME = 0x0020,
+ STQUARE_SLIDER = 0x0040,
+ STQUARE_SB_SLIDER = 0x0080,
+ STQUARE_WINDOWS = 0x0100,
+ STQUARE_TOOLTIPS = 0x0200,
+ STQUARE_POPUP_MENUS = 0x0400
} ESquare;
typedef enum
@@ -582,7 +582,7 @@ typedef enum
{
PIX_CHECK,
#ifdef __cplusplus
-#if defined QT_VERSION && (QT_VERSION < 0x040000)
+#if (0x039999 < 0x040000)
PIX_RADIO_ON,
PIX_RADIO_BORDER,
PIX_RADIO_INNER,
@@ -627,10 +627,10 @@ typedef enum
WIDGET_SPIN_DOWN,
WIDGET_UNCOLOURED_MO_BUTTON,
#else
- WIDGET_CHECKBUTTON, // Qt4 only
- WIDGET_MDI_WINDOW, // Qt4 only
- WIDGET_MDI_WINDOW_TITLE, // Qt4 only
- WIDGET_MDI_WINDOW_BUTTON, // Qt4 only
+ WIDGET_CHECKBUTTON, // TQt4 only
+ WIDGET_MDI_WINDOW, // TQt4 only
+ WIDGET_MDI_WINDOW_TITLE, // TQt4 only
+ WIDGET_MDI_WINDOW_BUTTON, // TQt4 only
WIDGET_DOCK_WIDGET_TITLE,
WIDGET_DIAL,
#endif
@@ -640,7 +640,7 @@ typedef enum
WIDGET_SELECTION,
WIDGET_FRAME,
WIDGET_NO_ETCH_BTN,
- WIDGET_MENU_BUTTON, // Qt4 only
+ WIDGET_MENU_BUTTON, // TQt4 only
WIDGET_FOCUS,
WIDGET_TAB_FRAME,
WIDGET_OTHER
@@ -1045,7 +1045,7 @@ typedef struct
highlightTab,
roundAllTabs,
animatedProgress,
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
fixParentlessDialogs,
#endif
customMenuTextColor,
@@ -1069,7 +1069,7 @@ typedef struct
*/
#endif
mapKdeIcons,
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) || !defined __cplusplus
gtkButtonOrder,
fadeLines,
#endif
@@ -1099,10 +1099,10 @@ typedef struct
borderInactiveTab,
doubleGtkComboArrow,
menuIcons,
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
stdBtnSizes,
#endif
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
xbar,
#endif
forceAlternateLvCols,
@@ -1125,10 +1125,10 @@ typedef struct
bgndOpacity,
menuBgndOpacity,
dlgOpacity;
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
int dwtSettings;
#endif
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
int titlebarButtons;
TBCols titlebarButtonColors;
ETitleBarIcon titlebarIcon;
@@ -1204,23 +1204,23 @@ typedef struct
#else
Gradient *customGradient[NUM_CUSTOM_GRAD];
#endif
- QtCImage bgndImage,
+ TQtCImage bgndImage,
menuBgndImage;
-#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || ( (0x039999 >= 0x040000))
/* NOTE: If add any more settings here, need to alter copyOpts/freeOpts/defaultSettings in config_file.c */
Strings noBgndGradientApps,
noBgndOpacityApps,
noMenuBgndOpacityApps,
noBgndImageApps;
#endif
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
Strings noDlgFixApps;
#endif
Strings noMenuStripeApps;
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
Strings menubarApps,
statusbarApps,
- useQtFileDialogApps,
+ useTQtFileDialogApps,
windowDragWhiteList,
windowDragBlackList;
#endif
@@ -1416,7 +1416,7 @@ inline int limit(double c)
}
#endif
-#if defined QT_VERSION && (QT_VERSION >= 0x040000) && !defined QTC_QT_ONLY
+#if (0x039999 >= 0x040000) && !defined TQTC_TQT_ONLY
#include <KDE/KColorUtils>
#define tint(COLA, COLB, FACTOR) KColorUtils::tint((COLA), (COLB), (FACTOR))
#define midColor(COLA, COLB) KColorUtils::mix((COLA), (COLB), 0.5)
@@ -1528,7 +1528,7 @@ static void shade(const Options *opts, const color *ca, color *cb, double k)
case SHADING_HCY:
{
#define HCY_FACTOR 0.15
- #if defined QT_VERSION && (QT_VERSION >= 0x040000) && !defined QTC_QT_ONLY
+ #if (0x039999 >= 0x040000) && !defined TQTC_TQT_ONLY
if(k>1.0)
*cb=KColorUtils::lighten(ca, (k*(1+HCY_FACTOR))-1.0, 1.0);
else
@@ -1546,7 +1546,7 @@ static void shade(const Options *opts, const color *ca, color *cb, double k)
#endif
}
}
-#if defined __cplusplus && defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if defined __cplusplus && (0x039999 >= 0x040000)
cb->setAlpha(ca.alpha());
#endif
#ifndef __cplusplus
@@ -1581,7 +1581,7 @@ static void adjustPix(unsigned char *data, int numChannels, int w, int h, int st
unsigned char source=data[offset+column+1];
#if defined __cplusplus
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+#if TQ_BYTE_ORDER == TQ_BIG_ENDIAN
/* ARGB */
data[offset+column+1] = checkBounds(r-source);
data[offset+column+2] = checkBounds(g-source);
@@ -1751,7 +1751,7 @@ static EAppearance widgetApp(EWidget w, const Options *opts)
#define MIN_ROUND_MAX_HEIGHT 12
#define MIN_ROUND_MAX_WIDTH 24
-#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || ( (0x039999 >= 0x040000))
#if defined __cplusplus
#define EXTRA_INNER_RADIUS 3.5
@@ -1761,7 +1761,7 @@ static EAppearance widgetApp(EWidget w, const Options *opts)
#define FULL_OUTER_RADIUS 2.5
#define FULL_ETCH_RADIUS 3.5
-#if defined QT_VERSION && (QT_VERSION < 0x040600)
+#if (0x039999 < 0x040600)
#define SLIGHT_INNER_RADIUS 0.5
#define SLIGHT_OUTER_RADIUS 1.5
#define SLIGHT_ETCH_RADIUS 2.5
@@ -1819,14 +1819,14 @@ ERound getWidgetRound(const Options *opts, int w, int h, EWidget widget)
{
ERound r=opts->round;
- if( ((WIDGET_PBAR_TROUGH==widget || WIDGET_PROGRESSBAR==widget) && (opts->square&SQUARE_PROGRESS)) ||
- (WIDGET_ENTRY==widget && (opts->square&SQUARE_ENTRY)) )
+ if( ((WIDGET_PBAR_TROUGH==widget || WIDGET_PROGRESSBAR==widget) && (opts->square&STQUARE_PROGRESS)) ||
+ (WIDGET_ENTRY==widget && (opts->square&STQUARE_ENTRY)) )
return ROUND_NONE;
if((WIDGET_CHECKBOX==widget || WIDGET_FOCUS==widget) && ROUND_NONE!=r)
r=ROUND_SLIGHT;
-#if defined __cplusplus && (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined __cplusplus && ( (0x039999 >= 0x040000))
if((WIDGET_MDI_WINDOW_BUTTON==widget && (opts->titlebarButtons&TITLEBAR_BUTTON_ROUND)) ||
WIDGET_RADIO_BUTTON==widget || WIDGET_DIAL==widget)
return ROUND_MAX;
@@ -1836,7 +1836,7 @@ ERound getWidgetRound(const Options *opts, int w, int h, EWidget widget)
return ROUND_MAX;
#endif
-#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || ( (0x039999 >= 0x040000))
if(WIDGET_SLIDER==widget &&
(SLIDER_ROUND==opts->sliderStyle || SLIDER_ROUND_ROTATED==opts->sliderStyle || SLIDER_CIRCULAR==opts->sliderStyle))
return ROUND_MAX;
@@ -1870,11 +1870,11 @@ static double getRadius(const Options *opts, int w, int h, EWidget widget, ERadi
if((WIDGET_CHECKBOX==widget || WIDGET_FOCUS==widget) && ROUND_NONE!=r)
r=ROUND_SLIGHT;
- if( ((WIDGET_PBAR_TROUGH==widget || WIDGET_PROGRESSBAR==widget) && (opts->square&SQUARE_PROGRESS)) ||
- (WIDGET_ENTRY==widget && (opts->square&SQUARE_ENTRY)) )
+ if( ((WIDGET_PBAR_TROUGH==widget || WIDGET_PROGRESSBAR==widget) && (opts->square&STQUARE_PROGRESS)) ||
+ (WIDGET_ENTRY==widget && (opts->square&STQUARE_ENTRY)) )
return 0.0;
-#if defined __cplusplus && (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined __cplusplus && ( (0x039999 >= 0x040000))
if((WIDGET_MDI_WINDOW_BUTTON==widget && (opts->titlebarButtons&TITLEBAR_BUTTON_ROUND)) ||
WIDGET_RADIO_BUTTON==widget || WIDGET_DIAL==widget)
return (w>h ? h : w)/2.0;
@@ -1884,7 +1884,7 @@ static double getRadius(const Options *opts, int w, int h, EWidget widget, ERadi
return (w>h ? h : w)/2.0;
#endif
-#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || ( (0x039999 >= 0x040000))
if(WIDGET_SLIDER==widget &&
(SLIDER_ROUND==opts->sliderStyle || SLIDER_ROUND_ROTATED==opts->sliderStyle || SLIDER_CIRCULAR==opts->sliderStyle))
return (w>h ? h : w)/2.0;
diff --git a/common/config_file.c b/common/config_file.c
index 7174286..98948ab 100644
--- a/common/config_file.c
+++ b/common/config_file.c
@@ -1,5 +1,5 @@
/*
- QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
+ TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
----
@@ -43,17 +43,17 @@
#ifdef __cplusplus
-#if QT_VERSION >= 0x040000
-#include <QMap>
-#include <QFile>
-#include <QTextStream>
+#if 0x039999 >= 0x040000
+#include <TQMap>
+#include <TQFile>
+#include <TQTextStream>
#define TO_LATIN1(A) A.toLatin1().constData()
#else
#define TO_LATIN1(A) A.latin1()
-#include <qmap.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqmap.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#endif
#endif // __cplusplus
@@ -181,7 +181,7 @@ static EAppearance toAppearance(const char *str, EAppearance def, EAppAllow allo
if(0==memcmp(str, "glass", 5) || 0==memcmp(str, "shinyglass", 10))
return APPEARANCE_SHINY_GLASS;
if(0==memcmp(str, "agua", 4))
-#if defined __cplusplus && !defined CONFIG_DIALOG && defined QT_VERSION && QT_VERSION < 0x040000
+#if defined __cplusplus && !defined CONFIG_DIALOG && 0x039999 < 0x040000
return APPEARANCE_AGUA_MOD;
#else
return APPEARANCE_AGUA;
@@ -488,7 +488,7 @@ static EAlign toAlign(const char *str, EAlign def)
}
#endif
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
static ETitleBarIcon toTitlebarIcon(const char *str, ETitleBarIcon def)
{
if(str)
@@ -515,7 +515,7 @@ static EImageType toImageType(const char *str, EImageType def)
if(0==memcmp(str, "rings", 5))
return IMG_BORDERED_RINGS;
if(0==memcmp(str, "squarerings", 11))
- return IMG_SQUARE_RINGS;
+ return IMG_STQUARE_RINGS;
if(0==memcmp(str, "file", 4))
return IMG_FILE;
}
@@ -569,41 +569,41 @@ static const char * getHome()
#ifdef __cplusplus
-#if defined QTC_QT_ONLY || QT_VERSION < 0x040000
-#if QT_VERSION < 0x040000
-#include <qdir.h>
-#include <qfile.h>
+#if defined TQTC_TQT_ONLY || 0x039999 < 0x040000
+#if 0x039999 < 0x040000
+#include <tqdir.h>
+#include <tqfile.h>
#endif
// Take from KStandardDirs::makeDir
-static bool makeDir(const QString& dir, int mode)
+static bool makeDir(const TQString& dir, int mode)
{
// we want an absolute path
- if (QDir::isRelativePath(dir))
+ if (TQDir::isRelativePath(dir))
return false;
-#ifdef Q_WS_WIN
- return QDir().mkpath(dir);
+#ifdef TQ_WS_WIN
+ return TQDir().mkpath(dir);
#else
- QString target = dir;
+ TQString target = dir;
uint len = target.length();
// append trailing slash if missing
if (dir.at(len - 1) != '/')
target += '/';
- QString base;
+ TQString base;
uint i = 1;
while( i < len )
{
struct stat st;
-#if QT_VERSION >= 0x040000
+#if 0x039999 >= 0x040000
int pos = target.indexOf('/', i);
#else
- int pos = target.find('/', i);
+ int pos = target.tqfind('/', i);
#endif
base += target.mid(i - 1, pos - i + 1);
- QByteArray baseEncoded = QFile::encodeName(base);
+ TQByteArray baseEncoded = TQFile::encodeName(base);
// bail out if we encountered a problem
if (stat(baseEncoded, &st) != 0)
{
@@ -614,11 +614,11 @@ static bool makeDir(const QString& dir, int mode)
if (mkdir(baseEncoded, static_cast<mode_t>(mode)) != 0)
{
-#if QT_VERSION >= 0x040000
+#if 0x039999 >= 0x040000
baseEncoded.prepend("trying to create local folder ");
perror(baseEncoded.constData());
#else
- perror("trying to create QtCurve config folder ");
+ perror("trying to create TQtCurve config folder ");
#endif
return false; // Couldn't create it :-(
}
@@ -697,7 +697,7 @@ static const char *qtcConfDir()
if(0!=lstat(cfgDir, &info))
{
#ifdef __cplusplus
-#if defined QTC_QT_ONLY || QT_VERSION < 0x040000
+#if defined TQTC_TQT_ONLY || 0x039999 < 0x040000
makeDir(cfgDir, 0755);
#else
KStandardDirs::makeDir(cfgDir, 0755);
@@ -725,16 +725,16 @@ static WindowBorders qtcGetWindowBorderSize(bool force)
if(-1==sizes.titleHeight || force)
{
#ifdef __cplusplus
- QFile f(qtcConfDir()+QString(BORDER_SIZE_FILE));
+ TQFile f(qtcConfDir()+TQString(BORDER_SIZE_FILE));
-#if QT_VERSION >= 0x040000
- if(f.open(QIODevice::ReadOnly))
+#if 0x039999 >= 0x040000
+ if(f.open(TQIODevice::ReadOnly))
#else
if(f.open(IO_ReadOnly))
#endif
{
- QTextStream stream(&f);
- QString line;
+ TQTextStream stream(&f);
+ TQString line;
sizes.titleHeight=stream.readLine().toInt();
sizes.toolTitleHeight=stream.readLine().toInt();
@@ -770,7 +770,7 @@ static WindowBorders qtcGetWindowBorderSize(bool force)
return sizes.titleHeight<12 ? def : sizes;
}
-#if (!defined QT_VERSION || QT_VERSION >= 0x040000) && !defined CONFIG_DIALOG
+#if (0x039999 >= 0x040000) && !defined CONFIG_DIALOG
#define MENU_FILE_PREFIX "menubar-"
#define STATUS_FILE_PREFIX "statusbar-"
@@ -781,17 +781,17 @@ static WindowBorders qtcGetWindowBorderSize(bool force)
#define qtcSetStatusBarHidden(A, H) qtcSetBarHidden((A), (H), STATUS_FILE_PREFIX)
#ifdef __cplusplus
-static bool qtcBarHidden(const QString &app, const char *prefix)
+static bool qtcBarHidden(const TQString &app, const char *prefix)
{
- return QFile::exists(QFile::decodeName(qtcConfDir())+prefix+app);
+ return TQFile::exists(TQFile::decodeName(qtcConfDir())+prefix+app);
}
-static void qtcSetBarHidden(const QString &app, bool hidden, const char *prefix)
+static void qtcSetBarHidden(const TQString &app, bool hidden, const char *prefix)
{
if(!hidden)
- QFile::remove(QFile::decodeName(qtcConfDir())+prefix+app);
+ TQFile::remove(TQFile::decodeName(qtcConfDir())+prefix+app);
else
- QFile(QFile::decodeName(qtcConfDir())+prefix+app).open(QIODevice::WriteOnly);
+ TQFile(TQFile::decodeName(qtcConfDir())+prefix+app).open(TQIODevice::WriteOnly);
}
#else // __cplusplus
@@ -839,7 +839,7 @@ static void qtcSetBarHidden(const char *app, bool hidden, const char *prefix)
#include <QtSvg/QSvgRenderer>
#endif // __cplusplus
-static void loadBgndImage(QtCImage *img)
+static void loadBgndImage(TQtCImage *img)
{
if(!img->loaded &&
img->width>16 && img->width<1024 && img->height>16 && img->height<1024)
@@ -848,13 +848,13 @@ static void loadBgndImage(QtCImage *img)
#ifdef __cplusplus
if(!img->file.isEmpty())
{
- QSvgRenderer svg(img->file);
+ TQSvgRenderer svg(img->file);
if(svg.isValid())
{
- img->pix=QPixmap(img->width, img->height);
- img->pix.fill(Qt::transparent);
- QPainter painter(&img->pix);
+ img->pix=TQPixmap(img->width, img->height);
+ img->pix.fill(TQt::transparent);
+ TQPainter painter(&img->pix);
svg.render(&painter);
painter.end();
}
@@ -867,7 +867,7 @@ static void loadBgndImage(QtCImage *img)
}
}
-#endif // (!defined QT_VERSION || QT_VERSION >= 0x040000) && !defined CONFIG_DIALOG
+#endif // (!defined 0x039999 || 0x039999 >= 0x040000) && !defined CONFIG_DIALOG
#ifdef CONFIG_READ
@@ -885,41 +885,41 @@ static void checkColor(EShade *s, color *c)
#ifdef __cplusplus
-class QtCConfig
+class TQtCConfig
{
public:
- QtCConfig(const QString &filename);
+ TQtCConfig(const TQString &filename);
bool ok() const { return values.count()>0; }
- bool hasKey(const QString &key) { return values.contains(key); }
- const QString & readEntry(const QString &key, const QString &def=QString::null);
+ bool hasKey(const TQString &key) { return values.tqcontains(key); }
+ const TQString & readEntry(const TQString &key, const TQString &def=TQString());
private:
- QMap<QString, QString> values;
+ TQMap<TQString, TQString> values;
};
-QtCConfig::QtCConfig(const QString &filename)
+TQtCConfig::TQtCConfig(const TQString &filename)
{
- QFile f(filename);
+ TQFile f(filename);
-#if QT_VERSION >= 0x040000
- if(f.open(QIODevice::ReadOnly))
+#if 0x039999 >= 0x040000
+ if(f.open(TQIODevice::ReadOnly))
#else
if(f.open(IO_ReadOnly))
#endif
{
- QTextStream stream(&f);
- QString line;
+ TQTextStream stream(&f);
+ TQString line;
while(!stream.atEnd())
{
line = stream.readLine();
-#if QT_VERSION >= 0x040000
+#if 0x039999 >= 0x040000
int pos=line.indexOf('=');
#else
- int pos=line.find('=');
+ int pos=line.tqfind('=');
#endif
if(-1!=pos)
values[line.left(pos)]=line.mid(pos+1);
@@ -928,26 +928,26 @@ QtCConfig::QtCConfig(const QString &filename)
}
}
-inline const QString & QtCConfig::readEntry(const QString &key, const QString &def)
+inline const TQString & TQtCConfig::readEntry(const TQString &key, const TQString &def)
{
- return values.contains(key) ? values[key] : def;
+ return values.tqcontains(key) ? values[key] : def;
}
-inline QString readStringEntry(QtCConfig &cfg, const QString &key)
+inline TQString readStringEntry(TQtCConfig &cfg, const TQString &key)
{
return cfg.readEntry(key);
}
-static int readNumEntry(QtCConfig &cfg, const QString &key, int def)
+static int readNumEntry(TQtCConfig &cfg, const TQString &key, int def)
{
- const QString &val(readStringEntry(cfg, key));
+ const TQString &val(readStringEntry(cfg, key));
return val.isEmpty() ? def : val.toInt();
}
-static int readVersionEntry(QtCConfig &cfg, const QString &key)
+static int readVersionEntry(TQtCConfig &cfg, const TQString &key)
{
- const QString &val(readStringEntry(cfg, key));
+ const TQString &val(readStringEntry(cfg, key));
int major, minor, patch;
return !val.isEmpty() && 3==sscanf(TO_LATIN1(val), "%d.%d.%d", &major, &minor, &patch)
@@ -955,25 +955,25 @@ static int readVersionEntry(QtCConfig &cfg, const QString &key)
: 0;
}
-static bool readBoolEntry(QtCConfig &cfg, const QString &key, bool def)
+static bool readBoolEntry(TQtCConfig &cfg, const TQString &key, bool def)
{
- const QString &val(readStringEntry(cfg, key));
+ const TQString &val(readStringEntry(cfg, key));
return val.isEmpty() ? def : (val=="true" ? true : false);
}
-static void readDoubleList(QtCConfig &cfg, const char *key, double *list, int count)
+static void readDoubleList(TQtCConfig &cfg, const char *key, double *list, int count)
{
-#if (defined QT_VERSION && (QT_VERSION >= 0x040000))
- QStringList strings(readStringEntry(cfg, key).split(',', QString::SkipEmptyParts));
+#if ( (0x039999 >= 0x040000))
+ TQStringList strings(readStringEntry(cfg, key).split(',', TQString::SkipEmptyParts));
#else
- QStringList strings(QStringList::split(',', readStringEntry(cfg, key)));
+ TQStringList strings(TQStringList::split(',', readStringEntry(cfg, key)));
#endif
bool ok(count==strings.size());
if(ok)
{
- QStringList::ConstIterator it(strings.begin());
+ TQStringList::ConstIterator it(strings.begin());
int i;
for(i=0; i<count && ok; ++i, ++it)
@@ -986,7 +986,7 @@ static void readDoubleList(QtCConfig &cfg, const char *key, double *list, int co
#define CFG_READ_COLOR(ENTRY) \
{ \
- QString sVal(cfg.readEntry(#ENTRY)); \
+ TQString sVal(cfg.readEntry(#ENTRY)); \
if(sVal.isEmpty()) \
opts->ENTRY=def->ENTRY; \
else \
@@ -999,7 +999,7 @@ static void readDoubleList(QtCConfig &cfg, const char *key, double *list, int co
opts->ENTRY.loaded=false; \
if(IMG_FILE==opts->ENTRY.type) \
{ \
- QString file(cfg.readEntry(#ENTRY ".file")); \
+ TQString file(cfg.readEntry(#ENTRY ".file")); \
if(!file.isEmpty()) \
{ \
opts->ENTRY.file=file; \
@@ -1009,17 +1009,17 @@ static void readDoubleList(QtCConfig &cfg, const char *key, double *list, int co
} \
}
-#if QT_VERSION >= 0x040000
+#if 0x039999 >= 0x040000
#define CFG_READ_STRING_LIST(ENTRY) \
{ \
- QString val=readStringEntry(cfg, #ENTRY); \
- Strings set=val.isEmpty() ? Strings() : Strings::fromList(val.split(",", QString::SkipEmptyParts)); \
+ TQString val=readStringEntry(cfg, #ENTRY); \
+ Strings set=val.isEmpty() ? Strings() : Strings::fromList(val.split(",", TQString::SkipEmptyParts)); \
opts->ENTRY=set.count() || cfg.hasKey(#ENTRY) ? set : def->ENTRY; \
}
#else
#define CFG_READ_STRING_LIST(ENTRY) \
{ \
- QString val=readStringEntry(cfg, #ENTRY); \
+ TQString val=readStringEntry(cfg, #ENTRY); \
Strings list=val.isEmpty() ? Strings() : Strings::split(",", val, false); \
opts->ENTRY=list.count() || cfg.hasKey(#ENTRY) ? list : def->ENTRY; \
}
@@ -1266,7 +1266,7 @@ static void readDoubleList(GHashTable *cfg, char *key, double *list, int count)
opts->ENTRY=toAlign(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
#endif
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
#define CFG_READ_TB_ICON(ENTRY) \
opts->ENTRY=toTitlebarIcon(TO_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
#endif
@@ -1325,7 +1325,7 @@ static void copyOpts(Options *src, Options *dest)
dest->noBgndOpacityApps=src->noBgndOpacityApps;
dest->noMenuBgndOpacityApps=src->noMenuBgndOpacityApps;
dest->noBgndImageApps=src->noBgndImageApps;
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
dest->noDlgFixApps=src->noDlgFixApps;
src->noDlgFixApps=NULL;
#endif
@@ -1351,7 +1351,7 @@ static void freeOpts(Options *opts)
g_strfreev(opts->noMenuBgndOpacityApps);
if(opts->noBgndImageApps)
g_strfreev(opts->noBgndImageApps);
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
if(opts->noDlgFixApps)
g_strfreev(opts->noDlgFixApps);
opts->noDlgFixApps=NULL
@@ -1480,7 +1480,7 @@ static void checkConfig(Options *opts)
if(opts->gbFactor<MIN_GB_FACTOR || opts->gbFactor>MAX_GB_FACTOR)
opts->gbFactor=DEF_GB_FACTOR;
-#if defined __cplusplus && defined QT_VERSION && QT_VERSION < 0x040000 && !defined CONFIG_DIALOG
+#if defined __cplusplus && 0x039999 < 0x040000 && !defined CONFIG_DIALOG
opts->crSize=CR_SMALL_SIZE;
if(SLIDER_CIRCULAR==opts->sliderStyle)
opts->sliderStyle=SLIDER_ROUND;
@@ -1497,7 +1497,7 @@ static void checkConfig(Options *opts)
opts->colorMenubarMouseOver=true;
*/
-#if defined __cplusplus && defined QT_VERSION && QT_VERSION < 0x040000 && !defined CONFIG_DIALOG
+#if defined __cplusplus && 0x039999 < 0x040000 && !defined CONFIG_DIALOG
if(opts->round>ROUND_FULL)
opts->round=ROUND_FULL;
#endif
@@ -1528,7 +1528,7 @@ static void checkConfig(Options *opts)
opts->coloredTbarMo=true;
if(opts->round<ROUND_SLIGHT)
- opts->square|=SQUARE_POPUP_MENUS|SQUARE_TOOLTIPS;
+ opts->square|=STQUARE_POPUP_MENUS|STQUARE_TOOLTIPS;
#endif
if(opts->bgndOpacity<0 || opts->bgndOpacity>100)
@@ -1554,7 +1554,7 @@ static void checkConfig(Options *opts)
opts->activeTabAppearance=MODIFY_AGUA(opts->activeTabAppearance);
opts->menuitemAppearance=MODIFY_AGUA(opts->menuitemAppearance);
- if(!opts->borderProgress && (!opts->fillProgress || !(opts->square&SQUARE_PROGRESS)))
+ if(!opts->borderProgress && (!opts->fillProgress || !(opts->square&STQUARE_PROGRESS)))
opts->borderProgress=true;
opts->titlebarAppearance=MODIFY_AGUA(opts->titlebarAppearance);
@@ -1567,7 +1567,7 @@ static void checkConfig(Options *opts)
opts->lighterPopupMenuBgnd=0;
#ifdef __cplusplus
-#if defined QT_VERSION && QT_VERSION >= 0x040000
+#if 0x039999 >= 0x040000
if(!(opts->titlebarButtons&TITLEBAR_BUTTON_ROUND))
#endif
opts->titlebarButtonAppearance=MODIFY_AGUA(opts->titlebarButtonAppearance);
@@ -1591,7 +1591,7 @@ static void checkConfig(Options *opts)
}
#ifdef __cplusplus
-static bool readConfig(const QString &file, Options *opts, Options *defOpts=0L)
+static bool readConfig(const TQString &file, Options *opts, Options *defOpts=0L)
#else
static bool readConfig(const char *file, Options *opts, Options *defOpts)
#endif
@@ -1599,7 +1599,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
#ifdef __cplusplus
if(file.isEmpty())
{
- const char *env=getenv("QTCURVE_CONFIG_FILE");
+ const char *env=getenv("TQTCURVE_CONFIG_FILE");
if(NULL!=env)
return readConfig(env, opts, defOpts);
@@ -1609,10 +1609,10 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
if(cfgDir)
{
- QString filename(QFile::decodeName(cfgDir)+CONFIG_FILE);
+ TQString filename(TQFile::decodeName(cfgDir)+CONFIG_FILE);
- if(!QFile::exists(filename))
- filename=QFile::decodeName(cfgDir)+"../"OLD_CONFIG_FILE;
+ if(!TQFile::exists(filename))
+ filename=TQFile::decodeName(cfgDir)+"../"OLD_CONFIG_FILE;
return readConfig(filename, opts, defOpts);
}
}
@@ -1620,7 +1620,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
#else
if(!file)
{
- const char *env=getenv("QTCURVE_CONFIG_FILE");
+ const char *env=getenv("TQTCURVE_CONFIG_FILE");
if(NULL!=env)
return readConfig(env, opts, defOpts);
@@ -1646,7 +1646,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
else
{
#ifdef __cplusplus
- QtCConfig cfg(file);
+ TQtCConfig cfg(file);
if(cfg.ok())
{
@@ -1676,7 +1676,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
#else
Options newOpts;
Options *def=&newOpts;
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
opts->noDlgFixApps=NULL;
#endif
opts->noBgndGradientApps=opts->noBgndOpacityApps=opts->noMenuBgndOpacityApps=opts->noBgndImageApps=opts->noMenuStripeApps=NULL;
@@ -1724,18 +1724,18 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
if(opts->version<MAKE_VERSION(1, 4))
{
opts->square=
- (readBoolEntry(cfg, "squareLvSelection", def->square&SQUARE_LISTVIEW_SELECTION) ? SQUARE_LISTVIEW_SELECTION : SQUARE_NONE)+
- (readBoolEntry(cfg, "squareScrollViews", def->square&SQUARE_SCROLLVIEW) ? SQUARE_SCROLLVIEW : SQUARE_NONE)+
- (readBoolEntry(cfg, "squareProgress", def->square&SQUARE_PROGRESS) ? SQUARE_PROGRESS : SQUARE_NONE)+
- (readBoolEntry(cfg, "squareEntry", def->square&SQUARE_ENTRY)? SQUARE_ENTRY : SQUARE_NONE);
+ (readBoolEntry(cfg, "squareLvSelection", def->square&STQUARE_LISTVIEW_SELECTION) ? STQUARE_LISTVIEW_SELECTION : STQUARE_NONE)+
+ (readBoolEntry(cfg, "squareScrollViews", def->square&STQUARE_SCROLLVIEW) ? STQUARE_SCROLLVIEW : STQUARE_NONE)+
+ (readBoolEntry(cfg, "squareProgress", def->square&STQUARE_PROGRESS) ? STQUARE_PROGRESS : STQUARE_NONE)+
+ (readBoolEntry(cfg, "squareEntry", def->square&STQUARE_ENTRY)? STQUARE_ENTRY : STQUARE_NONE);
}
else
CFG_READ_INT(square)
if(opts->version<MAKE_VERSION(1, 6))
- opts->square|=SQUARE_TOOLTIPS;
+ opts->square|=STQUARE_TOOLTIPS;
if(opts->version<MAKE_VERSION3(1, 6, 1))
- opts->square|=SQUARE_POPUP_MENUS;
+ opts->square|=STQUARE_POPUP_MENUS;
if(opts->version<MAKE_VERSION(1, 2))
def->crSize=CR_SMALL_SIZE;
if(opts->version<MAKE_VERSION(1, 0))
@@ -1747,7 +1747,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
def->crHighlight=0;
#ifdef __cplusplus
def->dwtAppearance=APPEARANCE_FLAT;
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
def->dwtSettings=0;
#endif
#endif
@@ -1761,7 +1761,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
def->etchEntry=true;
def->gtkScrollViews=false;
def->thinSbarGroove=false;
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
def->titlebarButtons=TITLEBAR_BUTTON_HOVER_FRAME;
def->titlebarIcon=TITLEBAR_ICON_MENU_BUTTON;
#endif
@@ -1846,7 +1846,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_GRAD_TYPE(bgndGrad)
CFG_READ_GRAD_TYPE(menuBgndGrad)
CFG_READ_APPEARANCE(menuBgndAppearance, APP_ALLOW_STRIPED)
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
CFG_READ_BOOL(fixParentlessDialogs)
CFG_READ_STRING_LIST(noDlgFixApps)
#endif
@@ -1929,7 +1929,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_BOOL(darkerBorders)
CFG_READ_BOOL(vArrows)
CFG_READ_BOOL(xCheck)
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) || !defined __cplusplus
CFG_READ_BOOL(fadeLines)
CFG_READ_GLOW(glowProgress)
#endif
@@ -1966,12 +1966,12 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_INT_BOOL(windowDrag, WM_DRAG_MENUBAR)
CFG_READ_BOOL(shadePopupMenu)
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
CFG_READ_BOOL(stdBtnSizes)
CFG_READ_INT(titlebarButtons)
CFG_READ_TB_ICON(titlebarIcon)
#endif
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
CFG_READ_BOOL(xbar)
CFG_READ_INT(dwtSettings)
#endif
@@ -2001,10 +2001,10 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_INT(expanderHighlight)
CFG_READ_BOOL(mapKdeIcons)
#endif
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) || !defined __cplusplus
CFG_READ_BOOL(gtkButtonOrder)
#endif
-#if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || (defined CONFIG_DIALOG && (0x039999 >= 0x040000))
CFG_READ_BOOL(reorderGtkButtons)
#endif
CFG_READ_APPEARANCE(titlebarAppearance, APP_ALLOW_NONE)
@@ -2022,7 +2022,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
opts->inactiveTitlebarAppearance=APPEARANCE_FLAT;
#ifdef __cplusplus
CFG_READ_APPEARANCE(titlebarButtonAppearance, APP_ALLOW_BASIC)
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
if(opts->xbar && opts->menubarHiding)
opts->xbar=false;
#endif
@@ -2031,16 +2031,16 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
CFG_READ_IMAGE(bgndImage)
CFG_READ_IMAGE(menuBgndImage)
CFG_READ_STRING_LIST(noMenuStripeApps)
-#if !defined __cplusplus || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || ( (0x039999 >= 0x040000))
CFG_READ_STRING_LIST(noBgndGradientApps)
CFG_READ_STRING_LIST(noBgndOpacityApps)
CFG_READ_STRING_LIST(noMenuBgndOpacityApps)
CFG_READ_STRING_LIST(noBgndImageApps)
#endif
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
CFG_READ_STRING_LIST(menubarApps)
CFG_READ_STRING_LIST(statusbarApps)
- CFG_READ_STRING_LIST(useQtFileDialogApps)
+ CFG_READ_STRING_LIST(useTQtFileDialogApps)
CFG_READ_STRING_LIST(windowDragWhiteList)
CFG_READ_STRING_LIST(windowDragBlackList)
#endif
@@ -2048,22 +2048,22 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
readDoubleList(cfg, "customAlphas", opts->customAlphas, NUM_STD_ALPHAS);
#ifdef __cplusplus
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
if(opts->titlebarButtons&TITLEBAR_BUTTON_COLOR || opts->titlebarButtons&TITLEBAR_BUTTON_ICON_COLOR)
{
-#if (defined QT_VERSION && (QT_VERSION >= 0x040000))
- QStringList cols(readStringEntry(cfg, "titlebarButtonColors").split(',', QString::SkipEmptyParts));
+#if ( (0x039999 >= 0x040000))
+ TQStringList cols(readStringEntry(cfg, "titlebarButtonColors").split(',', TQString::SkipEmptyParts));
#else
- QStringList cols(QStringList::split(',', readStringEntry(cfg, "titlebarButtonColors")));
+ TQStringList cols(TQStringList::split(',', readStringEntry(cfg, "titlebarButtonColors")));
#endif
if(cols.count() && 0==(cols.count()%NUM_TITLEBAR_BUTTONS) && cols.count()<=(NUM_TITLEBAR_BUTTONS*3))
{
- QStringList::ConstIterator it(cols.begin()),
+ TQStringList::ConstIterator it(cols.begin()),
end(cols.end());
for(int i=0; it!=end; ++it, ++i)
{
- QColor col;
+ TQColor col;
setRgb(&col, TO_LATIN1((*it)));
opts->titlebarButtonColors[i]=col;
}
@@ -2080,14 +2080,14 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
for(i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
{
- QString gradKey;
+ TQString gradKey;
gradKey.sprintf("customgradient%d", (i-APPEARANCE_CUSTOM1)+1);
-#if (defined QT_VERSION && (QT_VERSION >= 0x040000))
- QStringList vals(readStringEntry(cfg, gradKey).split(',', QString::SkipEmptyParts));
+#if ( (0x039999 >= 0x040000))
+ TQStringList vals(readStringEntry(cfg, gradKey).split(',', TQString::SkipEmptyParts));
#else
- QStringList vals(QStringList::split(',', readStringEntry(cfg, gradKey)));
+ TQStringList vals(TQStringList::split(',', readStringEntry(cfg, gradKey)));
#endif
if(vals.size())
@@ -2095,7 +2095,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
if(vals.size()>=5)
{
- QStringList::ConstIterator it(vals.begin()),
+ TQStringList::ConstIterator it(vals.begin()),
end(vals.end());
bool ok(true),
haveAlpha(false);
@@ -2348,7 +2348,7 @@ static void defaultSettings(Options *opts)
opts->menuDelay=DEFAULT_MENU_DELAY;
opts->sliderWidth=DEFAULT_SLIDER_WIDTH;
opts->selectionAppearance=APPEARANCE_HARSH_GRADIENT;
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000)) || !defined __cplusplus
opts->round=ROUND_EXTRA;
opts->fadeLines=true;
opts->glowProgress=GLOW_NONE;
@@ -2359,7 +2359,7 @@ static void defaultSettings(Options *opts)
#ifdef __cplusplus
opts->dwtAppearance=APPEARANCE_CUSTOM1;
#endif
-#if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || (defined CONFIG_DIALOG && (0x039999 >= 0x040000))
opts->reorderGtkButtons=false;
#endif
opts->bgndImage.type=IMG_NONE;
@@ -2404,7 +2404,7 @@ static void defaultSettings(Options *opts)
opts->toolbarBorders=TB_NONE;
opts->toolbarSeparators=LINE_SUNKEN;
opts->splitters=LINE_1DOT;
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
opts->fixParentlessDialogs=false;
#ifdef __cplusplus
opts->noDlgFixApps << "kate" << "plasma" << "plasma-desktop" << "plasma-netbook";
@@ -2459,7 +2459,7 @@ static void defaultSettings(Options *opts)
opts->boldProgress=true;
opts->coloredTbarMo=false;
opts->borderSelection=false;
- opts->square=SQUARE_POPUP_MENUS;
+ opts->square=STQUARE_POPUP_MENUS;
opts->stripedSbar=false;
opts->windowDrag=WM_DRAG_NONE;
opts->shadePopupMenu=false;
@@ -2467,7 +2467,7 @@ static void defaultSettings(Options *opts)
opts->groupBox=FRAME_FADED;
opts->gbFactor=DEF_GB_FACTOR;
opts->gbLabel=GB_LBL_BOLD|GB_LBL_OUTSIDE;
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
opts->stdBtnSizes=false;
opts->titlebarButtons=TITLEBAR_BUTTON_ROUND|TITLEBAR_BUTTON_HOVER_SYMBOL;
opts->titlebarIcon=TITLEBAR_ICON_NEXT_TO_TITLE;
@@ -2494,12 +2494,12 @@ static void defaultSettings(Options *opts)
opts->titlebarAlignment=ALIGN_FULL_CENTER;
opts->titlebarEffect=EFFECT_SHADOW;
opts->centerTabText=false;
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
opts->xbar=false;
opts->dwtSettings=DWT_BUTTONS_AS_PER_TITLEBAR|DWT_ROUND_TOP_ONLY;
opts->menubarApps << "amarok" << "arora" << "kaffeine" << "kcalc" << "smplayer" << "VirtualBox";
opts->statusbarApps << "kde";
- opts->useQtFileDialogApps << "googleearth-bin";
+ opts->useTQtFileDialogApps << "googleearth-bin";
opts->noMenuBgndOpacityApps << "inkscape" << "inkscape" << "sonata" << "totem";
opts->noBgndOpacityApps << "smplayer" << "kaffeine" << "dragon" << "kscreenlocker" << "inkscape" << "inkscape" << "sonata" << "totem";
#endif
@@ -2543,7 +2543,7 @@ static void defaultSettings(Options *opts)
readConfig(systemFilename, opts, opts);
}
-#if !defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION < 0x040000)
+#if !defined CONFIG_DIALOG && (0x039999 < 0x040000)
if(FOCUS_FILLED==opts->focus)
opts->focus=FOCUS_FULL;
#endif
@@ -2628,7 +2628,7 @@ static const char *toStr(EMouseOver mo)
}
}
-static QString toStr(EAppearance exp, EAppAllow allow)
+static TQString toStr(EAppearance exp, EAppAllow allow)
{
switch(exp)
{
@@ -2669,7 +2669,7 @@ static QString toStr(EAppearance exp, EAppAllow allow)
}
default:
{
- QString app;
+ TQString app;
app.sprintf("customgradient%d", (exp-APPEARANCE_CUSTOM1)+1);
return app;
@@ -2677,15 +2677,15 @@ static QString toStr(EAppearance exp, EAppAllow allow)
}
}
-static QString toStr(const QColor &col)
+static TQString toStr(const TQColor &col)
{
- QString colorStr;
+ TQString colorStr;
colorStr.sprintf("#%02X%02X%02X", col.red(), col.green(), col.blue());
return colorStr;
}
-static QString toStr(EShade exp, const QColor &col)
+static TQString toStr(EShade exp, const TQColor &col)
{
switch(exp)
{
@@ -2960,7 +2960,7 @@ static const char * toStr(EImageType lv)
return "plainrings";
case IMG_BORDERED_RINGS:
return "rings";
- case IMG_SQUARE_RINGS:
+ case IMG_STQUARE_RINGS:
return "squarerings";
case IMG_FILE:
return "file";
@@ -2983,8 +2983,8 @@ static const char * toStr(EGlow lv)
}
}
-#if QT_VERSION >= 0x040000
-#include <QTextStream>
+#if 0x039999 >= 0x040000
+#include <TQTextStream>
#define CFG config
#else
#define CFG (*cfg)
@@ -3042,7 +3042,7 @@ static const char * toStr(EGlow lv)
if (!exportingStyle && def.ENTRY==opts.ENTRY) \
CFG.deleteEntry(#ENTRY); \
else \
- CFG.writeEntry(#ENTRY, QStringList(opts.ENTRY.toList()).join(",")); \
+ CFG.writeEntry(#ENTRY, TQStringList(opts.ENTRY.toList()).join(",")); \
bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, bool exportingStyle=false)
{
@@ -3052,10 +3052,10 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
if(cfgDir)
{
-#if QT_VERSION >= 0x040000
- KConfig defCfg(QFile::decodeName(cfgDir)+CONFIG_FILE, KConfig::SimpleConfig);
+#if 0x039999 >= 0x040000
+ KConfig defCfg(TQFile::decodeName(cfgDir)+CONFIG_FILE, KConfig::SimpleConfig);
#else
- KConfig defCfg(QFile::decodeName(cfgDir)+CONFIG_FILE, false, false);
+ KConfig defCfg(TQFile::decodeName(cfgDir)+CONFIG_FILE, false, false);
#endif
if(writeConfig(&defCfg, opts, def, exportingStyle))
@@ -3064,17 +3064,17 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
for(int i=0; oldFiles[i]; ++i)
{
- QString oldFileName(QFile::decodeName(cfgDir)+QString("../")+oldFiles[i]);
+ TQString oldFileName(TQFile::decodeName(cfgDir)+TQString("../")+oldFiles[i]);
- if(QFile::exists(oldFileName))
- QFile::remove(oldFileName);
+ if(TQFile::exists(oldFileName))
+ TQFile::remove(oldFileName);
}
}
}
}
else
{
-#if QT_VERSION >= 0x040000
+#if 0x039999 >= 0x040000
KConfigGroup config(cfg, SETTINGS_GROUP);
#else
cfg->setGroup(SETTINGS_GROUP);
@@ -3092,9 +3092,9 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_ENTRY(bgndGrad)
CFG_WRITE_ENTRY(menuBgndGrad)
CFG_WRITE_APPEARANCE_ENTRY(menuBgndAppearance, APP_ALLOW_STRIPED)
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
CFG_WRITE_ENTRY(fixParentlessDialogs)
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
CFG_WRITE_STRING_LIST_ENTRY(noDlgFixApps)
#endif
#endif
@@ -3202,14 +3202,14 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_ENTRY_NUM(windowDrag)
CFG_WRITE_ENTRY(shadePopupMenu)
CFG_WRITE_ENTRY_NUM(windowBorder)
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
CFG_WRITE_ENTRY(xbar)
CFG_WRITE_ENTRY_NUM(dwtSettings)
#endif
CFG_WRITE_ENTRY_NUM(bgndOpacity)
CFG_WRITE_ENTRY_NUM(menuBgndOpacity)
CFG_WRITE_ENTRY_NUM(dlgOpacity)
-#if defined CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if defined CONFIG_DIALOG || ( (0x039999 >= 0x040000))
CFG_WRITE_ENTRY(stdBtnSizes)
CFG_WRITE_ENTRY_NUM(titlebarButtons)
CFG_WRITE_ENTRY(titlebarIcon)
@@ -3217,15 +3217,15 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
if((opts.titlebarButtons&TITLEBAR_BUTTON_COLOR || opts.titlebarButtons&TITLEBAR_BUTTON_ICON_COLOR) &&
opts.titlebarButtonColors.size() && 0==(opts.titlebarButtonColors.size()%NUM_TITLEBAR_BUTTONS))
{
- QString val;
-#if QT_VERSION >= 0x040000
- QTextStream str(&val);
+ TQString val;
+#if 0x039999 >= 0x040000
+ TQTextStream str(&val);
#else
- QTextStream str(&val, IO_WriteOnly);
+ TQTextStream str(&val, IO_WriteOnly);
#endif
for(unsigned int i=0; i<opts.titlebarButtonColors.size(); ++i)
{
- TBCols::const_iterator c(opts.titlebarButtonColors.find((ETitleBarButtons)i));
+ TBCols::const_iterator c(opts.titlebarButtonColors.tqfind((ETitleBarButtons)i));
if(c!=opts.titlebarButtonColors.end())
{
@@ -3250,14 +3250,14 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_ENTRY(gtkComboMenus)
CFG_WRITE_ENTRY(doubleGtkComboArrow)
CFG_WRITE_ENTRY(gtkButtonOrder)
-#if !defined __cplusplus || (defined CONFIG_DIALOG && defined QT_VERSION && (QT_VERSION >= 0x040000))
+#if !defined __cplusplus || (defined CONFIG_DIALOG && (0x039999 >= 0x040000))
CFG_WRITE_ENTRY(reorderGtkButtons)
#endif
CFG_WRITE_ENTRY(mapKdeIcons)
CFG_WRITE_ENTRY(shading)
CFG_WRITE_ENTRY(titlebarAlignment)
CFG_WRITE_ENTRY(centerTabText)
-#if defined QT_VERSION && (QT_VERSION >= 0x040000)
+#if (0x039999 >= 0x040000)
CFG_WRITE_STRING_LIST_ENTRY(noBgndGradientApps)
CFG_WRITE_STRING_LIST_ENTRY(noBgndOpacityApps)
CFG_WRITE_STRING_LIST_ENTRY(noMenuBgndOpacityApps)
@@ -3265,13 +3265,13 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_STRING_LIST_ENTRY(noMenuStripeApps)
CFG_WRITE_STRING_LIST_ENTRY(menubarApps)
CFG_WRITE_STRING_LIST_ENTRY(statusbarApps)
- CFG_WRITE_STRING_LIST_ENTRY(useQtFileDialogApps)
+ CFG_WRITE_STRING_LIST_ENTRY(useTQtFileDialogApps)
#endif
for(int i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
{
- GradientCont::const_iterator cg(opts.customGradient.find((EAppearance)i));
- QString gradKey;
+ GradientCont::const_iterator cg(opts.customGradient.tqfind((EAppearance)i));
+ TQString gradKey;
gradKey.sprintf("customgradient%d", (i-APPEARANCE_CUSTOM1)+1);
@@ -3281,13 +3281,13 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
{
GradientCont::const_iterator d;
- if(exportingStyle || (d=def.customGradient.find((EAppearance)i))==def.customGradient.end() || !((*d)==(*cg)))
+ if(exportingStyle || (d=def.customGradient.tqfind((EAppearance)i))==def.customGradient.end() || !((*d)==(*cg)))
{
- QString gradVal;
-#if QT_VERSION >= 0x040000
- QTextStream str(&gradVal);
+ TQString gradVal;
+#if 0x039999 >= 0x040000
+ TQTextStream str(&gradVal);
#else
- QTextStream str(&gradVal, IO_WriteOnly);
+ TQTextStream str(&gradVal, IO_WriteOnly);
#endif
GradientStopCont stops((*cg).second.stops.fix());
GradientStopCont::const_iterator it(stops.begin()),
@@ -3323,11 +3323,11 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
opts.customShades[4]!=def.customShades[4] ||
opts.customShades[5]!=def.customShades[5])
{
- QString shadeVal;
-#if QT_VERSION >= 0x040000
- QTextStream str(&shadeVal);
+ TQString shadeVal;
+#if 0x039999 >= 0x040000
+ TQTextStream str(&shadeVal);
#else
- QTextStream str(&shadeVal, IO_WriteOnly);
+ TQTextStream str(&shadeVal, IO_WriteOnly);
#endif
if(0==opts.customShades[0])
str << 0;
diff --git a/common/config_file.c-orig b/common/config_file.c-orig
index fd51e01..499c345 100644
--- a/common/config_file.c-orig
+++ b/common/config_file.c-orig
@@ -1,5 +1,5 @@
/*
- QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk
+ TQtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk
----
@@ -29,9 +29,9 @@
#include <pwd.h>
#include <sys/types.h>
-#define QTC_MAX_FILENAME_LEN 1024
-#define QTC_MAX_INPUT_LINE_LEN 256
-#define QTC_FILE "qtcurvestylerc"
+#define TQTC_MAX_FILENAME_LEN 1024
+#define TQTC_MAX_INPUT_LINE_LEN 256
+#define TQTC_FILE "qtcurvestylerc"
#ifdef CONFIG_READ
static int c2h(char ch)
@@ -301,7 +301,7 @@ static const char * getHome()
static const char *xdgConfigFolder()
{
- static char xdgDir[QTC_MAX_FILENAME_LEN]={'\0'};
+ static char xdgDir[TQTC_MAX_FILENAME_LEN]={'\0'};
if(!xdgDir[0])
{
@@ -368,66 +368,66 @@ static const char *xdgConfigFolder()
#ifdef CONFIG_READ
#ifdef __cplusplus
-#define QTC_IS_BLACK(A) (0==(A).red() && 0==(A).green() && 0==(A).blue())
+#define TQTC_IS_BLACK(A) (0==(A).red() && 0==(A).green() && 0==(A).blue())
#else
-#define QTC_IS_BLACK(A) (0==(A).red && 0==(A).green && 0==(A).blue)
+#define TQTC_IS_BLACK(A) (0==(A).red && 0==(A).green && 0==(A).blue)
#endif
static void checkColor(EShade *s, color *c)
{
- if(SHADE_CUSTOM==*s && QTC_IS_BLACK(*c))
+ if(SHADE_CUSTOM==*s && TQTC_IS_BLACK(*c))
*s=SHADE_NONE;
}
#ifdef __cplusplus
-#if QT_VERSION >= 0x040000
-#include <QMap>
-#include <QFile>
-#include <QTextStream>
-#define QTC_LATIN1(A) A.toLatin1()
+#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000
+#include <TQMap>
+#include <TQFile>
+#include <TQTextStream>
+#define TQTC_LATIN1(A) A.toLatin1()
#else
-#define QTC_LATIN1(A) A.latin1()
+#define TQTC_LATIN1(A) A.latin1()
-#include <qmap.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqmap.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#endif
-class QtCConfig
+class TQtCConfig
{
public:
- QtCConfig(const QString &filename);
+ TQtCConfig(const TQString &filename);
bool ok() const { return values.count()>0; }
- const QString & readEntry(const char *key, const QString &def=QString::null);
+ const TQString & readEntry(const char *key, const TQString &def=TQString());
private:
- QMap<QString, QString> values;
+ TQMap<TQString, TQString> values;
};
-QtCConfig::QtCConfig(const QString &filename)
+TQtCConfig::TQtCConfig(const TQString &filename)
{
- QFile f(filename);
+ TQFile f(filename);
-#if QT_VERSION >= 0x040000
- if(f.open(QIODevice::ReadOnly))
+#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000
+ if(f.open(TQIODevice::ReadOnly))
#else
if(f.open(IO_ReadOnly))
#endif
{
- QTextStream stream(&f);
- QString line;
+ TQTextStream stream(&f);
+ TQString line;
while(!stream.atEnd())
{
line = stream.readLine();
-#if QT_VERSION >= 0x040000
+#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000
int pos=line.indexOf('=');
#else
- int pos=line.find('=');
+ int pos=line.tqfind('=');
#endif
if(-1!=pos)
values[line.left(pos)]=line.mid(pos+1);
@@ -436,43 +436,43 @@ QtCConfig::QtCConfig(const QString &filename)
}
}
-inline const QString & QtCConfig::readEntry(const char *key, const QString &def)
+inline const TQString & TQtCConfig::readEntry(const char *key, const TQString &def)
{
- return values.contains(key) ? values[key] : def;
+ return values.tqcontains(key) ? values[key] : def;
}
-inline QString readStringEntry(QtCConfig &cfg, const char *key)
+inline TQString readStringEntry(TQtCConfig &cfg, const char *key)
{
return cfg.readEntry(key);
}
-static int readNumEntry(QtCConfig &cfg, const char *key, int def)
+static int readNumEntry(TQtCConfig &cfg, const char *key, int def)
{
- const QString &val(readStringEntry(cfg, key));
+ const TQString &val(readStringEntry(cfg, key));
return val.isEmpty() ? def : val.toInt();
}
-static bool readBoolEntry(QtCConfig &cfg, const char *key, bool def)
+static bool readBoolEntry(TQtCConfig &cfg, const char *key, bool def)
{
- const QString &val(readStringEntry(cfg, key));
+ const TQString &val(readStringEntry(cfg, key));
return val.isEmpty() ? def : (val=="true" ? true : false);
}
-#if QT_VERSION >= 0x040000
-#define QTC_LATIN1(A) A.toLatin1()
+#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000
+#define TQTC_LATIN1(A) A.toLatin1()
#else
-#define QTC_LATIN1(A) A.latin1()
+#define TQTC_LATIN1(A) A.latin1()
#endif
-#define QTC_CFG_READ_COLOR(ENTRY) \
+#define TQTC_CFG_READ_COLOR(ENTRY) \
{ \
- QString sVal(cfg.readEntry(#ENTRY)); \
+ TQString sVal(cfg.readEntry(#ENTRY)); \
if(sVal.isEmpty()) \
opts->ENTRY=def->ENTRY; \
else \
- setRgb(&(opts->ENTRY), QTC_LATIN1(sVal)); \
+ setRgb(&(opts->ENTRY), TQTC_LATIN1(sVal)); \
}
#else
@@ -502,9 +502,9 @@ static GHashTable * loadConfig(const char *filename)
if(f)
{
- char line[QTC_MAX_INPUT_LINE_LEN];
+ char line[TQTC_MAX_INPUT_LINE_LEN];
- while(NULL!=fgets(line, QTC_MAX_INPUT_LINE_LEN-1, f))
+ while(NULL!=fgets(line, TQTC_MAX_INPUT_LINE_LEN-1, f))
{
char *eq=strchr(line, '=');
int pos=eq ? eq-line : -1;
@@ -552,9 +552,9 @@ static gboolean readBoolEntry(GHashTable *cfg, char *key, gboolean def)
return str ? (0==memcmp(str, "true", 4) ? true : false) : def;
}
-#define QTC_LATIN1(A) A
+#define TQTC_LATIN1(A) A
-#define QTC_CFG_READ_COLOR(ENTRY) \
+#define TQTC_CFG_READ_COLOR(ENTRY) \
{ \
const char *str=readStringEntry(cfg, #ENTRY); \
\
@@ -565,63 +565,63 @@ static gboolean readBoolEntry(GHashTable *cfg, char *key, gboolean def)
}
#endif
-#define QTC_CFG_READ_NUM(ENTRY) \
+#define TQTC_CFG_READ_NUM(ENTRY) \
opts->ENTRY=readNumEntry(cfg, #ENTRY, def->ENTRY);
-#define QTC_CFG_READ_BOOL(ENTRY) \
+#define TQTC_CFG_READ_BOOL(ENTRY) \
opts->ENTRY=readBoolEntry(cfg, #ENTRY, def->ENTRY);
-#define QTC_CFG_READ_ROUND(ENTRY) \
- opts->ENTRY=toRound(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_ROUND(ENTRY) \
+ opts->ENTRY=toRound(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_DI(ENTRY) \
+#define TQTC_CFG_READ_DI(ENTRY) \
opts->ENTRY=((double)(readNumEntry(cfg, #ENTRY, ((int)(def->ENTRY*100))-100)+100))/100.0;
-#define QTC_CFG_READ_TB_BORDER(ENTRY) \
- opts->ENTRY=toTBarBorder(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_TB_BORDER(ENTRY) \
+ opts->ENTRY=toTBarBorder(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_MOUSE_OVER(ENTRY) \
- opts->ENTRY=toMouseOver(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_MOUSE_OVER(ENTRY) \
+ opts->ENTRY=toMouseOver(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_APPEARANCE(ENTRY, DEF) \
- opts->ENTRY=toAppearance(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), DEF);
+#define TQTC_CFG_READ_APPEARANCE(ENTRY, DEF) \
+ opts->ENTRY=toAppearance(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), DEF);
/*
-#define QTC_CFG_READ_APPEARANCE(ENTRY) \
- opts->ENTRY=toAppearance(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_APPEARANCE(ENTRY) \
+ opts->ENTRY=toAppearance(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
*/
-#define QTC_CFG_READ_STRIPE(ENTRY) \
- opts->ENTRY=toStripe(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_STRIPE(ENTRY) \
+ opts->ENTRY=toStripe(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_SLIDER(ENTRY) \
- opts->ENTRY=toSlider(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_SLIDER(ENTRY) \
+ opts->ENTRY=toSlider(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_DEF_BTN(ENTRY) \
- opts->ENTRY=toInd(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_DEF_BTN(ENTRY) \
+ opts->ENTRY=toInd(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_LINE(ENTRY) \
- opts->ENTRY=toLine(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_LINE(ENTRY) \
+ opts->ENTRY=toLine(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_SHADE(ENTRY, AD) \
- opts->ENTRY=toShade(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), AD, def->ENTRY);
+#define TQTC_CFG_READ_SHADE(ENTRY, AD) \
+ opts->ENTRY=toShade(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), AD, def->ENTRY);
-#define QTC_CFG_READ_SCROLLBAR(ENTRY) \
- opts->ENTRY=toScrollbar(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_SCROLLBAR(ENTRY) \
+ opts->ENTRY=toScrollbar(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#define QTC_CFG_READ_EFFECT(ENTRY) \
- opts->ENTRY=toEffect(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#define TQTC_CFG_READ_EFFECT(ENTRY) \
+ opts->ENTRY=toEffect(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
-#ifdef QTC_CONFIG_DIALOG
-#define QTC_CFG_READ_SHADING(ENTRY, UNUSED) \
- opts->ENTRY=toShading(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
+#ifdef TQTC_CONFIG_DIALOG
+#define TQTC_CFG_READ_SHADING(ENTRY, UNUSED) \
+ opts->ENTRY=toShading(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), def->ENTRY);
#else
-#define QTC_CFG_READ_SHADING(ENTRY, DEF) \
- ENTRY=toShading(QTC_LATIN1(readStringEntry(cfg, #ENTRY)), DEF);
+#define TQTC_CFG_READ_SHADING(ENTRY, DEF) \
+ ENTRY=toShading(TQTC_LATIN1(readStringEntry(cfg, #ENTRY)), DEF);
#endif
#ifdef __cplusplus
-static bool readConfig(const QString &file, Options *opts, Options *def)
+static bool readConfig(const TQString &file, Options *opts, Options *def)
#else
static bool readConfig(const char *file, Options *opts, Options *def)
#endif
@@ -633,9 +633,9 @@ static bool readConfig(const char *file, Options *opts, Options *def)
if(xdg)
{
- QString filename(xdg);
+ TQString filename(xdg);
- filename+="/"QTC_FILE;
+ filename+="/"TQTC_FILE;
return readConfig(filename, opts, def);
}
}
@@ -646,9 +646,9 @@ static bool readConfig(const char *file, Options *opts, Options *def)
if(xdg)
{
- char filename[QTC_MAX_FILENAME_LEN];
+ char filename[TQTC_MAX_FILENAME_LEN];
- sprintf(filename, "%s/"QTC_FILE, xdg);
+ sprintf(filename, "%s/"TQTC_FILE, xdg);
return readConfig(filename, opts, def);
}
}
@@ -656,7 +656,7 @@ static bool readConfig(const char *file, Options *opts, Options *def)
else
{
#ifdef __cplusplus
- QtCConfig cfg(file);
+ TQtCConfig cfg(file);
if(cfg.ok())
{
@@ -666,77 +666,77 @@ static bool readConfig(const char *file, Options *opts, Options *def)
if(cfg)
{
#endif
- QTC_CFG_READ_NUM(passwordChar)
- QTC_CFG_READ_ROUND(round)
- QTC_CFG_READ_DI(highlightFactor)
- QTC_CFG_READ_TB_BORDER(toolbarBorders)
- QTC_CFG_READ_APPEARANCE(appearance, def->appearance)
- QTC_CFG_READ_BOOL(fixParentlessDialogs)
- QTC_CFG_READ_STRIPE(stripedProgress)
- QTC_CFG_READ_SLIDER(sliderStyle)
- QTC_CFG_READ_BOOL(animatedProgress)
- QTC_CFG_READ_BOOL(lighterPopupMenuBgnd)
- QTC_CFG_READ_BOOL(embolden)
- QTC_CFG_READ_DEF_BTN(defBtnIndicator)
- QTC_CFG_READ_LINE(sliderThumbs)
- QTC_CFG_READ_LINE(handles)
- QTC_CFG_READ_BOOL(highlightTab)
- QTC_CFG_READ_BOOL(colorSelTab)
- QTC_CFG_READ_SHADE(shadeSliders, false)
- QTC_CFG_READ_SHADE(shadeMenubars, true)
- QTC_CFG_READ_SHADE(shadeCheckRadio, false)
- QTC_CFG_READ_APPEARANCE(menubarAppearance, def->menubarAppearance)
- QTC_CFG_READ_APPEARANCE(menuitemAppearance, opts->appearance)
- QTC_CFG_READ_APPEARANCE(toolbarAppearance, def->toolbarAppearance)
- QTC_CFG_READ_LINE(toolbarSeparators)
- QTC_CFG_READ_LINE(splitters)
- QTC_CFG_READ_BOOL(customMenuTextColor)
- QTC_CFG_READ_MOUSE_OVER(coloredMouseOver)
- QTC_CFG_READ_BOOL(menubarMouseOver)
- QTC_CFG_READ_BOOL(shadeMenubarOnlyWhenActive)
- QTC_CFG_READ_BOOL(thinnerMenuItems)
- QTC_CFG_READ_COLOR(customSlidersColor)
- QTC_CFG_READ_COLOR(customMenubarsColor)
- QTC_CFG_READ_COLOR(customMenuSelTextColor)
- QTC_CFG_READ_COLOR(customMenuNormTextColor)
- QTC_CFG_READ_COLOR(customCheckRadioColor)
- QTC_CFG_READ_SCROLLBAR(scrollbarType)
- QTC_CFG_READ_EFFECT(buttonEffect)
- QTC_CFG_READ_APPEARANCE(lvAppearance, opts->appearance)
- QTC_CFG_READ_APPEARANCE(tabAppearance, opts->appearance)
- QTC_CFG_READ_APPEARANCE(sliderAppearance, opts->appearance)
- QTC_CFG_READ_APPEARANCE(progressAppearance, opts->appearance)
-#ifndef QTC_PLAIN_FOCUS_ONLY
- QTC_CFG_READ_BOOL(stdFocus)
+ TQTC_CFG_READ_NUM(passwordChar)
+ TQTC_CFG_READ_ROUND(round)
+ TQTC_CFG_READ_DI(highlightFactor)
+ TQTC_CFG_READ_TB_BORDER(toolbarBorders)
+ TQTC_CFG_READ_APPEARANCE(appearance, def->appearance)
+ TQTC_CFG_READ_BOOL(fixParentlessDialogs)
+ TQTC_CFG_READ_STRIPE(stripedProgress)
+ TQTC_CFG_READ_SLIDER(sliderStyle)
+ TQTC_CFG_READ_BOOL(animatedProgress)
+ TQTC_CFG_READ_BOOL(lighterPopupMenuBgnd)
+ TQTC_CFG_READ_BOOL(embolden)
+ TQTC_CFG_READ_DEF_BTN(defBtnIndicator)
+ TQTC_CFG_READ_LINE(sliderThumbs)
+ TQTC_CFG_READ_LINE(handles)
+ TQTC_CFG_READ_BOOL(highlightTab)
+ TQTC_CFG_READ_BOOL(colorSelTab)
+ TQTC_CFG_READ_SHADE(shadeSliders, false)
+ TQTC_CFG_READ_SHADE(shadeMenubars, true)
+ TQTC_CFG_READ_SHADE(shadeCheckRadio, false)
+ TQTC_CFG_READ_APPEARANCE(menubarAppearance, def->menubarAppearance)
+ TQTC_CFG_READ_APPEARANCE(menuitemAppearance, opts->appearance)
+ TQTC_CFG_READ_APPEARANCE(toolbarAppearance, def->toolbarAppearance)
+ TQTC_CFG_READ_LINE(toolbarSeparators)
+ TQTC_CFG_READ_LINE(splitters)
+ TQTC_CFG_READ_BOOL(customMenuTextColor)
+ TQTC_CFG_READ_MOUSE_OVER(coloredMouseOver)
+ TQTC_CFG_READ_BOOL(menubarMouseOver)
+ TQTC_CFG_READ_BOOL(shadeMenubarOnlyWhenActive)
+ TQTC_CFG_READ_BOOL(thinnerMenuItems)
+ TQTC_CFG_READ_COLOR(customSlidersColor)
+ TQTC_CFG_READ_COLOR(customMenubarsColor)
+ TQTC_CFG_READ_COLOR(customMenuSelTextColor)
+ TQTC_CFG_READ_COLOR(customMenuNormTextColor)
+ TQTC_CFG_READ_COLOR(customCheckRadioColor)
+ TQTC_CFG_READ_SCROLLBAR(scrollbarType)
+ TQTC_CFG_READ_EFFECT(buttonEffect)
+ TQTC_CFG_READ_APPEARANCE(lvAppearance, opts->appearance)
+ TQTC_CFG_READ_APPEARANCE(tabAppearance, opts->appearance)
+ TQTC_CFG_READ_APPEARANCE(sliderAppearance, opts->appearance)
+ TQTC_CFG_READ_APPEARANCE(progressAppearance, opts->appearance)
+#ifndef TQTC_PLAIN_FOCUS_ONLY
+ TQTC_CFG_READ_BOOL(stdFocus)
#endif
- QTC_CFG_READ_BOOL(lvLines)
- QTC_CFG_READ_BOOL(drawStatusBarFrames)
- QTC_CFG_READ_BOOL(fillSlider)
- QTC_CFG_READ_BOOL(roundMbTopOnly)
- QTC_CFG_READ_BOOL(borderMenuitems)
- QTC_CFG_READ_BOOL(gradientPbGroove)
- QTC_CFG_READ_BOOL(darkerBorders)
- QTC_CFG_READ_BOOL(vArrows)
- QTC_CFG_READ_BOOL(xCheck)
- QTC_CFG_READ_BOOL(framelessGroupBoxes)
- QTC_CFG_READ_BOOL(inactiveHighlight)
- QTC_CFG_READ_BOOL(colorMenubarMouseOver)
+ TQTC_CFG_READ_BOOL(lvLines)
+ TQTC_CFG_READ_BOOL(drawStatusBarFrames)
+ TQTC_CFG_READ_BOOL(fillSlider)
+ TQTC_CFG_READ_BOOL(roundMbTopOnly)
+ TQTC_CFG_READ_BOOL(borderMenuitems)
+ TQTC_CFG_READ_BOOL(gradientPbGroove)
+ TQTC_CFG_READ_BOOL(darkerBorders)
+ TQTC_CFG_READ_BOOL(vArrows)
+ TQTC_CFG_READ_BOOL(xCheck)
+ TQTC_CFG_READ_BOOL(framelessGroupBoxes)
+ TQTC_CFG_READ_BOOL(inactiveHighlight)
+ TQTC_CFG_READ_BOOL(colorMenubarMouseOver)
#ifdef __cplusplus
- QTC_CFG_READ_BOOL(stdSidebarButtons)
- QTC_CFG_READ_BOOL(gtkScrollViews)
- QTC_CFG_READ_BOOL(gtkComboMenus)
+ TQTC_CFG_READ_BOOL(stdSidebarButtons)
+ TQTC_CFG_READ_BOOL(gtkScrollViews)
+ TQTC_CFG_READ_BOOL(gtkComboMenus)
/*
#else
- QTC_CFG_READ_BOOL(setDialogButtonOrder)
+ TQTC_CFG_READ_BOOL(setDialogButtonOrder)
*/
#endif
-#if !defined __cplusplus || defined QTC_CONFIG_DIALOG
- QTC_CFG_READ_BOOL(mapKdeIcons)
+#if !defined __cplusplus || defined TQTC_CONFIG_DIALOG
+ TQTC_CFG_READ_BOOL(mapKdeIcons)
#endif
-#if defined QTC_CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
- QTC_CFG_READ_BOOL(gtkButtonOrder)
+#if defined TQTC_CONFIG_DIALOG || (defined [[[TQT_VERSION IS DEPRECATED]]] && ([[[TQT_VERSION IS DEPRECATED]]] >= 0x040000)) || !defined __cplusplus
+ TQTC_CFG_READ_BOOL(gtkButtonOrder)
#endif
- QTC_CFG_READ_SHADING(shading, shading);
+ TQTC_CFG_READ_SHADING(shading, shading);
#ifndef __cplusplus
releaseConfig(cfg);
@@ -793,7 +793,7 @@ static bool fileExists(const char *path)
static const char * getSystemConfigFile()
{
- static const char * constFiles[]={ "/etc/qt4/"QTC_FILE, "/etc/qt3/"QTC_FILE, "/etc/qt/"QTC_FILE, NULL };
+ static const char * constFiles[]={ "/etc/qt4/"TQTC_FILE, "/etc/qt3/"TQTC_FILE, "/etc/qt/"TQTC_FILE, NULL };
int i;
@@ -842,7 +842,7 @@ static void defaultSettings(Options *opts)
opts->thinnerMenuItems=false;
opts->scrollbarType=SCROLLBAR_KDE;
opts->buttonEffect=EFFECT_NONE;
-#ifndef QTC_PLAIN_FOCUS_ONLY
+#ifndef TQTC_PLAIN_FOCUS_ONLY
opts->stdFocus=true;
#endif
opts->lvLines=false;
@@ -857,7 +857,7 @@ static void defaultSettings(Options *opts)
opts->framelessGroupBoxes=false;
opts->colorMenubarMouseOver=false;
opts->inactiveHighlight=false;
-#ifdef QTC_CONFIG_DIALOG
+#ifdef TQTC_CONFIG_DIALOG
opts->shading=SHADING_HSL;
#endif
#ifdef __cplusplus
@@ -880,10 +880,10 @@ static void defaultSettings(Options *opts)
opts->customCheckRadioColor.red=opts->customCheckRadioColor.green=opts->customCheckRadioColor.blue=0;
#endif
-#if !defined __cplusplus || defined QTC_CONFIG_DIALOG
+#if !defined __cplusplus || defined TQTC_CONFIG_DIALOG
opts->mapKdeIcons=true;
#endif
-#if defined QTC_CONFIG_DIALOG || (defined QT_VERSION && (QT_VERSION >= 0x040000)) || !defined __cplusplus
+#if defined TQTC_CONFIG_DIALOG || (defined [[[TQT_VERSION IS DEPRECATED]]] && ([[[TQT_VERSION IS DEPRECATED]]] >= 0x040000)) || !defined __cplusplus
opts->gtkButtonOrder=false;
#endif
@@ -1050,9 +1050,9 @@ static const char *toStr(EEffect e)
inline const char * toStr(bool b) { return b ? "true" : "false"; }
-static QString toStr(const QColor &col)
+static TQString toStr(const TQColor &col)
{
- QString colorStr;
+ TQString colorStr;
colorStr.sprintf("#%02X%02X%02X", col.red(), col.green(), col.blue());
return colorStr;
@@ -1100,7 +1100,7 @@ static const char *toStr(ESliderStyle s)
}
}
-#if QT_VERSION >= 0x040000
+#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000
#define CFG config
#else
#define CFG (*cfg)
@@ -1147,11 +1147,11 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
if(xdg)
{
- char filename[QTC_MAX_FILENAME_LEN];
+ char filename[TQTC_MAX_FILENAME_LEN];
- sprintf(filename, "%s/"QTC_FILE, xdg);
+ sprintf(filename, "%s/"TQTC_FILE, xdg);
-#if QT_VERSION >= 0x040000
+#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000
KConfig defCfg(filename, KConfig::SimpleConfig);
#else
KConfig defCfg(filename, false, false);
@@ -1162,10 +1162,10 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
}
else
{
-#if QT_VERSION >= 0x040000
- KConfigGroup config(cfg, QTC_GROUP);
+#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x040000
+ KConfigGroup config(cfg, TQTC_GROUP);
#else
- cfg->setGroup(QTC_GROUP);
+ cfg->setGroup(TQTC_GROUP);
#endif
CFG_WRITE_ENTRY_NUM(passwordChar)
CFG_WRITE_ENTRY(round)
@@ -1207,7 +1207,7 @@ bool static writeConfig(KConfig *cfg, const Options &opts, const Options &def, b
CFG_WRITE_ENTRY_FORCE(tabAppearance)
CFG_WRITE_ENTRY_FORCE(sliderAppearance)
CFG_WRITE_ENTRY_FORCE(progressAppearance)
-#ifndef QTC_PLAIN_FOCUS_ONLY
+#ifndef TQTC_PLAIN_FOCUS_ONLY
CFG_WRITE_ENTRY(stdFocus)
#endif
CFG_WRITE_ENTRY(lvLines)
diff --git a/style/pixmaps.h b/style/pixmaps.h
index ff34491..9e82bdd 100644
--- a/style/pixmaps.h
+++ b/style/pixmaps.h
@@ -1,5 +1,5 @@
-#ifndef _QEMBED_1804289383
-#define _QEMBED_1804289383
+#ifndef _TQEMBED_1804289383
+#define _TQEMBED_1804289383
static const unsigned int radio_frame_png_len = 419;
static const unsigned char radio_frame_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
@@ -215,8 +215,8 @@ static const unsigned char dot_png_data[] = {
0xae,0x42,0x60,0x82
};
-#include <qcstring.h>
-#include <qdict.h>
+#include <tqcstring.h>
+#include <tqdict.h>
static struct Embed {
unsigned int size;
const unsigned char *data;
@@ -235,14 +235,14 @@ static struct Embed {
{ 0, 0, 0 }
};
-static const QByteArray& qembed_findData( const char* name )
+static const TQByteArray& qembed_findData( const char* name )
{
- static QDict<QByteArray> dict;
- QByteArray* ba = dict.find( name );
+ static TQDict<TQByteArray> dict;
+ TQByteArray* ba = dict.tqfind( name );
if ( !ba ) {
for ( int i = 0; embed_vec[i].data; i++ ) {
if ( strcmp(embed_vec[i].name, name) == 0 ) {
- ba = new QByteArray;
+ ba = new TQByteArray;
ba->setRawData( (char*)embed_vec[i].data,
embed_vec[i].size );
dict.insert( name, ba );
@@ -250,7 +250,7 @@ static const QByteArray& qembed_findData( const char* name )
}
}
if ( !ba ) {
- static QByteArray dummy;
+ static TQByteArray dummy;
return dummy;
}
}
diff --git a/style/qtc_fixx11h.h b/style/qtc_fixx11h.h
index ec8e53a..efa125a 100644
--- a/style/qtc_fixx11h.h
+++ b/style/qtc_fixx11h.h
@@ -16,7 +16,7 @@
symbols may now refer to different variables
(e.g. if X11 #defined NoButton, after this file
is included NoButton would no longer be X11's
- NoButton, but Qt::NoButton instead). At this time,
+ NoButton, but TQt::NoButton instead). At this time,
there's no conflict known that could cause problems.
The original X11 symbols are still accessible
@@ -168,25 +168,25 @@ const int GrayScale = XGrayScale;
#endif
// Affects: Should be without side effects.
-#ifdef Status
-#ifndef FIXX11H_Status
-#define FIXX11H_Status
-typedef Status XStatus;
-#undef Status
-typedef XStatus Status;
+#ifdef tqStatus
+#ifndef FIXX11H_tqStatus
+#define FIXX11H_tqStatus
+typedef tqStatus XtqStatus;
+#undef tqStatus
+typedef XtqStatus tqStatus;
#endif
-#undef Status
+#undef tqStatus
#endif
// Affects: Should be without side effects.
-#ifdef CursorShape
-#ifndef FIXX11H_CursorShape
-#define FIXX11H_CursorShape
-const int XCursorShape = CursorShape;
-#undef CursorShape
-const int CursorShape = CursorShape;
+#ifdef tqCursorShape
+#ifndef FIXX11H_tqCursorShape
+#define FIXX11H_tqCursorShape
+const int XtqCursorShape = tqCursorShape;
+#undef tqCursorShape
+const int tqCursorShape = tqCursorShape;
#endif
-#undef CursorShape
+#undef tqCursorShape
#endif
// template --->
diff --git a/style/qtc_kstyle.cpp b/style/qtc_kstyle.cpp
index da7e9e1..88de679 100644
--- a/style/qtc_kstyle.cpp
+++ b/style/qtc_kstyle.cpp
@@ -1,9 +1,9 @@
/*
*
- * QtCKStyle
+ * TQtCKStyle
* Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
*
- * 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.
@@ -25,25 +25,25 @@
#include "qtc_kstyle.h"
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qcleanuphandler.h>
-#include <qmap.h>
-#include <qimage.h>
-#include <qlistview.h>
-#include <qmenubar.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qprogressbar.h>
-#include <qscrollbar.h>
-#include <qsettings.h>
-#include <qslider.h>
-#include <qstylefactory.h>
-#include <qtabbar.h>
-#include <qtoolbar.h>
-
-#ifdef Q_WS_X11
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqcleanuphandler.h>
+#include <tqmap.h>
+#include <tqimage.h>
+#include <tqlistview.h>
+#include <tqmenubar.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqprogressbar.h>
+#include <tqscrollbar.h>
+#include <tqsettings.h>
+#include <tqslider.h>
+#include <tqstylefactory.h>
+#include <tqtabbar.h>
+#include <tqtoolbar.h>
+
+#ifdef TQ_WS_X11
# include <X11/Xlib.h>
# ifdef HAVE_XRENDER
# include <X11/extensions/Xrender.h> // schroder
@@ -56,7 +56,7 @@
#include <limits.h>
-struct QtCKStylePrivate
+struct TQtCKStylePrivate
{
bool highcolor : 1;
bool useFilledFrameWorkaround : 1;
@@ -68,40 +68,40 @@ struct QtCKStylePrivate
int popupMenuDelay;
float menuOpacity;
- QtCKStyle::KStyleScrollBarType scrollbarType;
- QtCKStyle::KStyleFlags flags;
+ TQtCKStyle::KStyleScrollBarType scrollbarType;
+ TQtCKStyle::KStyleFlags flags;
//For KPE_ListViewBranch
- QBitmap *verticalLine;
- QBitmap *horizontalLine;
+ TQBitmap *verticalLine;
+ TQBitmap *horizontalLine;
};
// -----------------------------------------------------------------------------
-QtCKStyle::QtCKStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
- : QCommonStyle(), d(new QtCKStylePrivate)
+TQtCKStyle::TQtCKStyle( KStyleFlags flags, KStyleScrollBarType sbtype )
+ : TQCommonStyle(), d(new TQtCKStylePrivate)
{
d->flags = flags;
d->useFilledFrameWorkaround = (flags & FilledFrameWorkaround);
d->scrollbarType = sbtype;
- d->highcolor = QPixmap::defaultDepth() > 8;
+ d->highcolor = TQPixmap::defaultDepth() > 8;
// Read style settings
- QSettings settings;
- d->popupMenuDelay = settings.readNumEntry ("/QtCKStyle/Settings/PopupMenuDelay", 256);
- d->sloppySubMenus = settings.readBoolEntry("/QtCKStyle/Settings/SloppySubMenus", false);
- d->etchDisabledText = settings.readBoolEntry("/QtCKStyle/Settings/EtchDisabledText", true);
- d->menuAltKeyNavigation = settings.readBoolEntry("/QtCKStyle/Settings/MenuAltKeyNavigation", true);
- d->scrollablePopupmenus = settings.readBoolEntry("/QtCKStyle/Settings/ScrollablePopupMenus", false);
- d->menuDropShadow = settings.readBoolEntry("/QtCKStyle/Settings/MenuDropShadow", false);
+ TQSettings settings;
+ d->popupMenuDelay = settings.readNumEntry ("/TQtCKStyle/Settings/PopupMenuDelay", 256);
+ d->sloppySubMenus = settings.readBoolEntry("/TQtCKStyle/Settings/SloppySubMenus", false);
+ d->etchDisabledText = settings.readBoolEntry("/TQtCKStyle/Settings/EtchDisabledText", true);
+ d->menuAltKeyNavigation = settings.readBoolEntry("/TQtCKStyle/Settings/MenuAltKeyNavigation", true);
+ d->scrollablePopupmenus = settings.readBoolEntry("/TQtCKStyle/Settings/ScrollablePopupMenus", false);
+ d->menuDropShadow = settings.readBoolEntry("/TQtCKStyle/Settings/MenuDropShadow", false);
d->verticalLine = 0;
d->horizontalLine = 0;
}
-QtCKStyle::~QtCKStyle()
+TQtCKStyle::~TQtCKStyle()
{
delete d->verticalLine;
delete d->horizontalLine;
@@ -110,35 +110,35 @@ QtCKStyle::~QtCKStyle()
}
-QString QtCKStyle::defaultStyle()
+TQString TQtCKStyle::defaultStyle()
{
- if (QPixmap::defaultDepth() > 8)
- return QString("plastik");
+ if (TQPixmap::defaultDepth() > 8)
+ return TQString("plastik");
else
- return QString("light, 3rd revision");
+ return TQString("light, 3rd revision");
}
-void QtCKStyle::polish( QWidget* widget )
+void TQtCKStyle::polish( TQWidget* widget )
{
if ( d->useFilledFrameWorkaround )
{
- if ( QFrame *frame = ::qt_cast< QFrame* >( widget ) ) {
- QFrame::Shape shape = frame->frameShape();
- if (shape == QFrame::ToolBarPanel || shape == QFrame::MenuBarPanel)
+ if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) {
+ TQFrame::Shape tqshape = frame->frameShape();
+ if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel)
widget->installEventFilter(this);
}
}
}
-void QtCKStyle::unPolish( QWidget* widget )
+void TQtCKStyle::unPolish( TQWidget* widget )
{
if ( d->useFilledFrameWorkaround )
{
- if ( QFrame *frame = ::qt_cast< QFrame* >( widget ) ) {
- QFrame::Shape shape = frame->frameShape();
- if (shape == QFrame::ToolBarPanel || shape == QFrame::MenuBarPanel)
+ if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) {
+ TQFrame::Shape tqshape = frame->frameShape();
+ if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel)
widget->removeEventFilter(this);
}
}
@@ -146,7 +146,7 @@ void QtCKStyle::unPolish( QWidget* widget )
// Style changes (should) always re-polish popups.
-void QtCKStyle::polishPopupMenu( QPopupMenu* p )
+void TQtCKStyle::polishPopupMenu( TQPopupMenu* p )
{
if (!p->testWState( WState_Polished ))
p->setCheckable(true);
@@ -154,26 +154,26 @@ void QtCKStyle::polishPopupMenu( QPopupMenu* p )
// -----------------------------------------------------------------------------
-// QtCKStyle extensions
+// TQtCKStyle extensions
// -----------------------------------------------------------------------------
-void QtCKStyle::setScrollBarType(KStyleScrollBarType sbtype)
+void TQtCKStyle::setScrollBarType(KStyleScrollBarType sbtype)
{
d->scrollbarType = sbtype;
}
-QtCKStyle::KStyleFlags QtCKStyle::styleFlags() const
+TQtCKStyle::KStyleFlags TQtCKStyle::styleFlags() const
{
return d->flags;
}
-void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+void TQtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& /* opt */ ) const
+ const TQStyleOption& /* opt */ ) const
{
switch( kpe )
{
@@ -183,7 +183,7 @@ void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
case KPE_DockWindowHandle: {
// Draws a nice DockWindow handle including the dock title.
- QWidget* wid = const_cast<QWidget*>(widget);
+ TQWidget* wid = const_cast<TQWidget*>(widget);
bool horizontal = flags & Style_Horizontal;
int x,y,w,h,x2,y2;
@@ -197,23 +197,23 @@ void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
x2 = x + w - 1;
y2 = y + h - 1;
- QFont fnt;
- fnt = QApplication::font(wid);
+ TQFont fnt;
+ fnt = TQApplication::font(wid);
fnt.setPointSize( fnt.pointSize()-2 );
// Draw the item on an off-screen pixmap
// to preserve Xft antialiasing for
// vertically oriented handles.
- QPixmap pix;
+ TQPixmap pix;
if (horizontal)
pix.resize( h-2, w-2 );
else
pix.resize( w-2, h-2 );
- QString title = wid->parentWidget()->caption();
- QPainter p2;
+ TQString title = wid->tqparentWidget()->caption();
+ TQPainter p2;
p2.begin(&pix);
- p2.fillRect(pix.rect(), cg.brush(QColorGroup::Highlight));
+ p2.fillRect(pix.rect(), cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.setFont(fnt);
p2.drawText(pix.rect(), AlignCenter, title);
@@ -228,9 +228,9 @@ void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
p->drawLine(x2, y+1, x2, y2);
if (horizontal) {
- QWMatrix m;
+ TQWMatrix m;
m.rotate(-90.0);
- QPixmap vpix = pix.xForm(m);
+ TQPixmap vpix = pix.xForm(m);
bitBlt(wid, r.x()+1, r.y()+1, &vpix);
} else
bitBlt(wid, r.x()+1, r.y()+1, &pix);
@@ -241,7 +241,7 @@ void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
/*
* KPE_ListViewExpander and KPE_ListViewBranch are based on code from
- * QWindowStyle's CC_ListView, kindly donated by TrollTech.
+ * TQWindowStyle's CC_ListView, kindly donated by TrollTech.
* CC_ListView code is Copyright (C) 1998-2000 TrollTech AS.
*/
@@ -271,10 +271,10 @@ void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
// make 128*1 and 1*128 bitmaps that can be used for
// drawing the right sort of lines.
- d->verticalLine = new QBitmap( 1, 129, true );
- d->horizontalLine = new QBitmap( 128, 1, true );
- QPointArray a( 64 );
- QPainter p2;
+ d->verticalLine = new TQBitmap( 1, 129, true );
+ d->horizontalLine = new TQBitmap( 128, 1, true );
+ TQPointArray a( 64 );
+ TQPainter p2;
p2.begin( d->verticalLine );
int i;
@@ -283,7 +283,7 @@ void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
d->verticalLine->setMask( *d->verticalLine );
p2.begin( d->horizontalLine );
@@ -292,7 +292,7 @@ void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
p2.setPen( color1 );
p2.drawPoints( a );
p2.end();
- QApplication::flushX();
+ TQApplication::flushX();
d->horizontalLine->setMask( *d->horizontalLine );
}
@@ -347,13 +347,13 @@ void QtCKStyle::drawKStylePrimitive( KStylePrimitive kpe,
break;
default:
- p->fillRect(r, Qt::yellow); // Something really bad happened - highlight.
+ p->fillRect(r, TQt::yellow); // Something really bad happened - highlight.
break;
}
}
-int QtCKStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget* /* widget */) const
+int TQtCKStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) const
{
int value;
switch(kpm)
@@ -380,35 +380,35 @@ int QtCKStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget* /* widget */)
// -----------------------------------------------------------------------------
-void QtCKStyle::drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect &r,
- const QColorGroup &cg,
+void TQtCKStyle::drawPrimitive( PrimitiveElement pe,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
// TOOLBAR/DOCK WINDOW HANDLE
// ------------------------------------------------------------------------
if (pe == PE_DockWindowHandle)
{
// Wild workarounds are here. Beware.
- QWidget *widget, *parent;
+ TQWidget *widget, *tqparent;
- if (p && p->device()->devType() == QInternal::Widget) {
- widget = static_cast<QWidget*>(p->device());
- parent = widget->parentWidget();
+ if (p && p->device()->devType() == TQInternal::Widget) {
+ widget = static_cast<TQWidget*>(p->device());
+ tqparent = widget->tqparentWidget();
} else
return; // Don't paint on non-widgets
// Check if we are a normal toolbar or a hidden dockwidget.
- if ( parent &&
- (parent->inherits("QToolBar") || // Normal toolbar
- (parent->inherits("QMainWindow")) )) // Collapsed dock
+ if ( tqparent &&
+ (tqparent->inherits(TQTOOLBAR_OBJECT_NAME_STRING) || // Normal toolbar
+ (tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock
// Draw a toolbar handle
drawKStylePrimitive( KPE_ToolBarHandle, p, widget, r, cg, flags, opt );
- else if ( widget->inherits("QDockWindowHandle") )
+ else if ( widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
// Draw a dock window handle
drawKStylePrimitive( KPE_DockWindowHandle, p, widget, r, cg, flags, opt );
@@ -418,32 +418,32 @@ void QtCKStyle::drawPrimitive( PrimitiveElement pe,
drawKStylePrimitive( KPE_GeneralHandle, p, widget, r, cg, flags, opt );
} else
- QCommonStyle::drawPrimitive( pe, p, r, cg, flags, opt );
+ TQCommonStyle::tqdrawPrimitive( pe, p, r, cg, flags, opt );
}
-void QtCKStyle::drawControl( ControlElement element,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+void TQtCKStyle::tqdrawControl( ControlElement element,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
switch (element)
{
// TABS
// ------------------------------------------------------------------------
case CE_TabBarTab: {
- const QTabBar* tb = (const QTabBar*) widget;
- QTabBar::Shape tbs = tb->shape();
+ const TQTabBar* tb = (const TQTabBar*) widget;
+ TQTabBar::Shape tbs = tb->tqshape();
bool selected = flags & Style_Selected;
int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right();
switch (tbs) {
- case QTabBar::RoundedAbove: {
+ case TQTabBar::RoundedAbove: {
if (!selected)
p->translate(0,1);
p->setPen(selected ? cg.light() : cg.shadow());
@@ -476,7 +476,7 @@ void QtCKStyle::drawControl( ControlElement element,
break;
}
- case QTabBar::RoundedBelow: {
+ case TQTabBar::RoundedBelow: {
if (!selected)
p->translate(0,-1);
p->setPen(selected ? cg.light() : cg.shadow());
@@ -510,7 +510,7 @@ void QtCKStyle::drawControl( ControlElement element,
break;
}
- case QTabBar::TriangularAbove: {
+ case TQTabBar::TriangularAbove: {
if (!selected)
p->translate(0,1);
p->setPen(selected ? cg.light() : cg.shadow());
@@ -531,7 +531,7 @@ void QtCKStyle::drawControl( ControlElement element,
p->setPen(cg.mid());
p->drawLine(right-1, y+6, right-1, bottom);
- QPointArray a(6);
+ TQPointArray a(6);
a.setPoint(0, x+2, bottom);
a.setPoint(1, x+2, y+7);
a.setPoint(2, x+7, y+2);
@@ -550,7 +550,7 @@ void QtCKStyle::drawControl( ControlElement element,
break;
}
- default: { // QTabBar::TriangularBelow
+ default: { // TQTabBar::TriangularBelow
if (!selected)
p->translate(0,-1);
p->setPen(selected ? cg.light() : cg.shadow());
@@ -574,7 +574,7 @@ void QtCKStyle::drawControl( ControlElement element,
p->setPen(cg.mid());
p->drawLine(right-1, bottom-6, right-1, y);
- QPointArray a(6);
+ TQPointArray a(6);
a.setPoint(0, x+2, y);
a.setPoint(1, x+2, bottom-7);
a.setPoint(2, x+7, bottom-2);
@@ -601,8 +601,8 @@ void QtCKStyle::drawControl( ControlElement element,
// ------------------------------------------------------------------------
case CE_PopupMenuScroller: {
p->fillRect(r, cg.background());
- drawPrimitive(PE_ButtonTool, p, r, cg, Style_Enabled);
- drawPrimitive((flags & Style_Up) ? PE_ArrowUp : PE_ArrowDown, p, r, cg, Style_Enabled);
+ tqdrawPrimitive(PE_ButtonTool, p, r, cg, Style_Enabled);
+ tqdrawPrimitive((flags & Style_Up) ? PE_ArrowUp : PE_ArrowDown, p, r, cg, Style_Enabled);
break;
}
@@ -610,17 +610,17 @@ void QtCKStyle::drawControl( ControlElement element,
// PROGRESSBAR
// ------------------------------------------------------------------------
case CE_ProgressBarGroove: {
- QRect fr = subRect(SR_ProgressBarGroove, widget);
- drawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, QStyleOption::Default);
+ TQRect fr = subRect(SR_ProgressBarGroove, widget);
+ tqdrawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, TQStyleOption::Default);
break;
}
case CE_ProgressBarContents: {
// ### Take into account totalSteps() for busy indicator
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect cr = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect cr = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
if (!cr.isValid())
@@ -629,7 +629,7 @@ void QtCKStyle::drawControl( ControlElement element,
// Draw progress bar
if (progress > 0 || steps == 0) {
double pg = (steps == 0) ? 0.1 : progress / steps;
- int width = QMIN(cr.width(), (int)(pg * cr.width()));
+ int width = TQMIN(cr.width(), (int)(pg * cr.width()));
if (steps == 0) { //Busy indicator
if (width < 1) width = 1; //A busy indicator with width 0 is kind of useless
@@ -647,10 +647,10 @@ void QtCKStyle::drawControl( ControlElement element,
if (reverse)
p->fillRect(cr.x() + cr.width() - width - pstep, cr.y(), width, cr.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
else
p->fillRect(cr.x() + pstep, cr.y(), width, cr.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
return;
}
@@ -658,7 +658,7 @@ void QtCKStyle::drawControl( ControlElement element,
// Do fancy gradient for highcolor displays
// if (d->highcolor) {
-// QColor c(cg.highlight());
+// TQColor c(cg.highlight());
// KPixmap pix;
// pix.resize(cr.width(), cr.height());
// KPixmapEffect::gradient(pix, reverse ? c.light(150) : c.dark(150),
@@ -672,33 +672,33 @@ void QtCKStyle::drawControl( ControlElement element,
// } else
if (reverse)
p->fillRect(cr.x()+(cr.width()-width), cr.y(), width, cr.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
else
p->fillRect(cr.x(), cr.y(), width, cr.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
}
break;
}
case CE_ProgressBarLabel: {
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect cr = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect cr = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
if (!cr.isValid())
return;
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold(true);
p->setFont(font);
// Draw label
if (progress > 0 || steps == 0) {
double pg = (steps == 0) ? 1.0 : progress / steps;
- int width = QMIN(cr.width(), (int)(pg * cr.width()));
- QRect crect;
+ int width = TQMIN(cr.width(), (int)(pg * cr.width()));
+ TQRect crect;
if (reverse)
crect.setRect(cr.x()+(cr.width()-width), cr.y(), cr.width(), cr.height());
else
@@ -721,12 +721,12 @@ void QtCKStyle::drawControl( ControlElement element,
}
default:
- QCommonStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ TQCommonStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
}
}
-QRect QtCKStyle::subRect(SubRect r, const QWidget* widget) const
+TQRect TQtCKStyle::subRect(SubRect r, const TQWidget* widget) const
{
switch(r)
{
@@ -738,17 +738,17 @@ QRect QtCKStyle::subRect(SubRect r, const QWidget* widget) const
case SR_ProgressBarContents:
case SR_ProgressBarLabel: {
// ### take into account indicatorFollowsStyle()
- QRect rt = widget->rect();
- return QRect(rt.x()+2, rt.y()+2, rt.width()-4, rt.height()-4);
+ TQRect rt = widget->rect();
+ return TQRect(rt.x()+2, rt.y()+2, rt.width()-4, rt.height()-4);
}
default:
- return QCommonStyle::subRect(r, widget);
+ return TQCommonStyle::subRect(r, widget);
}
}
-int QtCKStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
+int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const
{
switch(m)
{
@@ -760,16 +760,16 @@ int QtCKStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
case PM_DockWindowHandleExtent:
{
- QWidget* parent = 0;
+ TQWidget* tqparent = 0;
// Check that we are not a normal toolbar or a hidden dockwidget,
// in which case we need to adjust the height for font size
- if (widget && (parent = widget->parentWidget() )
- && !parent->inherits("QToolBar")
- && !parent->inherits("QMainWindow")
- && widget->inherits("QDockWindowHandle") )
+ if (widget && (tqparent = widget->tqparentWidget() )
+ && !tqparent->inherits(TQTOOLBAR_OBJECT_NAME_STRING)
+ && !tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)
+ && widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
return widget->fontMetrics().lineSpacing();
else
- return QCommonStyle::pixelMetric(m, widget);
+ return TQCommonStyle::tqpixelMetric(m, widget);
}
// TABS
@@ -778,20 +778,20 @@ int QtCKStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
return 24;
case PM_TabBarTabVSpace: {
- const QTabBar * tb = (const QTabBar *) widget;
- if ( tb->shape() == QTabBar::RoundedAbove ||
- tb->shape() == QTabBar::RoundedBelow )
+ const TQTabBar * tb = (const TQTabBar *) widget;
+ if ( tb->tqshape() == TQTabBar::RoundedAbove ||
+ tb->tqshape() == TQTabBar::RoundedBelow )
return 10;
else
return 4;
}
case PM_TabBarTabOverlap: {
- const QTabBar* tb = (const QTabBar*)widget;
- QTabBar::Shape tbs = tb->shape();
+ const TQTabBar* tb = (const TQTabBar*)widget;
+ TQTabBar::Shape tbs = tb->tqshape();
- if ( (tbs == QTabBar::RoundedAbove) ||
- (tbs == QTabBar::RoundedBelow) )
+ if ( (tbs == TQTabBar::RoundedAbove) ||
+ (tbs == TQTabBar::RoundedBelow) )
return 0;
else
return 2;
@@ -808,14 +808,14 @@ int QtCKStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
// Determines how much space to leave for the actual non-tickmark
// portion of the slider.
case PM_SliderControlThickness: {
- const QSlider* slider = (const QSlider*)widget;
- QSlider::TickSetting ts = slider->tickmarks();
- int thickness = (slider->orientation() == Horizontal) ?
+ const TQSlider* slider = (const TQSlider*)widget;
+ TQSlider::TickSetting ts = slider->tickmarks();
+ int thickness = (slider->orientation() == Qt::Horizontal) ?
slider->height() : slider->width();
switch (ts) {
- case QSlider::NoMarks: // Use total area.
+ case TQSlider::NoMarks: // Use total area.
break;
- case QSlider::Both:
+ case TQSlider::Both:
thickness = (thickness/2) + 3; // Use approx. 1/2 of area.
break;
default: // Use approx. 2/3 of area
@@ -828,7 +828,7 @@ int QtCKStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
// SPLITTER
// ------------------------------------------------------------------------
case PM_SplitterWidth:
- if (widget && widget->inherits("QDockWindowResizeHandle"))
+ if (widget && widget->inherits("TQDockWindowResizeHandle"))
return 8; // ### why do we need 2pix extra?
else
return 6;
@@ -853,17 +853,17 @@ int QtCKStyle::pixelMetric(PixelMetric m, const QWidget* widget) const
return 0;
case PM_PopupMenuScrollerHeight:
- return pixelMetric( PM_ScrollBarExtent, 0);
+ return tqpixelMetric( PM_ScrollBarExtent, 0);
default:
- return QCommonStyle::pixelMetric( m, widget );
+ return TQCommonStyle::tqpixelMetric( m, widget );
}
}
//Helper to find the next sibling that's not hidden
-static QListViewItem* nextVisibleSibling(QListViewItem* item)
+static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
{
- QListViewItem* sibling = item;
+ TQListViewItem* sibling = item;
do
{
sibling = sibling->nextSibling();
@@ -873,15 +873,15 @@ static QListViewItem* nextVisibleSibling(QListViewItem* item)
return sibling;
}
-void QtCKStyle::drawComplexControl( ComplexControl control,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+void TQtCKStyle::tqdrawComplexControl( ComplexControl control,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
switch(control)
{
@@ -891,13 +891,13 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
// Many thanks to Brad Hughes for contributing this code.
bool useThreeButtonScrollBar = (d->scrollbarType & ThreeButtonScrollBar);
- const QScrollBar *sb = (const QScrollBar*)widget;
+ const TQScrollBar *sb = (const TQScrollBar*)widget;
bool maxedOut = (sb->minValue() == sb->maxValue());
bool horizontal = (sb->orientation() == Qt::Horizontal);
SFlags sflags = ((horizontal ? Style_Horizontal : Style_Default) |
(maxedOut ? Style_Default : Style_Enabled));
- QRect addline, subline, subline2, addpage, subpage, slider, first, last;
+ TQRect addline, subline, subline2, addpage, subpage, slider, first, last;
subline = querySubControlMetrics(control, widget, SC_ScrollBarSubLine, opt);
addline = querySubControlMetrics(control, widget, SC_ScrollBarAddLine, opt);
subpage = querySubControlMetrics(control, widget, SC_ScrollBarSubPage, opt);
@@ -915,50 +915,50 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
// Draw the up/left button set
if ((controls & SC_ScrollBarSubLine) && subline.isValid()) {
- drawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
sflags | (active == SC_ScrollBarSubLine ?
Style_Down : Style_Default));
if (useThreeButtonScrollBar && subline2.isValid())
- drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
sflags | (active == SC_ScrollBarSubLine ?
Style_Down : Style_Default));
}
if ((controls & SC_ScrollBarAddLine) && addline.isValid())
- drawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
+ tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
sflags | ((active == SC_ScrollBarAddLine) ?
Style_Down : Style_Default));
if ((controls & SC_ScrollBarSubPage) && subpage.isValid())
- drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
+ tqdrawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
sflags | ((active == SC_ScrollBarSubPage) ?
Style_Down : Style_Default));
if ((controls & SC_ScrollBarAddPage) && addpage.isValid())
- drawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
+ tqdrawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
sflags | ((active == SC_ScrollBarAddPage) ?
Style_Down : Style_Default));
if ((controls & SC_ScrollBarFirst) && first.isValid())
- drawPrimitive(PE_ScrollBarFirst, p, first, cg,
+ tqdrawPrimitive(PE_ScrollBarFirst, p, first, cg,
sflags | ((active == SC_ScrollBarFirst) ?
Style_Down : Style_Default));
if ((controls & SC_ScrollBarLast) && last.isValid())
- drawPrimitive(PE_ScrollBarLast, p, last, cg,
+ tqdrawPrimitive(PE_ScrollBarLast, p, last, cg,
sflags | ((active == SC_ScrollBarLast) ?
Style_Down : Style_Default));
if ((controls & SC_ScrollBarSlider) && slider.isValid()) {
- drawPrimitive(PE_ScrollBarSlider, p, slider, cg,
+ tqdrawPrimitive(PE_ScrollBarSlider, p, slider, cg,
sflags | ((active == SC_ScrollBarSlider) ?
Style_Down : Style_Default));
// Draw focus rect
if (sb->hasFocus()) {
- QRect fr(slider.x() + 2, slider.y() + 2,
+ TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
- drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
}
break;
@@ -968,19 +968,19 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
// SLIDER
// -------------------------------------------------------------------
case CC_Slider: {
- const QSlider* slider = (const QSlider*)widget;
- QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt);
- QRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt);
+ const TQSlider* slider = (const TQSlider*)widget;
+ TQRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt);
+ TQRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt);
// Double-buffer slider for no flicker
- QPixmap pix(widget->size());
- QPainter p2;
+ TQPixmap pix(widget->size());
+ TQPainter p2;
p2.begin(&pix);
- if ( slider->parentWidget() &&
- slider->parentWidget()->backgroundPixmap() &&
- !slider->parentWidget()->backgroundPixmap()->isNull() ) {
- QPixmap pixmap = *(slider->parentWidget()->backgroundPixmap());
+ if ( slider->tqparentWidget() &&
+ slider->tqparentWidget()->backgroundPixmap() &&
+ !slider->tqparentWidget()->backgroundPixmap()->isNull() ) {
+ TQPixmap pixmap = *(slider->tqparentWidget()->backgroundPixmap());
p2.drawTiledPixmap(r, pixmap, slider->pos());
} else
pix.fill(cg.background());
@@ -991,12 +991,12 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
// Draw the focus rect around the groove
if (slider->hasFocus())
- drawPrimitive(PE_FocusRect, &p2, groove, cg);
+ tqdrawPrimitive(PE_FocusRect, &p2, groove, cg);
}
// Draw the tickmarks
if (controls & SC_SliderTickmarks)
- QCommonStyle::drawComplexControl(control, &p2, widget,
+ TQCommonStyle::tqdrawComplexControl(control, &p2, widget,
r, cg, flags, SC_SliderTickmarks, active, opt);
// Draw the slider handle
@@ -1007,7 +1007,7 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
}
p2.end();
- bitBlt((QWidget*)widget, r.x(), r.y(), &pix);
+ bitBlt((TQWidget*)widget, r.x(), r.y(), &pix);
break;
}
@@ -1016,13 +1016,13 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
case CC_ListView: {
/*
- * Many thanks to TrollTech AS for donating CC_ListView from QWindowsStyle.
+ * Many thanks to TrollTech AS for donating CC_ListView from TQWindowsStyle.
* CC_ListView code is Copyright (C) 1998-2000 TrollTech AS.
*/
// Paint the icon and text.
if ( controls & SC_ListView )
- QCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
// If we're have a branch or are expanded...
if ( controls & (SC_ListViewBranch | SC_ListViewExpand) )
@@ -1031,20 +1031,20 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
if (opt.isDefault())
break;
- QListViewItem *item = opt.listViewItem();
- QListViewItem *child = item->firstChild();
+ TQListViewItem *item = opt.listViewItem();
+ TQListViewItem *child = item->firstChild();
int y = r.y();
int c; // dotline vertice count
int dotoffset = 0;
- QPointArray dotlines;
+ TQPointArray dotlines;
if ( active == SC_All && controls == SC_ListViewExpand ) {
// We only need to draw a vertical line
c = 2;
dotlines.resize(2);
- dotlines[0] = QPoint( r.right(), r.top() );
- dotlines[1] = QPoint( r.right(), r.bottom() );
+ dotlines[0] = TQPoint( r.right(), r.top() );
+ dotlines[1] = TQPoint( r.right(), r.bottom() );
} else {
@@ -1064,15 +1064,15 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
int bx = r.width() / 2;
// paint stuff in the magical area
- QListView* v = item->listView();
- int lh = QMAX( p->fontMetrics().height() + 2 * v->itemMargin(),
- QApplication::globalStrut().height() );
+ TQListView* v = item->listView();
+ int lh = TQMAX( p->fontMetrics().height() + 2 * v->itemMargin(),
+ TQApplication::globalStrut().height() );
if ( lh % 2 > 0 )
lh++;
// Draw all the expand/close boxes...
- QRect boxrect;
- QStyle::StyleFlags boxflags;
+ TQRect boxrect;
+ TQStyle::StyleFlags boxflags;
while ( child && y < r.height() )
{
linebot = y + lh/2;
@@ -1080,23 +1080,23 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
(child->height() > 0) )
{
// The primitive requires a rect.
- boxrect = QRect( bx-4, linebot-4, 9, 9 );
- boxflags = child->isOpen() ? QStyle::Style_Off : QStyle::Style_On;
+ boxrect = TQRect( bx-4, linebot-4, 9, 9 );
+ boxflags = child->isOpen() ? TQStyle::Style_Off : TQStyle::Style_On;
- // QtCKStyle extension: Draw the box and expand/collapse indicator
+ // TQtCKStyle extension: Draw the box and expand/collapse indicator
drawKStylePrimitive( KPE_ListViewExpander, p, NULL, boxrect, cg, boxflags, opt );
// dotlinery
p->setPen( cg.mid() );
- dotlines[c++] = QPoint( bx, linetop );
- dotlines[c++] = QPoint( bx, linebot - 5 );
- dotlines[c++] = QPoint( bx + 5, linebot );
- dotlines[c++] = QPoint( r.width(), linebot );
+ dotlines[c++] = TQPoint( bx, linetop );
+ dotlines[c++] = TQPoint( bx, linebot - 5 );
+ dotlines[c++] = TQPoint( bx + 5, linebot );
+ dotlines[c++] = TQPoint( r.width(), linebot );
linetop = linebot + 5;
} else {
// just dotlinery
- dotlines[c++] = QPoint( bx+1, linebot );
- dotlines[c++] = QPoint( r.width(), linebot );
+ dotlines[c++] = TQPoint( bx+1, linebot );
+ dotlines[c++] = TQPoint( r.width(), linebot );
}
y += child->totalHeight();
@@ -1108,16 +1108,16 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
if ( linetop < linebot )
{
- dotlines[c++] = QPoint( bx, linetop );
- dotlines[c++] = QPoint( bx, linebot );
+ dotlines[c++] = TQPoint( bx, linetop );
+ dotlines[c++] = TQPoint( bx, linebot );
}
}
// Draw all the branches...
static int thickness = kPixelMetric( KPM_ListViewBranchThickness );
int line; // index into dotlines
- QRect branchrect;
- QStyle::StyleFlags branchflags;
+ TQRect branchrect;
+ TQStyle::StyleFlags branchflags;
for( line = 0; line < c; line += 2 )
{
// assumptions here: lines are horizontal or vertical.
@@ -1134,10 +1134,10 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
int point = dotlines[line].x();
int other = dotlines[line].y();
- branchrect = QRect( point, other-(thickness/2), end-point, thickness );
- branchflags = QStyle::Style_Horizontal;
+ branchrect = TQRect( point, other-(thickness/2), end-point, thickness );
+ branchflags = TQStyle::Style_Horizontal;
- // QtCKStyle extension: Draw the horizontal branch
+ // TQtCKStyle extension: Draw the horizontal branch
drawKStylePrimitive( KPE_ListViewBranch, p, NULL, branchrect, cg, branchflags, opt );
} else {
@@ -1147,13 +1147,13 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
int other = dotlines[line].x();
int pixmapoffset = ((point & 1) != dotoffset ) ? 1 : 0;
- branchrect = QRect( other-(thickness/2), point, thickness, end-point );
+ branchrect = TQRect( other-(thickness/2), point, thickness, end-point );
if (!pixmapoffset) // ### Hackish - used to hint the offset
- branchflags = QStyle::Style_NoChange;
+ branchflags = TQStyle::Style_NoChange;
else
- branchflags = QStyle::Style_Default;
+ branchflags = TQStyle::Style_Default;
- // QtCKStyle extension: Draw the vertical branch
+ // TQtCKStyle extension: Draw the vertical branch
drawKStylePrimitive( KPE_ListViewBranch, p, NULL, branchrect, cg, branchflags, opt );
}
}
@@ -1162,19 +1162,19 @@ void QtCKStyle::drawComplexControl( ComplexControl control,
}
default:
- QCommonStyle::drawComplexControl( control, p, widget, r, cg,
+ TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg,
flags, controls, active, opt );
break;
}
}
-QStyle::SubControl QtCKStyle::querySubControl( ComplexControl control,
- const QWidget* widget,
- const QPoint &pos,
- const QStyleOption &opt ) const
+TQStyle::SubControl TQtCKStyle::querySubControl( ComplexControl control,
+ const TQWidget* widget,
+ const TQPoint &pos,
+ const TQStyleOption &opt ) const
{
- QStyle::SubControl ret = QCommonStyle::querySubControl(control, widget, pos, opt);
+ TQStyle::SubControl ret = TQCommonStyle::querySubControl(control, widget, pos, opt);
if (d->scrollbarType == ThreeButtonScrollBar) {
// Enable third button
@@ -1185,12 +1185,12 @@ QStyle::SubControl QtCKStyle::querySubControl( ComplexControl control,
}
-QRect QtCKStyle::querySubControlMetrics( ComplexControl control,
- const QWidget* widget,
+TQRect TQtCKStyle::querySubControlMetrics( ComplexControl control,
+ const TQWidget* widget,
SubControl sc,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
- QRect ret;
+ TQRect ret;
if (control == CC_ScrollBar)
{
@@ -1198,10 +1198,10 @@ QRect QtCKStyle::querySubControlMetrics( ComplexControl control,
bool platinumScrollBar = d->scrollbarType & PlatinumStyleScrollBar;
bool nextScrollBar = d->scrollbarType & NextStyleScrollBar;
- const QScrollBar *sb = (const QScrollBar*)widget;
+ const TQScrollBar *sb = (const TQScrollBar*)widget;
bool horizontal = sb->orientation() == Qt::Horizontal;
int sliderstart = sb->sliderStart();
- int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
+ int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget);
int maxlen = (horizontal ? sb->width() : sb->height())
- (sbextent * (threeButtonScrollBar ? 3 : 2));
int sliderlen;
@@ -1212,7 +1212,7 @@ QRect QtCKStyle::querySubControlMetrics( ComplexControl control,
uint range = sb->maxValue() - sb->minValue();
sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep());
- int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -1319,11 +1319,11 @@ QRect QtCKStyle::querySubControlMetrics( ComplexControl control,
}
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, opt);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, opt);
break;
}
} else
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, opt);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, opt);
return ret;
}
@@ -1570,40 +1570,40 @@ static const char* const critical_xpm[]={
"...........aaaaaaaaaaa..........",
".............aaaaaaa............"};
-QPixmap QtCKStyle::stylePixmap( StylePixmap stylepixmap,
- const QWidget* widget,
- const QStyleOption& opt) const
+TQPixmap TQtCKStyle::stylePixmap( StylePixmap stylepixmap,
+ const TQWidget* widget,
+ const TQStyleOption& opt) const
{
switch (stylepixmap) {
case SP_TitleBarShadeButton:
- return QPixmap(const_cast<const char**>(kstyle_shade_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_shade_xpm));
case SP_TitleBarUnshadeButton:
- return QPixmap(const_cast<const char**>(kstyle_unshade_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_unshade_xpm));
case SP_TitleBarNormalButton:
- return QPixmap(const_cast<const char**>(kstyle_normalizeup_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_normalizeup_xpm));
case SP_TitleBarMinButton:
- return QPixmap(const_cast<const char**>(kstyle_minimize_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_minimize_xpm));
case SP_TitleBarMaxButton:
- return QPixmap(const_cast<const char**>(kstyle_maximize_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_maximize_xpm));
case SP_TitleBarCloseButton:
- return QPixmap(const_cast<const char**>(kstyle_close_xpm));
+ return TQPixmap(const_cast<const char**>(kstyle_close_xpm));
case SP_DockWindowCloseButton:
- return QPixmap(const_cast<const char**>(dock_window_close_xpm ));
+ return TQPixmap(const_cast<const char**>(dock_window_close_xpm ));
case SP_MessageBoxInformation:
- return QPixmap(const_cast<const char**>(information_xpm));
+ return TQPixmap(const_cast<const char**>(information_xpm));
case SP_MessageBoxWarning:
- return QPixmap(const_cast<const char**>(warning_xpm));
+ return TQPixmap(const_cast<const char**>(warning_xpm));
case SP_MessageBoxCritical:
- return QPixmap(const_cast<const char**>(critical_xpm));
+ return TQPixmap(const_cast<const char**>(critical_xpm));
default:
break;
}
- return QCommonStyle::stylePixmap(stylepixmap, widget, opt);
+ return TQCommonStyle::stylePixmap(stylepixmap, widget, opt);
}
-int QtCKStyle::styleHint( StyleHint sh, const QWidget* w,
- const QStyleOption &opt, QStyleHintReturn* shr) const
+int TQtCKStyle::tqstyleHint( StyleHint sh, const TQWidget* w,
+ const TQStyleOption &opt, TQStyleHintReturn* shr) const
{
switch (sh)
{
@@ -1617,8 +1617,8 @@ int QtCKStyle::styleHint( StyleHint sh, const QWidget* w,
return d->menuAltKeyNavigation ? 1 : 0;
case SH_PopupMenu_SubMenuPopupDelay:
- if ( styleHint( SH_PopupMenu_SloppySubMenus, w ) )
- return QMIN( 100, d->popupMenuDelay );
+ if ( tqstyleHint( SH_PopupMenu_SloppySubMenus, w ) )
+ return TQMIN( 100, d->popupMenuDelay );
else
return d->popupMenuDelay;
@@ -1642,10 +1642,10 @@ int QtCKStyle::styleHint( StyleHint sh, const QWidget* w,
case SH_LineEdit_PasswordCharacter:
{
if (w) {
- const QFontMetrics &fm = w->fontMetrics();
- if (fm.inFont(QChar(0x25CF))) {
+ const TQFontMetrics &fm = w->fontMetrics();
+ if (fm.inFont(TQChar(0x25CF))) {
return 0x25CF;
- } else if (fm.inFont(QChar(0x2022))) {
+ } else if (fm.inFont(TQChar(0x2022))) {
return 0x2022;
}
}
@@ -1653,51 +1653,51 @@ int QtCKStyle::styleHint( StyleHint sh, const QWidget* w,
}
default:
- return QCommonStyle::styleHint(sh, w, opt, shr);
+ return TQCommonStyle::tqstyleHint(sh, w, opt, shr);
}
}
-bool QtCKStyle::eventFilter( QObject* object, QEvent* event )
+bool TQtCKStyle::eventFilter( TQObject* object, TQEvent* event )
{
if ( d->useFilledFrameWorkaround )
{
- // Make the QMenuBar/QToolBar paintEvent() cover a larger area to
+ // Make the TQMenuBar/TQToolBar paintEvent() cover a larger area to
// ensure that the filled frame contents are properly painted.
// We essentially modify the paintEvent's rect to include the
// panel border, which also paints the widget's interior.
- // This is nasty, but I see no other way to properly repaint
- // filled frames in all QMenuBars and QToolBars.
+ // This is nasty, but I see no other way to properly tqrepaint
+ // filled frames in all TQMenuBars and TQToolBars.
// -- Karol.
- QFrame *frame = 0;
- if ( event->type() == QEvent::Paint
- && (frame = ::qt_cast<QFrame*>(object)) )
+ TQFrame *frame = 0;
+ if ( event->type() == TQEvent::Paint
+ && (frame = ::tqqt_cast<TQFrame*>(object)) )
{
- if (frame->frameShape() != QFrame::ToolBarPanel && frame->frameShape() != QFrame::MenuBarPanel)
+ if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel)
return false;
bool horizontal = true;
- QPaintEvent* pe = (QPaintEvent*)event;
- QToolBar *toolbar = ::qt_cast< QToolBar *>( frame );
- QRect r = pe->rect();
+ TQPaintEvent* pe = (TQPaintEvent*)event;
+ TQToolBar *toolbar = ::tqqt_cast< TQToolBar *>( frame );
+ TQRect r = pe->rect();
if (toolbar && toolbar->orientation() == Qt::Vertical)
horizontal = false;
if (horizontal) {
if ( r.height() == frame->height() )
- return false; // Let QFrame handle the painting now.
+ return false; // Let TQFrame handle the painting now.
// Else, send a new paint event with an updated paint rect.
- QPaintEvent dummyPE( QRect( r.x(), 0, r.width(), frame->height()) );
- QApplication::sendEvent( frame, &dummyPE );
+ TQPaintEvent dummyPE( TQRect( r.x(), 0, r.width(), frame->height()) );
+ TQApplication::sendEvent( frame, &dummyPE );
}
else { // Vertical
if ( r.width() == frame->width() )
return false;
- QPaintEvent dummyPE( QRect( 0, r.y(), frame->width(), r.height()) );
- QApplication::sendEvent( frame, &dummyPE );
+ TQPaintEvent dummyPE( TQRect( 0, r.y(), frame->width(), r.height()) );
+ TQApplication::sendEvent( frame, &dummyPE );
}
// Discard this event as we sent a new paintEvent.
@@ -1708,10 +1708,10 @@ bool QtCKStyle::eventFilter( QObject* object, QEvent* event )
return false;
}
-void QtCKStyle::virtual_hook( int, void* )
+void TQtCKStyle::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
// vim: set noet ts=4 sw=4:
-// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
+// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off;
#include "qtc_kstyle.moc"
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 <gallium@kde.org>
*
- * 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 (gallium@kde.org)
* @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 (gallium@kde.org)
*/
- 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;
};
diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp
index f5dbdbc..6af9f3e 100644
--- a/style/qtcurve.cpp
+++ b/style/qtcurve.cpp
@@ -1,5 +1,5 @@
/*
- QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
+ TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
----
@@ -53,55 +53,56 @@ KHTML
Srollbars:
For some reason Scrollbars in KHTML seem to lose the bottom/left pixels. As if KHTML expects
-the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the pixelMetric
+the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the tqpixelMetric
function will return 1 scrollbar with 1 greater than standard for form widgets, or where widget==0L
In the CC_ScrollBar draw code, the rects used for each component are shrunk by 1, in the appropriate
dimension, so as to draw the scrollbar at the correct size.
*/
-#include <qtable.h>
+#include <tqtable.h>
#include "config.h"
-#ifndef QTC_QT_ONLY
+#ifndef TQTC_TQT_ONLY
#include <kdeversion.h>
#endif
-#include <qsettings.h>
-#include <qmenubar.h>
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qframe.h>
-#include <qpushbutton.h>
-#include <qdrawutil.h>
-#include <qscrollbar.h>
-#include <qtabbar.h>
-#include <qtabwidget.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qtable.h>
-#include <qimage.h>
-#include <qcombobox.h>
-#include <qslider.h>
-#include <qcleanuphandler.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qprogressbar.h>
-#include <qheader.h>
-#include <qwidgetstack.h>
-#include <qsplitter.h>
-#include <qtextedit.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qtimer.h>
-#include <qdatetimeedit.h>
-#include <qobjectlist.h>
-#include <qpixmapcache.h>
-#include <qbitmap.h>
-#include <qmainwindow.h>
+#include <tqsettings.h>
+#include <tqmenubar.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqframe.h>
+#include <tqpushbutton.h>
+#include <tqdrawutil.h>
+#include <tqscrollbar.h>
+#include <tqtabbar.h>
+#include <tqtabwidget.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqtable.h>
+#include <tqimage.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
+#include <tqcleanuphandler.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqprogressbar.h>
+#include <tqheader.h>
+#include <tqwidgetstack.h>
+#include <tqsplitter.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
+#include <tqdatetimeedit.h>
+#include <tqobjectlist.h>
+#include <tqpixmapcache.h>
+#include <tqbitmap.h>
+#include <tqmainwindow.h>
+#include <tqstyle.h>
#include <math.h>
#include <stdlib.h>
#include <unistd.h>
@@ -112,61 +113,61 @@ dimension, so as to draw the scrollbar at the correct size.
#define CONFIG_READ
#include "config_file.c"
#include "pixmaps.h"
-#include <qdialog.h>
-#include <qprogressdialog.h>
-#include <qstyleplugin.h>
-#include <qgroupbox.h>
-#include <qdir.h>
-// Need access to classname from within QMetaObject...
+#include <tqdialog.h>
+#include <tqprogressdialog.h>
+#include <tqstyleplugin.h>
+#include <tqgroupbox.h>
+#include <tqdir.h>
+// Need access to classname from within TQMetaObject...
#define private public
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include "qtc_fixx11h.h"
static const Atom constNetMoveResize = XInternAtom(qt_xdisplay(), "_NET_WM_MOVERESIZE", False);
-static const QWidget * getTopLevel(const QWidget *widget)
+static const TQWidget * getTopLevel(const TQWidget *widget)
{
- const QWidget *w=widget;
+ const TQWidget *w=widget;
while(w && !w->isTopLevel())
- w=w->parentWidget();
+ w=w->tqparentWidget();
return w;
}
-static void emitMenuSize(const QWidget *widget, unsigned short size)
+static void emitMenuSize(const TQWidget *widget, unsigned short size)
{
- const QWidget *w=getTopLevel(widget);
+ const TQWidget *w=getTopLevel(widget);
if(w)
{
static const Atom constAtom = XInternAtom(qt_xdisplay(), MENU_SIZE_ATOM, False);
- XChangeProperty(qt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(),
+ XChangeProperty(qt_xdisplay(), w->tqparentWidget() ? w->tqparentWidget()->winId() : w->winId(),
constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&size, 1);
}
}
-void setBgndProp(QWidget *widget, unsigned short app)
+void setBgndProp(TQWidget *widget, unsigned short app)
{
- const QWidget *w=getTopLevel(widget);
+ const TQWidget *w=getTopLevel(widget);
if(w)
{
static const Atom constAtom = XInternAtom(qt_xdisplay(), BGND_ATOM, False);
- XChangeProperty(qt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(),
+ XChangeProperty(qt_xdisplay(), w->tqparentWidget() ? w->tqparentWidget()->winId() : w->winId(),
constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&app, 1);
}
}
-static void triggerWMMove(const QWidget *w, const QPoint &p)
+static void triggerWMMove(const TQWidget *w, const TQPoint &p)
{
//...Taken from bespin...
- // stolen... errr "adapted!" from QSizeGrip
+ // stolen... errr "adapted!" from TQSizeGrip
XEvent xev;
xev.xclient.type = ClientMessage;
xev.xclient.message_type = constNetMoveResize;
xev.xclient.display = qt_xdisplay();
- xev.xclient.window = w->parentWidget() ? w->parentWidget()->winId() : w->winId();
+ xev.xclient.window = w->tqparentWidget() ? w->tqparentWidget()->winId() : w->winId();
xev.xclient.format = 32;
xev.xclient.data.l[0] = p.x();
xev.xclient.data.l[1] = p.y();
@@ -183,7 +184,7 @@ static void triggerWMMove(const QWidget *w, const QPoint &p)
static const int constMenuPixmapWidth=22;
-static bool useQt3Settings()
+static bool useTQt3Settings()
{
static int ver=0;
@@ -195,7 +196,7 @@ static bool useQt3Settings()
? atoi(sessionVersion)<4
? 3
: 4
-#ifdef QTC_DEFAULT_TO_KDE3
+#ifdef TQTC_DEFAULT_TO_KDE3
: 3;
#else
: getenv("KDE_FULL_SESSION")
@@ -207,15 +208,15 @@ static bool useQt3Settings()
return 3==ver;
}
-static QRect adjusted(const QRect r, int xp1, int yp1, int xp2, int yp2)
+static TQRect adjusted(const TQRect r, int xp1, int yp1, int xp2, int yp2)
{
int x1, y1, x2, y2;
r.coords(&x1, &y1, &x2, &y2);
- return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2));
+ return TQRect(TQPoint(x1 + xp1, y1 + yp1), TQPoint(x2 + xp2, y2 + yp2));
}
-static void adjust(QRect &r, int dx1, int dy1, int dx2, int dy2)
+static void adjust(TQRect &r, int dx1, int dy1, int dx2, int dy2)
{
int x1, y1, x2, y2;
@@ -227,35 +228,35 @@ static void adjust(QRect &r, int dx1, int dy1, int dx2, int dy2)
r.setCoords(x1, y1, x2, y2);
}
-inline bool isSpecialHover(QWidget *w)
+inline bool isSpecialHover(TQWidget *w)
{
return w && (
-#if QT_VERSION >= 0x030200
- ::qt_cast<QRadioButton *>(w) ||
- ::qt_cast<QCheckBox *>(w) ||
+#if 0x039999 >= 0x030200
+ ::tqqt_cast<TQRadioButton *>(w) ||
+ ::tqqt_cast<TQCheckBox *>(w) ||
#endif
- ::qt_cast<QScrollBar *>(w) ||
+ ::tqqt_cast<TQScrollBar *>(w) ||
#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
- ::qt_cast<QToolButton *>(w) ||
+ ::tqqt_cast<TQToolButton *>(w) ||
#endif
- ::qt_cast<QHeader *>(w) ||
- ::qt_cast<QSpinWidget *>(w) ||
- ::qt_cast<QComboBox *>(w) ||
- ::qt_cast<QTabBar *>(w)
+ ::tqqt_cast<TQHeader *>(w) ||
+ ::tqqt_cast<TQSpinWidget *>(w) ||
+ ::tqqt_cast<TQComboBox *>(w) ||
+ ::tqqt_cast<TQTabBar *>(w)
);
}
-static QString readEnvPath(const char *env)
+static TQString readEnvPath(const char *env)
{
- QCString path=getenv(env);
+ TQCString path=getenv(env);
- return path.isEmpty() ? QString::null : QFile::decodeName(path);
+ return path.isEmpty() ? TQString() : TQFile::decodeName(path);
}
-static QString kdeHome(bool kde3=false)
+static TQString kdeHome(bool kde3=false)
{
- static QString kdeHome[2];
+ static TQString kdeHome[2];
// Execute kde-config to ascertain users KDEHOME
if(kdeHome[kde3 ? 0 : 1].isEmpty())
@@ -268,7 +269,7 @@ static QString kdeHome(bool kde3=false)
while(fgets(line, sizeof line, fpipe))
{
- kdeHome[kde3 ? 0 : 1]=QFile::decodeName(line).replace("\n", "");
+ kdeHome[kde3 ? 0 : 1]=TQString(TQFile::decodeName(line)).tqreplace("\n", "");
break;
}
pclose(fpipe);
@@ -281,55 +282,55 @@ static QString kdeHome(bool kde3=false)
kdeHome[kde3 ? 0 : 1]=readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
if (kdeHome[kde3 ? 0 : 1].isEmpty())
{
- QDir homeDir(QDir::homeDirPath());
- QString kdeConfDir("/.kde");
+ TQDir homeDir(TQDir::homeDirPath());
+ TQString kdeConfDir("/.kde");
if (!kde3 && homeDir.exists(".kde4"))
- kdeConfDir = QString("/.kde4");
- kdeHome[kde3 ? 0 : 1] = QDir::homeDirPath() + kdeConfDir;
+ kdeConfDir = TQString("/.kde4");
+ kdeHome[kde3 ? 0 : 1] = TQDir::homeDirPath() + kdeConfDir;
}
}
return kdeHome[kde3 ? 0 : 1];
}
-#ifdef QTC_STYLE_SUPPORT
-static void getStyles(const QString &dir, const char *sub, QStringList &styles)
+#ifdef TQTC_STYLE_SUPPORT
+static void getStyles(const TQString &dir, const char *sub, TQStringList &styles)
{
- QDir d(dir+sub);
+ TQDir d(dir+sub);
if(d.exists())
{
d.setNameFilter(THEME_PREFIX"*"THEME_SUFFIX);
- QStringList entries(d.entryList());
- QStringList::ConstIterator it(entries.begin()),
+ TQStringList entries(d.entryList());
+ TQStringList::ConstIterator it(entries.begin()),
end(entries.end());
for(; it!=end; ++it)
{
- QString style((*it).left((*it).findRev(THEME_SUFFIX)));
+ TQString style((*it).left((*it).tqfindRev(THEME_SUFFIX)));
- if(!styles.contains(style))
+ if(!styles.tqcontains(style))
styles.append(style);
}
}
}
-static void getStyles(const QString &dir, QStringList &styles)
+static void getStyles(const TQString &dir, TQStringList &styles)
{
getStyles(dir, THEME_DIR, styles);
getStyles(dir, THEME_DIR4, styles);
}
-static QString themeFile(const QString &dir, const QString &n, const char *sub)
+static TQString themeFile(const TQString &dir, const TQString &n, const char *sub)
{
- QString name(dir+sub+n+THEME_SUFFIX);
+ TQString name(dir+sub+n+THEME_SUFFIX);
- return QFile(name).exists() ? name : QString();
+ return TQFile(name).exists() ? name : TQString();
}
-static QString themeFile(const QString &dir, const QString &n, bool kde3=true)
+static TQString themeFile(const TQString &dir, const TQString &n, bool kde3=true)
{
- QString name(themeFile(dir, n, kde3 ? THEME_DIR : THEME_DIR4));
+ TQString name(themeFile(dir, n, kde3 ? THEME_DIR : THEME_DIR4));
if(name.isEmpty())
name=themeFile(dir, n, kde3 ? THEME_DIR4 : THEME_DIR);
@@ -337,45 +338,45 @@ static QString themeFile(const QString &dir, const QString &n, bool kde3=true)
}
#endif
-class QtCurveStylePlugin : public QStylePlugin
+class TQtCurveStylePlugin : public TQStylePlugin
{
public:
- QtCurveStylePlugin() : QStylePlugin() { }
+ TQtCurveStylePlugin() : TQStylePlugin() { }
- QStringList keys() const
+ TQStringList keys() const
{
- QStringList list;
- list << "QtCurve";
+ TQStringList list;
+ list << "TQtCurve";
-#ifdef QTC_STYLE_SUPPORT
- getStyles(kdeHome(useQt3Settings()), list);
- getStyles(kdeHome(!useQt3Settings()), list);
- getStyles(KDE_PREFIX(useQt3Settings() ? 3 : 4), list);
- getStyles(KDE_PREFIX(useQt3Settings() ? 4 : 3), list);
+#ifdef TQTC_STYLE_SUPPORT
+ getStyles(kdeHome(useTQt3Settings()), list);
+ getStyles(kdeHome(!useTQt3Settings()), list);
+ getStyles(KDE_PREFIX(useTQt3Settings() ? 3 : 4), list);
+ getStyles(KDE_PREFIX(useTQt3Settings() ? 4 : 3), list);
#endif
return list;
}
- QStyle * create(const QString &s)
+ TQStyle * create(const TQString &s)
{
return "qtcurve"==s.lower()
- ? new QtCurveStyle
-#ifdef QTC_STYLE_SUPPORT
- : 0==s.find(THEME_PREFIX)
- ? new QtCurveStyle(s)
+ ? new TQtCurveStyle
+#ifdef TQTC_STYLE_SUPPORT
+ : 0==s.tqfind(THEME_PREFIX)
+ ? new TQtCurveStyle(s)
#endif
: 0;
}
};
-Q_EXPORT_PLUGIN(QtCurveStylePlugin)
+TQ_EXPORT_PLUGIN(TQtCurveStylePlugin)
#define SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp)
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
-#include <qfile.h>
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#include <tqfile.h>
#endif
#define NO_SECT -1
@@ -392,19 +393,19 @@ Q_EXPORT_PLUGIN(QtCurveStylePlugin)
#define DW_BGND 105
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
// Try to read $KDEHOME/share/config/kickerrc to find out if kicker is transparent...
static bool kickerIsTrans()
{
- QString cfgFileName(kdeHome(true)+"/share/config/kickerrc");
+ TQString cfgFileName(kdeHome(true)+"/share/config/kickerrc");
bool trans(false);
- QFile cfgFile(cfgFileName);
+ TQFile cfgFile(cfgFileName);
if (cfgFile.open(IO_ReadOnly))
{
- QTextStream stream(&cfgFile);
- QString line;
+ TQTextStream stream(&cfgFile);
+ TQString line;
bool stop(false),
inGen(false);
@@ -414,16 +415,16 @@ static bool kickerIsTrans()
if(inGen)
{
- if(0==line.find("Transparent=", false)) // Found it!
+ if(0==line.tqfind("Transparent=", false)) // Found it!
{
- if(-1!=line.find("true", false))
+ if(-1!=line.tqfind("true", false))
trans=true;
stop=true;
}
- else if(line[0]==QChar('[')) // Then wasn't in General section...
+ else if(line[0]==TQChar('[')) // Then wasn't in General section...
stop=true;
}
- else if(0==line.find("[General]", false))
+ else if(0==line.tqfind("[General]", false))
inGen=true;
}
cfgFile.close();
@@ -433,13 +434,13 @@ static bool kickerIsTrans()
}
#endif
-static bool isKhtmlWidget(const QWidget *w, int level=1)
+static bool isKhtmlWidget(const TQWidget *w, int level=1)
{
return w && ((w->name() && 0==strcmp(w->name(), "__khtml")) ||
- (level && isKhtmlWidget(w->parentWidget(), --level)));
+ (level && isKhtmlWidget(w->tqparentWidget(), --level)));
}
-static bool isKhtmlFormWidget(const QWidget *widget)
+static bool isKhtmlFormWidget(const TQWidget *widget)
{
if(isKhtmlWidget(widget))
return true;
@@ -447,19 +448,19 @@ static bool isKhtmlFormWidget(const QWidget *widget)
// Copied from Keramik...
//Form widgets are in the KHTMLView, but that has 2 further inner levels
- //of widgets - QClipperWidget, and outside of that, QViewportWidget
- QWidget *potentialClipPort(widget ? widget->parentWidget() : 0L);
+ //of widgets - TQClipperWidget, and outside of that, TQViewportWidget
+ TQWidget *potentialClipPort(widget ? widget->tqparentWidget() : 0L);
if (!potentialClipPort || potentialClipPort->isTopLevel())
return false;
- QWidget *potentialViewPort(potentialClipPort->parentWidget());
+ TQWidget *potentialViewPort(potentialClipPort->tqparentWidget());
if (!potentialViewPort || potentialViewPort->isTopLevel() ||
qstrcmp(potentialViewPort->name(), "qt_viewport"))
return false;
- QWidget *potentialKHTML(potentialViewPort->parentWidget());
+ TQWidget *potentialKHTML(potentialViewPort->tqparentWidget());
if (!potentialKHTML || potentialKHTML->isTopLevel() ||
qstrcmp(potentialKHTML->className(), "KHTMLView"))
@@ -468,22 +469,22 @@ static bool isKhtmlFormWidget(const QWidget *widget)
return true;
}
-static bool inStackWidget(const QWidget *w)
+static bool inStackWidget(const TQWidget *w)
{
while(w)
{
- if(::qt_cast<const QTabWidget *>(w))
+ if(::tqqt_cast<const TQTabWidget *>(w))
return true;
- w=w->parentWidget();
+ w=w->tqparentWidget();
}
return false;
}
-static void setRgb(QColor *col, const QStringList &rgb)
+static void setRgb(TQColor *col, const TQStringList &rgb)
{
if(3==rgb.size())
- *col=QColor(rgb[0].toInt(), rgb[1].toInt(), rgb[2].toInt());
+ *col=TQColor(rgb[0].toInt(), rgb[1].toInt(), rgb[2].toInt());
}
struct KDESettings
@@ -494,7 +495,7 @@ struct KDESettings
}
bool inactiveHighlight;
- QColor hover,
+ TQColor hover,
focus;
};
@@ -510,40 +511,40 @@ static bool readKdeGlobals()
return false;
- QColor highlight(QApplication::palette().active().highlight());
+ TQColor highlight(TQApplication::tqpalette().active().highlight());
bool inactiveEnabled(false),
changeSelectionColor(false),
- useQt3(useQt3Settings());
- QFile f(kdeHome(useQt3)+"/share/config/kdeglobals");
+ useTQt3(useTQt3Settings());
+ TQFile f(kdeHome(useTQt3)+"/share/config/kdeglobals");
lastCheck=now;
- if(useQt3)
+ if(useTQt3)
kdeSettings.hover=kdeSettings.focus=highlight;
else
{
- kdeSettings.hover=QColor(119, 183, 255);
- kdeSettings.focus=QColor( 43, 116, 199);
+ kdeSettings.hover=TQColor(119, 183, 255);
+ kdeSettings.focus=TQColor( 43, 116, 199);
}
if(f.open(IO_ReadOnly))
{
- QTextStream in(&f);
+ TQTextStream in(&f);
bool inPal(false),
inInactive(false),
- donePal(useQt3),
+ donePal(useTQt3),
doneInactive(false);
while (!in.atEnd() && (!donePal || !doneInactive))
{
- QString line(in.readLine());
+ TQString line(in.readLine());
if(inPal)
{
- if(0==line.find("DecorationFocus=", false))
- setRgb(&kdeSettings.focus, QStringList::split(",", line.mid(16)));
- else if(0==line.find("DecorationHover=", false))
- setRgb(&kdeSettings.hover, QStringList::split(",", line.mid(16)));
- else if (-1!=line.find('['))
+ if(0==line.tqfind("DecorationFocus=", false))
+ setRgb(&kdeSettings.focus, TQStringList::split(",", line.mid(16)));
+ else if(0==line.tqfind("DecorationHover=", false))
+ setRgb(&kdeSettings.hover, TQStringList::split(",", line.mid(16)));
+ else if (-1!=line.tqfind('['))
{
donePal=true;
inPal=false;
@@ -551,20 +552,20 @@ static bool readKdeGlobals()
}
else if(inInactive)
{
- if(0==line.find("ChangeSelectionColor=", false))
- changeSelectionColor=line.find("=true");
- else if(0==line.find("Enable=", false))
- inactiveEnabled=line.find("=true");
- else if (-1!=line.find('['))
+ if(0==line.tqfind("ChangeSelectionColor=", false))
+ changeSelectionColor=line.tqfind("=true");
+ else if(0==line.tqfind("Enable=", false))
+ inactiveEnabled=line.tqfind("=true");
+ else if (-1!=line.tqfind('['))
{
doneInactive=true;
inInactive=false;
}
}
if(!inPal && !inInactive)
- if(!useQt3 && 0==line.find("[Colors:Button]", false))
+ if(!useTQt3 && 0==line.tqfind("[Colors:Button]", false))
inPal=true;
- else if(!useQt3 && 0==line.find("[ColorEffects:Inactive]", false))
+ else if(!useTQt3 && 0==line.tqfind("[ColorEffects:Inactive]", false))
inInactive=true;
}
f.close();
@@ -574,8 +575,8 @@ static bool readKdeGlobals()
return true;
}
-static void drawLines(QPainter *p, const QRect &r, bool horiz, int nLines, int offset,
- const QColor *cols, int startOffset, int dark, ELine type)
+static void drawLines(TQPainter *p, const TQRect &r, bool horiz, int nLines, int offset,
+ const TQColor *cols, int startOffset, int dark, ELine type)
{
int space((nLines*2)+(LINE_DASHES!=type ? (nLines-1) : 0)),
step(LINE_DASHES!=type ? 3 : 2),
@@ -624,8 +625,8 @@ static void drawLines(QPainter *p, const QRect &r, bool horiz, int nLines, int o
}
}
-static void drawDots(QPainter *p, const QRect &r, bool horiz, int nLines, int offset,
- const QColor *cols, int startOffset, int dark)
+static void drawDots(TQPainter *p, const TQRect &r, bool horiz, int nLines, int offset,
+ const TQColor *cols, int startOffset, int dark)
{
int space((nLines*2)+(nLines-1)),
x(horiz ? r.x() : r.x()+((r.width()-space)>>1)),
@@ -665,11 +666,11 @@ static void drawDots(QPainter *p, const QRect &r, bool horiz, int nLines, int of
}
}
-static bool onToolBar(QWidget *widget, int l=0)
+static bool onToolBar(TQWidget *widget, int l=0)
{
- return l<3 && widget && widget->parentWidget()
- ? widget->parentWidget()->inherits("QToolBar") ||
- onToolBar(widget->parentWidget(), ++l)
+ return l<3 && widget && widget->tqparentWidget()
+ ? widget->tqparentWidget()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) ||
+ onToolBar(widget->tqparentWidget(), ++l)
: false;
}
@@ -681,35 +682,35 @@ enum ECacheFlags
CACHE_COL_SEL_TAB
};
-static QString createKey(int size, QRgb color, bool horiz, int app, ECacheFlags flags)
+static TQString createKey(int size, TQRgb color, bool horiz, int app, ECacheFlags flags)
{
- QString key;
+ TQString key;
- QTextOStream(&key) << size << '-' << color << '-' << horiz << '-' << app << '-' << flags;
+ TQTextOStream(&key) << size << '-' << color << '-' << horiz << '-' << app << '-' << flags;
return key;
}
-static QString createKey(QRgb color, char type='p')
+static TQString createKey(TQRgb color, char type='p')
{
- QString key;
+ TQString key;
- QTextOStream(&key) << type << color;
+ TQTextOStream(&key) << type << color;
return key;
}
-static QString createKey(QRgb color, EPixmap p)
+static TQString createKey(TQRgb color, EPixmap p)
{
- QString key;
+ TQString key;
- QTextOStream(&key) << 'P' << color << p;
+ TQTextOStream(&key) << 'P' << color << p;
return key;
}
#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
-static void parseWindowLine(const QString &line, QValueList<int> &data)
+static void parseWindowLine(const TQString &line, TQValueList<int> &data)
{
int len(line.length());
@@ -717,55 +718,55 @@ static void parseWindowLine(const QString &line, QValueList<int> &data)
switch(line[i].latin1())
{
case 'M':
- data.append(QStyle::SC_TitleBarSysMenu);
+ data.append(TQStyle::SC_TitleBarSysMenu);
break;
case '_':
data.append(WINDOWTITLE_SPACER);
break;
// case 'H':
-// data.append(QStyle::SC_TitleBarContextHelpButton);
+// data.append(TQStyle::SC_TitleBarContextHelpButton);
// break;
case 'L':
- data.append(QStyle::SC_TitleBarShadeButton);
+ data.append(TQStyle::SC_TitleBarShadeButton);
break;
case 'I':
- data.append(QStyle::SC_TitleBarMinButton);
+ data.append(TQStyle::SC_TitleBarMinButton);
break;
case 'A':
- data.append(QStyle::SC_TitleBarMaxButton);
+ data.append(TQStyle::SC_TitleBarMaxButton);
break;
case 'X':
- data.append(QStyle::SC_TitleBarCloseButton);
+ data.append(TQStyle::SC_TitleBarCloseButton);
default:
break;
}
}
#endif
-static bool isCheckBoxOfGroupBox(const QObject *w)
+static bool isCheckBoxOfGroupBox(const TQObject *w)
{
- return w && w->parent() &&
- ::qt_cast<QCheckBox *>(w) && ::qt_cast<QGroupBox *>(w->parent()) &&
+ return w && w->tqparent() &&
+ ::tqqt_cast<TQCheckBox *>(w) && ::tqqt_cast<TQGroupBox *>(w->tqparent()) &&
!qstrcmp(w->name(), "qt_groupbox_checkbox");
}
-static void drawArrow(QPainter *p, const QRect &r, const QColor &col, QStyle::PrimitiveElement pe, const Options &opts, bool small=false)
+static void drawArrow(TQPainter *p, const TQRect &r, const TQColor &col, TQStyle::TQ_PrimitiveElement pe, const Options &opts, bool small=false)
{
- QPointArray a;
+ TQPointArray a;
if(small)
switch(pe)
{
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints(opts.vArrows ? 6 : 3, 2,0, 0,-2, -2,0, -2,1, 0,-1, 2,1);
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints(opts.vArrows ? 6 : 3, 2,0, 0,2, -2,0, -2,-1, 0,1, 2,-1);
break;
- case QStyle::PE_ArrowRight:
+ case TQStyle::PE_ArrowRight:
a.setPoints(opts.vArrows ? 6 : 3, 0,-2, 2,0, 0,2, -1,2, 1,0 -1,-2);
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints(opts.vArrows ? 6 : 3, 0,-2, -2,0, 0,2, 1,2, -1,0, 1,-2);
break;
default:
@@ -774,16 +775,16 @@ static void drawArrow(QPainter *p, const QRect &r, const QColor &col, QStyle::Pr
else // Large arrows...
switch(pe)
{
- case QStyle::PE_ArrowUp:
+ case TQStyle::PE_ArrowUp:
a.setPoints(opts.vArrows ? 8 : 3, 3,1, 0,-2, -3,1, -3,2, -2,2, 0,0, 2,2, 3,2);
break;
- case QStyle::PE_ArrowDown:
+ case TQStyle::PE_ArrowDown:
a.setPoints(opts.vArrows ? 8 : 3, 3,-1, 0,2, -3,-1, -3,-2, -2,-2, 0,0, 2,-2, 3,-2);
break;
- case QStyle::PE_ArrowRight:
+ case TQStyle::PE_ArrowRight:
a.setPoints(opts.vArrows ? 8 : 3, -1,-3, 2,0, -1,3, -2,3, -2,2, 0,0, -2,-2, -2,-3);
break;
- case QStyle::PE_ArrowLeft:
+ case TQStyle::PE_ArrowLeft:
a.setPoints(opts.vArrows ? 8 : 3, 1,-3, -2,0, 1,3, 2,3, 2,2, 0,0, 2,-2, 2,-3);
break;
default:
@@ -801,10 +802,10 @@ static void drawArrow(QPainter *p, const QRect &r, const QColor &col, QStyle::Pr
p->restore();
}
-#ifdef QTC_STYLE_SUPPORT
-QtCurveStyle::QtCurveStyle(const QString &name)
+#ifdef TQTC_STYLE_SUPPORT
+TQtCurveStyle::TQtCurveStyle(const TQString &name)
#else
-QtCurveStyle::QtCurveStyle()
+TQtCurveStyle::TQtCurveStyle()
#endif
: BASE_STYLE(AllowMenuTransparency, WindowsStyleScrollBar),
itsSliderCols(0L),
@@ -819,7 +820,7 @@ QtCurveStyle::QtCurveStyle()
itsMdiColors(0L),
itsThemedApp(APP_OTHER),
itsPixmapCache(150000, 499),
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
itsIsTransKicker(false),
#endif
itsHover(HOVER_NONE),
@@ -834,41 +835,41 @@ QtCurveStyle::QtCurveStyle()
itsDragWidget(0L),
itsDragWidgetHadMouseTracking(false)
{
-#ifdef QTC_STYLE_SUPPORT
- QString rcFile;
+#ifdef TQTC_STYLE_SUPPORT
+ TQString rcFile;
if(!name.isEmpty())
{
- rcFile=themeFile(kdeHome(), name, useQt3Settings());
+ rcFile=themeFile(kdeHome(), name, useTQt3Settings());
if(rcFile.isEmpty())
{
rcFile=themeFile(kdeHome(true), name);
if(rcFile.isEmpty())
{
- rcFile=themeFile(KDE_PREFIX(useQt3Settings() ? 3 : 4), name, useQt3Settings());
+ rcFile=themeFile(KDE_PREFIX(useTQt3Settings() ? 3 : 4), name, useTQt3Settings());
if(rcFile.isEmpty())
- rcFile=themeFile(KDE_PREFIX(useQt3Settings() ? 4 : 3), name, !useQt3Settings());
+ rcFile=themeFile(KDE_PREFIX(useTQt3Settings() ? 4 : 3), name, !useTQt3Settings());
}
}
}
readConfig(rcFile, &opts);
#else
- readConfig(QString(), &opts);
+ readConfig(TQString(), &opts);
#endif
if(FRAME_LINE==opts.groupBox || opts.gbLabel&GB_LBL_BOLD)
opts.groupBox=FRAME_NONE;
- opts.contrast=QSettings().readNumEntry("/Qt/KDE/contrast", DEFAULT_CONTRAST);
+ opts.contrast=TQSettings().readNumEntry("/TQt/KDE/contrast", DEFAULT_CONTRAST);
if(opts.contrast<0 || opts.contrast>10)
opts.contrast=DEFAULT_CONTRAST;
itsPixmapCache.setAutoDelete(true);
- shadeColors(QApplication::palette().active().highlight(), itsHighlightCols);
- shadeColors(QApplication::palette().active().background(), itsBackgroundCols);
- shadeColors(QApplication::palette().active().button(), itsButtonCols);
+ shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols);
+ shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols);
+ shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols);
setDecorationColors(true);
@@ -884,7 +885,7 @@ QtCurveStyle::QtCurveStyle()
case SHADE_BLEND_SELECTED:
case SHADE_CUSTOM:
if(!itsSliderCols)
- itsSliderCols=new QColor [TOTAL_SHADES+1];
+ itsSliderCols=new TQColor [TOTAL_SHADES+1];
shadeColors(SHADE_BLEND_SELECTED==opts.shadeSliders
? midColor(itsHighlightCols[ORIGINAL_SHADE],
itsButtonCols[ORIGINAL_SHADE])
@@ -899,7 +900,7 @@ QtCurveStyle::QtCurveStyle()
itsDefBtnCols=itsHighlightCols;
break;
case IND_TINT:
- itsDefBtnCols=new QColor [TOTAL_SHADES+1];
+ itsDefBtnCols=new TQColor [TOTAL_SHADES+1];
shadeColors(tint(itsButtonCols[ORIGINAL_SHADE],
itsHighlightCols[ORIGINAL_SHADE], DEF_BNT_TINT), itsDefBtnCols);
break;
@@ -910,7 +911,7 @@ QtCurveStyle::QtCurveStyle()
itsDefBtnCols=itsSliderCols;
else
{
- itsDefBtnCols=new QColor [TOTAL_SHADES+1];
+ itsDefBtnCols=new TQColor [TOTAL_SHADES+1];
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE],
itsButtonCols[ORIGINAL_SHADE]), itsDefBtnCols);
}
@@ -938,7 +939,7 @@ QtCurveStyle::QtCurveStyle()
break;
}
if(!itsComboBtnCols)
- itsComboBtnCols=new QColor [TOTAL_SHADES+1];
+ itsComboBtnCols=new TQColor [TOTAL_SHADES+1];
shadeColors(SHADE_BLEND_SELECTED==opts.comboBtn
? midColor(itsHighlightCols[ORIGINAL_SHADE],
itsButtonCols[ORIGINAL_SHADE])
@@ -950,7 +951,7 @@ QtCurveStyle::QtCurveStyle()
{
case SHADE_DARKEN:
if(!itsSortedLvColors)
- itsSortedLvColors=new QColor [TOTAL_SHADES+1];
+ itsSortedLvColors=new TQColor [TOTAL_SHADES+1];
shadeColors(shade(opts.lvButton ? itsButtonCols[ORIGINAL_SHADE] : itsBackgroundCols[ORIGINAL_SHADE], LV_HEADER_DARK_FACTOR), itsSortedLvColors);
break;
default:
@@ -982,7 +983,7 @@ QtCurveStyle::QtCurveStyle()
break;
}
if(!itsSortedLvColors)
- itsSortedLvColors=new QColor [TOTAL_SHADES+1];
+ itsSortedLvColors=new TQColor [TOTAL_SHADES+1];
shadeColors(SHADE_BLEND_SELECTED==opts.sortedLv
? midColor(itsHighlightCols[ORIGINAL_SHADE],
(opts.lvButton ? itsButtonCols[ORIGINAL_SHADE] : itsBackgroundCols[ORIGINAL_SHADE]))
@@ -998,7 +999,7 @@ QtCurveStyle::QtCurveStyle()
break;
case SHADE_DARKEN:
if(!itsCheckRadioSelCols)
- itsCheckRadioSelCols=new QColor [TOTAL_SHADES+1];
+ itsCheckRadioSelCols=new TQColor [TOTAL_SHADES+1];
shadeColors(shade(itsButtonCols[ORIGINAL_SHADE], LV_HEADER_DARK_FACTOR), itsCheckRadioSelCols);
break;
case SHADE_SELECTED:
@@ -1014,7 +1015,7 @@ QtCurveStyle::QtCurveStyle()
else
{
if(!itsCheckRadioSelCols)
- itsCheckRadioSelCols=new QColor [TOTAL_SHADES+1];
+ itsCheckRadioSelCols=new TQColor [TOTAL_SHADES+1];
shadeColors(opts.customCrBgndColor, itsCheckRadioSelCols);
}
break;
@@ -1028,7 +1029,7 @@ QtCurveStyle::QtCurveStyle()
else
{
if(!itsCheckRadioSelCols)
- itsCheckRadioSelCols=new QColor [TOTAL_SHADES+1];
+ itsCheckRadioSelCols=new TQColor [TOTAL_SHADES+1];
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsCheckRadioSelCols);
}
}
@@ -1053,7 +1054,7 @@ QtCurveStyle::QtCurveStyle()
else
{
if(!itsProgressCols)
- itsProgressCols=new QColor [TOTAL_SHADES+1];
+ itsProgressCols=new TQColor [TOTAL_SHADES+1];
shadeColors(opts.customProgressColor, itsProgressCols);
}
break;
@@ -1067,19 +1068,19 @@ QtCurveStyle::QtCurveStyle()
else
{
if(!itsProgressCols)
- itsProgressCols=new QColor [TOTAL_SHADES+1];
+ itsProgressCols=new TQColor [TOTAL_SHADES+1];
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsBackgroundCols[ORIGINAL_SHADE]), itsProgressCols);
}
}
- setMenuColors(QApplication::palette().active());
+ setMenuColors(TQApplication::tqpalette().active());
if(USE_LIGHTER_POPUP_MENU)
itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE],
TO_FACTOR(opts.lighterPopupMenuBgnd));
if ((SHADE_CUSTOM==opts.shadeMenubars || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars) &&
- "soffice.bin"==QString(qApp->argv()[0]) && TOO_DARK(SHADE_CUSTOM==opts.shadeMenubars
+ "soffice.bin"==TQString(tqApp->argv()[0]) && TOO_DARK(SHADE_CUSTOM==opts.shadeMenubars
? opts.customMenubarsColor
: itsHighlightCols[ORIGINAL_SHADE]))
opts.shadeMenubars=SHADE_DARKEN;
@@ -1087,12 +1088,12 @@ QtCurveStyle::QtCurveStyle()
switch(opts.shadeCheckRadio)
{
default:
- itsCheckRadioCol=opts.crButton ? QApplication::palette().active().buttonText()
- : QApplication::palette().active().text();
+ itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText()
+ : TQApplication::tqpalette().active().text();
break;
case SHADE_BLEND_SELECTED:
case SHADE_SELECTED:
- itsCheckRadioCol=QApplication::palette().active().highlight();
+ itsCheckRadioCol=TQApplication::tqpalette().active().highlight();
break;
case SHADE_CUSTOM:
itsCheckRadioCol=opts.customCheckRadioColor;
@@ -1100,14 +1101,14 @@ QtCurveStyle::QtCurveStyle()
if (opts.animatedProgress)
{
- itsAnimationTimer = new QTimer(this);
- connect(itsAnimationTimer, SIGNAL(timeout()), this, SLOT(updateProgressPos()));
+ itsAnimationTimer = new TQTimer(this);
+ connect(itsAnimationTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateProgressPos()));
}
setSbType();
}
-QtCurveStyle::~QtCurveStyle()
+TQtCurveStyle::~TQtCurveStyle()
{
if(itsSidebarButtonsCols!=itsSliderCols &&
itsSidebarButtonsCols!=itsDefBtnCols)
@@ -1138,11 +1139,11 @@ QtCurveStyle::~QtCurveStyle()
delete itsMactorPal;
}
-static QString getFile(const QString &f)
+static TQString getFile(const TQString &f)
{
- QString d(f);
+ TQString d(f);
- int slashPos(d.findRev('/'));
+ int slashPos(d.tqfindRev('/'));
if(slashPos!=-1)
d.remove(0, slashPos+1);
@@ -1150,24 +1151,24 @@ static QString getFile(const QString &f)
return d;
}
-void QtCurveStyle::polish(QApplication *app)
+void TQtCurveStyle::polish(TQApplication *app)
{
- QString appName(getFile(app->argv()[0]));
+ TQString appName(getFile(app->argv()[0]));
- if(NULL!=getenv("QTCURVE_DEBUG"))
- std::cout << "QtCurve: Application name: \"" << appName.latin1() << "\"\n";
+ if(NULL!=getenv("TQTCURVE_DEBUG"))
+ std::cout << "TQtCurve: Application name: \"" << appName.latin1() << "\"\n";
if ("kicker"==appName || "appletproxy"==appName)
{
itsThemedApp=APP_KICKER;
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
itsIsTransKicker=kickerIsTrans();
#endif
}
else if ("kontact"==appName)
itsThemedApp=APP_KONTACT;
else if ("konqueror"==appName)
- itsThemedApp=APP_KONQUEROR;
+ itsThemedApp=APP_KONTQUEROR;
else if ("kate"==appName)
itsThemedApp=APP_KATE;
else if ("kpresenter"==appName)
@@ -1195,14 +1196,14 @@ void QtCurveStyle::polish(QApplication *app)
else if ("korn"==appName)
{
itsThemedApp=APP_KORN;
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
itsIsTransKicker=kickerIsTrans();
#endif
}
else if ("mactor"==appName)
{
if(!itsMactorPal)
- itsMactorPal=new QPalette(QApplication::palette());
+ itsMactorPal=new TQPalette(TQApplication::tqpalette());
itsThemedApp=APP_MACTOR;
}
else
@@ -1217,9 +1218,13 @@ void QtCurveStyle::polish(QApplication *app)
// works around this...
if(opts.useHighlightForMenu)
{
- QMetaObject *meta=(QMetaObject *)metaObject();
+ TQMetaObject *meta=(TQMetaObject *)tqmetaObject();
+#ifdef USE_QT4
+#warning Qt4 does not allow the metaobject classname to be set (skipping)
+#else // USE_QT4
meta->classname="HighContrastStyle";
+#endif // USE_QT4
}
if(opts.scrollbarType==SCROLLBAR_NEXT)
@@ -1229,47 +1234,47 @@ void QtCurveStyle::polish(QApplication *app)
setSbType();
}
- if(SHADE_NONE!=opts.menuStripe && opts.noMenuStripeApps.contains(appName))
+ if(SHADE_NONE!=opts.menuStripe && opts.noMenuStripeApps.tqcontains(appName))
opts.menuStripe=SHADE_NONE;
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
- if(opts.fixParentlessDialogs && (opts.noDlgFixApps.contains(appName) || opts.noDlgFixApps.contains("kde")))
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ if(opts.fixParentlessDialogs && (opts.noDlgFixApps.tqcontains(appName) || opts.noDlgFixApps.tqcontains("kde")))
opts.fixParentlessDialogs=false;
#endif
}
-void QtCurveStyle::polish(QPalette &pal)
+void TQtCurveStyle::polish(TQPalette &pal)
{
if(APP_MACTOR==itsThemedApp && itsMactorPal &&
pal.active().background()!=itsMactorPal->active().background())
return;
- QSettings settings;
- int contrast(settings.readNumEntry("/Qt/KDE/contrast", DEFAULT_CONTRAST));
+ TQSettings settings;
+ int contrast(settings.readNumEntry("/TQt/KDE/contrast", DEFAULT_CONTRAST));
bool newContrast(false);
readKdeGlobals();
- if(!kdeSettings.inactiveHighlight)// Read in Qt3 palette... Required for the inactive settings...
+ if(!kdeSettings.inactiveHighlight)// Read in TQt3 palette... Required for the inactive settings...
{
- QStringList active(settings.readListEntry("/Qt/Palette/active")),
- inactive(settings.readListEntry("/Qt/Palette/inactive"));
+ TQStringList active(settings.readListEntry("/TQt/Palette/active")),
+ inactive(settings.readListEntry("/TQt/Palette/inactive"));
// Only set if: the active highlight is the same, and the inactive highlight is different.
- // If the user has no ~/.qt/qtrc, then QSettings will return a default palette. However, the palette
+ // If the user has no ~/.qt/qtrc, then TQSettings will return a default palette. However, the palette
// passed in to this ::polish function will be the KDE one - which maybe different. Hence, we need to
- // check that Qt active == KDE active, before reading inactive...
- if (QColorGroup::NColorRoles==active.count() &&
- QColorGroup::NColorRoles==inactive.count() &&
- QColor(active[QColorGroup::Highlight])==pal.color(QPalette::Active, QColorGroup::Highlight) &&
- QColor(active[QColorGroup::HighlightedText])==pal.color(QPalette::Active, QColorGroup::HighlightedText))
+ // check that TQt active == KDE active, before reading inactive...
+ if (TQColorGroup::NColorRoles==active.count() &&
+ TQColorGroup::NColorRoles==inactive.count() &&
+ TQColor(active[TQColorGroup::Highlight])==pal.color(TQPalette::Active, TQColorGroup::Highlight) &&
+ TQColor(active[TQColorGroup::HighlightedText])==pal.color(TQPalette::Active, TQColorGroup::HighlightedText))
{
- QColor h(inactive[QColorGroup::Highlight]),
- t(inactive[QColorGroup::HighlightedText]);
+ TQColor h(inactive[TQColorGroup::Highlight]),
+ t(inactive[TQColorGroup::HighlightedText]);
- if(h!=pal.color(QPalette::Inactive, QColorGroup::Highlight) || t!=QPalette::Inactive, QColorGroup::HighlightedText)
+ if(h!=pal.color(TQPalette::Inactive, TQColorGroup::Highlight) || t!=TQPalette::Inactive, TQColorGroup::HighlightedText)
{
- pal.setColor(QPalette::Inactive, QColorGroup::Highlight, h);
- pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText, t);
+ pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight, h);
+ pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, t);
}
}
}
@@ -1285,19 +1290,19 @@ void QtCurveStyle::polish(QPalette &pal)
if(kdeSettings.inactiveHighlight)
{
- pal.setColor(QPalette::Inactive, QColorGroup::Highlight,
- tint(QApplication::palette().active().background(),
- QApplication::palette().active().highlight(), 0.4));
+ pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight,
+ tint(TQApplication::tqpalette().active().background(),
+ TQApplication::tqpalette().active().highlight(), 0.4));
// KDE4 does not set text colour :-(
- //pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText, pal.color(QPalette::Active, QColorGroup::Foreground));
+ //pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, pal.color(TQPalette::Active, TQColorGroup::Foreground));
}
bool newMenu(newContrast ||
- itsHighlightCols[ORIGINAL_SHADE]!=QApplication::palette().active().highlight()),
+ itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().highlight()),
newGray(newContrast ||
- itsBackgroundCols[ORIGINAL_SHADE]!=QApplication::palette().active().background()),
+ itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().background()),
newButton(newContrast ||
- itsButtonCols[ORIGINAL_SHADE]!=QApplication::palette().active().button()),
+ itsButtonCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().button()),
newSlider(itsSliderCols && SHADE_BLEND_SELECTED==opts.shadeSliders &&
(newContrast || newButton || newMenu)),
newDefBtn(itsDefBtnCols && /*( (IND_COLORED==opts.defBtnIndicator &&*/
@@ -1322,17 +1327,17 @@ void QtCurveStyle::polish(QPalette &pal)
itsSortedLvColors!=itsProgressCols && itsCheckRadioSelCols!=itsProgressCols && (newContrast || newButton));
if(newGray)
- shadeColors(QApplication::palette().active().background(), itsBackgroundCols);
+ shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols);
if(newButton)
- shadeColors(QApplication::palette().active().button(), itsButtonCols);
+ shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols);
if(newMenu)
- shadeColors(QApplication::palette().active().highlight(), itsHighlightCols);
+ shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols);
setDecorationColors();
- setMenuColors(QApplication::palette().active());
+ setMenuColors(TQApplication::tqpalette().active());
if(newSlider)
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsSliderCols);
@@ -1380,12 +1385,12 @@ void QtCurveStyle::polish(QPalette &pal)
switch(opts.shadeCheckRadio)
{
default:
- itsCheckRadioCol=opts.crButton ? QApplication::palette().active().buttonText()
- : QApplication::palette().active().text();
+ itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText()
+ : TQApplication::tqpalette().active().text();
break;
case SHADE_SELECTED:
case SHADE_BLEND_SELECTED:
- itsCheckRadioCol=QApplication::palette().active().highlight();
+ itsCheckRadioCol=TQApplication::tqpalette().active().highlight();
break;
case SHADE_CUSTOM:
itsCheckRadioCol=opts.customCheckRadioColor;
@@ -1395,44 +1400,44 @@ void QtCurveStyle::polish(QPalette &pal)
*itsMactorPal=pal;
// Force this to be re-generated!
if(SHADE_BLEND_SELECTED==opts.menuStripe)
- opts.customMenuStripeColor=Qt::black;
+ opts.customMenuStripeColor=TQt::black;
if(APPEARANCE_STRIPED==opts.bgndAppearance)
- pal.setBrush(QColorGroup::Background, QBrush(pal.active().background(), *createStripePixmap(pal.active().background(), true)));
+ pal.setBrush(TQColorGroup::Background, TQBrush(pal.active().background(), *createStripePixmap(pal.active().background(), true)));
}
-static QColor disable(const QColor &col, const QColor &bgnd)
+static TQColor disable(const TQColor &col, const TQColor &bgnd)
{
- QColor c = col;
+ TQColor c = col;
c = ColorUtils_darken(&c, 0.1, 1.0);
c = ColorUtils_mix(&c, &bgnd, 0.65);
return c;
}
-QColorGroup QtCurveStyle::setColorGroup(const QColorGroup &old, const QColorGroup &act, bool dis)
+TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis)
{
- QColor mid(old.mid());
+ TQColor mid(old.mid());
if(dis)
mid=disable(act.foreground(), old.background());
- const QColor *use(backgroundColors(old));
- QColorGroup newGrp(old.foreground(), old.button(), use[0], use[STD_BORDER],
+ const TQColor *use(backgroundColors(old));
+ TQColorGroup newGrp(old.foreground(), old.button(), use[0], use[STD_BORDER],
mid, old.text(), old.brightText(),
old.base(), old.background());
- QColorGroup::ColorRole roles[]={QColorGroup::Midlight, QColorGroup::ButtonText,
- QColorGroup::Shadow, QColorGroup::Highlight,
- QColorGroup::HighlightedText, QColorGroup::Link,
- QColorGroup::LinkVisited, QColorGroup::NColorRoles };
+ TQColorGroup::ColorRole roles[]={TQColorGroup::Midlight, TQColorGroup::ButtonText,
+ TQColorGroup::Shadow, TQColorGroup::Highlight,
+ TQColorGroup::HighlightedText, TQColorGroup::Link,
+ TQColorGroup::LinkVisited, TQColorGroup::NColorRoles };
int r(0);
- for(r=0; roles[r]!=QColorGroup::NColorRoles; ++r)
+ for(r=0; roles[r]!=TQColorGroup::NColorRoles; ++r)
newGrp.setColor(roles[r], old.color(roles[r]));
if(dis)
{
- newGrp.setColor(QColorGroup::ButtonText, disable(act.buttonText(), old.button()));
- newGrp.setColor(QColorGroup::Text, disable(act.text(), old.background()));
+ newGrp.setColor(TQColorGroup::ButtonText, disable(act.buttonText(), old.button()));
+ newGrp.setColor(TQColorGroup::Text, disable(act.text(), old.background()));
}
return newGrp;
@@ -1440,105 +1445,105 @@ QColorGroup QtCurveStyle::setColorGroup(const QColorGroup &old, const QColorGrou
static const char * kdeToolbarWidget="kde toolbar widget";
-void QtCurveStyle::polish(QWidget *widget)
+void TQtCurveStyle::polish(TQWidget *widget)
{
bool enableFilter(opts.highlightFactor || opts.coloredMouseOver);
if(::isKhtmlFormWidget(widget))
{
itsKhtmlWidgets[widget]=true;
- connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(khtmlWidgetDestroyed(QObject *)));
+ connect(widget, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(khtmlWidgetDestroyed(TQObject *)));
}
if(enableFilter && isSpecialHover(widget))
- connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(hoverWidgetDestroyed(QObject *)));
+ connect(widget, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(hoverWidgetDestroyed(TQObject *)));
- if(isWindowDragWidget(widget))
+ if(isWindowDragWidget(TQT_TQOBJECT(widget)))
widget->installEventFilter(this);
- if(APPEARANCE_STRIPED==opts.bgndAppearance && (::qt_cast<QDialog *>(widget) || ::qt_cast<QMainWindow *>(widget)))
+ if(APPEARANCE_STRIPED==opts.bgndAppearance && (::tqqt_cast<TQDialog *>(widget) || ::tqqt_cast<TQMainWindow *>(widget)))
setBgndProp(widget, APPEARANCE_STRIPED);
- if(widget->parentWidget() && ::qt_cast<QScrollView *>(widget) && ::qt_cast<QComboBox *>(widget->parentWidget()))
+ if(widget->tqparentWidget() && ::tqqt_cast<TQScrollView *>(widget) && ::tqqt_cast<TQComboBox *>(widget->tqparentWidget()))
{
- QPalette pal(widget->palette());
+ TQPalette pal(widget->tqpalette());
#if 0
- QPalette orig(pal);
+ TQPalette orig(pal);
#endif
- QColorGroup act(pal.active());
+ TQColorGroup act(pal.active());
#if 0
if(opts.gtkComboMenus)
- act.setColor(QColorGroup::Base, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
- act.setColor(QColorGroup::Background, opts.gtkComboMenus
+ act.setColor(TQColorGroup::Base, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
+ act.setColor(TQColorGroup::Background, opts.gtkComboMenus
? USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]
- : QApplication::palette().active().base());
+ : TQApplication::tqpalette().active().base());
#endif
- act.setColor(QColorGroup::Foreground, itsBackgroundCols[STD_BORDER]);
+ act.setColor(TQColorGroup::Foreground, itsBackgroundCols[STD_BORDER]);
pal.setActive(act);
widget->setPalette(pal);
#if 0
- //((QScrollView *)widget)->setMargin(1);
+ //((TQScrollView *)widget)->setMargin(1);
- const QObjectList *children(widget->children());
+ const TQObjectList *tqchildren(widget->tqchildren());
- if(children)
+ if(tqchildren)
{
- QObjectList::Iterator it(children->begin()),
- end(children->end());
+ TQObjectList::Iterator it(tqchildren->begin()),
+ end(tqchildren->end());
for(; it!=end; ++it)
- if(::qt_cast<QWidget *>(*it))
- ((QWidget *)(*it))->setPalette(orig);
+ if(::tqqt_cast<TQWidget *>(*it))
+ ((TQWidget *)(*it))->setPalette(orig);
}
#endif
}
- if (APP_MACTOR==itsThemedApp && itsMactorPal && !widget->inherits("QTipLabel"))
+ if (APP_MACTOR==itsThemedApp && itsMactorPal && !widget->inherits("TQTipLabel"))
widget->setPalette(*itsMactorPal);
// Get rid of Kontact's frame...
- if(APP_KONTACT==itsThemedApp && ::qt_cast<QHBox *>(widget) && widget->parentWidget() &&
- 0==qstrcmp(widget->parentWidget()->className(), "Kontact::MainWindow"))
- ((QHBox *)widget)->setLineWidth(0);
+ if(APP_KONTACT==itsThemedApp && ::tqqt_cast<TQHBox *>(widget) && widget->tqparentWidget() &&
+ 0==qstrcmp(widget->tqparentWidget()->className(), "Kontact::MainWindow"))
+ ((TQHBox *)widget)->setLineWidth(0);
- if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::qt_cast<const QPopupMenu *>(widget))
+ if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast<const TQPopupMenu *>(widget))
widget->installEventFilter(this);
#if 0
- if(opts.menubarHiding && ::qt_cast<QMainWindow *>(widget) && static_cast<QMainWindow *>(widget)->menuBar())
+ if(opts.menubarHiding && ::tqqt_cast<TQMainWindow *>(widget) && static_cast<TQMainWindow *>(widget)->menuBar())
widget->installEventFilter(this);
#endif
- if ((opts.square&SQUARE_SCROLLVIEW) && widget &&
- (::qt_cast<const QScrollView *>(widget) ||
- (widget->parentWidget() && ::qt_cast<const QFrame *>(widget) &&
- widget->parentWidget()->inherits("KateView"))) &&
- ((QFrame *)widget)->lineWidth()>1)
- ((QFrame *)widget)->setLineWidth(opts.gtkScrollViews ? 1 : 2);
+ if ((opts.square&STQUARE_SCROLLVIEW) && widget &&
+ (::tqqt_cast<const TQScrollView *>(widget) ||
+ (widget->tqparentWidget() && ::tqqt_cast<const TQFrame *>(widget) &&
+ widget->tqparentWidget()->inherits("KateView"))) &&
+ ((TQFrame *)widget)->lineWidth()>1)
+ ((TQFrame *)widget)->setLineWidth(opts.gtkScrollViews ? 1 : 2);
else if(!opts.popupBorder && widget &&
- (::qt_cast<const QPopupMenu *>(widget) ||
- (widget->parentWidget() && ::qt_cast<const QListBox *>(widget) &&
- ::qt_cast<const QComboBox *>(widget->parentWidget()))))
- ((QFrame *)widget)->setLineWidth(0);
+ (::tqqt_cast<const TQPopupMenu *>(widget) ||
+ (widget->tqparentWidget() && ::tqqt_cast<const TQListBox *>(widget) &&
+ ::tqqt_cast<const TQComboBox *>(widget->tqparentWidget()))))
+ ((TQFrame *)widget)->setLineWidth(0);
else if ((USE_LIGHTER_POPUP_MENU || !IS_FLAT_BGND(opts.menuBgndAppearance)) && !opts.borderMenuitems &&
- widget && ::qt_cast<const QPopupMenu *>(widget))
- ((QFrame *)widget)->setLineWidth(1);
+ widget && ::tqqt_cast<const TQPopupMenu *>(widget))
+ ((TQFrame *)widget)->setLineWidth(1);
- if (::qt_cast<QRadioButton *>(widget) || ::qt_cast<QCheckBox *>(widget))
+ if (::tqqt_cast<TQRadioButton *>(widget) || ::tqqt_cast<TQCheckBox *>(widget))
{
- bool framelessGroupBoxCheckBox=(NO_FRAME(opts.groupBox) && isCheckBoxOfGroupBox(widget));
+ bool framelessGroupBoxCheckBox=(NO_FRAME(opts.groupBox) && isCheckBoxOfGroupBox(TQT_TQOBJECT(widget)));
if(framelessGroupBoxCheckBox || enableFilter)
{
-#if QT_VERSION >= 0x030200
+#if 0x039999 >= 0x030200
if(!isFormWidget(widget))
widget->setMouseTracking(true);
#endif
if(framelessGroupBoxCheckBox)
{
- QFont fnt(widget->font());
+ TQFont fnt(widget->font());
fnt.setBold(true);
widget->setFont(fnt);
@@ -1546,8 +1551,8 @@ void QtCurveStyle::polish(QWidget *widget)
widget->installEventFilter(this);
}
}
- else if (::qt_cast<QHeader *>(widget) || ::qt_cast<QTabBar *>(widget) || ::qt_cast<QSpinWidget *>(widget)/* ||
- ::qt_cast<QDateTimeEditBase*>(widget)*/)
+ else if (::tqqt_cast<TQHeader *>(widget) || ::tqqt_cast<TQTabBar *>(widget) || ::tqqt_cast<TQSpinWidget *>(widget)/* ||
+ ::tqqt_cast<TQDateTimeEditBase*>(widget)*/)
{
if(enableFilter)
{
@@ -1555,7 +1560,7 @@ void QtCurveStyle::polish(QWidget *widget)
widget->installEventFilter(this);
}
}
- else if (::qt_cast<QToolButton *>(widget))
+ else if (::tqqt_cast<TQToolButton *>(widget))
{
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteBackground);
@@ -1567,7 +1572,7 @@ void QtCurveStyle::polish(QWidget *widget)
#endif
}
}
- else if (::qt_cast<QButton *>(widget) || widget->inherits("QToolBarExtensionWidget"))
+ else if (::tqqt_cast<TQButton *>(widget) || widget->inherits("TQToolBarExtensionWidget"))
{
/*if(onToolBar(widget))
widget->setBackgroundMode(NoBackground);
@@ -1576,7 +1581,7 @@ void QtCurveStyle::polish(QWidget *widget)
if(enableFilter)
widget->installEventFilter(this);
}
- else if (::qt_cast<QComboBox *>(widget))
+ else if (::tqqt_cast<TQComboBox *>(widget))
{
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteBackground);
@@ -1588,10 +1593,10 @@ void QtCurveStyle::polish(QWidget *widget)
if(enableFilter)
widget->setMouseTracking(true);
- if(((QComboBox *)widget)->listBox())
- ((QComboBox *)widget)->listBox()->installEventFilter(this);
+ if(((TQComboBox *)widget)->listBox())
+ ((TQComboBox *)widget)->listBox()->installEventFilter(this);
}
- else if(::qt_cast<QMenuBar *>(widget))
+ else if(::tqqt_cast<TQMenuBar *>(widget))
{
if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground);
@@ -1601,13 +1606,13 @@ void QtCurveStyle::polish(QWidget *widget)
emitMenuSize(widget, widget->rect().height());
if(SHADE_WINDOW_BORDER==opts.shadeMenubars)
{
- QPalette pal(widget->palette());
- QColorGroup act(pal.active());
- QColorGroup inact(pal.inactive());
+ TQPalette pal(widget->tqpalette());
+ TQColorGroup act(pal.active());
+ TQColorGroup inact(pal.inactive());
getMdiColors(act, true);
- act.setColor(QColorGroup::Foreground, itsActiveMdiTextColor);
- inact.setColor(QColorGroup::Foreground, opts.shadeMenubarOnlyWhenActive ? itsMdiTextColor : itsActiveMdiTextColor);
+ act.setColor(TQColorGroup::Foreground, itsActiveMdiTextColor);
+ inact.setColor(TQColorGroup::Foreground, opts.shadeMenubarOnlyWhenActive ? itsMdiTextColor : itsActiveMdiTextColor);
pal.setInactive(inact);
pal.setActive(act);
widget->setPalette(pal);
@@ -1615,17 +1620,17 @@ void QtCurveStyle::polish(QWidget *widget)
else if(opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
(SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
{
- QPalette pal(widget->palette());
- QColorGroup act(pal.active());
+ TQPalette pal(widget->tqpalette());
+ TQColorGroup act(pal.active());
- act.setColor(QColorGroup::Foreground, opts.customMenuTextColor
+ act.setColor(TQColorGroup::Foreground, opts.customMenuTextColor
? opts.customMenuNormTextColor
- : QApplication::palette().active().highlightedText());
+ : TQApplication::tqpalette().active().highlightedText());
if(!opts.shadeMenubarOnlyWhenActive)
{
- QColorGroup inact(pal.inactive());
- inact.setColor(QColorGroup::Foreground, act.color(QColorGroup::Foreground));
+ TQColorGroup inact(pal.inactive());
+ inact.setColor(TQColorGroup::Foreground, act.color(TQColorGroup::Foreground));
pal.setInactive(inact);
}
@@ -1633,22 +1638,22 @@ void QtCurveStyle::polish(QWidget *widget)
widget->setPalette(pal);
}
}
- else if(::qt_cast<QToolBar *>(widget))
+ else if(::tqqt_cast<TQToolBar *>(widget))
{
if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground);
}
- else if(::qt_cast<QPopupMenu *>(widget))
+ else if(::tqqt_cast<TQPopupMenu *>(widget))
widget->setBackgroundMode(NoBackground); // PaletteBackground);
else if (widget->inherits("KToolBarSeparator") ||
(widget->inherits("KListViewSearchLineWidget") &&
- widget->parent() && ::qt_cast<QToolBar *>(widget->parent())))
+ widget->tqparent() && ::tqqt_cast<TQToolBar *>(widget->tqparent())))
{
widget->setName(kdeToolbarWidget);
widget->setBackgroundMode(NoBackground);
widget->installEventFilter(this);
}
- else if (::qt_cast<QScrollBar *>(widget))
+ else if (::tqqt_cast<TQScrollBar *>(widget))
{
if(enableFilter)
{
@@ -1657,11 +1662,11 @@ void QtCurveStyle::polish(QWidget *widget)
}
//widget->setBackgroundMode(NoBackground);
}
- else if (::qt_cast<QSlider *>(widget))
+ else if (::tqqt_cast<TQSlider *>(widget))
{
if(enableFilter)
widget->installEventFilter(this);
- if(widget->parent() && ::qt_cast<QToolBar *>(widget->parent()))
+ if(widget->tqparent() && ::tqqt_cast<TQToolBar *>(widget->tqparent()))
{
widget->setName(kdeToolbarWidget);
widget->setBackgroundMode(NoBackground); // We paint whole background.
@@ -1671,28 +1676,28 @@ void QtCurveStyle::polish(QWidget *widget)
}
// This bit stolen form polyester...
- connect(widget, SIGNAL(sliderMoved(int)), this, SLOT(sliderThumbMoved(int)));
- connect(widget, SIGNAL(valueChanged(int)), this, SLOT(sliderThumbMoved(int)));
+ connect(widget, TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(sliderThumbMoved(int)));
+ connect(widget, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(sliderThumbMoved(int)));
}
- else if (::qt_cast<QLineEdit*>(widget) || ::qt_cast<QTextEdit*>(widget))
+ else if (::tqqt_cast<TQLineEdit*>(widget) || ::tqqt_cast<TQTextEdit*>(widget))
{
widget->installEventFilter(this);
if(onToolBar(widget))
widget->setName(kdeToolbarWidget);
- if(widget && widget->parentWidget() &&
- widget->inherits("KLineEdit") && widget->parentWidget()->inherits("KIO::DefaultProgress") &&
- ::qt_cast<QFrame *>(widget))
- ((QFrame *)widget)->setLineWidth(0);
+ if(widget && widget->tqparentWidget() &&
+ widget->inherits("KLineEdit") && widget->tqparentWidget()->inherits("KIO::DefaultProgress") &&
+ ::tqqt_cast<TQFrame *>(widget))
+ ((TQFrame *)widget)->setLineWidth(0);
}
- else if (widget->inherits("QSplitterHandle") || widget->inherits("QDockWindowHandle") || widget->inherits("QDockWindowResizeHandle"))
+ else if (widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) || widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) || widget->inherits("TQDockWindowResizeHandle"))
{
if(enableFilter)
widget->installEventFilter(this);
}
else if (0==qstrcmp(widget->name(), kdeToolbarWidget))
{
- if(!widget->parent() ||
- 0!=qstrcmp(static_cast<QWidget *>(widget->parent())->className(),
+ if(!widget->tqparent() ||
+ 0!=qstrcmp(TQT_TQWIDGET(widget->tqparent())->className(),
"KListViewSearchLineWidget") ||
onToolBar(widget))
{
@@ -1701,28 +1706,28 @@ void QtCurveStyle::polish(QWidget *widget)
}
}
- if (widget->parentWidget() && ::qt_cast<QMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), "QFrame"))
+ if (widget->tqparentWidget() && ::tqqt_cast<TQMenuBar *>(widget->tqparentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING))
{
widget->installEventFilter(this);
widget->setBackgroundMode(NoBackground); // We paint whole background.
}
- else if (Qt::X11ParentRelative!=widget->backgroundMode() &&
- (::qt_cast<QLabel *>(widget) || ::qt_cast<QHBox *>(widget) ||
- ::qt_cast<QVBox *>(widget)) &&
- widget->parent() &&
- ( 0==qstrcmp(static_cast<QWidget *>(widget->parent())->className(),
+ else if (TQt::X11ParentRelative!=widget->backgroundMode() &&
+ (::tqqt_cast<TQLabel *>(widget) || ::tqqt_cast<TQHBox *>(widget) ||
+ ::tqqt_cast<TQVBox *>(widget)) &&
+ widget->tqparent() &&
+ ( 0==qstrcmp(TQT_TQWIDGET(widget->tqparent())->className(),
"MainWindow") || onToolBar(widget)))
{
widget->setName(kdeToolbarWidget);
widget->installEventFilter(this);
widget->setBackgroundMode(NoBackground); // We paint the whole background.
}
- else if(::qt_cast<QProgressBar *>(widget))
+ else if(::tqqt_cast<TQProgressBar *>(widget))
{
- if(widget->palette().inactive().highlightedText()!=widget->palette().active().highlightedText())
+ if(widget->tqpalette().inactive().highlightedText()!=widget->tqpalette().active().highlightedText())
{
- QPalette pal(widget->palette());
- pal.setInactive(widget->palette().active());
+ TQPalette pal(widget->tqpalette());
+ pal.setInactive(widget->tqpalette().active());
widget->setPalette(pal);
}
@@ -1730,12 +1735,12 @@ void QtCurveStyle::polish(QWidget *widget)
{
widget->installEventFilter(this);
itsProgAnimWidgets[widget] = 0;
- connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(progressBarDestroyed(QObject *)));
+ connect(widget, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(progressBarDestroyed(TQObject *)));
if (!itsAnimationTimer->isActive())
itsAnimationTimer->start(PROGRESS_ANIMATION, false);
}
}
- else if(opts.highlightScrollViews && ::qt_cast<QScrollView*>(widget))
+ else if(opts.highlightScrollViews && ::tqqt_cast<TQScrollView*>(widget))
widget->installEventFilter(this);
else if(!qstrcmp(widget->className(), "KonqFrameStatusBar"))
{
@@ -1744,116 +1749,116 @@ void QtCurveStyle::polish(QWidget *widget)
// applications cg.midlight() so we override it to standard background.
// Thanks Comix! (because this was ugly from day one!)
// NOTE: Check if we can set it earlier (before painting), cause
- // on slow machines we can see the repainting of the bar (from white to background...)
- QPalette pal(QApplication::palette());
+ // on slow machines we can see the tqrepainting of the bar (from white to background...)
+ TQPalette pal(TQApplication::tqpalette());
- pal.setColor(QColorGroup::Midlight, pal.active().background());
- QApplication::setPalette(pal);
+ pal.setColor(TQColorGroup::Midlight, pal.active().background());
+ TQApplication::setPalette(pal);
}
else if(widget->inherits("KTabCtl"))
widget->installEventFilter(this);
- else if(NO_FRAME(opts.groupBox) && ::qt_cast<QGroupBox *>(widget))
+ else if(NO_FRAME(opts.groupBox) && ::tqqt_cast<TQGroupBox *>(widget))
{
- ((QGroupBox *)widget)->setFlat(false);
- ((QGroupBox *)widget)->setFrameShape(QFrame::NoFrame);
+ ((TQGroupBox *)widget)->setFlat(false);
+ ((TQGroupBox *)widget)->setFrameShape(TQFrame::NoFrame);
}
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
- else if(opts.fixParentlessDialogs && ::qt_cast<QDialog *>(widget))
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ else if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(widget))
{
- QDialog *dlg=(QDialog *)widget;
+ TQDialog *dlg=(TQDialog *)widget;
- // The parent->isShown is needed for KWord. It's insert picure file dialog is a child of
+ // The tqparent->isShown is needed for KWord. It's insert picure file dialog is a child of
// the insert picture dialog - but the file dialog is shown *before* the picture dialog!
- if( (SKIP_TASKBAR && !dlg->parentWidget()) ||
- ( (!dlg->parentWidget() || !dlg->parentWidget()->isShown())// &&
- /*(dlg->isModal() || ::qt_cast<QProgressDialog *>(widget))*/) )
+ if( (SKIP_TASKBAR && !dlg->tqparentWidget()) ||
+ ( (!dlg->tqparentWidget() || !dlg->tqparentWidget()->isShown())// &&
+ /*(dlg->isModal() || ::tqqt_cast<TQProgressDialog *>(widget))*/) )
widget->installEventFilter(this);
}
if(opts.fixParentlessDialogs && (APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp ||
APP_KDIALOGD==itsThemedApp))
{
- QString cap(widget->caption());
+ TQString cap(widget->caption());
int index=-1;
// Remove horrible "Open - KDialog" titles...
if( cap.length() &&
- ( (APP_KPRINTER==itsThemedApp && (-1!=(index=cap.find(" - KPrinter"))) &&
+ ( (APP_KPRINTER==itsThemedApp && (-1!=(index=cap.tqfind(" - KPrinter"))) &&
(index+11)==(int)cap.length()) ||
- (APP_KDIALOG==itsThemedApp && (-1!=(index=cap.find(" - KDialog"))) &&
+ (APP_KDIALOG==itsThemedApp && (-1!=(index=cap.tqfind(" - KDialog"))) &&
(index+10)==(int)cap.length()) ||
- (APP_KDIALOGD==itsThemedApp && (-1!=(index=cap.find(" - KDialog Daemon"))) &&
+ (APP_KDIALOGD==itsThemedApp && (-1!=(index=cap.tqfind(" - KDialog Daemon"))) &&
(index+17)==(int)cap.length())) )
- widget->QWidget::setCaption(cap.left(index));
+ widget->TQWidget::setCaption(cap.left(index));
}
#endif
if(APP_SYSTEMSETTINGS==itsThemedApp)
{
- if(widget && widget->parentWidget() && widget->parentWidget()->parentWidget() &&
- ::qt_cast<QFrame *>(widget) && QFrame::NoFrame!=((QFrame *)widget)->frameShape() &&
- ::qt_cast<QFrame *>(widget->parentWidget()) &&
- ::qt_cast<QTabWidget *>(widget->parentWidget()->parentWidget()))
- ((QFrame *)widget)->setFrameShape(QFrame::NoFrame);
+ if(widget && widget->tqparentWidget() && widget->tqparentWidget()->tqparentWidget() &&
+ ::tqqt_cast<TQFrame *>(widget) && TQFrame::NoFrame!=((TQFrame *)widget)->frameShape() &&
+ ::tqqt_cast<TQFrame *>(widget->tqparentWidget()) &&
+ ::tqqt_cast<TQTabWidget *>(widget->tqparentWidget()->tqparentWidget()))
+ ((TQFrame *)widget)->setFrameShape(TQFrame::NoFrame);
- if(widget->parentWidget() && widget->parentWidget()->parentWidget() &&
- ::qt_cast<QScrollView *>(widget->parentWidget()->parentWidget()) &&
- widget->inherits("KCMultiWidget") && widget->parentWidget()->inherits("QViewportWidget"))
- ((QScrollView *)(widget->parentWidget()->parentWidget()))->setLineWidth(0);
+ if(widget->tqparentWidget() && widget->tqparentWidget()->tqparentWidget() &&
+ ::tqqt_cast<TQScrollView *>(widget->tqparentWidget()->tqparentWidget()) &&
+ widget->inherits("KCMultiWidget") && widget->tqparentWidget()->inherits("TQViewportWidget"))
+ ((TQScrollView *)(widget->tqparentWidget()->tqparentWidget()))->setLineWidth(0);
}
- if(opts.tabBgnd && widget && widget->parentWidget() && ::qt_cast<QWidgetStack *>(widget) &&
- ::qt_cast<QTabWidget *>(widget->parentWidget()) &&
+ if(opts.tabBgnd && widget && widget->tqparentWidget() && ::tqqt_cast<TQWidgetStack *>(widget) &&
+ ::tqqt_cast<TQTabWidget *>(widget->tqparentWidget()) &&
0==qstrcmp(widget->name(), "tab pages"))
{
- QPalette pal(widget->palette());
+ TQPalette pal(widget->tqpalette());
- pal.setColor(QColorGroup::Background, shade(pal.active().background(), TO_FACTOR(opts.tabBgnd)));
+ pal.setColor(TQColorGroup::Background, shade(pal.active().background(), TO_FACTOR(opts.tabBgnd)));
widget->setBackgroundMode(PaletteBackground);
widget->setPalette(pal);
}
if(APPEARANCE_STRIPED==opts.bgndAppearance)
- widget->setBackgroundOrigin(QWidget::WindowOrigin);
+ widget->setBackgroundOrigin(TQWidget::WindowOrigin);
BASE_STYLE::polish(widget);
}
-void QtCurveStyle::unPolish(QWidget *widget)
+void TQtCurveStyle::unPolish(TQWidget *widget)
{
if(isFormWidget(widget))
itsKhtmlWidgets.remove(widget);
- if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::qt_cast<const QPopupMenu *>(widget))
+ if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast<const TQPopupMenu *>(widget))
widget->removeEventFilter(this);
#if 0
- if(opts.menubarHiding && ::qt_cast<QMainWindow *>(widget) && static_cast<QMainWindow *>(widget)->menuBar())
+ if(opts.menubarHiding && ::tqqt_cast<TQMainWindow *>(widget) && static_cast<TQMainWindow *>(widget)->menuBar())
widget->removeEventFilter(this);
#endif
- if(isWindowDragWidget(widget))
+ if(isWindowDragWidget(TQT_TQOBJECT(widget)))
widget->removeEventFilter(this);
- if (::qt_cast<QRadioButton *>(widget) || ::qt_cast<QCheckBox *>(widget))
+ if (::tqqt_cast<TQRadioButton *>(widget) || ::tqqt_cast<TQCheckBox *>(widget))
{
-#if QT_VERSION >= 0x030200
+#if 0x039999 >= 0x030200
widget->setMouseTracking(false);
#endif
widget->removeEventFilter(this);
}
- else if (::qt_cast<QHeader *>(widget) || ::qt_cast<QTabBar *>(widget) || ::qt_cast<QSpinWidget *>(widget) /*||
- ::qt_cast<QDateTimeEditBase*>(widget)*/)
+ else if (::tqqt_cast<TQHeader *>(widget) || ::tqqt_cast<TQTabBar *>(widget) || ::tqqt_cast<TQSpinWidget *>(widget) /*||
+ ::tqqt_cast<TQDateTimeEditBase*>(widget)*/)
{
widget->setMouseTracking(false);
widget->removeEventFilter(this);
}
- else if (::qt_cast<QButton *>(widget) || widget->inherits("QToolBarExtensionWidget"))
+ else if (::tqqt_cast<TQButton *>(widget) || widget->inherits("TQToolBarExtensionWidget"))
{
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteButton);
widget->removeEventFilter(this);
}
- else if (::qt_cast<QToolButton *>(widget))
+ else if (::tqqt_cast<TQToolButton *>(widget))
{
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteButton);
@@ -1862,21 +1867,21 @@ void QtCurveStyle::unPolish(QWidget *widget)
widget->setMouseTracking(false);
#endif
}
- else if (::qt_cast<QComboBox *>(widget))
+ else if (::tqqt_cast<TQComboBox *>(widget))
{
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteButton);
widget->removeEventFilter(this);
widget->setMouseTracking(false);
- if(((QComboBox *)widget)->listBox())
- ((QComboBox *)widget)->listBox()->removeEventFilter(this);
+ if(((TQComboBox *)widget)->listBox())
+ ((TQComboBox *)widget)->listBox()->removeEventFilter(this);
}
- else if (::qt_cast<QToolBar *>(widget) || ::qt_cast<QPopupMenu *>(widget))
+ else if (::tqqt_cast<TQToolBar *>(widget) || ::tqqt_cast<TQPopupMenu *>(widget))
{
if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground);
}
- else if (::qt_cast<QMenuBar *>(widget))
+ else if (::tqqt_cast<TQMenuBar *>(widget))
{
if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground);
@@ -1884,57 +1889,57 @@ void QtCurveStyle::unPolish(QWidget *widget)
widget->removeEventFilter(this);
if(SHADE_WINDOW_BORDER==opts.shadeMenubars || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars ||
SHADE_SELECTED==opts.shadeMenubars || (SHADE_CUSTOM==opts.shadeMenubars &&TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
- widget->setPalette(QApplication::palette());
+ widget->setPalette(TQApplication::tqpalette());
}
else if (widget->inherits("KToolBarSeparator"))
{
widget->setBackgroundMode(PaletteBackground);
widget->removeEventFilter(this);
}
- else if (::qt_cast<QScrollBar *>(widget))
+ else if (::tqqt_cast<TQScrollBar *>(widget))
{
widget->setMouseTracking(false);
widget->removeEventFilter(this);
widget->setBackgroundMode(PaletteButton);
}
- else if (::qt_cast<QSlider *>(widget))
+ else if (::tqqt_cast<TQSlider *>(widget))
{
widget->removeEventFilter(this);
- if(widget->parent() && ::qt_cast<QToolBar *>(widget->parent()))
+ if(widget->tqparent() && ::tqqt_cast<TQToolBar *>(widget->tqparent()))
widget->setBackgroundMode(PaletteBackground);
}
- else if (::qt_cast<QLineEdit*>(widget) || ::qt_cast<QTextEdit*>(widget))
+ else if (::tqqt_cast<TQLineEdit*>(widget) || ::tqqt_cast<TQTextEdit*>(widget))
widget->removeEventFilter(this);
- else if (widget->inherits("QSplitterHandle") || widget->inherits("QDockWindowHandle") || widget->inherits("QDockWindowResizeHandle"))
+ else if (widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) || widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) || widget->inherits("TQDockWindowResizeHandle"))
widget->removeEventFilter(this);
- else if (::qt_cast<QProgressBar*>(widget))
+ else if (::tqqt_cast<TQProgressBar*>(widget))
{
itsProgAnimWidgets.remove(widget);
widget->removeEventFilter(this);
}
- else if(opts.highlightScrollViews && ::qt_cast<QScrollView*>(widget))
+ else if(opts.highlightScrollViews && ::tqqt_cast<TQScrollView*>(widget))
widget->removeEventFilter(this);
else if(0==qstrcmp(widget->name(), kdeToolbarWidget))
{
widget->removeEventFilter(this);
widget->setBackgroundMode(PaletteBackground);
}
- if (widget->parentWidget() && ::qt_cast<QMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), "QFrame"))
+ if (widget->tqparentWidget() && ::tqqt_cast<TQMenuBar *>(widget->tqparentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING))
{
widget->removeEventFilter(this);
widget->setBackgroundMode(PaletteBackground); // We paint whole background.
}
else if(widget->inherits("KTabCtl"))
widget->removeEventFilter(this);
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
- else if(opts.fixParentlessDialogs && ::qt_cast<QDialog *>(widget))
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ else if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(widget))
widget->removeEventFilter(this);
#endif
BASE_STYLE::unPolish(widget);
}
-static void sendXEvent(QDialog *dlg, const char *msg)
+static void sendXEvent(TQDialog *dlg, const char *msg)
{
static Atom msgTypeAtom = XInternAtom(qt_xdisplay(), "_NET_WM_STATE", False);
@@ -1957,7 +1962,7 @@ static void sendXEvent(QDialog *dlg, const char *msg)
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
-bool QtCurveStyle::appIsNotEmbedded(QDialog *dlg)
+bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
{
Window win;
@@ -1969,59 +1974,59 @@ bool QtCurveStyle::appIsNotEmbedded(QDialog *dlg)
return false;
}
-bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
+bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
{
- if(itsHoverWidget && object==itsHoverWidget && (QEvent::Destroy==event->type() || QEvent::Hide==event->type()))
+ if(itsHoverWidget && TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(itsHoverWidget) && (TQEvent::Destroy==event->type() || TQEvent::Hide==event->type()))
resetHover();
#if 0
// Works for qtconfig, but k3b hangs?
- if(opts.menubarHiding && QEvent::KeyRelease==event->type() && ::qt_cast<QMainWindow *>(object))
+ if(opts.menubarHiding && TQEvent::KeyRelease==event->type() && ::tqqt_cast<TQMainWindow *>(object))
{
- QMainWindow *window=static_cast<QMainWindow *>(object);
+ TQMainWindow *window=static_cast<TQMainWindow *>(object);
if(window->isVisible() && window->menuBar())
{
- QKeyEvent *k=static_cast<QKeyEvent *>(event);
+ TQKeyEvent *k=static_cast<TQKeyEvent *>(event);
- if(k->state()&Qt::ControlButton && k->state()&Qt::AltButton && Qt::Key_M==k->key())
+ if(k->state()&TQt::ControlButton && k->state()&TQt::AltButton && TQt::Key_M==k->key())
window->menuBar()->setHidden(window->menuBar()->isVisible());
}
}
#endif
- if(object->parent() && 0==qstrcmp(object->name(), kdeToolbarWidget))
+ if(object->tqparent() && 0==qstrcmp(object->name(), kdeToolbarWidget))
{
// Draw background for custom widgets in the toolbar that have specified a
// "kde toolbar widget" name.
- if(QEvent::Paint==event->type())
+ if(TQEvent::Paint==event->type())
{
- QWidget *widget(static_cast<QWidget*>(object)),
- *parent(static_cast<QWidget*>(object->parent()));
+ TQWidget *widget(TQT_TQWIDGET(object)),
+ *tqparent(TQT_TQWIDGET(object->tqparent()));
if(IS_FLAT(opts.toolbarAppearance))
- QPainter(widget).fillRect(widget->rect(), parent->colorGroup().background());
+ TQPainter(widget).fillRect(widget->rect(), tqparent->tqcolorGroup().background());
else
{
int y_offset(widget->y());
- while(parent && parent->parent() && 0==qstrcmp(parent->name(), kdeToolbarWidget))
+ while(tqparent && tqparent->tqparent() && 0==qstrcmp(tqparent->name(), kdeToolbarWidget))
{
- y_offset += parent->y();
- parent = static_cast<QWidget*>(parent->parent());
+ y_offset += tqparent->y();
+ tqparent = TQT_TQWIDGET(tqparent->tqparent());
}
- QRect r(widget->rect()),
- pr(parent->rect());
+ TQRect r(widget->rect()),
+ pr(tqparent->rect());
bool horiz=pr.width() > pr.height();
- QPainter p(widget);
- QToolBar *tb(::qt_cast<QToolBar*>(parent));
+ TQPainter p(widget);
+ TQToolBar *tb(::tqqt_cast<TQToolBar*>(tqparent));
- // If parent is a QToolbar use its orientation, else just base on width>height.
+ // If tqparent is a TQToolbar use its orientation, else just base on width>height.
if (tb)
horiz = Qt::Horizontal==tb->orientation();
- QRect bgndRect(r.x(), r.y()-y_offset, r.width(), pr.height());
+ TQRect bgndRect(r.x(), r.y()-y_offset, r.width(), pr.height());
if(!IS_FLAT(opts.toolbarAppearance))
if(horiz)
@@ -2029,21 +2034,21 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
else
bgndRect.addCoords(-1, 0, 1, 0);
- drawMenuOrToolBarBackground(&p, bgndRect, parent->colorGroup(), false, horiz);
+ drawMenuOrToolBarBackground(&p, bgndRect, tqparent->tqcolorGroup(), false, horiz);
}
- if(!::qt_cast<QLineEdit*>(object) && !::qt_cast<QTextEdit*>(object) &&
- !(DO_EFFECT && ::qt_cast<QComboBox*>(object)))
+ if(!::tqqt_cast<TQLineEdit*>(object) && !::tqqt_cast<TQTextEdit*>(object) &&
+ !(DO_EFFECT && ::tqqt_cast<TQComboBox*>(object)))
return false; // Now draw the contents
}
}
- else if (NO_FRAME(opts.groupBox) && QEvent::Move==event->type() && isCheckBoxOfGroupBox(object))
+ else if (NO_FRAME(opts.groupBox) && TQEvent::Move==event->type() && isCheckBoxOfGroupBox(object))
{
- QCheckBox *cb=static_cast<QCheckBox *>(object);
- QRect r(cb->geometry());
+ TQCheckBox *cb=static_cast<TQCheckBox *>(TQT_TQWIDGET(object));
+ TQRect r(cb->tqgeometry());
cb->removeEventFilter(this);
- if(QApplication::reverseLayout())
+ if(TQApplication::reverseLayout())
r.setWidth(r.width()+8);
else
r.setX(0);
@@ -2051,13 +2056,13 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
cb->installEventFilter(this);
return false;
}
- else if (QEvent::Paint==event->type())
+ else if (TQEvent::Paint==event->type())
{
- if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::qt_cast<QPopupMenu *>(object))
+ if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast<TQPopupMenu *>(object))
{
- QWidget *widget=(QWidget*)object;
- QPainter painter(widget);
- QColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->palette().active().background());
+ TQWidget *widget=(TQWidget*)object;
+ TQPainter painter(widget);
+ TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->tqpalette().active().background());
if(APPEARANCE_STRIPED==opts.menuBgndAppearance)
painter.drawTiledPixmap(widget->rect(), *createStripePixmap(col, false));
@@ -2068,58 +2073,58 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
}
else if (object->inherits("KToolBarSeparator"))
{
- QFrame *frame(::qt_cast<QFrame *>(object));
+ TQFrame *frame(::tqqt_cast<TQFrame *>(object));
- if(frame && QFrame::NoFrame!=frame->frameShape())
+ if(frame && TQFrame::NoFrame!=frame->frameShape())
{
- QPainter painter(frame);
- if (QFrame::VLine==frame->frameShape())
- drawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(),
- frame->colorGroup(), Style_Horizontal);
- else if (QFrame::HLine==frame->frameShape())
- drawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(),
- frame->colorGroup());
+ TQPainter painter(frame);
+ if (TQFrame::VLine==frame->frameShape())
+ tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(),
+ frame->tqcolorGroup(), Style_Horizontal);
+ else if (TQFrame::HLine==frame->frameShape())
+ tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(),
+ frame->tqcolorGroup());
else
return false;
return true; // been drawn!
}
}
- else if(object->inherits("KTabCtl") && ::qt_cast<QWidget*>(object))
+ else if(object->inherits("KTabCtl") && ::tqqt_cast<TQWidget*>(object))
{
- QWidget *widget((QWidget*)object);
- QObject *child(object->child("_tabbar"));
- QTabBar *tb(child ? ::qt_cast<QTabBar *>(child) : 0L);
- QPainter painter(widget);
- QRect r(widget->rect());
+ TQWidget *widget((TQWidget*)object);
+ TQObject *child(object->child("_tabbar"));
+ TQTabBar *tb(child ? ::tqqt_cast<TQTabBar *>(child) : 0L);
+ TQPainter painter(widget);
+ TQRect r(widget->rect());
int tbHeight(tb ? tb->height()-1 : 28);
- if(tb && (QTabBar::RoundedBelow == tb->shape() ||
- QTabBar::TriangularBelow == tb->shape()))
+ if(tb && (TQTabBar::RoundedBelow == tb->tqshape() ||
+ TQTabBar::TriangularBelow == tb->tqshape()))
r.addCoords(0, 0, 0, -tbHeight);
else
r.addCoords(0, tbHeight, 0, 0);
- drawPrimitive(PE_PanelTabWidget, &painter, r, widget->colorGroup(),
+ tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->tqcolorGroup(),
Style_Horizontal|Style_Enabled);
return true;
}
}
// Fix mdi buttons in menubars...
- if(::qt_cast<QWidget*>(object) && ((QWidget *)object)->parentWidget() &&
- ::qt_cast<QMenuBar*>(((QWidget *)object)->parentWidget()))
+ if(::tqqt_cast<TQWidget*>(object) && ((TQWidget *)object)->tqparentWidget() &&
+ ::tqqt_cast<TQMenuBar*>(((TQWidget *)object)->tqparentWidget()))
{
bool drawMenubar=false;
switch(event->type())
{
- case QEvent::Paint:
+ case TQEvent::Paint:
drawMenubar=true;
break;
- case QEvent::WindowActivate:
+ case TQEvent::WindowActivate:
itsActive=true;
drawMenubar=opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars;
break;
- case QEvent::WindowDeactivate:
+ case TQEvent::WindowDeactivate:
itsActive=false;
drawMenubar=opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars;
default:
@@ -2129,86 +2134,86 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
if(drawMenubar)
{
- QWidget *widget(static_cast<QWidget*>(object)),
- *parent(static_cast<QWidget*>(object->parent()));
- QRect r(widget->rect());
- QPainter p(widget);
- int y_offset(widget->y()+parent->y());
+ TQWidget *widget(TQT_TQWIDGET(object)),
+ *tqparent(TQT_TQWIDGET(object->tqparent()));
+ TQRect r(widget->rect());
+ TQPainter p(widget);
+ int y_offset(widget->y()+tqparent->y());
r.setY(r.y()-y_offset);
- r.setHeight(parent->rect().height());
+ r.setHeight(tqparent->rect().height());
- drawMenuOrToolBarBackground(&p, r, parent->colorGroup());
+ drawMenuOrToolBarBackground(&p, r, tqparent->tqcolorGroup());
return true;
}
}
// Taken from plastik...
// focus highlight
- if (::qt_cast<QLineEdit*>(object) || ::qt_cast<QTextEdit*>(object)/* || ::qt_cast<QDateTimeEditBase*>(object)*/)
+ if (::tqqt_cast<TQLineEdit*>(object) || ::tqqt_cast<TQTextEdit*>(object)/* || ::tqqt_cast<TQDateTimeEditBase*>(object)*/)
{
- if(QEvent::FocusIn==event->type() || QEvent::FocusOut==event->type() || QEvent::Enter==event->type() || QEvent::Leave==event->type())
+ if(TQEvent::FocusIn==event->type() || TQEvent::FocusOut==event->type() || TQEvent::Enter==event->type() || TQEvent::Leave==event->type())
{
- QWidget *widget(static_cast<QWidget*>(object));
+ TQWidget *widget(TQT_TQWIDGET(object));
- if (::qt_cast<QSpinWidget*>(widget->parentWidget()))
+ if (::tqqt_cast<TQSpinWidget*>(widget->tqparentWidget()))
{
- widget->parentWidget()->repaint(false);
+ widget->tqparentWidget()->tqrepaint(false);
return false;
}
- widget->repaint(false);
+ widget->tqrepaint(false);
}
return false;
}
- if(::qt_cast<QMenuBar *>(object))
+ if(::tqqt_cast<TQMenuBar *>(object))
{
bool useWindowCols=SHADE_WINDOW_BORDER==opts.shadeMenubars;
if( (useWindowCols || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
- SHADE_CUSTOM==opts.shadeMenubars) && QEvent::Paint==event->type())
+ SHADE_CUSTOM==opts.shadeMenubars) && TQEvent::Paint==event->type())
{
- const QColor &col(((QWidget *)object)->palette().active().color(QColorGroup::Foreground));
+ const TQColor &col(((TQWidget *)object)->tqpalette().active().color(TQColorGroup::Foreground));
// If we're relouring the menubar text, check to see if menubar palette has changed, if so set back to
// our values. This fixes opera - which seems to change the widgets palette after it is polished.
if((opts.customMenuTextColor && col!=opts.customMenuNormTextColor) ||
( (SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
(SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) &&
- col!=QApplication::palette().active().highlightedText()))
+ col!=TQApplication::tqpalette().active().highlightedText()))
{
- QPalette pal(((QWidget *)object)->palette());
- QColorGroup act(pal.active());
+ TQPalette pal(((TQWidget *)object)->tqpalette());
+ TQColorGroup act(pal.active());
- act.setColor(QColorGroup::Foreground, useWindowCols
+ act.setColor(TQColorGroup::Foreground, useWindowCols
? itsActiveMdiTextColor
: opts.customMenuTextColor
? opts.customMenuNormTextColor
- : QApplication::palette().active().highlightedText());
+ : TQApplication::tqpalette().active().highlightedText());
if(!opts.shadeMenubarOnlyWhenActive || useWindowCols)
{
- QColorGroup inact(pal.inactive());
- inact.setColor(QColorGroup::Foreground, useWindowCols ? itsMdiTextColor : act.color(QColorGroup::Foreground));
+ TQColorGroup inact(pal.inactive());
+ inact.setColor(TQColorGroup::Foreground, useWindowCols ? itsMdiTextColor : act.color(TQColorGroup::Foreground));
pal.setInactive(inact);
}
pal.setActive(act);
- ((QWidget *)object)->setPalette(pal);
+ ((TQWidget *)object)->setPalette(pal);
}
}
if(opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars)
switch(event->type())
{
- case QEvent::WindowActivate:
+ case TQEvent::WindowActivate:
itsActive=true;
- ((QWidget *)object)->repaint(false);
+ ((TQWidget *)object)->tqrepaint(false);
return false;
- case QEvent::WindowDeactivate:
+ case TQEvent::WindowDeactivate:
itsActive=false;
- ((QWidget *)object)->repaint(false);
+ ((TQWidget *)object)->tqrepaint(false);
return false;
default:
break;
@@ -2216,41 +2221,41 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
if(BLEND_TITLEBAR || opts.windowBorder&WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR)
switch(event->type())
{
- case QEvent::Resize:
+ case TQEvent::Resize:
{
- QResizeEvent *re = static_cast<QResizeEvent *>(event);
+ TQResizeEvent *re = TQT_TQRESIZEEVENT(event);
if (re->size().height() != re->oldSize().height())
- emitMenuSize((QMenuBar *)object, re->size().height());
+ emitMenuSize((TQMenuBar *)object, re->size().height());
break;
}
}
}
- if(dynamic_cast<QMouseEvent*>(event))
+ if(dynamic_cast<TQMouseEvent*>(event))
switch(event->type())
{
- case QEvent::MouseMove: // Only occurs for widgets with mouse tracking enabled
+ case TQEvent::MouseMove: // Only occurs for widgets with mouse tracking enabled
if(itsDragWidget)
{
itsDragWidget->setMouseTracking(itsDragWidgetHadMouseTracking);
bool move=isWindowDragWidget(object);
if(move)
- triggerWMMove(itsDragWidget, ((QMouseEvent *)event)->globalPos());
+ triggerWMMove(itsDragWidget, ((TQMouseEvent *)event)->globalPos());
itsDragWidget = 0L;
return move;
}
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
- QMouseEvent *mev = (QMouseEvent *)event;
+ TQMouseEvent *mev = (TQMouseEvent *)event;
if(isWindowDragWidget(object, mev->pos()))
{
- if(/*Qt::NoModifier==mev->modifiers() && */ Qt::LeftButton==mev->button())
+ if(/*TQt::NoModifier==mev->modifiers() && */ Qt::LeftButton==mev->button())
{
- QWidget *wid = static_cast<QWidget*>(object);
+ TQWidget *wid = TQT_TQWIDGET(object);
itsDragWidget=wid;
itsDragWidgetHadMouseTracking=itsDragWidget->hasMouseTracking();
itsDragWidget->setMouseTracking(true);
@@ -2259,7 +2264,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
}
break;
}
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
if(itsDragWidget)
{
itsDragWidget->setMouseTracking(itsDragWidgetHadMouseTracking);
@@ -2269,14 +2274,14 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
break;
}
-#ifdef QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
- if(opts.fixParentlessDialogs && ::qt_cast<QDialog *>(object))
+#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
+ if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(object))
{
- QDialog *dlg=(QDialog *)object;
+ TQDialog *dlg=(TQDialog *)object;
switch(event->type())
{
- case QEvent::ShowMinimized:
+ case TQEvent::ShowMinimized:
if(SKIP_TASKBAR && appIsNotEmbedded(dlg))
{
// Ugly hack :-( Cant seem to get KWin to remove the minimize button. So when
@@ -2285,7 +2290,7 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
return true;
}
break;
- case QEvent::WindowActivate:
+ case TQEvent::WindowActivate:
if(SKIP_TASKBAR && appIsNotEmbedded(dlg))
{
// OO.o's filepicker is a spawned process - but is not set transient :-(
@@ -2297,14 +2302,14 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
//setActions(dlg);
}
break;
- case QEvent::Show:
- // The parent->isShown is needed for KWord. It's insert picure file dialog is a
+ case TQEvent::Show:
+ // The tqparent->isShown is needed for KWord. It's insert picure file dialog is a
// child of the insert picture dialog - but the file dialog is shown *before* the
// picture dialog!
- if((!dlg->parentWidget() || !dlg->parentWidget()->isShown())) // &&
- //(dlg->isModal() || ::qt_cast<QProgressDialog *>(object)))
+ if((!dlg->tqparentWidget() || !dlg->tqparentWidget()->isShown())) // &&
+ //(dlg->isModal() || ::tqqt_cast<TQProgressDialog *>(object)))
{
- QWidget *activeWindow=qApp->activeWindow();
+ TQWidget *activeWindow=tqApp->activeWindow();
if(activeWindow)
{
@@ -2345,47 +2350,47 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
#endif
// Track show events for progress bars
- if (opts.animatedProgress && ::qt_cast<QProgressBar*>(object))
+ if (opts.animatedProgress && ::tqqt_cast<TQProgressBar*>(object))
{
- if(QEvent::Show==event->type() && !itsAnimationTimer->isActive())
+ if(TQEvent::Show==event->type() && !itsAnimationTimer->isActive())
itsAnimationTimer->start(PROGRESS_ANIMATION, false);
return false;
}
switch(event->type())
{
- case QEvent::FocusIn:
- case QEvent::FocusOut:
- if(opts.highlightScrollViews && object->isWidgetType() && ::qt_cast<QScrollView*>(object))
- ((QWidget *)object)->repaint(false);
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
+ if(opts.highlightScrollViews && object->isWidgetType() && ::tqqt_cast<TQScrollView*>(object))
+ ((TQWidget *)object)->tqrepaint(false);
break;
- case QEvent::Hide:
- case QEvent::Show:
- if(::qt_cast<QListBox *>(object) &&
- (((QListBox *)object)->parentWidget() &&
- ::qt_cast<QComboBox *>(((QListBox *)object)->parentWidget())))
- ((QComboBox *)(((QListBox *)object)->parentWidget()))->repaint(false);
-// else if(::qt_cast<QFrame *>(object) &&
-// (QFrame::Box==((QFrame *)object)->frameShape() || QFrame::Panel==((QFrame *)object)->frameShape() ||
-// QFrame::WinPanel==((QFrame *)object)->frameShape()))
-// ((QFrame *)object)->setFrameShape(QFrame::StyledPanel);
+ case TQEvent::Hide:
+ case TQEvent::Show:
+ if(::tqqt_cast<TQListBox *>(object) &&
+ (((TQListBox *)object)->tqparentWidget() &&
+ ::tqqt_cast<TQComboBox *>(((TQListBox *)object)->tqparentWidget())))
+ ((TQComboBox *)(((TQListBox *)object)->tqparentWidget()))->tqrepaint(false);
+// else if(::tqqt_cast<TQFrame *>(object) &&
+// (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() ||
+// TQFrame::WinPanel==((TQFrame *)object)->frameShape()))
+// ((TQFrame *)object)->setFrameShape(TQFrame::StyledPanel);
break;
- case QEvent::Enter:
+ case TQEvent::Enter:
if(object->isWidgetType())
{
- itsHoverWidget=(QWidget *)object;
+ itsHoverWidget=(TQWidget *)object;
if(itsHoverWidget && itsHoverWidget->isEnabled())
{
- if(::qt_cast<QTabBar*>(object) && static_cast<QWidget*>(object)->isEnabled())
+ if(::tqqt_cast<TQTabBar*>(object) && TQT_TQWIDGET(object)->isEnabled())
{
itsHoverTab=0L;
- itsHoverWidget->repaint(false);
+ itsHoverWidget->tqrepaint(false);
}
else if(!itsHoverWidget->hasMouseTracking() ||
(itsFormMode=isFormWidget(itsHoverWidget)))
{
- itsHoverWidget->repaint(false);
+ itsHoverWidget->tqrepaint(false);
itsFormMode=false;
}
}
@@ -2396,21 +2401,21 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
itsIsSpecialHover=true;
}
break;
- case QEvent::Leave:
- if(itsHoverWidget && object==itsHoverWidget)
+ case TQEvent::Leave:
+ if(itsHoverWidget && TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(itsHoverWidget))
{
resetHover();
- ((QWidget *)object)->repaint(false);
+ ((TQWidget *)object)->tqrepaint(false);
}
break;
- case QEvent::MouseMove: // Only occurs for widgets with mouse tracking enabled
+ case TQEvent::MouseMove: // Only occurs for widgets with mouse tracking enabled
{
- QMouseEvent *me = static_cast<QMouseEvent*>(event);
+ TQMouseEvent *me = TQT_TQMOUSEEVENT(event);
if(me && itsHoverWidget && object->isWidgetType())
{
if(!me->pos().isNull() && itsIsSpecialHover && redrawHoverWidget(me->pos()))
- itsHoverWidget->repaint(false);
+ itsHoverWidget->tqrepaint(false);
itsOldPos=me->pos();
}
break;
@@ -2422,13 +2427,13 @@ bool QtCurveStyle::eventFilter(QObject *object, QEvent *event)
return BASE_STYLE::eventFilter(object, event);
}
-void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &rOrig,
- const QColorGroup &cg, SFlags flags,
- int round, const QColor &fill, const QColor *custom,
+void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig,
+ const TQColorGroup &cg, SFlags flags,
+ int round, const TQColor &fill, const TQColor *custom,
bool doBorder, bool doCorners, EWidget w) const
{
EAppearance app(widgetApp(w, &opts));
- QRect r(rOrig),
+ TQRect r(rOrig),
br(r);
bool bevelledButton(WIDGET_BUTTON(w) && APPEARANCE_BEVELLED==app),
sunken(flags &(Style_Down|Style_On|Style_Sunken)),
@@ -2452,7 +2457,7 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
glowFocus(doEtch && USE_GLOW_FOCUS(flags&Style_MouseOver) && flags&Style_HasFocus && flags&Style_Enabled),
sunkenToggleMo(sunken && !(flags&Style_Down) && flags&(Style_MouseOver|TOGGLE_BUTTON)),
horiz(flags&Style_Horizontal);
- const QColor *cols(custom ? custom : itsBackgroundCols),
+ const TQColor *cols(custom ? custom : itsBackgroundCols),
*border(colouredMouseOver ? borderColors(flags, cols) : cols);
p->save();
@@ -2470,7 +2475,7 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
if(WIDGET_PROGRESSBAR==w && opts.stripedProgress)
{
p->save();
- p->setClipRegion(p->clipRegion().eor(QRegion(br)));
+ p->setClipRegion(p->clipRegion().eor(TQRegion(br)));
}
br.addCoords(1, 1,-1,-1);
drawBevelGradient(fill, p, br, horiz, sunken, app, w);
@@ -2517,7 +2522,7 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
if(!colouredMouseOver && lightBorder && br.width()>0 && br.height()>0)
{
- QColor col(cols[APPEARANCE_DULL_GLASS==app ? 1 : 0]);
+ TQColor col(cols[APPEARANCE_DULL_GLASS==app ? 1 : 0]);
p->setPen(col);
br=r;
@@ -2545,16 +2550,16 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
if(horiz)
{
- drawBevelGradient(itsMouseOverCols[col], p, QRect(r.x()+so, r.y(), len, r.height()),
+ drawBevelGradient(itsMouseOverCols[col], p, TQRect(r.x()+so, r.y(), len, r.height()),
horiz, sunken, app, w);
- drawBevelGradient(itsMouseOverCols[col], p, QRect(r.x()+r.width()-eo, r.y(), len, r.height()),
+ drawBevelGradient(itsMouseOverCols[col], p, TQRect(r.x()+r.width()-eo, r.y(), len, r.height()),
horiz, sunken, app, w);
}
else
{
- drawBevelGradient(itsMouseOverCols[col], p, QRect(r.x(), r.y()+so, r.width(), len),
+ drawBevelGradient(itsMouseOverCols[col], p, TQRect(r.x(), r.y()+so, r.width(), len),
horiz, sunken, app, w);
- drawBevelGradient(itsMouseOverCols[col], p, QRect(r.x(), r.y()+r.height()-eo, r.width(), len),
+ drawBevelGradient(itsMouseOverCols[col], p, TQRect(r.x(), r.y()+r.height()-eo, r.width(), len),
horiz, sunken, app, w);
}
}
@@ -2606,7 +2611,7 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
if(doBorder)
{
- const QColor *borderCols=glowFocus ||
+ const TQColor *borderCols=glowFocus ||
(WIDGET_COMBO==w && USE_GLOW_FOCUS(flags&Style_MouseOver) && flags&Style_HasFocus && flags&Style_Enabled)
? itsFocusCols
: (WIDGET_COMBO==w || WIDGET_COMBO_BUTTON==w) && cols==itsComboBtnCols
@@ -2643,14 +2648,14 @@ void QtCurveStyle::drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &
p->restore();
}
-void QtCurveStyle::drawGlow(QPainter *p, const QRect &r, const QColorGroup &cg, EWidget w, const QColor *cols) const
+void TQtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols) const
{
if(itsMouseOverCols || itsDefBtnCols || cols)
{
bool def(WIDGET_DEF_BUTTON==w && IND_GLOW==opts.defBtnIndicator),
defShade=def && (!itsDefBtnCols ||
(itsMouseOverCols && itsDefBtnCols[ORIGINAL_SHADE]==itsMouseOverCols[ORIGINAL_SHADE]));
- QColor col(cols ? cols[GLOW_MO]
+ TQColor col(cols ? cols[GLOW_MO]
: (def && itsDefBtnCols) || !itsMouseOverCols
? itsDefBtnCols[GLOW_DEFBTN] : itsMouseOverCols[GLOW_MO]);
@@ -2678,14 +2683,14 @@ void QtCurveStyle::drawGlow(QPainter *p, const QRect &r, const QColorGroup &cg,
}
}
-void QtCurveStyle::drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg, bool raised, bool square) const
+void TQtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square) const
{
square=square || ROUND_NONE==opts.round;
int mod(square ? 0 : 2);
{
- QColor col(raised ? shade(cg.background(), ETCHED_DARK) : itsBackgroundCols[1]);
+ TQColor col(raised ? shade(cg.background(), ETCHED_DARK) : itsBackgroundCols[1]);
p->setPen(col);
p->drawLine(r.x()+mod, r.y()+r.height()-1, r.x()+r.width()-(1+mod), r.y()+r.height()-1);
@@ -2700,7 +2705,7 @@ void QtCurveStyle::drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg,
}
if(!raised)
{
- QColor darkCol(shade(cg.background(), ETCHED_DARK));
+ TQColor darkCol(shade(cg.background(), ETCHED_DARK));
p->setPen(darkCol);
p->drawLine(r.x()+1+mod, r.y(), r.x()+r.width()-(2+mod), r.y());
@@ -2715,13 +2720,13 @@ void QtCurveStyle::drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg,
}
}
-void QtCurveStyle::drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, const QColorGroup &cg,
- SFlags flags, int round, const QColor *custom, EWidget w, bool doCorners,
+void TQtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ SFlags flags, int round, const TQColor *custom, EWidget w, bool doCorners,
EBorder borderProfile, bool blendBorderColors, int borderVal) const
{
EAppearance app(widgetApp(w, &opts));
- const QColor *cols(custom ? custom : itsBackgroundCols);
- QColor border(flags&Style_ButtonDefault && IND_FONT_COLOR==opts.defBtnIndicator &&
+ const TQColor *cols(custom ? custom : itsBackgroundCols);
+ TQColor border(flags&Style_ButtonDefault && IND_FONT_COLOR==opts.defBtnIndicator &&
flags&Style_Enabled
? cg.buttonText()
: cols[WIDGET_PROGRESSBAR==w
@@ -2824,9 +2829,9 @@ void QtCurveStyle::drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, c
//if(!opts.fillProgress || WIDGET_PROGRESSBAR!=w)
{
- QColor largeArcMid(midColor(border, bgnd)),
+ TQColor largeArcMid(midColor(border, bgnd)),
aaColor(midColor(custom ? custom[3] : itsBackgroundCols[3], bgnd));
- QPixmap *pix=itsFormMode ? getPixelPixmap(border) : 0L;
+ TQPixmap *pix=itsFormMode ? getPixelPixmap(border) : 0L;
if(round&CORNER_TL)
{
@@ -2965,7 +2970,7 @@ void QtCurveStyle::drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, c
}
}
-void QtCurveStyle::drawMdiIcon(QPainter *painter, const QColor &color, const QColor &shadow, const QRect &r, bool sunken, int margin,
+void TQtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const TQColor &shadow, const TQRect &r, bool sunken, int margin,
SubControl button) const
{
if(!sunken)
@@ -2973,9 +2978,9 @@ void QtCurveStyle::drawMdiIcon(QPainter *painter, const QColor &color, const QCo
drawWindowIcon(painter, color, r, sunken, margin, button);
}
-void QtCurveStyle::drawWindowIcon(QPainter *painter, const QColor &color, const QRect &r, bool sunken, int margin, SubControl button) const
+void TQtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, const TQRect &r, bool sunken, int margin, SubControl button) const
{
- QRect rect(r);
+ TQRect rect(r);
// Icons look best at 22x22...
if(rect.height()>22)
@@ -3022,7 +3027,7 @@ void QtCurveStyle::drawWindowIcon(QPainter *painter, const QColor &color, const
break;
case SC_TitleBarNormalButton:
{
- QRect r2 = adjusted(rect, 0, 3, -3, 0);
+ TQRect r2 = adjusted(rect, 0, 3, -3, 0);
painter->drawRect(r2); // adjusted(r2, 0, 0, -1, -1));
painter->drawLine(r2.left() + 1, r2.top() + 1, r2.right() - 1, r2.top() + 1);
@@ -3031,8 +3036,8 @@ void QtCurveStyle::drawWindowIcon(QPainter *painter, const QColor &color, const
painter->drawPoint(r2.bottomLeft());
painter->drawPoint(r2.bottomRight());
- QRect backWindowRect(adjusted(rect, 3, 0, 0, -3));
- QRegion clipRegion(backWindowRect);
+ TQRect backWindowRect(adjusted(rect, 3, 0, 0, -3));
+ TQRegion clipRegion(backWindowRect);
clipRegion -= r2;
if(sunken)
@@ -3056,22 +3061,22 @@ void QtCurveStyle::drawWindowIcon(QPainter *painter, const QColor &color, const
}
}
-void QtCurveStyle::drawEntryField(QPainter *p, const QRect &rx, const QColorGroup &cg,
+void TQtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColorGroup &cg,
SFlags flags, EntryColor coloration, int round, EWidget w) const
{
- const QColor *use(ENTRY_MOUSE_OVER==coloration && itsMouseOverCols
+ const TQColor *use(ENTRY_MOUSE_OVER==coloration && itsMouseOverCols
? itsMouseOverCols
: ENTRY_FOCUS==coloration && itsFocusCols
? itsFocusCols
: backgroundColors(cg));
bool isSpin(WIDGET_SPIN==w),
doEtch(!itsFormMode && opts.etchEntry && (!isSpin || opts.unifySpin) && WIDGET_COMBO!=w && DO_EFFECT),
- reverse(QApplication::reverseLayout());
+ reverse(TQApplication::reverseLayout());
- if(WIDGET_SCROLLVIEW!=w && (opts.square&SQUARE_ENTRY))
+ if(WIDGET_SCROLLVIEW!=w && (opts.square&STQUARE_ENTRY))
round=ROUNDED_NONE;
- QRect r(rx);
+ TQRect r(rx);
if(doEtch)
r.addCoords(1, 1, -1, -1);
@@ -3102,7 +3107,7 @@ void QtCurveStyle::drawEntryField(QPainter *p, const QRect &rx, const QColorGrou
if(doEtch)
{
- QRect r(rx);
+ TQRect r(rx);
p->setClipRegion(r);
if(!(round&CORNER_TR) && !(round&CORNER_BR))
@@ -3115,35 +3120,35 @@ void QtCurveStyle::drawEntryField(QPainter *p, const QRect &rx, const QColorGrou
}
}
-void QtCurveStyle::drawArrow(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
- PrimitiveElement pe, bool small, bool checkActive) const
+void TQtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
+ TQ_PrimitiveElement pe, bool small, bool checkActive) const
{
- const QColor &col(flags&Style_Enabled
+ const TQColor &col(flags&Style_Enabled
? checkActive && flags&Style_Active
? cg.highlightedText()
: cg.text()
: cg.mid());
- ::drawArrow(p, r, p->pen()==QPen::NoPen ? col : p->pen().color(), pe, opts, small);
+ ::drawArrow(p, r, p->pen().style()==TQPen::NoPen ? col : TQColor(p->pen().color()), pe, opts, small);
}
-void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &r,
- const QColorGroup &cg, SFlags flags, const QStyleOption &data) const
+void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r,
+ const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const
{
switch(pe)
{
case PE_HeaderSection:
{
// Is it a taskbar button? Kicker uses PE_HeaderSection for these! :-(
- // If the painter device is a QWidger, assume its not a taskbar button...
- if(APP_KICKER==itsThemedApp && (!p->device() || !dynamic_cast<QWidget *>(p->device())))
+ // If the painter device is a TQWidger, assume its not a taskbar button...
+ if(APP_KICKER==itsThemedApp && (!p->device() || !dynamic_cast<TQWidget *>(p->device())))
{
- const QColor *use(buttonColors(cg));
+ const TQColor *use(buttonColors(cg));
if(flags&Style_Down)
flags=((flags|Style_Down)^Style_Down)| Style_Sunken;
flags|=Style_Enabled;
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
if(HOVER_KICKER==itsHover && itsHoverWidget) // && itsHoverWidget==p->device())
flags|=Style_MouseOver;
@@ -3152,20 +3157,20 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
#endif
drawLightBevel(p, r, cg, flags|Style_Horizontal, ROUNDED_ALL,
getFill(flags, use), use, true, false);
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
itsFormMode=false;
#endif
}
else
{
bool isFirst(false), isLast(false), isTable(false), isSort(false);
- QHeader *header(p && p->device() ? dynamic_cast<QHeader*>(p->device()) : 0L);
+ TQHeader *header(p && p->device() ? dynamic_cast<TQHeader*>(p->device()) : 0L);
if (header)
{
- if(header->parent() && ::qt_cast<const QTable *>(header->parent()))
+ if(header->tqparent() && ::tqqt_cast<const TQTable *>(header->tqparent()))
{
- QTable *tbl((QTable *)(header->parent()));
+ TQTable *tbl((TQTable *)(header->tqparent()));
isTable=true;
if(flags&Style_Horizontal)
@@ -3181,10 +3186,10 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
}
else if(0==flags) // Header on popup menu?
- { QWidget *widget(p && p->device() ? dynamic_cast<QWidget*>(p->device()) : 0L);
+ { TQWidget *widget(p && p->device() ? dynamic_cast<TQWidget*>(p->device()) : 0L);
bool menuTitle(widget && 0==qstrcmp(widget->className(), "KPopupTitle"));
- const QColor *use(buttonColors(cg));
- QRect r2(r);
+ const TQColor *use(buttonColors(cg));
+ TQRect r2(r);
if(menuTitle)
r2.addCoords(2, 2, -2, -2);
@@ -3192,7 +3197,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
break;
}
- const QColor *use(flags&Style_Enabled && itsSortedLvColors && isSort
+ const TQColor *use(flags&Style_Enabled && itsSortedLvColors && isSort
? itsSortedLvColors
: opts.lvButton ? buttonColors(cg) : backgroundColors(cg));
@@ -3200,7 +3205,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(NO_SECT!=itsHoverSect && HOVER_HEADER==itsHover && itsHoverWidget)
{
- QHeader *hd(::qt_cast<QHeader *>(itsHoverWidget));
+ TQHeader *hd(::tqqt_cast<TQHeader *>(itsHoverWidget));
if(hd && hd->isClickEnabled(itsHoverSect) && r==hd->sectionRect(itsHoverSect))
flags|=Style_MouseOver;
@@ -3226,7 +3231,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
p->drawLine(r.x(), r.y()+r.height()-1, r.x()+r.width()-1, r.y()+r.height()-1);
if(itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver)
- drawHighlight(p, QRect(r.x(), r.y()+r.height()-2, r.width(), 2), cg, true, true);
+ drawHighlight(p, TQRect(r.x(), r.y()+r.height()-2, r.width(), 2), cg, true, true);
if(!isFirst)
{
@@ -3252,7 +3257,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
if(itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver)
- drawHighlight(p, QRect(r.x(), r.y()+r.height()-3, r.width(), 2), cg, true, true);
+ drawHighlight(p, TQRect(r.x(), r.y()+r.height()-3, r.width(), 2), cg, true, true);
}
}
break;
@@ -3266,7 +3271,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
case PE_ButtonTool:
case PE_ButtonDropDown:
{
- const QColor *use((IND_TINT==opts.defBtnIndicator || IND_SELECTED==opts.defBtnIndicator) && flags&Style_Enabled && flags&Style_ButtonDefault
+ const TQColor *use((IND_TINT==opts.defBtnIndicator || IND_SELECTED==opts.defBtnIndicator) && flags&Style_Enabled && flags&Style_ButtonDefault
? itsDefBtnCols : buttonColors(cg));
bool glassMod(PE_ButtonTool==pe && IS_GLASS(opts.appearance) &&
IS_GLASS(opts.toolbarAppearance)),
@@ -3304,7 +3309,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
? cg.background().dark(DW_BGND)
: */cg.background(),
p, r, cg, glassMod ? flags : flags|Style_Horizontal,
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
(APP_KORN==itsThemedApp && itsIsTransKicker && PE_ButtonTool==pe) ||
#endif
operaMdi || mdi
@@ -3321,8 +3326,8 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(IND_COLORED==opts.defBtnIndicator && flags&Style_ButtonDefault && flags&Style_Enabled)
{
- QRegion outer(r);
- QRect r2(r);
+ TQRegion outer(r);
+ TQRect r2(r);
if(!itsFormMode && DO_EFFECT)
r2.addCoords(1, 1, -1, -1);
@@ -3330,13 +3335,13 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
r2.addCoords(COLORED_BORDER_SIZE, COLORED_BORDER_SIZE, -COLORED_BORDER_SIZE,
-COLORED_BORDER_SIZE);
- QRegion inner(r2);
+ TQRegion inner(r2);
p->setClipRegion(outer.eor(inner));
drawLightBevel(p, r, cg, glassMod ? flags : flags|Style_Horizontal,
flags&CHECK_BUTTON
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|| (APP_KORN==itsThemedApp && itsIsTransKicker && PE_ButtonTool==pe)
#endif
? ROUNDED_NONE : ROUNDED_ALL,
@@ -3353,11 +3358,11 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
{
case IND_CORNER:
{
- QPointArray points;
+ TQPointArray points;
bool sunken(flags&Style_Down || flags&Style_Sunken);
int offset(sunken ? 5 : 4),
etchOffset(DO_EFFECT ? 1 : 0);
- const QColor *cols(itsFocusCols ? itsFocusCols : itsHighlightCols);
+ const TQColor *cols(itsFocusCols ? itsFocusCols : itsHighlightCols);
points.setPoints(3, r.x()+offset+etchOffset, r.y()+offset+etchOffset, r.x()+offset+6+etchOffset, r.y()+offset+etchOffset,
r.x()+offset+etchOffset, r.y()+offset+6+etchOffset);
@@ -3374,7 +3379,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
case PE_CheckMark:
if(flags&Style_On)
{
- QPixmap *pix(getPixmap(checkRadioCol(flags, cg), PIX_CHECK, 1.0));
+ TQPixmap *pix(getPixmap(checkRadioCol(flags, cg), PIX_CHECK, 1.0));
p->drawPixmap(r.center().x()-(pix->width()/2), r.center().y()-(pix->height()/2),
*pix);
@@ -3390,11 +3395,11 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
break;
case PE_CheckListController:
{
- QCheckListItem *item(data.checkListItem());
+ TQCheckListItem *item(data.checkListItem());
if(item)
{
- const QColor *bc(borderColors(flags, 0L)),
+ const TQColor *bc(borderColors(flags, 0L)),
*btn(buttonColors(cg)),
*use(bc ? bc : btn);
int x(r.x()+1), y(r.y()+2);
@@ -3402,40 +3407,40 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
p->drawPixmap(x, y, *getPixmap(use[opts.coloredMouseOver && flags&Style_MouseOver
? 4 : BORDER_VAL(flags&Style_Enabled)],
PIX_RADIO_BORDER, 0.8));
- ::drawArrow(p, QRect(r.x()-1, r.y()-1, r.width(), r.height()),
+ ::drawArrow(p, TQRect(r.x()-1, r.y()-1, r.width(), r.height()),
use[opts.coloredMouseOver && flags&Style_MouseOver ? 4:5], PE_ArrowDown, opts);
}
break;
}
case PE_CheckListIndicator:
{
- QCheckListItem *item(data.checkListItem());
+ TQCheckListItem *item(data.checkListItem());
if(item)
{
- QListView *lv(item->listView());
+ TQListView *lv(item->listView());
- p->setPen(QPen(flags&Style_Enabled ? cg.text()
- : lv->palette().color(QPalette::Disabled,
- QColorGroup::Text)));
+ p->setPen(TQPen(flags&Style_Enabled ? cg.text()
+ : lv->tqpalette().color(TQPalette::Disabled,
+ TQColorGroup::Text)));
if (flags&Style_Selected)
{
flags-=Style_Selected;
- if(!lv->rootIsDecorated() && !((item->parent() && 1==item->parent()->rtti() &&
- QCheckListItem::Controller==((QCheckListItem*)item->parent())->type())))
+ if(!lv->rootIsDecorated() && !((item->tqparent() && 1==item->tqparent()->rtti() &&
+ TQCheckListItem::Controller==((TQCheckListItem*)item->tqparent())->type())))
{
p->fillRect(0, 0, r.x()+lv->itemMargin()+r.width()+4, item->height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
if(item->isEnabled())
{
- p->setPen(QPen(cg.highlightedText()));
+ p->setPen(TQPen(cg.highlightedText()));
flags+=Style_Selected;
}
}
}
- QRect checkRect(r.x()+1, r.y()+1, opts.crSize, opts.crSize);
- drawPrimitive(PE_Indicator, p, checkRect, cg, flags|LISTVIEW_ITEM);
+ TQRect checkRect(r.x()+1, r.y()+1, opts.crSize, opts.crSize);
+ tqdrawPrimitive(PE_Indicator, p, checkRect, cg, flags|LISTVIEW_ITEM);
}
break;
}
@@ -3456,7 +3461,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
bool doEtch(DO_EFFECT && !itsFormMode && !(flags&LISTVIEW_ITEM)),
on(flags&Style_On || !(flags&Style_Off)),
sunken(flags&Style_Down);
- QRect rect(doEtch ? QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) : r);
+ TQRect rect(doEtch ? TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) : r);
SFlags sflags(!(flags&Style_Off) ? flags|Style_On : flags);
if(sunken || (!itsFormMode && HOVER_NONE==itsHover))
@@ -3464,7 +3469,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
bool glowFocus(USE_GLOW_FOCUS(flags&Style_MouseOver) && sflags&Style_Enabled && sflags&Style_HasFocus),
glow(doEtch && sflags&Style_Enabled && ((MO_GLOW==opts.coloredMouseOver && sflags&Style_MouseOver) || glowFocus));
- const QColor *bc(glowFocus ? itsFocusCols : borderColors(sflags, 0L)),
+ const TQColor *bc(glowFocus ? itsFocusCols : borderColors(sflags, 0L)),
*btn(checkRadioColors(cg, sflags)),
*use(bc ? bc : btn),
&bgnd(opts.crButton
@@ -3484,22 +3489,22 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
drawDark=drawLight && draw3dFull && !lightBorder;
if(IS_FLAT(opts.appearance))
- p->fillRect(QRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), bgnd);
+ p->fillRect(TQRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), bgnd);
else
- drawBevelGradient(bgnd, p, QRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), true,
+ drawBevelGradient(bgnd, p, TQRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2), true,
drawSunken, app, wid);
if(MO_NONE!=opts.coloredMouseOver && !glow && sflags&Style_MouseOver && sflags&Style_Enabled)
{
p->setPen(use[CR_MO_FILL]);
- p->drawRect(QRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2));
- // p->drawRect(QRect(rect.x()+2, rect.y()+2, rect.width()-4, rect.height()-4));
+ p->drawRect(TQRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2));
+ // p->drawRect(TQRect(rect.x()+2, rect.y()+2, rect.width()-4, rect.height()-4));
}
else if(!opts.crButton || drawLight)
{
p->setPen(drawLight ? btn[LIGHT_BORDER(app)] : midColor(sflags&Style_Enabled ? cg.base() : cg.background(), use[3]));
if(lightBorder)
- p->drawRect(QRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2));
+ p->drawRect(TQRect(rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2));
else
{
p->drawLine(rect.x()+1, rect.y()+1, rect.x()+1, rect.y()+rect.height()-2);
@@ -3521,14 +3526,14 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(doEtch)
{
- QColor topCol(glow
+ TQColor topCol(glow
? glowFocus ? itsFocusCols[GLOW_MO] : itsMouseOverCols[GLOW_MO]
: shade(cg.background(), ETCHED_DARK)),
botCol(glow
? topCol
: itsBackgroundCols[1]);
- p->setBrush(Qt::NoBrush);
+ p->setBrush(TQt::NoBrush);
p->setPen(topCol);
if(!opts.crButton || EFFECT_SHADOW!=opts.buttonEffect || drawSunken || glow)
{
@@ -3541,16 +3546,16 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
if(on)
- drawPrimitive(PE_CheckMark, p, rect, cg, flags);
+ tqdrawPrimitive(PE_CheckMark, p, rect, cg, flags);
break;
}
case PE_CheckListExclusiveIndicator:
{
- QCheckListItem *item(data.checkListItem());
+ TQCheckListItem *item(data.checkListItem());
if(item)
{
- const QColor *bc(borderColors(flags, 0L)),
+ const TQColor *bc(borderColors(flags, 0L)),
*btn(buttonColors(cg)),
*use(bc ? bc : btn),
&on(checkRadioCol(flags, cg));
@@ -3569,18 +3574,18 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(PE_ExclusiveIndicatorMask==pe)
{
p->fillRect(r, color0);
- p->setPen(Qt::color1);
- p->setBrush(Qt::color1);
+ p->setPen(TQt::color1);
+ p->setBrush(TQt::color1);
p->drawPie(r, 0, 5760);
}
else
{
bool doEtch(DO_EFFECT && !itsFormMode),
sunken(flags&Style_Down);
- QRect rect(doEtch ? QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) : r);
+ TQRect rect(doEtch ? TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2) : r);
int x(rect.x()), y(rect.y());
- QPointArray clipRegion;
+ TQPointArray clipRegion;
clipRegion.setPoints(8, x, y+8, x, y+4, x+4, y, x+8, y,
x+12, y+4, x+12, y+8, x+8, y+12, x+4, y+12);
@@ -3596,10 +3601,10 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
set(sflags&Style_On),
coloredMo(MO_NONE!=opts.coloredMouseOver && !glow &&
sflags&Style_MouseOver && sflags&Style_Enabled);
- const QColor *bc(glowFocus ? itsFocusCols : borderColors(sflags, 0L)),
+ const TQColor *bc(glowFocus ? itsFocusCols : borderColors(sflags, 0L)),
*btn(checkRadioColors(cg, sflags)),
*use(bc ? bc : btn);
- const QColor &on(checkRadioCol(flags, cg)),
+ const TQColor &on(checkRadioCol(flags, cg)),
&bgnd(opts.crButton
? getFill(flags, btn, true)
: sflags&Style_Enabled && !sunken
@@ -3626,25 +3631,25 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(doEtch && !glow && opts.crButton && !drawSunken && EFFECT_SHADOW==opts.buttonEffect)
{
- p->setBrush(Qt::NoBrush);
+ p->setBrush(TQt::NoBrush);
p->setPen(shade(cg.background(), ETCHED_DARK));
- p->drawArc(QRect(r.x(), r.y(), opts.crSize, opts.crSize), 225*16, 180*16);
+ p->drawArc(TQRect(r.x(), r.y(), opts.crSize, opts.crSize), 225*16, 180*16);
doneShadow=true;
}
- p->setClipRegion(QRegion(clipRegion));
+ p->setClipRegion(TQRegion(clipRegion));
if(IS_FLAT(opts.appearance))
- p->fillRect(QRect(x+1, y+1, rect.width()-2, rect.height()-2), bgnd);
+ p->fillRect(TQRect(x+1, y+1, rect.width()-2, rect.height()-2), bgnd);
else
- drawBevelGradient(bgnd, p, QRect(x+1, y+1, rect.width()-2, rect.height()-2), true,
+ drawBevelGradient(bgnd, p, TQRect(x+1, y+1, rect.width()-2, rect.height()-2), true,
drawSunken, app, wid);
if(coloredMo)
{
p->setPen(use[CR_MO_FILL]);
- p->drawArc(QRect(x+1, y+1, opts.crSize-2, opts.crSize-2), 0, 360*16);
-// p->drawArc(QRect(x+2, y+2, opts.crSize-4, opts.crSize-4), 0, 360*16);
-// p->drawArc(QRect(x+3, y+3, opts.crSize-6, opts.crSize-6), 0, 360*16);
+ p->drawArc(TQRect(x+1, y+1, opts.crSize-2, opts.crSize-2), 0, 360*16);
+// p->drawArc(TQRect(x+2, y+2, opts.crSize-4, opts.crSize-4), 0, 360*16);
+// p->drawArc(TQRect(x+3, y+3, opts.crSize-6, opts.crSize-6), 0, 360*16);
p->drawPoint(x+2, y+4);
p->drawPoint(x+4, y+2);
p->drawPoint(x+8, y+2);
@@ -3659,35 +3664,35 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(doEtch && !doneShadow)
{
- QColor topCol(glow
+ TQColor topCol(glow
? glowFocus ? itsFocusCols[GLOW_MO] : itsMouseOverCols[GLOW_MO]
: shade(cg.background(), ETCHED_DARK)),
botCol(glow
? topCol
: itsBackgroundCols[1]);
- p->setBrush(Qt::NoBrush);
+ p->setBrush(TQt::NoBrush);
p->setPen(topCol);
if(drawSunken || glow)
{
- p->drawArc(QRect(r.x(), r.y(), opts.crSize, opts.crSize), 45*16, 180*16);
+ p->drawArc(TQRect(r.x(), r.y(), opts.crSize, opts.crSize), 45*16, 180*16);
p->setPen(botCol);
}
- p->drawArc(QRect(r.x(), r.y(), opts.crSize, opts.crSize), 225*16, 180*16);
+ p->drawArc(TQRect(r.x(), r.y(), opts.crSize, opts.crSize), 225*16, 180*16);
}
p->drawPixmap(rect.x(), rect.y(),
*getPixmap(use[BORDER_VAL(flags&Style_Enabled)], PIX_RADIO_BORDER, 0.8));
- if(QApplication::NormalColor!=QApplication::colorSpec() || itsFormMode)
+ if(TQApplication::NormalColor!=TQApplication::colorSpec() || itsFormMode)
{
- p->setPen(QPen(use[opts.coloredMouseOver && sflags&Style_MouseOver ? 4 : BORDER_VAL(flags&Style_Enabled)], 1));
+ p->setPen(TQPen(use[opts.coloredMouseOver && sflags&Style_MouseOver ? 4 : BORDER_VAL(flags&Style_Enabled)], 1));
p->drawArc(rect, 0, 5760);
}
if(set)
p->drawPixmap(rect.x(), rect.y(), *getPixmap(on, PIX_RADIO_ON, 1.0));
- if(!coloredMo && (!opts.crButton || drawLight) && (QApplication::NormalColor==QApplication::colorSpec() || itsFormMode))
+ if(!coloredMo && (!opts.crButton || drawLight) && (TQApplication::NormalColor==TQApplication::colorSpec() || itsFormMode))
p->drawPixmap(rect.x(), rect.y(),
*getPixmap(btn[drawLight ? LIGHT_BORDER(app)
: (sflags&Style_MouseOver ? 3 : 4)],
@@ -3697,7 +3702,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
break;
case PE_DockWindowSeparator:
{
- QRect r2(r);
+ TQRect r2(r);
r2.addCoords(-1, -1, 2, 2);
drawMenuOrToolBarBackground(p, r2, cg, false, flags&Style_Horizontal);
@@ -3753,12 +3758,12 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(itsHoverWidget && itsHoverWidget == p->device())
flags|=Style_MouseOver;
- const QColor *use(buttonColors(cg));
- const QColor *border(borderColors(flags, use));
+ const TQColor *use(buttonColors(cg));
+ const TQColor *border(borderColors(flags, use));
- QColor color(cg.background());
+ TQColor color(cg.background());
- if(0!=opts.tabBgnd && p->device() && inStackWidget(dynamic_cast<const QWidget *>(p->device())))
+ if(0!=opts.tabBgnd && p->device() && inStackWidget(dynamic_cast<const TQWidget *>(p->device())))
color=shade(color, TO_FACTOR(opts.tabBgnd));
if(flags&Style_MouseOver && opts.splitterHighlight)
@@ -3789,9 +3794,9 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
case PE_PanelGroupBox:
if(FRAME_LINE==opts.groupBox)
{
- QRect r2(r);
- if(p && p->device() && dynamic_cast<QGroupBox *>(p->device()) &&
- (!((QGroupBox *)(p->device()))->title().isEmpty() || ((QGroupBox *)(p->device()))->isCheckable()))
+ TQRect r2(r);
+ if(p && p->device() && dynamic_cast<TQGroupBox *>(p->device()) &&
+ (!((TQGroupBox *)(p->device()))->title().isEmpty() || ((TQGroupBox *)(p->device()))->isCheckable()))
r2.addCoords(8, 0, -8, 0);
p->setPen(backgroundColors(cg)[STD_BORDER]);
p->drawLine(r2.x(), r2.y(), r2.x()+r2.width()-1, r2.y());
@@ -3799,13 +3804,13 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
else if (FRAME_NONE!=opts.groupBox)
if(APP_OPENOFFICE==itsThemedApp || data.lineWidth()>0 || data.isDefault())
{
- const QColor *use(backgroundColors(cg));
+ const TQColor *use(backgroundColors(cg));
drawBorder(cg.background(), p, r, cg, (SFlags)(flags|Style_Horizontal),
- opts.square&SQUARE_FRAME ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true, BORDER_FLAT);
+ opts.square&STQUARE_FRAME ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true, BORDER_FLAT);
}
else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
case PE_WindowFrame:
if(data.lineWidth()>0 || data.isDefault())
@@ -3814,18 +3819,18 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
break;
case PE_Panel:
if((APP_KICKER==itsThemedApp && data.isDefault()) ||
- dynamic_cast<QDockWindow *>(p->device()))
+ dynamic_cast<TQDockWindow *>(p->device()))
break;
if(APP_OPENOFFICE==itsThemedApp || data.lineWidth()>0 || data.isDefault())
{
- const QWidget *widget=p && p->device() ? dynamic_cast<const QWidget *>(p->device()) : 0L;
- bool sv(widget && ::qt_cast<const QScrollView *>(widget)),
- square((opts.square&SQUARE_SCROLLVIEW) &&
+ const TQWidget *widget=p && p->device() ? dynamic_cast<const TQWidget *>(p->device()) : 0L;
+ bool sv(widget && ::tqqt_cast<const TQScrollView *>(widget)),
+ square((opts.square&STQUARE_SCROLLVIEW) &&
(sv ||
- (widget && widget->parentWidget() && ::qt_cast<const QFrame *>(widget) &&
- widget->parentWidget()->inherits("KateView"))));
- const QColor *use(opts.highlightScrollViews && /*!square &&*/ flags&Style_HasFocus ? itsHighlightCols :
+ (widget && widget->tqparentWidget() && ::tqqt_cast<const TQFrame *>(widget) &&
+ widget->tqparentWidget()->inherits("KateView"))));
+ const TQColor *use(opts.highlightScrollViews && /*!square &&*/ flags&Style_HasFocus ? itsHighlightCols :
backgroundColors(cg));
// if(square)
@@ -3843,7 +3848,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
itsFormMode=itsIsTransKicker;
if(sv && !opts.highlightScrollViews)
flags&=~Style_HasFocus;
- if(sv && opts.etchEntry && ((QFrame *)widget)->lineWidth()>2)
+ if(sv && opts.etchEntry && ((TQFrame *)widget)->lineWidth()>2)
{
drawEntryField(p, r, cg, flags, flags&Style_Enabled
? /*flags&Style_MouseOver
@@ -3862,21 +3867,21 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
}
else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
case PE_PanelTabWidget:
{
- const QColor *use(backgroundColors(cg));
+ const TQColor *use(backgroundColors(cg));
drawBorder(cg.background(), p, r, cg,
(SFlags)(flags|Style_Horizontal|Style_Enabled),
- opts.square&SQUARE_TAB_FRAME ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true,
+ opts.square&STQUARE_TAB_FRAME ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true,
opts.borderTab ? BORDER_LIGHT : BORDER_RAISED, false);
break;
}
case PE_PanelPopup:
{
- const QColor *use(backgroundColors(cg));
+ const TQColor *use(backgroundColors(cg));
p->setPen(use[STD_BORDER]);
p->setBrush(NoBrush);
@@ -3886,7 +3891,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
else if(USE_LIGHTER_POPUP_MENU)
{
p->setPen(/*USE_LIGHTER_POPUP_MENU ? */itsLighterPopupMenuBgndCol/* : cg.background()*/);
- p->drawRect(QRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2));
+ p->drawRect(TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2));
}
else
{
@@ -3901,7 +3906,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
case PE_TabBarBase:
{
- const QColor *use(backgroundColors(cg));
+ const TQColor *use(backgroundColors(cg));
bool flat(APPEARANCE_FLAT==opts.appearance);
if(data.isDefault() || data.lineWidth()>1)
@@ -3910,13 +3915,13 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
p->setBrush(NoBrush);
p->drawRect(r);
qDrawShadePanel(p, r.x()+1, r.y()+1, r.width()-2, r.height()-2,
- QColorGroup(use[flat ? ORIGINAL_SHADE : 4], use[ORIGINAL_SHADE],
+ TQColorGroup(use[flat ? ORIGINAL_SHADE : 4], use[ORIGINAL_SHADE],
use[0], use[flat ? ORIGINAL_SHADE : 4], use[2],
cg.text(), use[ORIGINAL_SHADE]), flags & Style_Sunken,
data.isDefault() ? 1 : data.lineWidth()-1);
}
else
- qDrawShadePanel(p, r, QColorGroup(use[flat ? ORIGINAL_SHADE : 5],
+ qDrawShadePanel(p, r, TQColorGroup(use[flat ? ORIGINAL_SHADE : 5],
use[ORIGINAL_SHADE], use[0], use[flat ? ORIGINAL_SHADE : 5], use[2],
cg.text(), use[ORIGINAL_SHADE]), flags & Style_Sunken,
data.isDefault() ? 2 : data.lineWidth());
@@ -3926,7 +3931,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
case PE_PanelMenuBar:
{
// fix for toolbar lag (from Mosfet Liquid)
- QWidget *w = dynamic_cast<QWidget *>(p->device());
+ TQWidget *w = dynamic_cast<TQWidget *>(p->device());
if(w)
{
@@ -3935,7 +3940,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(itsActive && opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars)
{
- QWidget *top=w->topLevelWidget();
+ TQWidget *top=w->tqtopLevelWidget();
if(top && !top->isActiveWindow())
itsActive=false;
@@ -3947,7 +3952,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
if(TB_NONE!=opts.toolbarBorders)
{
- const QColor *use=PE_PanelMenuBar==pe
+ const TQColor *use=PE_PanelMenuBar==pe
? menuColors(cg, itsActive)
: backgroundColors(cg.background());
bool dark(TB_DARK==opts.toolbarBorders || TB_DARK_ALL==opts.toolbarBorders);
@@ -3984,9 +3989,9 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
case PE_ScrollBarAddLine:
case PE_ScrollBarSubLine:
{
- QRect br(r),
+ TQRect br(r),
ar(r);
- const QColor *use(flags&Style_Enabled ? itsButtonCols : itsBackgroundCols); // buttonColors(cg));
+ const TQColor *use(flags&Style_Enabled ? itsButtonCols : itsBackgroundCols); // buttonColors(cg));
pe=flags&Style_Horizontal
? PE_ScrollBarAddLine==pe ? PE_ArrowRight : PE_ArrowLeft
@@ -4063,26 +4068,26 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
// Menu item style selection...
if(opts.gtkComboMenus)
{
- QWidget *widget(dynamic_cast<QWidget*>(p->device()));
+ TQWidget *widget(dynamic_cast<TQWidget*>(p->device()));
- if(widget && 0==qstrcmp(widget->className(), "QViewportWidget") &&
- widget->parentWidget() && ::qt_cast<QListBox *>(widget->parentWidget()) &&
- widget->parentWidget()->parentWidget() && ::qt_cast<QComboBox *>(widget->parentWidget()->parentWidget()))
+ if(widget && 0==qstrcmp(widget->className(), "TQViewportWidget") &&
+ widget->tqparentWidget() && ::tqqt_cast<TQListBox *>(widget->tqparentWidget()) &&
+ widget->tqparentWidget()->tqparentWidget() && ::tqqt_cast<TQComboBox *>(widget->tqparentWidget()->tqparentWidget()))
{
- struct QtCurveListBoxItem : public QListBoxItem
+ struct TQtCurveListBoxItem : public TQListBoxItem
{
- void paintContents(QPainter *p)
+ void paintContents(TQPainter *p)
{
paint(p);
}
};
- QListBox *box=(QListBox *)widget->parentWidget();
- QtCurveListBoxItem *item=(QtCurveListBoxItem *)(box->item(box->currentItem()));
+ TQListBox *box=(TQListBox *)widget->tqparentWidget();
+ TQtCurveListBoxItem *item=(TQtCurveListBoxItem *)(box->item(box->currentItem()));
if(item)
{
- //p->fillRect(r, Qt::black);
+ //p->fillRect(r, TQt::black);
drawMenuItem(p, r, cg, false, ROUNDED_ALL,
USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol
: itsBackgroundCols[ORIGINAL_SHADE], itsHighlightCols);
@@ -4094,18 +4099,18 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
#endif
if(FOCUS_STANDARD==opts.focus)
{
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
p->drawWinFocusRect(r);
}
else
{
//Figuring out in what beast we are painting...
- QWidget *widget(dynamic_cast<QWidget*>(p->device()));
- bool view(widget && (dynamic_cast<QScrollView*>(widget->parent()) ||
- dynamic_cast<QListBox*>(widget->parent())));
+ TQWidget *widget(dynamic_cast<TQWidget*>(p->device()));
+ bool view(widget && (dynamic_cast<TQScrollView*>(widget->tqparent()) ||
+ dynamic_cast<TQListBox*>(widget->tqparent())));
if(widget && FOCUS_GLOW==opts.focus &&
- (dynamic_cast<const QButton *>(widget) || dynamic_cast<const QComboBox *>(widget)))
+ (dynamic_cast<const TQButton *>(widget) || dynamic_cast<const TQComboBox *>(widget)))
return;
if(FOCUS_LINE==opts.focus)
@@ -4117,7 +4122,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
else if(r.width()<4 || r.height()<4 || view)
{
-// QRect r2(r);
+// TQRect r2(r);
p->setPen(view ? (flags&Style_Selected ? cg.highlightedText() : cg.text())
: itsFocusCols[FOCUS_SHADE(flags&Style_Selected)]);
// if(view)
@@ -4141,9 +4146,9 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
case PE_SpinWidgetPlus:
case PE_SpinWidgetMinus:
{
- QRect sr(r);
- const QColor *use(buttonColors(cg));
- bool reverse(QApplication::reverseLayout());
+ TQRect sr(r);
+ const TQColor *use(buttonColors(cg));
+ bool reverse(TQApplication::reverseLayout());
if((!opts.unifySpinBtns || flags&Style_Sunken) && !opts.unifySpin)
drawLightBevel(p, sr, cg, flags|Style_Horizontal, PE_SpinWidgetDown==pe || PE_SpinWidgetMinus==pe
@@ -4172,15 +4177,15 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
else
{
- int l(QMIN(r.width()-6, r.height()-6));
- QPoint c(r.x()+(r.width()/2), r.y()+(r.height()/2));
+ int l(TQMIN(r.width()-6, r.height()-6));
+ TQPoint c(r.x()+(r.width()/2), r.y()+(r.height()/2));
l/=2;
if(l%2 != 0)
--l;
if(flags&Style_Sunken && !opts.unifySpin)
- c+=QPoint(1, 1);
+ c+=TQPoint(1, 1);
p->setPen(MO_ARROW(cg.buttonText()));
p->drawLine(c.x()-l, c.y(), c.x()+l, c.y());
@@ -4191,12 +4196,12 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
}
case PE_PanelLineEdit:
{
- const QWidget *widget=p && p->device() ? dynamic_cast<const QWidget *>(p->device()) : 0L;
- bool scrollView=widget && ::qt_cast<const QScrollView *>(widget);
+ const TQWidget *widget=p && p->device() ? dynamic_cast<const TQWidget *>(p->device()) : 0L;
+ bool scrollView=widget && ::tqqt_cast<const TQScrollView *>(widget);
-// if((opts.square&SQUARE_SCROLLVIEW) && scrollView)
+// if((opts.square&STQUARE_SCROLLVIEW) && scrollView)
// {
-// const QColor *use(backgroundColors(cg));
+// const TQColor *use(backgroundColors(cg));
//
// p->setPen(use[STD_BORDER]);
// p->drawLine(r.bottomLeft(), r.topLeft());
@@ -4212,9 +4217,9 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
isEnabled(true);
// panel is highlighted by default if it has focus, but if we have access to the
// widget itself we can try to avoid highlighting in case it's readOnly or disabled.
- if (!scrollView && widget && dynamic_cast<const QLineEdit*>(widget))
+ if (!scrollView && widget && dynamic_cast<const TQLineEdit*>(widget))
{
- const QLineEdit *lineEdit(dynamic_cast<const QLineEdit*>(widget));
+ const TQLineEdit *lineEdit(dynamic_cast<const TQLineEdit*>(widget));
isReadOnly = lineEdit->isReadOnly();
isEnabled = lineEdit->isEnabled();
@@ -4226,15 +4231,15 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
//
// 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 QPixmap, chances are high that we are in khtml.
+ // when the paint device is a TQPixmap, chances are high that we are in khtml.
// It's possible that this breaks other things, so let's see how it works...
- if (p->device() && dynamic_cast<QPixmap*>(p->device()))
+ if (p->device() && dynamic_cast<TQPixmap*>(p->device()))
itsFormMode=true;
if(scrollView && !opts.highlightScrollViews)
flags&=~Style_HasFocus;
- QRect r2(r);
+ TQRect r2(r);
r2.addCoords(1, 1, -1, -1);
// p->fillRect(r2, flags&Style_Enabled ? cg.base() : cg.background());
drawEntryField(p, r, cg, flags, !isReadOnly && isEnabled
@@ -4244,20 +4249,20 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
? ENTRY_FOCUS
: ENTRY_NONE
: ENTRY_NONE,
- (opts.square&SQUARE_SCROLLVIEW) && scrollView ? ROUNDED_NONE : ROUNDED_ALL,
+ (opts.square&STQUARE_SCROLLVIEW) && scrollView ? ROUNDED_NONE : ROUNDED_ALL,
scrollView ? WIDGET_SCROLLVIEW : WIDGET_ENTRY);
itsFormMode=false;
break;
}
case PE_StatusBarSection:
if(opts.drawStatusBarFrames)
- BASE_STYLE::drawPrimitive(pe, p, r, cg, flags, data);
+ BASE_STYLE::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
case PE_SizeGrip:
{
- QPointArray a;
+ TQPointArray a;
- if (QApplication::reverseLayout())
+ if (TQApplication::reverseLayout())
{
a.setPoints(3, 0,0, SIZE_GRIP_SIZE,SIZE_GRIP_SIZE, 0,SIZE_GRIP_SIZE);
a.translate(r.x(), r.y()+(r.height()-SIZE_GRIP_SIZE));
@@ -4276,18 +4281,18 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, QPainter *p, const QRect &
break;
}
default:
- BASE_STYLE::drawPrimitive(pe, p, r, cg, flags, data);
+ BASE_STYLE::tqdrawPrimitive(pe, p, r, cg, flags, data);
}
}
-static QString elliditide(const QString &text, const QFontMetrics &fontMetrics, int space)
+static TQString elliditide(const TQString &text, const TQFontMetrics &fontMetrics, int space)
{
// Chop and insert ellide into title if text is too wide
- QString title(text);
+ TQString title(text);
if (fontMetrics.width(text) > space)
{
- QString ellipsis("...");
+ TQString ellipsis("...");
while (fontMetrics.width(title+ellipsis)>space && !title.isEmpty())
title=title.left(title.length()-1);
@@ -4297,9 +4302,9 @@ static QString elliditide(const QString &text, const QFontMetrics &fontMetrics,
return title;
}
-void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const QWidget *widget,
- const QRect &r, const QColorGroup &cg, SFlags flags,
- const QStyleOption &opt) const
+void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const TQWidget *widget,
+ const TQRect &r, const TQColorGroup &cg, SFlags flags,
+ const TQStyleOption &opt) const
{
ELine handles(kpe!=KPE_ToolBarHandle && LINE_DASHES==opts.handles ? LINE_SUNKEN
: opts.handles);
@@ -4310,7 +4315,7 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
{
if(APPEARANCE_STRIPED!=opts.bgndAppearance)
{
- QRect r2(r);
+ TQRect r2(r);
r2.addCoords(-1, -1, 2, 2);
drawMenuOrToolBarBackground(p, r2, cg, false, flags&Style_Horizontal);
}
@@ -4336,14 +4341,14 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
if (w > 2 && h > 2)
{
- QWidget *wid(const_cast<QWidget*>(widget));
- bool hasClose(dynamic_cast<const QDockWindow *>(wid->parentWidget()) &&
- ((QDockWindow *)(wid->parentWidget()))->area() &&
- ((QDockWindow *)(wid->parentWidget()))->isCloseEnabled());
- QFont fnt(QApplication::font(wid));
- QPixmap pix;
- QString title(wid->parentWidget()->caption());
- QPainter p2;
+ TQWidget *wid(const_cast<TQWidget*>(widget));
+ bool hasClose(dynamic_cast<const TQDockWindow *>(wid->tqparentWidget()) &&
+ ((TQDockWindow *)(wid->tqparentWidget()))->area() &&
+ ((TQDockWindow *)(wid->tqparentWidget()))->isCloseEnabled());
+ TQFont fnt(TQApplication::font(wid));
+ TQPixmap pix;
+ TQString title(wid->tqparentWidget()->caption());
+ TQPainter p2;
fnt.setPointSize(fnt.pointSize()-2);
if(hasClose)
@@ -4365,18 +4370,18 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
p2.drawLine(pix.rect().left(), pix.rect().bottom(), pix.rect().right(), pix.rect().bottom());
p2.setPen(cg.text());
p2.setFont(fnt);
- QRect textRect(pix.rect());
+ TQRect textRect(pix.rect());
textRect.addCoords(2, -3, -2, 0);
- p2.drawText(textRect, AlignVCenter|(QApplication::reverseLayout() ? AlignRight : AlignLeft),
- elliditide(title, QFontMetrics(fnt), pix.width()));
+ p2.drawText(textRect, AlignVCenter|(TQApplication::reverseLayout() ? AlignRight : AlignLeft),
+ elliditide(title, TQFontMetrics(fnt), pix.width()));
p2.end();
if (horizontal)
{
- QWMatrix m;
+ TQWMatrix m;
m.rotate(-90.0);
- QPixmap vpix(pix.xForm(m));
+ TQPixmap vpix(pix.xForm(m));
bitBlt(wid, r.x(), r.y()+(hasClose ? 15 : 0), &vpix);
}
else
@@ -4391,11 +4396,11 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
drawSliderGroove(p, r, cg, flags, widget);
break;
case KPE_SliderHandle:
- drawSliderHandle(p, r, cg, flags, widget ? ::qt_cast<QSlider *>(widget) : 0L);
+ drawSliderHandle(p, r, cg, flags, widget ? ::tqqt_cast<TQSlider *>(widget) : 0L);
break;
case KPE_ListViewExpander:
{
- QRect ar(r.x()+((r.width()-(LV_SIZE+4))>>1), r.y()+((r.height()-(LV_SIZE+4))>>1), LV_SIZE+4,
+ TQRect ar(r.x()+((r.width()-(LV_SIZE+4))>>1), r.y()+((r.height()-(LV_SIZE+4))>>1), LV_SIZE+4,
LV_SIZE+4);
if(LV_OLD==opts.lvLines)
@@ -4426,7 +4431,7 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
}
::drawArrow(p, ar, flags&Style_Enabled ? cg.mid() : cg.text(), flags&Style_On // Collapsed = On
- ? QApplication::reverseLayout()
+ ? TQApplication::reverseLayout()
? PE_ArrowLeft
: PE_ArrowRight
: PE_ArrowDown, opts);
@@ -4451,9 +4456,9 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, QPainter *p, const Q
}
}
-void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidget *widget,
- const QRect &r, const QColorGroup &cg, SFlags flags,
- const QStyleOption &data) const
+void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQWidget *widget,
+ const TQRect &r, const TQColorGroup &cg, SFlags flags,
+ const TQStyleOption &data) const
{
if(widget==itsHoverWidget)
flags|=Style_MouseOver;
@@ -4462,17 +4467,17 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
{
case CE_TabBarTab:
{
- const QTabBar *tb((const QTabBar *)widget);
+ const TQTabBar *tb((const TQTabBar *)widget);
int tabIndex(tb->indexOf(data.tab()->identifier())),
dark(APPEARANCE_FLAT==opts.appearance ? ORIGINAL_SHADE : FRAME_DARK_SHADOW),
moOffset(ROUNDED_NONE==opts.round || TAB_MO_TOP!=opts.tabMouseOver ? 1 : opts.round);
bool cornerWidget(false),
bottomCornerWidget(false),
- reverse(QApplication::reverseLayout()),
+ reverse(TQApplication::reverseLayout()),
firstTab(0==tabIndex),
lastTab((tb->count()-1)==tabIndex),
-// isFirstKTabCtlTab(firstTab && widget->parent()
-// ? 0==qstrcmp("KTabCtl", widget->parent()->className())
+// isFirstKTabCtlTab(firstTab && widget->tqparent()
+// ? 0==qstrcmp("KTabCtl", widget->tqparent()->className())
// : false),
active(flags & Style_Selected),
itsHover(itsHoverTab && itsHoverTab->isEnabled() && data.tab()==itsHoverTab &&
@@ -4480,7 +4485,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
tb->currentTab()!=tabIndex),
glowMo(!active && itsHover && opts.coloredMouseOver && TAB_MO_GLOW==opts.tabMouseOver);
int sizeAdjust(!active && TAB_MO_GLOW==opts.tabMouseOver ? 1 : 0);
- const QColor &fill(getTabFill(flags&Style_Selected, itsHover, itsBackgroundCols));
+ const TQColor &fill(getTabFill(flags&Style_Selected, itsHover, itsBackgroundCols));
EBorder borderProfile(active || opts.borderInactiveTab
? opts.borderTab
? BORDER_LIGHT
@@ -4497,23 +4502,23 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
firstTab=oldLast;
}
- if(::qt_cast<const QTabWidget *>(tb->parent()))
+ if(::tqqt_cast<const TQTabWidget *>(tb->tqparent()))
{
- const QTabWidget *tw((const QTabWidget*)tb->parent());
+ const TQTabWidget *tw((const TQTabWidget*)tb->tqparent());
// is there a corner widget in the (top) left edge?
- if(tw->cornerWidget(Qt::TopLeft))
+ if(tw->cornerWidget(TQt::TopLeft))
cornerWidget=true;
- if(tw->cornerWidget(Qt::BottomLeft))
+ if(tw->cornerWidget(TQt::BottomLeft))
bottomCornerWidget=true;
}
- QRect tr(r);
- bool top(QTabBar::TriangularAbove==tb->shape() || QTabBar::RoundedAbove==tb->shape());
+ TQRect tr(r);
+ bool top(TQTabBar::TriangularAbove==tb->tqshape() || TQTabBar::RoundedAbove==tb->tqshape());
if(active && opts.tabBgnd)
{
- QRect rx(tr);
+ TQRect rx(tr);
if(top)
rx.addCoords(1, 6, -1, 0);
@@ -4531,17 +4536,17 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(!firstTab && top && (APP_TORA==itsThemedApp || (APP_OPENOFFICE==itsThemedApp && !active)))
tr.addCoords(-1, 0, 0, 0);
- QRect glowTr(tr);
+ TQRect glowTr(tr);
if(!active && TAB_MO_GLOW==opts.tabMouseOver)
glowTr.addCoords(sizeAdjust, 0, -sizeAdjust, 0);
- p->setClipRect(QRect(tr.x(), top ? tr.y()-sizeAdjust : tr.y()+2, tr.width(), top ? tr.height()-2+(2*sizeAdjust) : tr.height()),
- QPainter::CoordPainter);
+ p->setClipRect(TQRect(tr.x(), top ? tr.y()-sizeAdjust : tr.y()+2, tr.width(), top ? tr.height()-2+(2*sizeAdjust) : tr.height()),
+ TQPainter::CoordPainter);
bool invertedSel=APPEARANCE_INVERTED==opts.appearance && active;
- QColor col(invertedSel ? cg.background() : fill);
+ TQColor col(invertedSel ? cg.background() : fill);
if(opts.tabBgnd)
col=shade(col, TO_FACTOR(opts.tabBgnd));
@@ -4589,7 +4594,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
p->drawLine(r.x(), r.y()+r.height()-2, r.x()+r.width()-1, r.y()+r.height()-2);
if(opts.coloredMouseOver && itsHover && TAB_MO_GLOW!=opts.tabMouseOver)
- drawHighlight(p, QRect(tr.x()+(firstTab ? moOffset : 1),
+ drawHighlight(p, TQRect(tr.x()+(firstTab ? moOffset : 1),
tr.y()+(TAB_MO_TOP==opts.tabMouseOver ? 0 : tr.height()-3),
tr.width()-(firstTab || lastTab ? moOffset : 1), 2),
cg, true, !TAB_MO_TOP==opts.tabMouseOver);
@@ -4600,7 +4605,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
int x(reverse ? r.x()+r.width()-1 : r.x()),
x2(reverse ? x-1 : x+1);
- p->setPen(itsBackgroundCols[!active && TAB_MO_GLOW==opts.tabMouseOver && opts.round>ROUND_SLIGHT && !(opts.square&SQUARE_TAB_FRAME)
+ p->setPen(itsBackgroundCols[!active && TAB_MO_GLOW==opts.tabMouseOver && opts.round>ROUND_SLIGHT && !(opts.square&STQUARE_TAB_FRAME)
? ORIGINAL_SHADE : STD_BORDER]);
p->drawLine(x, r.y()+r.height()-1, x, r.height()-2);
if(active)
@@ -4617,7 +4622,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
p->setPen(midColor(fill, itsHighlightCols[0])); // , IS_FLAT(opts.activeTabAppearance) ? 1.0 : 1.2));
p->drawLine(tr.left(), tr.top()+2, tr.right(), tr.top()+2);
- p->setClipRect(QRect(tr.x(), tr.y(), tr.width(), 3), QPainter::CoordPainter);
+ p->setClipRect(TQRect(tr.x(), tr.y(), tr.width(), 3), TQPainter::CoordPainter);
drawBorder(cg.background(), p, tr, cg, flags|Style_Horizontal|Style_Enabled,
ROUNDED_ALL, itsHighlightCols, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT,
true, BORDER_FLAT, false, 3);
@@ -4625,7 +4630,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
// Round top-left corner...
- if(!(opts.square&SQUARE_TAB_FRAME) && FULLLY_ROUNDED && APP_TORA!=itsThemedApp && firstTab && !active && !cornerWidget && !reverse) // && !isFirstKTabCtlTab)
+ if(!(opts.square&STQUARE_TAB_FRAME) && FULLLY_ROUNDED && APP_TORA!=itsThemedApp && firstTab && !active && !cornerWidget && !reverse) // && !isFirstKTabCtlTab)
{
p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawPoint(r.x()+1, r.y()+r.height()-1);
@@ -4656,13 +4661,13 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
p->drawLine(r.x(), r.y()+1, r.x()+r.width()-1, r.y()+1);
if(opts.coloredMouseOver && itsHover && TAB_MO_GLOW!=opts.tabMouseOver)
- drawHighlight(p, QRect(tr.x()+(firstTab ? moOffset : 1),
+ drawHighlight(p, TQRect(tr.x()+(firstTab ? moOffset : 1),
tr.y()+(TAB_MO_TOP==opts.tabMouseOver ? tr.height()-2 : 1),
tr.width()-(firstTab || lastTab ? moOffset : 1), 2),
cg, true, TAB_MO_TOP==opts.tabMouseOver);
}
- if(TAB_MO_GLOW==opts.tabMouseOver && opts.round<=ROUND_SLIGHT && !(opts.square&SQUARE_TAB_FRAME) && !reverse && firstTab && !cornerWidget)
+ if(TAB_MO_GLOW==opts.tabMouseOver && opts.round<=ROUND_SLIGHT && !(opts.square&STQUARE_TAB_FRAME) && !reverse && firstTab && !cornerWidget)
{
p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawPoint(r.x(), r.y());
@@ -4674,14 +4679,14 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
p->drawLine(tr.left(), tr.bottom()-1, tr.right(), tr.bottom()-1);
p->setPen(midColor(fill, itsHighlightCols[0]));
p->drawLine(tr.left(), tr.bottom()-2, tr.right(), tr.bottom()-2);
- p->setClipRect(QRect(tr.x(), tr.y()+r.height()-3, tr.width(), 3), QPainter::CoordPainter);
+ p->setClipRect(TQRect(tr.x(), tr.y()+r.height()-3, tr.width(), 3), TQPainter::CoordPainter);
drawBorder(cg.background(), p, tr, cg, flags|Style_Horizontal|Style_Enabled,
ROUNDED_ALL, itsHighlightCols, top ? WIDGET_TAB_TOP : WIDGET_TAB_BOT,
true, BORDER_FLAT, false, 3);
p->setClipping(false);
}
- if(!(opts.square&SQUARE_TAB_FRAME) && FULLLY_ROUNDED && APP_TORA!=itsThemedApp && firstTab && !bottomCornerWidget)// && !isFirstKTabCtlTab)
+ if(!(opts.square&STQUARE_TAB_FRAME) && FULLLY_ROUNDED && APP_TORA!=itsThemedApp && firstTab && !bottomCornerWidget)// && !isFirstKTabCtlTab)
{
p->setPen(itsBackgroundCols[STD_BORDER]);
p->drawPoint(r.x(), reverse ? r.y()+r.width()-1 : r.y());
@@ -4696,47 +4701,47 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
break;
}
-#if QT_VERSION >= 0x030200
+#if 0x039999 >= 0x030200
case CE_TabBarLabel:
{
if (data.isDefault())
break;
- const QTabBar *tb((const QTabBar *) widget);
- QTab *t(data.tab());
- QRect tr(r);
- int shift(pixelMetric(PM_TabBarTabShiftVertical, tb));
+ const TQTabBar *tb((const TQTabBar *) widget);
+ TQTab *t(data.tab());
+ TQRect tr(r);
+ int shift(tqpixelMetric(PM_TabBarTabShiftVertical, tb));
if (t->identifier() == tb->currentTab())
{
- if(QTabBar::RoundedAbove==tb->shape() || QTabBar::TriangularAbove==tb->shape())
+ if(TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape())
tr.addCoords(0, -shift, 0, -shift);
}
else
- if(QTabBar::RoundedBelow==tb->shape() || QTabBar::TriangularBelow==tb->shape())
+ if(TQTabBar::RoundedBelow==tb->tqshape() || TQTabBar::TriangularBelow==tb->tqshape())
tr.addCoords(0, shift, 0, shift);
if(APP_MACTOR==itsThemedApp)
{
- drawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data);
+ tqdrawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data);
if(t->iconSet())
{
- QIconSet::Mode mode((t->isEnabled() && tb->isEnabled())
- ? QIconSet::Normal : QIconSet::Disabled);
+ TQIconSet::Mode mode((t->isEnabled() && tb->isEnabled())
+ ? TQIconSet::Normal : TQIconSet::Disabled);
- if (mode == QIconSet::Normal && (flags&Style_HasFocus))
- mode = QIconSet::Active;
+ if (mode == TQIconSet::Normal && (flags&Style_HasFocus))
+ mode = TQIconSet::Active;
- QPixmap pixmap(t->iconSet()->pixmap(QIconSet::Small, mode));
+ TQPixmap pixmap(t->iconSet()->pixmap(TQIconSet::Small, mode));
int pixh(pixmap.height()),
xoff(0),
yoff(0);
if(!(flags&Style_Selected))
{
- xoff = pixelMetric(PM_TabBarTabShiftHorizontal, widget);
- yoff = pixelMetric(PM_TabBarTabShiftVertical, widget);
+ xoff = tqpixelMetric(PM_TabBarTabShiftHorizontal, widget);
+ yoff = tqpixelMetric(PM_TabBarTabShiftVertical, widget);
}
p->drawPixmap(t->rect().left()+8+xoff, t->rect().center().y()-pixh/2 + yoff,
pixmap);
@@ -4747,14 +4752,14 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if ((flags & Style_HasFocus) && !t->text().isEmpty())
{
- QRect fr(r);
+ TQRect fr(r);
- if(QTabBar::RoundedAbove==tb->shape() || QTabBar::TriangularAbove==tb->shape())
+ if(TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape())
fr.addCoords(0, 1, 0, -1);
else
fr.addCoords(0, 0, 0, -1);
- drawPrimitive(PE_FocusRect, p, fr, cg);
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg);
}
break;
}
@@ -4765,32 +4770,32 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
r.rect(&x, &y, &w, &h);
- const QPushButton *button(static_cast<const QPushButton *>(widget));
+ const TQPushButton *button(static_cast<const TQPushButton *>(widget));
bool active(button->isOn() || button->isDown()),
cornArrow(false);
// Shift button contents if pushed.
if (active)
{
- x += pixelMetric(PM_ButtonShiftHorizontal, widget);
- y += pixelMetric(PM_ButtonShiftVertical, widget);
+ x += tqpixelMetric(PM_ButtonShiftHorizontal, widget);
+ y += tqpixelMetric(PM_ButtonShiftVertical, widget);
flags |= Style_Sunken;
}
// Does the button have a popup menu?
if (button->isMenuButton())
{
- int dx(pixelMetric(PM_MenuButtonIndicator, widget)),
- margin(pixelMetric(PM_ButtonMargin, widget));
+ int dx(tqpixelMetric(PM_MenuButtonIndicator, widget)),
+ margin(tqpixelMetric(PM_ButtonMargin, widget));
if(button->iconSet() && !button->iconSet()->isNull() &&
- (dx+button->iconSet()->pixmap(QIconSet::Small, QIconSet::Normal, QIconSet::Off
+ (dx+button->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off
).width()) >= w )
cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust
//the widget
else
{
- ::drawArrow(p, visualRect(QRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r),
+ ::drawArrow(p, tqvisualRect(TQRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r),
MO_ARROW(cg.buttonText()), PE_ArrowDown, opts);
w-=(dx+arrowOffset);
}
@@ -4799,15 +4804,15 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
// Draw the icon if there is one
if (button->iconSet() && !button->iconSet()->isNull())
{
- QIconSet::Mode mode(QIconSet::Disabled);
- QIconSet::State state(QIconSet::Off);
+ TQIconSet::Mode mode(TQIconSet::Disabled);
+ TQIconSet::State state(TQIconSet::Off);
if (button->isEnabled())
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if (button->isToggleButton() && button->isOn())
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pixmap = button->iconSet()->pixmap(QIconSet::Small, mode, state);
+ TQPixmap pixmap = button->iconSet()->pixmap(TQIconSet::Small, mode, state);
static const int constSpace(2);
@@ -4822,7 +4827,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
else
{
iw=button->pixmap() ? button->pixmap()->width()
- : widget->fontMetrics().size(Qt::ShowPrefix,
+ : widget->fontMetrics().size(TQt::ShowPrefix,
button->text()).width();
int cw(iw+pw+constSpace);
@@ -4833,7 +4838,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
if (cornArrow) //Draw over the icon
- ::drawArrow(p, visualRect(QRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r),
+ ::drawArrow(p, tqvisualRect(TQRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r),
MO_ARROW(cg.buttonText()), PE_ArrowDown, opts);
if(xo && iw)
@@ -4853,21 +4858,21 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
j(opts.embolden && button->isDefault() ? 2 : 1);
bool sidebar(!opts.stdSidebarButtons &&
((button->isFlat() && button->inherits("KMultiTabBarTab")) ||
- (button->parentWidget() && button->inherits("Ideal::Button") &&
- button->parentWidget()->inherits("Ideal::ButtonBar"))));
- const QColor &textCol(sidebar && (button->isOn() || flags&Style_On)
- ? QApplication::palette().active().highlightedText()
- : button->colorGroup().buttonText());
+ (button->tqparentWidget() && button->inherits("Ideal::Button") &&
+ button->tqparentWidget()->inherits("Ideal::ButtonBar"))));
+ const TQColor &textCol(sidebar && (button->isOn() || flags&Style_On)
+ ? TQApplication::tqpalette().active().highlightedText()
+ : button->tqcolorGroup().buttonText());
for(i=0; i<j; i++)
- drawItem(p, QRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
+ drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->tqcolorGroup(),
button->isEnabled(),
button->pixmap(), button->text(), -1, &textCol);
// Draw a focus rect if the button has focus
if (flags&Style_HasFocus && FOCUS_GLOW!=opts.focus &&
!(flags&Style_MouseOver && FOCUS_FULL==opts.focus && MO_NONE!=opts.coloredMouseOver))
- drawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_PushButtonFocusRect,
+ tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_PushButtonFocusRect,
widget), widget), cg, flags);
break;
}
@@ -4876,14 +4881,14 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(!widget || data.isDefault())
break;
- const QPopupMenu *popupmenu((const QPopupMenu *)widget);
- QMenuItem *mi(data.menuItem());
+ const TQPopupMenu *popupmenu((const TQPopupMenu *)widget);
+ TQMenuItem *mi(data.menuItem());
int tab(data.tabWidth()),
maxpmw(data.maxIconWidth()),
x, y, w, h;
- bool reverse(QApplication::reverseLayout());
+ bool reverse(TQApplication::reverseLayout());
- maxpmw=QMAX(maxpmw, constMenuPixmapWidth);
+ maxpmw=TQMAX(maxpmw, constMenuPixmapWidth);
r.rect(&x, &y, &w, &h);
if(widget->erasePixmap() && !widget->erasePixmap()->isNull())
@@ -4896,7 +4901,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(opts.menuStripe)
drawBevelGradient(menuStripeCol(), p,
- QRect(reverse ? r.right()-maxpmw : r.x(),
+ TQRect(reverse ? r.right()-maxpmw : r.x(),
r.y(), maxpmw, r.height()), false,
false, opts.menuStripeAppearance, WIDGET_OTHER);
}
@@ -4921,7 +4926,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
break;
}
- QRect cr, ir, tr, sr;
+ TQRect cr, ir, tr, sr;
// check column
cr.setRect(r.left(), r.top(), maxpmw, r.height());
// submenu indicator column
@@ -4933,42 +4938,42 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(reverse)
{
- cr=visualRect(cr, r);
- sr=visualRect(sr, r);
- tr=visualRect(tr, r);
- ir=visualRect(ir, r);
+ cr=tqvisualRect(cr, r);
+ sr=tqvisualRect(sr, r);
+ tr=tqvisualRect(tr, r);
+ ir=tqvisualRect(ir, r);
}
if(mi->iconSet() && opts.menuIcons)
{
// Select the correct icon from the iconset
- QIconSet::Mode mode=flags & Style_Active
- ? (mi->isEnabled() ? QIconSet::Active : QIconSet::Disabled)
- : (mi->isEnabled() ? QIconSet::Normal : QIconSet::Disabled);
- cr=visualRect(QRect(x, y, maxpmw, h), r);
+ TQIconSet::Mode mode=flags & Style_Active
+ ? (mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled)
+ : (mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled);
+ cr=tqvisualRect(TQRect(x, y, maxpmw, h), r);
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if(popupmenu->isCheckable() && mi->isChecked())
drawLightBevel((flags & Style_Active)&&(flags & Style_Enabled)
? itsHighlightCols[ORIGINAL_SHADE]
- : cg.background(), p, QRect(cr.x()+1, cr.y()+2, cr.width()-2, cr.height()-4),
+ : cg.background(), p, TQRect(cr.x()+1, cr.y()+2, cr.width()-2, cr.height()-4),
cg, flags|Style_Sunken|Style_Horizontal, ROUNDED_ALL,
getFill(flags|Style_Sunken|Style_Enabled, itsBackgroundCols),
itsBackgroundCols, true, false, WIDGET_NO_ETCH_BTN);
// Draw the icon
- QPixmap pixmap(mi->iconSet()->pixmap(QIconSet::Small, mode));
- QRect pmr(0, 0, pixmap.width(), pixmap.height());
+ TQPixmap pixmap(mi->iconSet()->pixmap(TQIconSet::Small, mode));
+ TQRect pmr(0, 0, pixmap.width(), pixmap.height());
pmr.moveCenter(cr.center());
p->drawPixmap(pmr.topLeft(), pixmap);
}
else if(popupmenu->isCheckable() && mi->isChecked())
- drawPrimitive(PE_CheckMark, p, cr, cg,
+ tqdrawPrimitive(PE_CheckMark, p, cr, cg,
(flags &(Style_Enabled|(opts.useHighlightForMenu ? Style_Active : 0)))| Style_On|MENU_ITEM);
- QColor textCol(flags&Style_Enabled
+ TQColor textCol(flags&Style_Enabled
? flags&Style_Active && opts.useHighlightForMenu
? cg.highlightedText()
: cg.foreground()
@@ -4984,11 +4989,11 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
p->restore();
}
- QString text=mi->text();
+ TQString text=mi->text();
if(!text.isNull())
{
- int t(text.find('\t'));
+ int t(text.tqfind('\t'));
// draw accelerator/tab-text
if(t>=0)
@@ -4999,15 +5004,15 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
else if(mi->pixmap())
{
- QPixmap *pixmap(mi->pixmap());
+ TQPixmap *pixmap(mi->pixmap());
if(1==pixmap->depth())
- p->setBackgroundMode(OpaqueMode);
+ p->setBackgroundMode(Qt::OpaqueMode);
int diffw(((r.width() - pixmap->width())/2) +
((r.width() - pixmap->width())%2));
p->drawPixmap(r.x()+diffw, r.y()+1, *pixmap );
if(1==pixmap->depth())
- p->setBackgroundMode(TransparentMode);
+ p->setBackgroundMode(Qt::TransparentMode);
}
if(mi->popup())
@@ -5022,8 +5027,8 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(!active || IS_GLASS(opts.menubarAppearance) || SHADE_NONE!=opts.shadeMenubars)
{
- QMenuBar *mb((QMenuBar*)widget);
- QRect r2(r);
+ TQMenuBar *mb((TQMenuBar*)widget);
+ TQRect r2(r);
r2.setY(mb->rect().y()+1);
r2.setHeight(mb->rect().height()-2);
@@ -5040,14 +5045,14 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(data.isDefault())
break;
- QMenuItem *mi(data.menuItem());
+ TQMenuItem *mi(data.menuItem());
if(mi->text().isEmpty()) // Draw pixmap...
drawItem(p, r, AlignCenter|ShowPrefix|DontClip|SingleLine, cg, flags&Style_Enabled,
- mi->pixmap(), QString::null);
+ mi->pixmap(), TQString());
else
{
- const QColor *col=((opts.colorMenubarMouseOver && active) || (!opts.colorMenubarMouseOver && down))
+ const TQColor *col=((opts.colorMenubarMouseOver && active) || (!opts.colorMenubarMouseOver && down))
? opts.customMenuTextColor
? &opts.customMenuSelTextColor
: opts.useHighlightForMenu
@@ -5065,20 +5070,20 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
drawMenuOrToolBarBackground(p, r, cg);
break;
case CE_DockWindowEmptyArea:
- if(widget && widget->inherits("QToolBar"))
+ if(widget && widget->inherits(TQTOOLBAR_OBJECT_NAME_STRING))
{
- QDockWindow *wind((QDockWindow*)widget);
+ TQDockWindow *wind((TQDockWindow*)widget);
drawMenuOrToolBarBackground(p, r, cg, false, Qt::Horizontal==wind->orientation());
}
else
- BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
+ BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data);
break;
case CE_ProgressBarGroove:
{
- QRect rx(r);
+ TQRect rx(r);
bool doEtch(DO_EFFECT && opts.borderProgress);
- QColor col;
+ TQColor col;
if(doEtch)
rx.addCoords(1, 1, -1, -1);
@@ -5099,11 +5104,11 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
drawBevelGradient(col, p, rx, true,
false, opts.progressGrooveAppearance, WIDGET_PBAR_TROUGH);
- const QColor *use(backgroundColors(cg));
+ const TQColor *use(backgroundColors(cg));
if(opts.borderProgress)
drawBorder(cg.background(), p, rx, cg, (SFlags)(flags|Style_Horizontal),
- (opts.square&SQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true,
+ (opts.square&STQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, use, WIDGET_OTHER, true,
IS_FLAT(opts.progressGrooveAppearance) && ECOLOR_DARK!=opts.progressGrooveColor ? BORDER_SUNKEN : BORDER_FLAT);
else
{
@@ -5113,13 +5118,13 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
if(doEtch)
- drawEtch(p, r, cg, false, (opts.square&SQUARE_PROGRESS));
+ drawEtch(p, r, cg, false, (opts.square&STQUARE_PROGRESS));
break;
}
case CE_ProgressBarContents:
{
- const QProgressBar *pb((const QProgressBar*)widget);
+ const TQProgressBar *pb((const TQProgressBar*)widget);
int steps(pb->totalSteps());
if(0==steps)//Busy indicator
@@ -5133,35 +5138,35 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
else if(progress > r.width()-barWidth)
progress = (r.width()-barWidth)-(progress-(r.width()-barWidth));
- drawProgress(p, QRect(r.x()+progress, r.y(), barWidth, r.height()), cg, flags,
- (opts.square&SQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
+ drawProgress(p, TQRect(r.x()+progress, r.y(), barWidth, r.height()), cg, flags,
+ (opts.square&STQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
}
else
{
- QRect cr(subRect(SR_ProgressBarContents, widget));
+ TQRect cr(subRect(SR_ProgressBarContents, widget));
if(cr.isValid() && pb->progress()>0)
{
double pg(((double)pb->progress()) / steps);
- int width(QMIN(cr.width(), (int)(pg * cr.width())));
+ int width(TQMIN(cr.width(), (int)(pg * cr.width())));
- if(QApplication::reverseLayout())
- drawProgress(p, QRect(cr.x()+(cr.width()-width), cr.y(), width,
+ if(TQApplication::reverseLayout())
+ drawProgress(p, TQRect(cr.x()+(cr.width()-width), cr.y(), width,
cr.height()), cg, flags,
- width==cr.width() || (opts.square&SQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
+ width==cr.width() || (opts.square&STQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
else
- drawProgress(p, QRect(cr.x(), cr.y(), width, cr.height()), cg, flags,
- width==cr.width() || (opts.square&SQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
+ drawProgress(p, TQRect(cr.x(), cr.y(), width, cr.height()), cg, flags,
+ width==cr.width() || (opts.square&STQUARE_PROGRESS) ? ROUNDED_NONE : ROUNDED_ALL, widget);
}
}
break;
}
case CE_ProgressBarLabel:
{
- const QProgressBar* pb = (const QProgressBar*)widget;
- QRect cr = subRect(SR_ProgressBarContents, widget);
+ const TQProgressBar* pb = (const TQProgressBar*)widget;
+ TQRect cr = subRect(SR_ProgressBarContents, widget);
double progress = pb->progress();
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int steps = pb->totalSteps();
if (!cr.isValid())
@@ -5169,7 +5174,7 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(opts.boldProgress) // This is the only change fro the KStyle code!
{
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold(true);
p->setFont(font);
}
@@ -5178,8 +5183,8 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if (progress > 0 || steps == 0)
{
double pg = (steps == 0) ? 1.0 : progress / steps;
- int width = QMIN(cr.width(), (int)(pg * cr.width()));
- QRect crect;
+ int width = TQMIN(cr.width(), (int)(pg * cr.width()));
+ TQRect crect;
if (reverse)
crect.setRect(cr.x()+(cr.width()-width), cr.y(), cr.width(), cr.height());
else
@@ -5202,21 +5207,21 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
}
case CE_PushButton:
{
- const QPushButton *button(static_cast<const QPushButton *>(widget));
+ const TQPushButton *button(static_cast<const TQPushButton *>(widget));
bool sidebar(!opts.stdSidebarButtons &&
((button->isFlat() && button->inherits("KMultiTabBarTab")) ||
- (button->parentWidget() && button->inherits("Ideal::Button") &&
- button->parentWidget()->inherits("Ideal::ButtonBar"))));
+ (button->tqparentWidget() && button->inherits("Ideal::Button") &&
+ button->tqparentWidget()->inherits("Ideal::ButtonBar"))));
if(sidebar)
{
- QRect r2(r);
+ TQRect r2(r);
flags|=TOGGLE_BUTTON;
if(button->isOn())
flags|=Style_On;
- const QColor *use(flags&Style_On ? getSidebarButtons() : buttonColors(cg));
+ const TQColor *use(flags&Style_On ? getSidebarButtons() : buttonColors(cg));
if((flags&Style_On ) || flags&Style_MouseOver)
{
@@ -5270,108 +5275,108 @@ void QtCurveStyle::drawControl(ControlElement control, QPainter *p, const QWidge
if(sidebar)
flags|=NO_ETCH_BUTTON;
- drawPrimitive(PE_ButtonCommand, p, r, cg, flags);
+ tqdrawPrimitive(PE_ButtonCommand, p, r, cg, flags);
if (button->isDefault() && IND_CORNER==opts.defBtnIndicator)
- drawPrimitive(PE_ButtonDefault, p, r, cg, flags);
+ tqdrawPrimitive(PE_ButtonDefault, p, r, cg, flags);
itsFormMode = false;
}
break;
}
case CE_CheckBox:
itsFormMode = isFormWidget(widget);
- drawPrimitive(PE_Indicator, p, r, cg, flags, data);
+ tqdrawPrimitive(PE_Indicator, p, r, cg, flags, data);
itsFormMode = false;
break;
case CE_CheckBoxLabel:
if(opts.crHighlight || FOCUS_GLOW==opts.focus)
{
- const QCheckBox *checkbox((const QCheckBox *)widget);
+ const TQCheckBox *checkbox((const TQCheckBox *)widget);
if(flags&Style_MouseOver && opts.crHighlight &&
-#if QT_VERSION >= 0x030200
+#if 0x039999 >= 0x030200
HOVER_CHECK==itsHover && itsHoverWidget && itsHoverWidget==widget &&
#endif
!isFormWidget(widget))
{
-#if QT_VERSION >= 0x030200
- QRect cr(checkbox->rect());
- QRegion r(QRect(cr.x(), cr.y(), visualRect(subRect(SR_CheckBoxFocusRect, widget),
+#if 0x039999 >= 0x030200
+ TQRect cr(checkbox->rect());
+ TQRegion r(TQRect(cr.x(), cr.y(), tqvisualRect(subRect(SR_CheckBoxFocusRect, widget),
widget).width()+
- pixelMetric(PM_IndicatorWidth)+4,
+ tqpixelMetric(PM_IndicatorWidth)+4,
cr.height()));
#else
- QRegion r(checkbox->rect());
+ TQRegion r(checkbox->rect());
#endif
- r-=visualRect(subRect(SR_CheckBoxIndicator, widget), widget);
+ r-=tqvisualRect(subRect(SR_CheckBoxIndicator, widget), widget);
p->setClipRegion(r);
drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, checkbox->rect(), true,
false, opts.selectionAppearance, WIDGET_SELECTION);
p->setClipping(false);
}
- int alignment(QApplication::reverseLayout() ? AlignRight : AlignLeft);
+ int tqalignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft);
- drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
+ drawItem(p, r, tqalignment | AlignVCenter | ShowPrefix, cg,
flags & Style_Enabled, checkbox->pixmap(), checkbox->text());
if(checkbox->hasFocus() && FOCUS_GLOW!=opts.focus)
- drawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_CheckBoxFocusRect, widget),
+ tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_CheckBoxFocusRect, widget),
widget), cg, flags);
}
else
- BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
+ BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data);
break;
case CE_RadioButton:
itsFormMode=isFormWidget(widget);
- drawPrimitive(PE_ExclusiveIndicator, p, r, cg, flags, data);
+ tqdrawPrimitive(PE_ExclusiveIndicator, p, r, cg, flags, data);
itsFormMode=false;
break;
case CE_RadioButtonLabel:
if(opts.crHighlight || FOCUS_GLOW==opts.focus)
{
- const QRadioButton *radiobutton((const QRadioButton *)widget);
+ const TQRadioButton *radiobutton((const TQRadioButton *)widget);
if(flags&Style_MouseOver && opts.crHighlight &&
-#if QT_VERSION >= 0x030200
+#if 0x039999 >= 0x030200
HOVER_RADIO==itsHover && itsHoverWidget && itsHoverWidget==widget &&
#endif
!isFormWidget(widget))
{
-#if QT_VERSION >= 0x030200
- QRect rb(radiobutton->rect());
- QRegion r(QRect(rb.x(), rb.y(),
- visualRect(subRect(SR_RadioButtonFocusRect, widget),
+#if 0x039999 >= 0x030200
+ TQRect rb(radiobutton->rect());
+ TQRegion r(TQRect(rb.x(), rb.y(),
+ tqvisualRect(subRect(SR_RadioButtonFocusRect, widget),
widget).width()+
- pixelMetric(PM_ExclusiveIndicatorWidth)+4,
+ tqpixelMetric(PM_ExclusiveIndicatorWidth)+4,
rb.height()));
#else
- QRegion r(radiobutton->rect());
+ TQRegion r(radiobutton->rect());
#endif
- r-=visualRect(subRect(SR_RadioButtonIndicator, widget), widget);
+ r-=tqvisualRect(subRect(SR_RadioButtonIndicator, widget), widget);
p->setClipRegion(r);
drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, radiobutton->rect(), true,
false, opts.selectionAppearance, WIDGET_SELECTION);
p->setClipping(false);
}
- int alignment(QApplication::reverseLayout() ? AlignRight : AlignLeft);
+ int tqalignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft);
- drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled,
+ drawItem(p, r, tqalignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled,
radiobutton->pixmap(), radiobutton->text());
if(radiobutton->hasFocus() && FOCUS_GLOW!=opts.focus)
- drawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_RadioButtonFocusRect,
+ tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_RadioButtonFocusRect,
widget), widget), cg, flags);
break;
}
// Fall through intentional!
default:
- BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
+ BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data);
}
}
-void QtCurveStyle::drawControlMask(ControlElement control, QPainter *p, const QWidget *widget,
- const QRect &r, const QStyleOption &data) const
+void TQtCurveStyle::tqdrawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget,
+ const TQRect &r, const TQStyleOption &data) const
{
switch(control)
{
@@ -5392,28 +5397,28 @@ void QtCurveStyle::drawControlMask(ControlElement control, QPainter *p, const QW
break;
}
default:
- BASE_STYLE::drawControlMask(control, p, widget, r, data);
+ BASE_STYLE::tqdrawControlMask(control, p, widget, r, data);
}
}
-void QtCurveStyle::drawComplexControlMask(ComplexControl control, QPainter *p, const QWidget *widget,
- const QRect &r, const QStyleOption &data) const
+void TQtCurveStyle::tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget,
+ const TQRect &r, const TQStyleOption &data) const
{
switch (control)
{
case CC_SpinWidget:
case CC_ComboBox:
case CC_ToolButton:
- drawControlMask(CE_PushButton, p, widget, r, data);
+ tqdrawControlMask(CE_PushButton, p, widget, r, data);
break;
default:
- BASE_STYLE::drawComplexControlMask(control, p, widget, r, data);
+ BASE_STYLE::tqdrawComplexControlMask(control, p, widget, r, data);
}
}
-QRect QtCurveStyle::subRect(SubRect subrect, const QWidget *widget)const
+TQRect TQtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const
{
- QRect rect,
+ TQRect rect,
wrect(widget->rect());
switch(subrect)
@@ -5424,7 +5429,7 @@ QRect QtCurveStyle::subRect(SubRect subrect, const QWidget *widget)const
rect=wrect;
else
{
- int dbw1(pixelMetric(PM_ButtonDefaultIndicator, widget)),
+ int dbw1(tqpixelMetric(PM_ButtonDefaultIndicator, widget)),
dbw2(dbw1*2),
border(3),
border2=(border*2);
@@ -5443,10 +5448,10 @@ QRect QtCurveStyle::subRect(SubRect subrect, const QWidget *widget)const
return opts.fillProgress
? DO_EFFECT && opts.borderProgress
? wrect
- : QRect(wrect.left()-1, wrect.top()-1, wrect.width()+2, wrect.height()+2)
+ : TQRect(wrect.left()-1, wrect.top()-1, wrect.width()+2, wrect.height()+2)
: DO_EFFECT && opts.borderProgress
- ? QRect(wrect.left()+2, wrect.top()+2, wrect.width()-4, wrect.height()-4)
- : QRect(wrect.left()+1, wrect.top()+1, wrect.width()-2, wrect.height()-2);
+ ? TQRect(wrect.left()+2, wrect.top()+2, wrect.width()-4, wrect.height()-4)
+ : TQRect(wrect.left()+1, wrect.top()+1, wrect.width()-2, wrect.height()-2);
case SR_ProgressBarLabel:
case SR_ProgressBarGroove:
return wrect;
@@ -5459,19 +5464,19 @@ QRect QtCurveStyle::subRect(SubRect subrect, const QWidget *widget)const
return rect;
}
-// This is a hack, as QTitleBar is private!!!
-class QTitleBar : public QWidget
+// This is a hack, as TQTitleBar is private!!!
+class TQTitleBar : public TQWidget
{
public:
bool isActive() const;
- QWidget *window() const;
+ TQWidget *window() const;
};
-void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const QWidget *widget,
- const QRect &r, const QColorGroup &cg, SFlags flags,
+void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget,
+ const TQRect &r, const TQColorGroup &cg, SFlags flags,
SCFlags controls, SCFlags active,
- const QStyleOption &data) const
+ const TQStyleOption &data) const
{
if(widget==itsHoverWidget)
flags |=Style_MouseOver;
@@ -5480,8 +5485,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
{
case CC_ToolButton:
{
- const QToolButton *toolbutton((const QToolButton *)widget);
- QRect button(querySubControlMetrics(control, widget, SC_ToolButton, data)),
+ const TQToolButton *toolbutton((const TQToolButton *)widget);
+ TQRect button(querySubControlMetrics(control, widget, SC_ToolButton, data)),
menuarea(querySubControlMetrics(control, widget, SC_ToolButtonMenu,
data));
SFlags bflags(flags|STD_TOOLBUTTON),
@@ -5489,20 +5494,20 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if (APP_KORN==itsThemedApp)
{
- drawPrimitive(PE_ButtonTool, p, button, cg, bflags, data);
+ tqdrawPrimitive(PE_ButtonTool, p, button, cg, bflags, data);
break;
}
- const QToolBar *tb(widget->parentWidget()
- ? ::qt_cast<const QToolBar *>(widget->parentWidget()) : 0L);
+ const TQToolBar *tb(widget->tqparentWidget()
+ ? ::tqqt_cast<const TQToolBar *>(widget->tqparentWidget()) : 0L);
bool onControlButtons(false),
onExtender(!tb &&
- widget->parentWidget() &&
- widget->parentWidget()->inherits( "QToolBarExtensionWidget") &&
- ::qt_cast<QToolBar *>(widget->parentWidget()->parentWidget())),
+ widget->tqparentWidget() &&
+ widget->tqparentWidget()->inherits( "TQToolBarExtensionWidget") &&
+ ::tqqt_cast<TQToolBar *>(widget->tqparentWidget()->tqparentWidget())),
isDWClose(!tb && !onExtender &&
- widget->parentWidget() &&
- widget->parentWidget()->inherits( "QDockWindowHandle"));
+ widget->tqparentWidget() &&
+ widget->tqparentWidget()->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING));
if(isDWClose)
{
@@ -5512,8 +5517,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
bflags|=DW_CLOSE_BUTTON;
}
- if (!tb && !onExtender && widget->parentWidget() &&
- !qstrcmp(widget->parentWidget()->name(), "qt_maxcontrols"))
+ if (!tb && !onExtender && widget->tqparentWidget() &&
+ !qstrcmp(widget->tqparentWidget()->name(), "qt_maxcontrols"))
onControlButtons = true;
if(active & SC_ToolButton)
@@ -5526,12 +5531,12 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(controls&SC_ToolButton)
{
if(onControlButtons ||
- (toolbutton->parentWidget() && toolbutton->parentWidget()->parentWidget() &&
- ::qt_cast<const QMenuBar *>(toolbutton->parentWidget()->parentWidget())))
+ (toolbutton->tqparentWidget() && toolbutton->tqparentWidget()->tqparentWidget() &&
+ ::tqqt_cast<const TQMenuBar *>(toolbutton->tqparentWidget()->tqparentWidget())))
bflags|=NO_ETCH_BUTTON;
// If we're pressed, on, or raised...
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
if(bflags &(Style_Down | Style_On | Style_Raised) || onControlButtons)
#else
if(bflags &(Style_Down | Style_On | Style_Raised | Style_MouseOver) ||
@@ -5551,31 +5556,31 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(toolbutton->isToggleButton())
bflags|=TOGGLE_BUTTON;
- drawPrimitive(PE_ButtonTool, p, button, cg, bflags, data);
+ tqdrawPrimitive(PE_ButtonTool, p, button, cg, bflags, data);
}
// Check whether to draw a background pixmap
- else if(APP_MACTOR!=itsThemedApp && toolbutton->parentWidget() &&
- toolbutton->parentWidget()->backgroundPixmap() &&
- !toolbutton->parentWidget()->backgroundPixmap()->isNull())
- p->drawTiledPixmap(r, *(toolbutton->parentWidget()->backgroundPixmap()),
+ else if(APP_MACTOR!=itsThemedApp && toolbutton->tqparentWidget() &&
+ toolbutton->tqparentWidget()->backgroundPixmap() &&
+ !toolbutton->tqparentWidget()->backgroundPixmap()->isNull())
+ p->drawTiledPixmap(r, *(toolbutton->tqparentWidget()->backgroundPixmap()),
toolbutton->pos());
- else if(widget->parent())
+ else if(widget->tqparent())
{
- QToolBar *tb(0L);
+ TQToolBar *tb(0L);
- if(::qt_cast<const QToolBar *>(widget->parent()))
- tb=(QToolBar*)widget->parent();
- else if(widget->parent()->inherits("QToolBarExtensionWidget"))
+ if(::tqqt_cast<const TQToolBar *>(widget->tqparent()))
+ tb=(TQToolBar*)widget->tqparent();
+ else if(widget->tqparent()->inherits("TQToolBarExtensionWidget"))
{
- QWidget *parent=(QWidget*)widget->parent();
+ TQWidget *tqparent=(TQWidget*)widget->tqparent();
- tb=(QToolBar*)parent->parent();
+ tb=(TQToolBar*)tqparent->tqparent();
}
if(tb)
{
- QRect tbr(tb->rect());
+ TQRect tbr(tb->rect());
bool horiz(Qt::Horizontal==tb->orientation());
if(!IS_FLAT(opts.toolbarAppearance))
@@ -5592,18 +5597,18 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(controls&SC_ToolButtonMenu)
{
if(mflags &(Style_Down | Style_On | Style_Raised))
- drawPrimitive(PE_ButtonDropDown, p, menuarea, cg, mflags, data);
+ tqdrawPrimitive(PE_ButtonDropDown, p, menuarea, cg, mflags, data);
::drawArrow(p, menuarea, MO_ARROW(cg.buttonText()), PE_ArrowDown, opts, true);
}
if(toolbutton->hasFocus() && !toolbutton->focusProxy())
{
- QRect fr(toolbutton->rect());
+ TQRect fr(toolbutton->rect());
if(FOCUS_FULL!=opts.focus)
fr.addCoords(2, 2,-2,-2);
if(DO_EFFECT)
fr.addCoords(1, 1,-1,-1);
- drawPrimitive(PE_FocusRect, p, fr, cg);
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg);
}
itsFormMode=false;
@@ -5616,20 +5621,20 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
itsFormMode = isFormWidget(widget);
- const QComboBox *combobox((const QComboBox *)widget);
- QRect frame(QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ const TQComboBox *combobox((const TQComboBox *)widget);
+ TQRect frame(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame,
data), widget)),
- arrow(QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ arrow(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow,
data), widget)),
- field(QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ field(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField,
data), widget));
- const QColor *use(buttonColors(cg));
+ const TQColor *use(buttonColors(cg));
bool editable(combobox->editable()),
sunken(combobox->listBox() ? combobox->listBox()->isShown() : false),
- reverse(QApplication::reverseLayout());
+ reverse(TQApplication::reverseLayout());
SFlags fillFlags(flags),
doEtch(!itsFormMode && DO_EFFECT && (!editable || opts.etchEntry));
@@ -5664,7 +5669,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
else
{
- const QColor *cols=itsComboBtnCols && editable && flags&Style_Enabled ? itsComboBtnCols : use;
+ const TQColor *cols=itsComboBtnCols && editable && flags&Style_Enabled ? itsComboBtnCols : use;
if(editable && HOVER_CB_ARROW!=itsHover)
fillFlags&=~Style_MouseOver;
@@ -5708,7 +5713,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
? ENTRY_FOCUS
: ENTRY_NONE
: ENTRY_NONE,
- (opts.square&SQUARE_ENTRY)
+ (opts.square&STQUARE_ENTRY)
? ROUNDED_NONE
: opts.unifyCombo
? ROUNDED_ALL
@@ -5733,13 +5738,13 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(flags&Style_HasFocus && !editable && FOCUS_GLOW!=opts.focus)
{
- QRect fr;
+ TQRect fr;
if(FOCUS_FULL==opts.focus)
fr=frame;
else if(opts.comboSplitter)
{
- fr=QStyle::visualRect(subRect(SR_ComboBoxFocusRect, widget), widget);
+ fr=TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, widget), widget);
if(reverse)
fr.addCoords(3, 0, 0, 0);
else
@@ -5754,8 +5759,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
if(!(flags&Style_MouseOver && FOCUS_FULL==opts.focus && MO_NONE!=opts.coloredMouseOver))
- drawPrimitive(PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder,
- QStyleOption(cg.highlight()));
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder,
+ TQStyleOption(cg.highlight()));
}
}
@@ -5764,8 +5769,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(!editable && (SHADE_DARKEN==opts.comboBtn || itsComboBtnCols))
{
SFlags btnFlags(flags);
- QRect btn(arrow.x(), frame.y(), arrow.width()+1, frame.height());
- const QColor *cols=SHADE_DARKEN==opts.comboBtn || !(flags&Style_Enabled) ? use : itsComboBtnCols;
+ TQRect btn(arrow.x(), frame.y(), arrow.width()+1, frame.height());
+ const TQColor *cols=SHADE_DARKEN==opts.comboBtn || !(flags&Style_Enabled) ? use : itsComboBtnCols;
if(!sunken)
btnFlags|=Style_Raised;
p->save();
@@ -5796,10 +5801,10 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(!sunken && !editable &&
((MO_GLOW==opts.coloredMouseOver && flags&Style_MouseOver)/* ||
(FOCUS_FULL==opts.focus && flags&Style_HasFocus)*/ || glowFocus))
- drawGlow(p, widget ? widget->rect() : r, cg, WIDGET_COMBO, glowFocus ? itsFocusCols : NULL);
+ drawGlow(p, widget ? TQT_TQRECT_OBJECT(widget->rect()) : r, cg, WIDGET_COMBO, glowFocus ? itsFocusCols : NULL);
else
- drawEtch(p, widget ? widget->rect() : r, cg,
- !editable && EFFECT_SHADOW==opts.buttonEffect && !sunken, editable && (opts.square&SQUARE_ENTRY));
+ drawEtch(p, widget ? TQT_TQRECT_OBJECT(widget->rect()) : r, cg,
+ !editable && EFFECT_SHADOW==opts.buttonEffect && !sunken, editable && (opts.square&STQUARE_ENTRY));
}
p->setPen(cg.buttonText());
@@ -5810,14 +5815,14 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
{
itsFormMode = isFormWidget(widget);
- const QSpinWidget *spinwidget((const QSpinWidget *)widget);
- QRect frame(querySubControlMetrics(CC_SpinWidget, widget, SC_SpinWidgetFrame,
+ const TQSpinWidget *spinwidget((const TQSpinWidget *)widget);
+ TQRect frame(querySubControlMetrics(CC_SpinWidget, widget, SC_SpinWidgetFrame,
data)),
up(spinwidget->upRect()),
down(spinwidget->downRect()),
all(frame.unite(up).unite(down));
bool hw(itsHoverWidget && itsHoverWidget==spinwidget),
- reverse(QApplication::reverseLayout()),
+ reverse(TQApplication::reverseLayout()),
doFrame((controls&SC_SpinWidgetFrame) && frame.isValid()),
doEtch(!itsFormMode && DO_EFFECT && opts.etchEntry);
@@ -5859,8 +5864,8 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(opts.unifySpinBtns)
{
- QRect btns=up.unite(down);
- const QColor *use(buttonColors(cg));
+ TQRect btns=up.unite(down);
+ const TQColor *use(buttonColors(cg));
int btnFlags=flags;
btnFlags&=~(Style_Sunken|Style_MouseOver);
@@ -5890,11 +5895,11 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(hw && HOVER_SW_UP==itsHover)
upflags|=Style_MouseOver;
up.setHeight(up.height()+1);
- if(spinwidget->buttonSymbols()==QSpinWidget::PlusMinus)
+ if(spinwidget->buttonSymbols()==TQSpinWidget::PlusMinus)
pe=PE_SpinWidgetPlus;
if(!spinwidget->isUpEnabled())
upflags&=~Style_Enabled;
- drawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg,
+ tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg,
upflags |((active==SC_SpinWidgetUp)
? Style_On | Style_Sunken : Style_Raised));
}
@@ -5906,11 +5911,11 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if(hw && HOVER_SW_DOWN==itsHover)
downflags|=Style_MouseOver;
- if(spinwidget->buttonSymbols()==QSpinWidget::PlusMinus)
+ if(spinwidget->buttonSymbols()==TQSpinWidget::PlusMinus)
pe=PE_SpinWidgetMinus;
if(!spinwidget->isDownEnabled())
downflags&=~Style_Enabled;
- drawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg,
+ tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg,
downflags |((active==SC_SpinWidgetDown)
? Style_On | Style_Sunken : Style_Raised));
}
@@ -5932,14 +5937,14 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
if(doEtch)
- drawEtch(p, spinwidget ? spinwidget->rect() : r, cg, false, (opts.square&SQUARE_ENTRY));
+ drawEtch(p, spinwidget ? TQT_TQRECT_OBJECT(spinwidget->rect()) : r, cg, false, (opts.square&STQUARE_ENTRY));
}
itsFormMode=false;
break;
}
case CC_ScrollBar:
{
- const QScrollBar *sb((const QScrollBar *)widget);
+ const TQScrollBar *sb((const TQScrollBar *)widget);
bool hw(itsHoverWidget && itsHoverWidget==sb),
useThreeButtonScrollBar(SCROLLBAR_KDE==opts.scrollbarType),
horiz(Qt::Horizontal==sb->orientation()),
@@ -5948,7 +5953,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
atMax(maxed || sb->value()==sb->maxValue());
SFlags sflags((horiz ? Style_Horizontal : Style_Default) |
(maxed || !widget->isEnabled() ? Style_Default : Style_Enabled));
- QRect subline(querySubControlMetrics(control, widget, SC_ScrollBarSubLine,
+ TQRect subline(querySubControlMetrics(control, widget, SC_ScrollBarSubLine,
data)),
addline(querySubControlMetrics(control, widget, SC_ScrollBarAddLine,
data)),
@@ -6041,9 +6046,9 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
// Draw trough...
- const QColor *trough(itsBackgroundCols); // backgroundColors(cg));
+ const TQColor *trough(itsBackgroundCols); // backgroundColors(cg));
bool noButtons((SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons) && ROUNDED);
- QRect s2(subpage), a2(addpage);
+ TQRect s2(subpage), a2(addpage);
#ifndef SIMPLE_SCROLLBARS
if(noButtons)
@@ -6055,16 +6060,16 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
#endif
p->save();
if(opts.flatSbarButtons)
- p->setClipRegion(QRegion(s2)+QRegion(addpage)+QRegion(addline)+QRegion(subline)+QRegion(subline2));
+ p->setClipRegion(TQRegion(s2)+TQRegion(addpage)+TQRegion(addline)+TQRegion(subline)+TQRegion(subline2));
else
- p->setClipRegion(QRegion(s2)+QRegion(addpage));
+ p->setClipRegion(TQRegion(s2)+TQRegion(addpage));
if(opts.flatSbarButtons && SCROLLBAR_NONE!=opts.scrollbarType && ROUNDED && !IS_FLAT(opts.sbarBgndAppearance))
drawBevelGradient(itsBackgroundCols[ORIGINAL_SHADE], p, r, flags&Style_Horizontal, false,
opts.sbarBgndAppearance, WIDGET_SB_BGND);
else if(opts.thinSbarGroove && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons) && IS_FLAT(opts.sbarBgndAppearance))
{
- QColor color(cg.background());
+ TQColor color(cg.background());
if(0!=opts.tabBgnd && inStackWidget(widget))
color=shade(color, TO_FACTOR(opts.tabBgnd));
@@ -6081,7 +6086,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
drawLightBevel(p, sbRect, cg, sflags/*|Style_Down*/,
#ifndef SIMPLE_SCROLLBARS
- !(opts.square&SQUARE_SB_SLIDER) && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons)
+ !(opts.square&STQUARE_SB_SLIDER) && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons)
? ROUNDED_ALL :
#endif
ROUNDED_NONE,
@@ -6094,7 +6099,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
{
bool enable=!atMin;
- drawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->palette().disabled() : cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->tqpalette().disabled() : cg,
sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB==itsHover
@@ -6106,7 +6111,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
{
if(IS_FLAT(opts.sbarBgndAppearance))
p->fillRect(subline2, cg.background());
- drawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->palette().disabled() : cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->tqpalette().disabled() : cg,
sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB2==itsHover
@@ -6126,7 +6131,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
else
addline.addCoords(0, 0, 0, -1);
- drawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->palette().disabled() : cg,
+ tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->tqpalette().disabled() : cg,
sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_ADD==itsHover
@@ -6136,12 +6141,12 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
if((controls&SC_ScrollBarFirst) && first.isValid())
- drawPrimitive(PE_ScrollBarFirst, p, first, cg, sflags |
+ tqdrawPrimitive(PE_ScrollBarFirst, p, first, cg, sflags |
//(maxed ? Style_Default : Style_Enabled) |
(!maxed && SC_ScrollBarFirst==active ? Style_Down : Style_Default));
if((controls&SC_ScrollBarLast) && last.isValid())
- drawPrimitive(PE_ScrollBarLast, p, last, cg, sflags |
+ tqdrawPrimitive(PE_ScrollBarLast, p, last, cg, sflags |
//(maxed ? Style_Default : Style_Enabled) |
(!maxed && SC_ScrollBarLast==active ? Style_Down : Style_Default));
@@ -6151,7 +6156,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
// of the slider that overlaps with the tough. So, once again set the clipping
// region...
if(!(controls&SC_ScrollBarSlider))
- p->setClipRegion(QRegion(s2)+QRegion(addpage));
+ p->setClipRegion(TQRegion(s2)+TQRegion(addpage));
#ifdef INCREASE_SB_SLIDER
else if(!opts.flatSbarButtons)
{
@@ -6192,7 +6197,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
IS_FLAT(opts.sbarBgndAppearance))
p->fillRect(slider, cg.background());
- drawPrimitive(PE_ScrollBarSlider, p, slider, cg, sflags |
+ tqdrawPrimitive(PE_ScrollBarSlider, p, slider, cg, sflags |
//(maxed ? Style_Default : Style_Enabled) |
(!maxed && hw && HOVER_SB_SLIDER==itsHover
? Style_MouseOver : Style_Default) |
@@ -6201,7 +6206,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
// ### perhaps this should not be able to accept focus if maxedOut?
if(sb->hasFocus())
- drawPrimitive(PE_FocusRect, p, QRect(slider.x()+2, slider.y()+2,
+ tqdrawPrimitive(PE_FocusRect, p, TQRect(slider.x()+2, slider.y()+2,
slider.width()-5, slider.height()-5), cg, Style_Default);
#ifndef SIMPLE_SCROLLBARS
@@ -6257,24 +6262,24 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
case CC_Slider:
//
// Note: Can't use KStyle'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 TQtCurve needs groove,
// 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
{
bool tb(!IS_FLAT(opts.toolbarAppearance) && widget &&
0==qstrcmp(widget->name(), kdeToolbarWidget));
- QRect groove=querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, data),
+ TQRect groove=querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, data),
handle=querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, data);
- QPixmap pix(widget->size());
- QPainter p2,
+ TQPixmap pix(widget->size());
+ TQPainter p2,
*paint(tb ? p : &p2);
if(!tb)
{
paint->begin(&pix);
- if (widget->parentWidget() && widget->parentWidget()->backgroundPixmap() &&
- !widget->parentWidget()->backgroundPixmap()->isNull())
- paint->drawTiledPixmap(r, *(widget->parentWidget()->backgroundPixmap()), widget->pos());
+ if (widget->tqparentWidget() && widget->tqparentWidget()->backgroundPixmap() &&
+ !widget->tqparentWidget()->backgroundPixmap()->isNull())
+ paint->drawTiledPixmap(r, *(widget->tqparentWidget()->backgroundPixmap()), widget->pos());
else
pix.fill(cg.background());
}
@@ -6282,79 +6287,79 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
if((controls & SC_SliderGroove)&& groove.isValid())
drawSliderGroove(paint, groove, cg, flags, widget);
if((controls & SC_SliderHandle)&& handle.isValid())
- drawSliderHandle(paint, handle, cg, flags, widget ? ::qt_cast<QSlider *>(widget) : 0L, tb);
+ drawSliderHandle(paint, handle, cg, flags, widget ? ::tqqt_cast<TQSlider *>(widget) : 0L, tb);
if(controls & SC_SliderTickmarks)
- QCommonStyle::drawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks,
+ TQCommonStyle::tqdrawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks,
active, data);
if(flags&Style_HasFocus && FOCUS_GLOW!=opts.focus)
- drawPrimitive(PE_FocusRect, paint, groove, cg);
+ tqdrawPrimitive(PE_FocusRect, paint, groove, cg);
if(!tb)
{
paint->end();
- bitBlt((QWidget*)widget, r.x(), r.y(), &pix);
+ bitBlt((TQWidget*)widget, r.x(), r.y(), &pix);
}
break;
}
case CC_TitleBar:
{
const int buttonMargin(3);
- const QTitleBar *tb((const QTitleBar *)widget);
+ const TQTitleBar *tb((const TQTitleBar *)widget);
bool isActive((tb->isActive() && widget->isActiveWindow()) ||
- (!tb->window() && widget->topLevelWidget()->isActiveWindow()));
- QColorGroup cgroup(isActive
- ? widget->palette().active()
- : widget->palette().inactive());
- const QColor *cols(getMdiColors(cg, isActive));
- QColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor),
+ (!tb->window() && widget->tqtopLevelWidget()->isActiveWindow()));
+ TQColorGroup cgroup(isActive
+ ? widget->tqpalette().active()
+ : widget->tqpalette().inactive());
+ const TQColor *cols(getMdiColors(cg, isActive));
+ TQColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor),
shdCol(shadowColor(textCol)),
shadowCol(midColor(cols[ORIGINAL_SHADE], shdCol));
if (controls&SC_TitleBarLabel)
{
- int alignment=AlignVCenter|SingleLine;
+ int tqalignment=AlignVCenter|SingleLine;
bool full=false;
switch(opts.titlebarAlignment)
{
default:
case ALIGN_LEFT:
- alignment|=Qt::AlignLeft;
+ tqalignment|=TQt::AlignLeft;
break;
case ALIGN_CENTER:
- alignment|=Qt::AlignHCenter;
+ tqalignment|=TQt::AlignHCenter;
break;
case ALIGN_FULL_CENTER:
- alignment|=Qt::AlignHCenter;
+ tqalignment|=TQt::AlignHCenter;
full=true;
break;
case ALIGN_RIGHT:
- alignment|=Qt::AlignRight;
+ tqalignment|=TQt::AlignRight;
}
- QRect ir(visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)),
+ TQRect ir(tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)),
textRect(full ? tb->rect().x() : ir.x(), ir.y(), full ? tb->rect().width() : ir.width(), ir.height());
EAppearance app=isActive ? opts.titlebarAppearance : opts.inactiveTitlebarAppearance;
drawBevelGradient(cols[ORIGINAL_SHADE], p, r, true, false, app, WIDGET_MDI_WINDOW);
ir.addCoords(2, 0, -4, 0);
- QFontMetrics fm(QFontMetrics(widget->font()));
- QString titleString(elliditide(widget->caption(), fm, textRect.width()));
+ TQFontMetrics fm(TQFontMetrics(widget->font()));
+ TQString titleString(elliditide(widget->caption(), fm, textRect.width()));
if(full)
{
int textWidth=fm.boundingRect(titleString).width();
if(ir.left()>((textRect.width()-textWidth)>>1))
{
- alignment=Qt::AlignVCenter|Qt::AlignLeft;
+ tqalignment=TQt::AlignVCenter|TQt::AlignLeft;
textRect=ir;
full=false;
}
else if(ir.right()<((textRect.width()+textWidth)>>1))
{
- alignment=Qt::AlignVCenter|Qt::AlignRight;
+ tqalignment=TQt::AlignVCenter|TQt::AlignRight;
textRect=ir;
full=false;
}
@@ -6363,23 +6368,23 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
}
p->setPen(shadowCol);
- p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), alignment, titleString);
+ p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), tqalignment, titleString);
p->setPen(textCol);
- p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), alignment, titleString);
+ p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), tqalignment, titleString);
if(full)
p->setClipping(false);
//controls-=SC_TitleBarLabel;
}
- QRect ir;
+ TQRect ir;
bool down(false);
- QPixmap pm;
+ TQPixmap pm;
if (controls&SC_TitleBarCloseButton)
{
- ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget);
+ ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget);
down = active & SC_TitleBarCloseButton;
- drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarCloseButton);
}
@@ -6387,72 +6392,72 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, QPainter *p, const
{
if (controls &SC_TitleBarMaxButton)
{
- ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget);
+ ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget);
down = active & SC_TitleBarMaxButton;
- drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarMaxButton);
}
if (controls&SC_TitleBarNormalButton || controls&SC_TitleBarMinButton)
{
- ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget);
- QStyle::SubControl ctrl = (controls & SC_TitleBarNormalButton ?
+ ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget);
+ TQStyle::SubControl ctrl = (controls & SC_TitleBarNormalButton ?
SC_TitleBarNormalButton :
SC_TitleBarMinButton);
down = active & ctrl;
- drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, ctrl);
}
if (controls&SC_TitleBarShadeButton)
{
- ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget);
+ ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget);
down = active & SC_TitleBarShadeButton;
- drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarShadeButton);
}
if (controls&SC_TitleBarUnshadeButton)
{
- ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget);
+ ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget);
down = active & SC_TitleBarUnshadeButton;
- drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarUnshadeButton);
}
}
if (controls&SC_TitleBarSysMenu && tb->icon())
{
- ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget);
+ ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget);
down = active & SC_TitleBarSysMenu;
- drawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
- drawItem(p, ir, AlignCenter, tb->colorGroup(), true, tb->icon(), QString::null);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
+ drawItem(p, ir, AlignCenter, tb->tqcolorGroup(), true, tb->icon(), TQString());
}
break;
}
default:
- BASE_STYLE::drawComplexControl(control, p, widget, r, cg, flags, controls, active, data);
+ BASE_STYLE::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data);
}
}
-QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget *widget,
- SubControl sc, const QStyleOption &data) const
+TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQWidget *widget,
+ SubControl sc, const TQStyleOption &data) const
{
- bool reverse(QApplication::reverseLayout());
+ bool reverse(TQApplication::reverseLayout());
switch(control)
{
case CC_SpinWidget:
{
if(!widget)
- return QRect();
+ return TQRect();
- int fw(pixelMetric(PM_SpinBoxFrameWidth, 0));
- QSize bs;
+ int fw(tqpixelMetric(PM_SpinBoxFrameWidth, 0));
+ TQSize bs;
bs.setHeight(widget->height()>>1);
if(bs.height()< 8)
bs.setHeight(8);
bs.setWidth(DO_EFFECT ? 16 : 15);
- bs=bs.expandedTo(QApplication::globalStrut());
+ bs=bs.expandedTo(TQApplication::globalStrut());
int extra(bs.height()*2==widget->height()? 0 : 1),
y(0), x(widget->width()-bs.width()),
@@ -6461,18 +6466,18 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
switch(sc)
{
case SC_SpinWidgetUp:
- return QRect(x, y, bs.width(), bs.height());
+ return TQRect(x, y, bs.width(), bs.height());
case SC_SpinWidgetDown:
- return QRect(x, y+bs.height(), bs.width(), bs.height()+extra);
+ return TQRect(x, y+bs.height(), bs.width(), bs.height()+extra);
case SC_SpinWidgetButtonField:
- return QRect(x, y, bs.width(), widget->height()-2*fw);
+ return TQRect(x, y, bs.width(), widget->height()-2*fw);
case SC_SpinWidgetEditField:
- return QRect(fw, fw, rx, widget->height()-2*fw);
+ return TQRect(fw, fw, rx, widget->height()-2*fw);
case SC_SpinWidgetFrame:
return reverse
- ? QRect(widget->x()+bs.width(), widget->y(),
+ ? TQRect(widget->x()+bs.width(), widget->y(),
widget->width()-bs.width()-1, widget->height())
- : QRect(widget->x(), widget->y(),
+ : TQRect(widget->x(), widget->y(),
widget->width()-bs.width(),widget->height());
default:
break; // Remove compiler warnings...
@@ -6480,14 +6485,14 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
}
case CC_ComboBox:
{
- QRect r(BASE_STYLE::querySubControlMetrics(control, widget, sc, data));
+ TQRect r(BASE_STYLE::querySubControlMetrics(control, widget, sc, data));
if(SC_ComboBoxFrame==sc)
{
- const QComboBox *cb(::qt_cast<const QComboBox *>(widget));
+ const TQComboBox *cb(::tqqt_cast<const TQComboBox *>(widget));
if(cb && cb->editable())
- r=QRect(r.x()+r.width()-19, r.y(), 19, r.height());
+ r=TQRect(r.x()+r.width()-19, r.y(), 19, r.height());
}
else if (SC_ComboBoxEditField==sc && !DO_EFFECT)
r.addCoords(0, 0, -1, 0);
@@ -6500,11 +6505,11 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
platinumScrollBar(SCROLLBAR_PLATINUM==opts.scrollbarType),
nextScrollBar(SCROLLBAR_NEXT==opts.scrollbarType),
noButtons(SCROLLBAR_NONE==opts.scrollbarType);
- QRect ret;
- const QScrollBar *sb((const QScrollBar*)widget);
+ TQRect ret;
+ const TQScrollBar *sb((const TQScrollBar*)widget);
bool horizontal(sb->orientation() == Qt::Horizontal);
int sliderstart(sb->sliderStart()),
- sbextent(pixelMetric(PM_ScrollBarExtent, widget)),
+ sbextent(tqpixelMetric(PM_ScrollBarExtent, widget)),
maxlen((horizontal ? sb->width() : sb->height())
- (noButtons ? 0 : (sbextent * (threeButtonScrollBar ? 3 : 2)))),
sliderlen;
@@ -6515,7 +6520,7 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
uint range = sb->maxValue() - sb->minValue();
sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep());
- int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -6529,7 +6534,7 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
{
case SC_ScrollBarSubLine:
if(noButtons)
- return QRect();
+ return TQRect();
// top/left button
if (platinumScrollBar)
@@ -6542,7 +6547,7 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
break;
case SC_ScrollBarAddLine:
if(noButtons)
- return QRect();
+ return TQRect();
// bottom/right button
if (nextScrollBar)
@@ -6632,7 +6637,7 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
ret.setRect(0, sliderstart, sbextent, sliderlen);
break;
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, data);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, data);
break;
}
return ret;
@@ -6641,21 +6646,21 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
case CC_TitleBar:
if (widget)
{
- bool isMinimized(tb->titleBarState&Qt::WindowMinimized),
- isMaximized(tb->titleBarState&Qt::WindowMaximized);
+ bool isMinimized(tb->titleBarState&TQt::WindowMinimized),
+ isMaximized(tb->titleBarState&TQt::WindowMaximized);
if( (isMaximized && SC_TitleBarMaxButton==subControl) ||
(isMinimized && SC_TitleBarMinButton==subControl) ||
(isMinimized && SC_TitleBarShadeButton==subControl) ||
(!isMinimized && SC_TitleBarUnshadeButton==subControl))
- return QRect();
+ return TQRect();
readMdiPositions();
const int windowMargin(2);
const int controlSize(tb->rect.height() - windowMargin *2);
- QList<int>::ConstIterator it(itsMdiButtons[0].begin()),
+ TQList<int>::ConstIterator it(itsMdiButtons[0].begin()),
end(itsMdiButtons[0].end());
int sc(SC_TitleBarUnshadeButton==subControl
? SC_TitleBarShadeButton
@@ -6709,7 +6714,7 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
if(SC_TitleBarLabel==subControl)
r.adjust(totalLeft, 0, -totalRight, 0);
else if(!found)
- return QRect();
+ return TQRect();
else if(rhs)
r.setRect(r.right()-(pos+windowMargin),
r.top()+windowMargin,
@@ -6717,7 +6722,7 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
else
r.setRect(r.left()+windowMargin+pos, r.top()+windowMargin,
controlSize, controlSize);
- return visualRect(tb->direction, tb->rect, r);
+ return tqvisualRect(tb->direction, tb->rect, r);
}
}
#endif
@@ -6728,7 +6733,7 @@ QRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const QWidget
return BASE_STYLE::querySubControlMetrics(control, widget, sc, data);
}
-int QtCurveStyle::pixelMetric(PixelMetric metric, const QWidget *widget) const
+int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) const
{
switch(metric)
{
@@ -6738,16 +6743,16 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const QWidget *widget) const
return 7;
case PM_ButtonMargin:
return 3;
-#if QT_VERSION >= 0x030200
+#if 0x039999 >= 0x030200
case PM_TabBarTabShiftVertical:
{
- const QTabBar *tb=widget ? ::qt_cast<const QTabBar *>(widget) : 0;
+ const TQTabBar *tb=widget ? ::tqqt_cast<const TQTabBar *>(widget) : 0;
return tb
- ? QTabBar::RoundedAbove==tb->shape() || QTabBar::TriangularAbove==tb->shape()
+ ? TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape()
? 1
: -1
- : BASE_STYLE::pixelMetric(metric, widget);
+ : BASE_STYLE::tqpixelMetric(metric, widget);
}
case PM_TabBarTabShiftHorizontal:
return 0;
@@ -6758,18 +6763,18 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const QWidget *widget) const
case PM_ButtonDefaultIndicator:
return 0;
case PM_DefaultFrameWidth:
- if(APP_KATE==itsThemedApp && widget && widget->parentWidget() && widget->parentWidget()->parentWidget() &&
- ::qt_cast<const QWidgetStack *>(widget) &&
- ::qt_cast<const QTabWidget *>(widget->parentWidget()) &&
- ::qt_cast<const QVBox *>(widget->parentWidget()->parentWidget()))
+ if(APP_KATE==itsThemedApp && widget && widget->tqparentWidget() && widget->tqparentWidget()->tqparentWidget() &&
+ ::tqqt_cast<const TQWidgetStack *>(widget) &&
+ ::tqqt_cast<const TQTabWidget *>(widget->tqparentWidget()) &&
+ ::tqqt_cast<const TQVBox *>(widget->tqparentWidget()->tqparentWidget()))
return 0;
- if ((opts.square&SQUARE_SCROLLVIEW) && widget && ::qt_cast<const QScrollView *>(widget))
+ if ((opts.square&STQUARE_SCROLLVIEW) && widget && ::tqqt_cast<const TQScrollView *>(widget))
return (opts.gtkScrollViews || opts.thinSbarGroove) && !opts.highlightScrollViews ? 1 : 2;
if(DO_EFFECT && opts.etchEntry && widget && !isFormWidget(widget) &&
- (::qt_cast<const QLineEdit *>(widget) || ::qt_cast<const QDateTimeEditBase*>(widget) ||
- ::qt_cast<const QTextEdit*>(widget) || ::qt_cast<const QScrollView*>(widget)))
+ (::tqqt_cast<const TQLineEdit *>(widget) || ::tqqt_cast<const TQDateTimeEditBase*>(widget) ||
+ ::tqqt_cast<const TQTextEdit*>(widget) || ::tqqt_cast<const TQScrollView*>(widget)))
return 3;
else
return 2;
@@ -6790,7 +6795,7 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const QWidget *widget) const
case PM_DockWindowHandleExtent:
return 10;
case PM_SplitterWidth:
- return widget && widget->inherits("QDockWindowResizeHandle")
+ return widget && widget->inherits("TQDockWindowResizeHandle")
? 9
: LINE_1DOT==opts.splitters
? 7
@@ -6807,18 +6812,18 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const QWidget *widget) const
// See KHTML note at top of file
return opts.sliderWidth+
(APP_KPRESENTER==itsThemedApp ||
- ((APP_KONQUEROR==itsThemedApp || APP_KONTACT==itsThemedApp) && (!widget || isFormWidget(widget)))
+ ((APP_KONTQUEROR==itsThemedApp || APP_KONTACT==itsThemedApp) && (!widget || isFormWidget(widget)))
? 1 : 0);
case PM_MaximumDragDistance:
return -1;
case PM_TabBarTabVSpace:
return opts.highlightTab ? 11 : 9;
default:
- return BASE_STYLE::pixelMetric(metric, widget);
+ return BASE_STYLE::tqpixelMetric(metric, widget);
}
}
-int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) const
+int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const
{
switch(kpm)
{
@@ -6829,19 +6834,19 @@ int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) con
}
}
-QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widget,
- const QSize &contentsSize, const QStyleOption &data) const
+TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *widget,
+ const TQSize &contentsSize, const TQStyleOption &data) const
{
switch(contents)
{
case CT_PushButton:
{
- const QPushButton *button(static_cast<const QPushButton *>(widget));
+ const TQPushButton *button(static_cast<const TQPushButton *>(widget));
if (button && !button->text().isEmpty())
{
- int margin(2*pixelMetric(PM_ButtonMargin, widget)),
- mbi(button->isMenuButton() ? pixelMetric(PM_MenuButtonIndicator, widget) : 0),
+ int margin(2*tqpixelMetric(PM_ButtonMargin, widget)),
+ mbi(button->isMenuButton() ? tqpixelMetric(PM_MenuButtonIndicator, widget) : 0),
w(contentsSize.width() + margin + mbi + 16);
// if(button->text()=="...")
@@ -6857,15 +6862,15 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
w=constMinW;
}
- return QSize(w, contentsSize.height() + margin+(DO_EFFECT && !isFormWidget(widget) && !opts.thinnerBtns
+ return TQSize(w, contentsSize.height() + margin+(DO_EFFECT && !isFormWidget(widget) && !opts.thinnerBtns
? 6 : 4));
}
break;
}
case CT_ComboBox:
{
- QSize sz(BASE_STYLE::sizeFromContents(contents, widget, contentsSize, data));
- return QSize(sz.width(), sz.height()+(DO_EFFECT && !isFormWidget(widget) && !opts.thinnerBtns ? 4 : 2));
+ TQSize sz(BASE_STYLE::tqsizeFromContents(contents, widget, contentsSize, data));
+ return TQSize(sz.width(), sz.height()+(DO_EFFECT && !isFormWidget(widget) && !opts.thinnerBtns ? 4 : 2));
}
case CT_PopupMenuItem:
{
@@ -6874,15 +6879,15 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
const int constMinH(opts.thinnerMenuItems ? 25 : 27);
- QMenuItem *mi(data.menuItem());
- const QPopupMenu *popupmenu(static_cast<const QPopupMenu *>(widget));
+ TQMenuItem *mi(data.menuItem());
+ const TQPopupMenu *popupmenu(static_cast<const TQPopupMenu *>(widget));
int maxpmw(data.maxIconWidth()),
w(contentsSize.width()), h(contentsSize.height());
if (mi->custom())
{
- w = mi->custom()->sizeHint().width();
- h = mi->custom()->sizeHint().height();
+ w = mi->custom()->tqsizeHint().width();
+ h = mi->custom()->tqsizeHint().height();
if (!mi->custom()->fullSpan() && h < constMinH)
h = constMinH;
@@ -6900,28 +6905,28 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
if (h < 16)
h = 16;
if (mi->pixmap())
- h = QMAX(h, mi->pixmap()->height());
+ h = TQMAX(h, mi->pixmap()->height());
else if (!mi->text().isNull())
- h = QMAX(h, popupmenu->fontMetrics().height() + 2);
+ h = TQMAX(h, popupmenu->fontMetrics().height() + 2);
if (mi->iconSet()!= 0)
- h = QMAX(h, mi->iconSet()->pixmap(QIconSet::Small, QIconSet::Normal).height());
+ h = TQMAX(h, mi->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal).height());
h+=(opts.thinnerMenuItems ? 2 : 4);
}
// check | 4 pixels | item | 8 pixels | accel | 4 pixels | check
// check is at least 16x16
- maxpmw=QMAX(maxpmw, constMenuPixmapWidth);
+ maxpmw=TQMAX(maxpmw, constMenuPixmapWidth);
w += (maxpmw * 2) + 8;
- if (! mi->text().isNull() && mi->text().find('\t') >= 0)
+ if (! mi->text().isNull() && mi->text().tqfind('\t') >= 0)
w += 8;
- return QSize(w, h);
+ return TQSize(w, h);
}
case CT_SpinBox:
{
- QSize size(BASE_STYLE::sizeFromContents(contents, widget, contentsSize, data));
+ TQSize size(BASE_STYLE::tqsizeFromContents(contents, widget, contentsSize, data));
if(!(size.height()%2))
size.setHeight(size.height()+1);
@@ -6932,17 +6937,17 @@ QSize QtCurveStyle::sizeFromContents(ContentsType contents, const QWidget *widge
return size;
}
case CT_ToolButton:
- if(widget->parent() && ::qt_cast<QToolBar *>(widget->parent()))
- return QSize(contentsSize.width()+8, contentsSize.height()+8);
+ if(widget->tqparent() && ::tqqt_cast<TQToolBar *>(widget->tqparent()))
+ return TQSize(contentsSize.width()+8, contentsSize.height()+8);
default:
break; // Remove compiler warnings...
}
- return BASE_STYLE::sizeFromContents(contents, widget, contentsSize, data);
+ return BASE_STYLE::tqsizeFromContents(contents, widget, contentsSize, data);
}
-int QtCurveStyle::styleHint(StyleHint stylehint, const QWidget *widget, const QStyleOption &option,
- QStyleHintReturn *returnData) const
+int TQtCurveStyle::tqstyleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option,
+ TQStyleHintReturn *returnData) const
{
switch(stylehint)
{
@@ -6966,10 +6971,10 @@ int QtCurveStyle::styleHint(StyleHint stylehint, const QWidget *widget, const QS
if(opts.passwordChar)
{
int chars[4]={opts.passwordChar, 0x25CF, 0x2022, 0};
- const QFontMetrics &fm(widget ? widget->fontMetrics() : QFontMetrics(QFont()));
+ const TQFontMetrics &fm(widget ? widget->fontMetrics() : TQFontMetrics(TQFont()));
for(int i=0; chars[i]; ++i)
- if (fm.inFont(QChar(chars[i])))
+ if (fm.inFont(TQChar(chars[i])))
return chars[i];
return '*';
}
@@ -6984,18 +6989,18 @@ int QtCurveStyle::styleHint(StyleHint stylehint, const QWidget *widget, const QS
case SH_TabBar_Alignment:
return AlignLeft;
default:
- return BASE_STYLE::styleHint(stylehint, widget, option, returnData);
+ return BASE_STYLE::tqstyleHint(stylehint, widget, option, returnData);
}
}
-void QtCurveStyle::drawItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg, bool enabled,
- const QPixmap *pixmap, const QString &text, int len, const QColor *penColor) const
+void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled,
+ const TQPixmap *pixmap, const TQString &text, int len, const TQColor *penColor) const
{
- QRect r2(r);
+ TQRect r2(r);
- if((opts.gbLabel&GB_LBL_BOLD) && text.length() && p->device() && dynamic_cast<QGroupBox *>(p->device()))
+ if((opts.gbLabel&GB_LBL_BOLD) && text.length() && p->device() && dynamic_cast<TQGroupBox *>(p->device()))
{
- QGroupBox *box=static_cast<QGroupBox*>(p->device());
+ TQGroupBox *box=static_cast<TQGroupBox*>(p->device());
if (!box->isCheckable())
{
@@ -7003,17 +7008,17 @@ void QtCurveStyle::drawItem(QPainter *p, const QRect &r, int flags, const QColor
top,
width,
height;
- QFontMetrics fm(p->fontMetrics());
- QRect rb(box->rect());
+ TQFontMetrics fm(p->fontMetrics());
+ TQRect rb(box->rect());
int th(fm.height()+2);
- QFont f(p->font());
+ TQFont f(p->font());
rb.rect(&left, &top, &width, &height);
//rb.coords(&left, &top, &right, &bottom);
f.setBold(true);
- p->setPen(box->colorGroup().foreground());
+ p->setPen(box->tqcolorGroup().foreground());
p->setFont(f);
- p->drawText(QRect(left, top, width, th), (QApplication::reverseLayout()
+ p->drawText(TQRect(left, top, width, th), (TQApplication::reverseLayout()
? AlignRight
: AlignLeft)|AlignVCenter|ShowPrefix|SingleLine,
text);
@@ -7029,8 +7034,8 @@ void QtCurveStyle::drawItem(QPainter *p, const QRect &r, int flags, const QColor
p->setPen(penColor ? *penColor : cg.foreground());
if (pixmap)
{
- QPixmap pm(*pixmap);
- bool clip = (flags&Qt::DontClip) == 0;
+ TQPixmap pm(*pixmap);
+ bool clip = (flags&TQt::DontClip) == 0;
if (clip)
{
if (pm.width() < w && pm.height() < h)
@@ -7038,54 +7043,54 @@ void QtCurveStyle::drawItem(QPainter *p, const QRect &r, int flags, const QColor
else
{
p->save();
- QRegion cr = QRect(x, y, w, h);
+ TQRegion cr = TQRect(x, y, w, h);
if (p->hasClipping())
- cr &= p->clipRegion(QPainter::CoordPainter);
+ cr &= p->clipRegion(TQPainter::CoordPainter);
p->setClipRegion(cr);
}
}
- if ((flags&Qt::AlignVCenter) == Qt::AlignVCenter)
+ if ((flags&TQt::AlignVCenter) == TQt::AlignVCenter)
y += h/2 - pm.height()/2;
- else if ((flags&Qt::AlignBottom) == Qt::AlignBottom)
+ else if ((flags&TQt::AlignBottom) == TQt::AlignBottom)
y += h - pm.height();
- if ((flags&Qt::AlignRight) == Qt::AlignRight)
+ if ((flags&TQt::AlignRight) == TQt::AlignRight)
x += w - pm.width();
- else if ((flags&Qt::AlignHCenter) == Qt::AlignHCenter)
+ else if ((flags&TQt::AlignHCenter) == TQt::AlignHCenter)
x += w/2 - pm.width()/2;
- else if (((flags&Qt::AlignLeft) != Qt::AlignLeft) && QApplication::reverseLayout()) // AlignAuto && rightToLeft
+ else if (((flags&TQt::AlignLeft) != TQt::AlignLeft) && TQApplication::reverseLayout()) // AlignAuto && rightToLeft
x += w - pm.width();
if (!enabled)
{
- if (pm.mask()) // pixmap with a mask
+ if (pm.tqmask()) // pixmap with a tqmask
{
- if (!pm.selfMask()) // mask is not pixmap itself
+ if (!pm.selfMask()) // tqmask is not pixmap itself
{
- QPixmap pmm(*pm.mask());
- pmm.setMask(*((QBitmap *)&pmm));
+ TQPixmap pmm(*pm.tqmask());
+ pmm.setMask(*((TQBitmap *)&pmm));
pm = pmm;
}
}
- else if (pm.depth() == 1) // monochrome pixmap, no mask
+ else if (pm.depth() == 1) // monochrome pixmap, no tqmask
{
- pm.setMask(*((QBitmap *)&pm));
-#ifndef QT_NO_IMAGE_HEURISTIC_MASK
+ pm.setMask(*((TQBitmap *)&pm));
+#ifndef TQT_NO_IMAGE_HEURISTIC_MASK
}
- else // color pixmap, no mask
+ else // color pixmap, no tqmask
{
- QString k;
+ TQString k;
k.sprintf("$qt-drawitem-%x", pm.serialNumber());
- QPixmap *mask = QPixmapCache::find(k);
+ TQPixmap *tqmask = TQPixmapCache::tqfind(k);
bool del=false;
- if (!mask)
+ if (!tqmask)
{
- mask = new QPixmap(pm.createHeuristicMask());
- mask->setMask(*((QBitmap*)mask));
- del = !QPixmapCache::insert(k, mask);
+ tqmask = new TQPixmap(pm.createHeuristicMask());
+ tqmask->setMask(*((TQBitmap*)tqmask));
+ del = !TQPixmapCache::insert(k, tqmask);
}
- pm = *mask;
+ pm = *tqmask;
if (del)
- delete mask;
+ delete tqmask;
#endif
}
p->setPen(cg.text());
@@ -7102,8 +7107,8 @@ void QtCurveStyle::drawItem(QPainter *p, const QRect &r, int flags, const QColor
}
}
-void QtCurveStyle::drawMenuItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg,
- bool mbi, int round, const QColor &bgnd, const QColor *cols) const
+void TQtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg,
+ bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const
{
int fill=opts.useHighlightForMenu && (!mbi || itsHighlightCols==cols) ? ORIGINAL_SHADE : 4,
border=opts.borderMenuitems ? 0 : fill;
@@ -7114,9 +7119,9 @@ void QtCurveStyle::drawMenuItem(QPainter *p, const QRect &r, int flags, const QC
if(!mbi && APPEARANCE_FADE==opts.menuitemAppearance)
{
- bool reverse=QApplication::reverseLayout();
+ bool reverse=TQApplication::reverseLayout();
int roundOffet=ROUNDED ? 1 : 0;
- QRect main(r.x()+(reverse ? 1+MENUITEM_FADE_SIZE : roundOffet+1), r.y()+roundOffet+1,
+ TQRect main(r.x()+(reverse ? 1+MENUITEM_FADE_SIZE : roundOffet+1), r.y()+roundOffet+1,
r.width()-(1+MENUITEM_FADE_SIZE), r.height()-(2+(roundOffet*2))),
fade(reverse ? r.x()+1 : r.width()-MENUITEM_FADE_SIZE, r.y()+1, MENUITEM_FADE_SIZE, r.height()-2);
@@ -7129,7 +7134,7 @@ void QtCurveStyle::drawMenuItem(QPainter *p, const QRect &r, int flags, const QC
cols, WIDGET_MENU_ITEM, false, BORDER_FLAT, false, fill);
}
- QColor bgnd(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
+ TQColor bgnd(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
drawGradient(reverse ? bgnd : cols[fill], reverse ? cols[fill] : bgnd, p, fade, false);
}
else if(mbi || opts.borderMenuitems)
@@ -7145,7 +7150,7 @@ void QtCurveStyle::drawMenuItem(QPainter *p, const QRect &r, int flags, const QC
cols, stdColor, !(mbi && IS_GLASS(opts.menubarAppearance)), WIDGET_MENU_ITEM);
else
{
- QRect fr(r);
+ TQRect fr(r);
fr.addCoords(1, 1, -1, -1);
@@ -7159,19 +7164,19 @@ void QtCurveStyle::drawMenuItem(QPainter *p, const QRect &r, int flags, const QC
drawBevelGradient(cols[fill], p, r, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM);
}
-void QtCurveStyle::drawProgress(QPainter *p, const QRect &rx, const QColorGroup &cg, SFlags flags,
- int round, const QWidget *widget) const
+void TQtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags,
+ int round, const TQWidget *widget) const
{
if(rx.width()<1)
return;
- QRect r=opts.borderProgress
- ? QRect(rx.x()+1, rx.y()+1, rx.width()-2, rx.height()-2)
+ TQRect r=opts.borderProgress
+ ? TQRect(rx.x()+1, rx.y()+1, rx.width()-2, rx.height()-2)
: rx;
int minWidth(3);
bool drawFull(r.width()>minWidth),
drawStripe(r.width()>(minWidth*1.5));
- QRegion outer(r);
+ TQRegion outer(r);
if(r.width()<3)
r.setWidth(3);
@@ -7183,8 +7188,8 @@ void QtCurveStyle::drawProgress(QPainter *p, const QRect &rx, const QColorGroup
if (opts.animatedProgress)
{
// find the animation Offset for the current Widget
- QWidget *nonConstWidget(const_cast<QWidget*>(widget));
- QMapConstIterator<QWidget*, int> it(itsProgAnimWidgets.find(nonConstWidget));
+ TQWidget *nonConstWidget(const_cast<TQWidget*>(widget));
+ TQMapConstIterator<TQWidget*, int> it(itsProgAnimWidgets.tqfind(nonConstWidget));
if (it!=itsProgAnimWidgets.end())
animShift += it.data();
@@ -7198,15 +7203,15 @@ void QtCurveStyle::drawProgress(QPainter *p, const QRect &rx, const QColorGroup
case STRIPE_PLAIN:
for(int offset=0; offset<(r.width()+PROGRESS_CHUNK_WIDTH); offset+=(PROGRESS_CHUNK_WIDTH*2))
{
- QRect r2(r.x()+offset+animShift, r.y(), PROGRESS_CHUNK_WIDTH, r.height());
- QRegion inner(r2);
+ TQRect r2(r.x()+offset+animShift, r.y(), PROGRESS_CHUNK_WIDTH, r.height());
+ TQRegion inner(r2);
outer=outer.eor(inner);
}
break;
case STRIPE_DIAGONAL:
{
- QPointArray a;
+ TQPointArray a;
int shift(r.height());
for(int offset=0; offset<(r.width()+shift+2); offset+=(PROGRESS_CHUNK_WIDTH*2))
@@ -7216,13 +7221,13 @@ void QtCurveStyle::drawProgress(QPainter *p, const QRect &rx, const QColorGroup
(r.x()+offset+animShift+PROGRESS_CHUNK_WIDTH)-shift, r.y()+r.height()-1,
(r.x()+offset+animShift)-shift, r.y()+r.height()-1);
- outer=outer.eor(QRegion(a));
+ outer=outer.eor(TQRegion(a));
}
}
}
}
- const QColor *use=flags&Style_Enabled || ECOLOR_BACKGROUND==opts.progressGrooveColor
+ const TQColor *use=flags&Style_Enabled || ECOLOR_BACKGROUND==opts.progressGrooveColor
? itsProgressCols
? itsProgressCols
: itsHighlightCols
@@ -7242,7 +7247,7 @@ void QtCurveStyle::drawProgress(QPainter *p, const QRect &rx, const QColorGroup
}
if(opts.borderProgress)
- drawBorder(cg.background(), p, r, cg, flags, !(opts.square&SQUARE_PROGRESS) && opts.fillProgress ? ROUNDED_ALL : round,
+ drawBorder(cg.background(), p, r, cg, flags, !(opts.square&STQUARE_PROGRESS) && opts.fillProgress ? ROUNDED_ALL : round,
use, WIDGET_PROGRESSBAR, false, BORDER_FLAT, false, PBAR_BORDER);
else
{
@@ -7253,7 +7258,7 @@ void QtCurveStyle::drawProgress(QPainter *p, const QRect &rx, const QColorGroup
}
}
-void QtCurveStyle::drawBevelGradient(const QColor &base, QPainter *p, const QRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const
+void TQtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const
{
if(IS_FLAT(bevApp) && opts.colorSelTab && sel)
bevApp=APPEARANCE_GRADIENT;
@@ -7272,18 +7277,18 @@ void QtCurveStyle::drawBevelGradient(const QColor &base, QPainter *p, const QRec
WIDGET_NO_ETCH_BTN==w || WIDGET_MENU_BUTTON==w
? bevApp
: APPEARANCE_GRADIENT);
- QRect r(0, 0, horiz ? PIXMAP_DIMENSION : origRect.width(),
+ TQRect r(0, 0, horiz ? PIXMAP_DIMENSION : origRect.width(),
horiz ? origRect.height() : PIXMAP_DIMENSION);
- QString key(createKey(horiz ? r.height() : r.width(), base.rgb(), horiz, app,
+ TQString key(createKey(horiz ? r.height() : r.width(), base.rgb(), horiz, app,
tab && sel && opts.colorSelTab ? CACHE_COL_SEL_TAB : CACHE_STD));
- QPixmap *pix(itsPixmapCache.find(key));
+ TQPixmap *pix(itsPixmapCache.tqfind(key));
bool inCache(true);
if(!pix)
{
- pix=new QPixmap(r.width(), r.height());
+ pix=new TQPixmap(r.width(), r.height());
- QPainter pixPainter(pix);
+ TQPainter pixPainter(pix);
drawBevelGradientReal(base, &pixPainter, r, horiz, sel, app, w);
pixPainter.end();
@@ -7301,7 +7306,7 @@ void QtCurveStyle::drawBevelGradient(const QColor &base, QPainter *p, const QRec
}
}
-void QtCurveStyle::drawBevelGradientReal(const QColor &base, QPainter *p, const QRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const
+void TQtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const
{
const Gradient *grad=getGradient(app, &opts);
@@ -7310,7 +7315,7 @@ void QtCurveStyle::drawBevelGradientReal(const QColor &base, QPainter *p, const
size(horiz ? r.height() : r.width());
bool topTab(WIDGET_TAB_TOP==w),
botTab(WIDGET_TAB_BOT==w);
- QColor prev;
+ TQColor prev;
if(botTab)
{
@@ -7319,13 +7324,13 @@ void QtCurveStyle::drawBevelGradientReal(const QColor &base, QPainter *p, const
for(int i=0; it!=end; ++it, ++i)
{
- QColor col;
+ TQColor col;
int pos((int)(((1.0-(*it).pos)*size)+0.5));
if(sel && 0==i)
col=base;
else
- shade(base, &col, opts.invertBotTab ? QMAX(INVERT_SHADE((*it).val), 0.9) : (*it).val);
+ shade(base, &col, opts.invertBotTab ? TQMAX(INVERT_SHADE((*it).val), 0.9) : (*it).val);
if(/*sel && */opts.colorSelTab && i>0)
col=tint(col, itsHighlightCols[0], (1.0-(*it).pos)*(0.2+TO_ALPHA(opts.colorSelTab)));
@@ -7333,8 +7338,8 @@ void QtCurveStyle::drawBevelGradientReal(const QColor &base, QPainter *p, const
if(i)
drawGradient(prev, col, p,
horiz
- ? QRect(r.x(), lastPos, r.width(), pos-lastPos)
- : QRect(lastPos, r.y(), pos-lastPos, r.height()),
+ ? TQRect(r.x(), lastPos, r.width(), pos-lastPos)
+ : TQRect(lastPos, r.y(), pos-lastPos, r.height()),
horiz);
prev=col;
lastPos=pos;
@@ -7347,13 +7352,13 @@ void QtCurveStyle::drawBevelGradientReal(const QColor &base, QPainter *p, const
for(int i=0; it!=end; ++it, ++i)
{
- QColor col;
+ TQColor col;
int pos((int)(((*it).pos*size)+0.5));
if(/*sel && */topTab && i==numStops-1)
col=base;
else
- shade(base, &col, WIDGET_TAB_BOT==w ? QMAX((*it).val, 0.9) : (*it).val);
+ shade(base, &col, WIDGET_TAB_BOT==w ? TQMAX((*it).val, 0.9) : (*it).val);
if(sel && opts.colorSelTab && topTab && i<numStops-1)
col=tint(col, itsHighlightCols[0], (1.0-(*it).pos)*(0.2+TO_ALPHA(opts.colorSelTab)));
@@ -7361,8 +7366,8 @@ void QtCurveStyle::drawBevelGradientReal(const QColor &base, QPainter *p, const
if(i)
drawGradient(prev, col, p,
horiz
- ? QRect(r.x(), lastPos, r.width(), pos-lastPos)
- : QRect(lastPos, r.y(), pos-lastPos, r.height()),
+ ? TQRect(r.x(), lastPos, r.width(), pos-lastPos)
+ : TQRect(lastPos, r.y(), pos-lastPos, r.height()),
horiz);
prev=col;
lastPos=pos;
@@ -7370,8 +7375,8 @@ void QtCurveStyle::drawBevelGradientReal(const QColor &base, QPainter *p, const
}
}
-void QtCurveStyle::drawGradient(const QColor &top, const QColor &bot,
- QPainter *p, QRect const &r, bool horiz) const
+void TQtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot,
+ TQPainter *p, TQRect const &r, bool horiz) const
{
if(r.width()>0 && r.height()>0)
{
@@ -7399,7 +7404,7 @@ void QtCurveStyle::drawGradient(const QColor &top, const QColor &bot,
{
for (i=0; i < size; i++)
{
- p->setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p->setPen(TQColor(rl>>16, gl>>16, bl>>16));
p->drawLine(rx, ry+i, rx2, ry+i);
rl += dr;
gl += dg;
@@ -7409,7 +7414,7 @@ void QtCurveStyle::drawGradient(const QColor &top, const QColor &bot,
else
for(i=0; i < size; i++)
{
- p->setPen(QColor(rl>>16, gl>>16, bl>>16));
+ p->setPen(TQColor(rl>>16, gl>>16, bl>>16));
p->drawLine(rx+i, ry, rx+i, ry2);
rl += dr;
gl += dg;
@@ -7419,12 +7424,12 @@ void QtCurveStyle::drawGradient(const QColor &top, const QColor &bot,
}
}
-void QtCurveStyle::drawSbSliderHandle(QPainter *p, const QRect &orig, const QColorGroup &cg,
+void TQtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const TQColorGroup &cg,
SFlags flags, bool slider) const
{
int min(MIN_SLIDER_SIZE(opts.sliderThumbs));
- const QColor *use(sliderColors(/*cg, */flags));
- QRect r(orig);
+ const TQColor *use(sliderColors(/*cg, */flags));
+ TQRect r(orig);
// EShade shade(opts.shadeSliders);
if(flags&(Style_Sunken|Style_Down))
@@ -7434,16 +7439,16 @@ void QtCurveStyle::drawSbSliderHandle(QPainter *p, const QRect &orig, const QCol
flags|=Style_Horizontal;
flags|=Style_Raised;
- drawLightBevel(p, r, cg, flags, (slider && !(opts.square&SQUARE_SLIDER))
+ drawLightBevel(p, r, cg, flags, (slider && !(opts.square&STQUARE_SLIDER))
#ifndef SIMPLE_SCROLLBARS
- || (!slider && !(opts.square&SQUARE_SB_SLIDER) && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons))
+ || (!slider && !(opts.square&STQUARE_SB_SLIDER) && (SCROLLBAR_NONE==opts.scrollbarType || opts.flatSbarButtons))
#endif
? ROUNDED_ALL : ROUNDED_NONE,
getFill(flags, use, false, SHADE_DARKEN==opts.shadeSliders), use, true, false, WIDGET_SB_SLIDER);
if(LINE_NONE!=opts.sliderThumbs && (slider || ((flags & Style_Horizontal && r.width()>=min)|| r.height()>=min)))
{
- const QColor *markers(/*opts.coloredMouseOver && flags&Style_MouseOver
+ const TQColor *markers(/*opts.coloredMouseOver && flags&Style_MouseOver
? itsMouseOverCols
: */use);
bool horiz(flags&Style_Horizontal);
@@ -7474,18 +7479,18 @@ void QtCurveStyle::drawSbSliderHandle(QPainter *p, const QRect &orig, const QCol
}
}
-void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGroup &cg,
- SFlags flags, QSlider *slider, bool tb) const
+void TQtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ SFlags flags, TQSlider *slider, bool tb) const
{
bool horiz(SLIDER_TRIANGULAR==opts.sliderStyle ? r.height()>r.width() : r.width()>r.height());
if(SLIDER_TRIANGULAR==opts.sliderStyle || ((SLIDER_ROUND==opts.sliderStyle || SLIDER_ROUND_ROTATED==opts.sliderStyle) && FULLLY_ROUNDED))
{
- const QColor *use(sliderColors(/*cg, */flags)),
+ const TQColor *use(sliderColors(/*cg, */flags)),
*border(flags&Style_MouseOver && (MO_GLOW==opts.coloredMouseOver ||
MO_COLORED==opts.coloredMouseOver)
? itsMouseOverCols : use);
- const QColor &fill(getFill(flags, use, false, SHADE_DARKEN==opts.shadeSliders));
+ const TQColor &fill(getFill(flags, use, false, SHADE_DARKEN==opts.shadeSliders));
int x(r.x()),
y(r.y()),
xo(horiz ? 8 : 0),
@@ -7503,7 +7508,7 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
else
x++;
- QPointArray clipRegion;
+ TQPointArray clipRegion;
p->save();
if(SLIDER_TRIANGULAR==opts.sliderStyle)
@@ -7511,12 +7516,12 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
if(slider)
switch(slider->tickmarks())
{
- case QSlider::Both:
- case QSlider::NoMarks:
- case QSlider::Below:
+ case TQSlider::Both:
+ case TQSlider::NoMarks:
+ case TQSlider::Below:
direction=horiz ? PE_ArrowDown : PE_ArrowRight;
break;
- case QSlider::Above:
+ case TQSlider::Above:
direction=horiz ? PE_ArrowUp : PE_ArrowLeft;
}
@@ -7545,8 +7550,8 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
x+12+xo, y+4, x+12+xo, y+8+yo, x+8+xo, y+12+yo, x+4, y+12+yo);
if(!tb)
- p->fillRect(QRect(x, y, r.width()-(horiz ? 0 : 2), r.height()-(horiz ? 2 : 0)), cg.background());
- p->setClipRegion(QRegion(clipRegion)); // , QPainter::CoordPainter);
+ p->fillRect(TQRect(x, y, r.width()-(horiz ? 0 : 2), r.height()-(horiz ? 2 : 0)), cg.background());
+ p->setClipRegion(TQRegion(clipRegion)); // , TQPainter::CoordPainter);
if(IS_FLAT(opts.sliderAppearance))
{
p->fillRect(r, fill);
@@ -7557,19 +7562,19 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
if(horiz)
{
- p->fillRect(QRect(x+1, y+1, len, size-2), itsMouseOverCols[col]);
- p->fillRect(QRect(x+r.width()-(1+len), y+1, len, r.height()-2), itsMouseOverCols[col]);
+ p->fillRect(TQRect(x+1, y+1, len, size-2), itsMouseOverCols[col]);
+ p->fillRect(TQRect(x+r.width()-(1+len), y+1, len, r.height()-2), itsMouseOverCols[col]);
}
else
{
- p->fillRect(QRect(x+1, y+1, size-2, len), itsMouseOverCols[col]);
- p->fillRect(QRect(x+1, y+r.height()-(1+len), r.width()-2, len), itsMouseOverCols[col]);
+ p->fillRect(TQRect(x+1, y+1, size-2, len), itsMouseOverCols[col]);
+ p->fillRect(TQRect(x+1, y+r.height()-(1+len), r.width()-2, len), itsMouseOverCols[col]);
}
}
}
else
{
- drawBevelGradient(fill, p, QRect(x, y, horiz ? r.width()-1 : size, horiz ? size : r.height()-1),
+ drawBevelGradient(fill, p, TQRect(x, y, horiz ? r.width()-1 : size, horiz ? size : r.height()-1),
horiz, false, opts.sliderAppearance);
if(MO_PLASTIK==opts.coloredMouseOver && flags&Style_MouseOver && !opts.colorSliderMouseOver)
@@ -7579,19 +7584,19 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
if(horiz)
{
- drawBevelGradient(itsMouseOverCols[col], p, QRect(x+1, y+1, len, size-2),
+ drawBevelGradient(itsMouseOverCols[col], p, TQRect(x+1, y+1, len, size-2),
horiz, false, opts.sliderAppearance);
drawBevelGradient(itsMouseOverCols[col], p,
- QRect(x+r.width()-((SLIDER_ROUND_ROTATED==opts.sliderStyle ? 3 : 1)+len),
+ TQRect(x+r.width()-((SLIDER_ROUND_ROTATED==opts.sliderStyle ? 3 : 1)+len),
y+1, len, size-2),
horiz, false, opts.sliderAppearance);
}
else
{
- drawBevelGradient(itsMouseOverCols[col], p, QRect(x+1, y+1, size-2, len),
+ drawBevelGradient(itsMouseOverCols[col], p, TQRect(x+1, y+1, size-2, len),
horiz, false, opts.sliderAppearance);
drawBevelGradient(itsMouseOverCols[col], p,
- QRect(x+1, y+r.height()-((SLIDER_ROUND_ROTATED==opts.sliderStyle ? 3 : 1)+len),
+ TQRect(x+1, y+r.height()-((SLIDER_ROUND_ROTATED==opts.sliderStyle ? 3 : 1)+len),
size-2, len),
horiz, false, opts.sliderAppearance);
}
@@ -7602,7 +7607,7 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
if(SLIDER_TRIANGULAR==opts.sliderStyle)
{
- QPointArray aa,
+ TQPointArray aa,
light;
switch(direction)
@@ -7647,7 +7652,7 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
}
else
{
- QRect sr(r);
+ TQRect sr(r);
if(!ROTATED_SLIDER)
if(horiz)
@@ -7659,13 +7664,13 @@ void QtCurveStyle::drawSliderHandle(QPainter *p, const QRect &r, const QColorGro
}
}
-void QtCurveStyle::drawSliderGroove(QPainter *p, const QRect &r, const QColorGroup &cg,
- SFlags flags, const QWidget *widget) const
+void TQtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ SFlags flags, const TQWidget *widget) const
{
- const QSlider *sliderWidget((const QSlider *)widget);
- QRect groove(r);
+ const TQSlider *sliderWidget((const TQSlider *)widget);
+ TQRect groove(r);
bool horiz(Qt::Horizontal==sliderWidget->orientation()),
- reverse(QApplication::reverseLayout());
+ reverse(TQApplication::reverseLayout());
flags&=~Style_MouseOver;
if(horiz)
@@ -7686,20 +7691,20 @@ void QtCurveStyle::drawSliderGroove(QPainter *p, const QRect &r, const QColorGro
groove.addCoords(-1, 0, 1, 0);
}
- drawLightBevel(p, groove, cg, flags, opts.square&SQUARE_SLIDER ? ROUNDED_NONE : ROUNDED_ALL,
+ drawLightBevel(p, groove, cg, flags, opts.square&STQUARE_SLIDER ? ROUNDED_NONE : ROUNDED_ALL,
itsBackgroundCols[flags&Style_Enabled ? 2 : ORIGINAL_SHADE],
itsBackgroundCols, true, true, WIDGET_SLIDER_TROUGH);
if(opts.fillSlider && (horiz ? sliderWidget->value()>0 : sliderWidget->value()<sliderWidget->maxValue()) &&
sliderWidget->maxValue()!=sliderWidget->minValue() && flags&Style_Enabled)
{
- QRect used(groove);
+ TQRect used(groove);
int pos((int)(((double)(horiz ? groove.width() : groove.height()) /
(sliderWidget->maxValue()-sliderWidget->minValue())) *
(sliderWidget->value() - sliderWidget->minValue())));
if(pos>0)
{
- const QColor *usedCols=itsSliderCols ? itsSliderCols : itsHighlightCols;
+ const TQColor *usedCols=itsSliderCols ? itsSliderCols : itsHighlightCols;
if(horiz)
{
@@ -7715,21 +7720,21 @@ void QtCurveStyle::drawSliderGroove(QPainter *p, const QRect &r, const QColorGro
used.addCoords(0, pos, 0, 0);
}
if(used.height()>0 && used.width()>0)
- drawLightBevel(p, used, cg, flags, opts.square&SQUARE_SLIDER ? ROUNDED_NONE : ROUNDED_ALL,
+ drawLightBevel(p, used, cg, flags, opts.square&STQUARE_SLIDER ? ROUNDED_NONE : ROUNDED_ALL,
usedCols[ORIGINAL_SHADE], usedCols, true, true, WIDGET_FILLED_SLIDER_TROUGH);
}
}
}
-void QtCurveStyle::drawMenuOrToolBarBackground(QPainter *p, const QRect &r, const QColorGroup &cg,
+void TQtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
bool menu, bool horiz) const
{
if(menu && APPEARANCE_STRIPED==opts.bgndAppearance && IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars)
return;
- QRect rx(r);
+ TQRect rx(r);
EAppearance app(menu ? opts.menubarAppearance : opts.toolbarAppearance);
- QColor color(menu ? menuColors(cg, itsActive)[ORIGINAL_SHADE] : cg.background());
+ TQColor color(menu ? menuColors(cg, itsActive)[ORIGINAL_SHADE] : cg.background());
if(menu && BLEND_TITLEBAR)
rx.addCoords(0, -qtcGetWindowBorderSize().titleHeight, 0, 0);
@@ -7737,7 +7742,7 @@ void QtCurveStyle::drawMenuOrToolBarBackground(QPainter *p, const QRect &r, cons
drawBevelGradient(color, p, rx, horiz, false, app);
}
-void QtCurveStyle::drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags, bool tb,
+void TQtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb,
ELine handles) const
{
if(r.width()<2 || r.height()<2)
@@ -7747,7 +7752,7 @@ void QtCurveStyle::drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags,
// flags|=Style_MouseOver;
flags&=~Style_MouseOver; // Dont mouse-over handles - we dont do this for KDE4...
- const QColor *border(borderColors(flags, itsBackgroundCols));
+ const TQColor *border(borderColors(flags, itsBackgroundCols));
switch(handles)
{
@@ -7764,14 +7769,14 @@ void QtCurveStyle::drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags,
case LINE_DASHES:
if(flags&Style_Horizontal)
{
- QRect r1(r.x()+(tb ? 2 : (r.width()-6)/2), r.y(), 3, r.height());
+ TQRect r1(r.x()+(tb ? 2 : (r.width()-6)/2), r.y(), 3, r.height());
drawLines(p, r1, true, (r.height()-8)/2,
tb ? 0 : (r.width()-5)/2, border, 0, 5, handles);
}
else
{
- QRect r1(r.x(), r.y()+(tb ? 2 : (r.height()-6)/2), r.width(), 3);
+ TQRect r1(r.x(), r.y()+(tb ? 2 : (r.height()-6)/2), r.width(), 3);
drawLines(p, r1, false, (r.width()-8)/2,
tb ? 0 : (r.height()-5)/2, border, 0, 5, handles);
@@ -7789,10 +7794,10 @@ void QtCurveStyle::drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags,
}
}
-void QtCurveStyle::drawHighlight(QPainter *p, const QRect &r, const QColorGroup &cg, bool horiz, bool inc) const
+void TQtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const
{
- QColor col1(midColor(cg.background(), itsMouseOverCols[ORIGINAL_SHADE]));
- QRect r2(r);
+ TQColor col1(midColor(cg.background(), itsMouseOverCols[ORIGINAL_SHADE]));
+ TQRect r2(r);
p->setPen(inc ? col1 : itsMouseOverCols[ORIGINAL_SHADE]);
p->drawLine(r2.x(), r2.y(), r2.x()+(horiz ? r2.width()-1 : 0), r2.y()+(horiz ? 0 : r2.height()-1));
@@ -7801,7 +7806,7 @@ void QtCurveStyle::drawHighlight(QPainter *p, const QRect &r, const QColorGroup
p->drawLine(r2.x(), r2.y(), r2.x()+(horiz ? r2.width()-1 : 0), r2.y()+(horiz ? 0 : r2.height()-1));
}
-void QtCurveStyle::shadeColors(const QColor &base, QColor *vals) const
+void TQtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const
{
SHADES
@@ -7817,7 +7822,7 @@ void QtCurveStyle::shadeColors(const QColor &base, QColor *vals) const
vals[ORIGINAL_SHADE]=base;
}
-const QColor * QtCurveStyle::buttonColors(const QColorGroup &cg) const
+const TQColor * TQtCurveStyle::buttonColors(const TQColorGroup &cg) const
{
if(cg.button()!=itsButtonCols[ORIGINAL_SHADE])
{
@@ -7828,14 +7833,14 @@ const QColor * QtCurveStyle::buttonColors(const QColorGroup &cg) const
return itsButtonCols;
}
-const QColor * QtCurveStyle::checkRadioColors(const QColorGroup &cg, SFlags flags) const
+const TQColor * TQtCurveStyle::checkRadioColors(const TQColorGroup &cg, SFlags flags) const
{
return opts.crColor && flags&Style_Enabled && (flags&Style_On || !(flags&Style_Off))
? itsCheckRadioSelCols
: buttonColors(cg);
}
-const QColor * QtCurveStyle::sliderColors(/*const QColorGroup &cg, */ SFlags flags) const
+const TQColor * TQtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags flags) const
{
return (flags&Style_Enabled)
? SHADE_NONE!=opts.shadeSliders &&itsSliderCols && (!opts.colorSliderMouseOver || flags&Style_MouseOver)
@@ -7844,7 +7849,7 @@ const QColor * QtCurveStyle::sliderColors(/*const QColorGroup &cg, */ SFlags fla
: itsBackgroundCols;
}
-const QColor * QtCurveStyle::backgroundColors(const QColor &c) const
+const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const
{
if(c!=itsBackgroundCols[ORIGINAL_SHADE])
{
@@ -7855,13 +7860,13 @@ const QColor * QtCurveStyle::backgroundColors(const QColor &c) const
return itsBackgroundCols;
}
-const QColor * QtCurveStyle::borderColors(SFlags flags, const QColor *use) const
+const TQColor * TQtCurveStyle::borderColors(SFlags flags, const TQColor *use) const
{
return itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver
? itsMouseOverCols : use;
}
-const QColor * QtCurveStyle::getSidebarButtons() const
+const TQColor * TQtCurveStyle::getSidebarButtons() const
{
if(!itsSidebarButtonsCols)
{
@@ -7871,7 +7876,7 @@ const QColor * QtCurveStyle::getSidebarButtons() const
itsSidebarButtonsCols=itsDefBtnCols;
else
{
- itsSidebarButtonsCols=new QColor [TOTAL_SHADES+1];
+ itsSidebarButtonsCols=new TQColor [TOTAL_SHADES+1];
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]),
itsSidebarButtonsCols);
}
@@ -7880,12 +7885,12 @@ const QColor * QtCurveStyle::getSidebarButtons() const
return itsSidebarButtonsCols;
}
-void QtCurveStyle::setMenuColors(const QColorGroup &cg)
+void TQtCurveStyle::setMenuColors(const TQColorGroup &cg)
{
switch(opts.shadeMenubars)
{
case SHADE_NONE:
- memcpy(itsMenubarCols, itsBackgroundCols, sizeof(QColor)*(TOTAL_SHADES+1));
+ memcpy(itsMenubarCols, itsBackgroundCols, sizeof(TQColor)*(TOTAL_SHADES+1));
break;
case SHADE_BLEND_SELECTED:
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsBackgroundCols[ORIGINAL_SHADE]), itsMenubarCols);
@@ -7907,7 +7912,7 @@ void QtCurveStyle::setMenuColors(const QColorGroup &cg)
}
}
-const QColor * QtCurveStyle::menuColors(const QColorGroup &cg, bool active) const
+const TQColor * TQtCurveStyle::menuColors(const TQColorGroup &cg, bool active) const
{
return SHADE_WINDOW_BORDER==opts.shadeMenubars
? getMdiColors(cg, active)
@@ -7916,7 +7921,7 @@ const QColor * QtCurveStyle::menuColors(const QColorGroup &cg, bool active) cons
: itsMenubarCols;
}
-void QtCurveStyle::setDecorationColors(bool init)
+void TQtCurveStyle::setDecorationColors(bool init)
{
if(!readKdeGlobals() && !init)
return;
@@ -7924,13 +7929,13 @@ void QtCurveStyle::setDecorationColors(bool init)
if(opts.coloredMouseOver)
{
if(!itsMouseOverCols)
- itsMouseOverCols=new QColor [TOTAL_SHADES+1];
+ itsMouseOverCols=new TQColor [TOTAL_SHADES+1];
shadeColors(kdeSettings.hover, itsMouseOverCols);
}
shadeColors(kdeSettings.focus, itsFocusCols);
}
-const QColor * QtCurveStyle::getMdiColors(const QColorGroup &cg, bool active) const
+const TQColor * TQtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) const
{
if(!itsActiveMdiColors)
{
@@ -7938,52 +7943,52 @@ const QColor * QtCurveStyle::getMdiColors(const QColorGroup &cg, bool active) co
itsMdiTextColor=cg.text();
// Try to read kwin's settings...
- if(useQt3Settings())
+ if(useTQt3Settings())
{
- QFile f(QDir::homeDirPath()+"/.qt/qtrc");
+ TQFile f(TQDir::homeDirPath()+"/.qt/qtrc");
if(f.open(IO_ReadOnly))
{
- QTextStream in(&f);
+ TQTextStream in(&f);
bool inPal(false);
while (!in.atEnd())
{
- QString line(in.readLine());
+ TQString line(in.readLine());
if(inPal)
{
- if(!itsActiveMdiColors && 0==line.find("activeBackground=#", false))
+ if(!itsActiveMdiColors && 0==line.tqfind("activeBackground=#", false))
{
- QColor col;
+ TQColor col;
setRgb(&col, line.mid(17).latin1());
if(col!=itsBackgroundCols[ORIGINAL_SHADE])
{
- itsActiveMdiColors=new QColor [TOTAL_SHADES+1];
+ itsActiveMdiColors=new TQColor [TOTAL_SHADES+1];
shadeColors(col, itsActiveMdiColors);
}
}
- else if(!itsMdiColors && 0==line.find("inactiveBackground=#", false))
+ else if(!itsMdiColors && 0==line.tqfind("inactiveBackground=#", false))
{
- QColor col;
+ TQColor col;
setRgb(&col, line.mid(19).latin1());
if(col!=itsBackgroundCols[ORIGINAL_SHADE])
{
- itsMdiColors=new QColor [TOTAL_SHADES+1];
+ itsMdiColors=new TQColor [TOTAL_SHADES+1];
shadeColors(col, itsMdiColors);
}
}
- else if(0==line.find("activeForeground=#", false))
+ else if(0==line.tqfind("activeForeground=#", false))
setRgb(&itsActiveMdiTextColor, line.mid(17).latin1());
- else if(0==line.find("inactiveForeground=#", false))
+ else if(0==line.tqfind("inactiveForeground=#", false))
setRgb(&itsMdiTextColor, line.mid(19).latin1());
- else if (-1!=line.find('['))
+ else if (-1!=line.tqfind('['))
break;
}
- else if(0==line.find("[KWinPalette]", false))
+ else if(0==line.tqfind("[KWinPalette]", false))
inPal=true;
}
f.close();
@@ -7991,50 +7996,50 @@ const QColor * QtCurveStyle::getMdiColors(const QColorGroup &cg, bool active) co
}
else // KDE4
{
- QFile f(kdeHome(false)+"/share/config/kdeglobals");
+ TQFile f(kdeHome(false)+"/share/config/kdeglobals");
if(f.open(IO_ReadOnly))
{
- QTextStream in(&f);
+ TQTextStream in(&f);
bool inPal(false);
while (!in.atEnd())
{
- QString line(in.readLine());
+ TQString line(in.readLine());
if(inPal)
{
- if(!itsActiveMdiColors && 0==line.find("activeBackground=", false))
+ if(!itsActiveMdiColors && 0==line.tqfind("activeBackground=", false))
{
- QColor col;
+ TQColor col;
- setRgb(&col, QStringList::split(",", line.mid(17)));
+ setRgb(&col, TQStringList::split(",", line.mid(17)));
if(col!=itsBackgroundCols[ORIGINAL_SHADE])
{
- itsActiveMdiColors=new QColor [TOTAL_SHADES+1];
+ itsActiveMdiColors=new TQColor [TOTAL_SHADES+1];
shadeColors(col, itsActiveMdiColors);
}
}
- else if(!itsMdiColors && 0==line.find("inactiveBackground=", false))
+ else if(!itsMdiColors && 0==line.tqfind("inactiveBackground=", false))
{
- QColor col;
+ TQColor col;
- setRgb(&col, QStringList::split(",", line.mid(19)));
+ setRgb(&col, TQStringList::split(",", line.mid(19)));
if(col!=itsBackgroundCols[ORIGINAL_SHADE])
{
- itsMdiColors=new QColor [TOTAL_SHADES+1];
+ itsMdiColors=new TQColor [TOTAL_SHADES+1];
shadeColors(col, itsMdiColors);
}
}
- else if(0==line.find("activeForeground=", false))
- setRgb(&itsActiveMdiTextColor, QStringList::split(",", line.mid(17)));
- else if(0==line.find("inactiveForeground=", false))
- setRgb(&itsMdiTextColor, QStringList::split(",", line.mid(19)));
- else if (-1!=line.find('['))
+ else if(0==line.tqfind("activeForeground=", false))
+ setRgb(&itsActiveMdiTextColor, TQStringList::split(",", line.mid(17)));
+ else if(0==line.tqfind("inactiveForeground=", false))
+ setRgb(&itsMdiTextColor, TQStringList::split(",", line.mid(19)));
+ else if (-1!=line.tqfind('['))
break;
}
- else if(0==line.find("[WM]", false))
+ else if(0==line.tqfind("[WM]", false))
inPal=true;
}
f.close();
@@ -8046,16 +8051,16 @@ const QColor * QtCurveStyle::getMdiColors(const QColorGroup &cg, bool active) co
opts.shadeMenubarOnlyWhenActive=false;
if(!itsActiveMdiColors)
- itsActiveMdiColors=(QColor *)itsBackgroundCols;
+ itsActiveMdiColors=(TQColor *)itsBackgroundCols;
if(!itsMdiColors)
- itsMdiColors=(QColor *)itsBackgroundCols;
+ itsMdiColors=(TQColor *)itsBackgroundCols;
}
return active ? itsActiveMdiColors : itsMdiColors;
}
#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
-void QtCurveStyle::readMdiPositions() const
+void TQtCurveStyle::readMdiPositions() const
{
if(0==itsMdiButtons[0].size() && 0==itsMdiButtons[1].size())
{
@@ -8070,33 +8075,33 @@ void QtCurveStyle::readMdiPositions() const
itsMdiButtons[1].append(SC_TitleBarCloseButton);
// Read in KWin settings...
- QFile f(kdeHome(useQt3Settings())+"/share/config/kwinrc");
+ TQFile f(kdeHome(useTQt3Settings())+"/share/config/kwinrc");
if(f.open(IO_ReadOnly))
{
- QTextStream in(&f);
+ TQTextStream in(&f);
bool inStyle(false);
while (!in.atEnd())
{
- QString line(in.readLine());
+ TQString line(in.readLine());
if(inStyle)
{
- if(0==line.find("ButtonsOnLeft=", false))
+ if(0==line.tqfind("ButtonsOnLeft=", false))
{
itsMdiButtons[0].clear();
parseWindowLine(line.mid(14), itsMdiButtons[0]);
}
- else if(0==line.find("ButtonsOnRight=", false))
+ else if(0==line.tqfind("ButtonsOnRight=", false))
{
itsMdiButtons[1].clear();
parseWindowLine(line.mid(15), itsMdiButtons[1]);
}
- else if (-1!=line.find('['))
+ else if (-1!=line.tqfind('['))
break;
}
- else if(0==line.find("[Style]", false))
+ else if(0==line.tqfind("[Style]", false))
inStyle=true;
}
f.close();
@@ -8113,14 +8118,14 @@ void QtCurveStyle::readMdiPositions() const
int minPos=itsMdiButtons[1].findIndex(SC_TitleBarMinButton);
maxPos=itsMdiButtons[1].findIndex(SC_TitleBarMaxButton);
- itsMdiButtons[1].insert(itsMdiButtons[1].find(minPos<maxPos ? (minPos==-1 ? 0 : minPos)
+ itsMdiButtons[1].insert(itsMdiButtons[1].tqfind(minPos<maxPos ? (minPos==-1 ? 0 : minPos)
: (maxPos==-1 ? 0 : maxPos)), SC_TitleBarShadeButton);
}
else // Add to left button
{
int minPos=itsMdiButtons[0].findIndex(SC_TitleBarMinButton);
- itsMdiButtons[1].insert(itsMdiButtons[1].find(minPos>maxPos ? (minPos==-1 ? 0 : minPos)
+ itsMdiButtons[1].insert(itsMdiButtons[1].tqfind(minPos>maxPos ? (minPos==-1 ? 0 : minPos)
: (maxPos==-1 ? 0 : maxPos)), SC_TitleBarShadeButton);
}
}
@@ -8128,51 +8133,51 @@ void QtCurveStyle::readMdiPositions() const
}
#endif
-bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
+bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
{
if(!itsHoverWidget || !itsHoverWidget->isShown() || !itsHoverWidget->isVisible())
return false;
-#if QT_VERSION >= 0x030200
+#if 0x039999 >= 0x030200
//
- // Qt>=3.2 sets the sensitive part of a check/radio to the image + label -> anything else
+ // TQt>=3.2 sets the sensitive part of a check/radio to the image + label -> anything else
// is not sensitive. But, the widget can ocupy a larger area - and this whole area will
// react to mouse over. This needs to be counteracted so that it looks as if only the
// sensitive area mouse-overs...
- QRadioButton *rb(::qt_cast<QRadioButton *>(itsHoverWidget));
+ TQRadioButton *rb(::tqqt_cast<TQRadioButton *>(itsHoverWidget));
if(rb)
{
- QRect rect(0, 0,
- visualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+
- pixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height());
+ TQRect rect(0, 0,
+ tqvisualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+
+ tqpixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height());
- itsHover=rect.contains(pos) ? HOVER_RADIO : HOVER_NONE;
- return (HOVER_NONE!=itsHover && !rect.contains(itsOldPos)) ||
- (HOVER_NONE==itsHover && rect.contains(itsOldPos));
+ itsHover=rect.tqcontains(pos) ? HOVER_RADIO : HOVER_NONE;
+ return (HOVER_NONE!=itsHover && !rect.tqcontains(itsOldPos)) ||
+ (HOVER_NONE==itsHover && rect.tqcontains(itsOldPos));
}
else
{
- QCheckBox *cb(::qt_cast<QCheckBox *>(itsHoverWidget));
+ TQCheckBox *cb(::tqqt_cast<TQCheckBox *>(itsHoverWidget));
if(cb)
{
- QRect rect(0, 0,
- visualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+
- pixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height());
+ TQRect rect(0, 0,
+ tqvisualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+
+ tqpixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height());
- itsHover=rect.contains(pos) ? HOVER_CHECK : HOVER_NONE;
- return (HOVER_NONE!=itsHover && !rect.contains(itsOldPos)) || (HOVER_NONE==itsHover && rect.contains(itsOldPos));
+ itsHover=rect.tqcontains(pos) ? HOVER_CHECK : HOVER_NONE;
+ return (HOVER_NONE!=itsHover && !rect.tqcontains(itsOldPos)) || (HOVER_NONE==itsHover && rect.tqcontains(itsOldPos));
}
else
{
#endif
- QScrollBar *sb(::qt_cast<QScrollBar *>(itsHoverWidget));
+ TQScrollBar *sb(::tqqt_cast<TQScrollBar *>(itsHoverWidget));
if(sb) // So, are we over add button, sub button, slider, or none?
{
bool useThreeButtonScrollBar(SCROLLBAR_KDE==opts.scrollbarType);
- QRect subline(querySubControlMetrics(CC_ScrollBar, itsHoverWidget,
+ TQRect subline(querySubControlMetrics(CC_ScrollBar, itsHoverWidget,
SC_ScrollBarSubLine)),
addline(querySubControlMetrics(CC_ScrollBar, itsHoverWidget,
SC_ScrollBarAddLine)),
@@ -8186,33 +8191,33 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
else
subline2.moveBy(0, -addline.height());
- if(slider.contains(pos))
+ if(slider.tqcontains(pos))
itsHover=HOVER_SB_SLIDER;
- else if(subline.contains(pos))
+ else if(subline.tqcontains(pos))
itsHover=HOVER_SB_SUB;
- else if(addline.contains(pos))
+ else if(addline.tqcontains(pos))
itsHover=HOVER_SB_ADD;
- else if(subline2.contains(pos))
+ else if(subline2.tqcontains(pos))
itsHover=HOVER_SB_SUB2;
else
itsHover=HOVER_NONE;
- return (HOVER_SB_SLIDER==itsHover && !slider.contains(itsOldPos)) ||
- (HOVER_SB_SLIDER!=itsHover && slider.contains(itsOldPos)) ||
- (HOVER_SB_SUB==itsHover && !subline.contains(itsOldPos)) ||
- (HOVER_SB_SUB!=itsHover && subline.contains(itsOldPos)) ||
+ return (HOVER_SB_SLIDER==itsHover && !slider.tqcontains(itsOldPos)) ||
+ (HOVER_SB_SLIDER!=itsHover && slider.tqcontains(itsOldPos)) ||
+ (HOVER_SB_SUB==itsHover && !subline.tqcontains(itsOldPos)) ||
+ (HOVER_SB_SUB!=itsHover && subline.tqcontains(itsOldPos)) ||
(useThreeButtonScrollBar &&
- (HOVER_SB_SUB2==itsHover && !subline2.contains(itsOldPos)) ||
- (HOVER_SB_SUB2!=itsHover && subline2.contains(itsOldPos))) ||
+ (HOVER_SB_SUB2==itsHover && !subline2.tqcontains(itsOldPos)) ||
+ (HOVER_SB_SUB2!=itsHover && subline2.tqcontains(itsOldPos))) ||
- (HOVER_SB_ADD==itsHover && !addline.contains(itsOldPos)) ||
- (HOVER_SB_ADD!=itsHover && addline.contains(itsOldPos));
+ (HOVER_SB_ADD==itsHover && !addline.tqcontains(itsOldPos)) ||
+ (HOVER_SB_ADD!=itsHover && addline.tqcontains(itsOldPos));
}
else
{
#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
- QToolButton *tb(::qt_cast<QToolButton *>(itsHoverWidget));
+ TQToolButton *tb(::tqqt_cast<TQToolButton *>(itsHoverWidget));
if(tb)
{
@@ -8222,7 +8227,7 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
else
#endif
{
- QHeader *hd(::qt_cast<QHeader *>(itsHoverWidget));
+ TQHeader *hd(::tqqt_cast<TQHeader *>(itsHoverWidget));
if(hd)
{
@@ -8230,24 +8235,24 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
// sections...
// and the ones that aren't clickable should not highlight on mouse over!
- QRect rect(0, 0, itsHoverWidget->width(), itsHoverWidget->height());
+ TQRect rect(0, 0, itsHoverWidget->width(), itsHoverWidget->height());
int s(0);
bool redraw(false);
- itsHover=rect.contains(pos) ? HOVER_HEADER : HOVER_NONE;
+ itsHover=rect.tqcontains(pos) ? HOVER_HEADER : HOVER_NONE;
itsHoverSect=NO_SECT;
for(s=0; s<hd->count() && (NO_SECT==itsHoverSect || !redraw); ++s)
{
- QRect r(hd->sectionRect(s));
- bool hasNew(r.contains(pos));
+ TQRect r(hd->sectionRect(s));
+ bool hasNew(r.tqcontains(pos));
if(hasNew)
itsHoverSect=s;
if(!redraw)
{
- bool hasOld(r.contains(itsOldPos));
+ bool hasOld(r.tqcontains(itsOldPos));
if((hasNew && !hasOld) || (!hasNew && hasOld))
redraw=true;
@@ -8257,36 +8262,36 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
}
else
{
- QSpinWidget *sw(::qt_cast<QSpinWidget *>(itsHoverWidget));
+ TQSpinWidget *sw(::tqqt_cast<TQSpinWidget *>(itsHoverWidget));
if(sw) // So, are we over up or down?
{
- QRect up(querySubControlMetrics(CC_SpinWidget, itsHoverWidget,
+ TQRect up(querySubControlMetrics(CC_SpinWidget, itsHoverWidget,
SC_SpinWidgetUp)),
down(querySubControlMetrics(CC_SpinWidget, itsHoverWidget,
SC_SpinWidgetDown));
- if(up.contains(pos))
+ if(up.tqcontains(pos))
itsHover=HOVER_SW_UP;
- else if(down.contains(pos))
+ else if(down.tqcontains(pos))
itsHover=HOVER_SW_DOWN;
else
itsHover=HOVER_SW_ENTRY;
- return (HOVER_SW_UP==itsHover && !up.contains(itsOldPos)) ||
- (HOVER_SW_UP!=itsHover && up.contains(itsOldPos)) ||
- (HOVER_SW_DOWN==itsHover && !down.contains(itsOldPos)) ||
- (HOVER_SW_DOWN!=itsHover && down.contains(itsOldPos)) ||
+ return (HOVER_SW_UP==itsHover && !up.tqcontains(itsOldPos)) ||
+ (HOVER_SW_UP!=itsHover && up.tqcontains(itsOldPos)) ||
+ (HOVER_SW_DOWN==itsHover && !down.tqcontains(itsOldPos)) ||
+ (HOVER_SW_DOWN!=itsHover && down.tqcontains(itsOldPos)) ||
(HOVER_SW_ENTRY==itsHover);
}
else
{
- QTabBar *tabbar(::qt_cast<QTabBar *>(itsHoverWidget));
+ TQTabBar *tabbar(::tqqt_cast<TQTabBar *>(itsHoverWidget));
if(tabbar)
{
bool redraw(false);
- QTab *tab(tabbar->selectTab(pos));
+ TQTab *tab(tabbar->selectTab(pos));
int tabIndex(tab ? tabbar->indexOf(tab->identifier()) : -1),
selectedTab(tabbar->currentTab());
@@ -8297,11 +8302,11 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
}
else
{
- QComboBox *cb(::qt_cast<QComboBox *>(itsHoverWidget));
+ TQComboBox *cb(::tqqt_cast<TQComboBox *>(itsHoverWidget));
if(cb)
{
- QRect arrow(cb->rect());
+ TQRect arrow(cb->rect());
if(!cb->editable())
itsHover=HOVER_CB_ARROW;
@@ -8310,37 +8315,37 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
arrow=(querySubControlMetrics(CC_ComboBox, itsHoverWidget,
SC_ComboBoxArrow));
- if(arrow.contains(pos))
+ if(arrow.tqcontains(pos))
itsHover=HOVER_CB_ARROW;
else
{
- QRect r(cb->rect());
- if(QApplication::reverseLayout())
+ TQRect r(cb->rect());
+ if(TQApplication::reverseLayout())
r.addCoords(6, 0, 0, 0);
else
r.addCoords(0, 0, -6, 0);
if(DO_EFFECT && opts.etchEntry)
r.addCoords(1, 0, -1, 0);
- if(r.contains(pos))
+ if(r.tqcontains(pos))
itsHover=HOVER_CB_ENTRY;
else
itsHover=HOVER_NONE;
}
}
- return (HOVER_CB_ARROW==itsHover && !arrow.contains(itsOldPos)) ||
- (HOVER_CB_ARROW!=itsHover && arrow.contains(itsOldPos)) ||
+ return (HOVER_CB_ARROW==itsHover && !arrow.tqcontains(itsOldPos)) ||
+ (HOVER_CB_ARROW!=itsHover && arrow.tqcontains(itsOldPos)) ||
(HOVER_CB_ENTRY==itsHover);
}
else
- return itsOldPos==QPoint(-1, -1);
+ return itsOldPos==TQPoint(-1, -1);
}
}
}
}
}
-#if QT_VERSION >= 0x030200
+#if 0x039999 >= 0x030200
}
}
#endif
@@ -8348,7 +8353,7 @@ bool QtCurveStyle::redrawHoverWidget(const QPoint &pos)
return false;
}
-const QColor & QtCurveStyle::getFill(SFlags flags, const QColor *use, bool cr, bool darker) const
+const TQColor & TQtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr, bool darker) const
{
return !(flags&Style_Enabled)
? use[darker ? 2 : ORIGINAL_SHADE]
@@ -8363,7 +8368,7 @@ const QColor & QtCurveStyle::getFill(SFlags flags, const QColor *use, bool cr, b
: use[darker ? 2 : ORIGINAL_SHADE];
}
-const QColor & QtCurveStyle::getTabFill(bool current, bool highlight, const QColor *use) const
+const TQColor & TQtCurveStyle::getTabFill(bool current, bool highlight, const TQColor *use) const
{
return current
? use[ORIGINAL_SHADE]
@@ -8372,7 +8377,7 @@ const QColor & QtCurveStyle::getTabFill(bool current, bool highlight, const QCol
: use[2];
}
-const QColor & QtCurveStyle::menuStripeCol() const
+const TQColor & TQtCurveStyle::menuStripeCol() const
{
switch(opts.menuStripe)
{
@@ -8398,7 +8403,7 @@ const QColor & QtCurveStyle::menuStripeCol() const
}
}
-const QColor & QtCurveStyle::checkRadioCol(SFlags flags, const QColorGroup &cg) const
+const TQColor & TQtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &cg) const
{
if(flags&MENU_ITEM)
return flags&Style_Enabled && flags&Style_Active && opts.useHighlightForMenu
@@ -8412,60 +8417,60 @@ const QColor & QtCurveStyle::checkRadioCol(SFlags flags, const QColorGroup &cg)
: cg.text();
}
-QColor QtCurveStyle::shade(const QColor &a, float k) const
+TQColor TQtCurveStyle::shade(const TQColor &a, float k) const
{
- QColor mod;
+ TQColor mod;
::shade(&opts, a, &mod, k);
return mod;
}
-void QtCurveStyle::shade(const color &ca, color *cb, double k) const
+void TQtCurveStyle::shade(const color &ca, color *cb, double k) const
{
::shade(&opts, ca, cb, k);
}
-QPixmap * QtCurveStyle::getPixelPixmap(const QColor col) const
+TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const
{
- QRgb rgb(col.rgb());
- QString key(createKey(rgb));
+ TQRgb rgb(col.rgb());
+ TQString key(createKey(rgb));
- QPixmap *pix=itsPixmapCache.find(key);
+ TQPixmap *pix=itsPixmapCache.tqfind(key);
if(!pix)
{
static const int constAlpha=110;
- QImage img(1, 1, 32);
+ TQImage img(1, 1, 32);
img.setAlphaBuffer(true);
- img.setPixel(0, 0, qRgba(qRed(rgb), qGreen(rgb), qBlue(rgb), constAlpha));
- pix=new QPixmap(img);
+ img.setPixel(0, 0, tqRgba(tqRed(rgb), tqGreen(rgb), tqBlue(rgb), constAlpha));
+ pix=new TQPixmap(img);
itsPixmapCache.insert(key, pix, pix->depth()/8);
}
return pix;
}
-QPixmap * QtCurveStyle::createStripePixmap(const QColor &col, bool forWindow) const
+TQPixmap * TQtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const
{
- QRgb rgb(col.rgb());
- QString key(createKey(rgb, forWindow ? 'S' : 's'));
+ TQRgb rgb(col.rgb());
+ TQString key(createKey(rgb, forWindow ? 'S' : 's'));
- QPixmap *pix=itsPixmapCache.find(key);
+ TQPixmap *pix=itsPixmapCache.tqfind(key);
if(!pix)
{
- QColor col2(shade(col, BGND_STRIPE_SHADE));
+ TQColor col2(shade(col, BGND_STRIPE_SHADE));
int i,
adjust=forWindow ? qtcGetWindowBorderSize().titleHeight%4 : 0;
- pix=new QPixmap(64, 64);
+ pix=new TQPixmap(64, 64);
pix->fill(col.rgb());
- QPainter p;
+ TQPainter p;
p.begin(pix);
- p.setPen(QColor((3*col.red()+col2.red())/4,
+ p.setPen(TQColor((3*col.red()+col2.red())/4,
(3*col.green()+col2.green())/4,
(3*col.blue()+col2.blue())/4));
@@ -8483,19 +8488,19 @@ QPixmap * QtCurveStyle::createStripePixmap(const QColor &col, bool forWindow) co
return pix;
}
-static QImage rotateImage(const QImage &img, double angle=90.0)
+static TQImage rotateImage(const TQImage &img, double angle=90.0)
{
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.translate(img.width()/2, img.height()/2);
matrix.rotate(angle);
- QRect newRect(matrix.mapRect(QRect(0, 0, img.width(), img.height())));
+ TQRect newRect(matrix.mapRect(TQRect(0, 0, img.width(), img.height())));
- return img.xForm(QWMatrix(matrix.m11(), matrix.m12(), matrix.m21(), matrix.m22(),
+ return img.xForm(TQWMatrix(matrix.m11(), matrix.m12(), matrix.m21(), matrix.m22(),
matrix.dx() - newRect.left(), matrix.dy() - newRect.top()));
}
-static void recolour(QImage &img, const QColor &col, double shade)
+static void recolour(TQImage &img, const TQColor &col, double shade)
{
if (img.depth()<32)
img=img.convertDepth(32);
@@ -8503,23 +8508,23 @@ static void recolour(QImage &img, const QColor &col, double shade)
adjustPix(img.bits(), 4, img.width(), img.height(), img.bytesPerLine(), col.red(), col.green(), col.blue(), shade);
}
-void QtCurveStyle::drawDot(QPainter *p, const QRect &r, const QColor *cols) const
+void TQtCurveStyle::drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const
{
- QPixmap *pix=getPixmap(cols[STD_BORDER], PIX_DOT, 0.9);
+ TQPixmap *pix=getPixmap(cols[STD_BORDER], PIX_DOT, 0.9);
p->drawPixmap(r.x()+((r.width()-pix->width())>>1), r.y()+((r.height()-pix->height())>>1), *pix);
}
-QPixmap * QtCurveStyle::getPixmap(const QColor col, EPixmap p, double shade) const
+TQPixmap * TQtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade) const
{
- QRgb rgb(col.rgb());
- QString key(createKey(rgb, p));
- QPixmap *pix=itsPixmapCache.find(key);
+ TQRgb rgb(col.rgb());
+ TQString key(createKey(rgb, p));
+ TQPixmap *pix=itsPixmapCache.tqfind(key);
if(!pix)
{
- pix=new QPixmap();
+ pix=new TQPixmap();
- QImage img;
+ TQImage img;
switch(p)
{
@@ -8570,7 +8575,7 @@ QPixmap * QtCurveStyle::getPixmap(const QColor col, EPixmap p, double shade) con
return pix;
}
-void QtCurveStyle::setSbType()
+void TQtCurveStyle::setSbType()
{
switch(opts.scrollbarType)
{
@@ -8590,7 +8595,7 @@ void QtCurveStyle::setSbType()
}
}
-void QtCurveStyle::resetHover()
+void TQtCurveStyle::resetHover()
{
itsIsSpecialHover=false;
itsOldPos.setX(-1);
@@ -8601,41 +8606,41 @@ void QtCurveStyle::resetHover()
itsHoverTab=0L;
}
-struct QtcMenuBar : public QMenuBar
+struct TQtcMenuBar : public TQMenuBar
{
- bool itemUnderPos(const QPoint &pos)
+ bool itemUnderPos(const TQPoint &pos)
{
return -1!=itemAtPos(pos);
}
};
-bool QtCurveStyle::isWindowDragWidget(QObject *o, const QPoint &pos)
+bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
{
return opts.windowDrag &&
- (//qobject_cast<QDialog*>(o) ||
- (::qt_cast<QMenuBar*>(o) && (pos.isNull() || !((QtcMenuBar *)o)->itemUnderPos(pos)))
- //|| qobject_cast<QGroupBox*>(o)
- //|| (o->inherits("QToolButton") && !static_cast<QWidget*>(o)->isEnabled())
-// || qobject_cast<QToolBar*>(o)
- //|| qobject_cast<QDockWidget*>(o)
+ (//qobject_cast<TQDialog*>(o) ||
+ (::tqqt_cast<TQMenuBar*>(o) && (pos.isNull() || !((TQtcMenuBar *)o)->itemUnderPos(pos)))
+ //|| qobject_cast<TQGroupBox*>(o)
+ //|| (o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && !TQT_TQWIDGET(o)->isEnabled())
+// || qobject_cast<TQToolBar*>(o)
+ //|| qobject_cast<TQDockWidget*>(o)
// || ((*appType == Hacks::SMPlayer) && o->inherits(SMPlayerVideoWidget))
// || ((*appType == Hacks::Dragon) && o->inherits(DragonVideoWidget))
-// || o->inherits("QStatusBar")
-// || (o->inherits("QLabel") && o->parent() && o->parent()->inherits("QStatusBar"))
+// || o->inherits("TQStatusBar")
+// || (o->inherits(TQLABEL_OBJECT_NAME_STRING) && o->tqparent() && o->tqparent()->inherits("TQStatusBar"))
);
}
-void QtCurveStyle::updateProgressPos()
+void TQtCurveStyle::updateProgressPos()
{
// Taken from lipstik!
- QMap<QWidget*, int>::iterator it(itsProgAnimWidgets.begin()),
+ TQMap<TQWidget*, int>::iterator it(itsProgAnimWidgets.begin()),
end(itsProgAnimWidgets.end());
bool visible(false);
for (; it!=end; ++it)
{
- QProgressBar *pb(::qt_cast<QProgressBar*>(it.key()));
+ TQProgressBar *pb(::tqqt_cast<TQProgressBar*>(it.key()));
if (!pb)
continue;
@@ -8643,7 +8648,7 @@ void QtCurveStyle::updateProgressPos()
if(pb->isEnabled() && pb->progress()!=pb->totalSteps())
{
// update animation Offset of the current Widget
- it.data() = (it.data() + (QApplication::reverseLayout() ? -1 : 1))
+ it.data() = (it.data() + (TQApplication::reverseLayout() ? -1 : 1))
% (PROGRESS_CHUNK_WIDTH*2);
pb->update();
}
@@ -8654,27 +8659,27 @@ void QtCurveStyle::updateProgressPos()
itsAnimationTimer->stop();
}
-void QtCurveStyle::progressBarDestroyed(QObject *bar)
+void TQtCurveStyle::progressBarDestroyed(TQObject *bar)
{
- itsProgAnimWidgets.remove(static_cast<QWidget*>(bar));
+ itsProgAnimWidgets.remove(TQT_TQWIDGET(bar));
}
-void QtCurveStyle::sliderThumbMoved(int)
+void TQtCurveStyle::sliderThumbMoved(int)
{
- QSlider *slider(::qt_cast<QSlider*>(sender()));
+ TQSlider *slider(::tqqt_cast<TQSlider*>(sender()));
if(slider)
slider->update();
}
-void QtCurveStyle::khtmlWidgetDestroyed(QObject *o)
+void TQtCurveStyle::khtmlWidgetDestroyed(TQObject *o)
{
- itsKhtmlWidgets.remove(static_cast<const QWidget *>(o));
+ itsKhtmlWidgets.remove(TQT_TQWIDGET_CONST(o));
}
-void QtCurveStyle::hoverWidgetDestroyed(QObject *o)
+void TQtCurveStyle::hoverWidgetDestroyed(TQObject *o)
{
- if(o==itsHoverWidget)
+ if(TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(itsHoverWidget))
resetHover();
}
diff --git a/style/qtcurve.h b/style/qtcurve.h
index cccfb8f..930a67a 100644
--- a/style/qtcurve.h
+++ b/style/qtcurve.h
@@ -1,8 +1,8 @@
-#ifndef __QTCURVE_H__
-#define __QTCURVE_H__
+#ifndef __TQTCURVE_H__
+#define __TQTCURVE_H__
/*
- QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
+ TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
----
@@ -51,32 +51,33 @@
*/
#include "config.h"
-#ifdef QTC_QT_ONLY
-#include "qtc_kstyle.h"
+#ifdef TQTC_TQT_ONLY
+#include "tqtc_kstyle.h"
#else
#include <kdeversion.h>
#include <kstyle.h>
#endif
-#include <qcolor.h>
-#include <qpoint.h>
-#include <qpalette.h>
-#include <qpixmap.h>
-#include <qcache.h>
-#include <qvaluelist.h>
+#include <tqcolor.h>
+#include <tqpoint.h>
+#include <tqpalette.h>
+#include <tqpixmap.h>
+#include <tqcache.h>
+#include <tqvaluelist.h>
#include "common.h"
-class QTimer;
-class QSlider;
+class TQTimer;
+class TQSlider;
-#ifdef QTC_QT_ONLY
-#define BASE_STYLE QtCKStyle
+#ifdef TQTC_TQT_ONLY
+#define BASE_STYLE TQtCKStyle
#else
#define BASE_STYLE KStyle
#endif
-class QtCurveStyle : public BASE_STYLE
+class TQtCurveStyle : public BASE_STYLE
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -87,7 +88,7 @@ class QtCurveStyle : public BASE_STYLE
APP_OPENOFFICE,
APP_MACTOR,
APP_KPRESENTER,
- APP_KONQUEROR,
+ APP_KONTQUEROR,
APP_SKIP_TASKBAR,
APP_KPRINTER,
APP_KDIALOG,
@@ -125,136 +126,136 @@ class QtCurveStyle : public BASE_STYLE
ENTRY_NONE
};
-#ifdef QTC_STYLE_SUPPORT
- QtCurveStyle(const QString &name=QString());
+#ifdef TQTC_STYLE_SUPPORT
+ TQtCurveStyle(const TQString &name=TQString());
#else
- QtCurveStyle();
+ TQtCurveStyle();
#endif
- virtual ~QtCurveStyle();
+ virtual ~TQtCurveStyle();
- void polish(QApplication *app);
- void polish(QPalette &pal);
- QColorGroup setColorGroup(const QColorGroup &old, const QColorGroup &act, bool dis=false);
- void polish(QWidget *widget);
- void unPolish(QWidget *widget);
- void drawLightBevel(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
- int round, const QColor &fill, const QColor *custom=NULL,
+ void polish(TQApplication *app);
+ void polish(TQPalette &pal);
+ TQColorGroup setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis=false);
+ void polish(TQWidget *widget);
+ void unPolish(TQWidget *widget);
+ void drawLightBevel(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
+ int round, const TQColor &fill, const TQColor *custom=NULL,
bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const
{ drawLightBevel(cg.background(), p, r, cg, flags, round, fill, custom, doBorder, doCorners, w); }
- void drawLightBevel(const QColor &bgnd, QPainter *p, const QRect &r, const QColorGroup &cg,
- SFlags flags, int round, const QColor &fill, const QColor *custom=NULL,
+ void drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ SFlags flags, int round, const TQColor &fill, const TQColor *custom=NULL,
bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const;
- void drawGlow(QPainter *p, const QRect &r, const QColorGroup &cg, EWidget w, const QColor *cols=0) const;
- void drawEtch(QPainter *p, const QRect &r, const QColorGroup &cg, bool raised=false, bool square=false) const;
- void drawBorder(const QColor &bgnd, QPainter *p, const QRect &r, const QColorGroup &cg,
- SFlags flags, int round, const QColor *custom=NULL, EWidget w=WIDGET_OTHER,
+ void drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols=0) const;
+ void drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised=false, bool square=false) const;
+ void drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ SFlags flags, int round, const TQColor *custom=NULL, EWidget w=WIDGET_OTHER,
bool doCorners=true, EBorder borderProfile=BORDER_FLAT, bool blendBorderColors=true, int borderVal=STD_BORDER) const;
- void drawMdiIcon(QPainter *painter, const QColor &color, const QColor &shadow, const QRect &r, bool sunken, int margin,
+ void drawMdiIcon(TQPainter *painter, const TQColor &color, const TQColor &shadow, const TQRect &r, bool sunken, int margin,
SubControl button) const;
- void drawWindowIcon(QPainter *painter, const QColor &color, const QRect &r, bool sunken, int margin, SubControl button) const;
- void drawEntryField(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
+ void drawWindowIcon(TQPainter *painter, const TQColor &color, const TQRect &r, bool sunken, int margin, SubControl button) const;
+ void drawEntryField(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
EntryColor coloration, int round, EWidget=WIDGET_ENTRY) const;
- void drawArrow(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
- QStyle::PrimitiveElement pe, bool small=false, bool checkActive=false) const;
- void drawPrimitive(PrimitiveElement, QPainter *, const QRect &, const QColorGroup &,
- SFlags = Style_Default, const QStyleOption & = QStyleOption::Default) const;
- void drawKStylePrimitive(KStylePrimitive kpe, QPainter* p, const QWidget* widget, const QRect &r,
- const QColorGroup &cg, SFlags flags, const QStyleOption &opt ) const;
- void drawControl(ControlElement, QPainter *, const QWidget *, const QRect &, const QColorGroup &,
- SFlags = Style_Default, const QStyleOption & = QStyleOption::Default) const;
- void drawControlMask(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QStyleOption & = QStyleOption::Default) const;
- void drawComplexControlMask(ComplexControl control, QPainter *p, const QWidget *widget,
- const QRect &r, const QStyleOption &data) const;
- QRect subRect(SubRect, const QWidget *) const;
- void drawComplexControl(ComplexControl, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default, SCFlags = SC_All,
- SCFlags = SC_None, const QStyleOption & = QStyleOption::Default) const;
- QRect querySubControlMetrics(ComplexControl, const QWidget *, SubControl,
- const QStyleOption & = QStyleOption::Default) const;
- int pixelMetric(PixelMetric, const QWidget *widget= 0) const;
- int kPixelMetric(KStylePixelMetric kpm, const QWidget *widget) const;
- QSize sizeFromContents(ContentsType, const QWidget *, const QSize &,
- const QStyleOption & = QStyleOption::Default) const;
- int styleHint(StyleHint, const QWidget *widget= 0, const QStyleOption & = QStyleOption::Default,
- QStyleHintReturn *returnData= 0) const;
- void drawItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg, bool enabled,
- const QPixmap *pixmap, const QString &text, int len=-1, const QColor *penColor=0) const;
+ void drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
+ TQ_PrimitiveElement pe, bool small=false, bool checkActive=false) const;
+ void tqdrawPrimitive(TQ_PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &,
+ SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const;
+ void drawKStylePrimitive(KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r,
+ const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const;
+ void tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &,
+ SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const;
+ void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQStyleOption & = TQStyleOption::Default) const;
+ void tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget,
+ const TQRect &r, const TQStyleOption &data) const;
+ TQRect subRect(SubRect, const TQWidget *) const;
+ void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All,
+ SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default) const;
+ TQRect querySubControlMetrics(TQ_ComplexControl, const TQWidget *, SubControl,
+ const TQStyleOption & = TQStyleOption::Default) const;
+ int tqpixelMetric(PixelMetric, const TQWidget *widget= 0) const;
+ int kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const;
+ TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &,
+ const TQStyleOption & = TQStyleOption::Default) const;
+ int tqstyleHint(StyleHint, const TQWidget *widget= 0, const TQStyleOption & = TQStyleOption::Default,
+ TQStyleHintReturn *returnData= 0) const;
+ void drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled,
+ const TQPixmap *pixmap, const TQString &text, int len=-1, const TQColor *penColor=0) const;
protected:
- bool appIsNotEmbedded(QDialog *dlg);
- bool eventFilter(QObject *object, QEvent *event);
- void drawMenuItem(QPainter *p, const QRect &r, int flags, const QColorGroup &cg,
- bool mbi, int round, const QColor &bgnd, const QColor *cols) const;
- void drawProgress(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, int round,
- const QWidget *widget) const;
- void drawBevelGradient(const QColor &base, QPainter *p, QRect const &r,
+ bool appIsNotEmbedded(TQDialog *dlg);
+ bool eventFilter(TQObject *object, TQEvent *event);
+ void drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg,
+ bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const;
+ void drawProgress(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round,
+ const TQWidget *widget) const;
+ void drawBevelGradient(const TQColor &base, TQPainter *p, TQRect const &r,
bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const;
- void drawBevelGradientReal(const QColor &base, QPainter *p, QRect const &r,
+ void drawBevelGradientReal(const TQColor &base, TQPainter *p, TQRect const &r,
bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const;
- void drawGradient(const QColor &top, const QColor &bot, QPainter *p, const QRect &r, bool horiz=true) const;
- void drawSbSliderHandle(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, bool slider=false) const;
- void drawSliderHandle(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags, QSlider *slider, bool tb=false) const;
- void drawSliderGroove(QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags,
- const QWidget *widget) const;
- void drawMenuOrToolBarBackground(QPainter *p, const QRect &r, const QColorGroup &cg, bool menu=true, bool horiz=true) const;
- void drawHandleMarkers(QPainter *p, const QRect &r, SFlags flags, bool tb, ELine handles) const;
- void drawHighlight(QPainter *p, const QRect &r, const QColorGroup &cg, bool horiz, bool inc) const;
+ void drawGradient(const TQColor &top, const TQColor &bot, TQPainter *p, const TQRect &r, bool horiz=true) const;
+ void drawSbSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, bool slider=false) const;
+ void drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, TQSlider *slider, bool tb=false) const;
+ void drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
+ const TQWidget *widget) const;
+ void drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool menu=true, bool horiz=true) const;
+ void drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb, ELine handles) const;
+ void drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const;
private:
- static QColor shadowColor(const QColor col)
+ static TQColor shadowColor(const TQColor col)
{
- return qGray(col.rgb()) < 100 ? QColor(255, 255, 255) : QColor(0, 0, 0);
+ return tqGray(col.rgb()) < 100 ? TQColor(255, 255, 255) : TQColor(0, 0, 0);
}
- void shadeColors(const QColor &base, QColor *vals) const;
- const QColor * buttonColors(const QColorGroup &cg) const;
- const QColor * checkRadioColors(const QColorGroup &cg, SFlags flags) const;
- const QColor * sliderColors(/*const QColorGroup &cg, */SFlags flags) const;
- const QColor * backgroundColors(const QColor &c) const;
- const QColor * backgroundColors(const QColorGroup &cg) const
+ void shadeColors(const TQColor &base, TQColor *vals) const;
+ const TQColor * buttonColors(const TQColorGroup &cg) const;
+ const TQColor * checkRadioColors(const TQColorGroup &cg, SFlags flags) const;
+ const TQColor * sliderColors(/*const TQColorGroup &cg, */SFlags flags) const;
+ const TQColor * backgroundColors(const TQColor &c) const;
+ const TQColor * backgroundColors(const TQColorGroup &cg) const
{ return backgroundColors(cg.background()); }
- const QColor * borderColors(SFlags flags, const QColor *use) const;
- const QColor * getSidebarButtons() const;
- void setMenuColors(const QColorGroup &cg);
- const QColor * menuColors(const QColorGroup &cg, bool active) const;
+ const TQColor * borderColors(SFlags flags, const TQColor *use) const;
+ const TQColor * getSidebarButtons() const;
+ void setMenuColors(const TQColorGroup &cg);
+ const TQColor * menuColors(const TQColorGroup &cg, bool active) const;
void setDecorationColors(bool init=false);
- const QColor * getMdiColors(const QColorGroup &cg, bool active) const;
+ const TQColor * getMdiColors(const TQColorGroup &cg, bool active) const;
#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
void readMdiPositions() const;
#endif
- bool redrawHoverWidget(const QPoint &pos);
- const QColor & getFill(SFlags flags, const QColor *use, bool cr=false, bool darker=false) const;
- const QColor & getListViewFill(SFlags flags, const QColor *use) const;
- const QColor & getTabFill(bool current, bool highlight, const QColor *use) const;
- const QColor & menuStripeCol() const;
- const QColor & checkRadioCol(SFlags flags, const QColorGroup &cg) const;
- QColor shade(const QColor &a, float k) const;
+ bool redrawHoverWidget(const TQPoint &pos);
+ const TQColor & getFill(SFlags flags, const TQColor *use, bool cr=false, bool darker=false) const;
+ const TQColor & getListViewFill(SFlags flags, const TQColor *use) const;
+ const TQColor & getTabFill(bool current, bool highlight, const TQColor *use) const;
+ const TQColor & menuStripeCol() const;
+ const TQColor & checkRadioCol(SFlags flags, const TQColorGroup &cg) const;
+ TQColor shade(const TQColor &a, float k) const;
void shade(const color &ca, color *cb, double k) const;
- void drawDot(QPainter *p, const QRect &r, const QColor *cols) const;
- QPixmap * getPixelPixmap(const QColor col) const;
- QPixmap * getPixmap(const QColor col, EPixmap pix, double shade=1.0) const;
- QPixmap * createStripePixmap(const QColor &col, bool forWindow) const;
+ void drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const;
+ TQPixmap * getPixelPixmap(const TQColor col) const;
+ TQPixmap * getPixmap(const TQColor col, EPixmap pix, double shade=1.0) const;
+ TQPixmap * createStripePixmap(const TQColor &col, bool forWindow) const;
void setSbType();
- bool isFormWidget(const QWidget *w) const { return itsKhtmlWidgets.contains(w); }
+ bool isFormWidget(const TQWidget *w) const { return itsKhtmlWidgets.tqcontains(w); }
void resetHover();
- bool isWindowDragWidget(QObject *o, const QPoint &pos=QPoint());
+ bool isWindowDragWidget(TQObject *o, const TQPoint &pos=TQPoint());
private slots:
void updateProgressPos();
- void progressBarDestroyed(QObject *bar);
+ void progressBarDestroyed(TQObject *bar);
void sliderThumbMoved(int val);
- void khtmlWidgetDestroyed(QObject *o);
- void hoverWidgetDestroyed(QObject *o);
+ void khtmlWidgetDestroyed(TQObject *o);
+ void hoverWidgetDestroyed(TQObject *o);
private:
mutable Options opts;
- QColor itsHighlightCols[TOTAL_SHADES+1],
+ TQColor itsHighlightCols[TOTAL_SHADES+1],
itsBackgroundCols[TOTAL_SHADES+1],
itsMenubarCols[TOTAL_SHADES+1],
itsFocusCols[TOTAL_SHADES+1],
@@ -268,32 +269,32 @@ class QtCurveStyle : public BASE_STYLE
itsButtonCols[TOTAL_SHADES+1],
itsLighterPopupMenuBgndCol,
itsCheckRadioCol;
- mutable QColor *itsSidebarButtonsCols;
- mutable QColor *itsActiveMdiColors;
- mutable QColor *itsMdiColors;
- mutable QColor itsActiveMdiTextColor;
- mutable QColor itsMdiTextColor;
- mutable QColor itsColoredButtonCols[TOTAL_SHADES+1];
- mutable QColor itsColoredBackgroundCols[TOTAL_SHADES+1];
+ mutable TQColor *itsSidebarButtonsCols;
+ mutable TQColor *itsActiveMdiColors;
+ mutable TQColor *itsMdiColors;
+ mutable TQColor itsActiveMdiTextColor;
+ mutable TQColor itsMdiTextColor;
+ mutable TQColor itsColoredButtonCols[TOTAL_SHADES+1];
+ mutable TQColor itsColoredBackgroundCols[TOTAL_SHADES+1];
EApp itsThemedApp;
- mutable QCache<QPixmap> itsPixmapCache;
-#if defined QTC_QT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
+ mutable TQCache<TQPixmap> itsPixmapCache;
+#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
bool itsIsTransKicker;
#endif
EHover itsHover;
- QPoint itsOldPos;
+ TQPoint itsOldPos;
mutable bool itsFormMode;
- QWidget *itsHoverWidget;
+ TQWidget *itsHoverWidget;
int itsHoverSect;
- QTab *itsHoverTab;
- QPalette *itsMactorPal;
- QMap<QWidget*, int> itsProgAnimWidgets;
- QMap<const QWidget*, bool> itsKhtmlWidgets;
- QTimer *itsAnimationTimer;
+ TQTab *itsHoverTab;
+ TQPalette *itsMactorPal;
+ TQMap<TQWidget*, int> itsProgAnimWidgets;
+ TQMap<const TQWidget*, bool> itsKhtmlWidgets;
+ TQTimer *itsAnimationTimer;
mutable bool itsActive,
itsIsSpecialHover;
- mutable QValueList<int> itsMdiButtons[2]; // 0=left, 1=right
- QWidget *itsDragWidget;
+ mutable TQValueList<int> itsMdiButtons[2]; // 0=left, 1=right
+ TQWidget *itsDragWidget;
bool itsDragWidgetHadMouseTracking;
};