diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-06 22:09:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-06 22:09:18 +0000 |
commit | d1fb90134ab8504932ee36de6157f846b50f7415 (patch) | |
tree | 191f2f1f1ed00a754687d1258d47f78e99723182 /common/config_file.c-orig | |
parent | b23b8edce7cbd48165084dbd852875afeb800735 (diff) | |
download | tde-style-qtcurve-d1fb90134ab8504932ee36de6157f846b50f7415.tar.gz tde-style-qtcurve-d1fb90134ab8504932ee36de6157f846b50f7415.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
Diffstat (limited to 'common/config_file.c-orig')
-rw-r--r-- | common/config_file.c-orig | 324 |
1 files changed, 162 insertions, 162 deletions
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) |