summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-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
4 files changed, 446 insertions, 446 deletions
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 [email protected]
+ TQtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -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 [email protected]
+ TQtCurve (C) Craig Drummond, 2003 - 2010 [email protected]
----
@@ -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 [email protected]
+ TQtCurve (C) Craig Drummond, 2003 - 2007 [email protected]
----
@@ -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)