Browse Source

Initial TQt conversion

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/bibletime@1173696 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 11 years ago
parent
commit
62f474f240
  1. 34
      bibletime/backend/bt_gbfhtml.cpp
  2. 20
      bibletime/backend/bt_osishtml.cpp
  3. 4
      bibletime/backend/bt_plainhtml.cpp
  4. 68
      bibletime/backend/bt_thmlhtml.cpp
  5. 2
      bibletime/backend/btstringmgr.cpp
  6. 4
      bibletime/backend/btstringmgr.h
  7. 16
      bibletime/backend/cbookdisplay.cpp
  8. 4
      bibletime/backend/cbookdisplay.h
  9. 6
      bibletime/backend/cchapterdisplay.cpp
  10. 2
      bibletime/backend/cchapterdisplay.h
  11. 42
      bibletime/backend/cdisplayrendering.cpp
  12. 6
      bibletime/backend/cdisplayrendering.h
  13. 52
      bibletime/backend/cdisplaytemplatemgr.cpp
  14. 34
      bibletime/backend/cdisplaytemplatemgr.h
  15. 8
      bibletime/backend/centrydisplay.cpp
  16. 4
      bibletime/backend/centrydisplay.h
  17. 32
      bibletime/backend/chtmlexportrendering.cpp
  18. 6
      bibletime/backend/chtmlexportrendering.h
  19. 26
      bibletime/backend/clanguagemgr.cpp
  20. 52
      bibletime/backend/clanguagemgr.h
  21. 10
      bibletime/backend/cplaintextexportrendering.cpp
  22. 4
      bibletime/backend/cplaintextexportrendering.h
  23. 62
      bibletime/backend/creferencemanager.cpp
  24. 24
      bibletime/backend/creferencemanager.h
  25. 112
      bibletime/backend/cswordbackend.cpp
  26. 30
      bibletime/backend/cswordbackend.h
  27. 18
      bibletime/backend/cswordbiblemoduleinfo.cpp
  28. 16
      bibletime/backend/cswordbiblemoduleinfo.h
  29. 50
      bibletime/backend/cswordkey.cpp
  30. 18
      bibletime/backend/cswordkey.h
  31. 16
      bibletime/backend/cswordldkey.cpp
  32. 12
      bibletime/backend/cswordldkey.h
  33. 44
      bibletime/backend/cswordlexiconmoduleinfo.cpp
  34. 6
      bibletime/backend/cswordlexiconmoduleinfo.h
  35. 182
      bibletime/backend/cswordmoduleinfo.cpp
  36. 48
      bibletime/backend/cswordmoduleinfo.h
  37. 6
      bibletime/backend/cswordmodulesearch.cpp
  38. 14
      bibletime/backend/cswordmodulesearch.h
  39. 22
      bibletime/backend/cswordtreekey.cpp
  40. 12
      bibletime/backend/cswordtreekey.h
  41. 22
      bibletime/backend/cswordversekey.cpp
  42. 14
      bibletime/backend/cswordversekey.h
  43. 52
      bibletime/backend/ctextrendering.cpp
  44. 32
      bibletime/backend/ctextrendering.h
  45. 18
      bibletime/bibletime.cpp
  46. 54
      bibletime/bibletime.h
  47. 46
      bibletime/bibletime_dcop.cpp
  48. 114
      bibletime/bibletime_init.cpp
  49. 72
      bibletime/bibletime_slots.cpp
  50. 2
      bibletime/bibletimeapp.cpp
  51. 28
      bibletime/bibletimeinterface.h
  52. 108
      bibletime/bibletimeinterface_skel.cpp
  53. 50
      bibletime/frontend/btinstallmgr.cpp
  54. 28
      bibletime/frontend/btinstallmgr.h
  55. 144
      bibletime/frontend/cbtconfig.cpp
  56. 60
      bibletime/frontend/cbtconfig.h
  57. 84
      bibletime/frontend/cdragdropmgr.cpp
  58. 56
      bibletime/frontend/cdragdropmgr.h
  59. 112
      bibletime/frontend/cexportmanager.cpp
  60. 32
      bibletime/frontend/cexportmanager.h
  61. 126
      bibletime/frontend/cinfodisplay.cpp
  62. 30
      bibletime/frontend/cinfodisplay.h
  63. 40
      bibletime/frontend/cinputdialog.cpp
  64. 12
      bibletime/frontend/cinputdialog.h
  65. 64
      bibletime/frontend/cmanageindiceswidget.cpp
  66. 10
      bibletime/frontend/cmanageindiceswidget.h
  67. 84
      bibletime/frontend/cmdiarea.cpp
  68. 42
      bibletime/frontend/cmdiarea.h
  69. 8
      bibletime/frontend/cmoduleindexdialog.cpp
  70. 4
      bibletime/frontend/cmoduleindexdialog.h
  71. 248
      bibletime/frontend/coptionsdialog.cpp
  72. 92
      bibletime/frontend/coptionsdialog.h
  73. 20
      bibletime/frontend/cprinter.cpp
  74. 12
      bibletime/frontend/cprinter.h
  75. 116
      bibletime/frontend/cprofile.cpp
  76. 28
      bibletime/frontend/cprofile.h
  77. 32
      bibletime/frontend/cprofilemgr.cpp
  78. 14
      bibletime/frontend/cprofilemgr.h
  79. 14
      bibletime/frontend/cprofilewindow.cpp
  80. 26
      bibletime/frontend/cprofilewindow.h
  81. 16
      bibletime/frontend/crossrefrendering.cpp
  82. 4
      bibletime/frontend/crossrefrendering.h
  83. 246
      bibletime/frontend/cswordsetupdialog.cpp
  84. 78
      bibletime/frontend/cswordsetupdialog.h
  85. 76
      bibletime/frontend/cswordsetupinstallsourcesdialog.cpp
  86. 16
      bibletime/frontend/cswordsetupinstallsourcesdialog.h
  87. 104
      bibletime/frontend/cswordsetupmodulelistview.cpp
  88. 28
      bibletime/frontend/cswordsetupmodulelistview.h
  89. 44
      bibletime/frontend/display/cdisplay.cpp
  90. 46
      bibletime/frontend/display/cdisplay.h
  91. 104
      bibletime/frontend/display/chtmlreaddisplay.cpp
  92. 50
      bibletime/frontend/display/chtmlreaddisplay.h
  93. 54
      bibletime/frontend/display/chtmlwritedisplay.cpp
  94. 20
      bibletime/frontend/display/chtmlwritedisplay.h
  95. 46
      bibletime/frontend/display/cplainwritedisplay.cpp
  96. 30
      bibletime/frontend/display/cplainwritedisplay.h
  97. 10
      bibletime/frontend/display/creaddisplay.cpp
  98. 12
      bibletime/frontend/display/creaddisplay.h
  99. 2
      bibletime/frontend/display/cwritedisplay.cpp
  100. 2
      bibletime/frontend/display/cwritedisplay.h
  101. 48
      bibletime/frontend/displaywindow/cbiblereadwindow.cpp
  102. 4
      bibletime/frontend/displaywindow/cbiblereadwindow.h
  103. 20
      bibletime/frontend/displaywindow/cbookreadwindow.cpp
  104. 22
      bibletime/frontend/displaywindow/cbuttons.cpp
  105. 10
      bibletime/frontend/displaywindow/cbuttons.h
  106. 12
      bibletime/frontend/displaywindow/ccommentaryreadwindow.cpp
  107. 2
      bibletime/frontend/displaywindow/ccommentaryreadwindow.h
  108. 54
      bibletime/frontend/displaywindow/cdisplaywindow.cpp
  109. 14
      bibletime/frontend/displaywindow/cdisplaywindow.h
  110. 14
      bibletime/frontend/displaywindow/chtmlwritewindow.cpp
  111. 2
      bibletime/frontend/displaywindow/chtmlwritewindow.h
  112. 60
      bibletime/frontend/displaywindow/clexiconreadwindow.cpp
  113. 2
      bibletime/frontend/displaywindow/clexiconreadwindow.h
  114. 14
      bibletime/frontend/displaywindow/cmodulechooserbar.cpp
  115. 8
      bibletime/frontend/displaywindow/cmodulechooserbar.h
  116. 42
      bibletime/frontend/displaywindow/cmodulechooserbutton.cpp
  117. 8
      bibletime/frontend/displaywindow/cmodulechooserbutton.h
  118. 28
      bibletime/frontend/displaywindow/cplainwritewindow.cpp
  119. 4
      bibletime/frontend/displaywindow/cplainwritewindow.h
  120. 32
      bibletime/frontend/displaywindow/creadwindow.cpp
  121. 6
      bibletime/frontend/displaywindow/creadwindow.h
  122. 16
      bibletime/frontend/displaywindow/cwritewindow.cpp
  123. 6
      bibletime/frontend/displaywindow/cwritewindow.h
  124. 14
      bibletime/frontend/keychooser/cbiblekeychooser.cpp
  125. 6
      bibletime/frontend/keychooser/cbiblekeychooser.h
  126. 48
      bibletime/frontend/keychooser/cbookkeychooser.cpp
  127. 22
      bibletime/frontend/keychooser/cbookkeychooser.h
  128. 46
      bibletime/frontend/keychooser/cbooktreechooser.cpp
  129. 26
      bibletime/frontend/keychooser/cbooktreechooser.h
  130. 20
      bibletime/frontend/keychooser/ckeychooser.cpp
  131. 18
      bibletime/frontend/keychooser/ckeychooser.h
  132. 106
      bibletime/frontend/keychooser/ckeychooserwidget.cpp
  133. 56
      bibletime/frontend/keychooser/ckeychooserwidget.h
  134. 50
      bibletime/frontend/keychooser/ckeyreferencewidget.cpp
  135. 20
      bibletime/frontend/keychooser/ckeyreferencewidget.h
  136. 32
      bibletime/frontend/keychooser/clexiconkeychooser.cpp
  137. 10
      bibletime/frontend/keychooser/clexiconkeychooser.h
  138. 26
      bibletime/frontend/keychooser/crefselectdialog.cpp
  139. 18
      bibletime/frontend/keychooser/crefselectdialog.h
  140. 32
      bibletime/frontend/keychooser/cscrollbutton.cpp
  141. 18
      bibletime/frontend/keychooser/cscrollbutton.h
  142. 60
      bibletime/frontend/keychooser/cscrollerwidgetset.cpp
  143. 24
      bibletime/frontend/keychooser/cscrollerwidgetset.h
  144. 36
      bibletime/frontend/kstartuplogo.cpp
  145. 12
      bibletime/frontend/kstartuplogo.h
  146. 238
      bibletime/frontend/mainindex/cindexitem.cpp
  147. 112
      bibletime/frontend/mainindex/cindexitem.h
  148. 182
      bibletime/frontend/mainindex/cmainindex.cpp
  149. 44
      bibletime/frontend/mainindex/cmainindex.h
  150. 44
      bibletime/frontend/manageindicesform.cpp
  151. 66
      bibletime/frontend/searchdialog/cmodulechooser.cpp
  152. 18
      bibletime/frontend/searchdialog/cmodulechooser.h
  153. 42
      bibletime/frontend/searchdialog/cmoduleresultview.cpp
  154. 20
      bibletime/frontend/searchdialog/cmoduleresultview.h
  155. 94
      bibletime/frontend/searchdialog/crangechooser.cpp
  156. 38
      bibletime/frontend/searchdialog/crangechooser.h
  157. 194
      bibletime/frontend/searchdialog/csearchanalysis.cpp
  158. 70
      bibletime/frontend/searchdialog/csearchanalysis.h
  159. 60
      bibletime/frontend/searchdialog/csearchdialog.cpp
  160. 24
      bibletime/frontend/searchdialog/csearchdialog.h
  161. 136
      bibletime/frontend/searchdialog/csearchdialogpages.cpp
  162. 60
      bibletime/frontend/searchdialog/csearchdialogpages.h
  163. 74
      bibletime/frontend/searchdialog/csearchresultview.cpp
  164. 20
      bibletime/frontend/searchdialog/csearchresultview.h
  165. 64
      bibletime/frontend/searchdialog/searchoptionsform.cpp
  166. 56
      bibletime/frontend/searchdialog/searchresultsform.cpp
  167. 16
      bibletime/frontend/util/csortlistviewitem.cpp
  168. 22
      bibletime/frontend/util/csortlistviewitem.h
  169. 10
      bibletime/main.cpp
  170. 368
      bibletime/util/cresmgr.cpp
  171. 372
      bibletime/util/cresmgr.h
  172. 86
      bibletime/util/ctoolclass.cpp
  173. 24
      bibletime/util/ctoolclass.h
  174. 40
      bibletime/util/directoryutil.cpp
  175. 10
      bibletime/util/directoryutil.h

