summaryrefslogtreecommitdiffstats
path: root/kanagram
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kanagram
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kanagram')
-rw-r--r--kanagram/src/fontutils.cpp10
-rw-r--r--kanagram/src/fontutils.h2
-rw-r--r--kanagram/src/grammarmanager.cpp118
-rw-r--r--kanagram/src/grammarmanager.h124
-rw-r--r--kanagram/src/kanagram.cpp216
-rw-r--r--kanagram/src/kanagram.h40
-rw-r--r--kanagram/src/kanagramgame.cpp28
-rw-r--r--kanagram/src/kanagramgame.h32
-rw-r--r--kanagram/src/keduvocdocument.cpp136
-rw-r--r--kanagram/src/keduvocdocument.h156
-rw-r--r--kanagram/src/keduvocexpression.cpp58
-rw-r--r--kanagram/src/keduvocexpression.h76
-rw-r--r--kanagram/src/keduvockvtmlreader.cpp296
-rw-r--r--kanagram/src/keduvockvtmlreader.h64
-rw-r--r--kanagram/src/keduvockvtmlwriter.cpp232
-rw-r--r--kanagram/src/keduvockvtmlwriter.h34
-rw-r--r--kanagram/src/leitnerbox.cpp4
-rw-r--r--kanagram/src/leitnerbox.h8
-rw-r--r--kanagram/src/leitnersystem.cpp38
-rw-r--r--kanagram/src/leitnersystem.h40
-rw-r--r--kanagram/src/leitnersystemview.cpp24
-rw-r--r--kanagram/src/leitnersystemview.h16
-rw-r--r--kanagram/src/main.cpp14
-rw-r--r--kanagram/src/mainsettings.cpp40
-rw-r--r--kanagram/src/mainsettings.h4
-rw-r--r--kanagram/src/multiplechoice.cpp12
-rw-r--r--kanagram/src/multiplechoice.h36
-rw-r--r--kanagram/src/newstuff.cpp8
-rw-r--r--kanagram/src/newstuff.h2
-rw-r--r--kanagram/src/newstuffdialog.cpp8
-rw-r--r--kanagram/src/newstuffdialog.h6
-rw-r--r--kanagram/src/vocabedit.cpp48
-rw-r--r--kanagram/src/vocabedit.h16
-rw-r--r--kanagram/src/vocabsettings.cpp30
-rw-r--r--kanagram/src/vocabsettings.h8
35 files changed, 992 insertions, 992 deletions
diff --git a/kanagram/src/fontutils.cpp b/kanagram/src/fontutils.cpp
index 320f501f..14fff456 100644
--- a/kanagram/src/fontutils.cpp
+++ b/kanagram/src/fontutils.cpp
@@ -7,18 +7,18 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "fontutils.h"
-int fontUtils::fontSize(QPainter &p, const QString &s1, int w, int h)
+int fontUtils::fontSize(TQPainter &p, const TQString &s1, int w, int h)
{
- QRect aux1;
- QFont f = p.font();
+ TQRect aux1;
+ TQFont f = p.font();
f.setPointSize(28);
p.setFont(f);
- aux1 = p.boundingRect(QRect(), Qt::AlignAuto, s1);
+ aux1 = p.boundingRect(TQRect(), Qt::AlignAuto, s1);
return QMIN(w * 28 / aux1.width(), h * 28 / aux1.height());
}
diff --git a/kanagram/src/fontutils.h b/kanagram/src/fontutils.h
index b6bc9c97..b458f394 100644
--- a/kanagram/src/fontutils.h
+++ b/kanagram/src/fontutils.h
@@ -12,7 +12,7 @@
namespace fontUtils
{
- int fontSize(QPainter &p, const QString &s1, int w, int h);
+ int fontSize(TQPainter &p, const TQString &s1, int w, int h);
}
#endif
diff --git a/kanagram/src/grammarmanager.cpp b/kanagram/src/grammarmanager.cpp
index dd526fd5..71387b91 100644
--- a/kanagram/src/grammarmanager.cpp
+++ b/kanagram/src/grammarmanager.cpp
@@ -42,15 +42,15 @@ Conjugation::names [] =
};
-vector<QString> Conjugation::userTenses;
+vector<TQString> Conjugation::userTenses;
//================================================================
Comparison::Comparison (
- const QString &l1,
- const QString &l2,
- const QString &l3
+ const TQString &l1,
+ const TQString &l2,
+ const TQString &l3
)
{
setL1 (l1);
@@ -79,9 +79,9 @@ void Comparison::clear()
Article::Article
- (const QString &fem_def, const QString &fem_indef,
- const QString &mal_def, const QString &mal_indef,
- const QString &nat_def, const QString &nat_indef
+ (const TQString &fem_def, const TQString &fem_indef,
+ const TQString &mal_def, const TQString &mal_indef,
+ const TQString &nat_def, const TQString &nat_indef
)
{
setFemale (fem_def, fem_indef);
@@ -91,7 +91,7 @@ Article::Article
void Article::setFemale
- (const QString &def, const QString &indef)
+ (const TQString &def, const TQString &indef)
{
fem_def = def;
fem_indef = indef;
@@ -99,7 +99,7 @@ void Article::setFemale
void Article::setMale
- (const QString &def, const QString &indef)
+ (const TQString &def, const TQString &indef)
{
mal_def = def;
mal_indef = indef;
@@ -107,7 +107,7 @@ void Article::setMale
void Article::setNatural
- (const QString &def, const QString &indef)
+ (const TQString &def, const TQString &indef)
{
nat_def = def;
nat_indef = indef;
@@ -115,7 +115,7 @@ void Article::setNatural
void Article::female
- (QString &def, QString &indef) const
+ (TQString &def, TQString &indef) const
{
def = fem_def;
indef = fem_indef;
@@ -123,7 +123,7 @@ void Article::female
void Article::male
- (QString &def, QString &indef) const
+ (TQString &def, TQString &indef) const
{
def = mal_def;
indef = mal_indef;
@@ -131,7 +131,7 @@ void Article::male
void Article::natural
- (QString &def, QString &indef) const
+ (TQString &def, TQString &indef) const
{
def = nat_def;
indef = nat_indef;
@@ -158,7 +158,7 @@ vector<TenseRelation> Conjugation::getRelation ()
}
for (int i = 0; i < (int) userTenses.size(); i++) {
- QString s;
+ TQString s;
s.setNum(i+1);
s.insert(0, UL_USER_TENSE);
vec.push_back(TenseRelation(s, userTenses[i]));
@@ -168,16 +168,16 @@ vector<TenseRelation> Conjugation::getRelation ()
}
-void Conjugation::setTenseNames (vector<QString> names)
+void Conjugation::setTenseNames (vector<TQString> names)
{
userTenses = names;
}
-QString Conjugation::getName (const QString &abbrev)
+TQString Conjugation::getName (const TQString &abbrev)
{
- if (abbrev.length() >= 2 && abbrev[0] == QString(UL_USER_TENSE)) {
- QString s = abbrev;
+ if (abbrev.length() >= 2 && abbrev[0] == TQString(UL_USER_TENSE)) {
+ TQString s = abbrev;
s.remove(0, 1);
int i = s.toInt() - 1;
@@ -197,7 +197,7 @@ QString Conjugation::getName (const QString &abbrev)
}
-QString Conjugation::getName (int idx)
+TQString Conjugation::getName (int idx)
{
if (idx < numInternalNames() )
return i18n(names[idx].name);
@@ -210,11 +210,11 @@ QString Conjugation::getName (int idx)
}
-QString Conjugation::getAbbrev (const QString &name)
+TQString Conjugation::getAbbrev (const TQString &name)
{
for (int i = 0; i < (int) userTenses.size(); i++)
if (userTenses[i] == name) {
- QString s;
+ TQString s;
s.setNum(i+1);
s.insert(0, UL_USER_TENSE);
return s;
@@ -228,13 +228,13 @@ QString Conjugation::getAbbrev (const QString &name)
}
-QString Conjugation::getAbbrev (int idx)
+TQString Conjugation::getAbbrev (int idx)
{
if (idx < numInternalNames() )
return names[idx].abbrev;
else if (idx < numTenses() ) {
- QString s;
+ TQString s;
s.setNum(idx-numInternalNames()+1);
s.insert(0, UL_USER_TENSE);
return s;
@@ -257,7 +257,7 @@ int Conjugation::numTenses()
}
-QString Conjugation::getType (int idx)
+TQString Conjugation::getType (int idx)
{
if (idx >= (int) conjugations.size() )
return "";
@@ -266,7 +266,7 @@ QString Conjugation::getType (int idx)
}
-void Conjugation::setType (int idx, const QString & type)
+void Conjugation::setType (int idx, const TQString & type)
{
if (idx >= (int) conjugations.size() )
return;
@@ -321,83 +321,83 @@ bool Conjugation::isEmpty (int idx)
return default;
-bool Conjugation::pers3SingularCommon(const QString &type) const
+bool Conjugation::pers3SingularCommon(const TQString &type) const
{
_GET_CON_(s3common, type, false);
}
-bool Conjugation::pers3PluralCommon(const QString &type) const
+bool Conjugation::pers3PluralCommon(const TQString &type) const
{
_GET_CON_(p3common, type, false);
}
-QString Conjugation::pers1Singular
- (const QString &type) const
+TQString Conjugation::pers1Singular
+ (const TQString &type) const
{
_GET_CON_(pers1_sing, type, "");
}
-QString Conjugation::pers2Singular
- (const QString &type) const
+TQString Conjugation::pers2Singular
+ (const TQString &type) const
{
_GET_CON_(pers2_sing, type, "");
}
-QString Conjugation::pers3FemaleSingular
- (const QString &type) const
+TQString Conjugation::pers3FemaleSingular
+ (const TQString &type) const
{
_GET_CON_(pers3_f_sing, type, "");
}
-QString Conjugation::pers3MaleSingular
- (const QString &type) const
+TQString Conjugation::pers3MaleSingular
+ (const TQString &type) const
{
_GET_CON_(pers3_m_sing, type, "");
}
-QString Conjugation::pers3NaturalSingular
- (const QString &type) const
+TQString Conjugation::pers3NaturalSingular
+ (const TQString &type) const
{
_GET_CON_(pers3_n_sing, type, "");
}
-QString Conjugation::pers1Plural
- (const QString &type) const
+TQString Conjugation::pers1Plural
+ (const TQString &type) const
{
_GET_CON_(pers1_plur, type, "");
}
-QString Conjugation::pers2Plural
- (const QString &type) const
+TQString Conjugation::pers2Plural
+ (const TQString &type) const
{
_GET_CON_(pers2_plur, type, "");
}
-QString Conjugation::pers3FemalePlural
- (const QString &type) const
+TQString Conjugation::pers3FemalePlural
+ (const TQString &type) const
{
_GET_CON_(pers3_f_plur, type, "");
}
-QString Conjugation::pers3MalePlural
- (const QString &type) const
+TQString Conjugation::pers3MalePlural
+ (const TQString &type) const
{
_GET_CON_(pers3_m_plur, type, "");
}
-QString Conjugation::pers3NaturalPlural
- (const QString &type) const
+TQString Conjugation::pers3NaturalPlural
+ (const TQString &type) const
{
_GET_CON_(pers3_n_plur, type, "");
}
@@ -418,83 +418,83 @@ QString Conjugation::pers3NaturalPlural
conjugations.push_back(ct);
-void Conjugation::setPers3PluralCommon(const QString &type, bool f)
+void Conjugation::setPers3PluralCommon(const TQString &type, bool f)
{
_SET_CON_(p3common, type, f);
}
-void Conjugation::setPers3SingularCommon(const QString &type, bool f)
+void Conjugation::setPers3SingularCommon(const TQString &type, bool f)
{
_SET_CON_(s3common, type, f);
}
void Conjugation::setPers1Singular
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers1_sing, type, str);
}
void Conjugation::setPers2Singular
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers2_sing, type, str);
}
void Conjugation::setPers3FemaleSingular
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers3_f_sing, type, str);
}
void Conjugation::setPers3MaleSingular
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers3_m_sing, type, str);
}
void Conjugation::setPers3NaturalSingular
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers3_n_sing, type, str);
}
void Conjugation::setPers1Plural
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers1_plur, type, str);
}
void Conjugation::setPers2Plural
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers2_plur, type, str);
}
void Conjugation::setPers3FemalePlural
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers3_f_plur, type, str);
}
void Conjugation::setPers3MalePlural
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers3_m_plur, type, str);
}
void Conjugation::setPers3NaturalPlural
- (const QString &type, const QString &str)
+ (const TQString &type, const TQString &str)
{
_SET_CON_(pers3_n_plur, type, str);
}
diff --git a/kanagram/src/grammarmanager.h b/kanagram/src/grammarmanager.h
index 1b9cfe76..01f020b9 100644
--- a/kanagram/src/grammarmanager.h
+++ b/kanagram/src/grammarmanager.h
@@ -27,7 +27,7 @@
#ifndef grammarmanager_included
#define grammarmanager_included
-#include <qstring.h>
+#include <tqstring.h>
#include <vector>
using namespace std;
@@ -54,22 +54,22 @@ public:
Article() {}
Article (
- const QString &fem_def, const QString &fem_indef,
- const QString &mal_def, const QString &mal_indef,
- const QString &nat_def, const QString &nat_indef
+ const TQString &fem_def, const TQString &fem_indef,
+ const TQString &mal_def, const TQString &mal_indef,
+ const TQString &nat_def, const TQString &nat_indef
);
- void setFemale (const QString &def, const QString &indef);
- void setMale (const QString &def, const QString &indef);
- void setNatural (const QString &def, const QString &indef);
+ void setFemale (const TQString &def, const TQString &indef);
+ void setMale (const TQString &def, const TQString &indef);
+ void setNatural (const TQString &def, const TQString &indef);
- void female (QString &def, QString &indef) const;
- void male (QString &def, QString &indef) const;
- void natural (QString &def, QString &indef) const;
+ void female (TQString &def, TQString &indef) const;
+ void male (TQString &def, TQString &indef) const;
+ void natural (TQString &def, TQString &indef) const;
protected:
- QString fem_def, fem_indef,
+ TQString fem_def, fem_indef,
mal_def, mal_indef,
nat_def, nat_indef;
};
@@ -83,25 +83,25 @@ public:
Comparison() {}
Comparison (
- const QString &l1,
- const QString &l2,
- const QString &l3
+ const TQString &l1,
+ const TQString &l2,
+ const TQString &l3
);
- void setL1 (const QString &s) { ls1 = s; }
- void setL2 (const QString &s) { ls2 = s; }
- void setL3 (const QString &s) { ls3 = s; }
+ void setL1 (const TQString &s) { ls1 = s; }
+ void setL2 (const TQString &s) { ls2 = s; }
+ void setL3 (const TQString &s) { ls3 = s; }
- QString l1 () const { return ls1; }
- QString l2 () const { return ls2; }
- QString l3 () const { return ls3; }
+ TQString l1 () const { return ls1; }
+ TQString l2 () const { return ls2; }
+ TQString l3 () const { return ls3; }
bool isEmpty() const;
void clear();
protected:
- QString ls1, ls2, ls3;
+ TQString ls1, ls2, ls3;
};
@@ -109,15 +109,15 @@ class TenseRelation
{
public:
- TenseRelation (const QString & _short, const QString & _long)
+ TenseRelation (const TQString & _short, const TQString & _long)
: shortId (_short), longId(_long) {}
- inline QString shortStr() const { return shortId; }
- inline QString longStr() const { return longId; }
+ inline TQString shortStr() const { return shortId; }
+ inline TQString longStr() const { return longId; }
protected:
- QString shortId, longId;
+ TQString shortId, longId;
};
@@ -131,47 +131,47 @@ public:
int numEntries() const;
static vector<TenseRelation> getRelation ();
- static void setTenseNames (vector<QString> names);
+ static void setTenseNames (vector<TQString> names);
- static QString getName (const QString &abbrev);
- static QString getName (int index);
- static QString getAbbrev (const QString &name);
- static QString getAbbrev (int index);
+ static TQString getName (const TQString &abbrev);
+ static TQString getName (int index);
+ static TQString getAbbrev (const TQString &name);
+ static TQString getAbbrev (int index);
static int numInternalNames();
static int numTenses();
- QString getType (int index);
- void setType (int index, const QString & type);
+ TQString getType (int index);
+ void setType (int index, const TQString & type);
void cleanUp();
bool isEmpty (int idx);
- QString pers1Singular(const QString &type) const;
- QString pers2Singular(const QString &type) const;
- bool pers3SingularCommon(const QString &type) const;
- QString pers3FemaleSingular(const QString &type) const;
- QString pers3MaleSingular(const QString &type) const;
- QString pers3NaturalSingular(const QString &type) const;
-
- QString pers1Plural(const QString &type) const;
- QString pers2Plural(const QString &type) const;
- bool pers3PluralCommon(const QString &type) const;
- QString pers3FemalePlural(const QString &type) const;
- QString pers3MalePlural(const QString &type) const;
- QString pers3NaturalPlural(const QString &type) const;
-
- void setPers1Singular(const QString &type, const QString &str);
- void setPers2Singular(const QString &type, const QString &str);
- void setPers3SingularCommon(const QString &type, bool f);
- void setPers3FemaleSingular(const QString &type, const QString &str);
- void setPers3MaleSingular(const QString &type, const QString &str);
- void setPers3NaturalSingular(const QString &type, const QString &str);
-
- void setPers1Plural(const QString &type, const QString &str);
- void setPers2Plural(const QString &type, const QString &str);
- void setPers3PluralCommon(const QString &type, bool f);
- void setPers3FemalePlural(const QString &type, const QString &str);
- void setPers3MalePlural(const QString &type, const QString &str);
- void setPers3NaturalPlural(const QString &type, const QString &str);
+ TQString pers1Singular(const TQString &type) const;
+ TQString pers2Singular(const TQString &type) const;
+ bool pers3SingularCommon(const TQString &type) const;
+ TQString pers3FemaleSingular(const TQString &type) const;
+ TQString pers3MaleSingular(const TQString &type) const;
+ TQString pers3NaturalSingular(const TQString &type) const;
+
+ TQString pers1Plural(const TQString &type) const;
+ TQString pers2Plural(const TQString &type) const;
+ bool pers3PluralCommon(const TQString &type) const;
+ TQString pers3FemalePlural(const TQString &type) const;
+ TQString pers3MalePlural(const TQString &type) const;
+ TQString pers3NaturalPlural(const TQString &type) const;
+
+ void setPers1Singular(const TQString &type, const TQString &str);
+ void setPers2Singular(const TQString &type, const TQString &str);
+ void setPers3SingularCommon(const TQString &type, bool f);
+ void setPers3FemaleSingular(const TQString &type, const TQString &str);
+ void setPers3MaleSingular(const TQString &type, const TQString &str);
+ void setPers3NaturalSingular(const TQString &type, const TQString &str);
+
+ void setPers1Plural(const TQString &type, const TQString &str);
+ void setPers2Plural(const TQString &type, const TQString &str);
+ void setPers3PluralCommon(const TQString &type, bool f);
+ void setPers3FemalePlural(const TQString &type, const TQString &str);
+ void setPers3MalePlural(const TQString &type, const TQString &str);
+ void setPers3NaturalPlural(const TQString &type, const TQString &str);
private:
@@ -182,10 +182,10 @@ private:
s3common = false;
}
- QString type;
+ TQString type;
bool p3common,
s3common;
- QString pers1_sing,
+ TQString pers1_sing,
pers2_sing,
pers3_m_sing,
pers3_f_sing,
@@ -207,7 +207,7 @@ protected:
vector<conjug_t> conjugations;
static conjug_name_t names [];
- static vector<QString> userTenses;
+ static vector<TQString> userTenses;
};
diff --git a/kanagram/src/kanagram.cpp b/kanagram/src/kanagram.cpp
index 088453a2..42cb90f9 100644
--- a/kanagram/src/kanagram.cpp
+++ b/kanagram/src/kanagram.cpp
@@ -24,13 +24,13 @@ using namespace std;
#include <config.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qstring.h>
-#include <qfontmetrics.h>
-#include <qdir.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqstring.h>
+#include <tqfontmetrics.h>
+#include <tqdir.h>
#include <kaction.h>
#include <kapplication.h>
@@ -55,47 +55,47 @@ using namespace std;
static const char* m_textRevealWord = I18N_NOOP("reveal word");
static const char* m_textHint = I18N_NOOP("hint");
-Kanagram::Kanagram() : QWidget(0, 0, WStaticContents | WNoAutoErase), m_overNext(false), m_overConfig(false), m_overHelp(false), m_overQuit(false), m_overReveal(false), m_overHint(false), m_overUp(false), m_overHintBox(false), m_showHint(false)
+Kanagram::Kanagram() : TQWidget(0, 0, WStaticContents | WNoAutoErase), m_overNext(false), m_overConfig(false), m_overHelp(false), m_overQuit(false), m_overReveal(false), m_overHint(false), m_overUp(false), m_overHintBox(false), m_showHint(false)
{
m_game = new KanagramGame(this);
- m_back = new QPixmap(locate("appdata", "images/kanagram.png"));
- m_aboutKDEOverlay = new QPixmap(locate("appdata", "images/kicon.png"));
- m_aboutKDEOverlayOver = new QPixmap(locate("appdata", "images/kiconover.png"));
- m_aboutAppOverlay = new QPixmap(locate("appdata", "images/appicon.png"));
- m_aboutAppOverlayOver = new QPixmap(locate("appdata", "images/appiconover.png"));
- m_handbookOverlay = new QPixmap(locate("appdata", "images/handbookicon.png"));
- m_handbookOverlayOver = new QPixmap(locate("appdata", "images/handbookiconover.png"));
- m_card = new QPixmap(locate("appdata", "images/card.png"));
-
- m_next = new QPixmap(locate("appdata", "images/next.png"));
- m_nextOver = new QPixmap(locate("appdata", "images/nextover.png"));
- m_config = new QPixmap(locate("appdata", "images/config.png"));
- m_configOver = new QPixmap(locate("appdata", "images/configover.png"));
- m_help = new QPixmap(locate("appdata", "images/help.png"));
- m_helpOver = new QPixmap(locate("appdata", "images/helpover.png"));
- m_quit = new QPixmap(locate("appdata", "images/quit.png"));
- m_quitOver = new QPixmap(locate("appdata", "images/quitover.png"));
-
- m_up = new QPixmap(locate("appdata", "images/up.png"));
- m_upOver = new QPixmap(locate("appdata", "images/upover.png"));
- m_upDisabled = new QPixmap(locate("appdata", "images/updisabled.png"));
-
- m_nextRect = QRect(477, 31, 134, 76);
- m_configRect = QRect(477, 122, 134, 76);
- m_helpRect = QRect(477, 212, 134, 76);
- m_quitRect = QRect(453, 352, 182, 104);
-
- m_hintBoxRect = QRect(446, 207, 171, 85);
- m_upRect = QRect(341, 425, 55, 33);
- m_aboutKDERect = QRect(567, 213, 44, 44);
- m_aboutAppRect = QRect(522, 213, 44, 44);
- m_handbookRect = QRect(478, 213, 44, 44);
- m_arrowRect = QRect(380, 134, 13, 20);
- m_logoRect = QRect(76, 24, 297, 50);
+ m_back = new TQPixmap(locate("appdata", "images/kanagram.png"));
+ m_aboutKDEOverlay = new TQPixmap(locate("appdata", "images/kicon.png"));
+ m_aboutKDEOverlayOver = new TQPixmap(locate("appdata", "images/kiconover.png"));
+ m_aboutAppOverlay = new TQPixmap(locate("appdata", "images/appicon.png"));
+ m_aboutAppOverlayOver = new TQPixmap(locate("appdata", "images/appiconover.png"));
+ m_handbookOverlay = new TQPixmap(locate("appdata", "images/handbookicon.png"));
+ m_handbookOverlayOver = new TQPixmap(locate("appdata", "images/handbookiconover.png"));
+ m_card = new TQPixmap(locate("appdata", "images/card.png"));
+
+ m_next = new TQPixmap(locate("appdata", "images/next.png"));
+ m_nextOver = new TQPixmap(locate("appdata", "images/nextover.png"));
+ m_config = new TQPixmap(locate("appdata", "images/config.png"));
+ m_configOver = new TQPixmap(locate("appdata", "images/configover.png"));
+ m_help = new TQPixmap(locate("appdata", "images/help.png"));
+ m_helpOver = new TQPixmap(locate("appdata", "images/helpover.png"));
+ m_quit = new TQPixmap(locate("appdata", "images/quit.png"));
+ m_quitOver = new TQPixmap(locate("appdata", "images/quitover.png"));
+
+ m_up = new TQPixmap(locate("appdata", "images/up.png"));
+ m_upOver = new TQPixmap(locate("appdata", "images/upover.png"));
+ m_upDisabled = new TQPixmap(locate("appdata", "images/updisabled.png"));
+
+ m_nextRect = TQRect(477, 31, 134, 76);
+ m_configRect = TQRect(477, 122, 134, 76);
+ m_helpRect = TQRect(477, 212, 134, 76);
+ m_quitRect = TQRect(453, 352, 182, 104);
+
+ m_hintBoxRect = TQRect(446, 207, 171, 85);
+ m_upRect = TQRect(341, 425, 55, 33);
+ m_aboutKDERect = TQRect(567, 213, 44, 44);
+ m_aboutAppRect = TQRect(522, 213, 44, 44);
+ m_handbookRect = TQRect(478, 213, 44, 44);
+ m_arrowRect = TQRect(380, 134, 13, 20);
+ m_logoRect = TQRect(76, 24, 297, 50);
//blackboardRect intentionally wrong to make sure fonts align correctly
- m_blackboardRect = QRect(41, 116, 366, 255);
+ m_blackboardRect = TQRect(41, 116, 366, 255);
setupRects();
@@ -103,27 +103,27 @@ Kanagram::Kanagram() : QWidget(0, 0, WStaticContents | WNoAutoErase), m_overNext
setFixedSize(650, 471);
show();
- m_chalkColor = QColor(155, 155, 155);
- m_chalkHighlightColor = QColor(255, 255, 255);
- m_fillColor = QColor(45, 45, 45);
- m_fontColor = QColor(55, 55, 55);
- m_fontHighlightColor = QColor(99, 99, 99);
+ m_chalkColor = TQColor(155, 155, 155);
+ m_chalkHighlightColor = TQColor(255, 255, 255);
+ m_fillColor = TQColor(45, 45, 45);
+ m_fontColor = TQColor(55, 55, 55);
+ m_fontHighlightColor = TQColor(99, 99, 99);
loadSettings();
- m_hintTimer = new QTimer(this);
+ m_hintTimer = new TQTimer(this);
m_helpMenu = new KHelpMenu(this, kapp->aboutData());
- m_inputBox = new QLineEdit(this);
- m_inputBox->setGeometry(QRect(52, 427, 273, 29));
+ m_inputBox = new TQLineEdit(this);
+ m_inputBox->setGeometry(TQRect(52, 427, 273, 29));
m_inputBox->setFrame(false);
- connect(m_inputBox, SIGNAL(returnPressed()), this, SLOT(checkWord()));
- connect(m_hintTimer, SIGNAL(timeout()), this, SLOT(hideHint()));
- connect(m_inputBox, SIGNAL(textChanged(const QString &)), this, SLOT(update()));
+ connect(m_inputBox, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(checkWord()));
+ connect(m_hintTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hideHint()));
+ connect(m_inputBox, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(update()));
- QFont f = QFont();
+ TQFont f = TQFont();
f.setPointSize(17);
m_inputBox->setFont(f);
m_inputBox->show();
@@ -144,7 +144,7 @@ Kanagram::~Kanagram()
void Kanagram::loadSettings()
{
- QString hideTime = KanagramSettings::hintHideTime();
+ TQString hideTime = KanagramSettings::hintHideTime();
if(hideTime[0].isDigit())
m_hintHideTime = hideTime[0].digitValue();
else
@@ -156,14 +156,14 @@ void Kanagram::loadSettings()
if(m_useStandardFonts)
{
m_blackboardFont = KGlobalSettings::generalFont();
- m_arrow = new QPixmap(locate("appdata", "images/basicarrow.png"));
- m_arrowOver = new QPixmap(locate("appdata", "images/basicarrowover.png"));
+ m_arrow = new TQPixmap(locate("appdata", "images/basicarrow.png"));
+ m_arrowOver = new TQPixmap(locate("appdata", "images/basicarrowover.png"));
}
else
{
- m_blackboardFont = QFont("squeaky chalk sound");
- m_arrow = new QPixmap(locate("appdata", "images/arrow.png"));
- m_arrowOver = new QPixmap(locate("appdata", "images/arrowover.png"));
+ m_blackboardFont = TQFont("squeaky chalk sound");
+ m_arrow = new TQPixmap(locate("appdata", "images/arrow.png"));
+ m_arrowOver = new TQPixmap(locate("appdata", "images/arrowover.png"));
}
m_game->refreshVocabList();
@@ -171,24 +171,24 @@ void Kanagram::loadSettings()
void Kanagram::setupRects()
{
- QPainter tmpp(this);
- QFont font = m_blackboardFont;
+ TQPainter tmpp(this);
+ TQFont font = m_blackboardFont;
font.setPointSize(14);
font.setBold(true);
tmpp.setFont(font);
int yOffset = 0;
//set appropriate yOffset for different fonts
if(m_useStandardFonts) yOffset = 6;
- QRect r = innerRect(m_blackboardRect, 6, yOffset);
+ TQRect r = innerRect(m_blackboardRect, 6, yOffset);
m_hintRect = tmpp.boundingRect(r, Qt::AlignBottom|Qt::AlignLeft, i18n(m_textHint));
m_revealRect = tmpp.boundingRect(r, Qt::AlignBottom|Qt::AlignRight, i18n(m_textRevealWord));
tmpp.end();
}
-void Kanagram::paintEvent(QPaintEvent *)
+void Kanagram::paintEvent(TQPaintEvent *)
{
- QPixmap buf(width(), height());
- QPainter p(&buf);
+ TQPixmap buf(width(), height());
+ TQPainter p(&buf);
p.drawPixmap(0, 0, *m_back);
@@ -222,10 +222,10 @@ void Kanagram::paintEvent(QPaintEvent *)
//draw vocab switcher
drawSwitcher(p, 9, 8);
- p.setPen(QPen(black, 3));
+ p.setPen(TQPen(black, 3));
//Draw the border of the input box
- QRect borderRect = m_inputBox->geometry();
+ TQRect borderRect = m_inputBox->geometry();
borderRect.setLeft(borderRect.left() - 2);
borderRect.setTop(borderRect.top() - 2);
borderRect.setWidth(borderRect.width() + 2 * 1);
@@ -247,8 +247,8 @@ void Kanagram::paintEvent(QPaintEvent *)
if(m_showHint)
{
p.drawPixmap(439, 204, *m_hintOverlay);
- QFont f = QFont(m_font);
- f.setWeight(QFont::Bold);
+ TQFont f = TQFont(m_font);
+ f.setWeight(TQFont::Bold);
f.setPointSize(10);
p.setFont(f);
p.drawText(459, 217, 148, 67, WordBreak | AlignCenter, m_game->getHint());
@@ -298,10 +298,10 @@ void Kanagram::paintEvent(QPaintEvent *)
bitBlt(this, 0, 0, &buf);
}
-void Kanagram::drawHelpText(QPainter &p, QString text)
+void Kanagram::drawHelpText(TQPainter &p, TQString text)
{
p.save();
- QFont font = m_font;
+ TQFont font = m_font;
font.setPointSize(12);
p.setFont(font);
p.rotate(-3.29);
@@ -311,15 +311,15 @@ void Kanagram::drawHelpText(QPainter &p, QString text)
p.restore();
}
-void Kanagram::drawSwitcherText(QPainter &p, QString text)
+void Kanagram::drawSwitcherText(TQPainter &p, TQString text)
{
p.save();
- QFont font = m_blackboardFont;
+ TQFont font = m_blackboardFont;
font.setPointSize(14);
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
int width = fm.width(text);
int height = fm.height();
- m_switcherRect = QRect(380 - width, 150 - height, width, height);
+ m_switcherRect = TQRect(380 - width, 150 - height, width, height);
p.setFont(font);
if(!m_overSwitcher)
p.setPen(m_chalkColor);
@@ -329,14 +329,14 @@ void Kanagram::drawSwitcherText(QPainter &p, QString text)
p.restore();
}
-void Kanagram::drawSwitcher(QPainter &p, const int xMargin, const int yMargin)
+void Kanagram::drawSwitcher(TQPainter &p, const int xMargin, const int yMargin)
{
const int padding = 5;
- QString text = m_game->getDocTitle();
- QFont font = m_blackboardFont;
+ TQString text = m_game->getDocTitle();
+ TQFont font = m_blackboardFont;
font.setPointSize(14);
- QFontMetrics fm(font);
- QRect r = innerRect(m_blackboardRect, xMargin, yMargin);
+ TQFontMetrics fm(font);
+ TQRect r = innerRect(m_blackboardRect, xMargin, yMargin);
r.normalize();
r.moveBy(- padding - (m_overSwitcher ? m_arrowOver : m_arrow )->width(), yMargin);
r.setHeight( (m_overSwitcher ? m_arrowOver : m_arrow )->height());
@@ -356,9 +356,9 @@ void Kanagram::drawSwitcher(QPainter &p, const int xMargin, const int yMargin)
p.drawText(m_switcherRect, Qt::AlignVCenter|Qt::AlignRight, text);
}
-QRect Kanagram::innerRect(const QRect &rect, const int xMargin, const int yMargin)
+TQRect Kanagram::innerRect(const TQRect &rect, const int xMargin, const int yMargin)
{
- QRect r = rect;
+ TQRect r = rect;
if (xMargin>0)
{
@@ -374,7 +374,7 @@ QRect Kanagram::innerRect(const QRect &rect, const int xMargin, const int yMargi
return r;
}
-void Kanagram::mousePressEvent(QMouseEvent *e)
+void Kanagram::mousePressEvent(TQMouseEvent *e)
{
if (m_nextRect.contains(e->pos()))
@@ -464,8 +464,8 @@ void Kanagram::mousePressEvent(QMouseEvent *e)
if(m_inputBox->text().lower().stripWhiteSpace() == m_game->getWord())
{
if(m_useSounds) play("right.ogg");
- m_inputBox->setPaletteBackgroundColor(QColor(0, 255, 0));
- QTimer::singleShot(1000, this, SLOT(resetInputBox()));
+ m_inputBox->setPaletteBackgroundColor(TQColor(0, 255, 0));
+ TQTimer::singleShot(1000, this, TQT_SLOT(resetInputBox()));
m_inputBox->clear();
hideHint();
m_game->nextAnagram();
@@ -474,20 +474,20 @@ void Kanagram::mousePressEvent(QMouseEvent *e)
else
{
if(m_useSounds) play("wrong.ogg");
- m_inputBox->setPaletteBackgroundColor(QColor(255, 0, 0));
- QTimer::singleShot(1000, this, SLOT(resetInputBox()));
+ m_inputBox->setPaletteBackgroundColor(TQColor(255, 0, 0));
+ TQTimer::singleShot(1000, this, TQT_SLOT(resetInputBox()));
m_inputBox->clear();
update();
}
}
}
-void Kanagram::mouseMoveEvent(QMouseEvent *e)
+void Kanagram::mouseMoveEvent(TQMouseEvent *e)
{
updateButtonHighlighting(e->pos());
}
-void Kanagram::updateButtonHighlighting(const QPoint &p)
+void Kanagram::updateButtonHighlighting(const TQPoint &p)
{
bool haveToUpdate;
haveToUpdate = false;
@@ -671,22 +671,22 @@ void Kanagram::updateButtonHighlighting(const QPoint &p)
if (haveToUpdate) update();
}
-void Kanagram::drawText(QPainter &p, const QString &text, const QPoint &center, bool withMargin, int xMargin, int yMargin, QRect *rect, bool highlight, int fontSize)
+void Kanagram::drawText(TQPainter &p, const TQString &text, const TQPoint &center, bool withMargin, int xMargin, int yMargin, TQRect *rect, bool highlight, int fontSize)
{
- QRect r;
- QFont font = m_blackboardFont;
+ TQRect r;
+ TQFont font = m_blackboardFont;
font.setPointSize(fontSize);
font.setBold(true);
p.setFont(font);
- r = p.boundingRect(QRect(), Qt::AlignAuto, text);
- r = QRect(0, 0, r.width() + xMargin, r.height() + yMargin);
+ r = p.boundingRect(TQRect(), Qt::AlignAuto, text);
+ r = TQRect(0, 0, r.width() + xMargin, r.height() + yMargin);
r.moveBy(center.x() - r.width() / 2, center.y() - r.height() / 2);
if (withMargin)
{
p.fillRect(r, m_fillColor);
- p.setPen(QPen(black, 3));
+ p.setPen(TQPen(black, 3));
p.drawRoundRect(r.left(), r.top(), r.width(), r.height(), 15, 15);
}
@@ -697,10 +697,10 @@ void Kanagram::drawText(QPainter &p, const QString &text, const QPoint &center,
if(rect) *rect = r;
}
-void Kanagram::drawTextNew(QPainter &p, const QString &text, int textAlign, int xMargin, int yMargin, const QRect &rect, bool highlight, int fontSize)
+void Kanagram::drawTextNew(TQPainter &p, const TQString &text, int textAlign, int xMargin, int yMargin, const TQRect &rect, bool highlight, int fontSize)
{
- QRect r = innerRect(rect, xMargin, yMargin);
- QFont font = m_blackboardFont;
+ TQRect r = innerRect(rect, xMargin, yMargin);
+ TQFont font = m_blackboardFont;
font.setPointSize(fontSize);
font.setBold(true);
p.setFont(font);
@@ -709,7 +709,7 @@ void Kanagram::drawTextNew(QPainter &p, const QString &text, int textAlign, int
if (withMargin)
{
p.fillRect(r, m_fillColor);
- p.setPen(QPen(black, 3));
+ p.setPen(TQPen(black, 3));
p.drawRoundRect(r.left(), r.top(), r.width(), r.height(), 15, 15);
}
@@ -722,16 +722,16 @@ void Kanagram::drawTextNew(QPainter &p, const QString &text, int textAlign, int
void Kanagram::checkWord()
{
- QPoint p = m_upRect.topLeft() + QPoint( 1, 1 );
- QMouseEvent *e = new QMouseEvent( QEvent::MouseButtonPress, p, Qt::LeftButton, Qt::NoButton );
+ TQPoint p = m_upRect.topLeft() + TQPoint( 1, 1 );
+ TQMouseEvent *e = new TQMouseEvent( TQEvent::MouseButtonPress, p, Qt::LeftButton, Qt::NoButton );
mousePressEvent(e);
}
void Kanagram::randomHintImage()
{
unsigned long imageNum = m_randomImage.getLong(8);
- QString dir = "images/eyes" + QString::number(imageNum + 1) + ".png";
- m_hintOverlay = new QPixmap(locate("appdata", dir));
+ TQString dir = "images/eyes" + TQString::number(imageNum + 1) + ".png";
+ m_hintOverlay = new TQPixmap(locate("appdata", dir));
}
void Kanagram::showSettings()
@@ -744,8 +744,8 @@ void Kanagram::showSettings()
m_vocabSettings = new VocabSettings( configDialog );
configDialog->addPage( m_vocabSettings, i18n("Vocabularies"), "edit" );
configDialog->addPage( new NewStuff( configDialog ), i18n("New Stuff"), "knewstuff" );
- connect(configDialog, SIGNAL(settingsChanged()), this, SLOT(loadSettings()));
- connect(configDialog, SIGNAL(applyClicked()), this, SLOT(refreshVocabularies()));
+ connect(configDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(loadSettings()));
+ connect(configDialog, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(refreshVocabularies()));
configDialog->exec();
delete configDialog;
}
@@ -774,7 +774,7 @@ void Kanagram::refreshVocabularies()
m_vocabSettings->refreshView();
}
-void Kanagram::play(QString filename)
+void Kanagram::play(TQString filename)
{
#ifndef WITHOUT_ARTS
KDE::PlayObject *playobj = m_artsFactory->createPlayObject(locate("appdata", "sounds/" + filename), true);
diff --git a/kanagram/src/kanagram.h b/kanagram/src/kanagram.h
index 689495b8..db39fccc 100644
--- a/kanagram/src/kanagram.h
+++ b/kanagram/src/kanagram.h
@@ -23,8 +23,8 @@
#include <config.h>
-#include <qwidget.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
#include <kxmlguiclient.h>
@@ -69,62 +69,62 @@ Q_OBJECT
void refreshVocabularies();
private:
- void drawText(QPainter &p, const QString &text, const QPoint &center, bool withMargin, int xMargin, int yMargin, QRect *rect, bool highlight, int fontSize = 18);
- void drawTextNew(QPainter &p, const QString &text, int textAlign, int xMargin, int yMargin, const QRect &rect, bool highlight, int fontSize = 18);
+ void drawText(TQPainter &p, const TQString &text, const TQPoint &center, bool withMargin, int xMargin, int yMargin, TQRect *rect, bool highlight, int fontSize = 18);
+ void drawTextNew(TQPainter &p, const TQString &text, int textAlign, int xMargin, int yMargin, const TQRect &rect, bool highlight, int fontSize = 18);
void setupRects();
- void play(QString filename);
+ void play(TQString filename);
- void paintEvent(QPaintEvent *);
+ void paintEvent(TQPaintEvent *);
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
+ void mouseMoveEvent(TQMouseEvent *e);
- void updateButtonHighlighting(const QPoint &p);
+ void updateButtonHighlighting(const TQPoint &p);
void randomHintImage();
void showSettings();
- void drawHelpText(QPainter &p, QString text);
+ void drawHelpText(TQPainter &p, TQString text);
- void drawSwitcherText(QPainter &p, QString text);
- void drawSwitcher(QPainter &p, const int xMargin, const int yMargin);
+ void drawSwitcherText(TQPainter &p, TQString text);
+ void drawSwitcher(TQPainter &p, const int xMargin, const int yMargin);
- QRect innerRect(const QRect &rect, const int xMargin, const int yMargin);
+ TQRect innerRect(const TQRect &rect, const int xMargin, const int yMargin);
KanagramGame *m_game;
- QPixmap *m_back, *m_hintOverlay, *m_aboutKDEOverlay, *m_aboutAppOverlay, *m_handbookOverlay, *m_aboutKDEOverlayOver, *m_aboutAppOverlayOver, *m_handbookOverlayOver, *m_card, *m_arrow, *m_arrowOver, *m_next, *m_nextOver, *m_config, *m_configOver, *m_help, *m_helpOver, *m_quit, *m_quitOver, *m_up, *m_upOver, *m_upDisabled;
+ TQPixmap *m_back, *m_hintOverlay, *m_aboutKDEOverlay, *m_aboutAppOverlay, *m_handbookOverlay, *m_aboutKDEOverlayOver, *m_aboutAppOverlayOver, *m_handbookOverlayOver, *m_card, *m_arrow, *m_arrowOver, *m_next, *m_nextOver, *m_config, *m_configOver, *m_help, *m_helpOver, *m_quit, *m_quitOver, *m_up, *m_upOver, *m_upDisabled;
//Deprecated
- //QRect m_newWordRect, m_settingsRect, m_helpRect, m_quitRect;
+ //TQRect m_newWordRect, m_settingsRect, m_helpRect, m_quitRect;
- QRect m_nextRect, m_configRect, m_helpRect, m_quitRect, m_revealRect, m_hintRect, m_upRect, m_aboutKDERect, m_aboutAppRect, m_handbookRect, m_switcherRect, m_arrowRect, m_logoRect, m_hintBoxRect, m_blackboardRect;
+ TQRect m_nextRect, m_configRect, m_helpRect, m_quitRect, m_revealRect, m_hintRect, m_upRect, m_aboutKDERect, m_aboutAppRect, m_handbookRect, m_switcherRect, m_arrowRect, m_logoRect, m_hintBoxRect, m_blackboardRect;
bool m_overNext, m_overConfig, m_overHelp, m_overQuit, m_overReveal, m_overHint, m_overUp, m_overAboutKDE, m_overAboutApp, m_overHandbook, m_overSwitcher, m_overHintBox;
bool m_showHint;
- QColor m_fillColor, m_fontColor, m_fontHighlightColor, m_chalkColor, m_chalkHighlightColor;
+ TQColor m_fillColor, m_fontColor, m_fontHighlightColor, m_chalkColor, m_chalkHighlightColor;
//Values for settings
int m_hintHideTime;
bool m_useSounds, m_useStandardFonts;
- QFont m_blackboardFont, m_font;
+ TQFont m_blackboardFont, m_font;
KHelpMenu *m_helpMenu;
- QLineEdit *m_inputBox;
+ TQLineEdit *m_inputBox;
VocabSettings *m_vocabSettings;
KRandomSequence m_randomImage;
- QTimer *m_hintTimer;
+ TQTimer *m_hintTimer;
KArtsDispatcher *m_artsDispatcher;
KArtsServer *m_artsServer;
diff --git a/kanagram/src/kanagramgame.cpp b/kanagram/src/kanagramgame.cpp
index 318c285e..67212168 100644
--- a/kanagram/src/kanagramgame.cpp
+++ b/kanagram/src/kanagramgame.cpp
@@ -20,7 +20,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qfile.h>
+#include <tqfile.h>
#include <kurl.h>
#include <kdebug.h>
@@ -34,7 +34,7 @@
#include <stdlib.h>
-KanagramGame::KanagramGame(QWidget* parent) : m_index(0)
+KanagramGame::KanagramGame(TQWidget* parent) : m_index(0)
{
m_parent = parent;
loadDefaultVocab();
@@ -46,8 +46,8 @@ KanagramGame::~KanagramGame()
void KanagramGame::checkFile()
{
- if (!QFile::exists(locate("appdata", m_filename))) {
- QString msg = i18n("File %1 cannot be found.\n Please ensure that Kanagram is properly installed.")
+ if (!TQFile::exists(locate("appdata", m_filename))) {
+ TQString msg = i18n("File %1 cannot be found.\n Please ensure that Kanagram is properly installed.")
.arg(m_filename);
KMessageBox::sorry(m_parent, msg, i18n("Error"));
exit(0);
@@ -148,12 +148,12 @@ void KanagramGame::nextAnagram()
m_hint = doc->getEntry(wordNumber)->getRemark(0);
}
-QString KanagramGame::getDocTitle()
+TQString KanagramGame::getDocTitle()
{
return m_docTitle;
}
-QString KanagramGame::getFilename()
+TQString KanagramGame::getFilename()
{
if(m_fileList.empty())
return m_filename;
@@ -161,17 +161,17 @@ QString KanagramGame::getFilename()
return m_fileList[m_index];
}
-QString KanagramGame::getAnagram()
+TQString KanagramGame::getAnagram()
{
return m_anagram;
}
-QString KanagramGame::getHint()
+TQString KanagramGame::getHint()
{
return m_hint;
}
-QString KanagramGame::getWord()
+TQString KanagramGame::getWord()
{
return m_originalWord;
}
@@ -181,10 +181,10 @@ void KanagramGame::restoreWord()
m_anagram = m_originalWord;
}
-QString KanagramGame::createAnagram(QString original)
+TQString KanagramGame::createAnagram(TQString original)
{
- QStringList objData = QStringList::split(QString(""), original);
- QString insaneData;
+ TQStringList objData = TQStringList::split(TQString(""), original);
+ TQString insaneData;
int count;
for(int i=0; count = objData.count(); i++)
@@ -195,8 +195,8 @@ QString KanagramGame::createAnagram(QString original)
else
objChunk = m_random.getLong(count);
- QStringList::Iterator it = objData.at(objChunk);
- QString sd = *it;
+ TQStringList::Iterator it = objData.at(objChunk);
+ TQString sd = *it;
objData.remove(it);
if (insaneData.isEmpty())
insaneData = sd;
diff --git a/kanagram/src/kanagramgame.h b/kanagram/src/kanagramgame.h
index 940fbd57..cf14cea4 100644
--- a/kanagram/src/kanagramgame.h
+++ b/kanagram/src/kanagramgame.h
@@ -21,7 +21,7 @@
#ifndef KANAGRAMGAME_H
#define KANAGRAMGAME_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kstandarddirs.h>
#include <krandomsequence.h>
@@ -32,7 +32,7 @@ class KanagramGame : public QObject
{
Q_OBJECT
public:
- KanagramGame(QWidget *parent);
+ KanagramGame(TQWidget *parent);
~KanagramGame();
void refreshVocabList();
void loadDefaultVocab();
@@ -40,26 +40,26 @@ Q_OBJECT
void nextAnagram();
void nextVocab();
void previousVocab();
- QString getAnagram();
- QString getHint();
- QString getWord();
+ TQString getAnagram();
+ TQString getHint();
+ TQString getWord();
void restoreWord();
- QString getDocTitle();
- QString getFilename();
+ TQString getDocTitle();
+ TQString getFilename();
private:
- QString createAnagram(QString original);
+ TQString createAnagram(TQString original);
void checkFile();
- QWidget *m_parent;
+ TQWidget *m_parent;
KRandomSequence m_random;
- QString m_anagram;
- QString m_hint;
- QString m_originalWord;
+ TQString m_anagram;
+ TQString m_hint;
+ TQString m_originalWord;
int m_index;
- QStringList m_fileList;
- QStringList m_answeredWords;
- QString m_docTitle;
- QString m_filename;
+ TQStringList m_fileList;
+ TQStringList m_answeredWords;
+ TQString m_docTitle;
+ TQString m_filename;
};
#endif
diff --git a/kanagram/src/keduvocdocument.cpp b/kanagram/src/keduvocdocument.cpp
index 1af38f5a..4bfe29fc 100644
--- a/kanagram/src/keduvocdocument.cpp
+++ b/kanagram/src/keduvocdocument.cpp
@@ -24,7 +24,7 @@
#include <kmessagebox.h>
#include <kio/netaccess.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <algorithm>
#include <functional>
@@ -44,7 +44,7 @@ using namespace std;
// KEduVocDocument
//********************************************************
-KEduVocDocument::KEduVocDocument(QObject * /*parent*/)
+KEduVocDocument::KEduVocDocument(TQObject * /*parent*/)
{
Init();
}
@@ -55,7 +55,7 @@ KEduVocDocument::~KEduVocDocument()
}
-void KEduVocDocument::setVersion (const QString & vers)
+void KEduVocDocument::setVersion (const TQString & vers)
{
doc_version = vers;
}
@@ -99,12 +99,12 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/)
if (!url.isEmpty())
doc_url = url;
- // TODO EPT connect( this, SIGNAL(progressChanged(KEduVocDocument*,int)), parent, SLOT(slotProgress(KEduVocDocument*,int)) );
+ // TODO EPT connect( this, TQT_SIGNAL(progressChanged(KEduVocDocument*,int)), parent, TQT_SLOT(slotProgress(KEduVocDocument*,int)) );
- QString tmpfile;
+ TQString tmpfile;
if (KIO::NetAccess::download( url, tmpfile, 0 ))
{
- QFile f(tmpfile);
+ TQFile f(tmpfile);
if (!f.open(IO_ReadOnly))
{
KMessageBox::error(0, i18n("<qt>Cannot open file<br><b>%1</b></qt>").arg(url.path()));
@@ -116,7 +116,7 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/)
bool read = false;
while (!read) {
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
switch (ft) {
case kvtml:
{
@@ -127,21 +127,21 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/)
case vt_lex:
{
- QTextStream is (&f);
+ TQTextStream is (&f);
//TODO read = loadFromLex (is);
}
break;
case vt_vcb:
{
- QTextStream is (&f);
+ TQTextStream is (&f);
//TODO read = loadFromVcb (is);
}
break;
case csv:
{
- QTextStream is(&f);
+ TQTextStream is(&f);
//TODO read = loadFromCsv(is);
}
break;
@@ -153,7 +153,7 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/)
}
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if (!read) {
if (unknown_attr || unknown_elem ) {
@@ -162,8 +162,8 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/)
}
// TODO new readers provide an explicite error message
// the two messages should be merged
- QString format = i18n("Could not load \"%1\"\nDo you want to try again?");
- QString msg = format.arg(url.path());
+ TQString format = i18n("Could not load \"%1\"\nDo you want to try again?");
+ TQString msg = format.arg(url.path());
int result = KMessageBox::warningContinueCancel(0, msg,
kapp->makeStdCaption(i18n("I/O Failure")),
i18n("&Retry"));
@@ -180,9 +180,9 @@ bool KEduVocDocument::open(const KURL& url, bool /*append*/)
}
-bool KEduVocDocument::saveAs(QObject * /*parent*/, const KURL & url, FileType ft, const QString & generator)
+bool KEduVocDocument::saveAs(TQObject * /*parent*/, const KURL & url, FileType ft, const TQString & generator)
{
-// connect( this, SIGNAL(progressChanged(KEduVocDocument*,int)), parent, SLOT(slotProgress(KEduVocDocument*,int)) );
+// connect( this, TQT_SIGNAL(progressChanged(KEduVocDocument*,int)), parent, TQT_SLOT(slotProgress(KEduVocDocument*,int)) );
KURL tmp (url);
@@ -207,7 +207,7 @@ bool KEduVocDocument::saveAs(QObject * /*parent*/, const KURL & url, FileType ft
while (!saved)
{
- QFile f(tmp.path());
+ TQFile f(tmp.path());
if (!f.open(IO_WriteOnly))
{
@@ -215,7 +215,7 @@ bool KEduVocDocument::saveAs(QObject * /*parent*/, const KURL & url, FileType ft
return false;
}
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
switch (ft) {
case kvtml: {
KEduVocKvtmlWriter kvtmlWriter(&f);
@@ -224,19 +224,19 @@ bool KEduVocDocument::saveAs(QObject * /*parent*/, const KURL & url, FileType ft
break;
case vt_lex: {
- QTextStream os( &f ); // serialize using f
+ TQTextStream os( &f ); // serialize using f
//TODO saved = saveToLex(os, title);
}
break;
case vt_vcb: {
- QTextStream os( &f ); // serialize using f
+ TQTextStream os( &f ); // serialize using f
//TODO saved = saveToVcb(os, title);
}
break;
case csv: {
- QTextStream os( &f ); // serialize using f
+ TQTextStream os( &f ); // serialize using f
//TODO saved = saveToCsv(os, title);
}
break;
@@ -247,13 +247,13 @@ bool KEduVocDocument::saveAs(QObject * /*parent*/, const KURL & url, FileType ft
break;
}
f.close();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if (!saved) {
// TODO new writers provide an explicite error message
// the two messages should be merged
- QString format = i18n("Could not save \"%1\"\nDo you want to try again?");
- QString msg = format.arg(tmp.path());
+ TQString format = i18n("Could not save \"%1\"\nDo you want to try again?");
+ TQString msg = format.arg(tmp.path());
int result = KMessageBox::warningContinueCancel(0, msg,
kapp->makeStdCaption(i18n("I/O Failure")),
i18n("&Retry"));
@@ -283,9 +283,9 @@ void KEduVocDocument::removeEntry(int index)
}
-int KEduVocDocument::findIdent (const QString &lang) const
+int KEduVocDocument::findIdent (const TQString &lang) const
{
- vector<QString>::const_iterator first = langs.begin();
+ vector<TQString>::const_iterator first = langs.begin();
int count = 0;
while (first != langs.end()) {
if ( *first == lang)
@@ -297,7 +297,7 @@ int KEduVocDocument::findIdent (const QString &lang) const
}
-QString KEduVocDocument::getIdent (int index) const
+TQString KEduVocDocument::getIdent (int index) const
{
if (index >= (int)langs.size() || index < 1 )
return "";
@@ -306,7 +306,7 @@ QString KEduVocDocument::getIdent (int index) const
}
-void KEduVocDocument::setIdent (int idx, const QString &id)
+void KEduVocDocument::setIdent (int idx, const TQString &id)
{
if (idx < (int)langs.size() && idx >= 1 ) {
langs[idx] = id;
@@ -314,7 +314,7 @@ void KEduVocDocument::setIdent (int idx, const QString &id)
}
-QString KEduVocDocument::getTypeName (int index) const
+TQString KEduVocDocument::getTypeName (int index) const
{
if (index >= (int)type_descr.size())
return "";
@@ -323,7 +323,7 @@ QString KEduVocDocument::getTypeName (int index) const
}
-void KEduVocDocument::setTypeName (int idx, QString &id)
+void KEduVocDocument::setTypeName (int idx, TQString &id)
{
if (idx >= (int)type_descr.size())
for (int i = (int)type_descr.size(); i <= idx; i++)
@@ -333,7 +333,7 @@ void KEduVocDocument::setTypeName (int idx, QString &id)
}
-QString KEduVocDocument::getTenseName (int index) const
+TQString KEduVocDocument::getTenseName (int index) const
{
if (index >= (int)tense_descr.size())
return "";
@@ -342,7 +342,7 @@ QString KEduVocDocument::getTenseName (int index) const
}
-void KEduVocDocument::setTenseName (int idx, QString &id)
+void KEduVocDocument::setTenseName (int idx, TQString &id)
{
if (idx >= (int)tense_descr.size())
for (int i = (int)tense_descr.size(); i <= idx; i++)
@@ -352,7 +352,7 @@ void KEduVocDocument::setTenseName (int idx, QString &id)
}
-QString KEduVocDocument::getUsageName (int index) const
+TQString KEduVocDocument::getUsageName (int index) const
{
if (index >= (int)usage_descr.size())
return "";
@@ -361,7 +361,7 @@ QString KEduVocDocument::getUsageName (int index) const
}
-void KEduVocDocument::setUsageName (int idx, QString &id)
+void KEduVocDocument::setUsageName (int idx, TQString &id)
{
if (idx >= (int)usage_descr.size())
for (int i = (int)usage_descr.size(); i <= idx; i++)
@@ -490,7 +490,7 @@ void KEduVocDocument::removeIdent (int index)
}
-QString KEduVocDocument::getOriginalIdent () const
+TQString KEduVocDocument::getOriginalIdent () const
{
if (langs.size() > 0)
return langs[0];
@@ -499,7 +499,7 @@ QString KEduVocDocument::getOriginalIdent () const
}
-void KEduVocDocument::setOriginalIdent (const QString &id)
+void KEduVocDocument::setOriginalIdent (const TQString &id)
{
if (langs.size() > 0) {
langs[0] = id;
@@ -519,9 +519,9 @@ public:
{
return
!dir
- ? (QString::compare(x.getOriginal().upper(),
+ ? (TQString::compare(x.getOriginal().upper(),
y.getOriginal().upper() ) < 0)
- : (QString::compare(x.getOriginal().upper(),
+ : (TQString::compare(x.getOriginal().upper(),
y.getOriginal().upper() ) > 0);
}
@@ -544,16 +544,16 @@ public:
if (x.getLesson() != y.getLesson() )
return
!dir
- ? (QString::compare(doc.getLessonDescr(x.getLesson()).upper(),
+ ? (TQString::compare(doc.getLessonDescr(x.getLesson()).upper(),
doc.getLessonDescr(y.getLesson()).upper() ) < 0)
- : (QString::compare(doc.getLessonDescr(x.getLesson()).upper(),
+ : (TQString::compare(doc.getLessonDescr(x.getLesson()).upper(),
doc.getLessonDescr(y.getLesson()).upper() ) > 0);
else
return
!dir
- ? (QString::compare(x.getOriginal().upper(),
+ ? (TQString::compare(x.getOriginal().upper(),
y.getOriginal().upper() ) < 0)
- : (QString::compare(x.getOriginal().upper(),
+ : (TQString::compare(x.getOriginal().upper(),
y.getOriginal().upper() ) > 0);
}
@@ -582,9 +582,9 @@ public:
else
return
!dir
- ? (QString::compare(x.getOriginal().upper(),
+ ? (TQString::compare(x.getOriginal().upper(),
y.getOriginal().upper() ) < 0)
- : (QString::compare(x.getOriginal().upper(),
+ : (TQString::compare(x.getOriginal().upper(),
y.getOriginal().upper() ) > 0);
}
@@ -606,9 +606,9 @@ public:
{
return
!dir
- ? (QString::compare(x.getTranslation(index).upper(),
+ ? (TQString::compare(x.getTranslation(index).upper(),
y.getTranslation(index).upper() ) < 0)
- : (QString::compare(x.getTranslation(index).upper(),
+ : (TQString::compare(x.getTranslation(index).upper(),
y.getTranslation(index).upper() ) > 0);
}
@@ -686,7 +686,7 @@ void KEduVocDocument::setLeitnerSystemActive( bool yes )
void KEduVocDocument::createStandardLeitnerSystem()
{
LeitnerSystem* tmpSystem = new LeitnerSystem();
- QString name = "Standard";
+ TQString name = "Standard";
tmpSystem->setSystemName( name );
tmpSystem->insertBox( "Box 1" );
@@ -792,7 +792,7 @@ void KEduVocDocument::resetEntry (int index, int lesson)
}
-QString KEduVocDocument::getLessonDescr(int idx) const
+TQString KEduVocDocument::getLessonDescr(int idx) const
{
if (idx == 0)
return i18n("<no lesson>");
@@ -830,7 +830,7 @@ void KEduVocDocument::setLessonsInQuery(vector<int> lesson_iq)
}
-QString KEduVocDocument::getTitle() const
+TQString KEduVocDocument::getTitle() const
{
if (doctitle.isEmpty())
return doc_url.fileName();
@@ -839,49 +839,49 @@ QString KEduVocDocument::getTitle() const
}
-QString KEduVocDocument::getAuthor() const
+TQString KEduVocDocument::getAuthor() const
{
return author;
}
-QString KEduVocDocument::getLicense() const
+TQString KEduVocDocument::getLicense() const
{
return license;
}
-QString KEduVocDocument::getDocRemark() const
+TQString KEduVocDocument::getDocRemark() const
{
return doc_remark;
}
-void KEduVocDocument::setTitle(const QString & title)
+void KEduVocDocument::setTitle(const TQString & title)
{
doctitle = title.stripWhiteSpace();
}
-void KEduVocDocument::setAuthor(const QString & s)
+void KEduVocDocument::setAuthor(const TQString & s)
{
author = s.stripWhiteSpace();
}
-void KEduVocDocument::setLicense(const QString & s)
+void KEduVocDocument::setLicense(const TQString & s)
{
license = s.stripWhiteSpace();
}
-void KEduVocDocument::setDocRemark(const QString & s)
+void KEduVocDocument::setDocRemark(const TQString & s)
{
doc_remark = s.stripWhiteSpace();
}
-int KEduVocDocument::search(QString substr, int id,
+int KEduVocDocument::search(TQString substr, int id,
int first, int last,
bool word_start,
bool)
@@ -929,12 +929,12 @@ int KEduVocDocument::search(QString substr, int id,
#define _BITMASK 0x3F
#define _BITUSED 6
-QString KEduVocDocument::compressDate(unsigned long l) const
+TQString KEduVocDocument::compressDate(unsigned long l) const
{
if (l == 0)
return "";
- QString res;
+ TQString res;
if (l <= KVD_ZERO_TIME)
l = 1;
else
@@ -948,7 +948,7 @@ QString KEduVocDocument::compressDate(unsigned long l) const
}
-unsigned long KEduVocDocument::decompressDate(QString s) const
+unsigned long KEduVocDocument::decompressDate(TQString s) const
{
if (s.isEmpty())
return 0;
@@ -964,13 +964,13 @@ unsigned long KEduVocDocument::decompressDate(QString s) const
}
-KEduVocDocument::FileType KEduVocDocument::detectFT(const QString &filename)
+KEduVocDocument::FileType KEduVocDocument::detectFT(const TQString &filename)
{
- QFile f( filename );
+ TQFile f( filename );
if (!f.open( IO_ReadOnly ))
return csv;
- QDataStream is( &f );
+ TQDataStream is( &f );
Q_INT8 c1, c2, c3, c4, c5;
is >> c1
@@ -979,8 +979,8 @@ KEduVocDocument::FileType KEduVocDocument::detectFT(const QString &filename)
>> c4
>> c5; // guess filetype by first x bytes
- QTextStream ts (&f);
- QString line;
+ TQTextStream ts (&f);
+ TQString line;
line = ts.readLine();
line.insert (0, c5);
line.insert (0, c4);
@@ -1017,9 +1017,9 @@ public:
bool operator< (const expRef& y) const
{
- QString s1 = exp->getOriginal();
- QString s2 = y.exp->getOriginal();
- int cmp = QString::compare(s1.upper(), s2.upper());
+ TQString s1 = exp->getOriginal();
+ TQString s2 = y.exp->getOriginal();
+ int cmp = TQString::compare(s1.upper(), s2.upper());
if (cmp != 0)
return cmp < 0;
@@ -1027,7 +1027,7 @@ public:
s1 = exp->getTranslation(i);
s2 = y.exp->getTranslation(i);
- cmp = QString::compare(s1.upper(), s2.upper() );
+ cmp = TQString::compare(s1.upper(), s2.upper() );
if (cmp != 0)
return cmp < 0;
}
diff --git a/kanagram/src/keduvocdocument.h b/kanagram/src/keduvocdocument.h
index 4e48e21b..e3b76a85 100644
--- a/kanagram/src/keduvocdocument.h
+++ b/kanagram/src/keduvocdocument.h
@@ -23,7 +23,7 @@
#include <config.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -266,7 +266,7 @@ class KEduVocDocument : public QObject
*
* @param obj calling object
*/
- KEduVocDocument(QObject* obj);
+ KEduVocDocument(TQObject* obj);
/** Destructor for the fileclass of the application */
~KEduVocDocument();
@@ -334,25 +334,25 @@ class KEduVocDocument : public QObject
/** returns originals identifier
*/
- QString getOriginalIdent () const;
+ TQString getOriginalIdent () const;
/** set originals identifier
*/
- void setOriginalIdent (const QString &id);
+ void setOriginalIdent (const TQString &id);
/** returns identifier of translation x
*
* @param index number of translation 1..x
* @result ident string: de=german, en=englisch, ..
*/
- QString getIdent (int index) const;
+ TQString getIdent (int index) const;
/** sets identifier of translation
*
* @param index number of translation 1..x
* @param lang ident string: de=german, en=englisch, ..
*/
- void setIdent (int index, const QString &lang);
+ void setIdent (int index, const TQString &lang);
/** removes identifier an the according translation in all entries
*
@@ -365,67 +365,67 @@ class KEduVocDocument : public QObject
* @param lang identifier of language
* @result index of translation, 0=original, -1=none
*/
- int findIdent (const QString &lang) const;
+ int findIdent (const TQString &lang) const;
/** returns attribute string
*
* @param index number of attribute
* @result string
*/
- QString getTypeName (int index) const;
+ TQString getTypeName (int index) const;
/** sets attribute string
*
* @param index number of attribute
* @param str name of attribute
*/
- void setTypeName (int index, QString &str);
+ void setTypeName (int index, TQString &str);
/** gets descr of types */
- inline vector<QString> getTypeDescr() const { return type_descr; }
+ inline vector<TQString> getTypeDescr() const { return type_descr; }
/** sets descr of types */
- inline void setTypeDescr(vector<QString> names) { type_descr = names; }
+ inline void setTypeDescr(vector<TQString> names) { type_descr = names; }
/** returns tense string
*
* @param index number of tense
* @result string
*/
- QString getTenseName (int index) const;
+ TQString getTenseName (int index) const;
/** sets tense string
*
* @param index number of tense
* @param str name of tense
*/
- void setTenseName (int index, QString &str);
+ void setTenseName (int index, TQString &str);
/** gets descr of tenses */
- inline vector<QString> getTenseDescr() const { return tense_descr; }
+ inline vector<TQString> getTenseDescr() const { return tense_descr; }
/** sets descr of tenses */
- inline void setTenseDescr(vector<QString> names) { tense_descr = names; }
+ inline void setTenseDescr(vector<TQString> names) { tense_descr = names; }
/** returns usage string
*
* @param index number of usage
* @result string
*/
- QString getUsageName (int index) const;
+ TQString getUsageName (int index) const;
/** sets usage string
*
* @param index number of usage
* @param str name of usage
*/
- void setUsageName (int index, QString &str);
+ void setUsageName (int index, TQString &str);
/** gets descr of usages */
- inline vector<QString> getUsageDescr() const { return usage_descr; }
+ inline vector<TQString> getUsageDescr() const { return usage_descr; }
/** sets descr of usages */
- inline void setUsageDescr(vector<QString> names) { usage_descr = names; }
+ inline void setUsageDescr(vector<TQString> names) { usage_descr = names; }
/** open a document file
*
@@ -439,7 +439,7 @@ class KEduVocDocument : public QObject
* @param url if url is empty (or NULL) actual name is preserved
* @result true if successful
*/
- bool saveAs(QObject *parent, const KURL & url, FileType ft, const QString & generator);
+ bool saveAs(TQObject *parent, const KURL & url, FileType ft, const TQString & generator);
/** returns count of entries
*/
@@ -459,7 +459,7 @@ class KEduVocDocument : public QObject
/** append new lang ident
*/
- inline void appendLang(const QString & id) { langs.push_back(id); }
+ inline void appendLang(const TQString & id) { langs.push_back(id); }
/** returns pointer to expression object x
*
@@ -479,7 +479,7 @@ class KEduVocDocument : public QObject
* @param tolerant
* @result index of found entry, -1 if none
*/
- int search(QString substr, int id,
+ int search(TQString substr, int id,
int first=0, int last=-1, bool word_start = false, bool tolerant=false);
/** returns url of xml file */
@@ -489,34 +489,34 @@ class KEduVocDocument : public QObject
inline void setURL(const KURL& url) {doc_url = url;}
/** returns title of xml file */
- QString getTitle() const;
+ TQString getTitle() const;
/** returns author of file */
- QString getAuthor() const;
+ TQString getAuthor() const;
/** returns license of file */
- QString getLicense() const;
+ TQString getLicense() const;
/** returns remark of file */
- QString getDocRemark() const;
+ TQString getDocRemark() const;
- inline void getQueryLang(QString &org, QString &trans) const
+ inline void getQueryLang(TQString &org, TQString &trans) const
{ org = queryorg; trans = querytrans; }
- inline void setQueryLang(const QString &org, const QString &trans)
+ inline void setQueryLang(const TQString &org, const TQString &trans)
{ queryorg = org; querytrans = trans; }
/** sets title of xml file */
- void setTitle(const QString & title);
+ void setTitle(const TQString & title);
/** sets author of file */
- void setAuthor(const QString & author);
+ void setAuthor(const TQString & author);
/** sets license of file */
- void setLicense(const QString & license);
+ void setLicense(const TQString & license);
/** sets remark of file */
- void setDocRemark(const QString & rem);
+ void setDocRemark(const TQString & rem);
/** gets version of loaded file */
void getVersion(int &major, int &minor, int &patch);
@@ -530,7 +530,7 @@ class KEduVocDocument : public QObject
inline void setCurrentLesson(int lesson) { current_lesson = lesson; }
/** returns descr of lesson */
- QString getLessonDescr(int index) const;
+ TQString getLessonDescr(int index) const;
/** returns lessons in current query */
vector<int> getLessonsInQuery() const;
@@ -538,12 +538,12 @@ class KEduVocDocument : public QObject
/** sets lessons in current query */
void setLessonsInQuery(vector<int>);
- inline vector<QString> getLessonDescr() const { return lesson_descr; }
+ inline vector<TQString> getLessonDescr() const { return lesson_descr; }
inline int numLessons () const {return (int) lesson_descr.size(); }
/** sets descr of lesson */
- inline void setLessonDescr(vector<QString> names) { lesson_descr = names; }
+ inline void setLessonDescr(vector<TQString> names) { lesson_descr = names; }
/** returns pointer to conjugations if available
*
@@ -572,10 +572,10 @@ class KEduVocDocument : public QObject
void setArticle(int index, const Article &art);
/** compress date */
- QString compressDate(unsigned long) const;
+ TQString compressDate(unsigned long) const;
/** decompress date */
- unsigned long decompressDate(QString) const;
+ unsigned long decompressDate(TQString) const;
/** returns recommended size
*
@@ -597,16 +597,16 @@ class KEduVocDocument : public QObject
void setLeitnerSystem( LeitnerSystem* system );
LeitnerSystem* getLeitnerSystem();
- bool unknownAttribute (int line, const QString &name, const QString &attr);
- void unknownElement (int line, const QString &elem );
- void errorKvtMl (int line, const QString &text );
- void warningKvtMl (int line, const QString &text );
+ bool unknownAttribute (int line, const TQString &name, const TQString &attr);
+ void unknownElement (int line, const TQString &elem );
+ void errorKvtMl (int line, const TQString &text );
+ void warningKvtMl (int line, const TQString &text );
- void errorLex (int line, const QString &text );
+ void errorLex (int line, const TQString &text );
- void errorCsv (int line, const QString &text );
+ void errorCsv (int line, const TQString &text );
- FileType detectFT(const QString &filename);
+ FileType detectFT(const TQString &filename);
friend class QueryManager;
@@ -619,30 +619,30 @@ protected:
void Init();
/** sets version of loaded file */
- void setVersion(const QString & ver);
+ void setVersion(const TQString & ver);
/* TODO
- bool saveToLex (QTextStream& os, QString &title);
- bool loadFromLex (QTextStream& is);
- bool loadLessonLex (QTextStream& is);
- bool saveLessonLex (QTextStream& os);
- bool saveTypeNameLex (QTextStream& os);
- bool loadTypeNameLex (QTextStream& is);
-
- bool saveToCsv (QTextStream& os, QString &title);
- bool loadFromCsv (QTextStream& is);
- bool loadLessonCsv (QTextStream& is);
- bool saveLessonCsv (QTextStream& os);
- bool saveTypeNameCsv (QTextStream& os);
- bool loadTypeNameCsv (QTextStream& is);
-
- bool saveTypeNameVcb (QTextStream &os);
- bool loadTypeNameVcb (QTextStream &is);
- bool saveLessonVcb (QTextStream &os);
- bool loadLessonVcb (QTextStream &is);
- bool saveToVcb (QTextStream& os, QString &title);
- bool loadFromVcb (QTextStream& is);
- void errorVcb (int line, const QString &text );
+ bool saveToLex (TQTextStream& os, TQString &title);
+ bool loadFromLex (TQTextStream& is);
+ bool loadLessonLex (TQTextStream& is);
+ bool saveLessonLex (TQTextStream& os);
+ bool saveTypeNameLex (TQTextStream& os);
+ bool loadTypeNameLex (TQTextStream& is);
+
+ bool saveToCsv (TQTextStream& os, TQString &title);
+ bool loadFromCsv (TQTextStream& is);
+ bool loadLessonCsv (TQTextStream& is);
+ bool saveLessonCsv (TQTextStream& os);
+ bool saveTypeNameCsv (TQTextStream& os);
+ bool loadTypeNameCsv (TQTextStream& is);
+
+ bool saveTypeNameVcb (TQTextStream &os);
+ bool loadTypeNameVcb (TQTextStream &is);
+ bool saveLessonVcb (TQTextStream &os);
+ bool loadLessonVcb (TQTextStream &is);
+ bool saveToVcb (TQTextStream& os, TQString &title);
+ bool loadFromVcb (TQTextStream& is);
+ void errorVcb (int line, const TQString &text );
*/
private:
@@ -655,26 +655,26 @@ protected:
bool sort_allowed;
// save these to document
- vector<QString> langs; //0= origin, 1,.. translations
+ vector<TQString> langs; //0= origin, 1,.. translations
int cols,
lines;
int current_lesson;
vector<int> extraSizehints;
vector<int> sizehints;
- QString generator;
- QString queryorg,
+ TQString generator;
+ TQString queryorg,
querytrans;
vector<KEduVocExpression> vocabulary;
vector<bool> lessons_in_query;
- vector<QString> lesson_descr;
- vector<QString> type_descr;
- vector<QString> tense_descr;
- vector<QString> usage_descr;
- QString doctitle;
- QString author;
- QString license;
- QString doc_remark;
- QString doc_version;
+ vector<TQString> lesson_descr;
+ vector<TQString> type_descr;
+ vector<TQString> tense_descr;
+ vector<TQString> usage_descr;
+ TQString doctitle;
+ TQString author;
+ TQString license;
+ TQString doc_remark;
+ TQString doc_version;
vector<Article> articles;
vector<Conjugation> conjugations;
diff --git a/kanagram/src/keduvocexpression.cpp b/kanagram/src/keduvocexpression.cpp
index 9ac29894..8d01c8ba 100644
--- a/kanagram/src/keduvocexpression.cpp
+++ b/kanagram/src/keduvocexpression.cpp
@@ -34,7 +34,7 @@ void KEduVocExpression::Init()
}
-KEduVocExpression::KEduVocExpression (QString &expr, int _lesson)
+KEduVocExpression::KEduVocExpression (TQString &expr, int _lesson)
{
Init();
setOriginal(expr.stripWhiteSpace() );
@@ -48,10 +48,10 @@ KEduVocExpression::KEduVocExpression ()
}
-KEduVocExpression::KEduVocExpression (QString &s, QString separator, int _lesson)
+KEduVocExpression::KEduVocExpression (TQString &s, TQString separator, int _lesson)
{
Init();
- QString se;
+ TQString se;
lesson = _lesson;
if (separator.length() ) {
@@ -90,7 +90,7 @@ int KEduVocExpression::numTranslations() const
}
-QString KEduVocExpression::getRemark (int idx) const
+TQString KEduVocExpression::getRemark (int idx) const
{
if (idx >= (int)remarks.size() || idx < 0) {
return "";
@@ -101,7 +101,7 @@ QString KEduVocExpression::getRemark (int idx) const
}
-void KEduVocExpression::setRemark (int idx, const QString & expr)
+void KEduVocExpression::setRemark (int idx, const TQString & expr)
{
if ( idx < 0) return;
@@ -114,7 +114,7 @@ void KEduVocExpression::setRemark (int idx, const QString & expr)
}
-void KEduVocExpression::setFauxAmi (int idx, const QString & expr, bool rev_ami)
+void KEduVocExpression::setFauxAmi (int idx, const TQString & expr, bool rev_ami)
{
if (idx < 1) return;
@@ -138,7 +138,7 @@ void KEduVocExpression::setFauxAmi (int idx, const QString & expr, bool rev_ami)
}
-QString KEduVocExpression::getFauxAmi (int idx, bool rev_ami) const
+TQString KEduVocExpression::getFauxAmi (int idx, bool rev_ami) const
{
if (rev_ami) {
if (idx >= (int)rev_fauxAmi.size() || idx < 1 ) {
@@ -156,7 +156,7 @@ QString KEduVocExpression::getFauxAmi (int idx, bool rev_ami) const
}
-void KEduVocExpression::setSynonym (int idx, const QString & expr)
+void KEduVocExpression::setSynonym (int idx, const TQString & expr)
{
if ( idx < 0) return;
@@ -169,7 +169,7 @@ void KEduVocExpression::setSynonym (int idx, const QString & expr)
}
-QString KEduVocExpression::getSynonym (int idx) const
+TQString KEduVocExpression::getSynonym (int idx) const
{
if (idx >= (int)synonym.size() || idx < 0) {
return "";
@@ -180,7 +180,7 @@ QString KEduVocExpression::getSynonym (int idx) const
}
-void KEduVocExpression::setExample (int idx, const QString & expr)
+void KEduVocExpression::setExample (int idx, const TQString & expr)
{
if ( idx < 0) return;
@@ -193,7 +193,7 @@ void KEduVocExpression::setExample (int idx, const QString & expr)
}
-QString KEduVocExpression::getExample (int idx) const
+TQString KEduVocExpression::getExample (int idx) const
{
if (idx >= (int)example.size() || idx < 0) {
return "";
@@ -204,7 +204,7 @@ QString KEduVocExpression::getExample (int idx) const
}
-void KEduVocExpression::setUsageLabel (int idx, const QString & expr)
+void KEduVocExpression::setUsageLabel (int idx, const TQString & expr)
{
if ( idx < 0) return;
@@ -217,7 +217,7 @@ void KEduVocExpression::setUsageLabel (int idx, const QString & expr)
}
-QString KEduVocExpression::getUsageLabel (int idx) const
+TQString KEduVocExpression::getUsageLabel (int idx) const
{
if (idx >= (int)usageLabels.size() || idx < 0) {
return "";
@@ -228,7 +228,7 @@ QString KEduVocExpression::getUsageLabel (int idx) const
}
-void KEduVocExpression::setParaphrase (int idx, const QString & expr)
+void KEduVocExpression::setParaphrase (int idx, const TQString & expr)
{
if ( idx < 0) return;
@@ -241,7 +241,7 @@ void KEduVocExpression::setParaphrase (int idx, const QString & expr)
}
-QString KEduVocExpression::getParaphrase (int idx) const
+TQString KEduVocExpression::getParaphrase (int idx) const
{
if (idx >= (int)paraphrases.size() || idx < 0) {
return "";
@@ -252,7 +252,7 @@ QString KEduVocExpression::getParaphrase (int idx) const
}
-void KEduVocExpression::setAntonym (int idx, const QString & expr)
+void KEduVocExpression::setAntonym (int idx, const TQString & expr)
{
if ( idx < 0) return;
@@ -265,7 +265,7 @@ void KEduVocExpression::setAntonym (int idx, const QString & expr)
}
-QString KEduVocExpression::getAntonym (int idx) const
+TQString KEduVocExpression::getAntonym (int idx) const
{
if (idx >= (int)antonym.size() || idx < 0) {
return "";
@@ -348,7 +348,7 @@ MultipleChoice KEduVocExpression::getMultipleChoice (int idx) const
}
-QString KEduVocExpression::getPronunce (int idx) const
+TQString KEduVocExpression::getPronunce (int idx) const
{
if (idx >= (int)pronunces.size() || idx < 0) {
return "";
@@ -359,7 +359,7 @@ QString KEduVocExpression::getPronunce (int idx) const
}
-void KEduVocExpression::setPronunce (int idx, const QString & expr)
+void KEduVocExpression::setPronunce (int idx, const TQString & expr)
{
if ( idx < 0) return;
@@ -372,7 +372,7 @@ void KEduVocExpression::setPronunce (int idx, const QString & expr)
}
-void KEduVocExpression::addTranslation (QString expr,
+void KEduVocExpression::addTranslation (TQString expr,
grade_t grade, grade_t rev_grade)
{
if (grade > KV_MAX_GRADE)
@@ -387,7 +387,7 @@ void KEduVocExpression::addTranslation (QString expr,
}
-QString KEduVocExpression::getTranslation (int idx) const
+TQString KEduVocExpression::getTranslation (int idx) const
{
if (idx > (int)translations.size() || idx < 1)
return "";
@@ -466,7 +466,7 @@ void KEduVocExpression::removeTranslation (int idx)
}
-void KEduVocExpression::setTranslation (int idx, const QString & expr)
+void KEduVocExpression::setTranslation (int idx, const TQString & expr)
{
if ( idx <= 0) return;
@@ -480,9 +480,9 @@ void KEduVocExpression::setTranslation (int idx, const QString & expr)
}
-QString KEduVocExpression::gradeStr (int idx, bool rev_grade) const
+TQString KEduVocExpression::gradeStr (int idx, bool rev_grade) const
{
- QString s;
+ TQString s;
s.setNum(getGrade(idx, rev_grade));
return s;
}
@@ -724,7 +724,7 @@ void KEduVocExpression::setQueryDate (int idx, time_t date, bool rev_date)
bool KEduVocExpression::uniqueType () const
{
bool unique = true;
- QString type0 = getType(0);
+ TQString type0 = getType(0);
for (int i = 1; i < numTranslations(); i++)
if (type0 != getType(i) )
unique = false;
@@ -732,7 +732,7 @@ bool KEduVocExpression::uniqueType () const
}
-QString KEduVocExpression::getType (int idx) const
+TQString KEduVocExpression::getType (int idx) const
{
if (idx >= (int)exprtypes.size() || idx < 0) {
return "";
@@ -760,13 +760,13 @@ void KEduVocExpression::incBadCount (int index, bool rev_count)
}
-void KEduVocExpression::setOriginal ( const QString & expr)
+void KEduVocExpression::setOriginal ( const TQString & expr)
{
origin = expr;
}
-QString KEduVocExpression::getOriginal () const
+TQString KEduVocExpression::getOriginal () const
{
return origin;
}
@@ -778,7 +778,7 @@ void KEduVocExpression::setLesson (int l)
}
-void KEduVocExpression::setType (int idx, const QString &type)
+void KEduVocExpression::setType (int idx, const TQString &type)
{
if ( idx < 0) return;
diff --git a/kanagram/src/keduvocexpression.h b/kanagram/src/keduvocexpression.h
index 64b2233b..eb3ac4ec 100644
--- a/kanagram/src/keduvocexpression.h
+++ b/kanagram/src/keduvocexpression.h
@@ -72,20 +72,20 @@ class KEduVocExpression
KEduVocExpression ();
- KEduVocExpression (QString &s, QString separator, int lesson = 0);
+ KEduVocExpression (TQString &s, TQString separator, int lesson = 0);
/** Constructor for an expression in different languages
*
* @param expr expression
*/
- KEduVocExpression (QString &expr, int lesson = 0);
+ KEduVocExpression (TQString &expr, int lesson = 0);
/** adds a new translation of this entry
* @param expr translation
* @param grade grade of knowledge of this translation
* @param rev_grade dito, in opposite direction
*/
- void addTranslation (QString expr, grade_t grade=KV_NORM_GRADE,
+ void addTranslation (TQString expr, grade_t grade=KV_NORM_GRADE,
grade_t rev_grade=KV_NORM_GRADE);
/** removes translation
@@ -104,11 +104,11 @@ class KEduVocExpression
/** returns original expression of this entry
*/
- QString getOriginal () const;
+ TQString getOriginal () const;
/** sets original expression of this entry
*/
- void setOriginal (const QString & expr);
+ void setOriginal (const TQString & expr);
/** returns number of max. translations of all expressions
*/
@@ -135,42 +135,42 @@ class KEduVocExpression
* @param index number of translation
* @result expression or "" if no translation available
*/
- QString getTranslation (int index) const;
+ TQString getTranslation (int index) const;
/** sets translation of this expression
*
* @param index number of translation
* @param expr expression of this index
*/
- void setTranslation (int index, const QString & expr);
+ void setTranslation (int index, const TQString & expr);
/** sets remark of this expression
*
* @param index index of expression
* @param expr remark of this index
*/
- void setPronunce (int index, const QString & expr);
+ void setPronunce (int index, const TQString & expr);
/** returns pronunciation of this expression
*
* @param index index of expression
* @result pronunciation or "" if none available
*/
- QString getPronunce (int index) const;
+ TQString getPronunce (int index) const;
/** returns remarks of this expression
*
* @param index index of expression
* @result remark or "" if no remark available
*/
- QString getRemark (int index) const;
+ TQString getRemark (int index) const;
/** sets remark of this expression
*
* @param index index of expression
* @param expr remark of this index
*/
- void setRemark (int index, const QString & expr);
+ void setRemark (int index, const TQString & expr);
/** sets false friend of this expression
@@ -179,7 +179,7 @@ class KEduVocExpression
* @param expr false friend of this index
* @param rev_grade dito, in opposite direction
*/
- void setFauxAmi (int index, const QString & expr, bool rev_ami = false);
+ void setFauxAmi (int index, const TQString & expr, bool rev_ami = false);
/** returns false friend of this expression
@@ -188,14 +188,14 @@ class KEduVocExpression
* @param rev_grade dito, in opposite direction
* @result false friend or "" if no string available
*/
- QString getFauxAmi (int index, bool rev_ami = false) const;
+ TQString getFauxAmi (int index, bool rev_ami = false) const;
/** sets synonym this expression
*
* @param index index of expression
* @param expr synonym of this index
*/
- void setSynonym (int index, const QString & expr);
+ void setSynonym (int index, const TQString & expr);
/** returns synonym of this expression
@@ -203,14 +203,14 @@ class KEduVocExpression
* @param index index of expression
* @result synonym or "" if no string available
*/
- QString getSynonym (int index) const;
+ TQString getSynonym (int index) const;
/** sets example this expression
*
* @param index index of expression
* @param expr example of this index
*/
- void setExample (int index, const QString & expr);
+ void setExample (int index, const TQString & expr);
/** returns example of this expression
@@ -218,14 +218,14 @@ class KEduVocExpression
* @param index index of expression
* @result example or "" if no string available
*/
- QString getExample (int index) const;
+ TQString getExample (int index) const;
/** sets usage label this expression
*
* @param index index of expression
* @param usage usage label of this index
*/
- void setUsageLabel (int index, const QString & usage);
+ void setUsageLabel (int index, const TQString & usage);
/** returns usage label of this expression
@@ -233,14 +233,14 @@ class KEduVocExpression
* @param index index of expression
* @result usage or "" if no string available
*/
- QString getUsageLabel (int index) const;
+ TQString getUsageLabel (int index) const;
/** sets paraphrase of this expression
*
* @param index index of expression
* @param usage paraphrase of this index
*/
- void setParaphrase (int index, const QString & usage);
+ void setParaphrase (int index, const TQString & usage);
/** returns paraphrase of this expression
@@ -248,14 +248,14 @@ class KEduVocExpression
* @param index index of expression
* @result paraphrase or "" if no string available
*/
- QString getParaphrase (int index) const;
+ TQString getParaphrase (int index) const;
/** sets antonym this expression
*
* @param index index of expression
* @param expr antonym of this index
*/
- void setAntonym (int index, const QString & expr);
+ void setAntonym (int index, const TQString & expr);
/** returns antonym of this expression
@@ -263,13 +263,13 @@ class KEduVocExpression
* @param index index of expression
* @result antonym or "" if no string available
*/
- QString getAntonym (int index) const;
+ TQString getAntonym (int index) const;
/** returns type of this expression
*
* @result type or "" if no type available
*/
- QString getType (int index) const;
+ TQString getType (int index) const;
/** all langs have same type ?
*
@@ -282,7 +282,7 @@ class KEduVocExpression
* @param index index of type
* @param type type of this expression ("" = none)
*/
- void setType (int index, const QString &type);
+ void setType (int index, const TQString &type);
/** returns grade of given translation as string
*
@@ -290,7 +290,7 @@ class KEduVocExpression
* @param rev_grade dito, in opposite direction
* @result number of knowlegde: 0=known, x=numbers not knows
*/
- QString gradeStr (int index, bool rev_grade = false) const;
+ TQString gradeStr (int index, bool rev_grade = false) const;
/** sets grade of given translation
*
@@ -421,20 +421,20 @@ class KEduVocExpression
void Init();
private:
- QString origin;
+ TQString origin;
// all these vectors must be deleted in removeTranslation()
- vector<QString> exprtypes;
- vector<QString> translations;
- vector<QString> remarks;
- vector<QString> usageLabels;
- vector<QString> paraphrases;
- vector<QString> fauxAmi;
- vector<QString> rev_fauxAmi;
- vector<QString> synonym;
- vector<QString> example;
- vector<QString> antonym;
- vector<QString> pronunces;
+ vector<TQString> exprtypes;
+ vector<TQString> translations;
+ vector<TQString> remarks;
+ vector<TQString> usageLabels;
+ vector<TQString> paraphrases;
+ vector<TQString> fauxAmi;
+ vector<TQString> rev_fauxAmi;
+ vector<TQString> synonym;
+ vector<TQString> example;
+ vector<TQString> antonym;
+ vector<TQString> pronunces;
vector<grade_t> grades;
vector<grade_t> rev_grades;
vector<count_t> qcounts;
diff --git a/kanagram/src/keduvockvtmlreader.cpp b/kanagram/src/keduvockvtmlreader.cpp
index 13e6f53a..fc1441f6 100644
--- a/kanagram/src/keduvockvtmlreader.cpp
+++ b/kanagram/src/keduvockvtmlreader.cpp
@@ -21,13 +21,13 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "keduvockvtmlreader.h"
#include "keduvocdocument.h"
-KEduVocKvtmlReader::KEduVocKvtmlReader(QFile *file)
+KEduVocKvtmlReader::KEduVocKvtmlReader(TQFile *file)
{
// the file must be already open
m_inputFile = file;
@@ -38,16 +38,16 @@ KEduVocKvtmlReader::~KEduVocKvtmlReader()
}
-bool KEduVocKvtmlReader::readLesson(QDomElement &domElementParent)
+bool KEduVocKvtmlReader::readLesson(TQDomElement &domElementParent)
{
- QString s;
+ TQString s;
m_doc->lesson_descr.clear();
//-------------------------------------------------------------------------
// Attributes
//-------------------------------------------------------------------------
- QDomAttr domAttrWidth = domElementParent.attributeNode(KV_SIZEHINT);
+ TQDomAttr domAttrWidth = domElementParent.attributeNode(KV_SIZEHINT);
if (!domAttrWidth.isNull())
m_doc->setSizeHint(-1, domAttrWidth.value().toInt());
@@ -55,7 +55,7 @@ bool KEduVocKvtmlReader::readLesson(QDomElement &domElementParent)
// Children
//-------------------------------------------------------------------------
- QDomElement domElementChild = domElementParent.firstChild().toElement();
+ TQDomElement domElementChild = domElementParent.firstChild().toElement();
while (!domElementChild.isNull())
{
@@ -67,18 +67,18 @@ bool KEduVocKvtmlReader::readLesson(QDomElement &domElementParent)
int no = 0;
bool isCurr = false;
- QDomAttr domAttrNo = domElementChild.attributeNode(KV_LESS_NO);
+ TQDomAttr domAttrNo = domElementChild.attributeNode(KV_LESS_NO);
if (!domAttrNo.isNull())
no = domAttrNo.value().toInt();
- QDomAttr domAttrCurrent = domElementChild.attributeNode(KV_LESS_CURR);
+ TQDomAttr domAttrCurrent = domElementChild.attributeNode(KV_LESS_CURR);
if (!domAttrCurrent.isNull())
isCurr = domAttrCurrent.value().toInt() != 0;
if (isCurr && no != 0)
m_doc->setCurrentLesson(no);
- QDomAttr domAttrQuery = domElementChild.attributeNode(KV_LESS_QUERY);
+ TQDomAttr domAttrQuery = domElementChild.attributeNode(KV_LESS_QUERY);
if (!domAttrQuery.isNull())
m_doc->lessons_in_query.push_back(domAttrQuery.value().toInt() != 0);
else
@@ -105,7 +105,7 @@ bool KEduVocKvtmlReader::readLesson(QDomElement &domElementParent)
}
-bool KEduVocKvtmlReader::readArticle(QDomElement &domElementParent)
+bool KEduVocKvtmlReader::readArticle(TQDomElement &domElementParent)
/*
<article>
<e l="de"> lang determines also lang order in entries !!
@@ -122,10 +122,10 @@ bool KEduVocKvtmlReader::readArticle(QDomElement &domElementParent)
bool endOfGroup = false;
bool inEntry = false;
int count = 0;
- QString s;
+ TQString s;
m_doc->articles.clear();
- QDomElement domElementEntry = domElementParent.firstChild().toElement();
+ TQDomElement domElementEntry = domElementParent.firstChild().toElement();
while (!domElementEntry.isNull())
{
@@ -138,8 +138,8 @@ bool KEduVocKvtmlReader::readArticle(QDomElement &domElementParent)
//----------
// Attribute
- QString lang;
- QDomAttr domAttrLang = domElementEntry.attributeNode(KV_LANG);
+ TQString lang;
+ TQDomAttr domAttrLang = domElementEntry.attributeNode(KV_LANG);
if ((int)m_doc->langs.size() <= count)
{
@@ -163,14 +163,14 @@ bool KEduVocKvtmlReader::readArticle(QDomElement &domElementParent)
//---------
// Children
- QString fem_def = "";
- QString mal_def = "";
- QString nat_def = "";
- QString fem_indef = "";
- QString mal_indef = "";
- QString nat_indef = "";
+ TQString fem_def = "";
+ TQString mal_def = "";
+ TQString nat_def = "";
+ TQString fem_indef = "";
+ TQString mal_indef = "";
+ TQString nat_indef = "";
- QDomElement domElementEntryChild = domElementEntry.firstChild().toElement();
+ TQDomElement domElementEntryChild = domElementEntry.firstChild().toElement();
while (!domElementEntryChild.isNull())
{
if (domElementEntryChild.tagName() == KV_ART_FD)
@@ -230,9 +230,9 @@ bool KEduVocKvtmlReader::readArticle(QDomElement &domElementParent)
}
-bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
+bool KEduVocKvtmlReader::readConjug(TQDomElement &domElementParent,
vector<Conjugation> &curr_conjug,
- const QString &entry_tag)
+ const TQString &entry_tag)
/*
<conjugation> used in header for definiton of "prefix"
<e l="de"> lang determines also lang order in entries !!
@@ -265,13 +265,13 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
</conjugation>
*/
{
- QString s;
+ TQString s;
curr_conjug.clear();
bool p3_common,
s3_common;
- QString pers1_sing,
+ TQString pers1_sing,
pers2_sing,
pers3_m_sing,
pers3_f_sing,
@@ -282,12 +282,12 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
pers3_f_plur,
pers3_n_plur;
- QString lang;
- QString type;
+ TQString lang;
+ TQString type;
int count = 0;
curr_conjug.push_back(Conjugation());
- QDomElement domElementConjugChild = domElementParent.firstChild().toElement();
+ TQDomElement domElementConjugChild = domElementParent.firstChild().toElement();
while (!domElementConjugChild.isNull())
{
if (domElementConjugChild.tagName() == KV_CON_ENTRY)
@@ -297,8 +297,8 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
//----------
// Attribute
- QString lang;
- QDomAttr domAttrLang = domElementConjugChild.attributeNode(KV_LANG);
+ TQString lang;
+ TQDomAttr domAttrLang = domElementConjugChild.attributeNode(KV_LANG);
if ((int)m_doc->langs.size() <= count)
{
@@ -324,7 +324,7 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
//----------
// Attribute
- QDomAttr domAttrLang = domElementConjugChild.attributeNode(KV_CON_NAME);
+ TQDomAttr domAttrLang = domElementConjugChild.attributeNode(KV_CON_NAME);
type = domAttrLang.value();
if (type.isNull())
type = "";
@@ -335,7 +335,7 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
if( num > (int) m_doc->tense_descr.size() )
{
// description missing ?
- QString s;
+ TQString s;
for (int i = m_doc->tense_descr.size(); i < num; i++)
{
s.setNum (i+1);
@@ -359,7 +359,7 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
p3_common = false;
s3_common = false;
- QDomElement domElementConjugGrandChild = domElementConjugChild.firstChild().toElement();
+ TQDomElement domElementConjugGrandChild = domElementConjugChild.firstChild().toElement();
while (!domElementConjugGrandChild.isNull())
{
if (domElementConjugGrandChild.tagName() == KV_CON_P1S)
@@ -376,7 +376,7 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
}
else if (domElementConjugGrandChild.tagName() == KV_CON_P3SF)
{
- QDomAttr domAttrCommon = domElementConjugGrandChild.attributeNode(KV_CONJ_COMMON);
+ TQDomAttr domAttrCommon = domElementConjugGrandChild.attributeNode(KV_CONJ_COMMON);
if (!domAttrCommon.isNull())
s3_common = domAttrCommon.value().toInt(); // returns 0 if the conversion fails
@@ -410,7 +410,7 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
}
else if (domElementConjugGrandChild.tagName() == KV_CON_P3PF)
{
- QDomAttr domAttrCommon = domElementConjugGrandChild.attributeNode(KV_CONJ_COMMON);
+ TQDomAttr domAttrCommon = domElementConjugGrandChild.attributeNode(KV_CONJ_COMMON);
if (!domAttrCommon.isNull())
p3_common = domAttrCommon.value().toInt(); // returns 0 if the conversion fails
@@ -466,15 +466,15 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent,
}
-bool KEduVocKvtmlReader::readOptions(QDomElement &domElementParent)
+bool KEduVocKvtmlReader::readOptions(TQDomElement &domElementParent)
{
- QDomElement domElementSort = domElementParent.firstChild().toElement();
+ TQDomElement domElementSort = domElementParent.firstChild().toElement();
while (!domElementSort.isNull())
{
if (domElementSort.tagName() == KV_OPT_SORT)
{
m_doc->sort_allowed = true;
- QDomAttr domAttrOn = domElementSort.attributeNode(KV_BOOL_FLAG);
+ TQDomAttr domAttrOn = domElementSort.attributeNode(KV_BOOL_FLAG);
if (!domAttrOn.isNull())
{
bool ok = true;
@@ -491,12 +491,12 @@ bool KEduVocKvtmlReader::readOptions(QDomElement &domElementParent)
}
-bool KEduVocKvtmlReader::readType(QDomElement &domElementParent)
+bool KEduVocKvtmlReader::readType(TQDomElement &domElementParent)
{
- QString s;
+ TQString s;
m_doc->type_descr.clear();
- QDomElement domElementDesc = domElementParent.firstChild().toElement();
+ TQDomElement domElementDesc = domElementParent.firstChild().toElement();
while (!domElementDesc.isNull())
{
@@ -508,7 +508,7 @@ bool KEduVocKvtmlReader::readType(QDomElement &domElementParent)
int no = 0;
bool isCurr = false;
- QDomAttr domAttrNo = domElementDesc.attributeNode(KV_TYPE_NO);
+ TQDomAttr domAttrNo = domElementDesc.attributeNode(KV_TYPE_NO);
if (!domAttrNo.isNull())
no = domAttrNo.value().toInt();
@@ -534,12 +534,12 @@ bool KEduVocKvtmlReader::readType(QDomElement &domElementParent)
}
-bool KEduVocKvtmlReader::readTense(QDomElement &domElementParent)
+bool KEduVocKvtmlReader::readTense(TQDomElement &domElementParent)
{
- QString s;
+ TQString s;
m_doc->tense_descr.clear();
- QDomElement domElementDesc = domElementParent.firstChild().toElement();
+ TQDomElement domElementDesc = domElementParent.firstChild().toElement();
while (!domElementDesc.isNull())
{
@@ -551,7 +551,7 @@ bool KEduVocKvtmlReader::readTense(QDomElement &domElementParent)
int no = 0;
bool isCurr = false;
- QDomAttr domAttrNo = domElementDesc.attributeNode(KV_TENSE_NO);
+ TQDomAttr domAttrNo = domElementDesc.attributeNode(KV_TENSE_NO);
if (!domAttrNo.isNull())
no = domAttrNo.value().toInt();
@@ -577,12 +577,12 @@ bool KEduVocKvtmlReader::readTense(QDomElement &domElementParent)
}
-bool KEduVocKvtmlReader::readUsage(QDomElement &domElementParent)
+bool KEduVocKvtmlReader::readUsage(TQDomElement &domElementParent)
{
- QString s;
+ TQString s;
m_doc->usage_descr.clear();
- QDomElement domElementDesc = domElementParent.firstChild().toElement();
+ TQDomElement domElementDesc = domElementParent.firstChild().toElement();
while (!domElementDesc.isNull())
{
@@ -594,7 +594,7 @@ bool KEduVocKvtmlReader::readUsage(QDomElement &domElementParent)
int no = 0;
bool isCurr = false;
- QDomAttr domAttrNo = domElementDesc.attributeNode(KV_USAGE_NO);
+ TQDomAttr domAttrNo = domElementDesc.attributeNode(KV_USAGE_NO);
if (!domAttrNo.isNull())
no = domAttrNo.value().toInt();
@@ -620,7 +620,7 @@ bool KEduVocKvtmlReader::readUsage(QDomElement &domElementParent)
}
-bool KEduVocKvtmlReader::readComparison(QDomElement &domElementParent,
+bool KEduVocKvtmlReader::readComparison(TQDomElement &domElementParent,
Comparison &comp)
/*
<comparison>
@@ -630,10 +630,10 @@ bool KEduVocKvtmlReader::readComparison(QDomElement &domElementParent,
</comparison>
*/
{
- QString s;
+ TQString s;
comp.clear();
- QDomElement domElementComparisonChild = domElementParent.firstChild().toElement();
+ TQDomElement domElementComparisonChild = domElementParent.firstChild().toElement();
while (!domElementComparisonChild.isNull())
{
if (domElementComparisonChild.tagName() == KV_COMP_L1)
@@ -673,7 +673,7 @@ bool KEduVocKvtmlReader::readComparison(QDomElement &domElementParent,
}
-bool KEduVocKvtmlReader::readMultipleChoice(QDomElement &domElementParent,
+bool KEduVocKvtmlReader::readMultipleChoice(TQDomElement &domElementParent,
MultipleChoice &mc)
/*
<multiplechoice>
@@ -686,10 +686,10 @@ bool KEduVocKvtmlReader::readMultipleChoice(QDomElement &domElementParent,
*/
{
- QString s;
+ TQString s;
mc.clear();
- QDomElement domElementChild = domElementParent.firstChild().toElement();
+ TQDomElement domElementChild = domElementParent.firstChild().toElement();
while (!domElementChild.isNull())
{
if (domElementChild.tagName() == KV_MC_1)
@@ -746,43 +746,43 @@ bool KEduVocKvtmlReader::readMultipleChoice(QDomElement &domElementParent,
}
-bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementExpressionChild,
- QString &lang,
+bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElementExpressionChild,
+ TQString &lang,
grade_t &grade, grade_t &rev_grade,
int &count, int &rev_count,
time_t &date, time_t &rev_date,
- QString &remark,
+ TQString &remark,
int &bcount, int &rev_bcount,
- QString &query_id,
- QString &pronunce,
+ TQString &query_id,
+ TQString &pronunce,
int &width,
- QString &type,
- QString &faux_ami_f,
- QString &faux_ami_t,
- QString &synonym,
- QString &example,
- QString &antonym,
- QString &usage,
- QString &paraphrase)
+ TQString &type,
+ TQString &faux_ami_f,
+ TQString &faux_ami_t,
+ TQString &synonym,
+ TQString &example,
+ TQString &antonym,
+ TQString &usage,
+ TQString &paraphrase)
{
int pos;
lang = "";
- QDomAttr domAttrLang = domElementExpressionChild.attributeNode(KV_LANG);
+ TQDomAttr domAttrLang = domElementExpressionChild.attributeNode(KV_LANG);
if (!domAttrLang.isNull())
lang = domAttrLang.value();
width = -1;
- QDomAttr domAttrWidth = domElementExpressionChild.attributeNode(KV_SIZEHINT);
+ TQDomAttr domAttrWidth = domElementExpressionChild.attributeNode(KV_SIZEHINT);
if (!domAttrWidth.isNull())
width = domAttrWidth.value().toInt();
grade = KV_NORM_GRADE;
rev_grade = KV_NORM_GRADE;
- QDomAttr domAttrGrade = domElementExpressionChild.attributeNode(KV_LANG);
+ TQDomAttr domAttrGrade = domElementExpressionChild.attributeNode(KV_LANG);
if (!domAttrGrade.isNull())
{
- QString s = domAttrGrade.value();
+ TQString s = domAttrGrade.value();
if ((pos = s.find(';')) >= 1)
{
grade = s.left(pos).toInt();
@@ -794,10 +794,10 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
count = 0;
rev_count = 0;
- QDomAttr domAttrCount = domElementExpressionChild.attributeNode(KV_COUNT);
+ TQDomAttr domAttrCount = domElementExpressionChild.attributeNode(KV_COUNT);
if (!domAttrCount.isNull())
{
- QString s = domAttrCount.value();
+ TQString s = domAttrCount.value();
if ((pos = s.find(';')) >= 1)
{
count = s.left(pos).toInt();
@@ -809,10 +809,10 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
bcount = 0;
rev_bcount = 0;
- QDomAttr domAttrBad = domElementExpressionChild.attributeNode(KV_BAD);
+ TQDomAttr domAttrBad = domElementExpressionChild.attributeNode(KV_BAD);
if (!domAttrBad.isNull())
{
- QString s = domAttrBad.value();
+ TQString s = domAttrBad.value();
if ((pos = s.find(';')) >= 1)
{
bcount = s.left(pos).toInt();
@@ -824,10 +824,10 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
date = 0;
rev_date = 0;
- QDomAttr domAttrDate = domElementExpressionChild.attributeNode(KV_DATE);
+ TQDomAttr domAttrDate = domElementExpressionChild.attributeNode(KV_DATE);
if (!domAttrDate.isNull())
{
- QString s = domAttrDate.value();
+ TQString s = domAttrDate.value();
if ((pos = s.find(';')) >= 1)
{
date = s.left(pos).toInt();
@@ -837,10 +837,10 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
date = s.toInt();
}
- QDomAttr domAttrDate2 = domElementExpressionChild.attributeNode(KV_DATE2);
+ TQDomAttr domAttrDate2 = domElementExpressionChild.attributeNode(KV_DATE2);
if (!domAttrDate2.isNull())
{
- QString s = domAttrDate2.value();
+ TQString s = domAttrDate2.value();
if ((pos = s.find(';')) >= 1)
{
date = m_doc->decompressDate(s.left(pos));
@@ -851,32 +851,32 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
}
remark = "";
- QDomAttr domAttrRemark = domElementExpressionChild.attributeNode(KV_REMARK);
+ TQDomAttr domAttrRemark = domElementExpressionChild.attributeNode(KV_REMARK);
if (!domAttrRemark.isNull())
remark = domAttrRemark.value();
faux_ami_f = "";
- QDomAttr domAttrFauxAmiF = domElementExpressionChild.attributeNode(KV_FAUX_AMI_F);
+ TQDomAttr domAttrFauxAmiF = domElementExpressionChild.attributeNode(KV_FAUX_AMI_F);
if (!domAttrFauxAmiF.isNull())
faux_ami_f = domAttrFauxAmiF.value();
faux_ami_t = "";
- QDomAttr domAttrFauxAmiT = domElementExpressionChild.attributeNode(KV_FAUX_AMI_T);
+ TQDomAttr domAttrFauxAmiT = domElementExpressionChild.attributeNode(KV_FAUX_AMI_T);
if (!domAttrFauxAmiT.isNull())
faux_ami_t = domAttrFauxAmiT.value();
synonym = "";
- QDomAttr domAttrSynonym = domElementExpressionChild.attributeNode(KV_SYNONYM);
+ TQDomAttr domAttrSynonym = domElementExpressionChild.attributeNode(KV_SYNONYM);
if (!domAttrSynonym.isNull())
synonym = domAttrSynonym.value();
example = "";
- QDomAttr domAttrExample = domElementExpressionChild.attributeNode(KV_EXAMPLE);
+ TQDomAttr domAttrExample = domElementExpressionChild.attributeNode(KV_EXAMPLE);
if (!domAttrExample.isNull())
example = domAttrExample.value();
usage = "";
- QDomAttr domAttrUsage = domElementExpressionChild.attributeNode(KV_USAGE);
+ TQDomAttr domAttrUsage = domElementExpressionChild.attributeNode(KV_USAGE);
if (!domAttrUsage.isNull())
{
usage = domAttrUsage.value();
@@ -886,7 +886,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
if( num > (int) m_doc->usage_descr.size() )
{
// description missing ?
- QString s;
+ TQString s;
for (int i = m_doc->usage_descr.size(); i < num; i++)
{
s.setNum (i+1);
@@ -898,16 +898,16 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
}
paraphrase = "";
- QDomAttr domAttrParaphrase = domElementExpressionChild.attributeNode(KV_PARAPHRASE);
+ TQDomAttr domAttrParaphrase = domElementExpressionChild.attributeNode(KV_PARAPHRASE);
if (!domAttrParaphrase.isNull())
paraphrase = domAttrParaphrase.value();
antonym = "";
- QDomAttr domAttrAntonym = domElementExpressionChild.attributeNode(KV_ANTONYM);
+ TQDomAttr domAttrAntonym = domElementExpressionChild.attributeNode(KV_ANTONYM);
if (!domAttrAntonym.isNull())
antonym = domAttrAntonym.value();
- QDomAttr domAttrExprType = domElementExpressionChild.attributeNode(KV_EXPRTYPE);
+ TQDomAttr domAttrExprType = domElementExpressionChild.attributeNode(KV_EXPRTYPE);
if (!domAttrExprType.isNull())
{
type = domAttrExprType.value();
@@ -924,7 +924,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
if( num > (int) m_doc->type_descr.size() )
{
// description missing ?
- QString s;
+ TQString s;
for (int i = m_doc->type_descr.size(); i < num; i++)
{
s.setNum (i+1);
@@ -936,12 +936,12 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
}
pronunce = "";
- QDomAttr domAttrPronunce = domElementExpressionChild.attributeNode(KV_PRONUNCE);
+ TQDomAttr domAttrPronunce = domElementExpressionChild.attributeNode(KV_PRONUNCE);
if (!domAttrPronunce.isNull())
pronunce = domAttrPronunce.value();
query_id = "";
- QDomAttr domAttrQuery = domElementExpressionChild.attributeNode(KV_QUERY);
+ TQDomAttr domAttrQuery = domElementExpressionChild.attributeNode(KV_QUERY);
if (!domAttrQuery.isNull())
query_id = domAttrQuery.value();
@@ -949,7 +949,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( QDomElement &domElementE
}
-bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
+bool KEduVocKvtmlReader::readExpression(TQDomElement &domElementParent)
{
grade_t grade,
r_grade;
@@ -957,30 +957,30 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
r_qcount;
int bcount,
r_bcount;
- QString remark;
- QString pronunce;
+ TQString remark;
+ TQString pronunce;
time_t qdate,
r_qdate;
bool inquery;
bool active;
- QString lang;
- QString textstr;
- QString exprtype;
+ TQString lang;
+ TQString textstr;
+ TQString exprtype;
bool org_found = false;
- QString q_org,
+ TQString q_org,
q_trans;
- QString query_id;
+ TQString query_id;
KEduVocExpression expr;
int lesson = 0;
int width;
- QString type;
- QString faux_ami_f;
- QString faux_ami_t;
- QString synonym;
- QString example;
- QString antonym;
- QString usage;
- QString paraphrase;
+ TQString type;
+ TQString faux_ami_f;
+ TQString faux_ami_t;
+ TQString synonym;
+ TQString example;
+ TQString antonym;
+ TQString usage;
+ TQString paraphrase;
vector<Conjugation> conjug;
Comparison comparison;
MultipleChoice mc;
@@ -989,23 +989,23 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
// Attributes
//-------------------------------------------------------------------------
- QDomAttr domAttrMember = domElementParent.attributeNode(KV_LESS_MEMBER);
+ TQDomAttr domAttrMember = domElementParent.attributeNode(KV_LESS_MEMBER);
if (!domAttrMember.isNull())
lesson = domAttrMember.value().toInt();
- QDomAttr domAttrSelected = domElementParent.attributeNode(KV_SELECTED);
+ TQDomAttr domAttrSelected = domElementParent.attributeNode(KV_SELECTED);
if (!domAttrSelected.isNull())
inquery = domAttrSelected.value().toInt();
else
inquery = false;
- QDomAttr domAttrInactive = domElementParent.attributeNode(KV_INACTIVE);
+ TQDomAttr domAttrInactive = domElementParent.attributeNode(KV_INACTIVE);
if (!domAttrInactive.isNull())
active = !domAttrInactive.value().toInt();
else
active = false;
- QDomAttr domAttrType = domElementParent.attributeNode(KV_EXPRTYPE);
+ TQDomAttr domAttrType = domElementParent.attributeNode(KV_EXPRTYPE);
if (!domAttrType.isNull())
{
exprtype = !domAttrType.value().toInt();
@@ -1022,7 +1022,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
if( num > (int) m_doc->type_descr.size() )
{
// description missing ?
- QString s;
+ TQString s;
for (int i = m_doc->type_descr.size(); i < num; i++)
{
s.setNum (i+1);
@@ -1036,7 +1036,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
if (lesson && lesson > (int) m_doc->lesson_descr.size() )
{
// description missing ?
- QString s;
+ TQString s;
for (int i = m_doc->lesson_descr.size(); i < lesson; i++)
{
s.setNum (i+1);
@@ -1051,7 +1051,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
// now want "original" and one or more "translations"
- QDomElement domElementExpressionChild = domElementParent.firstChild().toElement();
+ TQDomElement domElementExpressionChild = domElementParent.firstChild().toElement();
unsigned int count = 0;
org_found = false;
@@ -1132,7 +1132,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
bool bComparison = false;
bool bMultipleChoice = false;
- QDomElement domElementOriginalChild = domElementExpressionChild.firstChild().toElement();
+ TQDomElement domElementOriginalChild = domElementExpressionChild.firstChild().toElement();
while (!domElementOriginalChild.isNull())
{
if (domElementOriginalChild.tagName() == KV_CONJUG_GRP)
@@ -1144,7 +1144,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
}
bConjug = true;
conjug.clear();
- if (!readConjug(domElementOriginalChild, conjug, (QString) KV_CON_TYPE))
+ if (!readConjug(domElementOriginalChild, conjug, (TQString) KV_CON_TYPE))
return false;
}
@@ -1310,7 +1310,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
bool bComparison = false;
bool bMultipleChoice = false;
- QDomElement domElementOriginalChild = domElementExpressionChild.firstChild().toElement();
+ TQDomElement domElementOriginalChild = domElementExpressionChild.firstChild().toElement();
while (!domElementOriginalChild.isNull())
{
if (domElementOriginalChild.tagName() == KV_CONJUG_GRP)
@@ -1322,7 +1322,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
}
bConjug = true;
conjug.clear();
- if (!readConjug(domElementOriginalChild, conjug, (QString) KV_CON_TYPE))
+ if (!readConjug(domElementOriginalChild, conjug, (TQString) KV_CON_TYPE))
return false;
}
@@ -1430,7 +1430,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent)
}
-bool KEduVocKvtmlReader::readBody(QDomElement &domElementParent)
+bool KEduVocKvtmlReader::readBody(TQDomElement &domElementParent)
{
bool lessgroup = false;
bool optgroup = false;
@@ -1448,7 +1448,7 @@ if (lines != 0)
emit progressChanged(this, 0);
*/
- QDomElement domElementChild = domElementParent.firstChild().toElement();
+ TQDomElement domElementChild = domElementParent.firstChild().toElement();
while (!domElementChild.isNull())
{
@@ -1566,8 +1566,8 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc)
{
m_doc = doc;
- QDomDocument domDoc("Kvtml" );
- QString errorMsg;
+ TQDomDocument domDoc("Kvtml" );
+ TQString errorMsg;
if( !domDoc.setContent( m_inputFile, &errorMsg ) )
{
domError(errorMsg);
@@ -1586,7 +1586,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc)
m_doc->doc_remark = "";
- QDomElement domElementKvtml = domDoc.documentElement();
+ TQDomElement domElementKvtml = domDoc.documentElement();
if( domElementKvtml.tagName() != KV_DOCTYPE )
{
domError(i18n("Tag <%1> was expected "
@@ -1598,38 +1598,38 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc)
// Attributes
//-------------------------------------------------------------------------
- QDomAttr domAttrEncoding = domElementKvtml.attributeNode(KV_ENCODING);
+ TQDomAttr domAttrEncoding = domElementKvtml.attributeNode(KV_ENCODING);
if (!domAttrEncoding.isNull())
{
// TODO handle old encodings
// Qt DOM API autodetects encoding, so is there anything to do ?
}
- QDomAttr domAttrTitle = domElementKvtml.attributeNode(KV_TITLE);
+ TQDomAttr domAttrTitle = domElementKvtml.attributeNode(KV_TITLE);
if (!domAttrTitle.isNull())
{
m_doc->doctitle = domAttrTitle.value();
}
- QDomAttr domAttrAuthor = domElementKvtml.attributeNode(KV_AUTHOR);
+ TQDomAttr domAttrAuthor = domElementKvtml.attributeNode(KV_AUTHOR);
if (!domAttrAuthor.isNull())
{
m_doc->author = domAttrAuthor.value();
}
- QDomAttr domAttrLicence = domElementKvtml.attributeNode(KV_LICENSE);
+ TQDomAttr domAttrLicence = domElementKvtml.attributeNode(KV_LICENSE);
if (!domAttrLicence.isNull())
{
m_doc->license = domAttrLicence.value();
}
- QDomAttr domAttrRemark = domElementKvtml.attributeNode(KV_DOC_REM);
+ TQDomAttr domAttrRemark = domElementKvtml.attributeNode(KV_DOC_REM);
if (!domAttrRemark.isNull())
{
m_doc->doc_remark = domAttrRemark.value();
}
- QDomAttr domAttrGenerator = domElementKvtml.attributeNode(KV_GENERATOR);
+ TQDomAttr domAttrGenerator = domElementKvtml.attributeNode(KV_GENERATOR);
if (!domAttrGenerator.isNull())
{
m_doc->generator = domAttrGenerator.value();
@@ -1641,13 +1641,13 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc)
}
}
- QDomAttr domAttrCols = domElementKvtml.attributeNode(KV_COLS);
+ TQDomAttr domAttrCols = domElementKvtml.attributeNode(KV_COLS);
if (!domAttrCols.isNull())
{
m_doc->cols = domAttrCols.value().toInt();
}
- QDomAttr domAttrLines = domElementKvtml.attributeNode(KV_LINES);
+ TQDomAttr domAttrLines = domElementKvtml.attributeNode(KV_LINES);
if (!domAttrLines.isNull())
{
m_doc->lines = domAttrLines.value().toInt();
@@ -1665,31 +1665,31 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc)
}
-void KEduVocKvtmlReader::domErrorUnknownElement(const QString &elem)
+void KEduVocKvtmlReader::domErrorUnknownElement(const TQString &elem)
{
- QString ln = i18n("File:\t%1\n").arg(m_doc->URL().path());
+ TQString ln = i18n("File:\t%1\n").arg(m_doc->URL().path());
- QString format = i18n(
+ TQString format = i18n(
"Your document contains an unknown tag <%1>. " // keep trailing space
"Maybe your version of KVocTrain is too old, "
"or the document is damaged.\n"
"Loading is aborted because KVocTrain cannot "
"read documents with unknown elements.\n"
);
- QString msg = format.arg(elem);
- QApplication::setOverrideCursor( arrowCursor, true );
- QString s = kapp->makeStdCaption(i18n("Unknown Element"));
+ TQString msg = format.arg(elem);
+ TQApplication::setOverrideCursor( arrowCursor, true );
+ TQString s = kapp->makeStdCaption(i18n("Unknown Element"));
KMessageBox::sorry(0, ln+msg, s);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
-void KEduVocKvtmlReader::domError(const QString &text )
+void KEduVocKvtmlReader::domError(const TQString &text )
{
- QApplication::setOverrideCursor( arrowCursor, true );
- QString s = kapp->makeStdCaption(i18n("Error"));
- QString ln = i18n("File:\t%1\n").arg(m_doc->URL().path());
- QString msg = text;
+ TQApplication::setOverrideCursor( arrowCursor, true );
+ TQString s = kapp->makeStdCaption(i18n("Error"));
+ TQString ln = i18n("File:\t%1\n").arg(m_doc->URL().path());
+ TQString msg = text;
KMessageBox::error(0, ln+msg, s);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
diff --git a/kanagram/src/keduvockvtmlreader.h b/kanagram/src/keduvockvtmlreader.h
index 9d902183..a68d4575 100644
--- a/kanagram/src/keduvockvtmlreader.h
+++ b/kanagram/src/keduvockvtmlreader.h
@@ -19,8 +19,8 @@
#ifndef KEDUVOCKVTMLREADER_H
#define KEDUVOCKVTMLREADER_H
-#include <qfile.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqdom.h>
#include "keduvocdocument.h"
#include "grammarmanager.h"
@@ -71,50 +71,50 @@ class KEduVocDocument;
class KEduVocKvtmlReader : public QObject
{
public:
- KEduVocKvtmlReader(QFile *file);
+ KEduVocKvtmlReader(TQFile *file);
~KEduVocKvtmlReader();
bool readDoc(KEduVocDocument *doc);
- bool readLesson(QDomElement &domElementParent);
- bool readArticle(QDomElement &domElementParent);
- bool readConjug(QDomElement &domElementParent,
+ bool readLesson(TQDomElement &domElementParent);
+ bool readArticle(TQDomElement &domElementParent);
+ bool readConjug(TQDomElement &domElementParent,
vector<Conjugation> &curr_conjug,
- const QString &entry_tag);
- bool readOptions(QDomElement &domElementParent);
- bool readType(QDomElement &domElementParent);
- bool readTense(QDomElement &domElementParent);
- bool readUsage(QDomElement &domElementParent);
- bool readComparison(QDomElement &domElementParent,
+ const TQString &entry_tag);
+ bool readOptions(TQDomElement &domElementParent);
+ bool readType(TQDomElement &domElementParent);
+ bool readTense(TQDomElement &domElementParent);
+ bool readUsage(TQDomElement &domElementParent);
+ bool readComparison(TQDomElement &domElementParent,
Comparison &comp);
- bool readMultipleChoice(QDomElement &domElementParent,
+ bool readMultipleChoice(TQDomElement &domElementParent,
MultipleChoice &mc);
- bool readExpressionChildAttributes( QDomElement &domElementExpressionChild,
- QString &lang,
+ bool readExpressionChildAttributes( TQDomElement &domElementExpressionChild,
+ TQString &lang,
grade_t &grade, grade_t &rev_grade,
int &count, int &rev_count,
time_t &date, time_t &rev_date,
- QString &remark,
+ TQString &remark,
int &bcount, int &rev_bcount,
- QString &query_id,
- QString &pronunce,
+ TQString &query_id,
+ TQString &pronunce,
int &width,
- QString &type,
- QString &faux_ami_f,
- QString &faux_ami_t,
- QString &synonym,
- QString &example,
- QString &antonym,
- QString &usage,
- QString &paraphrase);
- bool readExpression(QDomElement &domElementParent);
- bool readBody(QDomElement &domElementParent);
-
- void domErrorUnknownElement(const QString &elem);
- void domError(const QString &text );
+ TQString &type,
+ TQString &faux_ami_f,
+ TQString &faux_ami_t,
+ TQString &synonym,
+ TQString &example,
+ TQString &antonym,
+ TQString &usage,
+ TQString &paraphrase);
+ bool readExpression(TQDomElement &domElementParent);
+ bool readBody(TQDomElement &domElementParent);
+
+ void domErrorUnknownElement(const TQString &elem);
+ void domError(const TQString &text );
private:
- QFile *m_inputFile;
+ TQFile *m_inputFile;
KEduVocDocument *m_doc;
};
diff --git a/kanagram/src/keduvockvtmlwriter.cpp b/kanagram/src/keduvockvtmlwriter.cpp
index c859d828..5aef1645 100644
--- a/kanagram/src/keduvockvtmlwriter.cpp
+++ b/kanagram/src/keduvockvtmlwriter.cpp
@@ -17,13 +17,13 @@
***************************************************************************/
#include <kdebug.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "keduvockvtmlwriter.h"
#include "keduvocdocument.h"
-KEduVocKvtmlWriter::KEduVocKvtmlWriter(QFile *file)
+KEduVocKvtmlWriter::KEduVocKvtmlWriter(TQFile *file)
{
// the file must be already open
m_outputFile = file;
@@ -33,19 +33,19 @@ KEduVocKvtmlWriter::~KEduVocKvtmlWriter()
{
}
-bool KEduVocKvtmlWriter::saveTypeNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent)
+bool KEduVocKvtmlWriter::saveTypeNameKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent)
{
if (m_doc->type_descr.size() == 0)
return true;
- QDomElement domElementType = domDoc.createElement(KV_TYPE_GRP);
+ TQDomElement domElementType = domDoc.createElement(KV_TYPE_GRP);
for (int lfn = 0; lfn < (int) m_doc->type_descr.size(); lfn++)
{
if (!(m_doc->type_descr[lfn].isNull()) )
{
- QDomElement domElementDesc = domDoc.createElement(KV_TYPE_DESC);
- QDomText domTextDesc = domDoc.createTextNode(m_doc->type_descr[lfn]);
+ TQDomElement domElementDesc = domDoc.createElement(KV_TYPE_DESC);
+ TQDomText domTextDesc = domDoc.createTextNode(m_doc->type_descr[lfn]);
domElementDesc.setAttribute(KV_TYPE_NO, lfn+1);
domElementDesc.appendChild(domTextDesc);
@@ -58,18 +58,18 @@ bool KEduVocKvtmlWriter::saveTypeNameKvtMl (QDomDocument &domDoc, QDomElement &d
}
-bool KEduVocKvtmlWriter::saveTenseNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent)
+bool KEduVocKvtmlWriter::saveTenseNameKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent)
{
if (m_doc->tense_descr.size() == 0)
return true;
- QDomElement domElementTense = domDoc.createElement(KV_TENSE_GRP);
+ TQDomElement domElementTense = domDoc.createElement(KV_TENSE_GRP);
for (int lfn = 0; lfn < (int) m_doc->tense_descr.size(); lfn++)
{
if (!(m_doc->tense_descr[lfn].isNull()) ) {
- QDomElement domElementDesc = domDoc.createElement(KV_TENSE_DESC);
- QDomText domTextDesc = domDoc.createTextNode(m_doc->tense_descr[lfn]);
+ TQDomElement domElementDesc = domDoc.createElement(KV_TENSE_DESC);
+ TQDomText domTextDesc = domDoc.createTextNode(m_doc->tense_descr[lfn]);
domElementDesc.setAttribute(KV_TENSE_NO, lfn+1);
domElementDesc.appendChild(domTextDesc);
@@ -82,19 +82,19 @@ bool KEduVocKvtmlWriter::saveTenseNameKvtMl (QDomDocument &domDoc, QDomElement &
}
-bool KEduVocKvtmlWriter::saveUsageNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent)
+bool KEduVocKvtmlWriter::saveUsageNameKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent)
{
if (m_doc->usage_descr.size() == 0)
return true;
- QDomElement domElementUsage = domDoc.createElement(KV_USAGE_GRP);
+ TQDomElement domElementUsage = domDoc.createElement(KV_USAGE_GRP);
for (int lfn = 0; lfn < (int) m_doc->usage_descr.size(); lfn++)
{
if (!(m_doc->usage_descr[lfn].isNull()) )
{
- QDomElement domElementDesc = domDoc.createElement(KV_USAGE_DESC);
- QDomText domTextDesc = domDoc.createTextNode(m_doc->usage_descr[lfn]);
+ TQDomElement domElementDesc = domDoc.createElement(KV_USAGE_DESC);
+ TQDomText domTextDesc = domDoc.createTextNode(m_doc->usage_descr[lfn]);
domElementDesc.setAttribute(KV_USAGE_NO, lfn+1);
domElementDesc.appendChild(domTextDesc);
@@ -107,20 +107,20 @@ bool KEduVocKvtmlWriter::saveUsageNameKvtMl (QDomDocument &domDoc, QDomElement &
}
-bool KEduVocKvtmlWriter::saveLessonKvtMl (QDomDocument &domDoc, QDomElement &domElementParent)
+bool KEduVocKvtmlWriter::saveLessonKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent)
{
if (m_doc->lesson_descr.size() == 0)
return true;
- QDomElement domElementLesson = domDoc.createElement(KV_LESS_GRP);
+ TQDomElement domElementLesson = domDoc.createElement(KV_LESS_GRP);
domElementLesson.setAttribute(KV_SIZEHINT, m_doc->getSizeHint(-1));
for (int lfn = 0; lfn < (int) m_doc->lesson_descr.size(); lfn++)
{
if (!(m_doc->lesson_descr[lfn].isNull()) )
{
- QDomElement domElementDesc = domDoc.createElement(KV_LESS_DESC);
- QDomText domTextDesc = domDoc.createTextNode(m_doc->lesson_descr[lfn]);
+ TQDomElement domElementDesc = domDoc.createElement(KV_LESS_DESC);
+ TQDomText domTextDesc = domDoc.createTextNode(m_doc->lesson_descr[lfn]);
domElementDesc.setAttribute(KV_LESS_NO, lfn+1);
if (m_doc->getCurrentLesson() == lfn+1)
@@ -138,13 +138,13 @@ bool KEduVocKvtmlWriter::saveLessonKvtMl (QDomDocument &domDoc, QDomElement &dom
}
-bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElementParent,
- const Conjugation &curr_conjug, QString type)
+bool KEduVocKvtmlWriter::saveConjug(TQDomDocument &domDoc, TQDomElement &domElementParent,
+ const Conjugation &curr_conjug, TQString type)
{
if (!curr_conjug.pers1Singular(type).isEmpty() )
{
- QDomElement domElementP1s = domDoc.createElement(KV_CON_P1S);
- QDomText domTextP1s = domDoc.createTextNode(curr_conjug.pers1Singular(type));
+ TQDomElement domElementP1s = domDoc.createElement(KV_CON_P1S);
+ TQDomText domTextP1s = domDoc.createTextNode(curr_conjug.pers1Singular(type));
domElementP1s.appendChild(domTextP1s);
domElementParent.appendChild(domElementP1s);
@@ -152,8 +152,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers2Singular(type).isEmpty() )
{
- QDomElement domElementP2s = domDoc.createElement(KV_CON_P2S);
- QDomText domTextP2s = domDoc.createTextNode(curr_conjug.pers2Singular(type));
+ TQDomElement domElementP2s = domDoc.createElement(KV_CON_P2S);
+ TQDomText domTextP2s = domDoc.createTextNode(curr_conjug.pers2Singular(type));
domElementP2s.appendChild(domTextP2s);
domElementParent.appendChild(domElementP2s);
@@ -162,8 +162,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers3FemaleSingular(type).isEmpty() ||
curr_conjug.pers3SingularCommon(type))
{
- QDomElement domElementP3sf = domDoc.createElement(KV_CON_P3SF);
- QDomText domTextP3sf = domDoc.createTextNode(curr_conjug.pers3FemaleSingular(type));
+ TQDomElement domElementP3sf = domDoc.createElement(KV_CON_P3SF);
+ TQDomText domTextP3sf = domDoc.createTextNode(curr_conjug.pers3FemaleSingular(type));
if (curr_conjug.pers3SingularCommon(type))
domElementP3sf.setAttribute(KV_CONJ_COMMON, 1);
@@ -174,8 +174,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers3MaleSingular(type).isEmpty() )
{
- QDomElement domElementP3sm = domDoc.createElement(KV_CON_P3SM);
- QDomText domTextP3sm = domDoc.createTextNode(curr_conjug.pers3MaleSingular(type));
+ TQDomElement domElementP3sm = domDoc.createElement(KV_CON_P3SM);
+ TQDomText domTextP3sm = domDoc.createTextNode(curr_conjug.pers3MaleSingular(type));
domElementP3sm.appendChild(domTextP3sm);
domElementParent.appendChild(domElementP3sm);
@@ -183,8 +183,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers3NaturalSingular(type).isEmpty() )
{
- QDomElement domElementP3sn = domDoc.createElement(KV_CON_P3SN);
- QDomText domTextP3sn = domDoc.createTextNode(curr_conjug.pers3NaturalSingular(type));
+ TQDomElement domElementP3sn = domDoc.createElement(KV_CON_P3SN);
+ TQDomText domTextP3sn = domDoc.createTextNode(curr_conjug.pers3NaturalSingular(type));
domElementP3sn.appendChild(domTextP3sn);
domElementParent.appendChild(domElementP3sn);
@@ -192,8 +192,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers1Plural(type).isEmpty() )
{
- QDomElement domElementP1p = domDoc.createElement(KV_CON_P1P);
- QDomText domTextP1p = domDoc.createTextNode(curr_conjug.pers1Plural(type));
+ TQDomElement domElementP1p = domDoc.createElement(KV_CON_P1P);
+ TQDomText domTextP1p = domDoc.createTextNode(curr_conjug.pers1Plural(type));
domElementP1p.appendChild(domTextP1p);
domElementParent.appendChild(domElementP1p);
@@ -201,8 +201,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers2Plural(type).isEmpty() )
{
- QDomElement domElementP2p = domDoc.createElement(KV_CON_P2P);
- QDomText domTextP2p = domDoc.createTextNode(curr_conjug.pers2Plural(type));
+ TQDomElement domElementP2p = domDoc.createElement(KV_CON_P2P);
+ TQDomText domTextP2p = domDoc.createTextNode(curr_conjug.pers2Plural(type));
domElementP2p.appendChild(domTextP2p);
domElementParent.appendChild(domElementP2p);
@@ -211,8 +211,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers3FemalePlural(type).isEmpty() ||
curr_conjug.pers3PluralCommon(type))
{
- QDomElement domElementP3pf = domDoc.createElement(KV_CON_P3PF);
- QDomText domTextP3pf = domDoc.createTextNode(curr_conjug.pers3FemalePlural(type));
+ TQDomElement domElementP3pf = domDoc.createElement(KV_CON_P3PF);
+ TQDomText domTextP3pf = domDoc.createTextNode(curr_conjug.pers3FemalePlural(type));
if (curr_conjug.pers3PluralCommon(type))
domElementP3pf.setAttribute(KV_CONJ_COMMON, 1);
@@ -223,8 +223,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers3MalePlural(type).isEmpty() )
{
- QDomElement domElementP3pm = domDoc.createElement(KV_CON_P3PM);
- QDomText domTextP3pm = domDoc.createTextNode(curr_conjug.pers3MalePlural(type));
+ TQDomElement domElementP3pm = domDoc.createElement(KV_CON_P3PM);
+ TQDomText domTextP3pm = domDoc.createTextNode(curr_conjug.pers3MalePlural(type));
domElementP3pm.appendChild(domTextP3pm);
domElementParent.appendChild(domElementP3pm);
@@ -232,8 +232,8 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
if (!curr_conjug.pers3NaturalPlural(type).isEmpty() )
{
- QDomElement domElementP3pn = domDoc.createElement(KV_CON_P3PN);
- QDomText domTextP3pn = domDoc.createTextNode(curr_conjug.pers3NaturalPlural(type));
+ TQDomElement domElementP3pn = domDoc.createElement(KV_CON_P3PN);
+ TQDomText domTextP3pn = domDoc.createTextNode(curr_conjug.pers3NaturalPlural(type));
domElementP3pn.appendChild(domTextP3pn);
domElementParent.appendChild(domElementP3pn);
@@ -242,7 +242,7 @@ bool KEduVocKvtmlWriter::saveConjug(QDomDocument &domDoc, QDomElement &domElemen
return true;
}
-bool KEduVocKvtmlWriter::saveConjugHeader(QDomDocument &domDoc, QDomElement &domElementParent,
+bool KEduVocKvtmlWriter::saveConjugHeader(TQDomDocument &domDoc, TQDomElement &domElementParent,
vector<Conjugation> &curr_conjug)
{
/*
@@ -265,12 +265,12 @@ bool KEduVocKvtmlWriter::saveConjugHeader(QDomDocument &domDoc, QDomElement &dom
if (curr_conjug.size() == 0)
return true;
- QDomElement domElementConjug = domDoc.createElement(KV_CONJUG_GRP);
- QString s;
+ TQDomElement domElementConjug = domDoc.createElement(KV_CONJUG_GRP);
+ TQString s;
for (int ent = 0; ent < QMIN((int) curr_conjug.size(), m_doc->numLangs()); ent++)
{
- QDomElement domElementEntry = domDoc.createElement(KV_CON_ENTRY);
+ TQDomElement domElementEntry = domDoc.createElement(KV_CON_ENTRY);
if (ent == 0)
{
@@ -300,7 +300,7 @@ bool KEduVocKvtmlWriter::saveConjugHeader(QDomDocument &domDoc, QDomElement &dom
}
-bool KEduVocKvtmlWriter::saveComparison(QDomDocument &domDoc, QDomElement &domElementParent,
+bool KEduVocKvtmlWriter::saveComparison(TQDomDocument &domDoc, TQDomElement &domElementParent,
const Comparison &comp)
/*
<comparison>
@@ -313,12 +313,12 @@ bool KEduVocKvtmlWriter::saveComparison(QDomDocument &domDoc, QDomElement &domEl
if (comp.isEmpty())
return true;
- QDomElement domElementComparison = domDoc.createElement(KV_COMPARISON_GRP);
+ TQDomElement domElementComparison = domDoc.createElement(KV_COMPARISON_GRP);
if (!comp.l1().isEmpty() )
{
- QDomElement domElementL1 = domDoc.createElement(KV_COMP_L1);
- QDomText domTextL1 = domDoc.createTextNode(comp.l1());
+ TQDomElement domElementL1 = domDoc.createElement(KV_COMP_L1);
+ TQDomText domTextL1 = domDoc.createTextNode(comp.l1());
domElementL1.appendChild(domTextL1);
domElementComparison.appendChild(domElementL1);
@@ -326,8 +326,8 @@ bool KEduVocKvtmlWriter::saveComparison(QDomDocument &domDoc, QDomElement &domEl
if (!comp.l2().isEmpty() )
{
- QDomElement domElementL2 = domDoc.createElement(KV_COMP_L2);
- QDomText domTextL2 = domDoc.createTextNode(comp.l2());
+ TQDomElement domElementL2 = domDoc.createElement(KV_COMP_L2);
+ TQDomText domTextL2 = domDoc.createTextNode(comp.l2());
domElementL2.appendChild(domTextL2);
domElementComparison.appendChild(domElementL2);
@@ -335,8 +335,8 @@ bool KEduVocKvtmlWriter::saveComparison(QDomDocument &domDoc, QDomElement &domEl
if (!comp.l3().isEmpty() )
{
- QDomElement domElementL3 = domDoc.createElement(KV_COMP_L3);
- QDomText domTextL3 = domDoc.createTextNode(comp.l3());
+ TQDomElement domElementL3 = domDoc.createElement(KV_COMP_L3);
+ TQDomText domTextL3 = domDoc.createTextNode(comp.l3());
domElementL3.appendChild(domTextL3);
domElementComparison.appendChild(domElementL3);
@@ -347,7 +347,7 @@ bool KEduVocKvtmlWriter::saveComparison(QDomDocument &domDoc, QDomElement &domEl
}
-bool KEduVocKvtmlWriter::saveMultipleChoice(QDomDocument &domDoc, QDomElement &domElementParent,
+bool KEduVocKvtmlWriter::saveMultipleChoice(TQDomDocument &domDoc, TQDomElement &domElementParent,
const MultipleChoice &mc)
/*
<multiplechoice>
@@ -362,12 +362,12 @@ bool KEduVocKvtmlWriter::saveMultipleChoice(QDomDocument &domDoc, QDomElement &d
if (mc.isEmpty())
return true;
- QDomElement domElementMC = domDoc.createElement(KV_MULTIPLECHOICE_GRP);
+ TQDomElement domElementMC = domDoc.createElement(KV_MULTIPLECHOICE_GRP);
if (!mc.mc1().isEmpty() )
{
- QDomElement domElementMC1 = domDoc.createElement(KV_MC_1);
- QDomText domTextMC1 = domDoc.createTextNode(mc.mc1());
+ TQDomElement domElementMC1 = domDoc.createElement(KV_MC_1);
+ TQDomText domTextMC1 = domDoc.createTextNode(mc.mc1());
domElementMC1.appendChild(domTextMC1);
domElementMC.appendChild(domElementMC1);
@@ -375,8 +375,8 @@ bool KEduVocKvtmlWriter::saveMultipleChoice(QDomDocument &domDoc, QDomElement &d
if (!mc.mc2().isEmpty() )
{
- QDomElement domElementMC2 = domDoc.createElement(KV_MC_2);
- QDomText domTextMC2 = domDoc.createTextNode(mc.mc2());
+ TQDomElement domElementMC2 = domDoc.createElement(KV_MC_2);
+ TQDomText domTextMC2 = domDoc.createTextNode(mc.mc2());
domElementMC2.appendChild(domTextMC2);
domElementMC.appendChild(domElementMC2);
@@ -384,8 +384,8 @@ bool KEduVocKvtmlWriter::saveMultipleChoice(QDomDocument &domDoc, QDomElement &d
if (!mc.mc3().isEmpty() )
{
- QDomElement domElementMC3 = domDoc.createElement(KV_MC_3);
- QDomText domTextMC3 = domDoc.createTextNode(mc.mc3());
+ TQDomElement domElementMC3 = domDoc.createElement(KV_MC_3);
+ TQDomText domTextMC3 = domDoc.createTextNode(mc.mc3());
domElementMC3.appendChild(domTextMC3);
domElementMC.appendChild(domElementMC3);
@@ -393,8 +393,8 @@ bool KEduVocKvtmlWriter::saveMultipleChoice(QDomDocument &domDoc, QDomElement &d
if (!mc.mc4().isEmpty() )
{
- QDomElement domElementMC4 = domDoc.createElement(KV_MC_4);
- QDomText domTextMC4 = domDoc.createTextNode(mc.mc4());
+ TQDomElement domElementMC4 = domDoc.createElement(KV_MC_4);
+ TQDomText domTextMC4 = domDoc.createTextNode(mc.mc4());
domElementMC4.appendChild(domTextMC4);
domElementMC.appendChild(domElementMC4);
@@ -402,8 +402,8 @@ bool KEduVocKvtmlWriter::saveMultipleChoice(QDomDocument &domDoc, QDomElement &d
if (!mc.mc5().isEmpty() )
{
- QDomElement domElementMC5 = domDoc.createElement(KV_MC_5);
- QDomText domTextMC5 = domDoc.createTextNode(mc.mc5());
+ TQDomElement domElementMC5 = domDoc.createElement(KV_MC_5);
+ TQDomText domTextMC5 = domDoc.createTextNode(mc.mc5());
domElementMC5.appendChild(domTextMC5);
domElementMC.appendChild(domElementMC5);
@@ -414,7 +414,7 @@ bool KEduVocKvtmlWriter::saveMultipleChoice(QDomDocument &domDoc, QDomElement &d
}
-bool KEduVocKvtmlWriter::saveConjugEntry( QDomDocument &domDoc, QDomElement &domElementParent,
+bool KEduVocKvtmlWriter::saveConjugEntry( TQDomDocument &domDoc, TQDomElement &domElementParent,
Conjugation &curr_conjug)
/*
<conjugation> in entry for definition of tenses of (irreg.) verbs
@@ -437,12 +437,12 @@ bool KEduVocKvtmlWriter::saveConjugEntry( QDomDocument &domDoc, QDomElement &dom
if (curr_conjug.numEntries() == 0 )
return true;
- QDomElement domElementConjug = domDoc.createElement(KV_CONJUG_GRP);
- QString type;
+ TQDomElement domElementConjug = domDoc.createElement(KV_CONJUG_GRP);
+ TQString type;
for (int lfn = 0; lfn < (int) curr_conjug.numEntries(); lfn++)
{
- QDomElement domElementType = domDoc.createElement(KV_CON_TYPE);
+ TQDomElement domElementType = domDoc.createElement(KV_CON_TYPE);
type = curr_conjug.getType(lfn);
domElementType.setAttribute(KV_CON_NAME, type);
@@ -458,7 +458,7 @@ bool KEduVocKvtmlWriter::saveConjugEntry( QDomDocument &domDoc, QDomElement &dom
}
-bool KEduVocKvtmlWriter::saveArticleKvtMl(QDomDocument &domDoc, QDomElement &domElementParent)
+bool KEduVocKvtmlWriter::saveArticleKvtMl(TQDomDocument &domDoc, TQDomElement &domElementParent)
/*
<article>
<e l="de"> lang determines also lang order in entries !!
@@ -475,12 +475,12 @@ bool KEduVocKvtmlWriter::saveArticleKvtMl(QDomDocument &domDoc, QDomElement &dom
if (m_doc->articles.size() == 0)
return true;
- QDomElement domElementArticle = domDoc.createElement(KV_ARTICLE_GRP);
- QString def, indef, s;
+ TQDomElement domElementArticle = domDoc.createElement(KV_ARTICLE_GRP);
+ TQString def, indef, s;
for (int lfn = 0; lfn < QMIN((int) m_doc->articles.size(), m_doc->numLangs()); lfn++)
{
- QDomElement domElementEntry = domDoc.createElement(KV_ART_ENTRY);
+ TQDomElement domElementEntry = domDoc.createElement(KV_ART_ENTRY);
if (lfn == 0)
{
s = m_doc->getOriginalIdent().stripWhiteSpace();
@@ -501,16 +501,16 @@ bool KEduVocKvtmlWriter::saveArticleKvtMl(QDomDocument &domDoc, QDomElement &dom
m_doc->articles[lfn].female(def, indef);
if (!def.isEmpty() )
{
- QDomElement domElementFD = domDoc.createElement(KV_ART_FD);
- QDomText domTextFD = domDoc.createTextNode(def);
+ TQDomElement domElementFD = domDoc.createElement(KV_ART_FD);
+ TQDomText domTextFD = domDoc.createTextNode(def);
domElementFD.appendChild(domTextFD);
domElementEntry.appendChild(domElementFD);
}
if (!indef.isEmpty() )
{
- QDomElement domElementFI = domDoc.createElement(KV_ART_FI);
- QDomText domTextFI = domDoc.createTextNode(indef);
+ TQDomElement domElementFI = domDoc.createElement(KV_ART_FI);
+ TQDomText domTextFI = domDoc.createTextNode(indef);
domElementFI.appendChild(domTextFI);
domElementEntry.appendChild(domElementFI);
@@ -519,16 +519,16 @@ bool KEduVocKvtmlWriter::saveArticleKvtMl(QDomDocument &domDoc, QDomElement &dom
m_doc->articles[lfn].male(def, indef);
if (!def.isEmpty() )
{
- QDomElement domElementMD = domDoc.createElement(KV_ART_MD);
- QDomText domTextMD = domDoc.createTextNode(def);
+ TQDomElement domElementMD = domDoc.createElement(KV_ART_MD);
+ TQDomText domTextMD = domDoc.createTextNode(def);
domElementMD.appendChild(domTextMD);
domElementEntry.appendChild(domElementMD);
}
if (!indef.isEmpty() )
{
- QDomElement domElementMI = domDoc.createElement(KV_ART_MI);
- QDomText domTextMI = domDoc.createTextNode(indef);
+ TQDomElement domElementMI = domDoc.createElement(KV_ART_MI);
+ TQDomText domTextMI = domDoc.createTextNode(indef);
domElementMI.appendChild(domTextMI);
domElementEntry.appendChild(domElementMI);
@@ -537,16 +537,16 @@ bool KEduVocKvtmlWriter::saveArticleKvtMl(QDomDocument &domDoc, QDomElement &dom
m_doc->articles[lfn].natural(def, indef);
if (!def.isEmpty() )
{
- QDomElement domElementND = domDoc.createElement(KV_ART_ND);
- QDomText domTextND = domDoc.createTextNode(def);
+ TQDomElement domElementND = domDoc.createElement(KV_ART_ND);
+ TQDomText domTextND = domDoc.createTextNode(def);
domElementND.appendChild(domTextND);
domElementEntry.appendChild(domElementND);
}
if (!indef.isEmpty() )
{
- QDomElement domElementNI = domDoc.createElement(KV_ART_NI);
- QDomText domTextNI = domDoc.createTextNode(indef);
+ TQDomElement domElementNI = domDoc.createElement(KV_ART_NI);
+ TQDomText domTextNI = domDoc.createTextNode(indef);
domElementNI.appendChild(domTextNI);
domElementEntry.appendChild(domElementNI);
@@ -560,10 +560,10 @@ bool KEduVocKvtmlWriter::saveArticleKvtMl(QDomDocument &domDoc, QDomElement &dom
}
-bool KEduVocKvtmlWriter::saveOptionsKvtMl(QDomDocument &domDoc, QDomElement &domElementParent)
+bool KEduVocKvtmlWriter::saveOptionsKvtMl(TQDomDocument &domDoc, TQDomElement &domElementParent)
{
- QDomElement domElementOption = domDoc.createElement(KV_OPTION_GRP);
- QDomElement domElementSort = domDoc.createElement(KV_OPT_SORT);
+ TQDomElement domElementOption = domDoc.createElement(KV_OPTION_GRP);
+ TQDomElement domElementSort = domDoc.createElement(KV_OPT_SORT);
domElementSort.setAttribute(KV_BOOL_FLAG, (m_doc->sort_allowed?1:0));
domElementOption.appendChild(domElementSort);
@@ -573,19 +573,19 @@ bool KEduVocKvtmlWriter::saveOptionsKvtMl(QDomDocument &domDoc, QDomElement &dom
}
-bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator)
+bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generator)
{
bool first_expr = true;
m_doc = doc;
- QDomDocument domDoc( "KEduVocDocument" );
- QDomElement domElementKvtml = domDoc.createElement( "kvtml" );
+ TQDomDocument domDoc( "KEduVocDocument" );
+ TQDomElement domElementKvtml = domDoc.createElement( "kvtml" );
- QString head( "<?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE kvtml SYSTEM \"kvoctrain.dtd\">" );
+ TQString head( "<?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE kvtml SYSTEM \"kvoctrain.dtd\">" );
domDoc.setContent( head );
- QDomComment domComment = domDoc.createComment(QString(
+ TQDomComment domComment = domDoc.createComment(TQString(
"\nThis is a machine generated file.\n"
"Be careful when editing here.\n"
"\n"
@@ -645,7 +645,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
domDoc.appendChild(domComment);
- domElementKvtml.setAttribute(KV_ENCODING, (QString)"UTF-8");
+ domElementKvtml.setAttribute(KV_ENCODING, (TQString)"UTF-8");
domElementKvtml.setAttribute(KV_GENERATOR, generator);
domElementKvtml.setAttribute(KV_COLS, m_doc->numLangs() );
@@ -684,7 +684,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
if (!saveUsageNameKvtMl(domDoc, domElementKvtml))
return false;
- QString q_org, q_trans;
+ TQString q_org, q_trans;
vector<KEduVocExpression>::const_iterator first = m_doc->vocabulary.begin ();
m_doc->getQueryLang(q_org, q_trans);
@@ -695,7 +695,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
while (first != m_doc->vocabulary.end ())
{
- QDomElement domElementExpression = domDoc.createElement(KV_EXPR);
+ TQDomElement domElementExpression = domDoc.createElement(KV_EXPR);
ent_no++;
if (ent_percent != 0 && (ent_no % ent_percent) == 0 )
@@ -704,7 +704,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
if ((*first).getLesson() != 0)
{
// entry belongs to lesson x
- QString ls;
+ TQString ls;
int lm = (*first).getLesson();
if (lm > (int) m_doc->lesson_descr.size() )
{
@@ -719,13 +719,13 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
if ((*first).isInQuery())
{
// entry was selected for query
- domElementExpression.setAttribute (KV_SELECTED, (QString) "1");
+ domElementExpression.setAttribute (KV_SELECTED, (TQString) "1");
}
if (!(*first).isActive())
{
// entry was inactive
- domElementExpression.setAttribute (KV_INACTIVE, (QString) "1");
+ domElementExpression.setAttribute (KV_INACTIVE, (TQString) "1");
}
if ((*first).uniqueType() && !(*first).getType(0).isEmpty())
@@ -733,11 +733,11 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
domElementExpression.setAttribute (KV_EXPRTYPE, (*first).getType(0));
}
- QDomElement domElementOriginal = domDoc.createElement(KV_ORG);
+ TQDomElement domElementOriginal = domDoc.createElement(KV_ORG);
if (first_expr)
{
// save space, only tell language in first entry
- QString s;
+ TQString s;
s.setNum (m_doc->getSizeHint (0));
domElementOriginal.setAttribute(KV_SIZEHINT, s);
@@ -746,9 +746,9 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
s = "original";
domElementOriginal.setAttribute (KV_LANG, s);
if (s == q_org)
- domElementOriginal.setAttribute(KV_QUERY, (QString) KV_O);
+ domElementOriginal.setAttribute(KV_QUERY, (TQString) KV_O);
else if (s == q_trans)
- domElementOriginal.setAttribute(KV_QUERY, (QString) KV_T);
+ domElementOriginal.setAttribute(KV_QUERY, (TQString) KV_T);
}
@@ -779,8 +779,8 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
if (!saveMultipleChoice(domDoc, domElementOriginal, (*first).getMultipleChoice(0)))
return false;
- QString s;
- QString entype = s = (*first).getType(0);
+ TQString s;
+ TQString entype = s = (*first).getType(0);
int pos = s.find (QM_TYPE_DIV);
if (pos >= 0)
entype = s.left (pos);
@@ -802,18 +802,18 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
return false;
}
- QDomText domTextOriginal = domDoc.createTextNode((*first).getOriginal());
+ TQDomText domTextOriginal = domDoc.createTextNode((*first).getOriginal());
domElementOriginal.appendChild(domTextOriginal);
domElementExpression.appendChild(domElementOriginal);
int trans = 1;
while (trans < (int)m_doc->langs.size())
{
- QDomElement domElementTranslation = domDoc.createElement(KV_TRANS);
+ TQDomElement domElementTranslation = domDoc.createElement(KV_TRANS);
if (first_expr)
{
// save space, only tell language in first entry
- QString s;
+ TQString s;
s.setNum (m_doc->getSizeHint (trans));
domElementTranslation.setAttribute(KV_SIZEHINT, s);
@@ -825,12 +825,12 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
}
domElementTranslation.setAttribute(KV_LANG, s);
if (s == q_org)
- domElementTranslation.setAttribute(KV_QUERY, (QString) KV_O);
+ domElementTranslation.setAttribute(KV_QUERY, (TQString) KV_O);
else if (s == q_trans)
- domElementTranslation.setAttribute(KV_QUERY, (QString) KV_T);
+ domElementTranslation.setAttribute(KV_QUERY, (TQString) KV_T);
}
- QString s1, s2;
+ TQString s1, s2;
if ((*first).getGrade(trans, false) != 0
||(*first).getGrade(trans, true) != 0)
@@ -899,8 +899,8 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
if (!saveMultipleChoice(domDoc, domElementTranslation, (*first).getMultipleChoice(trans)))
return false;
- QString s;
- QString entype = s = (*first).getType(0);
+ TQString s;
+ TQString entype = s = (*first).getType(0);
int pos = s.find (QM_TYPE_DIV);
if (pos >= 0)
entype = s.left (pos);
@@ -923,7 +923,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
return false;
}
- QDomText domTextTranslation = domDoc.createTextNode((*first).getTranslation(trans));
+ TQDomText domTextTranslation = domDoc.createTextNode((*first).getTranslation(trans));
domElementTranslation.appendChild(domTextTranslation);
domElementExpression.appendChild(domElementTranslation);
@@ -938,8 +938,8 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
domDoc.appendChild(domElementKvtml);
- QTextStream ts( m_outputFile );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( m_outputFile );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << domDoc.toString();
// TODO setModified (false);
diff --git a/kanagram/src/keduvockvtmlwriter.h b/kanagram/src/keduvockvtmlwriter.h
index dd9e6a78..969cedf0 100644
--- a/kanagram/src/keduvockvtmlwriter.h
+++ b/kanagram/src/keduvockvtmlwriter.h
@@ -19,8 +19,8 @@
#ifndef KEDUVOCKVTMLWRITER_H
#define KEDUVOCKVTMLWRITER_H
-#include <qfile.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqdom.h>
//#include "keduvocdocument.h"
#include "grammarmanager.h"
@@ -67,32 +67,32 @@ class KEduVocDocument;
class KEduVocKvtmlWriter
{
public:
- KEduVocKvtmlWriter(QFile *file);
+ KEduVocKvtmlWriter(TQFile *file);
~KEduVocKvtmlWriter();
- bool writeDoc(KEduVocDocument *doc, const QString &generator);
+ bool writeDoc(KEduVocDocument *doc, const TQString &generator);
- bool saveLessonKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
- bool saveTypeNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
- bool saveTenseNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
- bool saveUsageNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
- bool saveOptionsKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
- bool saveArticleKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
- bool saveConjugHeader (QDomDocument &domDoc, QDomElement &domElementParent,
+ bool saveLessonKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent);
+ bool saveTypeNameKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent);
+ bool saveTenseNameKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent);
+ bool saveUsageNameKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent);
+ bool saveOptionsKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent);
+ bool saveArticleKvtMl (TQDomDocument &domDoc, TQDomElement &domElementParent);
+ bool saveConjugHeader (TQDomDocument &domDoc, TQDomElement &domElementParent,
vector<Conjugation> &curr_conjug);
- bool saveConjug (QDomDocument &domDoc, QDomElement &domElementParent,
- const Conjugation &curr_conjug, QString type);
- bool saveConjugEntry (QDomDocument &domDoc, QDomElement &domElementParent,
+ bool saveConjug (TQDomDocument &domDoc, TQDomElement &domElementParent,
+ const Conjugation &curr_conjug, TQString type);
+ bool saveConjugEntry (TQDomDocument &domDoc, TQDomElement &domElementParent,
Conjugation &curr_conjug);
- bool saveComparison (QDomDocument &domDoc, QDomElement &domElementParent,
+ bool saveComparison (TQDomDocument &domDoc, TQDomElement &domElementParent,
const Comparison &comp);
- bool saveMultipleChoice(QDomDocument &domDoc, QDomElement &domElementParent,
+ bool saveMultipleChoice(TQDomDocument &domDoc, TQDomElement &domElementParent,
const MultipleChoice &mc);
private:
- QFile *m_outputFile;
+ TQFile *m_outputFile;
KEduVocDocument *m_doc;
};
diff --git a/kanagram/src/leitnerbox.cpp b/kanagram/src/leitnerbox.cpp
index 5a86d1fb..4161b784 100644
--- a/kanagram/src/leitnerbox.cpp
+++ b/kanagram/src/leitnerbox.cpp
@@ -30,7 +30,7 @@ void LeitnerBox::setVocabCount( int count )
m_vocabCount = count;
}
-const QString& LeitnerBox::getBoxName() const
+const TQString& LeitnerBox::getBoxName() const
{
return m_name;
}
@@ -45,7 +45,7 @@ LeitnerBox* LeitnerBox::getWrongWordBox()
return m_wrongWordBox;
}
-void LeitnerBox::setBoxName( const QString& name )
+void LeitnerBox::setBoxName( const TQString& name )
{
m_name = name;
}
diff --git a/kanagram/src/leitnerbox.h b/kanagram/src/leitnerbox.h
index bf20d6a6..1ead2d78 100644
--- a/kanagram/src/leitnerbox.h
+++ b/kanagram/src/leitnerbox.h
@@ -12,7 +12,7 @@
#ifndef LEITNERBOX_H
#define LEITNERBOX_H
-#include <qstring.h>
+#include <tqstring.h>
/**
@author Martin Pfeiffer
@@ -26,19 +26,19 @@ public:
void setCorrectWordBox( LeitnerBox* ); //sets the correct word box
void setWrongWordBox( LeitnerBox* ); //sets the wrong word box
- void setBoxName( const QString& ); //sets the boxes name
+ void setBoxName( const TQString& ); //sets the boxes name
void setVocabCount( int count );
int getVocabCount();
LeitnerBox* getCorrectWordBox();
LeitnerBox* getWrongWordBox();
- const QString& getBoxName() const;
+ const TQString& getBoxName() const;
bool operator == ( const LeitnerBox& a ) const;
private:
- QString m_name;
+ TQString m_name;
int m_vocabCount;
diff --git a/kanagram/src/leitnersystem.cpp b/kanagram/src/leitnersystem.cpp
index 3f633526..0705c5c2 100644
--- a/kanagram/src/leitnersystem.cpp
+++ b/kanagram/src/leitnersystem.cpp
@@ -12,7 +12,7 @@
#include "leitnersystem.h"
#include <kdebug.h>
-LeitnerSystem::LeitnerSystem(QValueList<LeitnerBox>& boxes, QString name)
+LeitnerSystem::LeitnerSystem(TQValueList<LeitnerBox>& boxes, TQString name)
{
if( !boxes.empty() )
m_boxes = boxes;
@@ -29,10 +29,10 @@ LeitnerSystem::~LeitnerSystem()
{
}
-QStringList LeitnerSystem::getBoxNameList()
+TQStringList LeitnerSystem::getBoxNameList()
{
- QStringList boxNameList;
- QValueList<LeitnerBox>::iterator it;
+ TQStringList boxNameList;
+ TQValueList<LeitnerBox>::iterator it;
for(it = m_boxes.begin(); it != m_boxes.end(); ++it)
@@ -53,9 +53,9 @@ LeitnerBox* LeitnerSystem::getBoxWithNumber( int number )
return &m_boxes[ number ];
}
-LeitnerBox* LeitnerSystem::getBoxWithName( const QString& name )
+LeitnerBox* LeitnerSystem::getBoxWithName( const TQString& name )
{
- QValueList<LeitnerBox>::iterator it;
+ TQValueList<LeitnerBox>::iterator it;
for(it = m_boxes.begin(); it != m_boxes.end(); ++it)
{
@@ -66,12 +66,12 @@ LeitnerBox* LeitnerSystem::getBoxWithName( const QString& name )
return 0;
}
-QString& LeitnerSystem::getSystemName()
+TQString& LeitnerSystem::getSystemName()
{
return m_systemName;
}
-const QString& LeitnerSystem::getNextBox( QString& previousBox )
+const TQString& LeitnerSystem::getNextBox( TQString& previousBox )
{
for( int i = 0; i < m_boxes.count(); i++ )
{
@@ -79,15 +79,15 @@ const QString& LeitnerSystem::getNextBox( QString& previousBox )
return getBox( i );
}
- return QString::null;
+ return TQString::null;
}
-const QString& LeitnerSystem::getCorrectBox( int box )
+const TQString& LeitnerSystem::getCorrectBox( int box )
{
return m_boxes[ box ].getCorrectWordBox()->getBoxName();
}
-const QString& LeitnerSystem::getWrongBox( int box )
+const TQString& LeitnerSystem::getWrongBox( int box )
{
return m_boxes[ box ].getWrongWordBox()->getBoxName();
}
@@ -112,7 +112,7 @@ void LeitnerSystem::deleteBox( LeitnerBox* box )
m_boxes.remove( *box );
}
-bool LeitnerSystem::insertBox( const QString& name, int correctWordBox, int wrongWordBox )
+bool LeitnerSystem::insertBox( const TQString& name, int correctWordBox, int wrongWordBox )
{
if( getBoxNameList().contains( name ) != 0 )
return false;
@@ -126,7 +126,7 @@ bool LeitnerSystem::insertBox( const QString& name, int correctWordBox, int wron
return true;
}
-void LeitnerSystem::setSystemName( const QString& name )
+void LeitnerSystem::setSystemName( const TQString& name )
{
m_systemName = name;
}
@@ -138,7 +138,7 @@ int LeitnerSystem::getNumber( LeitnerBox* box )
return m_boxes.findIndex( *box );
}
-bool LeitnerSystem::setBoxName( int box, const QString& name )
+bool LeitnerSystem::setBoxName( int box, const TQString& name )
{
if( getBoxWithName( name ) == 0 || getBoxWithName( name ) == getBoxWithNumber( box ) )
{
@@ -150,7 +150,7 @@ bool LeitnerSystem::setBoxName( int box, const QString& name )
return false;
}
-bool LeitnerSystem::setBoxName( LeitnerBox* box, const QString& name )
+bool LeitnerSystem::setBoxName( LeitnerBox* box, const TQString& name )
{
if( getBoxWithName( name ) == 0 || getBoxWithName( name ) == box )
{
@@ -162,7 +162,7 @@ bool LeitnerSystem::setBoxName( LeitnerBox* box, const QString& name )
return false;
}
-bool LeitnerSystem::insertBox( const QString& name )
+bool LeitnerSystem::insertBox( const TQString& name )
{
if( getBoxNameList().contains( name ) != 0 )
return false;
@@ -175,17 +175,17 @@ bool LeitnerSystem::insertBox( const QString& name )
return true;
}
-void LeitnerSystem::setCorrectBox( const QString& box, const QString& correctWordBox )
+void LeitnerSystem::setCorrectBox( const TQString& box, const TQString& correctWordBox )
{
getBoxWithName( box )->setCorrectWordBox( getBoxWithName( correctWordBox ) );
}
-void LeitnerSystem::setWrongBox( const QString& box, const QString& wrongWordBox )
+void LeitnerSystem::setWrongBox( const TQString& box, const TQString& wrongWordBox )
{
getBoxWithName( box )->setWrongWordBox( getBoxWithName( wrongWordBox ) );
}
-const QString& LeitnerSystem::getBox( int i )
+const TQString& LeitnerSystem::getBox( int i )
{
return getBoxWithNumber( i )->getBoxName();
}
diff --git a/kanagram/src/leitnersystem.h b/kanagram/src/leitnersystem.h
index 87e583d9..7d99a667 100644
--- a/kanagram/src/leitnersystem.h
+++ b/kanagram/src/leitnersystem.h
@@ -10,9 +10,9 @@
//
//
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "leitnerbox.h"
#ifndef LEITNERSYSTEM_H
@@ -26,42 +26,42 @@ class LeitnerSystem
{
public:
LeitnerSystem();
- LeitnerSystem( QValueList<LeitnerBox>& boxes, QString name );
+ LeitnerSystem( TQValueList<LeitnerBox>& boxes, TQString name );
~LeitnerSystem();
int getNumberOfBoxes(); //returns the number of boxes in the system
- QStringList getBoxNameList(); //returns a list with the boxes names
+ TQStringList getBoxNameList(); //returns a list with the boxes names
- QString& getSystemName(); //returns the systems name
- void setSystemName( const QString& name ); //sets the systems name
+ TQString& getSystemName(); //returns the systems name
+ void setSystemName( const TQString& name ); //sets the systems name
LeitnerBox* getBoxWithNumber( int number ); //returns box by number
- LeitnerBox* getBoxWithName( const QString& name );//returns box by name
+ LeitnerBox* getBoxWithName( const TQString& name );//returns box by name
int getNumber( LeitnerBox* box );
- const QString& getBox( int i );
+ const TQString& getBox( int i );
- const QString& getNextBox( QString& previousBox ); //returns the next box for the next question
+ const TQString& getNextBox( TQString& previousBox ); //returns the next box for the next question
- const QString& getCorrectBox( int box ); //returns the correct word box of "int box"
- const QString& getWrongBox( int box ); //returns the wrong word box of "int box"
+ const TQString& getCorrectBox( int box ); //returns the correct word box of "int box"
+ const TQString& getWrongBox( int box ); //returns the wrong word box of "int box"
int getWrongBoxNumber( int box );
int getCorrectBoxNumber( int box );
- void setCorrectBox( const QString& box, const QString& correctWordBox );
- void setWrongBox( const QString& box, const QString& wrongWordBox );
- bool setBoxName( int box, const QString& name );
- bool setBoxName( LeitnerBox* box, const QString& name );
+ void setCorrectBox( const TQString& box, const TQString& correctWordBox );
+ void setWrongBox( const TQString& box, const TQString& wrongWordBox );
+ bool setBoxName( int box, const TQString& name );
+ bool setBoxName( LeitnerBox* box, const TQString& name );
//inserts a box with number, name, correct and wrong word box
- bool insertBox( const QString& name, int correctWordBox, int wrongWordBox );
- bool insertBox( const QString& name );
+ bool insertBox( const TQString& name, int correctWordBox, int wrongWordBox );
+ bool insertBox( const TQString& name );
void deleteBox( int box );
void deleteBox( LeitnerBox* box );
private:
- QString m_systemName; //the systems name
+ TQString m_systemName; //the systems name
- QValueList<LeitnerBox> m_boxes;
+ TQValueList<LeitnerBox> m_boxes;
};
#endif
diff --git a/kanagram/src/leitnersystemview.cpp b/kanagram/src/leitnersystemview.cpp
index f8736471..cbbb0400 100644
--- a/kanagram/src/leitnersystemview.cpp
+++ b/kanagram/src/leitnersystemview.cpp
@@ -16,12 +16,12 @@
#include <stdlib.h>
#include <kiconloader.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
-LeitnerSystemView::LeitnerSystemView(QWidget * parent, const char* name, WFlags f)
- : QScrollView(parent, name, f)
+LeitnerSystemView::LeitnerSystemView(TQWidget * parent, const char* name, WFlags f)
+ : TQScrollView(parent, name, f)
{
m_highlightedBox = -1;
}
@@ -31,7 +31,7 @@ LeitnerSystemView::~LeitnerSystemView()
{
}
-void LeitnerSystemView::drawSystem(QPainter* p)
+void LeitnerSystemView::drawSystem(TQPainter* p)
{
kdDebug() << "drawSystem( )" << endl;
@@ -47,7 +47,7 @@ void LeitnerSystemView::drawSystem(QPainter* p)
{
//p->drawPixmap(12 + i * 64 + i*10, m_imageY, KGlobal::iconLoader()->loadIcon("leitnerbox", KIcon::Panel));
p->drawRect(12 + i * 64 + i*10, m_imageY,64,64);
- p->fillRect(12 + i * 64 + i*10, m_imageY,64,64, QBrush(red));
+ p->fillRect(12 + i * 64 + i*10, m_imageY,64,64, TQBrush(red));
}
else
{ //for each box 74 = 64(pixmap) + 10(distance between two boxes)
@@ -57,14 +57,14 @@ void LeitnerSystemView::drawSystem(QPainter* p)
}
}
-void LeitnerSystemView::drawConnections(QPainter* p)
+void LeitnerSystemView::drawConnections(TQPainter* p)
{
//dist = number of boxes that are in between the two boxes
//width = width of the rect for the arc
int dist, width = 0;
int numberOfBoxes = m_leitnerSystem->getNumberOfBoxes();
- p->setPen( QPen(green, 2) );
+ p->setPen( TQPen(green, 2) );
//paint the connections for the correct word boxes, above the boxes
for(int i = 0; i < numberOfBoxes; i++)
@@ -89,7 +89,7 @@ void LeitnerSystemView::drawConnections(QPainter* p)
}
//paint the connections for the wrong word boxes, below the boxes
- p->setPen(QPen(red, 2));
+ p->setPen(TQPen(red, 2));
for(int i = 0; i < numberOfBoxes; i++)
{
@@ -118,7 +118,7 @@ void LeitnerSystemView::setSystem(LeitnerSystem* leitnersystem)
updateContents();
//repaint
//update();
- //QPainter* p = new QPainter(this);
+ //TQPainter* p = new TQPainter(this);
//drawContents( p, 0, 0, 0, 0 );
}
@@ -128,7 +128,7 @@ void LeitnerSystemView::highlightBox(int box)
updateContents();
}
-void LeitnerSystemView::drawContents(QPainter* p, int clipx, int clipy, int clipw, int cliph)
+void LeitnerSystemView::drawContents(TQPainter* p, int clipx, int clipy, int clipw, int cliph)
{
kdDebug() << "drawContents" << endl;
p->eraseRect(0,0,width(),height());
@@ -145,7 +145,7 @@ void LeitnerSystemView::calculateSize()
//boxes = 64*64
int numberOfBoxes = m_leitnerSystem->getNumberOfBoxes();
- QString x;
+ TQString x;
int height, dist, tmpMaxC, tmpMaxW;
tmpMaxC = 0;
tmpMaxW = 0;
@@ -180,7 +180,7 @@ void LeitnerSystemView::calculateSize()
setMinimumSize( numberOfBoxes * 64 + (numberOfBoxes - 1)*10 + 2 * 12, height );
}
-void LeitnerSystemView::mousePressEvent(QMouseEvent* e)
+void LeitnerSystemView::mousePressEvent(TQMouseEvent* e)
{
kdDebug() << "mouseClick" << endl;
//if the user has clicked into a box
diff --git a/kanagram/src/leitnersystemview.h b/kanagram/src/leitnersystemview.h
index be52bc0b..9f540cdf 100644
--- a/kanagram/src/leitnersystemview.h
+++ b/kanagram/src/leitnersystemview.h
@@ -12,8 +12,8 @@
#ifndef LEITNERSYSTEMVIEW_H
#define LEITNERSYSTEMVIEW_H
-#include <qscrollview.h>
-#include <qpixmap.h>
+#include <tqscrollview.h>
+#include <tqpixmap.h>
class LeitnerSystem;
@@ -27,7 +27,7 @@ class LeitnerSystemView : public QScrollView
Q_OBJECT
public:
- LeitnerSystemView(QWidget* parent = 0, const char* name = 0, WFlags f = 0);
+ LeitnerSystemView(TQWidget* parent = 0, const char* name = 0, WFlags f = 0);
~LeitnerSystemView();
@@ -38,17 +38,17 @@ signals:
void boxClicked(int box); //is emited if the user clicks on a box
protected:
- virtual void drawContents(QPainter* p, int clipx, int clipy, int clipw, int cliph);
- virtual void mousePressEvent(QMouseEvent* e);
+ virtual void drawContents(TQPainter* p, int clipx, int clipy, int clipw, int cliph);
+ virtual void mousePressEvent(TQMouseEvent* e);
private:
LeitnerSystem* m_leitnerSystem; //the system which is shown
- void drawSystem(QPainter*); //paints the boxes
- void drawConnections(QPainter*); //paints the arrows between the boxes
+ void drawSystem(TQPainter*); //paints the boxes
+ void drawConnections(TQPainter*); //paints the arrows between the boxes
void calculateSize();
- //QRect m_viewArea;
+ //TQRect m_viewArea;
int m_imageY; //high border of the images
int m_distPixmap;
int m_highlightedBox; //the box which is currently highlighted
diff --git a/kanagram/src/main.cpp b/kanagram/src/main.cpp
index ec0265b4..5ecbb800 100644
--- a/kanagram/src/main.cpp
+++ b/kanagram/src/main.cpp
@@ -35,22 +35,22 @@ int main(int argc, char *argv[])
about.addCredit("Artemiy Pavlov", I18N_NOOP("Sound effects"), 0, "http://artemiolabs.com");
KCmdLineArgs::init(argc, argv, &about);
KApplication app;
- app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
+ app.connect(&app, TQT_SIGNAL(lastWindowClosed()), &app, TQT_SLOT(quit()));
KanagramSettings::setJustGotFont(false);
- QFont f("squeaky chalk sound");
- if (!QFontInfo(f).exactMatch())
+ TQFont f("squeaky chalk sound");
+ if (!TQFontInfo(f).exactMatch())
{
KanagramSettings::setUseStandardFonts(true);
}
if (KanagramSettings::dataLanguage().isEmpty())
{
- QStringList userLanguagesCode = KGlobal::locale()->languageList();
- QStringList::const_iterator itEnd = userLanguagesCode.end();
- QStringList::const_iterator it = userLanguagesCode.begin();
+ TQStringList userLanguagesCode = KGlobal::locale()->languageList();
+ TQStringList::const_iterator itEnd = userLanguagesCode.end();
+ TQStringList::const_iterator it = userLanguagesCode.begin();
for ( ; it != itEnd; ++it)
{
- QStringList mdirs = KGlobal::dirs()->findDirs("appdata", "data/" + *it);
+ TQStringList mdirs = KGlobal::dirs()->findDirs("appdata", "data/" + *it);
if (!mdirs.isEmpty()) break;
}
if (it == itEnd) KanagramSettings::setDataLanguage("en");
diff --git a/kanagram/src/mainsettings.cpp b/kanagram/src/mainsettings.cpp
index 660a1c5c..1e026758 100644
--- a/kanagram/src/mainsettings.cpp
+++ b/kanagram/src/mainsettings.cpp
@@ -19,10 +19,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qdir.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
+#include <tqdir.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -35,22 +35,22 @@
#include "mainsettings.h"
#include "kanagramsettings.h"
-MainSettings::MainSettings(QWidget *parent) : MainSettingsWidget(parent)
+MainSettings::MainSettings(TQWidget *parent) : MainSettingsWidget(parent)
{
m_parent = (KConfigDialog*)parent;
- connect(parent, SIGNAL(applyClicked()), this, SLOT(slotChangeTranslation()));
- connect(cboxTranslation, SIGNAL(activated(int)), this, SLOT(slotUpdateParent()));
+ connect(parent, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotChangeTranslation()));
+ connect(cboxTranslation, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateParent()));
setupTranslations();
- QStringList languageNames = m_languageCodeMap.keys();
+ TQStringList languageNames = m_languageCodeMap.keys();
languageNames.sort();
cboxTranslation->insertStringList(languageNames);
//the language code/name
KConfig entry(locate("locale", "all_languages"));
- QString code = KanagramSettings::dataLanguage();
+ TQString code = KanagramSettings::dataLanguage();
entry.setGroup(code);
if (code == "sr")
cboxTranslation->setCurrentText(entry.readEntry("Name")+" ("+i18n("Cyrillic")+")");
@@ -62,7 +62,7 @@ MainSettings::MainSettings(QWidget *parent) : MainSettingsWidget(parent)
else
cboxTranslation->setCurrentText(entry.readEntry("Name"));
- QFont f("squeaky chalk sound");
+ TQFont f("squeaky chalk sound");
if (KanagramSettings::justGotFont())
{
getFontsButton->hide();
@@ -70,10 +70,10 @@ MainSettings::MainSettings(QWidget *parent) : MainSettingsWidget(parent)
}
else
{
- if (!QFontInfo(f).exactMatch())
+ if (!TQFontInfo(f).exactMatch())
{
kcfg_useStandardFonts->setEnabled(false);
- connect(getFontsButton, SIGNAL(pressed()), this, SLOT(getAndInstallFont()));
+ connect(getFontsButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(getAndInstallFont()));
}
else
{
@@ -94,20 +94,20 @@ void MainSettings::slotUpdateParent()
void MainSettings::setupTranslations()
{
m_languageCodeMap.clear();
- QStringList languages, temp_languages;
+ TQStringList languages, temp_languages;
//the program scans in kdereview/data/ to see what languages data is found
- QStringList mdirs = KGlobal::dirs()->findDirs("appdata", "data/");
+ TQStringList mdirs = KGlobal::dirs()->findDirs("appdata", "data/");
if (mdirs.isEmpty()) return;
- for (QStringList::const_iterator it = mdirs.begin(); it != mdirs.end(); ++it )
+ for (TQStringList::const_iterator it = mdirs.begin(); it != mdirs.end(); ++it )
{
- QDir dir(*it);
- temp_languages = dir.entryList(QDir::Dirs, QDir::Name);
+ TQDir dir(*it);
+ temp_languages = dir.entryList(TQDir::Dirs, TQDir::Name);
temp_languages.remove(".");
temp_languages.remove("..");
- for (QStringList::const_iterator it2 = temp_languages.begin(); it2 != temp_languages.end(); ++it2 )
+ for (TQStringList::const_iterator it2 = temp_languages.begin(); it2 != temp_languages.end(); ++it2 )
{
if (!languages.contains(*it2)) languages.append(*it2);
}
@@ -118,8 +118,8 @@ void MainSettings::setupTranslations()
//the language code/name
KConfig entry(locate("locale", "all_languages"));
- const QStringList::ConstIterator itEnd = languages.end();
- for (QStringList::ConstIterator it = languages.begin(); it != itEnd; ++it) {
+ const TQStringList::ConstIterator itEnd = languages.end();
+ for (TQStringList::ConstIterator it = languages.begin(); it != itEnd; ++it) {
entry.setGroup(*it);
if (*it == "sr")
m_languageCodeMap.insert(entry.readEntry("Name")+" ("+i18n("Cyrillic")+")", "sr");
diff --git a/kanagram/src/mainsettings.h b/kanagram/src/mainsettings.h
index 3763a047..172b5276 100644
--- a/kanagram/src/mainsettings.h
+++ b/kanagram/src/mainsettings.h
@@ -31,7 +31,7 @@ class MainSettings : public MainSettingsWidget
{
Q_OBJECT
public:
- MainSettings(QWidget *parent);
+ MainSettings(TQWidget *parent);
~MainSettings();
public slots:
@@ -42,7 +42,7 @@ Q_OBJECT
void getAndInstallFont();
private:
- QMap<QString, QString> m_languageCodeMap;
+ TQMap<TQString, TQString> m_languageCodeMap;
void setupTranslations();
KConfigDialog *m_parent;
diff --git a/kanagram/src/multiplechoice.cpp b/kanagram/src/multiplechoice.cpp
index b27350c3..dcf784ef 100644
--- a/kanagram/src/multiplechoice.cpp
+++ b/kanagram/src/multiplechoice.cpp
@@ -26,11 +26,11 @@
#include "multiplechoice.h"
MultipleChoice::MultipleChoice (
- const QString &mc1,
- const QString &mc2,
- const QString &mc3,
- const QString &mc4,
- const QString &mc5
+ const TQString &mc1,
+ const TQString &mc2,
+ const TQString &mc3,
+ const TQString &mc4,
+ const TQString &mc5
)
{
setMC1 (mc1);
@@ -61,7 +61,7 @@ void MultipleChoice::clear()
}
-QString MultipleChoice::mc (unsigned idx) const
+TQString MultipleChoice::mc (unsigned idx) const
{
switch (idx) {
case 0: return muc1;
diff --git a/kanagram/src/multiplechoice.h b/kanagram/src/multiplechoice.h
index 6a0b0500..f5fe4800 100644
--- a/kanagram/src/multiplechoice.h
+++ b/kanagram/src/multiplechoice.h
@@ -27,7 +27,7 @@
#ifndef MultipleChoice_included
#define MultipleChoice_included
-#include <qstring.h>
+#include <tqstring.h>
#define MAX_MULTIPLE_CHOICE 5 // select one out of x
@@ -39,26 +39,26 @@ public:
MultipleChoice() {}
MultipleChoice (
- const QString &mc1,
- const QString &mc2,
- const QString &mc3,
- const QString &mc4,
- const QString &mc5
+ const TQString &mc1,
+ const TQString &mc2,
+ const TQString &mc3,
+ const TQString &mc4,
+ const TQString &mc5
);
- void setMC1 (const QString &s) { muc1 = s; }
- void setMC2 (const QString &s) { muc2 = s; }
- void setMC3 (const QString &s) { muc3 = s; }
- void setMC4 (const QString &s) { muc4 = s; }
- void setMC5 (const QString &s) { muc5 = s; }
+ void setMC1 (const TQString &s) { muc1 = s; }
+ void setMC2 (const TQString &s) { muc2 = s; }
+ void setMC3 (const TQString &s) { muc3 = s; }
+ void setMC4 (const TQString &s) { muc4 = s; }
+ void setMC5 (const TQString &s) { muc5 = s; }
- QString mc1 () const { return muc1; }
- QString mc2 () const { return muc2; }
- QString mc3 () const { return muc3; }
- QString mc4 () const { return muc4; }
- QString mc5 () const { return muc5; }
+ TQString mc1 () const { return muc1; }
+ TQString mc2 () const { return muc2; }
+ TQString mc3 () const { return muc3; }
+ TQString mc4 () const { return muc4; }
+ TQString mc5 () const { return muc5; }
- QString mc (unsigned idx) const;
+ TQString mc (unsigned idx) const;
bool isEmpty() const;
void normalize();
@@ -67,7 +67,7 @@ public:
protected:
- QString muc1, muc2, muc3, muc4, muc5;
+ TQString muc1, muc2, muc3, muc4, muc5;
};
diff --git a/kanagram/src/newstuff.cpp b/kanagram/src/newstuff.cpp
index 19c28272..7c72f938 100644
--- a/kanagram/src/newstuff.cpp
+++ b/kanagram/src/newstuff.cpp
@@ -1,7 +1,7 @@
#include "newstuff.h"
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <knewstuff/downloaddialog.h>
@@ -11,9 +11,9 @@
#include "kanagramsettings.h"
#include "newstuffdialog.h"
-NewStuff::NewStuff(QWidget *parent) : NewStuffWidget(parent)
+NewStuff::NewStuff(TQWidget *parent) : NewStuffWidget(parent)
{
- connect(btnGetNew, SIGNAL(clicked()), this, SLOT(slotGetNewVocabs()));
+ connect(btnGetNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewVocabs()));
}
NewStuff::~NewStuff()
diff --git a/kanagram/src/newstuff.h b/kanagram/src/newstuff.h
index 2429cca7..cad963f7 100644
--- a/kanagram/src/newstuff.h
+++ b/kanagram/src/newstuff.h
@@ -7,7 +7,7 @@ class NewStuff : public NewStuffWidget
{
Q_OBJECT
public:
- NewStuff(QWidget *parent);
+ NewStuff(TQWidget *parent);
~NewStuff();
private slots:
diff --git a/kanagram/src/newstuffdialog.cpp b/kanagram/src/newstuffdialog.cpp
index d58ad56d..302059df 100644
--- a/kanagram/src/newstuffdialog.cpp
+++ b/kanagram/src/newstuffdialog.cpp
@@ -17,19 +17,19 @@ NewStuffDialog::~NewStuffDialog()
{
}
-bool NewStuffDialog::install(const QString &fileName)
+bool NewStuffDialog::install(const TQString &fileName)
{
return false;
}
-QString NewStuffDialog::downloadDestination(KNS::Entry *entry)
+TQString NewStuffDialog::downloadDestination(KNS::Entry *entry)
{
- QString fileName = entry->payload().path();
+ TQString fileName = entry->payload().path();
fileName = fileName.section('/', -1);
return KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + fileName;
}
-bool NewStuffDialog::createUploadFile(const QString &fileName)
+bool NewStuffDialog::createUploadFile(const TQString &fileName)
{
return false;
}
diff --git a/kanagram/src/newstuffdialog.h b/kanagram/src/newstuffdialog.h
index f0441623..7c61f12e 100644
--- a/kanagram/src/newstuffdialog.h
+++ b/kanagram/src/newstuffdialog.h
@@ -8,9 +8,9 @@ class NewStuffDialog : public KNewStuff
public:
NewStuffDialog();
~NewStuffDialog();
- bool install(const QString &fileName);
- bool createUploadFile(const QString &fileName);
- QString downloadDestination(KNS::Entry *entry);
+ bool install(const TQString &fileName);
+ bool createUploadFile(const TQString &fileName);
+ TQString downloadDestination(KNS::Entry *entry);
};
#endif
diff --git a/kanagram/src/vocabedit.cpp b/kanagram/src/vocabedit.cpp
index 7079e566..46a81450 100644
--- a/kanagram/src/vocabedit.cpp
+++ b/kanagram/src/vocabedit.cpp
@@ -21,12 +21,12 @@
#include "vocabedit.h"
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include <kstandarddirs.h>
#include <kglobal.h>
@@ -41,7 +41,7 @@
#include "kanagramsettings.h"
-VocabEdit::VocabEdit(QWidget *parent, QString fileName) : VocabEditWidget(parent), m_fileName("")
+VocabEdit::VocabEdit(TQWidget *parent, TQString fileName) : VocabEditWidget(parent), m_fileName("")
{
if(fileName != "")
{
@@ -58,20 +58,20 @@ VocabEdit::VocabEdit(QWidget *parent, QString fileName) : VocabEditWidget(parent
txtDescription->setText(doc->getDocRemark());
}
- connect(btnSave, SIGNAL(clicked()), this, SLOT(slotSave()));
- connect(btnNewWord, SIGNAL(clicked()), this, SLOT(slotNewWord()));
- connect(btnRemoveWord, SIGNAL(clicked()), this, SLOT(slotRemoveWord()));
- connect(btnClose, SIGNAL(clicked()), this, SLOT(slotClose()));
+ connect(btnSave, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSave()));
+ connect(btnNewWord, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewWord()));
+ connect(btnRemoveWord, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveWord()));
+ connect(btnClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose()));
- connect(txtWord, SIGNAL(textChanged(const QString &)), this, SLOT(slotWordTextChanged(const QString &)));
- connect(txtHint, SIGNAL(textChanged(const QString &)), this, SLOT(slotHintTextChanged(const QString &)));
+ connect(txtWord, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotWordTextChanged(const TQString &)));
+ connect(txtHint, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotHintTextChanged(const TQString &)));
//Connect the name and description boxes to a general textChanged slot, so that we can keep track of
//whether they've been changed or not
- connect(txtVocabName, SIGNAL(textChanged(const QString &)), this, SLOT(slotTextChanged(const QString &)));
- connect(txtDescription, SIGNAL(textChanged(const QString &)), this, SLOT(slotTextChanged(const QString &)));
+ connect(txtVocabName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotTextChanged(const TQString &)));
+ connect(txtDescription, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotTextChanged(const TQString &)));
- connect(lboxWords, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect(lboxWords, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
//Has anything in the dialog changed?
m_textChanged = false;
@@ -91,7 +91,7 @@ void VocabEdit::slotSave()
doc->appendEntry(&m_vocabList[i]);
}
- QString fileName;
+ TQString fileName;
if(m_fileName == "")
{
fileName = KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().replace(" ", "") + ".kvtml";
@@ -140,18 +140,18 @@ void VocabEdit::slotNewWord()
void VocabEdit::slotSelectionChanged()
{
//A little hack to make things work right
- disconnect(txtWord, SIGNAL(textChanged(const QString &)), this, SLOT(slotWordTextChanged(const QString &)));
- disconnect(txtHint, SIGNAL(textChanged(const QString &)), this, SLOT(slotHintTextChanged(const QString &)));
+ disconnect(txtWord, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotWordTextChanged(const TQString &)));
+ disconnect(txtHint, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotHintTextChanged(const TQString &)));
if(lboxWords->currentItem() >= 0)
{
txtWord->setText(m_vocabList[lboxWords->currentItem()].getOriginal());
txtHint->setText(m_vocabList[lboxWords->currentItem()].getRemark(0));
}
- connect(txtWord, SIGNAL(textChanged(const QString &)), this, SLOT(slotWordTextChanged(const QString &)));
- connect(txtHint, SIGNAL(textChanged(const QString &)), this, SLOT(slotHintTextChanged(const QString &)));
+ connect(txtWord, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotWordTextChanged(const TQString &)));
+ connect(txtHint, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotHintTextChanged(const TQString &)));
}
-void VocabEdit::slotWordTextChanged(const QString &changes)
+void VocabEdit::slotWordTextChanged(const TQString &changes)
{
//Make sure there actually is a currentItem()
if(lboxWords->currentItem() != -1)
@@ -164,7 +164,7 @@ void VocabEdit::slotWordTextChanged(const QString &changes)
m_textChanged = true;
}
-void VocabEdit::slotHintTextChanged(const QString &changes)
+void VocabEdit::slotHintTextChanged(const TQString &changes)
{
//Make sure there actually is a currentItem()
if(lboxWords->currentItem() != -1)
@@ -174,7 +174,7 @@ void VocabEdit::slotHintTextChanged(const QString &changes)
m_textChanged = true;
}
-void VocabEdit::slotTextChanged(const QString &changes)
+void VocabEdit::slotTextChanged(const TQString &changes)
{
//Make sure we know when text has been modified and not saved, so we
//can notify the user
diff --git a/kanagram/src/vocabedit.h b/kanagram/src/vocabedit.h
index 342f71cb..d4e84238 100644
--- a/kanagram/src/vocabedit.h
+++ b/kanagram/src/vocabedit.h
@@ -25,7 +25,7 @@
#include "vocabeditwidget.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class KEduVocExpression;
@@ -33,8 +33,8 @@ class VocabEdit : public VocabEditWidget
{
Q_OBJECT
public:
- VocabEdit(QWidget *parent);
- VocabEdit(QWidget *parent, QString fileName);
+ VocabEdit(TQWidget *parent);
+ VocabEdit(TQWidget *parent, TQString fileName);
~VocabEdit();
public slots:
@@ -43,13 +43,13 @@ Q_OBJECT
void slotNewWord();
void slotRemoveWord();
void slotSelectionChanged();
- void slotWordTextChanged(const QString &changes);
- void slotHintTextChanged(const QString &changes);
- void slotTextChanged(const QString &changes);
+ void slotWordTextChanged(const TQString &changes);
+ void slotHintTextChanged(const TQString &changes);
+ void slotTextChanged(const TQString &changes);
private:
- QValueVector<KEduVocExpression> m_vocabList;
- QString m_fileName;
+ TQValueVector<KEduVocExpression> m_vocabList;
+ TQString m_fileName;
bool m_textChanged;
};
diff --git a/kanagram/src/vocabsettings.cpp b/kanagram/src/vocabsettings.cpp
index c7b41ba7..730f9216 100644
--- a/kanagram/src/vocabsettings.cpp
+++ b/kanagram/src/vocabsettings.cpp
@@ -1,27 +1,27 @@
#include "vocabsettings.h"
#include "vocabedit.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qstringlist.h>
-#include <qlistview.h>
-#include <qvaluevector.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqlistview.h>
+#include <tqvaluevector.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kurl.h>
#include "keduvocdocument.h"
#include "kanagramsettings.h"
-VocabSettings::VocabSettings(QWidget *parent) : VocabSettingsWidget(parent)
+VocabSettings::VocabSettings(TQWidget *parent) : VocabSettingsWidget(parent)
{
- connect(btnCreateNew, SIGNAL(clicked()), this, SLOT(slotCreateNew()));
- connect(btnEdit, SIGNAL(clicked()), this, SLOT(slotEdit()));
- connect(btnDelete, SIGNAL(clicked()), this, SLOT(slotDelete()));
- connect(lviewVocab, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotSelectionChanged(QListViewItem *)));
+ connect(btnCreateNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateNew()));
+ connect(btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit()));
+ connect(btnDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelete()));
+ connect(lviewVocab, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem *)));
refreshView();
}
@@ -39,7 +39,7 @@ void VocabSettings::refreshView()
{
KEduVocDocument *doc = new KEduVocDocument(this);
doc->open(KURL(m_fileList[i]), false);
- QListViewItem *item = new QListViewItem(lviewVocab, 0);
+ TQListViewItem *item = new TQListViewItem(lviewVocab, 0);
item->setText( 0, doc->getTitle() );
item->setText( 1, doc->getDocRemark() );
m_itemMap[item] = i;
@@ -61,7 +61,7 @@ void VocabSettings::slotDelete()
if(lviewVocab->selectedItem())
{
int index = m_itemMap[lviewVocab->selectedItem()];
- /*bool itWorked = */QFile::remove(m_fileList[index]);
+ /*bool itWorked = */TQFile::remove(m_fileList[index]);
}
refreshView();
@@ -73,10 +73,10 @@ void VocabSettings::slotCreateNew()
vocabEdit->show();
}
-void VocabSettings::slotSelectionChanged(QListViewItem *item)
+void VocabSettings::slotSelectionChanged(TQListViewItem *item)
{
int index = m_itemMap[item];
- QFileInfo info = QFileInfo(m_fileList[index]);
+ TQFileInfo info = TQFileInfo(m_fileList[index]);
if(!info.isWritable())
{
btnDelete->setEnabled(false);
diff --git a/kanagram/src/vocabsettings.h b/kanagram/src/vocabsettings.h
index d321ee2f..7b86720f 100644
--- a/kanagram/src/vocabsettings.h
+++ b/kanagram/src/vocabsettings.h
@@ -7,19 +7,19 @@ class VocabSettings : public VocabSettingsWidget
{
Q_OBJECT
public:
- VocabSettings(QWidget *parent);
+ VocabSettings(TQWidget *parent);
~VocabSettings();
void refreshView();
private:
- QStringList m_fileList;
- QMap<const QListViewItem*, int> m_itemMap;
+ TQStringList m_fileList;
+ TQMap<const TQListViewItem*, int> m_itemMap;
private slots:
void slotCreateNew();
void slotEdit();
void slotDelete();
- void slotSelectionChanged(QListViewItem *item);
+ void slotSelectionChanged(TQListViewItem *item);
};
#endif