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 /superkaramba/src/lineparser.cpp | |
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 'superkaramba/src/lineparser.cpp')
-rw-r--r-- | superkaramba/src/lineparser.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/superkaramba/src/lineparser.cpp b/superkaramba/src/lineparser.cpp index d923b6c..24d5468 100644 --- a/superkaramba/src/lineparser.cpp +++ b/superkaramba/src/lineparser.cpp @@ -21,9 +21,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ****************************************************************************/ #include "lineparser.h" -#include <qregexp.h> +#include <tqregexp.h> -LineParser::LineParser(const QString& line) +LineParser::LineParser(const TQString& line) { set(line); } @@ -32,42 +32,42 @@ LineParser::~LineParser() { } -void LineParser::set(const QString& line) +void LineParser::set(const TQString& line) { - QRegExp rx("^\\s*(\\S+)"); + TQRegExp rx("^\\s*(\\S+)"); m_line = line; rx.search(m_line); m_meter = rx.cap(1).upper(); } -int LineParser::getInt(QString w, int def) const +int LineParser::getInt(TQString w, int def) const { - QRegExp rx( "\\W+" + w +"=([-]?\\d+)", false ); + TQRegExp rx( "\\W+" + w +"=([-]?\\d+)", false ); if (rx.search(m_line) != -1) return rx.cap(1).toInt(); else return def; } -QColor LineParser::getColor(QString w, QColor def) const +TQColor LineParser::getColor(TQString w, TQColor def) const { - QRegExp rx( "\\W+" + w + "=([-]?\\d+),([-]?\\d+),([-]?\\d+)", false ); + TQRegExp rx( "\\W+" + w + "=([-]?\\d+),([-]?\\d+),([-]?\\d+)", false ); if (rx.search(m_line) != -1) - return QColor(rx.cap(1).toInt(), rx.cap(2).toInt(), rx.cap(3).toInt()); + return TQColor(rx.cap(1).toInt(), rx.cap(2).toInt(), rx.cap(3).toInt()); else return def; } -QString LineParser::getString(QString w, QString def) const +TQString LineParser::getString(TQString w, TQString def) const { - QString result; - QRegExp rx( "\\W+" + w + "=\"([^\"]*)\"", false ); + TQString result; + TQRegExp rx( "\\W+" + w + "=\"([^\"]*)\"", false ); bool found = (rx.search(m_line)==-1)?false:true; if (rx.cap(1).isEmpty()) { - rx = QRegExp(w + "=(\\S+)", false); + rx = TQRegExp(w + "=(\\S+)", false); found = (rx.search(m_line)==-1)?false:true; result = rx.cap(1); } @@ -81,9 +81,9 @@ QString LineParser::getString(QString w, QString def) const return def; } -bool LineParser::getBoolean(QString w, bool def) const +bool LineParser::getBoolean(TQString w, bool def) const { - QString boolean = getString(w, "-").lower(); + TQString boolean = getString(w, "-").lower(); if(boolean == "-") return def; else if (boolean == "true") // true / false |