diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
commit | 5f5ee2367157176ed223b86343eb0a9e4022e020 (patch) | |
tree | 6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /kdelirc/kdelirc | |
parent | 4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff) | |
download | tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdelirc/kdelirc')
-rw-r--r-- | kdelirc/kdelirc/arguments.cpp | 8 | ||||
-rw-r--r-- | kdelirc/kdelirc/arguments.h | 8 | ||||
-rw-r--r-- | kdelirc/kdelirc/iraction.cpp | 42 | ||||
-rw-r--r-- | kdelirc/kdelirc/iraction.h | 42 | ||||
-rw-r--r-- | kdelirc/kdelirc/iractions.cpp | 12 | ||||
-rw-r--r-- | kdelirc/kdelirc/iractions.h | 22 | ||||
-rw-r--r-- | kdelirc/kdelirc/mode.cpp | 10 | ||||
-rw-r--r-- | kdelirc/kdelirc/mode.h | 20 | ||||
-rw-r--r-- | kdelirc/kdelirc/modes.cpp | 22 | ||||
-rw-r--r-- | kdelirc/kdelirc/modes.h | 24 | ||||
-rw-r--r-- | kdelirc/kdelirc/profileserver.cpp | 34 | ||||
-rw-r--r-- | kdelirc/kdelirc/profileserver.h | 100 | ||||
-rw-r--r-- | kdelirc/kdelirc/prototype.cpp | 18 | ||||
-rw-r--r-- | kdelirc/kdelirc/prototype.h | 34 | ||||
-rw-r--r-- | kdelirc/kdelirc/remoteserver.cpp | 22 | ||||
-rw-r--r-- | kdelirc/kdelirc/remoteserver.h | 62 |
16 files changed, 240 insertions, 240 deletions
diff --git a/kdelirc/kdelirc/arguments.cpp b/kdelirc/kdelirc/arguments.cpp index 10fc69b..fc678ce 100644 --- a/kdelirc/kdelirc/arguments.cpp +++ b/kdelirc/kdelirc/arguments.cpp @@ -10,7 +10,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#include <qstring.h> +#include <tqstring.h> #include "arguments.h" @@ -22,11 +22,11 @@ Arguments::~Arguments() { } -const QString Arguments::toString() const +const TQString Arguments::toString() const { - QString ret = ""; + TQString ret = ""; for(Arguments::const_iterator i = begin(); i != end(); ++i) - { QString s = (*i).toString(); + { TQString s = (*i).toString(); if(s.isNull()) s = "..."; if(i != begin()) ret += ", "; ret += s; diff --git a/kdelirc/kdelirc/arguments.h b/kdelirc/kdelirc/arguments.h index 97448a5..dae1f5c 100644 --- a/kdelirc/kdelirc/arguments.h +++ b/kdelirc/kdelirc/arguments.h @@ -13,17 +13,17 @@ #ifndef ARGUMENTS_H #define ARGUMENTS_H -#include <qvaluelist.h> -#include <qvariant.h> +#include <tqvaluelist.h> +#include <tqvariant.h> /** @author Gav Wood */ -class Arguments : public QValueList<QVariant> +class Arguments : public TQValueList<TQVariant> { public: - const QString toString() const; + const TQString toString() const; Arguments(); ~Arguments(); diff --git a/kdelirc/kdelirc/iraction.cpp b/kdelirc/kdelirc/iraction.cpp index 9081a2e..ad558b5 100644 --- a/kdelirc/kdelirc/iraction.cpp +++ b/kdelirc/kdelirc/iraction.cpp @@ -11,7 +11,7 @@ // // -#include <qvariant.h> +#include <tqvariant.h> #include <kconfig.h> #include <klocale.h> @@ -20,7 +20,7 @@ #include "profileserver.h" #include "remoteserver.h" -IRAction::IRAction(const QString &newProgram, const QString &newObject, const QString &newMethod, const Arguments &newArguments, const QString &newRemote, const QString &newMode, const QString &newButton, const bool newRepeat, const bool newAutoStart, const bool newDoBefore, const bool newDoAfter, const bool newUnique, const IfMulti newIfMulti) +IRAction::IRAction(const TQString &newProgram, const TQString &newObject, const TQString &newMethod, const Arguments &newArguments, const TQString &newRemote, const TQString &newMode, const TQString &newButton, const bool newRepeat, const bool newAutoStart, const bool newDoBefore, const bool newDoAfter, const bool newUnique, const IfMulti newIfMulti) { theProgram = newProgram; theObject = newObject; @@ -39,12 +39,12 @@ IRAction::IRAction(const QString &newProgram, const QString &newObject, const QS const IRAction &IRAction::loadFromConfig(KConfig &theConfig, int index) { - QString Binding = "Binding" + QString().setNum(index); + TQString Binding = "Binding" + TQString().setNum(index); int numArguments = theConfig.readNumEntry(Binding + "Arguments"); theArguments.clear(); for(int j = 0; j < numArguments; j++) - { QVariant::Type theType = (QVariant::Type)theConfig.readNumEntry(Binding + "ArgumentType" + QString().setNum(j), QVariant::String); - theArguments += theConfig.readPropertyEntry(Binding + "Argument" + QString().setNum(j), theType == QVariant::CString ? QVariant::String : theType); + { TQVariant::Type theType = (TQVariant::Type)theConfig.readNumEntry(Binding + "ArgumentType" + TQString().setNum(j), TQVariant::String); + theArguments += theConfig.readPropertyEntry(Binding + "Argument" + TQString().setNum(j), theType == TQVariant::CString ? TQVariant::String : theType); theArguments.last().cast(theType); } @@ -66,15 +66,15 @@ const IRAction &IRAction::loadFromConfig(KConfig &theConfig, int index) void IRAction::saveToConfig(KConfig &theConfig, int index) const { - QString Binding = "Binding" + QString().setNum(index); + TQString Binding = "Binding" + TQString().setNum(index); theConfig.writeEntry(Binding + "Arguments", theArguments.count()); for(unsigned j = 0; j < theArguments.count(); j++) - { QVariant arg = theArguments[j]; - QVariant::Type preType = arg.type(); - if(preType == QVariant::CString) arg.cast(QVariant::String); - theConfig.writeEntry(Binding + "Argument" + QString().setNum(j), arg); - theConfig.writeEntry(Binding + "ArgumentType" + QString().setNum(j), preType); + { TQVariant arg = theArguments[j]; + TQVariant::Type preType = arg.type(); + if(preType == TQVariant::CString) arg.cast(TQVariant::String); + theConfig.writeEntry(Binding + "Argument" + TQString().setNum(j), arg); + theConfig.writeEntry(Binding + "ArgumentType" + TQString().setNum(j), preType); } theConfig.writeEntry(Binding + "Program", theProgram); theConfig.writeEntry(Binding + "Object", theObject); @@ -90,7 +90,7 @@ void IRAction::saveToConfig(KConfig &theConfig, int index) const theConfig.writeEntry(Binding + "IfMulti", theIfMulti); } -const QString IRAction::function() const +const TQString IRAction::function() const { ProfileServer *theServer = ProfileServer::profileServer(); if(theProgram.isEmpty()) @@ -111,24 +111,24 @@ const QString IRAction::function() const } } -const QString IRAction::notes() const +const TQString IRAction::notes() const { if(isModeChange()) - return QString(theDoBefore ? i18n("Do actions before. ") : "") + - QString(theDoAfter ? i18n("Do actions after. ") : ""); + return TQString(theDoBefore ? i18n("Do actions before. ") : "") + + TQString(theDoAfter ? i18n("Do actions after. ") : ""); else if(isJustStart()) return ""; else - return QString(theAutoStart ? i18n("Auto-start. ") : "") - + QString(theRepeat ? i18n("Repeatable. ") : "") - + QString(!theUnique ? (theIfMulti == IM_DONTSEND ? i18n("Do nothing if many instances. ") + return TQString(theAutoStart ? i18n("Auto-start. ") : "") + + TQString(theRepeat ? i18n("Repeatable. ") : "") + + TQString(!theUnique ? (theIfMulti == IM_DONTSEND ? i18n("Do nothing if many instances. ") : theIfMulti == IM_SENDTOTOP ? i18n("Send to top instance. ") : theIfMulti == IM_SENDTOBOTTOM ? i18n("Send to bottom instance. ") : i18n("Send to all instances. ")) : ""); } -const QString IRAction::application() const +const TQString IRAction::application() const { ProfileServer *theServer = ProfileServer::profileServer(); if(theProgram.isEmpty()) @@ -143,12 +143,12 @@ const QString IRAction::application() const } } -const QString IRAction::remoteName() const +const TQString IRAction::remoteName() const { return RemoteServer::remoteServer()->getRemoteName(theRemote); } -const QString IRAction::buttonName() const +const TQString IRAction::buttonName() const { return RemoteServer::remoteServer()->getButtonName(theRemote, theButton); } diff --git a/kdelirc/kdelirc/iraction.h b/kdelirc/kdelirc/iraction.h index f7008ff..8fdd44e 100644 --- a/kdelirc/kdelirc/iraction.h +++ b/kdelirc/kdelirc/iraction.h @@ -13,7 +13,7 @@ #ifndef IRACTION_H #define IRACTION_H -#include <qstring.h> +#include <tqstring.h> #include "prototype.h" #include "arguments.h" @@ -27,7 +27,7 @@ class KConfig; class IRAction { - QString theProgram, theObject, theRemote, theButton, theMode; + TQString theProgram, theObject, theRemote, theButton, theMode; Prototype theMethod; Arguments theArguments; bool theRepeat, theAutoStart, theDoBefore, theDoAfter; @@ -40,49 +40,49 @@ public: void saveToConfig(KConfig &theConfig, int index) const; // may be changed to a profile-based representation in the future. - const QString function() const; - const QString application() const; - const QString buttonName() const; - const QString remoteName() const; - const QString notes() const; + const TQString function() const; + const TQString application() const; + const TQString buttonName() const; + const TQString remoteName() const; + const TQString notes() const; // bog standard raw DCOP stuff - const QString &program() const { return theProgram; } - const QString &object() const { return theObject; } + const TQString &program() const { return theProgram; } + const TQString &object() const { return theObject; } const Prototype &method() const { return theMethod; } - const QString &remote() const { return theRemote; } - const QString &mode() const { return theMode; } - const QString &button() const { return theButton; } + const TQString &remote() const { return theRemote; } + const TQString &mode() const { return theMode; } + const TQString &button() const { return theButton; } const Arguments arguments() const { if(theProgram != "" && theObject != "") return theArguments; return Arguments(); } const bool repeat() const { return theRepeat; } const bool autoStart() const { return theAutoStart; } const IfMulti ifMulti() const { return theIfMulti; } const bool unique() const { return theUnique; } - const QString &modeChange() const { return theObject; } + const TQString &modeChange() const { return theObject; } const bool doBefore() const { return theDoBefore; } const bool doAfter() const { return theDoAfter; } bool isModeChange() const { return theProgram == ""; } bool isJustStart() const { return theProgram != "" && theObject == ""; } - void setProgram(const QString &newProgram) { theProgram = newProgram; } - void setObject(const QString &newObject) { theObject = newObject; } + void setProgram(const TQString &newProgram) { theProgram = newProgram; } + void setObject(const TQString &newObject) { theObject = newObject; } void setMethod(const Prototype &newMethod) { theMethod = newMethod; } - void setRemote(const QString &newRemote) { theRemote = newRemote; } - void setMode(const QString &newMode) { theMode = newMode; } - void setButton(const QString &newButton) { theButton = newButton; } + void setRemote(const TQString &newRemote) { theRemote = newRemote; } + void setMode(const TQString &newMode) { theMode = newMode; } + void setButton(const TQString &newButton) { theButton = newButton; } void setArguments(const Arguments &newArguments) { theArguments = newArguments; } void setRepeat(bool newRepeat) { theRepeat = newRepeat; } void setDoBefore(bool a) { theDoBefore = a; } void setDoAfter(bool a) { theDoAfter = a; } void setAutoStart(bool newAutoStart) { theAutoStart = newAutoStart; } - void setModeChange(const QString &a) { theObject = a; } + void setModeChange(const TQString &a) { theObject = a; } void setIfMulti(const IfMulti a) { theIfMulti = a; } void setUnique(const bool a) { theUnique = a; } - IRAction(const QString &newProgram, const QString &newObject, const QString &newMethod, const Arguments &newArguments, const QString &newRemote, const QString &newMode, const QString &newButton, const bool newRepeat, const bool newAutoStart, const bool newDoBefore, const bool newDoAfter, const bool newUnique, const IfMulti newIfMulti); - IRAction() { theProgram = QString::null; } + IRAction(const TQString &newProgram, const TQString &newObject, const TQString &newMethod, const Arguments &newArguments, const TQString &newRemote, const TQString &newMode, const TQString &newButton, const bool newRepeat, const bool newAutoStart, const bool newDoBefore, const bool newDoAfter, const bool newUnique, const IfMulti newIfMulti); + IRAction() { theProgram = TQString::null; } }; #endif diff --git a/kdelirc/kdelirc/iractions.cpp b/kdelirc/kdelirc/iractions.cpp index 9bc03e3..e4ec0da 100644 --- a/kdelirc/kdelirc/iractions.cpp +++ b/kdelirc/kdelirc/iractions.cpp @@ -28,11 +28,11 @@ void IRActions::purgeAllBindings(KConfig &theConfig) { int numBindings = theConfig.readNumEntry("Bindings"); for(int i = 0; i < numBindings; i++) - { QString Binding = "Binding" + QString().setNum(i); + { TQString Binding = "Binding" + TQString().setNum(i); int numArguments = theConfig.readNumEntry(Binding + "Arguments"); for(int j = 0; j < numArguments; j++) - { theConfig.deleteEntry(Binding + "Argument" + QString().setNum(j)); - theConfig.deleteEntry(Binding + "ArgumentType" + QString().setNum(j)); + { theConfig.deleteEntry(Binding + "Argument" + TQString().setNum(j)); + theConfig.deleteEntry(Binding + "ArgumentType" + TQString().setNum(j)); } theConfig.deleteEntry(Binding + "Arguments"); theConfig.deleteEntry(Binding + "Program"); theConfig.deleteEntry(Binding + "Object"); theConfig.deleteEntry(Binding + "Method"); @@ -55,7 +55,7 @@ IRAIt IRActions::addAction(const IRAction &theAction) return append(theAction); } -IRAItList IRActions::findByButton(const QString &remote, const QString &button) +IRAItList IRActions::findByButton(const TQString &remote, const TQString &button) { IRAItList ret; for(iterator i = begin(); i != end(); ++i) @@ -64,7 +64,7 @@ IRAItList IRActions::findByButton(const QString &remote, const QString &button) return ret; } -void IRActions::renameMode(const Mode &mode, const QString &to) +void IRActions::renameMode(const Mode &mode, const TQString &to) { for(iterator i = begin(); i != end(); ++i) { if((*i).remote() == mode.remote() && (*i).mode() == mode.name()) (*i).setMode(to); @@ -80,7 +80,7 @@ IRAItList IRActions::findByMode(const Mode &mode) return ret; } -IRAItList IRActions::findByModeButton(const Mode &mode, const QString &button) +IRAItList IRActions::findByModeButton(const Mode &mode, const TQString &button) { IRAItList ret; for(iterator i = begin(); i != end(); ++i) diff --git a/kdelirc/kdelirc/iractions.h b/kdelirc/kdelirc/iractions.h index 24174d9..8373669 100644 --- a/kdelirc/kdelirc/iractions.h +++ b/kdelirc/kdelirc/iractions.h @@ -13,10 +13,10 @@ #ifndef IRACTIONS_H #define IRACTIONS_H -#include <qvaluelist.h> -#include <qpair.h> -#include <qstring.h> -#include <qmap.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqstring.h> +#include <tqmap.h> #include "iraction.h" #include "mode.h" @@ -27,22 +27,22 @@ class KConfig; -typedef QValueListIterator<IRAction> IRAIt; -typedef QValueList<IRAIt> IRAItList; +typedef TQValueListIterator<IRAction> IRAIt; +typedef TQValueList<IRAIt> IRAItList; -class IRActions: protected QValueList<IRAction> +class IRActions: protected TQValueList<IRAction> { private: void purgeAllBindings(KConfig &theConfig); public: IRAIt addAction(const IRAction &theAction); - IRAItList findByButton(const QString &remote, const QString &button); + IRAItList findByButton(const TQString &remote, const TQString &button); IRAItList findByMode(const Mode &mode); - IRAItList findByModeButton(const Mode &mode, const QString &button); + IRAItList findByModeButton(const Mode &mode, const TQString &button); - void erase(const IRAIt &action) { QValueList<IRAction>::erase(action); } - void renameMode(const Mode &mode, const QString &to); + void erase(const IRAIt &action) { TQValueList<IRAction>::erase(action); } + void renameMode(const Mode &mode, const TQString &to); void loadFromConfig(KConfig &theConfig); void saveToConfig(KConfig &theConfig); diff --git a/kdelirc/kdelirc/mode.cpp b/kdelirc/kdelirc/mode.cpp index 1f4c34a..71deea8 100644 --- a/kdelirc/kdelirc/mode.cpp +++ b/kdelirc/kdelirc/mode.cpp @@ -16,11 +16,11 @@ #include "modes.h" #include "mode.h" -Mode::Mode() : theName(QString::null) +Mode::Mode() : theName(TQString::null) { } -Mode::Mode(const QString &remote, const QString &name, const QString &iconFile) +Mode::Mode(const TQString &remote, const TQString &name, const TQString &iconFile) { theRemote = remote; theName = name; @@ -33,17 +33,17 @@ Mode::~Mode() const Mode &Mode::loadFromConfig(KConfig &theConfig, int index) { - QString Prefix = "Mode" + QString().setNum(index); + TQString Prefix = "Mode" + TQString().setNum(index); theName = theConfig.readEntry(Prefix + "Name"); theRemote = theConfig.readEntry(Prefix + "Remote"); theIconFile = theConfig.readEntry(Prefix + "IconFile"); - if(theIconFile.isEmpty()) theIconFile = QString::null; + if(theIconFile.isEmpty()) theIconFile = TQString::null; return *this; } void Mode::saveToConfig(KConfig &theConfig, int index) { - QString Prefix = "Mode" + QString().setNum(index); + TQString Prefix = "Mode" + TQString().setNum(index); theConfig.writeEntry(Prefix + "Name", theName); theConfig.writeEntry(Prefix + "Remote", theRemote); theConfig.writeEntry(Prefix + "IconFile", theIconFile); diff --git a/kdelirc/kdelirc/mode.h b/kdelirc/kdelirc/mode.h index e52c042..9a73fbc 100644 --- a/kdelirc/kdelirc/mode.h +++ b/kdelirc/kdelirc/mode.h @@ -13,7 +13,7 @@ #ifndef MODE_H #define MODE_H -#include <qstring.h> +#include <tqstring.h> #include "remoteserver.h" @@ -25,17 +25,17 @@ class KConfig; class Mode { - QString theName, theRemote, theIconFile; + TQString theName, theRemote, theIconFile; public: - void setName(const QString &a) { theName = a; } - void setRemote(const QString &a) { theRemote = a; } - void setIconFile(const QString &a) { theIconFile = a; } + void setName(const TQString &a) { theName = a; } + void setRemote(const TQString &a) { theRemote = a; } + void setIconFile(const TQString &a) { theIconFile = a; } - const QString &name() const { return theName; } - const QString &remote() const { return theRemote; } - const QString &iconFile() const { return theIconFile; } - const QString &remoteName() const { return RemoteServer::remoteServer()->getRemoteName(theRemote); } + const TQString &name() const { return theName; } + const TQString &remote() const { return theRemote; } + const TQString &iconFile() const { return theIconFile; } + const TQString &remoteName() const { return RemoteServer::remoteServer()->getRemoteName(theRemote); } const Mode &loadFromConfig(KConfig &theConfig, int index); void saveToConfig(KConfig &theConfig, int index); @@ -43,7 +43,7 @@ public: bool operator==(const Mode &mode) const { return mode.theName == theName && mode.theRemote == theRemote; } Mode(); - Mode(const QString &remote, const QString &name, const QString &iconFile = QString::null); + Mode(const TQString &remote, const TQString &name, const TQString &iconFile = TQString::null); ~Mode(); }; diff --git a/kdelirc/kdelirc/modes.cpp b/kdelirc/kdelirc/modes.cpp index 1b60647..5346837 100644 --- a/kdelirc/kdelirc/modes.cpp +++ b/kdelirc/kdelirc/modes.cpp @@ -38,9 +38,9 @@ void Modes::loadFromConfig(KConfig &theConfig) theDefaults[i.key()] = theConfig.readEntry("Default" + i.key()); } -void Modes::generateNulls(const QStringList &theRemotes) +void Modes::generateNulls(const TQStringList &theRemotes) { - for(QStringList::const_iterator i = theRemotes.begin(); i != theRemotes.end(); ++i) + for(TQStringList::const_iterator i = theRemotes.begin(); i != theRemotes.end(); ++i) { if(!contains(*i) || !operator[](*i).contains("")) operator[](*i)[""] = Mode(*i, ""); if(!theDefaults.contains(*i)) theDefaults[*i].isEmpty(); } @@ -55,9 +55,9 @@ bool Modes::isDefault(const Mode &mode) const return false; } -const Mode Modes::getDefault(const QString &remote) const +const Mode Modes::getDefault(const TQString &remote) const { -// if(theDefaults[remote] == QString()) +// if(theDefaults[remote] == TQString()) // return Mode(remote, ""); if(contains(remote)) if(operator[](remote).contains(theDefaults[remote])) @@ -71,7 +71,7 @@ void Modes::purgeAllModes(KConfig &theConfig) { int numModes = theConfig.readNumEntry("Modes"); for(int i = 0; i < numModes; i++) - { QString Prefix = "Mode" + QString().setNum(i); + { TQString Prefix = "Mode" + TQString().setNum(i); theConfig.deleteEntry(Prefix + "Name"); theConfig.deleteEntry(Prefix + "Remote"); } @@ -82,26 +82,26 @@ void Modes::saveToConfig(KConfig &theConfig) int index = 0; purgeAllModes(theConfig); for(iterator i = begin(); i != end(); ++i) - for(QMap<QString, Mode>::iterator j = (*i).begin(); j != (*i).end(); ++j,index++) + for(TQMap<TQString, Mode>::iterator j = (*i).begin(); j != (*i).end(); ++j,index++) (*j).saveToConfig(theConfig, index); theConfig.writeEntry("Modes", index); for(iterator i = begin(); i != end(); ++i) - if(theDefaults[i.key()] == QString()) + if(theDefaults[i.key()] == TQString()) theConfig.writeEntry("Default" + i.key(), ""); else theConfig.writeEntry("Default" + i.key(), theDefaults[i.key()]); } -const Mode &Modes::getMode(const QString &remote, const QString &mode) const +const Mode &Modes::getMode(const TQString &remote, const TQString &mode) const { return operator[](remote)[mode]; } -ModeList Modes::getModes(const QString &remote) const +ModeList Modes::getModes(const TQString &remote) const { ModeList ret; - for(QMap<QString, Mode>::const_iterator i = operator[](remote).begin(); i != operator[](remote).end(); ++i) + for(TQMap<TQString, Mode>::const_iterator i = operator[](remote).begin(); i != operator[](remote).end(); ++i) ret += *i; return ret; } @@ -117,7 +117,7 @@ void Modes::add(const Mode &mode) operator[](mode.remote())[mode.name()] = mode; } -void Modes::rename(Mode &mode, const QString name) +void Modes::rename(Mode &mode, const TQString name) { bool was = isDefault(mode); erase(mode); diff --git a/kdelirc/kdelirc/modes.h b/kdelirc/kdelirc/modes.h index 9eabd4b..ce89d43 100644 --- a/kdelirc/kdelirc/modes.h +++ b/kdelirc/kdelirc/modes.h @@ -13,10 +13,10 @@ #ifndef MODES_H #define MODES_H -#include <qstring.h> -#include <qmap.h> -#include <qpair.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqpair.h> +#include <tqvaluelist.h> #include "mode.h" @@ -26,21 +26,21 @@ class KConfig; -typedef QValueList<Mode> ModeList; +typedef TQValueList<Mode> ModeList; -class Modes : protected QMap<QString, QMap<QString, Mode> > +class Modes : protected TQMap<TQString, TQMap<TQString, Mode> > { void purgeAllModes(KConfig &theConfig); - QMap<QString, QString> theDefaults; + TQMap<TQString, TQString> theDefaults; public: void loadFromConfig(KConfig &theConfig); void saveToConfig(KConfig &theConfig); - void generateNulls(const QStringList &theRemotes); + void generateNulls(const TQStringList &theRemotes); - const Mode &getMode(const QString &remote, const QString &mode) const; - ModeList getModes(const QString &remote) const; - const Mode getDefault(const QString &remote) const; + const Mode &getMode(const TQString &remote, const TQString &mode) const; + ModeList getModes(const TQString &remote) const; + const Mode getDefault(const TQString &remote) const; bool isDefault(const Mode &mode) const; /** @@ -53,7 +53,7 @@ public: void add(const Mode &mode); // dont use this without renaming all the modes in the actions!!! - void rename(Mode &mode, const QString name); + void rename(Mode &mode, const TQString name); Modes(); ~Modes(); diff --git a/kdelirc/kdelirc/profileserver.cpp b/kdelirc/kdelirc/profileserver.cpp index 484deac..7a72c4d 100644 --- a/kdelirc/kdelirc/profileserver.cpp +++ b/kdelirc/kdelirc/profileserver.cpp @@ -11,8 +11,8 @@ // // -#include <qfile.h> -#include <qxml.h> +#include <tqfile.h> +#include <tqxml.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -34,8 +34,8 @@ ProfileServer::~ProfileServer() void ProfileServer::loadProfiles() { - QStringList theFiles = KGlobal::dirs()->findAllResources("data", "profiles/*.profile.xml"); - for(QStringList::iterator i = theFiles.begin(); i != theFiles.end(); ++i) + TQStringList theFiles = KGlobal::dirs()->findAllResources("data", "profiles/*.profile.xml"); + for(TQStringList::iterator i = theFiles.begin(); i != theFiles.end(); ++i) { kdDebug() << "Found data file: " << *i << endl; Profile *p = new Profile(); p->loadFromFile(*i); @@ -52,27 +52,27 @@ Profile::Profile() theActions.setAutoDelete(true); } -const ProfileAction *Profile::searchClass(const QString &c) const +const ProfileAction *Profile::searchClass(const TQString &c) const { - for(QDictIterator<ProfileAction> i(theActions); i.current(); ++i) + for(TQDictIterator<ProfileAction> i(theActions); i.current(); ++i) if(i.current()->getClass() == c) return i; return 0; } -void Profile::loadFromFile(const QString &fileName) +void Profile::loadFromFile(const TQString &fileName) { charBuffer = ""; curPA = 0; curPAA = 0; - QFile xmlFile(fileName); - QXmlInputSource source(&xmlFile); - QXmlSimpleReader reader; + TQFile xmlFile(fileName); + TQXmlInputSource source(&xmlFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.parse(source); } -const ProfileAction *ProfileServer::getAction(const QString &appId, const QString &actionId) const +const ProfileAction *ProfileServer::getAction(const TQString &appId, const TQString &actionId) const { if(theProfiles[appId]) if(theProfiles[appId]->theActions[actionId]) @@ -80,25 +80,25 @@ const ProfileAction *ProfileServer::getAction(const QString &appId, const QStrin return 0; } -const QString &ProfileServer::getServiceName(const QString &appId) const +const TQString &ProfileServer::getServiceName(const TQString &appId) const { if(theProfiles[appId]) return theProfiles[appId]->serviceName(); - return QString::null; + return TQString::null; } -const ProfileAction *ProfileServer::getAction(const QString &appId, const QString &objId, const QString &prototype) const +const ProfileAction *ProfileServer::getAction(const TQString &appId, const TQString &objId, const TQString &prototype) const { return getAction(appId, objId + "::" + prototype); } -bool Profile::characters(const QString &data) +bool Profile::characters(const TQString &data) { charBuffer += data; return true; } -bool Profile::startElement(const QString &, const QString &, const QString &name, const QXmlAttributes &attributes) +bool Profile::startElement(const TQString &, const TQString &, const TQString &name, const TQXmlAttributes &attributes) { if(name == "profile") { theId = attributes.value("id"); @@ -130,7 +130,7 @@ bool Profile::startElement(const QString &, const QString &, const QString &name return true; } -bool Profile::endElement(const QString &, const QString &, const QString &name) +bool Profile::endElement(const TQString &, const TQString &, const TQString &name) { if(name == "name") if(curPA) diff --git a/kdelirc/kdelirc/profileserver.h b/kdelirc/kdelirc/profileserver.h index f906dd0..0228082 100644 --- a/kdelirc/kdelirc/profileserver.h +++ b/kdelirc/kdelirc/profileserver.h @@ -13,12 +13,12 @@ #ifndef PROFILESERVER_H #define PROFILESERVER_H -#include <qpair.h> -#include <qstring.h> -#include <qvaluelist.h> -#include <qmap.h> -#include <qxml.h> -#include <qdict.h> +#include <tqpair.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqmap.h> +#include <tqxml.h> +#include <tqdict.h> /** @author Gav Wood @@ -33,19 +33,19 @@ class Profile; class ProfileActionArgument { - QString theComment, theType; + TQString theComment, theType; Range theRange; - QString theDefault; // should be QVariant? + TQString theDefault; // should be QVariant? const ProfileAction *parent; friend class Profile; public: - const QString &comment() const { return theComment; } - void setComment(const QString &a) { theComment = a; } - const QString &type() const { return theType; } - void setType(const QString &a) { theType = a; } - const QString &getDefault() const { return theDefault; } - void setDefault(const QString &a) { theDefault = a; } + const TQString &comment() const { return theComment; } + void setComment(const TQString &a) { theComment = a; } + const TQString &type() const { return theType; } + void setType(const TQString &a) { theType = a; } + const TQString &getDefault() const { return theDefault; } + void setDefault(const TQString &a) { theDefault = a; } const Range &range() const { return theRange; } void setRange(const Range &a) { theRange = a; } @@ -55,31 +55,31 @@ public: class ProfileAction { - QString theObjId, thePrototype, theName, theComment, theClass; + TQString theObjId, thePrototype, theName, theComment, theClass; float theMultiplier; const Profile *parent; bool theRepeat, theAutoStart; - QValueList<ProfileActionArgument> theArguments; + TQValueList<ProfileActionArgument> theArguments; friend class Profile; public: - const QString &objId() const { return theObjId; } - void setObjId(const QString &a) { theObjId = a; } - const QString &prototype() const { return thePrototype; } - void setPrototype(const QString &a) { thePrototype = a; } - const QString &name() const { return theName; } - void setName(const QString &a) { theName = a; } - const QString &comment() const { return theComment; } - void setComment(const QString &a) { theComment = a; } - const QString &getClass() const { return theClass; } - void setClass(const QString &a) { theClass = a; } + const TQString &objId() const { return theObjId; } + void setObjId(const TQString &a) { theObjId = a; } + const TQString &prototype() const { return thePrototype; } + void setPrototype(const TQString &a) { thePrototype = a; } + const TQString &name() const { return theName; } + void setName(const TQString &a) { theName = a; } + const TQString &comment() const { return theComment; } + void setComment(const TQString &a) { theComment = a; } + const TQString &getClass() const { return theClass; } + void setClass(const TQString &a) { theClass = a; } const float multiplier() const { return theMultiplier; } void setMultiplier(const float a) { theMultiplier = a; } bool repeat() const { return theRepeat; } void setRepeat(bool a) { theRepeat = a; } bool autoStart() const { return theAutoStart; } void setAutoStart(bool a) { theAutoStart = a; } - const QValueList<ProfileActionArgument> &arguments() const { return theArguments; } + const TQValueList<ProfileActionArgument> &arguments() const { return theArguments; } const Profile *profile() const { return parent; } void setProfile(const Profile *a) { parent = a; } @@ -87,37 +87,37 @@ public: class Profile : public QXmlDefaultHandler { - QString theId, theName, theAuthor, theServiceName; + TQString theId, theName, theAuthor, theServiceName; IfMulti theIfMulti; bool theUnique; - QString charBuffer; + TQString charBuffer; ProfileAction *curPA; ProfileActionArgument *curPAA; - QDict<ProfileAction> theActions; // objid+"::"+prototype => ProfileAction + TQDict<ProfileAction> theActions; // objid+"::"+prototype => ProfileAction friend class ProfileServer; public: - bool characters(const QString &data); - bool startElement(const QString &, const QString &, const QString &name, const QXmlAttributes &attributes); - bool endElement(const QString &, const QString &, const QString &name); - - const QString &id() const { return theId; } - void setId(const QString &a) { theId = a; } - const QString &name() const { return theName; } - void setName(const QString &a) { theName = a; } - const QString &author() const { return theAuthor; } - void setAuthor(const QString &a) { theAuthor = a; } + bool characters(const TQString &data); + bool startElement(const TQString &, const TQString &, const TQString &name, const TQXmlAttributes &attributes); + bool endElement(const TQString &, const TQString &, const TQString &name); + + const TQString &id() const { return theId; } + void setId(const TQString &a) { theId = a; } + const TQString &name() const { return theName; } + void setName(const TQString &a) { theName = a; } + const TQString &author() const { return theAuthor; } + void setAuthor(const TQString &a) { theAuthor = a; } const bool unique() const { return theUnique; } void setUnique(const bool a) { theUnique = a; } const IfMulti ifMulti() const { return theIfMulti; } void setIfMulti(const IfMulti a) { theIfMulti = a; } - const QString &serviceName() const { if(theServiceName != QString::null) return theServiceName; return theName; } - void setServiceName(const QString &a) { theServiceName = a; } - const QDict<ProfileAction> &actions() const { return theActions; } - const ProfileAction *searchClass(const QString &c) const; + const TQString &serviceName() const { if(theServiceName != TQString::null) return theServiceName; return theName; } + void setServiceName(const TQString &a) { theServiceName = a; } + const TQDict<ProfileAction> &actions() const { return theActions; } + const ProfileAction *searchClass(const TQString &c) const; - void loadFromFile(const QString &fileName); + void loadFromFile(const TQString &fileName); Profile(); }; @@ -126,14 +126,14 @@ class ProfileServer { static ProfileServer *theInstance; void loadProfiles(); - QDict<Profile> theProfiles; // id => Profile + TQDict<Profile> theProfiles; // id => Profile public: static ProfileServer *profileServer() { if(!theInstance) theInstance = new ProfileServer(); return theInstance; } - const QDict<Profile> profiles() const { return theProfiles; } - const ProfileAction *getAction(const QString &appId, const QString &objId, const QString &prototype) const; - const ProfileAction *getAction(const QString &appId, const QString &actionId) const; - const QString &getServiceName(const QString &appId) const; + const TQDict<Profile> profiles() const { return theProfiles; } + const ProfileAction *getAction(const TQString &appId, const TQString &objId, const TQString &prototype) const; + const ProfileAction *getAction(const TQString &appId, const TQString &actionId) const; + const TQString &getServiceName(const TQString &appId) const; ProfileServer(); ~ProfileServer(); diff --git a/kdelirc/kdelirc/prototype.cpp b/kdelirc/kdelirc/prototype.cpp index 9b0a09b..8e2eedf 100644 --- a/kdelirc/kdelirc/prototype.cpp +++ b/kdelirc/kdelirc/prototype.cpp @@ -10,7 +10,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#include <qregexp.h> +#include <tqregexp.h> #include "prototype.h" @@ -19,7 +19,7 @@ Prototype::Prototype() original = ""; } -Prototype::Prototype(const QString &source) +Prototype::Prototype(const TQString &source) { original = source; parse(); @@ -29,17 +29,17 @@ Prototype::~Prototype() { } -const QString Prototype::argumentList() const +const TQString Prototype::argumentList() const { - QString ret = ""; + TQString ret = ""; for(unsigned i = 0; i < theTypes.count(); i++) ret += (i ? ", " : "") + theTypes[i] + " " + theNames[i]; return ret; } -const QString Prototype::argumentListNN() const +const TQString Prototype::argumentListNN() const { - QString ret = ""; + TQString ret = ""; for(unsigned i = 0; i < theTypes.count(); i++) ret += (i ? ", " : "") + theTypes[i]; return ret; @@ -50,14 +50,14 @@ void Prototype::parse() theNames.clear(); theTypes.clear(); - QRegExp main("^(.*) (\\w[\\d\\w]*)\\((.*)\\)"); - QRegExp parameters("^\\s*([^,\\s]+)(\\s+(\\w[\\d\\w]*))?(,(.*))?$"); + TQRegExp main("^(.*) (\\w[\\d\\w]*)\\((.*)\\)"); + TQRegExp parameters("^\\s*([^,\\s]+)(\\s+(\\w[\\d\\w]*))?(,(.*))?$"); if(main.search(original) == -1) return; theReturn = main.cap(1); theName = main.cap(2); - QString args = main.cap(3); + TQString args = main.cap(3); while(parameters.search(args) != -1) { theTypes += parameters.cap(1); theNames += parameters.cap(3); diff --git a/kdelirc/kdelirc/prototype.h b/kdelirc/kdelirc/prototype.h index 22c1123..0a963f7 100644 --- a/kdelirc/kdelirc/prototype.h +++ b/kdelirc/kdelirc/prototype.h @@ -13,9 +13,9 @@ #ifndef PROTOTYPE_H #define PROTOTYPE_H -#include <qstringlist.h> -#include <qpair.h> -#include <qstring.h> +#include <tqstringlist.h> +#include <tqpair.h> +#include <tqstring.h> /** @author Gav Wood @@ -23,29 +23,29 @@ class Prototype { - QString original, theName, theReturn; - QStringList theNames, theTypes; + TQString original, theName, theReturn; + TQStringList theNames, theTypes; void parse(); public: unsigned count() const{ return theTypes.count(); } - const QPair<QString, QString> operator[](int i) const { return qMakePair(theTypes[i], theNames[i]); } - const QString &name(int i) const { return theNames[i]; } - const QString &type(int i) const { return theTypes[i]; } - const QString &returnType() const { return theReturn; } - const QString &name() const { return theName; } - const QString &prototype() const { return original; } - const QString argumentList() const; - const QString argumentListNN() const; + const QPair<TQString, TQString> operator[](int i) const { return qMakePair(theTypes[i], theNames[i]); } + const TQString &name(int i) const { return theNames[i]; } + const TQString &type(int i) const { return theTypes[i]; } + const TQString &returnType() const { return theReturn; } + const TQString &name() const { return theName; } + const TQString &prototype() const { return original; } + const TQString argumentList() const; + const TQString argumentListNN() const; const int argumentCount() { return theTypes.count(); } - const QString prototypeNR() const { return theName + "(" + argumentListNN() + ")"; } + const TQString prototypeNR() const { return theName + "(" + argumentListNN() + ")"; } - void setPrototype(const QString &source) { original = source; parse(); } + void setPrototype(const TQString &source) { original = source; parse(); } - Prototype &operator=(const QString &source) { setPrototype(source); return *this; } + Prototype &operator=(const TQString &source) { setPrototype(source); return *this; } - Prototype(const QString &source); + Prototype(const TQString &source); Prototype(); ~Prototype(); diff --git a/kdelirc/kdelirc/remoteserver.cpp b/kdelirc/kdelirc/remoteserver.cpp index 25d8f44..db33591 100644 --- a/kdelirc/kdelirc/remoteserver.cpp +++ b/kdelirc/kdelirc/remoteserver.cpp @@ -11,8 +11,8 @@ // // -#include <qfile.h> -#include <qxml.h> +#include <tqfile.h> +#include <tqxml.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -34,8 +34,8 @@ RemoteServer::~RemoteServer() void RemoteServer::loadRemotes() { - QStringList theFiles = KGlobal::dirs()->findAllResources("data", "remotes/*.remote.xml"); - for(QStringList::iterator i = theFiles.begin(); i != theFiles.end(); ++i) + TQStringList theFiles = KGlobal::dirs()->findAllResources("data", "remotes/*.remote.xml"); + for(TQStringList::iterator i = theFiles.begin(); i != theFiles.end(); ++i) { kdDebug() << "Found data file: " << *i << endl; Remote *p = new Remote(); p->loadFromFile(*i); @@ -52,25 +52,25 @@ Remote::~Remote() { } -void Remote::loadFromFile(const QString &fileName) +void Remote::loadFromFile(const TQString &fileName) { charBuffer = ""; curRB = 0; - QFile xmlFile(fileName); - QXmlInputSource source(&xmlFile); - QXmlSimpleReader reader; + TQFile xmlFile(fileName); + TQXmlInputSource source(&xmlFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.parse(source); } -bool Remote::characters(const QString &data) +bool Remote::characters(const TQString &data) { charBuffer += data; return true; } -bool Remote::startElement(const QString &, const QString &, const QString &name, const QXmlAttributes &attributes) +bool Remote::startElement(const TQString &, const TQString &, const TQString &name, const TQXmlAttributes &attributes) { if(name == "remote") theId = theName = attributes.value("id"); @@ -89,7 +89,7 @@ bool Remote::startElement(const QString &, const QString &, const QString &name, return true; } -bool Remote::endElement(const QString &, const QString &, const QString &name) +bool Remote::endElement(const TQString &, const TQString &, const TQString &name) { if(name == "name") if(curRB) diff --git a/kdelirc/kdelirc/remoteserver.h b/kdelirc/kdelirc/remoteserver.h index 3700acd..e74b02e 100644 --- a/kdelirc/kdelirc/remoteserver.h +++ b/kdelirc/kdelirc/remoteserver.h @@ -13,9 +13,9 @@ #ifndef REMOTESERVER_H #define REMOTESERVER_H -#include <qstring.h> -#include <qxml.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqxml.h> +#include <tqdict.h> /** @author Gav Wood @@ -24,45 +24,45 @@ class RemoteButton { - QString theName, theId, theClass, theParameter; + TQString theName, theId, theClass, theParameter; friend class Remote; public: - void setName(const QString &a) { theName = a; } - const QString &name(void) const { return theName; } - void setClass(const QString &a) { theClass = a; } - const QString &getClass(void) const { return theClass; } - void setParameter(const QString &a) { theParameter = a; } - const QString ¶meter(void) const { return theParameter; } - void setId(const QString &a) { theId = a; } - const QString &id(void) const { return theId; } + void setName(const TQString &a) { theName = a; } + const TQString &name(void) const { return theName; } + void setClass(const TQString &a) { theClass = a; } + const TQString &getClass(void) const { return theClass; } + void setParameter(const TQString &a) { theParameter = a; } + const TQString ¶meter(void) const { return theParameter; } + void setId(const TQString &a) { theId = a; } + const TQString &id(void) const { return theId; } }; class Remote : public QXmlDefaultHandler { - QString theName, theId, theAuthor; - QDict<RemoteButton> theButtons; + TQString theName, theId, theAuthor; + TQDict<RemoteButton> theButtons; - QString charBuffer; + TQString charBuffer; RemoteButton *curRB; friend class RemoteServer; public: - bool characters(const QString &data); - bool startElement(const QString &, const QString &, const QString &name, const QXmlAttributes &attributes); - bool endElement(const QString &, const QString &, const QString &name); + bool characters(const TQString &data); + bool startElement(const TQString &, const TQString &, const TQString &name, const TQXmlAttributes &attributes); + bool endElement(const TQString &, const TQString &, const TQString &name); - void setName(const QString &a) { theName = a; } - const QString &name(void) const { return theName; } - void setId(const QString &a) { theId = a; } - const QString &id(void) const { return theId; } - void setAuthor(const QString &a) { theAuthor = a; } - const QString &author(void) const { return theAuthor; } - const QDict<RemoteButton> &buttons() const { return theButtons; } + void setName(const TQString &a) { theName = a; } + const TQString &name(void) const { return theName; } + void setId(const TQString &a) { theId = a; } + const TQString &id(void) const { return theId; } + void setAuthor(const TQString &a) { theAuthor = a; } + const TQString &author(void) const { return theAuthor; } + const TQDict<RemoteButton> &buttons() const { return theButtons; } - void loadFromFile(const QString &fileName); + void loadFromFile(const TQString &fileName); - const QString &getButtonName(const QString &id) const { if(theButtons[id]) return theButtons[id]->name(); return id; } + const TQString &getButtonName(const TQString &id) const { if(theButtons[id]) return theButtons[id]->name(); return id; } Remote(); ~Remote(); @@ -72,15 +72,15 @@ class RemoteServer { static RemoteServer *theInstance; void loadRemotes(); - QDict<Remote> theRemotes; + TQDict<Remote> theRemotes; public: static RemoteServer *remoteServer() { if(!theInstance) theInstance = new RemoteServer(); return theInstance; } - const QDict<Remote> &remotes() const { return theRemotes; } + const TQDict<Remote> &remotes() const { return theRemotes; } - const QString &getRemoteName(const QString &id) const { if(theRemotes[id]) return theRemotes[id]->name(); return id; } - const QString &getButtonName(const QString &remote, const QString &button) const { if(theRemotes[remote]) return theRemotes[remote]->getButtonName(button); return button; } + const TQString &getRemoteName(const TQString &id) const { if(theRemotes[id]) return theRemotes[id]->name(); return id; } + const TQString &getButtonName(const TQString &remote, const TQString &button) const { if(theRemotes[remote]) return theRemotes[remote]->getButtonName(button); return button; } RemoteServer(); ~RemoteServer(); |