34
bibletime/backend/bt_gbfhtml.cpp

@ -24,8 +24,8 @@
#include <utilxml.h>
//Qt includes
#include <qregexp.h>
#include <qstring.h>
#include <tqregexp.h>
#include <tqstring.h>
using namespace Filters;
@ -97,13 +97,13 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
//Am Anfang<WH07225> schuf<WH01254><WTH8804> Gott<WH0430> Himmel<WH08064> und<WT> Erde<WH0776>.
//A simple word<WT> means: No entry for this word "word"
QString result;
TQString result;
QString t = QString::fromUtf8(buf.c_str());
TQString t = TQString::fromUtf8(buf.c_str());
QRegExp tag("([.,;:]?<W[HGT][^>]*>\\s*)+");
TQRegExp tag("([.,;:]?<W[HGT][^>]*>\\s*)+");
QStringList list;
TQStringList list;
int lastMatchEnd = 0;
@ -129,11 +129,11 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
//list is now a list of words with 1-n Strongs at the end, which belong to this word.
//now create the necessary HTML in list entries and concat them to the result
tag = QRegExp("<W([HGT])([^>]*)>");
tag = TQRegExp("<W([HGT])([^>]*)>");
tag.setMinimal(true);
for (QStringList::iterator it = list.begin(); it != list.end(); ++it) {
QString e = (*it); //current entry to process
for (TQStringList::iterator it = list.begin(); it != list.end(); ++it) {
TQString e = (*it); //current entry to process
//qWarning(e.latin1());
//check if there is a word to which the strongs info belongs to.
@ -141,7 +141,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
//If not, leave out the strongs info, because it can't be tight to a text
//Comparing the first char with < is not enough, because the tokenReplace is done already
//so there might be html tags already.
const bool textPresent = (e.stripWhiteSpace().remove(QRegExp("[.,;:]")).left(2) != "<W");
const bool textPresent = (e.stripWhiteSpace().remove(TQRegExp("[.,;:]")).left(2) != "<W");
if (!textPresent) {
result += (*it);
@ -153,7 +153,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
bool hasLemmaAttr = false;
bool hasMorphAttr = false;
QString value = QString::null;
TQString value = TQString::null;
int tagAttributeStart = -1;
while (pos != -1) { //work on all strong/lemma tags in this section, should be between 1-3 loops
@ -170,14 +170,14 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
pos += 7;
//skip blanks, commas, dots and stuff at the beginning, it doesn't belong to the morph code
QString rep("<span ");
TQString rep("<span ");
rep.append(isMorph ? "morph" : "lemma").append("=\"").append(value).append("\">");
hasMorphAttr = isMorph;
hasLemmaAttr = !isMorph;
int startPos = 0;
QChar c = e[startPos];
TQChar c = e[startPos];
while ((startPos < pos) && (c.isSpace() || c.isPunct())) {
++startPos;
@ -198,12 +198,12 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
if ((!isMorph && hasLemmaAttr) || (isMorph && hasMorphAttr)) { //we append another attribute value, e.g. 3000 gets 3000|5000
//search the existing attribute start
QRegExp attrRegExp( isMorph ? "morph=\".+(?=\")" : "lemma=\".+(?=\")" );
TQRegExp attrRegExp( isMorph ? "morph=\".+(?=\")" : "lemma=\".+(?=\")" );
attrRegExp.setMinimal(true);
const int foundPos = e.find(attrRegExp, tagAttributeStart);
if (foundPos != -1) {
e.insert(foundPos + attrRegExp.matchedLength(), QString("|").append(value));
e.insert(foundPos + attrRegExp.matchedLength(), TQString("|").append(value));
pos += value.length() + 1;
hasLemmaAttr = !isMorph;
@ -211,7 +211,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
}
}
else { //attribute was not yet inserted
QString attr;
TQString attr;
attr.setLatin1(isMorph ? "morph" : "lemma").append("=\"").append(value).append("\" ");
e.insert(tagAttributeStart, attr);
@ -272,7 +272,7 @@ bool BT_GBFHTML::handleToken(sword::SWBuf &buf, const char *token, sword::BasicF
buf.append('/');
buf.append(myUserData->key->getShortText());
buf.append('/');
buf.append( QString::number(myUserData->swordFootnote++).latin1() );
buf.append( TQString::number(myUserData->swordFootnote++).latin1() );
buf.append("\">*</span> ");
userData->suspendTextPassThru = true;

20
bibletime/backend/bt_osishtml.cpp

@ -31,7 +31,7 @@
#include <klocale.h>
//Qt includes
#include <qstring.h>
#include <tqstring.h>
using sword::SWBuf;
using sword::XMLTag;
@ -298,7 +298,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
buf.append('/');
buf.append(myUserData->key->getShortText());
buf.append('/');
buf.append( QString::number(myUserData->swordFootnote++).latin1() ); //inefficient
buf.append( TQString::number(myUserData->swordFootnote++).latin1() ); //inefficient
const SWBuf n = tag.getAttribute("n");
@ -334,8 +334,8 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
else if (!strcmp(tag.getName(), "reference")) { // <reference> tag
if (!tag.isEndTag() && !tag.isEmpty()) {
QString ref( tag.getAttribute("osisRef") );
QString hrefRef( ref );
TQString ref( tag.getAttribute("osisRef") );
TQString hrefRef( ref );
Q_ASSERT(!ref.isEmpty());
if (!ref.isEmpty()) {
@ -357,7 +357,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
int pos = ref.find(":");
if ((pos >= 0) && ref.at(pos-1).isLetter() && ref.at(pos+1).isLetter()) {
QString newModuleName = ref.left(pos);
TQString newModuleName = ref.left(pos);
hrefRef = ref.mid(pos+1);
if (CPointers::backend()->findModuleByName(newModuleName)) {
@ -366,10 +366,10 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
}
CReferenceManager::ParseOptions options;
options.refBase = QString::fromUtf8(myUserData->key->getText());
options.refDestinationModule = QString(mod->name());
options.sourceLanguage = QString(myModule->Lang());
options.destinationLanguage = QString("en");
options.refBase = TQString::fromUtf8(myUserData->key->getText());
options.refDestinationModule = TQString(mod->name());
options.sourceLanguage = TQString(myModule->Lang());
options.destinationLanguage = TQString("en");
buf.append("<a href=\"");
buf.append( //create the hyperlink with key and mod
@ -599,7 +599,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
else { // seg end tag
buf.append("</span>");
}
//qWarning(QString("handled <seg> token. result: %1").arg(buf.c_str()).latin1());
//qWarning(TQString("handled <seg> token. result: %1").arg(buf.c_str()).latin1());
}
//divine name, don't use simple tag replacing because it may have attributes

4
bibletime/backend/bt_plainhtml.cpp

@ -24,8 +24,8 @@
#include <utilxml.h>
//Qt includes
#include <qregexp.h>
#include <qstring.h>
#include <tqregexp.h>
#include <tqstring.h>
using namespace Filters;

68
bibletime/backend/bt_thmlhtml.cpp

@ -29,8 +29,8 @@
#include "versekey.h"
//Qt includes
#include <qstring.h>
#include <qregexp.h>
#include <tqstring.h>
#include <tqregexp.h>
//System includes
#include <stdlib.h>
@ -60,12 +60,12 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
return 1;
}
QString result;
TQString result;
QString t = QString::fromUtf8(buf.c_str());
QRegExp tag("([.,;]?<sync[^>]+(type|value)=\"([^\"]+)\"[^>]+(type|value)=\"([^\"]+)\"([^<]*)>)+");
TQString t = TQString::fromUtf8(buf.c_str());
TQRegExp tag("([.,;]?<sync[^>]+(type|value)=\"([^\"]+)\"[^>]+(type|value)=\"([^\"]+)\"([^<]*)>)+");
QStringList list;
TQStringList list;
int lastMatchEnd = 0;
int pos = tag.search(t,0);
@ -84,12 +84,12 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
list.append(t.right(t.length() - lastMatchEnd));
}
tag = QRegExp("<sync[^>]+(type|value|class)=\"([^\"]+)\"[^>]+(type|value|class)=\"([^\"]+)\"[^>]+((type|value|class)=\"([^\"]+)\")*([^<]*)>");
tag = TQRegExp("<sync[^>]+(type|value|class)=\"([^\"]+)\"[^>]+(type|value|class)=\"([^\"]+)\"[^>]+((type|value|class)=\"([^\"]+)\")*([^<]*)>");
for (QStringList::iterator it = list.begin(); it != list.end(); ++it) {
QString e( *it );
for (TQStringList::iterator it = list.begin(); it != list.end(); ++it) {
TQString e( *it );
const bool textPresent = (e.stripWhiteSpace().remove(QRegExp("[.,;:]")).left(1) != "<");
const bool textPresent = (e.stripWhiteSpace().remove(TQRegExp("[.,;:]")).left(1) != "<");
if (!textPresent) {
continue;
@ -101,14 +101,14 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
int pos = tag.search(e, 0);
bool insertedTag = false;
QString value;
QString valueClass;
TQString value;
TQString valueClass;
while (pos != -1) {
bool isMorph = false;
bool isStrongs = false;
value = QString::null;
valueClass = QString::null;
value = TQString::null;
valueClass = TQString::null;
// check 3 attribute/value pairs
@ -143,10 +143,10 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
e.replace(pos, tag.matchedLength(), "</span>");
pos += 7;
QString rep;
TQString rep;
rep.setLatin1("<span lemma=\"").append(value).append("\">");
int startPos = 0;
QChar c = e[startPos];
TQChar c = e[startPos];
while ((startPos < pos) && (c.isSpace() || c.isPunct())) {
++startPos;
@ -164,12 +164,12 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
if ((!isMorph && hasLemmaAttr) || (isMorph && hasMorphAttr)) { //we append another attribute value, e.g. 3000 gets 3000|5000
//search the existing attribute start
QRegExp attrRegExp( isMorph ? "morph=\".+(?=\")" : "lemma=\".+(?=\")" );
TQRegExp attrRegExp( isMorph ? "morph=\".+(?=\")" : "lemma=\".+(?=\")" );
attrRegExp.setMinimal(true);
const int foundAttrPos = e.find(attrRegExp, pos);
if (foundAttrPos != -1) {
e.insert(foundAttrPos + attrRegExp.matchedLength(), QString("|").append(value));
e.insert(foundAttrPos + attrRegExp.matchedLength(), TQString("|").append(value));
pos += value.length() + 1;
hasLemmaAttr = !isMorph;
@ -177,10 +177,10 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
}
}
else { //attribute was not yet inserted
const int attrPos = e.find(QRegExp("morph=|lemma="), 0);
const int attrPos = e.find(TQRegExp("morph=|lemma="), 0);
if (attrPos >= 0) {
QString attr;
TQString attr;
attr.append(isMorph ? "morph" : "lemma").append("=\"").append(value).append("\" ");
e.insert(attrPos, attr);
@ -217,7 +217,7 @@ bool BT_ThMLHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
if (tag.getAttribute("lang")) {
const char* abbrev = tag.getAttribute("lang");
//const CLanguageMgr::Language* const language = CPointers::languageMgr()->languageForAbbrev( QString::fromLatin1(abbrev) );
//const CLanguageMgr::Language* const language = CPointers::languageMgr()->languageForAbbrev( TQString::fromLatin1(abbrev) );
buf.append("<span class=\"foreign\" lang=\"");
buf.append(abbrev);
@ -241,7 +241,7 @@ bool BT_ThMLHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
buf.append('/');
buf.append(myUserData->key->getShortText());
buf.append('/');
buf.append( QString::number(myUserData->swordFootnote++).latin1() );
buf.append( TQString::number(myUserData->swordFootnote++).latin1() );
buf.append("\">*</span> ");
myUserData->suspendTextPassThru = true;
@ -270,22 +270,22 @@ bool BT_ThMLHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
Q_ASSERT(mod);
if (mod) {
CReferenceManager::ParseOptions options;
options.refBase = QString::fromUtf8(myUserData->key->getText()); //current module key
options.refDestinationModule = QString(mod->name());
options.sourceLanguage = QString(myModule->Lang());
options.destinationLanguage = QString("en");
options.refBase = TQString::fromUtf8(myUserData->key->getText()); //current module key
options.refDestinationModule = TQString(mod->name());
options.sourceLanguage = TQString(myModule->Lang());
options.destinationLanguage = TQString("en");
//it's ok to split the reference, because to descriptive text is given
bool insertSemicolon = false;
buf.append("<span class=\"crossreference\">");
QStringList refs = QStringList::split(";", QString::fromUtf8(myUserData->lastTextNode.c_str()));
QString oldRef; //the previous reference to use as a base for the next refs
for (QStringList::iterator it(refs.begin()); it != refs.end(); ++it) {
TQStringList refs = TQStringList::split(";", TQString::fromUtf8(myUserData->lastTextNode.c_str()));
TQString oldRef; //the previous reference to use as a base for the next refs
for (TQStringList::iterator it(refs.begin()); it != refs.end(); ++it) {
if (! oldRef.isEmpty() ){
options.refBase = oldRef; //use the last ref as a base, e.g. Rom 1,2-3, when the next ref is only 3:3-10
}
const QString completeRef( CReferenceManager::parseVerseReference((*it), options) );
const TQString completeRef( CReferenceManager::parseVerseReference((*it), options) );
oldRef = completeRef; //use the parsed result as the base for the next ref.
@ -329,12 +329,12 @@ bool BT_ThMLHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
Q_ASSERT(mod);
CReferenceManager::ParseOptions options;
options.refBase = QString::fromUtf8(myUserData->key->getText());
options.refDestinationModule = QString(mod->name());
options.refBase = TQString::fromUtf8(myUserData->key->getText());
options.refDestinationModule = TQString(mod->name());
options.sourceLanguage = myModule->Lang();
options.destinationLanguage = QString("en");
options.destinationLanguage = TQString("en");
const QString completeRef = CReferenceManager::parseVerseReference(QString::fromUtf8(ref), options);
const TQString completeRef = CReferenceManager::parseVerseReference(TQString::fromUtf8(ref), options);
if (mod) {
buf.append("<span class=\"crossreference\">");

2
bibletime/backend/btstringmgr.cpp

@ -19,7 +19,7 @@ char* BTStringMgr::upperUTF8(char* text, unsigned int maxlen) const {
const int max = (maxlen>0) ? maxlen : strlen(text);
if (isUtf8(text)) {
strncpy(text, (const char*)QString::fromUtf8(text).upper().utf8(), max);
strncpy(text, (const char*)TQString::fromUtf8(text).upper().utf8(), max);
return text;
}

4
bibletime/backend/btstringmgr.h

@ -16,12 +16,12 @@
#include <stringmgr.h>
//Qt includes
#include <qstring.h>
#include <tqstring.h>
using namespace sword;
/** Unicode string manager implementation.
* This is the StringManager implementation which works with QString.
* This is the StringManager implementation which works with TQString.
* @author The BibleTime developers
*/

16
bibletime/backend/cbookdisplay.cpp

@ -23,7 +23,7 @@ namespace Rendering {
/** Returns the rendered text using the modules in the list and using the key parameter. The displayoptions and filter options are used, too. */
const QString CBookDisplay::text( const ListCSwordModuleInfo& modules, const QString& keyName, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions ) {
const TQString CBookDisplay::text( const ListCSwordModuleInfo& modules, const TQString& keyName, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions ) {
CSwordBookModuleInfo* book = dynamic_cast<CSwordBookModuleInfo*>(modules.first());
Q_ASSERT(book);
@ -50,7 +50,7 @@ namespace Rendering {
if ((displayLevel <= 1) || (key->key().isEmpty() || (key->key() == "/") )) {
tree.append( new CDisplayRendering::KeyTreeItem( key->key(), modules, itemSettings ) );
const QString renderedText = render.renderKeyTree(tree);
const TQString renderedText = render.renderKeyTree(tree);
key->setOffset( offset );
return renderedText;
};
@ -79,7 +79,7 @@ namespace Rendering {
//display current level, we could also decide to display the available levels together
tree.append( new CDisplayRendering::KeyTreeItem( key->key(), modules, itemSettings ) );
const QString renderedText = render.renderKeyTree(tree);
const TQString renderedText = render.renderKeyTree(tree);
key->setOffset( offset );
return renderedText;
};
@ -95,7 +95,7 @@ namespace Rendering {
if ( !key->parent() ) { //something went wrong although we checked before! Be safe and return entry's text
tree.append( new CDisplayRendering::KeyTreeItem( key->key(), modules, itemSettings ) );
const QString renderedText = render.renderKeyTree(tree);
const TQString renderedText = render.renderKeyTree(tree);
key->setOffset( offset );
return renderedText;
};
@ -111,16 +111,16 @@ namespace Rendering {
setupRenderTree(key.get(), &tree, keyName);
const QString renderedText = render.renderKeyTree(tree);
const TQString renderedText = render.renderKeyTree(tree);
key->setOffset( offset ); //restore key
return renderedText;
}
void CBookDisplay::setupRenderTree(CSwordTreeKey * swordTree, CTextRendering::KeyTree * renderTree, const QString& highlightKey) {
// const QString key = swordTree->getFullName();
const QString key = swordTree->key();
void CBookDisplay::setupRenderTree(CSwordTreeKey * swordTree, CTextRendering::KeyTree * renderTree, const TQString& highlightKey) {
// const TQString key = swordTree->getFullName();
const TQString key = swordTree->key();
const unsigned long offset = swordTree->getOffset();
CTextRendering::KeyTreeItem::Settings settings;

4
bibletime/backend/cbookdisplay.h

@ -35,10 +35,10 @@ public: // Public methods
* Returns the rendered text using the modules in the list and using the key parameter.
* The displayoptions and filter options are used, too.
*/
virtual const QString text( const ListCSwordModuleInfo& modules, const QString& key, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions);
virtual const TQString text( const ListCSwordModuleInfo& modules, const TQString& key, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions);
protected:
void setupRenderTree(CSwordTreeKey* swordTree, CTextRendering::KeyTree* renderTree, const QString& highlightKey);
void setupRenderTree(CSwordTreeKey* swordTree, CTextRendering::KeyTree* renderTree, const TQString& highlightKey);
};
};

6
bibletime/backend/cchapterdisplay.cpp

@ -19,7 +19,7 @@
namespace Rendering {
const QString CChapterDisplay::text( const ListCSwordModuleInfo& modules, const QString& keyName, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions ) {
const TQString CChapterDisplay::text( const ListCSwordModuleInfo& modules, const TQString& keyName, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions ) {
Q_ASSERT( modules.count() >= 1 );
Q_ASSERT( !keyName.isEmpty() );
@ -33,8 +33,8 @@ namespace Rendering {
? CTextRendering::KeyTreeItem::Settings::SimpleKey
: CTextRendering::KeyTreeItem::Settings::NoKey;
QString startKey = keyName;
QString endKey = startKey;
TQString startKey = keyName;
TQString endKey = startKey;
//check whether there's an intro we have to include
Q_ASSERT((module->type() == CSwordModuleInfo::Bible));

2
bibletime/backend/cchapterdisplay.h

@ -31,7 +31,7 @@ public: // Public methods
* Returns the rendered text using the modules in the list and using the key parameter.
* The displayoptions and filter options are used, too.
*/
virtual const QString text( const ListCSwordModuleInfo& modules, const QString& key, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions);
virtual const TQString text( const ListCSwordModuleInfo& modules, const TQString& key, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions);
};
};

42
bibletime/backend/cdisplayrendering.cpp

@ -19,16 +19,16 @@
#include "cswordversekey.h"
//Qt includes
#include <qstring.h>
#include <qregexp.h>
#include <tqstring.h>
#include <tqregexp.h>
namespace Rendering {
CDisplayRendering::CDisplayRendering(CSwordBackend::DisplayOptions displayOptions, CSwordBackend::FilterOptions filterOptions)
: CHTMLExportRendering(CHTMLExportRendering::Settings(true), displayOptions, filterOptions) {}
const QString CDisplayRendering::entryLink( const KeyTreeItem& item, CSwordModuleInfo* module ) {
QString linkText;
const TQString CDisplayRendering::entryLink( const KeyTreeItem& item, CSwordModuleInfo* module ) {
TQString linkText;
const bool isBible = module && (module->type() == CSwordModuleInfo::Bible);
CSwordVerseKey vk(module); //only valid for bible modules, i.e. isBible == true
@ -39,19 +39,19 @@ namespace Rendering {
}
if (isBible && (vk.Verse() == 0)) {
return QString::null; //Warning: return already here
return TQString::null; //Warning: return already here
}
switch (item.settings().keyRenderingFace) {
case KeyTreeItem::Settings::NoKey: {
linkText = QString::null;
linkText = TQString::null;
break; //no key is valid for all modules
}
case KeyTreeItem::Settings::CompleteShort: {
if (isBible) {
linkText = QString::fromUtf8(vk.getShortText());
linkText = TQString::fromUtf8(vk.getShortText());
break;
}
@ -69,7 +69,7 @@ namespace Rendering {
case KeyTreeItem::Settings::SimpleKey: {
if (isBible) {
linkText = QString::number(vk.Verse());
linkText = TQString::number(vk.Verse());
break;
}
@ -83,10 +83,10 @@ namespace Rendering {
}
if (linkText.isEmpty()) {
return QString("<a name=\"").append(keyToHTMLAnchor(item.key())).append("\" />");
return TQString("<a name=\"").append(keyToHTMLAnchor(item.key())).append("\" />");
}
else {
return QString("<a name=\"").append(keyToHTMLAnchor(item.key())).append("\" ")
return TQString("<a name=\"").append(keyToHTMLAnchor(item.key())).append("\" ")
.append("href=\"")
.append(CReferenceManager::encodeHyperlink(
module->name(), item.key(), CReferenceManager::typeFromModule(module->type()))
@ -94,18 +94,18 @@ namespace Rendering {
.append("\">").append(linkText).append("</a>\n");
}
return QString::null;
return TQString::null;
}
const QString CDisplayRendering::keyToHTMLAnchor(const QString& key) {
QString ret = key;
ret = ret.stripWhiteSpace().remove(QRegExp("[^A-Za-z0-9]+"));
ret = ret.remove(QRegExp("^\\d+|"));
const TQString CDisplayRendering::keyToHTMLAnchor(const TQString& key) {
TQString ret = key;
ret = ret.stripWhiteSpace().remove(TQRegExp("[^A-Za-z0-9]+"));
ret = ret.remove(TQRegExp("^\\d+|"));
return ret;
}
const QString CDisplayRendering::finishText( const QString& oldText, KeyTree& tree ) {
const TQString CDisplayRendering::finishText( const TQString& oldText, KeyTree& tree ) {
ListCSwordModuleInfo modules = tree.collectModules();
@ -114,9 +114,9 @@ namespace Rendering {
/*
//mark all words by spans
QString text = oldText;
TQString text = oldText;
QRegExp re("(\\b)(?=\\w)"); //word begin marker
TQRegExp re("(\\b)(?=\\w)"); //word begin marker
int pos = text.find(re, 0);
while (pos != -1) { //word begin found
@ -126,7 +126,7 @@ namespace Rendering {
//qWarning("matched %s", text.mid(pos+1, 4).latin1());
//find end of word and put a marker around it
endPos = text.find(QRegExp("\\b|[,.:]"), pos+1);
endPos = text.find(TQRegExp("\\b|[,.:]"), pos+1);
if ((endPos != -1) && !CToolClass::inHTMLTag(endPos, text) && (endPos - pos >= 3)) { //reuire wordslonger than 3 chars
text.insert(endPos, "</span>");
text.insert(pos, "<span class=\"word\">");
@ -150,10 +150,10 @@ namespace Rendering {
settings.modules = modules;
settings.langAbbrev = ((modules.count() == 1) && lang->isValid())
? lang->abbrev()
: QString::null;
: TQString::null;
settings.pageDirection = (modules.count() == 1)
? ((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl")
: QString::null;
: TQString::null;
return tMgr->fillTemplate(CBTConfig::get
(CBTConfig::displayStyle), oldText, settings);

6
bibletime/backend/cdisplayrendering.h

@ -23,7 +23,7 @@ namespace Rendering {
class CDisplayRendering : public CHTMLExportRendering {
public:
static const QString keyToHTMLAnchor(const QString& key);
static const TQString keyToHTMLAnchor(const TQString& key);
CDisplayRendering(
CSwordBackend::DisplayOptions displayOptions = CBTConfig::getDisplayOptionDefaults(),
@ -31,8 +31,8 @@ public:
);
protected:
virtual const QString entryLink( const KeyTreeItem& item, CSwordModuleInfo* const module );
virtual const QString finishText( const QString&, KeyTree& tree );
virtual const TQString entryLink( const KeyTreeItem& item, CSwordModuleInfo* const module );
virtual const TQString finishText( const TQString&, KeyTree& tree );
};
}

52
bibletime/backend/cdisplaytemplatemgr.cpp

@ -22,9 +22,9 @@
#include "config.h"
//Qt includes
#include <qstringlist.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <tqstringlist.h>
#include <tqfile.h>
#include <tqfileinfo.h>
//KDE includes
#include <klocale.h>
@ -41,12 +41,12 @@ CDisplayTemplateMgr::~CDisplayTemplateMgr() {}
/*!
\fn CDisplayTemplateMgr::fillTemplate( const QString& name, const QString& title, const QString& content )
\fn CDisplayTemplateMgr::fillTemplate( const TQString& name, const TQString& title, const TQString& content )
*/
const QString CDisplayTemplateMgr::fillTemplate( const QString& name, const QString& content, Settings& settings ) {
const QString templateName = m_templateMap.contains(name) ? name : defaultTemplate();
const TQString CDisplayTemplateMgr::fillTemplate( const TQString& name, const TQString& content, Settings& settings ) {
const TQString templateName = m_templateMap.contains(name) ? name : defaultTemplate();
QString displayTypeString;
TQString displayTypeString;
if (!settings.pageCSS_ID.isEmpty()) {
displayTypeString = settings.pageCSS_ID;
@ -77,18 +77,18 @@ const QString CDisplayTemplateMgr::fillTemplate( const QString& name, const QStr
};
}
QString newContent = content;
TQString newContent = content;
const int moduleCount = settings.modules.count();
if (moduleCount >= 2) {
//create header for the modules
QString header;
TQString header;
ListCSwordModuleInfo::iterator end_it = settings.modules.end();
for (ListCSwordModuleInfo::iterator it(settings.modules.begin()); it != end_it; ++it) {
header.append("<th style=\"width:")
.append(QString::number(int( 100.0 / (float)moduleCount )))
.append(TQString::number(int( 100.0 / (float)moduleCount )))
.append("%;\">")
.append((*it)->name())
.append("</th>");
@ -101,7 +101,7 @@ const QString CDisplayTemplateMgr::fillTemplate( const QString& name, const QStr
.append("</table>");
}
QString langCSS;
TQString langCSS;
CLanguageMgr::LangMap langMap = CPointers::languageMgr()->availableLanguages();
for ( CLanguageMgr::LangMapIterator it( langMap ); it.current(); ++it ) {
@ -110,18 +110,18 @@ const QString CDisplayTemplateMgr::fillTemplate( const QString& name, const QStr
//if (lang->isValid() && CBTConfig::get(lang).first) {
if (!lang->abbrev().isEmpty() && CBTConfig::get(lang).first) {
const QFont f = CBTConfig::get(lang).second;
const TQFont f = CBTConfig::get(lang).second;
//don't use important, because it would reset the title formatting, etc. to the setup font
QString css("{ ");
TQString css("{ ");
css.append("font-family:").append(f.family())/*.append(" !important")*/;
css.append("; font-size:").append(QString::number(f.pointSize())).append("pt /*!important*/");
css.append("; font-size:").append(TQString::number(f.pointSize())).append("pt /*!important*/");
css.append("; font-weight:").append(f.bold() ? "bold" : "normal /*!important*/");
css.append("; font-style:").append(f.italic() ? "italic" : "normal /*!important*/");
css.append("; }\n");
langCSS +=
QString("\n*[lang=%1] %2")
TQString("\n*[lang=%1] %2")
.arg(lang->abbrev())
.arg(css);
}
@ -133,9 +133,9 @@ const QString CDisplayTemplateMgr::fillTemplate( const QString& name, const QStr
const CLanguageMgr::Language* lang = it.current();
if (lang && !lang->abbrev().isEmpty()/*&& lang->isValid()*/) {
const QFont standardFont = CBTConfig::getDefault(lang); //we just need a dummy lang param
const TQFont standardFont = CBTConfig::getDefault(lang); //we just need a dummy lang param
langCSS.prepend(
QString("\n#content {font-family:%1; font-size:%2pt; font-weight:%3; font-style: %4;}\n")
TQString("\n#content {font-family:%1; font-size:%2pt; font-weight:%3; font-style: %4;}\n")
.arg(standardFont.family())
.arg(standardFont.pointSize())
.arg(standardFont.bold() ? "bold" : "normal")
@ -144,9 +144,9 @@ const QString CDisplayTemplateMgr::fillTemplate( const QString& name, const QStr
}
// qWarning("Outputing unformated text");
const QString t = QString(m_templateMap[ templateName ]) //don't change the map's content directly, use a copy
const TQString t = TQString(m_templateMap[ templateName ]) //don't change the map's content directly, use a copy
.replace("#TITLE#", settings.title)
.replace("#LANG_ABBREV#", settings.langAbbrev.isEmpty() ? QString("en") : settings.langAbbrev)
.replace("#LANG_ABBREV#", settings.langAbbrev.isEmpty() ? TQString("en") : settings.langAbbrev)
.replace("#DISPLAYTYPE#", displayTypeString)
.replace("#LANG_CSS#", langCSS)
.replace("#PAGE_DIRECTION#", settings.pageDirection)
@ -154,9 +154,9 @@ const QString CDisplayTemplateMgr::fillTemplate( const QString& name, const QStr
//printf("%s\n\n", t.latin1());
return t;
/* QString(m_templateMap[ templateName ]) //don't change the map's content directly, use a copy
/* TQString(m_templateMap[ templateName ]) //don't change the map's content directly, use a copy
.replace("#TITLE#", settings.title)
.replace("#LANG_ABBREV#", settings.langAbbrev.isEmpty() ? QString("en") : settings.langAbbrev)
.replace("#LANG_ABBREV#", settings.langAbbrev.isEmpty() ? TQString("en") : settings.langAbbrev)
.replace("#DISPLAYTYPE#", displayTypeString)
.replace("#LANG_CSS#", langCSS)
.replace("#PAGE_DIRECTION#", settings.pageDirection)
@ -169,19 +169,19 @@ const QString CDisplayTemplateMgr::fillTemplate( const QString& name, const QStr
*/
void CDisplayTemplateMgr::loadUserTemplates() {
qDebug("Loading user templates");
QStringList files = KGlobal::dirs()->findAllResources("BT_DisplayTemplates");
TQStringList files = KGlobal::dirs()->findAllResources("BT_DisplayTemplates");
for ( QStringList::iterator it( files.begin() ); it != files.end(); ++it) {
for ( TQStringList::iterator it( files.begin() ); it != files.end(); ++it) {
qDebug("Found user template %s", (*it).latin1());
QFile f( *it );
TQFile f( *it );
Q_ASSERT( f.exists() );
if (f.open( IO_ReadOnly )) {
QString fileContent = QTextStream( &f ).read();
TQString fileContent = TQTextStream( &f ).read();
if (!fileContent.isEmpty()) {
m_templateMap[ QFileInfo(*it).fileName() + QString(" ") + i18n("(user template)")] = fileContent;
m_templateMap[ TQFileInfo(*it).fileName() + TQString(" ") + i18n("(user template)")] = fileContent;
}
}
}

34
bibletime/backend/cdisplaytemplatemgr.h

@ -16,9 +16,9 @@
#include "cswordmoduleinfo.h"
//Qt includes
#include <qmap.h>
#include <qstring.h>
#include <qstringlist.h>
#include <tqmap.h>
#include <tqstring.h>
#include <tqstringlist.h>
//KDE includes
#include <klocale.h>
@ -38,34 +38,34 @@ public:
/** Constructor. Constructs the new settings object. The default values are empty.
*/
Settings() {
title = QString::null;
langAbbrev = QString::null;
pageCSS_ID = QString::null;
pageDirection = QString("ltr");
title = TQString::null;
langAbbrev = TQString::null;
pageCSS_ID = TQString::null;
pageDirection = TQString("ltr");
};
ListCSwordModuleInfo modules; /**< the list of modules */
QString title; /**< the title which is used for the new processed HTML page */
QString langAbbrev; /**< the language for the HTML page. */
QString pageDirection; /**< the language for the HTML page. */
QString pageCSS_ID; /**< the CSS ID which is used in the content part of the page */
TQString title; /**< the title which is used for the new processed HTML page */
TQString langAbbrev; /**< the language for the HTML page. */
TQString pageDirection; /**< the language for the HTML page. */
TQString pageCSS_ID; /**< the CSS ID which is used in the content part of the page */
};
/** Available templates.
* @return The list of templates, which are available.
*/
inline const QStringList availableTemplates();
inline const TQStringList availableTemplates();
/** Fill template. Fill rendered content into the template given by the name.
* @param name The name of the template
* @param content The content which should be filled into the template
* @param settings The settings which are used to process the templating process
* @return The full HTML template HTML code including the CSS data.
*/
const QString fillTemplate( const QString& name, const QString& content, Settings& settings);
const TQString fillTemplate( const TQString& name, const TQString& content, Settings& settings);
/** Default template.
* @return The i18n'ed name of the default template
*/
inline static const QString defaultTemplate();
inline static const TQString defaultTemplate();
protected:
@ -81,17 +81,17 @@ protected:
private:
void init();
QMap<QString, QString> m_templateMap;
TQMap<TQString, TQString> m_templateMap;
};
inline const QString CDisplayTemplateMgr::defaultTemplate() {
inline const TQString CDisplayTemplateMgr::defaultTemplate() {
return i18n("Default");
}
/**
* CDisplayTemplateMgr::availableTemplates()
*/
inline const QStringList CDisplayTemplateMgr::availableTemplates() {
inline const TQStringList CDisplayTemplateMgr::availableTemplates() {
return m_templateMap.keys();
}

8
bibletime/backend/centrydisplay.cpp

@ -24,21 +24,21 @@
#include "util/scoped_resource.h"
//Qt includes
#include <qapplication.h>
#include <qregexp.h>
#include <tqapplication.h>
#include <tqregexp.h>
using namespace Rendering;
/** Returns the rendered text using the modules in the list and using the key parameter.
* The displayoptions and filter options are used, too.
*/
const QString CEntryDisplay::text( const ListCSwordModuleInfo& modules, const QString& keyName, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions ) {
const TQString CEntryDisplay::text( const ListCSwordModuleInfo& modules, const TQString& keyName, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions ) {
CDisplayRendering render(displayOptions, filterOptions);
//no highlighted key and no extra key link in the text
CTextRendering::KeyTreeItem::Settings normal_settings(false, CTextRendering::KeyTreeItem::Settings::CompleteShort);
CSwordModuleInfo* module = modules.first();
QString result;
TQString result;
//in Bibles and Commentaries we need to check if 0:0 and X:0 contain something
if (module->type() == CSwordModuleInfo::Bible || module->type() == CSwordModuleInfo::Commentary) {

4
bibletime/backend/centrydisplay.h

@ -23,7 +23,7 @@
#include <swdisp.h>
//Qt includes
#include <qstring.h>
#include <tqstring.h>
class CSwordModuleInfo;
@ -44,7 +44,7 @@ public:
* Returns the rendered text using the modules in the list and using the key parameter.
* The displayoptions and filter options are used, too.
*/
virtual const QString text( const ListCSwordModuleInfo& modules, const QString& key, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions);
virtual const TQString text( const ListCSwordModuleInfo& modules, const TQString& key, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions);
};

32
bibletime/backend/chtmlexportrendering.cpp

@ -35,11 +35,11 @@ namespace Rendering {
CHTMLExportRendering::~CHTMLExportRendering() {}
const QString CHTMLExportRendering::renderEntry( const KeyTreeItem& i, CSwordKey* k) {
const TQString CHTMLExportRendering::renderEntry( const KeyTreeItem& i, CSwordKey* k) {
// qDebug("CHTMLExportRendering::renderEntry");
if (i.hasAlternativeContent()) {
QString ret;
TQString ret;
ret.setLatin1(i.settings().highlight ? "<div class=\"currententry\">" : "<div class=\"entry\">");
ret.append(i.getAlternativeContent());
@ -51,7 +51,7 @@ namespace Rendering {
const ListCSwordModuleInfo& modules( tree->collectModules() );
if (modules.count() == 1) { //insert the direction into the sorrounding div
ret.insert( 5, QString("dir=\"%1\" ").arg((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl" ));
ret.insert( 5, TQString("dir=\"%1\" ").arg((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl" ));
}
for ( KeyTreeItem* c = tree->first(); c; c = tree->next() ) {
@ -80,26 +80,26 @@ namespace Rendering {
myVK->Headings(1);
}
QString renderedText( (modules.count() > 1) ? "<tr>" : "" );
TQString renderedText( (modules.count() > 1) ? "<tr>" : "" );
if (modules.count() == 0) {
return QString(""); //no module present for rendering
return TQString(""); //no module present for rendering
}
// Only insert the table stuff if we are displaying parallel.
// Otherwise, strip out he table stuff -> the whole chapter will be rendered in one cell!
//declarations out of the loop for optimization
QString entry;
TQString entry;
QString keyText;
TQString keyText;
bool isRTL;
//taken out of the loop for optimization
QString preverseHeading;
TQString preverseHeading;
QString langAttr;
TQString langAttr;
ListCSwordModuleInfo::const_iterator end_modItr = modules.end();
@ -109,7 +109,7 @@ namespace Rendering {
keyText = key->key();
isRTL = ((*mod_Itr)->textDirection() == CSwordModuleInfo::RightToLeft);
entry = QString::null;
entry = TQString::null;
if ((*mod_Itr)->language()->isValid()) {
langAttr.setLatin1("xml:lang=\"")
@ -126,7 +126,7 @@ namespace Rendering {
.append("\"");
}
const QString key_renderedText = key->renderedText();
const TQString key_renderedText = key->renderedText();
// qWarning(key_renderedText.latin1());
@ -137,7 +137,7 @@ namespace Rendering {
(*mod_Itr)->module()->getEntryAttributes()["Heading"]["Preverse"].end();
for (; it != end; ++it) {
preverseHeading = QString::fromUtf8(it->second.c_str());
preverseHeading = TQString::fromUtf8(it->second.c_str());
//TODO: Take care of the heading type!
@ -163,7 +163,7 @@ namespace Rendering {
entry.append("<span class=\"entryname\" dir=\"ltr\">").append(entryLink(i, *mod_Itr)).append("</span>");
if (m_settings.addText) {
//entry.append( QString::fromLatin1("<span %1>%2</span>").arg(langAttr).arg(key_renderedText) );
//entry.append( TQString::fromLatin1("<span %1>%2</span>").arg(langAttr).arg(key_renderedText) );
entry.append( key_renderedText );
}
@ -206,7 +206,7 @@ namespace Rendering {
CPointers::backend()->setFilterOptions( m_filterOptions );
}
const QString CHTMLExportRendering::finishText( const QString& text, KeyTree& tree ) {
const TQString CHTMLExportRendering::finishText( const TQString& text, KeyTree& tree ) {
ListCSwordModuleInfo modules = tree.collectModules();
const CLanguageMgr::Language* const lang = modules.first()->language();
@ -219,7 +219,7 @@ namespace Rendering {
: "unknown";
settings.pageDirection = (modules.count() == 1)
? ((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl")
: QString::null;
: TQString::null;
return tMgr->fillTemplate(i18n("Export"), text, settings);
}
@ -227,7 +227,7 @@ namespace Rendering {
/*!
\fn CHTMLExportRendering::entryLink( KeyTreeItem& item )
*/
const QString CHTMLExportRendering::entryLink( const KeyTreeItem& item, CSwordModuleInfo* ) {
const TQString CHTMLExportRendering::entryLink( const KeyTreeItem& item, CSwordModuleInfo* ) {
return item.key();
}

6
bibletime/backend/chtmlexportrendering.h

@ -45,9 +45,9 @@ public:
virtual ~CHTMLExportRendering();
protected:
virtual const QString renderEntry( const KeyTreeItem&, CSwordKey* = 0 );
virtual const QString finishText( const QString&, KeyTree& tree );
virtual const QString entryLink( const KeyTreeItem& item, CSwordModuleInfo* module );
virtual const TQString renderEntry( const KeyTreeItem&, CSwordKey* = 0 );
virtual const TQString finishText( const TQString&, KeyTree& tree );
virtual const TQString entryLink( const KeyTreeItem& item, CSwordModuleInfo* module );
virtual void initRendering();
CSwordBackend::DisplayOptions m_displayOptions;

26
bibletime/backend/clanguagemgr.cpp

@ -18,7 +18,7 @@
//Qt includes
#include <qptrlist.h>
#include <tqptrlist.h>
//KDE includes
#include <klocale.h>
@ -28,9 +28,9 @@ CLanguageMgr::LanguageList CLanguageMgr::m_langList;
CLanguageMgr::LanguageList CLanguageMgr::m_cleanupLangPtrs;
CLanguageMgr::Language::Language() : m_altAbbrevs(0) {
m_abbrev = QString::null;
m_englishName = QString::null;
m_translatedName = QString::null;
m_abbrev = TQString::null;
m_englishName = TQString::null;
m_translatedName = TQString::null;
};
CLanguageMgr::Language::Language(const Language& l) {
@ -39,7 +39,7 @@ CLanguageMgr::Language::Language(const Language& l) {
m_translatedName = l.m_translatedName;
if (l.m_altAbbrevs) { //copy alternative abbrevs in a new list
m_altAbbrevs = new QStringList(*l.m_altAbbrevs);
m_altAbbrevs = new TQStringList(*l.m_altAbbrevs);
//*m_altAbbrevs = *l.m_altAbbrevs;
}
else {
@ -47,13 +47,13 @@ CLanguageMgr::Language::Language(const Language& l) {
}
}
CLanguageMgr::Language::Language( const QString& abbrev, const QString& name, const QString& translatedName, const QStringList& altAbbrevs ) : m_altAbbrevs(0) {
CLanguageMgr::Language::Language( const TQString& abbrev, const TQString& name, const TQString& translatedName, const TQStringList& altAbbrevs ) : m_altAbbrevs(0) {
m_abbrev = abbrev;
m_englishName = name;
m_translatedName = translatedName;
if (altAbbrevs.count() > 0) {
m_altAbbrevs = new QStringList();
m_altAbbrevs = new TQStringList();
*m_altAbbrevs = altAbbrevs;
}
};
@ -88,7 +88,7 @@ const CLanguageMgr::LangMap& CLanguageMgr::availableLanguages() {
m_availableModulesCache.moduleCount = mods.count();
//collect the languages abbrevs of all modules
QStrList abbrevs;
TQStrList abbrevs;
char *abbrev;
ListCSwordModuleInfo::iterator end_it = mods.end();
@ -121,7 +121,7 @@ const CLanguageMgr::LangMap& CLanguageMgr::availableLanguages() {
return m_availableModulesCache.availableLanguages;
};
const CLanguageMgr::Language* const CLanguageMgr::languageForAbbrev( const QString& abbrev ) const {
const CLanguageMgr::Language* const CLanguageMgr::languageForAbbrev( const TQString& abbrev ) const {
Language* lang = m_langMap.find(abbrev);
if (lang) {