summaryrefslogtreecommitdiffstats
path: root/kplato/kptwbsdefinition.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kplato/kptwbsdefinition.cc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kplato/kptwbsdefinition.cc')
-rw-r--r--kplato/kptwbsdefinition.cc70
1 files changed, 35 insertions, 35 deletions
diff --git a/kplato/kptwbsdefinition.cc b/kplato/kptwbsdefinition.cc
index 115c8779..d05b61d8 100644
--- a/kplato/kptwbsdefinition.cc
+++ b/kplato/kptwbsdefinition.cc
@@ -23,9 +23,9 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqpair.h>
namespace KPlato
{
@@ -37,11 +37,11 @@ WBSDefinition::WBSDefinition() {
m_defaultDef.code = "Number";
m_defaultDef.separator = ".";
- m_codeLists.append(qMakePair(QString("Number"), i18n("Number")));
- m_codeLists.append(qMakePair(QString("Roman, upper case"), i18n("Roman, Upper Case")));
- m_codeLists.append(qMakePair(QString("Roman, lower case"), i18n("Roman, Lower Case")));
- m_codeLists.append(qMakePair(QString("Letter, upper case"), i18n("Letter, Upper Case")));
- m_codeLists.append(qMakePair(QString("Letter, lower case"), i18n("Letter, Lower Case")));
+ m_codeLists.append(tqMakePair(TQString("Number"), i18n("Number")));
+ m_codeLists.append(tqMakePair(TQString("Roman, upper case"), i18n("Roman, Upper Case")));
+ m_codeLists.append(tqMakePair(TQString("Roman, lower case"), i18n("Roman, Lower Case")));
+ m_codeLists.append(tqMakePair(TQString("Letter, upper case"), i18n("Letter, Upper Case")));
+ m_codeLists.append(tqMakePair(TQString("Letter, lower case"), i18n("Letter, Lower Case")));
}
WBSDefinition::~WBSDefinition() {
@@ -52,7 +52,7 @@ void WBSDefinition::clear() {
m_levelsDef.clear();
}
-QString WBSDefinition::wbs(uint index, int level) {
+TQString WBSDefinition::wbs(uint index, int level) {
if (isLevelsDefEnabled()) {
CodeDef def = levelsDef(level);
if (!def.isEmpty()) {
@@ -63,7 +63,7 @@ QString WBSDefinition::wbs(uint index, int level) {
}
-QString WBSDefinition::code(uint index, int level) {
+TQString WBSDefinition::code(uint index, int level) {
if (isLevelsDefEnabled()) {
CodeDef def = levelsDef(level);
if (!def.isEmpty()) {
@@ -73,7 +73,7 @@ QString WBSDefinition::code(uint index, int level) {
return code(m_defaultDef, index);
}
-QString WBSDefinition::separator(int level) {
+TQString WBSDefinition::separator(int level) {
if (isLevelsDefEnabled()) {
CodeDef def = levelsDef(level);
if (!def.isEmpty()) {
@@ -83,20 +83,20 @@ QString WBSDefinition::separator(int level) {
return m_defaultDef.separator;
}
-void WBSDefinition::setLevelsDef(QMap<int, CodeDef> def) {
+void WBSDefinition::setLevelsDef(TQMap<int, CodeDef> def) {
m_levelsDef.clear();
m_levelsDef = def;
}
WBSDefinition::CodeDef WBSDefinition::levelsDef(int level) const {
- return m_levelsDef.contains(level) ? m_levelsDef[level] : CodeDef();
+ return m_levelsDef.tqcontains(level) ? m_levelsDef[level] : CodeDef();
}
void WBSDefinition::setLevelsDef(int level, CodeDef def) {
m_levelsDef.insert(level, def);
}
-void WBSDefinition::setLevelsDef(int level, QString c, QString s) {
+void WBSDefinition::setLevelsDef(int level, TQString c, TQString s) {
m_levelsDef.insert(level, CodeDef(c, s));
}
@@ -104,43 +104,43 @@ bool WBSDefinition::level0Enabled() {
return m_levelsEnabled && !levelsDef(0).isEmpty();
}
-const QChar Letters[] = { '?','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z' };
+const TQChar Letters[] = { '?','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z' };
-QString WBSDefinition::code(CodeDef &def, uint index) {
+TQString WBSDefinition::code(CodeDef &def, uint index) {
if (def.code == "Number") {
- return QString("%1").arg(index);
+ return TQString("%1").tqarg(index);
}
if (def.code == "Roman, lower case") {
- return QString("%1").arg(toRoman(index));
+ return TQString("%1").tqarg(toRoman(index));
}
if (def.code == "Roman, upper case") {
- return QString("%1").arg(toRoman(index, true));
+ return TQString("%1").tqarg(toRoman(index, true));
}
if (def.code == "Letter, lower case") {
if (index > 26) {
index = 0;
}
- return QString("%1").arg(Letters[index]);
+ return TQString("%1").tqarg(Letters[index]);
}
if (def.code == "Letter, upper case") {
if (index > 26) {
index = 0;
}
- return QString("%1").arg(Letters[index].upper());
+ return TQString("%1").tqarg(Letters[index].upper());
}
- return QString();
+ return TQString();
}
// Nicked from koparagcounter.cc
-const QCString RNUnits[] = {"", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix"};
-const QCString RNTens[] = {"", "x", "xx", "xxx", "xl", "l", "lx", "lxx", "lxxx", "xc"};
-const QCString RNHundreds[] = {"", "c", "cc", "ccc", "cd", "d", "dc", "dcc", "dccc", "cm"};
-const QCString RNThousands[] = {"", "m", "mm", "mmm"};
+const TQCString RNUnits[] = {"", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix"};
+const TQCString RNTens[] = {"", "x", "xx", "xxx", "xl", "l", "lx", "lxx", "lxxx", "xc"};
+const TQCString RNHundreds[] = {"", "c", "cc", "ccc", "cd", "d", "dc", "dcc", "dccc", "cm"};
+const TQCString RNThousands[] = {"", "m", "mm", "mmm"};
-QString WBSDefinition::toRoman( int n, bool upper )
+TQString WBSDefinition::toRoman( int n, bool upper )
{
if ( n >= 0 ) {
- QString s = QString::fromLatin1( RNThousands[ ( n / 1000 ) ] +
+ TQString s = TQString::tqfromLatin1( RNThousands[ ( n / 1000 ) ] +
RNHundreds[ ( n / 100 ) % 10 ] +
RNTens[ ( n / 10 ) % 10 ] +
RNUnits[ ( n ) % 10 ] );
@@ -148,13 +148,13 @@ QString WBSDefinition::toRoman( int n, bool upper )
} else { // should never happen, but better not crash if it does
kdWarning()<< k_funcinfo << " n=" << n << endl;
- return QString::number( n );
+ return TQString::number( n );
}
}
-QStringList WBSDefinition::codeList() {
- QStringList cl;
- QValueList<QPair<QString, QString> >::Iterator it;
+TQStringList WBSDefinition::codeList() {
+ TQStringList cl;
+ TQValueList<TQPair<TQString, TQString> >::Iterator it;
for (it = m_codeLists.begin(); it != m_codeLists.end(); ++it) {
cl.append((*it).second);
}
@@ -162,7 +162,7 @@ QStringList WBSDefinition::codeList() {
}
int WBSDefinition::defaultCodeIndex() const {
- QValueList<QPair<QString, QString> >::const_iterator it;
+ TQValueList<TQPair<TQString, TQString> >::const_iterator it;
int i = -1;
for(it = m_codeLists.begin(); it != m_codeLists.end(); ++it) {
++i;
@@ -173,7 +173,7 @@ int WBSDefinition::defaultCodeIndex() const {
}
bool WBSDefinition::setDefaultCode(uint index) {
- QValueList<QPair<QString, QString> >::const_iterator it = m_codeLists.at(index);
+ TQValueList<TQPair<TQString, TQString> >::const_iterator it = m_codeLists.at(index);
if (it == m_codeLists.end()) {
return false;
}
@@ -181,7 +181,7 @@ bool WBSDefinition::setDefaultCode(uint index) {
return true;
}
-void WBSDefinition::setDefaultSeparator(QString s) {
+void WBSDefinition::setDefaultSeparator(TQString s) {
m_defaultDef.separator = s;
}