Browse Source

TQt4 port Bibletime

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/bibletime@1232459 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 8 years ago
parent
commit
b6027ae3f7
100 changed files with 831 additions and 879 deletions
  1. 5
    5
      bibletime/backend/bt_gbfhtml.cpp
  2. 7
    7
      bibletime/backend/bt_osishtml.cpp
  3. 1
    1
      bibletime/backend/bt_plainhtml.cpp
  4. 9
    9
      bibletime/backend/bt_thmlhtml.cpp
  5. 2
    2
      bibletime/backend/btstringmgr.h
  6. 2
    2
      bibletime/backend/cbookdisplay.cpp
  7. 9
    9
      bibletime/backend/cdisplayrendering.cpp
  8. 20
    20
      bibletime/backend/cdisplaytemplatemgr.cpp
  9. 4
    4
      bibletime/backend/cdisplaytemplatemgr.h
  10. 1
    1
      bibletime/backend/centrydisplay.cpp
  11. 1
    1
      bibletime/backend/centrydisplay.h
  12. 4
    4
      bibletime/backend/chtmlexportrendering.cpp
  13. 7
    7
      bibletime/backend/clanguagemgr.cpp
  14. 1
    1
      bibletime/backend/clanguagemgr.h
  15. 17
    17
      bibletime/backend/creferencemanager.cpp
  16. 1
    1
      bibletime/backend/creferencemanager.h
  17. 9
    9
      bibletime/backend/cswordbackend.cpp
  18. 2
    2
      bibletime/backend/cswordbackend.h
  19. 3
    3
      bibletime/backend/cswordbiblemoduleinfo.cpp
  20. 1
    1
      bibletime/backend/cswordbiblemoduleinfo.h
  21. 1
    1
      bibletime/backend/cswordbookmoduleinfo.h
  22. 15
    15
      bibletime/backend/cswordkey.cpp
  23. 1
    1
      bibletime/backend/cswordkey.h
  24. 1
    1
      bibletime/backend/cswordldkey.cpp
  25. 4
    4
      bibletime/backend/cswordldkey.h
  26. 6
    6
      bibletime/backend/cswordlexiconmoduleinfo.cpp
  27. 1
    1
      bibletime/backend/cswordlexiconmoduleinfo.h
  28. 45
    45
      bibletime/backend/cswordmoduleinfo.cpp
  29. 1
    1
      bibletime/backend/cswordmoduleinfo.h
  30. 1
    1
      bibletime/backend/cswordmodulesearch.cpp
  31. 1
    1
      bibletime/backend/cswordmodulesearch.h
  32. 2
    2
      bibletime/backend/cswordtreekey.h
  33. 10
    10
      bibletime/backend/cswordversekey.cpp
  34. 4
    4
      bibletime/backend/cswordversekey.h
  35. 20
    20
      bibletime/backend/ctextrendering.cpp
  36. 1
    1
      bibletime/backend/ctextrendering.h
  37. 3
    3
      bibletime/bibletime.cpp
  38. 2
    1
      bibletime/bibletime.h
  39. 2
    2
      bibletime/bibletime_dcop.cpp
  40. 31
    31
      bibletime/bibletime_init.cpp
  41. 7
    15
      bibletime/bibletime_slots.cpp
  42. 1
    1
      bibletime/bibletimeinterface.h
  43. 6
    6
      bibletime/bibletimeinterface_skel.cpp
  44. 9
    9
      bibletime/frontend/btinstallmgr.cpp
  45. 3
    2
      bibletime/frontend/btinstallmgr.h
  46. 18
    18
      bibletime/frontend/cbtconfig.cpp
  47. 1
    1
      bibletime/frontend/cbtconfig.h
  48. 12
    12
      bibletime/frontend/cdragdropmgr.cpp
  49. 3
    3
      bibletime/frontend/cdragdropmgr.h
  50. 11
    11
      bibletime/frontend/cexportmanager.cpp
  51. 2
    2
      bibletime/frontend/cexportmanager.h
  52. 33
    33
      bibletime/frontend/cinfodisplay.cpp
  53. 3
    2
      bibletime/frontend/cinfodisplay.h
  54. 5
    5
      bibletime/frontend/cinputdialog.cpp
  55. 3
    2
      bibletime/frontend/cinputdialog.h
  56. 5
    5
      bibletime/frontend/cmanageindiceswidget.cpp
  57. 2
    1
      bibletime/frontend/cmanageindiceswidget.h
  58. 17
    44
      bibletime/frontend/cmdiarea.cpp
  59. 5
    4
      bibletime/frontend/cmdiarea.h
  60. 5
    5
      bibletime/frontend/cmoduleindexdialog.cpp
  61. 2
    1
      bibletime/frontend/cmoduleindexdialog.h
  62. 60
    80
      bibletime/frontend/coptionsdialog.cpp
  63. 2
    1
      bibletime/frontend/coptionsdialog.h
  64. 4
    4
      bibletime/frontend/cprinter.cpp
  65. 3
    2
      bibletime/frontend/cprinter.h
  66. 23
    23
      bibletime/frontend/cprofile.cpp
  67. 5
    5
      bibletime/frontend/cprofile.h
  68. 3
    3
      bibletime/frontend/cprofilemgr.cpp
  69. 1
    1
      bibletime/frontend/cprofilemgr.h
  70. 2
    2
      bibletime/frontend/cprofilewindow.cpp
  71. 2
    2
      bibletime/frontend/cprofilewindow.h
  72. 4
    4
      bibletime/frontend/crossrefrendering.cpp
  73. 79
    79
      bibletime/frontend/cswordsetupdialog.cpp
  74. 2
    1
      bibletime/frontend/cswordsetupdialog.h
  75. 11
    11
      bibletime/frontend/cswordsetupinstallsourcesdialog.cpp
  76. 1
    0
      bibletime/frontend/cswordsetupinstallsourcesdialog.h
  77. 20
    35
      bibletime/frontend/cswordsetupmodulelistview.cpp
  78. 2
    1
      bibletime/frontend/cswordsetupmodulelistview.h
  79. 13
    13
      bibletime/frontend/display/cdisplay.cpp
  80. 8
    7
      bibletime/frontend/display/cdisplay.h
  81. 27
    27
      bibletime/frontend/display/chtmlreaddisplay.cpp
  82. 5
    3
      bibletime/frontend/display/chtmlreaddisplay.h
  83. 27
    27
      bibletime/frontend/display/chtmlwritedisplay.cpp
  84. 4
    3
      bibletime/frontend/display/chtmlwritedisplay.h
  85. 8
    8
      bibletime/frontend/display/cplainwritedisplay.cpp
  86. 2
    2
      bibletime/frontend/display/cplainwritedisplay.h
  87. 4
    4
      bibletime/frontend/display/creaddisplay.cpp
  88. 1
    1
      bibletime/frontend/display/cwritedisplay.cpp
  89. 26
    26
      bibletime/frontend/displaywindow/cbiblereadwindow.cpp
  90. 3
    2
      bibletime/frontend/displaywindow/cbiblereadwindow.h
  91. 5
    5
      bibletime/frontend/displaywindow/cbookreadwindow.cpp
  92. 2
    1
      bibletime/frontend/displaywindow/cbookreadwindow.h
  93. 8
    8
      bibletime/frontend/displaywindow/cbuttons.cpp
  94. 6
    4
      bibletime/frontend/displaywindow/cbuttons.h
  95. 8
    8
      bibletime/frontend/displaywindow/ccommentaryreadwindow.cpp
  96. 3
    2
      bibletime/frontend/displaywindow/ccommentaryreadwindow.h
  97. 21
    21
      bibletime/frontend/displaywindow/cdisplaywindow.cpp
  98. 6
    5
      bibletime/frontend/displaywindow/cdisplaywindow.h
  99. 9
    9
      bibletime/frontend/displaywindow/chtmlwritewindow.cpp
  100. 0
    0
      bibletime/frontend/displaywindow/chtmlwritewindow.h

+ 5
- 5
bibletime/backend/bt_gbfhtml.cpp View File

@@ -23,7 +23,7 @@
//Sword includes
#include <utilxml.h>

//Qt includes
//TQt includes
#include <tqregexp.h>
#include <tqstring.h>

@@ -153,7 +153,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
bool hasLemmaAttr = false;
bool hasMorphAttr = false;

TQString value = TQString::null;
TQString value = TQString();
int tagAttributeStart = -1;

while (pos != -1) { //work on all strong/lemma tags in this section, should be between 1-3 loops
@@ -166,7 +166,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const

//insert the span
if (!insertedTag) { //we have to insert a new tag end and beginning, i.e. our first loop
e.replace(pos, tag.matchedLength(), "</span>");
e.tqreplace(pos, tag.matchedLength(), "</span>");
pos += 7;

//skip blanks, commas, dots and stuff at the beginning, it doesn't belong to the morph code
@@ -200,7 +200,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
//search the existing attribute start
TQRegExp attrRegExp( isMorph ? "morph=\".+(?=\")" : "lemma=\".+(?=\")" );
attrRegExp.setMinimal(true);
const int foundPos = e.find(attrRegExp, tagAttributeStart);
const int foundPos = e.tqfind(attrRegExp, tagAttributeStart);

if (foundPos != -1) {
e.insert(foundPos + attrRegExp.matchedLength(), TQString("|").append(value));
@@ -239,7 +239,7 @@ char BT_GBFHTML::processText(sword::SWBuf& buf, const sword::SWKey * key, const
}

bool BT_GBFHTML::handleToken(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) {
if (!substituteToken(buf, token)) { //more than a simple replace
if (!substituteToken(buf, token)) { //more than a simple tqreplace
const unsigned int tokenLength = strlen(token);
unsigned long i;
sword::SWBuf value;

+ 7
- 7
bibletime/backend/bt_osishtml.cpp View File

@@ -30,7 +30,7 @@
//KDE includes
#include <klocale.h>

//Qt includes
//TQt includes
#include <tqstring.h>

using sword::SWBuf;
@@ -73,7 +73,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic

XMLTag tag(token);
// qWarning("found %s", token);
const bool osisQToTick = ((!userData->module->getConfigEntry("OSISqToTick")) || (strcmp(userData->module->getConfigEntry("OSISqToTick"), "false")));
const bool osisTQToTick = ((!userData->module->getConfigEntry("OSISqToTick")) || (strcmp(userData->module->getConfigEntry("OSISqToTick"), "false")));

if (!tag.getName()) {
return false;
@@ -354,7 +354,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
Q_ASSERT(mod);

//if the osisRef like "GerLut:key" contains a module, use that
int pos = ref.find(":");
int pos = ref.tqfind(":");

if ((pos >= 0) && ref.at(pos-1).isLetter() && ref.at(pos+1).isLetter()) {
TQString newModuleName = ref.left(pos);
@@ -377,7 +377,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
mod->name(),
CReferenceManager::parseVerseReference(hrefRef, options),
CReferenceManager::typeFromModule(mod->type())
).utf8()
).utf8().data()
);
buf.append("\" crossrefs=\"");
buf.append((const char*)CReferenceManager::parseVerseReference(ref, options).utf8()); //ref must contain the osisRef module marker if there was any
@@ -522,7 +522,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
myUserData->quote.who = who;

if(osisQToTick) //alternate " and '
if(osisTQToTick) //alternate " and '
buf.append((level % 2) ? '\"' : '\'');

if (who == "Jesus") {
@@ -534,7 +534,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
buf.append("</span>");
}

if (osisQToTick) { //alternate " and '
if (osisTQToTick) { //alternate " and '
buf.append((level % 2) ? '\"' : '\'');
}

@@ -599,7 +599,7 @@ bool BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
else { // seg end tag
buf.append("</span>");
}
//qWarning(TQString("handled <seg> token. result: %1").arg(buf.c_str()).latin1());
//qWarning(TQString("handled <seg> token. result: %1").tqarg(buf.c_str()).latin1());
}
//divine name, don't use simple tag replacing because it may have attributes

+ 1
- 1
bibletime/backend/bt_plainhtml.cpp View File

@@ -23,7 +23,7 @@
//Sword includes
#include <utilxml.h>

//Qt includes
//TQt includes
#include <tqregexp.h>
#include <tqstring.h>


+ 9
- 9
bibletime/backend/bt_thmlhtml.cpp View File

@@ -28,7 +28,7 @@
#include <utilxml.h>
#include "versekey.h"

//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqregexp.h>

@@ -107,8 +107,8 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
while (pos != -1) {
bool isMorph = false;
bool isStrongs = false;
value = TQString::null;
valueClass = TQString::null;
value = TQString();
valueClass = TQString();

// check 3 attribute/value pairs

@@ -140,7 +140,7 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const

//insert the span
if (!insertedTag) {
e.replace(pos, tag.matchedLength(), "</span>");
e.tqreplace(pos, tag.matchedLength(), "</span>");
pos += 7;

TQString rep;
@@ -166,7 +166,7 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
//search the existing attribute start
TQRegExp attrRegExp( isMorph ? "morph=\".+(?=\")" : "lemma=\".+(?=\")" );
attrRegExp.setMinimal(true);
const int foundAttrPos = e.find(attrRegExp, pos);
const int foundAttrPos = e.tqfind(attrRegExp, pos);

if (foundAttrPos != -1) {
e.insert(foundAttrPos + attrRegExp.matchedLength(), TQString("|").append(value));
@@ -177,7 +177,7 @@ char BT_ThMLHTML::processText(sword::SWBuf& buf, const sword::SWKey* key, const
}
}
else { //attribute was not yet inserted
const int attrPos = e.find(TQRegExp("morph=|lemma="), 0);
const int attrPos = e.tqfind(TQRegExp("morph=|lemma="), 0);

if (attrPos >= 0) {
TQString 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( TQString::fromLatin1(abbrev) );
//const CLanguageMgr::Language* const language = CPointers::languageMgr()->languageForAbbrev( TQString::tqfromLatin1(abbrev) );

buf.append("<span class=\"foreign\" lang=\"");
buf.append(abbrev);
@@ -299,7 +299,7 @@ bool BT_ThMLHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
mod->name(),
completeRef,
CReferenceManager::typeFromModule(mod->type())
).utf8()
).utf8().data()
);

buf.append("\" crossrefs=\"");
@@ -344,7 +344,7 @@ bool BT_ThMLHTML::handleToken(sword::SWBuf &buf, const char *token, sword::Basic
mod->name(),
completeRef,
CReferenceManager::typeFromModule(mod->type())
).utf8()
).utf8().data()
);
buf.append("\" crossrefs=\"");
buf.append((const char*)completeRef.utf8());

+ 2
- 2
bibletime/backend/btstringmgr.h View File

@@ -15,7 +15,7 @@
//Sword includes
#include <stringmgr.h>

//Qt includes
//TQt includes
#include <tqstring.h>

using namespace sword;
@@ -40,7 +40,7 @@ public:
protected:
/** Enable Unicode support.
* Reimplementation to show unicode support.
* Reimplementation to show tqunicode support.
*/
virtual bool supportsUnicode() const;


+ 2
- 2
bibletime/backend/cbookdisplay.cpp View File

@@ -57,13 +57,13 @@ namespace Rendering {

/**
* Check whether displaying displayLevel levels together is possible.
* For this count the childs and parents
* For this count the childs and tqparents
* of the required position
*/

int possibleLevels = 1; //we start with the default value of displayLevel, which means no entries together

while( key->parent() && (key->key() != "/") && !key->key().isEmpty() ) {//add parents
while( key->parent() && (key->key() != "/") && !key->key().isEmpty() ) {//add tqparents
++possibleLevels;
};


+ 9
- 9
bibletime/backend/cdisplayrendering.cpp View File

@@ -18,7 +18,7 @@
#include "cswordkey.h"
#include "cswordversekey.h"

//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqregexp.h>

@@ -39,13 +39,13 @@ namespace Rendering {
}

if (isBible && (vk.Verse() == 0)) {
return TQString::null; //Warning: return already here
return TQString(); //Warning: return already here
}

switch (item.settings().keyRenderingFace) {

case KeyTreeItem::Settings::NoKey: {
linkText = TQString::null;
linkText = TQString();
break; //no key is valid for all modules
}

@@ -94,7 +94,7 @@ namespace Rendering {
.append("\">").append(linkText).append("</a>\n");
}

return TQString::null;
return TQString();
}

const TQString CDisplayRendering::keyToHTMLAnchor(const TQString& key) {
@@ -117,7 +117,7 @@ namespace Rendering {
TQString text = oldText;

TQRegExp re("(\\b)(?=\\w)"); //word begin marker
int pos = text.find(re, 0);
int pos = text.tqfind(re, 0);

while (pos != -1) { //word begin found
//qWarning("found word at %i in %i", pos, text.length());
@@ -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(TQRegExp("\\b|[,.:]"), pos+1);
endPos = text.tqfind(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\">");
@@ -134,7 +134,7 @@ namespace Rendering {
endPos += 26;
}
}
pos = text.find(re, endPos);
pos = text.tqfind(re, endPos);
}
*/
const CLanguageMgr::Language* const lang =
@@ -150,10 +150,10 @@ namespace Rendering {
settings.modules = modules;
settings.langAbbrev = ((modules.count() == 1) && lang->isValid())
? lang->abbrev()
: TQString::null;
: TQString();
settings.pageDirection = (modules.count() == 1)
? ((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl")
: TQString::null;
: TQString();

return tMgr->fillTemplate(CBTConfig::get
(CBTConfig::displayStyle), oldText, settings);

+ 20
- 20
bibletime/backend/cdisplaytemplatemgr.cpp View File

@@ -21,7 +21,7 @@

#include "config.h"

//Qt includes
//TQt includes
#include <tqstringlist.h>
#include <tqfile.h>
#include <tqfileinfo.h>
@@ -44,7 +44,7 @@ CDisplayTemplateMgr::~CDisplayTemplateMgr() {}
\fn CDisplayTemplateMgr::fillTemplate( const TQString& name, const TQString& title, const TQString& content )
*/
const TQString CDisplayTemplateMgr::fillTemplate( const TQString& name, const TQString& content, Settings& settings ) {
const TQString templateName = m_templateMap.contains(name) ? name : defaultTemplate();
const TQString templateName = m_templateMap.tqcontains(name) ? name : defaultTemplate();

TQString displayTypeString;

@@ -122,8 +122,8 @@ const TQString CDisplayTemplateMgr::fillTemplate( const TQString& name, const TQ

langCSS +=
TQString("\n*[lang=%1] %2")
.arg(lang->abbrev())
.arg(css);
.tqarg(lang->abbrev())
.tqarg(css);
}
}

@@ -136,31 +136,31 @@ const TQString CDisplayTemplateMgr::fillTemplate( const TQString& name, const TQ
const TQFont standardFont = CBTConfig::getDefault(lang); //we just need a dummy lang param
langCSS.prepend(
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")
.arg(standardFont.italic() ? "italic" : "normal")
.tqarg(standardFont.family())
.tqarg(standardFont.pointSize())
.tqarg(standardFont.bold() ? "bold" : "normal")
.tqarg(standardFont.italic() ? "italic" : "normal")
);
}

// qWarning("Outputing unformated text");
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() ? TQString("en") : settings.langAbbrev)
.replace("#DISPLAYTYPE#", displayTypeString)
.replace("#LANG_CSS#", langCSS)
.replace("#PAGE_DIRECTION#", settings.pageDirection)
.replace("#CONTENT#", newContent);
.tqreplace("#TITLE#", settings.title)
.tqreplace("#LANG_ABBREV#", settings.langAbbrev.isEmpty() ? TQString("en") : settings.langAbbrev)
.tqreplace("#DISPLAYTYPE#", displayTypeString)
.tqreplace("#LANG_CSS#", langCSS)
.tqreplace("#PAGE_DIRECTION#", settings.pageDirection)
.tqreplace("#CONTENT#", newContent);
//printf("%s\n\n", t.latin1());

return 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() ? TQString("en") : settings.langAbbrev)
.replace("#DISPLAYTYPE#", displayTypeString)
.replace("#LANG_CSS#", langCSS)
.replace("#PAGE_DIRECTION#", settings.pageDirection)
.replace("#CONTENT#", newContent);*/
.tqreplace("#TITLE#", settings.title)
.tqreplace("#LANG_ABBREV#", settings.langAbbrev.isEmpty() ? TQString("en") : settings.langAbbrev)
.tqreplace("#DISPLAYTYPE#", displayTypeString)
.tqreplace("#LANG_CSS#", langCSS)
.tqreplace("#PAGE_DIRECTION#", settings.pageDirection)
.tqreplace("#CONTENT#", newContent);*/
}



+ 4
- 4
bibletime/backend/cdisplaytemplatemgr.h View File

@@ -15,7 +15,7 @@
//BibleTime include
#include "cswordmoduleinfo.h"

//Qt includes
//TQt includes
#include <tqmap.h>
#include <tqstring.h>
#include <tqstringlist.h>
@@ -38,9 +38,9 @@ public:
/** Constructor. Constructs the new settings object. The default values are empty.
*/
Settings() {
title = TQString::null;
langAbbrev = TQString::null;
pageCSS_ID = TQString::null;
title = TQString();
langAbbrev = TQString();
pageCSS_ID = TQString();
pageDirection = TQString("ltr");
};


+ 1
- 1
bibletime/backend/centrydisplay.cpp View File

@@ -23,7 +23,7 @@

#include "util/scoped_resource.h"

//Qt includes
//TQt includes
#include <tqapplication.h>
#include <tqregexp.h>


+ 1
- 1
bibletime/backend/centrydisplay.h View File

@@ -22,7 +22,7 @@
//Sword includes
#include <swdisp.h>

//Qt includes
//TQt includes
#include <tqstring.h>

class CSwordModuleInfo;

+ 4
- 4
bibletime/backend/chtmlexportrendering.cpp View File

@@ -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, TQString("dir=\"%1\" ").arg((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl" ));
ret.insert( 5, TQString("dir=\"%1\" ").tqarg((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl" ));
}

for ( KeyTreeItem* c = tree->first(); c; c = tree->next() ) {
@@ -109,7 +109,7 @@ namespace Rendering {

keyText = key->key();
isRTL = ((*mod_Itr)->textDirection() == CSwordModuleInfo::RightToLeft);
entry = TQString::null;
entry = TQString();

if ((*mod_Itr)->language()->isValid()) {
langAttr.setLatin1("xml:lang=\"")
@@ -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( TQString::fromLatin1("<span %1>%2</span>").arg(langAttr).arg(key_renderedText) );
//entry.append( TQString::tqfromLatin1("<span %1>%2</span>").tqarg(langAttr).tqarg(key_renderedText) );
entry.append( key_renderedText );
}

@@ -219,7 +219,7 @@ namespace Rendering {
: "unknown";
settings.pageDirection = (modules.count() == 1)
? ((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl")
: TQString::null;
: TQString();

return tMgr->fillTemplate(i18n("Export"), text, settings);
}

+ 7
- 7
bibletime/backend/clanguagemgr.cpp View File

@@ -17,7 +17,7 @@
#include "util/cpointers.h"


//Qt includes
//TQt includes
#include <tqptrlist.h>

//KDE includes
@@ -28,9 +28,9 @@ CLanguageMgr::LanguageList CLanguageMgr::m_langList;
CLanguageMgr::LanguageList CLanguageMgr::m_cleanupLangPtrs;

CLanguageMgr::Language::Language() : m_altAbbrevs(0) {
m_abbrev = TQString::null;
m_englishName = TQString::null;
m_translatedName = TQString::null;
m_abbrev = TQString();
m_englishName = TQString();
m_translatedName = TQString();
};

CLanguageMgr::Language::Language(const Language& l) {
@@ -97,7 +97,7 @@ const CLanguageMgr::LangMap& CLanguageMgr::availableLanguages() {
// for (CSwordModuleInfo* m = mods.first(); m; m = mods.next()) {
abbrev = (*it)->module()->Lang();

if (abbrev && !abbrevs.contains(abbrev)) {
if (abbrev && !abbrevs.tqcontains(abbrev)) {
abbrevs.append( abbrev );
}
};
@@ -122,7 +122,7 @@ const CLanguageMgr::LangMap& CLanguageMgr::availableLanguages() {
};

const CLanguageMgr::Language* const CLanguageMgr::languageForAbbrev( const TQString& abbrev ) const {
Language* lang = m_langMap.find(abbrev);
Language* lang = m_langMap.tqfind(abbrev);

if (lang) {
return lang;
@@ -131,7 +131,7 @@ const CLanguageMgr::Language* const CLanguageMgr::languageForAbbrev( const TQStr
//try to search in the alternative abbrevs
//const LangMapIterator end = m_langMap.constEnd();
for ( LangMapIterator it( m_langMap ); it.current(); ++it ) {
if (it.current()->alternativeAbbrevs() && it.current()->alternativeAbbrevs()->contains(abbrev)) {
if (it.current()->alternativeAbbrevs() && it.current()->alternativeAbbrevs()->tqcontains(abbrev)) {
return it.current();
}
}

+ 1
- 1
bibletime/backend/clanguagemgr.h View File

@@ -12,7 +12,7 @@
#ifndef CLANGUAGEMGR_H
#define CLANGUAGEMGR_H

//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqvaluelist.h>

+ 17
- 17
bibletime/backend/creferencemanager.cpp View File

@@ -22,7 +22,7 @@

/** Returns a hyperlink used to be imbedded in the display windows. At the moment the format is sword://module/key */
const TQString CReferenceManager::encodeHyperlink( const TQString moduleName, const TQString key, const CReferenceManager::Type type) {
TQString ret = TQString::null;
TQString ret = TQString();

switch (type) {

@@ -70,8 +70,8 @@ const TQString CReferenceManager::encodeHyperlink( const TQString moduleName, co
}

if (type == GenericBook) {
const TQString s = (!key.isEmpty() ? key : TQString::null);
TQString newKey = TQString::null;
const TQString s = (!key.isEmpty() ? key : TQString());
TQString newKey = TQString();
//replace all / of the key (e.g. of a CSwordTreeKey) with
// the escape sequence \/ so we know it's a link internal divider (e.g. of CSwordTreeKey)!

@@ -124,8 +124,8 @@ const bool CReferenceManager::decodeHyperlink( const TQString& hyperlink, TQStri
/**
* We have to decide between three types of URLS: sword://Type/Module/Key, morph://Testament/key and strongs://Testament/Key
*/
module = TQString::null;
key = TQString::null;
module = TQString();
key = TQString();

type = Unknown; //not yet known
TQString ref = hyperlink;
@@ -159,7 +159,7 @@ const bool CReferenceManager::decodeHyperlink( const TQString& hyperlink, TQStri
if (ref.at(0) != '/' ) { //we have a module given

while (true) {
const int pos = ref.find("/");
const int pos = ref.tqfind("/");

if ((pos>0) && ref.at(pos-1) != '\\') { //found a slash which is not escaped
module = ref.mid(0,pos);
@@ -179,7 +179,7 @@ const bool CReferenceManager::decodeHyperlink( const TQString& hyperlink, TQStri
}

//the key may be an osis key like "NASBLex:Moses", which sets the module, too
// const int modPos = key.find(":");
// const int modPos = key.tqfind(":");
// if (modPos != -1 && key.at(modPos-1).isLetter() && key.at(modPos+1).isLetter()) {
// module = key.left(modPos);
// key = key.mid(modPos+1);
@@ -187,8 +187,8 @@ const bool CReferenceManager::decodeHyperlink( const TQString& hyperlink, TQStri
// qWarning("found the module name %s with key %s", module.latin1(), key.latin1());
// }

//replace \/ escapes with /
key.replace(TQRegExp("\\\\/"), "/");
//tqreplace \/ escapes with /
key.tqreplace(TQRegExp("\\\\/"), "/");
}
else if (ref.left(8).lower() == "morph://" || ref.left(10).lower() == "strongs://") { //strongs or morph URL have the same format
enum PreType {IsMorph, IsStrongs};
@@ -204,7 +204,7 @@ const bool CReferenceManager::decodeHyperlink( const TQString& hyperlink, TQStri
}

//part up to next slash is the language
const int pos = ref.find("/");
const int pos = ref.tqfind("/");

if (pos>0) { //found
const TQString language = ref.mid(0,pos);
@@ -248,12 +248,12 @@ const bool CReferenceManager::decodeHyperlink( const TQString& hyperlink, TQStri
}

const TQString CReferenceManager::encodeReference(const TQString &module, const TQString &reference) {
//return TQString("(%1)%2").arg(module).arg(reference);
//return TQString("(%1)%2").tqarg(module).tqarg(reference);
return TQString("(").append(module).append(")").append(reference);
}

void CReferenceManager::decodeReference(TQString &dragreference, TQString &module, TQString &reference) {
const int pos = dragreference.find(")");
const int pos = dragreference.tqfind(")");
const TQString fallbackModule = dragreference.mid( 1, pos - 1);
dragreference = dragreference.mid(pos+1);

@@ -270,7 +270,7 @@ const bool CReferenceManager::isHyperlink( const TQString& hyperlink ) {

/** Returns the preferred module name for the given type. */
const TQString CReferenceManager::preferredModule( const CReferenceManager::Type type ) {
TQString moduleName = TQString::null;
TQString moduleName = TQString();
CSwordModuleInfo* module = 0;

switch (type) {
@@ -324,7 +324,7 @@ const TQString CReferenceManager::preferredModule( const CReferenceManager::Type
break;
}

return module ? module->name() : TQString::null;
return module ? module->name() : TQString();
}

/** No descriptions */
@@ -361,18 +361,18 @@ const TQString CReferenceManager::parseVerseReference( const TQString& ref, cons

if ((mod->type() != CSwordModuleInfo::Bible) && (mod->type() != CSwordModuleInfo::Commentary)) {
qDebug("CReferenceManager: Only verse based modules are supported as ref destination module");
return TQString::null;
return TQString();
}

TQString sourceLanguage = options.sourceLanguage;
TQString destinationLanguage = options.destinationLanguage;

StringList locales = sword::LocaleMgr::getSystemLocaleMgr()->getAvailableLocales();
if (/*options.sourceLanguage == "en" ||*/ std::find(locales.begin(), locales.end(), sourceLanguage) == locales.end()) { //sourceLanguage not available
if (/*options.sourceLanguage == "en" ||*/ std::find(locales.begin(), locales.end(), sourceLanguage.ascii()) == locales.end()) { //sourceLanguage not available
sourceLanguage = "en_US";
}

if (/*options.destinationLanguage == "en" ||*/ std::find(locales.begin(), locales.end(), sourceLanguage) == locales.end()) { //destination not available
if (/*options.destinationLanguage == "en" ||*/ std::find(locales.begin(), locales.end(), sourceLanguage.ascii()) == locales.end()) { //destination not available
destinationLanguage = "en_US";
}


+ 1
- 1
bibletime/backend/creferencemanager.h View File

@@ -12,7 +12,7 @@
#ifndef CREFERENCEMANAGER_H
#define CREFERENCEMANAGER_H

//Qt includes
//TQt includes
#include <tqstring.h>

#include "cswordmoduleinfo.h"

+ 9
- 9
bibletime/backend/cswordbackend.cpp View File

@@ -32,7 +32,7 @@
#include <unistd.h>
#include <ctype.h>

//Qt includes
//TQt includes
#include <tqdir.h>
#include <tqfileinfo.h>

@@ -329,11 +329,11 @@ CSwordModuleInfo* const CSwordBackend::findModuleByDescription(const TQString& d

/** This function searches for a module with the specified description */
const TQString CSwordBackend::findModuleNameByDescription(const TQString& description) {
if (m_moduleDescriptionMap.contains(description)) {
if (m_moduleDescriptionMap.tqcontains(description)) {
return m_moduleDescriptionMap[description];
}

return TQString::null;
return TQString();
}

/** This function searches for a module with the specified name */
@@ -492,7 +492,7 @@ const TQString CSwordBackend::optionName( const CSwordModuleInfo::FilterTypes op
// return TQString("Transliteration");
}

return TQString::null;
return TQString();
}

/** Returns the translated name of the option given as parameter. */
@@ -538,7 +538,7 @@ const TQString CSwordBackend::translatedOptionName(const CSwordModuleInfo::Filte
// return i18n("Transliteration between scripts");
}

return TQString::null;
return TQString();
}


@@ -582,10 +582,10 @@ const TQString CSwordBackend::configOptionName( const CSwordModuleInfo::FilterTy
return TQString("MorphSegmentation");

default:
return TQString::null;
return TQString();
}

return TQString::null;
return TQString();
}

const TQString CSwordBackend::booknameLanguage( const TQString& language ) {
@@ -634,7 +634,7 @@ const TQStringList CSwordBackend::swordDirList() {
const TQString home = TQString(getenv("HOME"));

//return a list of used Sword dirs. Useful for the installer
TQString configPath = TQString("%1/.sword/sword.conf").arg(home);
TQString configPath = TQString("%1/.sword/sword.conf").tqarg(home);

if (!TQFile(configPath).exists()) {
configPath = globalConfPath; //e.g. /etc/sword.conf, /usr/local/etc/sword.conf
@@ -645,7 +645,7 @@ const TQStringList CSwordBackend::swordDirList() {

TQStringList configs = TQStringList::split(":", configPath);

/*ToDo: Use the const iterator as soon as we switch to Qt > 3.1
/*ToDo: Use the const iterator as soon as we switch to TQt > 3.1
for (TQStringList::const_iterator it = configs.constBegin(); it != configs.constEnd(); ++it) {*/

for (TQStringList::const_iterator it = configs.begin(); it != configs.end(); ++it) {

+ 2
- 2
bibletime/backend/cswordbackend.h View File

@@ -16,7 +16,7 @@
#include "cswordmoduleinfo.h"
//#include "centrydisplay.h"

//Qt includes
//TQt includes
#include <tqptrlist.h>
#include <tqmap.h>
#include <tqstring.h>
@@ -144,7 +144,7 @@ public:
* Sets the language for the international booknames of Sword.
* @param langName The abbreviation string which should be used for the Sword backend
*/
const TQString booknameLanguage( const TQString& langName = TQString::null );
const TQString booknameLanguage( const TQString& langName = TQString() );
/**
* This function searches for a module with the specified description
* @param description The description of the desired module

+ 3
- 3
bibletime/backend/cswordbiblemoduleinfo.cpp View File

@@ -16,7 +16,7 @@

// #include "util/cpointers.h"

//Qt includes
//TQt includes
#include <tqfile.h>

//Sword includes
@@ -227,7 +227,7 @@ const unsigned int CSwordBibleModuleInfo::bookNumber(const TQString &book) {
/** Returns true if his module has the text of desired type of testament */
const bool CSwordBibleModuleInfo::hasTestament( CSwordBibleModuleInfo::Testament type ) {
if (m_hasOT == -1 || m_hasNT == -1) {
const bool oldStatus = module()->getSkipConsecutiveLinks();
const bool oldtqStatus = module()->getSkipConsecutiveLinks();
module()->setSkipConsecutiveLinks(true);

*module() = sword::TOP; //position to first entry
@@ -250,7 +250,7 @@ const bool CSwordBibleModuleInfo::hasTestament( CSwordBibleModuleInfo::Testament
m_hasNT = 1;
}

module()->setSkipConsecutiveLinks(oldStatus);
module()->setSkipConsecutiveLinks(oldtqStatus);
}

switch (type) {

+ 1
- 1
bibletime/backend/cswordbiblemoduleinfo.h View File

@@ -16,7 +16,7 @@
#include "cswordmoduleinfo.h"
#include "cswordversekey.h"

//Qt includes
//TQt includes
#include <tqstringlist.h>

//Sword includes

+ 1
- 1
bibletime/backend/cswordbookmoduleinfo.h View File

@@ -27,7 +27,7 @@ class CSwordBookModuleInfo : public CSwordModuleInfo {
public:
/** Constructor.
* @param module The module which belongs to this object
* @param backend The parent backend for this book module.
* @param backend The tqparent backend for this book module.
*/
CSwordBookModuleInfo( sword::SWModule* module, CSwordBackend* const backend = CPointers::backend() );
/** Copy constructor.

+ 15
- 15
bibletime/backend/cswordkey.cpp View File

@@ -27,7 +27,7 @@
#include <treekey.h>
#include <treekeyidx.h>

//Qt includes
//TQt includes
#include <tqregexp.h>
#include <tqstring.h>
#include <tqtextcodec.h>
@@ -40,7 +40,7 @@ CSwordKey::CSwordKey(const CSwordKey& k) {

const TQString CSwordKey::rawText() {
if (!m_module) {
return TQString::null;
return TQString();
}

if (dynamic_cast<sword::SWKey*>(this)) {
@@ -51,7 +51,7 @@ const TQString CSwordKey::rawText() {
}

if (key().isNull()) {
return TQString::null;
return TQString();
}

// qWarning("rawText: %s", m_module->module()->getRawEntry());
@@ -61,7 +61,7 @@ const TQString CSwordKey::rawText() {
const TQString CSwordKey::renderedText( const CSwordKey::TextRenderType mode ) {
Q_ASSERT(m_module);
if (!m_module) {
return TQString::null;
return TQString();
}

using namespace sword;
@@ -81,13 +81,13 @@ const TQString CSwordKey::renderedText( const CSwordKey::TextRenderType mode ) {
if (m_module->type() == CSwordModuleInfo::Lexicon) {
m_module->snap();
/* In lexicons make sure that our key (e.g. 123) was successfully set to the module,
i.e. the module key contains this key (e.g. 0123 contains 123) */
i.e. the module key contains this key (e.g. 0123 tqcontains 123) */

if ( strcasecmp(m_module->module()->getKey()->getText(), buffer)
&& !strstr(m_module->module()->getKey()->getText(), buffer)
) {
qDebug("return an empty key for %s", m_module->module()->getKey()->getText());
return TQString::null;
return TQString();
}
}
delete buffer;
@@ -108,12 +108,12 @@ const TQString CSwordKey::renderedText( const CSwordKey::TextRenderType mode ) {
TQString number = rx.cap(2);
TQString paddednumber = number.rightJustify(5, '0'); // Form 00123

text.replace(
text.tqreplace(
TQRegExp( TQString(
"(>[^<>]+)" // Avoid replacing inside tags
"\\b(0*%1)\\b").arg(number) ), // And span around 0's
"\\b(0*%1)\\b").tqarg(number) ), // And span around 0's
TQString("\\1<span lemma=\"%1%2\"><a href=\"strongs://%3/%4\">\\2</a></span>")
.arg(langcode, paddednumber, language, paddednumber)
.tqarg(langcode, paddednumber, language, paddednumber)
);
pos += rx.matchedLength();
}
@@ -121,8 +121,8 @@ const TQString CSwordKey::renderedText( const CSwordKey::TextRenderType mode ) {

if (mode == HTMLEscaped) {
//we have to encode all UTF-8 in HTML escapes
// go though every character and write down the escaped HTML unicode entity
// form is &#<decimal unicode value here>;
// go though every character and write down the escaped HTML tqunicode entity
// form is &#<decimal tqunicode value here>;
TQString ret;
TQChar c;
const unsigned int length = text.length();
@@ -133,9 +133,9 @@ const TQString CSwordKey::renderedText( const CSwordKey::TextRenderType mode ) {
if (c.latin1()) { //normal latin1 character
ret.append(c);
}
else {//unicode character, needs to be escaped
else {//tqunicode character, needs to be escaped
ret.append("&#")
.append(c.unicode())
.append(c.tqunicode())
.append(";");
}
}
@@ -147,12 +147,12 @@ const TQString CSwordKey::renderedText( const CSwordKey::TextRenderType mode ) {
}
}

return TQString::null;
return TQString();
}

const TQString CSwordKey::strippedText() {
if (!m_module) {
return TQString::null;
return TQString();
}

if (/*sword::SWKey* k =*/ dynamic_cast<sword::SWKey*>(this)) {

+ 1
- 1
bibletime/backend/cswordkey.h View File

@@ -15,7 +15,7 @@
//Own includes


//Qt includes
//TQt includes
#include <tqstring.h>
//forward declarations


+ 1
- 1
bibletime/backend/cswordldkey.cpp View File

@@ -13,7 +13,7 @@
#include "cswordldkey.h"
#include "cswordlexiconmoduleinfo.h"

//Qt includes
//TQt includes
#include <tqtextcodec.h>

//Sword includes

+ 4
- 4
bibletime/backend/cswordldkey.h View File

@@ -17,7 +17,7 @@
#include "cswordkey.h"
#include "cswordmoduleinfo.h"

//Qt includes
//TQt includes
#include <tqstring.h>

//Sword includes
@@ -36,7 +36,7 @@
* CSwordLDKey ldKey(m_module);
* ldKey.key("Adam");
* ldKey.nextEntry();
* qDebug( TQString("The current key is: %1").arg(ldKey.key()));
* qDebug( TQString("The current key is: %1").tqarg(ldKey.key()));
* @endcode
*
* Please not, that the result will be invalid if use the operator const char*
@@ -83,7 +83,7 @@ public:
*/
virtual CSwordModuleInfo* const module( CSwordModuleInfo* const module = 0 );
/**
* Returns the current key as a QString
* Returns the current key as a TQString
*/
virtual const TQString key() const;
/**
@@ -91,7 +91,7 @@ public:
*/
virtual const bool key( const TQString& newKey );
/**
* Returns the current key as a QString
* Returns the current key as a TQString
*/
virtual const bool key( const char* );
/**

+ 6
- 6
bibletime/backend/cswordlexiconmoduleinfo.cpp View File

@@ -13,7 +13,7 @@
#include "cswordlexiconmoduleinfo.h"
//#include "frontend/cbtconfig.h"

//Qt includes
//TQt includes
#include <tqfile.h>
#include <tqdatastream.h>
#include <tqtextcodec.h>
@@ -57,7 +57,7 @@ TQStringList* const CSwordLexiconModuleInfo::entries() {
}

sword::SWModule* my_module = module();
bool is_unicode = isUnicode();
bool is_tqunicode = isUnicode();

if (!m_entryList) {
m_entryList = new TQStringList();
@@ -103,12 +103,12 @@ TQStringList* const CSwordLexiconModuleInfo::entries() {
int i = 0;

do {
if ( is_unicode ) {
if ( is_tqunicode ) {
m_entryList->append(TQString::fromUtf8(my_module->KeyText()));
// qWarning("Entry: %s", my_module->KeyText() );
}
else { //for latin1 modules use fromLatin1 because of speed
// m_entryList->append(TQString::fromLatin1(my_module->KeyText()));
else { //for latin1 modules use tqfromLatin1 because of speed
// m_entryList->append(TQString::tqfromLatin1(my_module->KeyText()));
TQTextCodec *codec = TQTextCodec::codecForName("CP1252");
m_entryList->append(codec->toUnicode(my_module->KeyText()));
@@ -148,7 +148,7 @@ TQStringList* const CSwordLexiconModuleInfo::entries() {
if (m_entryList->count()) {
//create cache
TQString dir = KGlobal::dirs()->saveLocation("data", "bibletime/cache/");
//TQFile f2( TQString::fromLatin1("%1/%2").arg(dir).arg( name() ) );
//TQFile f2( TQString::tqfromLatin1("%1/%2").tqarg(dir).tqarg( name() ) );
TQFile f2( TQString(dir).append("/").append(name()) );



+ 1
- 1
bibletime/backend/cswordlexiconmoduleinfo.h View File

@@ -15,7 +15,7 @@
//own includes
#include "cswordmoduleinfo.h"

//Qt includes
//TQt includes
#include <tqstringlist.h>

/**

+ 45
- 45
bibletime/backend/cswordmoduleinfo.cpp View File

@@ -26,7 +26,7 @@
#include <dirent.h>
#include <regex.h>

//Qt includes
//TQt includes
#include <tqregexp.h>
#include <tqdir.h>
#include <tqvariant.h>
@@ -66,7 +66,7 @@ CSwordModuleInfo::CSwordModuleInfo(sword::SWModule * module, CSwordBackend * con

m_searchResult.ClearList();
m_backend = usedBackend ? usedBackend : CPointers::backend();
m_dataCache.name = module ? TQString(module->Name()) : TQString::null;
m_dataCache.name = module ? TQString(module->Name()) : TQString();
m_dataCache.isUnicode = module ? module->isUnicode() : false;
m_dataCache.category = UnknownCategory;
m_dataCache.language = 0;
@@ -153,13 +153,13 @@ const bool CSwordModuleInfo::unlockKeyIsValid() {

(*m_module) = sword::TOP;

// This needs to use ::fromLatin1 because if the text is still locked,
// This needs to use ::tqfromLatin1 because if the text is still locked,
// a lot of garbage will show up. It will also work with properly decrypted
// Unicode text, because all non-ASCII Unicode chars consist of bytes >127
// and therefore contain no control (nonprintable) characters, which are all <127.
TQString test = isUnicode()
? TQString::fromUtf8(m_module->getRawEntryBuf().c_str())
: TQString::fromLatin1( m_module->getRawEntryBuf().c_str() );
: TQString::tqfromLatin1( m_module->getRawEntryBuf().c_str() );

if (test.isEmpty()) {
qWarning("Unlock key of module %s is NOT valid", name().latin1());
@@ -283,7 +283,7 @@ void CSwordModuleInfo::buildIndex() {
vk->Headings(1);
}

//holds UTF-8 data and is faster than QString
//holds UTF-8 data and is faster than TQString
TQCString textBuffer;

// we start with the first module entry, key is automatically updated
@@ -496,7 +496,7 @@ const TQString CSwordModuleInfo::config(const CSwordModuleInfo::ConfigEntry entr

case AbsoluteDataPath: {
TQString path( getSimpleConfigEntry("AbsoluteDataPath") );
path.replace(TQRegExp("/./"), "/"); // make /abs/path/./modules/ looking better
path.tqreplace(TQRegExp("/./"), "/"); // make /abs/path/./modules/ looking better
//make sure we have a trailing slash!

if (path.right(1) != "/") {
@@ -510,7 +510,7 @@ const TQString CSwordModuleInfo::config(const CSwordModuleInfo::ConfigEntry entr
TQString path(getSimpleConfigEntry("DataPath"));

if ((type() == CSwordModuleInfo::GenericBook) || (type() == CSwordModuleInfo::Lexicon)) {
int pos = path.findRev("/"); //last slash in the string
int pos = path.tqfindRev("/"); //last slash in the string

if (pos != -1) {
path = path.left(pos + 1); //include the slash
@@ -550,22 +550,22 @@ const TQString CSwordModuleInfo::config(const CSwordModuleInfo::ConfigEntry entr

case GlossaryFrom: {
if (!category() == Glossary) {
return TQString::null;
return TQString();
};

const TQString lang(getSimpleConfigEntry("GlossaryFrom"));

return !lang.isEmpty()? lang : TQString::null;
return !lang.isEmpty()? lang : TQString();
}

case GlossaryTo: {
if (!category() == Glossary) {
return TQString::null;
return TQString();
};

const TQString lang(getSimpleConfigEntry("GlossaryTo"));

return !lang.isEmpty()? lang : TQString::null;
return !lang.isEmpty()? lang : TQString();
}

case Markup: {
@@ -604,7 +604,7 @@ const TQString CSwordModuleInfo::config(const CSwordModuleInfo::ConfigEntry entr
return getSimpleConfigEntry("CopyrightContactEmail");

default:
return TQString::null;
return TQString();
}
}

@@ -635,19 +635,19 @@ const bool CSwordModuleInfo::has(const CSwordModuleInfo::FilterTypes option) con
//BAD workaround to see if the filter is GBF, OSIS or ThML!
const TQString name = backend()->configOptionName(option);

if (m_module->getConfig().has("GlobalOptionFilter", TQString("OSIS").append(name).latin1())) {
if (m_module->getConfig().has("GlobalOptionFilter", TQString(TQString("OSIS").append(name)).latin1())) {
return true;
}

if (m_module->getConfig().has("GlobalOptionFilter", TQString("GBF").append(name).latin1())) {
if (m_module->getConfig().has("GlobalOptionFilter", TQString(TQString("GBF").append(name)).latin1())) {
return true;
}

if (m_module->getConfig().has("GlobalOptionFilter", TQString("ThML").append(name).latin1())) {
if (m_module->getConfig().has("GlobalOptionFilter", TQString(TQString("ThML").append(name)).latin1())) {
return true;
}

if (m_module->getConfig().has("GlobalOptionFilter", TQString("UTF8").append(name).latin1())) {
if (m_module->getConfig().has("GlobalOptionFilter", TQString(TQString("UTF8").append(name)).latin1())) {
return true;
}

@@ -714,40 +714,40 @@ TQString CSwordModuleInfo::aboutText() const {
text += "<font size=\"-1\"><table>";

text += TQString("<tr><td><b>%1</b></td><td>%2</td><tr>")
.arg(i18n("Version"))
.arg(hasVersion()? config(CSwordModuleInfo::ModuleVersion) : i18n("unknown"));
.tqarg(i18n("Version"))
.tqarg(hasVersion()? config(CSwordModuleInfo::ModuleVersion) : i18n("unknown"));

text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(i18n("Markup"))
.arg(!TQString(m_module->getConfigEntry("SourceType")).isEmpty()? m_module->
getConfigEntry("SourceType") : i18n("unknown"));
.tqarg(i18n("Markup"))
.tqarg(!TQString(m_module->getConfigEntry("SourceType")).isEmpty()? m_module->
getConfigEntry("SourceType") : i18n("unknown").ascii());

text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(i18n("Location"))
.arg(config(CSwordModuleInfo::AbsoluteDataPath));
.tqarg(i18n("Location"))
.tqarg(config(CSwordModuleInfo::AbsoluteDataPath));

text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(i18n("Language"))
.arg(language()->translatedName());
.tqarg(i18n("Language"))
.tqarg(language()->translatedName());

if (m_module->getConfigEntry("Category"))
text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(i18n("Category"))
.arg(m_module->getConfigEntry("Category"));
.tqarg(i18n("Category"))
.tqarg(m_module->getConfigEntry("Category"));

if (m_module->getConfigEntry("LCSH"))
text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(i18n("LCSH"))
.arg(m_module->getConfigEntry("LCSH"));
.tqarg(i18n("LCSH"))
.tqarg(m_module->getConfigEntry("LCSH"));

text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(i18n("Writable"))
.arg(isWritable()? i18n("yes") : i18n("no"));
.tqarg(i18n("Writable"))
.tqarg(isWritable()? i18n("yes") : i18n("no"));

if (isEncrypted())
text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(i18n("Unlock key"))
.arg(config(CSwordModuleInfo::CipherKey));
.tqarg(i18n("Unlock key"))
.tqarg(config(CSwordModuleInfo::CipherKey));

TQString options;

@@ -756,7 +756,7 @@ TQString CSwordModuleInfo::aboutText() const {
for (opts = CSwordModuleInfo::filterTypesMIN; opts <= CSwordModuleInfo::filterTypesMAX; ++opts) {
if (has(static_cast < CSwordModuleInfo::FilterTypes > (opts))) {
if (!options.isEmpty()) {
options += TQString::fromLatin1(", ");
options += TQString::tqfromLatin1(", ");
}

options += CSwordBackend::translatedOptionName(static_cast < CSwordModuleInfo::FilterTypes > (opts));
@@ -765,19 +765,19 @@ TQString CSwordModuleInfo::aboutText() const {

if (!options.isEmpty()) {
text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(i18n("Features"))
.arg(options);
.tqarg(i18n("Features"))
.tqarg(options);
}

text += "</table><hr>";

if (category() == Cult) //clearly say the module contains cult/questionable materials
text += TQString("<br/><b>%1</b><br/><br/>")
.arg(i18n("Take care, this work contains cult / questionable material!"));
.tqarg(i18n("Take care, this work contains cult / questionable material!"));

text += TQString("<b>%1:</b><br><font size=\"-1\">%2</font>")
.arg(i18n("About"))
.arg(config(AboutInformation));
.tqarg(i18n("About"))
.tqarg(config(AboutInformation));

typedef TQValueList<CSwordModuleInfo::ConfigEntry> ListConfigEntry;

@@ -834,8 +834,8 @@ TQString CSwordModuleInfo::aboutText() const {

if (!t.isEmpty()) {
text += TQString("<tr><td><b>%1</b></td><td>%2</td></tr>")
.arg(entryMap[*it])
.arg(config(*it));
.tqarg(entryMap[*it])
.tqarg(config(*it));
}

}
@@ -871,9 +871,9 @@ const CLanguageMgr::Language * const CSwordModuleInfo::language() const {
TQString CSwordModuleInfo::getSimpleConfigEntry(const TQString& name) const {
TQString ret = isUnicode()
? TQString::fromUtf8(m_module->getConfigEntry(name.latin1()))
: TQString::fromLatin1(m_module->getConfigEntry(name.latin1()));
: TQString::tqfromLatin1(m_module->getConfigEntry(name.latin1()));

return ret.isEmpty() ? TQString::null : ret;
return ret.isEmpty() ? TQString() : ret;
}

TQString CSwordModuleInfo::getFormattedConfigEntry(const TQString& name) const {
@@ -882,7 +882,7 @@ TQString CSwordModuleInfo::getFormattedConfigEntry(const TQString& name) const {
RTF_Filter.processText(RTF_Buffer, 0, 0);
TQString ret = isUnicode()
? TQString::fromUtf8(RTF_Buffer.c_str())
: TQString::fromLatin1(RTF_Buffer.c_str());
: TQString::tqfromLatin1(RTF_Buffer.c_str());

return ret.isEmpty() ? TQString::null : ret;
return ret.isEmpty() ? TQString() : ret;
}

+ 1
- 1
bibletime/backend/cswordmoduleinfo.h View File

@@ -15,7 +15,7 @@
//BibleTime includes
#include "clanguagemgr.h"

//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqvaluelist.h>
#include <tqsignal.h>

+ 1
- 1
bibletime/backend/cswordmodulesearch.cpp View File

@@ -24,7 +24,7 @@
CSwordModuleSearch* CSwordModuleSearch::searcher = 0;

CSwordModuleSearch::CSwordModuleSearch() :
m_searchedText(TQString::null),
m_searchedText(TQString()),
m_searchOptions(0),
m_foundItems(false){
searcher = this;

+ 1
- 1
bibletime/backend/cswordmodulesearch.h View File

@@ -18,7 +18,7 @@
//BibleTime - utils
#include "util/cpointers.h"

//Qt includes
//TQt includes
#include <tqptrlist.h>
#include <tqstring.h>
#include <tqsignal.h>

+ 2
- 2
bibletime/backend/cswordtreekey.h View File

@@ -45,7 +45,7 @@ public:
*/
virtual CSwordTreeKey* copy() const;
/**
* Returns the last part of the current key as unicode decoded TQString.
* Returns the last part of the current key as tqunicode decoded TQString.
* Use this instead of TreeKeyIdx::getLocalName() to avoid encoding problems.
*/
virtual const TQString getLocalNameUnicode() const;
@@ -58,7 +58,7 @@ public:
*/
virtual const bool key( const TQString& key );
/**
* Set/get the key. If the parameter is not set (means equal to TQString::null)
* Set/get the key. If the parameter is not set (means equal to TQString())
* the used key is returned. Otherwise the key is set and the new on ei returned.
*/
virtual const bool key( const char* key );

+ 10
- 10
bibletime/backend/cswordversekey.cpp View File

@@ -14,7 +14,7 @@
#include "cswordbiblemoduleinfo.h"
#include "cswordcommentarymoduleinfo.h"

//Qt includes
//TQt includes
#include <tqstringlist.h>

//Sword includes
@@ -112,7 +112,7 @@ const TQString CSwordVerseKey::book( const TQString& newBook ) {
}

//return TQString::fromUtf8( books[min][0].name ); //return the first book, i.e. Genesis
return TQString::null;
return TQString();
}

/** Sets the key we use to the parameter. */
@@ -173,19 +173,19 @@ const bool CSwordVerseKey::next( const JumpType type ) {

case UseVerse: {
if (m_module && m_module->module()) {
const bool oldStatus = m_module->module()->getSkipConsecutiveLinks();
const bool oldtqStatus = m_module->module()->getSkipConsecutiveLinks();
m_module->module()->setSkipConsecutiveLinks(true);

//disable headings for next verse
const bool useHeaders = (Verse() == 0);
const bool oldHeadingsStatus = ((VerseKey*)(m_module->module()->getKey()))->Headings( useHeaders );
const bool oldHeadingstqStatus = ((VerseKey*)(m_module->module()->getKey()))->Headings( useHeaders );
//don't use setKey(), that would create a new key without Headings set
m_module->module()->getKey()->setText( (const char*)key().utf8() );

(*(m_module->module()) )++;

((VerseKey*)(m_module->module()->getKey()))->Headings(oldHeadingsStatus);
m_module->module()->setSkipConsecutiveLinks(oldStatus);
((VerseKey*)(m_module->module()->getKey()))->Headings(oldHeadingstqStatus);
m_module->module()->setSkipConsecutiveLinks(oldtqStatus);

if (!m_module->module()->Error()) {
key( TQString::fromUtf8(m_module->module()->KeyText()) );
@@ -258,16 +258,16 @@ const bool CSwordVerseKey::previous( const JumpType type ) {
case UseVerse: {
if (m_module && m_module->module()) {
const bool useHeaders = (Verse() == 0);
const bool oldHeadingsStatus = ((VerseKey*)(m_module->module()->getKey()))->Headings( useHeaders );
const bool oldHeadingstqStatus = ((VerseKey*)(m_module->module()->getKey()))->Headings( useHeaders );

m_module->module()->getKey()->setText( (const char*)key().utf8() );

const bool oldStatus = m_module->module()->getSkipConsecutiveLinks();
const bool oldtqStatus = m_module->module()->getSkipConsecutiveLinks();
m_module->module()->setSkipConsecutiveLinks(true);
( *( m_module->module() ) )--;

((VerseKey*)(m_module->module()->getKey()))->Headings( oldHeadingsStatus );
m_module->module()->setSkipConsecutiveLinks(oldStatus);
((VerseKey*)(m_module->module()->getKey()))->Headings( oldHeadingstqStatus );
m_module->module()->setSkipConsecutiveLinks(oldtqStatus);

if (!m_module->module()->Error()) {
key( TQString::fromUtf8(m_module->module()->KeyText()) );//don't use fromUtf8

+ 4
- 4
bibletime/backend/cswordversekey.h View File

@@ -16,7 +16,7 @@
#include "cswordkey.h"
#include "cswordmoduleinfo.h"

//Qt includes
//TQt includes
#include <tqstring.h>

//Sword includes
@@ -75,7 +75,7 @@ public:
*/
virtual CSwordKey* copy() const;
/**
* Set/get the key. If the parameter is not set (means equal to TQString::null)
* Set/get the key. If the parameter is not set (means equal to TQString())
* the used key is returned. Otherwise the key is set and the new on ei returned.
*/
virtual const TQString key() const;
@@ -84,7 +84,7 @@ public:
*/
virtual const bool key( const TQString& );
/**
* Set/get the key. If the parameter is not set (means equal to TQString::null)
* Set/get the key. If the parameter is not set (means equal to TQString())
* the used key is returned. Otherwise the key is set and the new on ei returned.
*/
virtual const bool key( const char* key );
@@ -103,7 +103,7 @@ public:
* Use "char Book()" to retrieve the book number of the current book.
* @return The name of the current book
*/
const TQString book(const TQString& newBook = TQString::null);
const TQString book(const TQString& newBook = TQString());
/**
* Sets the module for this key
*/

+ 20
- 20
bibletime/backend/ctextrendering.cpp View File

@@ -24,7 +24,7 @@
//Sword includes
#include <swkey.h>

//Qt includes
//TQt includes
#include <tqregexp.h>

//KDE includes
@@ -38,17 +38,17 @@ CTextRendering::KeyTreeItem::KeyTreeItem(const TQString& key, CSwordModuleInfo c
m_moduleList(),
m_key( key ),
m_childList( 0 ),
m_stopKey( TQString::null ),
m_alternativeContent( TQString::null ) {
m_stopKey( TQString() ),
m_alternativeContent( TQString() ) {
m_moduleList.append( const_cast<CSwordModuleInfo*>(mod) ); //BAD CODE
}

CTextRendering::KeyTreeItem::KeyTreeItem(const TQString& content, const Settings settings )
: m_settings( settings ),
m_moduleList(),
m_key( TQString::null ),
m_key( TQString() ),
m_childList( 0 ),
m_stopKey( TQString::null ),
m_stopKey( TQString() ),
m_alternativeContent( content ) {}

CTextRendering::KeyTreeItem::KeyTreeItem(const TQString& key, const ListCSwordModuleInfo& mods, const Settings settings )
@@ -56,16 +56,16 @@ CTextRendering::KeyTreeItem::KeyTreeItem(const TQString& key, const ListCSwordMo
m_moduleList( mods ),
m_key( key ),
m_childList( 0 ),
m_stopKey( TQString::null ),
m_alternativeContent( TQString::null ) {}
m_stopKey( TQString() ),
m_alternativeContent( TQString() ) {}

CTextRendering::KeyTreeItem::KeyTreeItem()
: m_settings(),
m_moduleList(),
m_key(TQString::null),
m_key(TQString()),
m_childList(0),
m_stopKey(TQString::null),
m_alternativeContent(TQString::null) {}
m_stopKey(TQString()),
m_alternativeContent(TQString()) {}

CTextRendering::KeyTreeItem::KeyTreeItem(const KeyTreeItem& i)
: m_settings( i.m_settings ),
@@ -92,7 +92,7 @@ m_moduleList(),
m_key( startKey ),
m_childList( 0 ),
m_stopKey( stopKey ),
m_alternativeContent( TQString::null ) {
m_alternativeContent( TQString() ) {
Q_ASSERT(module);
m_moduleList.append(module);

@@ -141,14 +141,14 @@ m_alternativeContent( TQString::null ) {
}
else if (vk.LowerBound().Chapter() != vk.UpperBound().Chapter()) {
m_alternativeContent = TQString("%1 - %2:%3")
.arg(TQString::fromUtf8(vk.LowerBound().getText()))
.arg(vk.UpperBound().Chapter())
.arg(vk.UpperBound().Verse());
.tqarg(TQString::fromUtf8(vk.LowerBound().getText()))
.tqarg(vk.UpperBound().Chapter())
.tqarg(vk.UpperBound().Verse());
}
else { //only verses differ (same book, same chapter)
m_alternativeContent = TQString("%1 - %2")
.arg(TQString::fromUtf8(vk.LowerBound().getText()))
.arg(vk.UpperBound().Verse());
.tqarg(TQString::fromUtf8(vk.LowerBound().getText()))
.tqarg(vk.UpperBound().Verse());
}
}

@@ -169,10 +169,10 @@ ListCSwordModuleInfo CTextRendering::KeyTree::collectModules() const {

ListCSwordModuleInfo childMods = c->modules();

/*ToDo: Use the const iterators as soon as we use Qt > 3.1
/*ToDo: Use the const iterators as soon as we use TQt > 3.1
const ListCSwordModuleInfo::const_iterator c_end = childMods.end();
for (ListCSwordModuleInfo::const_iterator c_it = childMods.constBegin(); c_it != c_end; ++c_it) {
if (!modules.contains(*c_it)) {
if (!modules.tqcontains(*c_it)) {
modules.append(*c_it);
}
}*/
@@ -181,7 +181,7 @@ ListCSwordModuleInfo CTextRendering::KeyTree::collectModules() const {
ListCSwordModuleInfo::iterator end_it = childMods.end();

for (ListCSwordModuleInfo::iterator it(childMods.begin()); it != end_it; ++it) {
if (!modules.contains(*it)) {
if (!modules.tqcontains(*it)) {
modules.append(*it);
}
}
@@ -265,7 +265,7 @@ const TQString CTextRendering::renderKeyRange( const TQString& start, const TQSt
return renderKeyTree(tree);
}

return TQString::null;
return TQString();
}

const TQString CTextRendering::renderSingleKey( const TQString& key, const ListCSwordModuleInfo& moduleList, const KeyTreeItem::Settings& settings ) {

+ 1
- 1
bibletime/backend/ctextrendering.h View File

@@ -116,7 +116,7 @@ public:

const TQString renderKeyTree( KeyTree& );

const TQString renderKeyRange( const TQString& start, const TQString& stop, const ListCSwordModuleInfo& modules, const TQString& hightlightKey = TQString::null, const KeyTreeItem::Settings& settings = KeyTreeItem::Settings() );
const TQString renderKeyRange( const TQString& start, const TQString& stop, const ListCSwordModuleInfo& modules, const TQString& hightlightKey = TQString(), const KeyTreeItem::Settings& settings = KeyTreeItem::Settings() );

const TQString renderSingleKey( const TQString& key, const ListCSwordModuleInfo&, const KeyTreeItem::Settings& settings = KeyTreeItem::Settings() );


+ 3
- 3
bibletime/bibletime.cpp View File

@@ -36,7 +36,7 @@
#include "backend/cswordldkey.h"


//Qt includes
//TQt includes
#include <tqsplitter.h>

//KDE includes
@@ -86,7 +86,7 @@ m_mainIndex(0) {

setPlainCaption("BibleTime " VERSION);

// we don't save the geometry, it's stored in the startup profile
// we don't save the tqgeometry, it's stored in the startup profile
setAutoSaveSettings(TQString("MainWindow"), false);
}

@@ -324,6 +324,6 @@ void BibleTime::polish() {
m_initialized = true;

KMainWindow::polish();
applyMainWindowSettings(CBTConfig::getConfig(), TQString::fromLatin1("MainWindow"));
applyMainWindowSettings(CBTConfig::getConfig(), TQString::tqfromLatin1("MainWindow"));
}


+ 2
- 1
bibletime/bibletime.h View File

@@ -110,7 +110,7 @@ class TQSplitter;
* BibleTime main page.
* <p>This is the sourcecode documentation of BibleTime, a Bible study tool for KDE/Linux.
* BibleTime is devided in two major parts, the backend and the frontend.
* The backend is mainly a wrapper around Sword's classes to use Qt functionality
* The backend is mainly a wrapper around Sword's classes to use TQt functionality
* to allow easy access to it's functionality and to have it in a (more or less :)
* object oriented structure.</p><BR>
* <p>
@@ -135,6 +135,7 @@ class TQSplitter;
class BibleTime : public KMainWindow, virtual public BibleTimeInterface {
friend class CMDIArea;
Q_OBJECT
TQ_OBJECT
public:
/**
* construtor of BibleTime

+ 2
- 2
bibletime/bibletime_dcop.cpp View File

@@ -95,7 +95,7 @@ TQStringList BibleTime::searchInModule(const TQString& moduleName, const TQStrin
mod->searchIndexed( searchText, scope );

sword::ListKey result = mod->searchResult();
const TQString lead = TQString("[%1] ").arg(moduleName);
const TQString lead = TQString("[%1] ").tqarg(moduleName);
;
for ( int i = 0; i < result.Count(); ++i ) {
sword::SWKey* key = result.getElement(i);
@@ -144,7 +144,7 @@ TQStringList BibleTime::searchInDefaultBible(const TQString& searchText) {

TQString BibleTime::getCurrentReference() {
qDebug("BibleTime::getCurrentReference");
TQString ret = TQString::null;
TQString ret = TQString();

CDisplayWindow* w = dynamic_cast<CDisplayWindow*>(m_mdi->activeWindow());
Q_ASSERT(w);

+ 31
- 31
bibletime/bibletime_init.cpp View File

@@ -94,7 +94,7 @@ void BibleTime::initView() {

m_mdi = new CMDIArea(m_mainSplitter, "mdiarea" );
m_mdi->setMinimumSize(100, 100);
m_mdi->setFocusPolicy(ClickFocus);
m_mdi->setFocusPolicy(TQ_ClickFocus);

m_helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true, actionCollection());
}
@@ -104,7 +104,7 @@ void BibleTime::initActions() {
KStartupLogo::setStatusMessage(i18n("Initializing menu- and toolbars") + TQString("..."));
KAction* action = 0;

action = KStdAction::quit(kapp, TQT_SLOT( quit() ), actionCollection());
action = KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT( quit() ), actionCollection());
action->setToolTip( CResMgr::mainMenu::file::quit::tooltip );

#if KDE_VERSION_MINOR < 1
@@ -115,7 +115,7 @@ void BibleTime::initActions() {
action = new KAction(i18n("Search in &open work(s)"),
CResMgr::mainMenu::mainIndex::search::icon,
CResMgr::mainMenu::mainIndex::search::accel,
this, TQT_SLOT(slotSearchModules()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotSearchModules()), actionCollection(),
CResMgr::mainMenu::mainIndex::search::actionName
);
action->setToolTip( CResMgr::mainMenu::mainIndex::search::tooltip );
@@ -128,7 +128,7 @@ void BibleTime::initActions() {
action = new KAction(i18n("Search in standard &Bible"),
CResMgr::mainMenu::mainIndex::searchdefaultbible::icon,
CResMgr::mainMenu::mainIndex::searchdefaultbible::accel,
this, TQT_SLOT(slotSearchDefaultBible()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotSearchDefaultBible()), actionCollection(),
CResMgr::mainMenu::mainIndex::searchdefaultbible::actionName
);
action->setToolTip( CResMgr::mainMenu::mainIndex::searchdefaultbible::tooltip );
@@ -138,7 +138,7 @@ void BibleTime::initActions() {
action->plugAccel( accel() );
#endif

m_viewToolbar_action = KStdAction::showToolbar(this, TQT_SLOT( slotToggleToolbar() ), actionCollection());
m_viewToolbar_action = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT( slotToggleToolbar() ), actionCollection());
m_viewToolbar_action->setToolTip( CResMgr::mainMenu::view::showToolBar::tooltip );

#if KDE_VERSION_MINOR < 1
@@ -150,7 +150,7 @@ void BibleTime::initActions() {
m_viewMainIndex_action = new KToggleAction(i18n("&Show bookshelf"),
CResMgr::mainMenu::view::showMainIndex::icon,
CResMgr::mainMenu::view::showMainIndex::accel,
this, TQT_SLOT(slotToggleMainIndex()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotToggleMainIndex()), actionCollection(),
CResMgr::mainMenu::view::showMainIndex::actionName);
m_viewMainIndex_action->setToolTip( CResMgr::mainMenu::view::showMainIndex::tooltip );

@@ -162,7 +162,7 @@ void BibleTime::initActions() {
m_viewInfoDisplay_action = new KToggleAction(i18n("Show &mag"),
CResMgr::mainMenu::view::showInfoDisplay::icon,
CResMgr::mainMenu::view::showInfoDisplay::accel,
this, TQT_SLOT(slotToggleInfoDisplay()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotToggleInfoDisplay()), actionCollection(),
CResMgr::mainMenu::view::showInfoDisplay::actionName);
m_viewMainIndex_action->setToolTip( CResMgr::mainMenu::view::showInfoDisplay::tooltip );

@@ -171,7 +171,7 @@ void BibleTime::initActions() {
m_viewInfoDisplay_action->plugAccel( accel() );
#endif

action = KStdAction::preferences(this, TQT_SLOT( slotSettingsOptions() ), actionCollection());
action = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotSettingsOptions() ), actionCollection());
action->setToolTip( CResMgr::mainMenu::settings::optionsDialog::tooltip );

#if KDE_VERSION_MINOR < 1
@@ -182,7 +182,7 @@ void BibleTime::initActions() {
action = new KAction(i18n("Bookshelf &Manager"),
CResMgr::mainMenu::settings::swordSetupDialog::icon,
CResMgr::mainMenu::settings::swordSetupDialog::accel,
this, TQT_SLOT( slotSwordSetupDialog() ), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT( slotSwordSetupDialog() ), actionCollection(),
CResMgr::mainMenu::settings::swordSetupDialog::actionName
);
action->setToolTip( CResMgr::mainMenu::settings::swordSetupDialog::tooltip );
@@ -198,7 +198,7 @@ void BibleTime::initActions() {
KStdAction::stdName(KStdAction::ConfigureToolbars))
);
}
action = KStdAction::configureToolbars(this, TQT_SLOT( slotSettingsToolbar() ), actionCollection());
action = KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT( slotSettingsToolbar() ), actionCollection());
action->setToolTip( CResMgr::mainMenu::settings::editToolBar::tooltip );
#if KDE_VERSION_MINOR < 1

@@ -214,7 +214,7 @@ void BibleTime::initActions() {
m_windowManualMode_action = new KToggleAction(i18n("&Manual mode"),
CResMgr::mainMenu::window::arrangementMode::manual::icon,
CResMgr::mainMenu::window::arrangementMode::manual::accel,
this, TQT_SLOT(slotManualArrangementMode()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotManualArrangementMode()), actionCollection(),
CResMgr::mainMenu::window::arrangementMode::manual::actionName
);
m_windowManualMode_action->setToolTip(
@@ -231,7 +231,7 @@ void BibleTime::initActions() {
m_windowAutoTileVertical_action = new KToggleAction(i18n("Auto-tile &vertically"),
CResMgr::mainMenu::window::arrangementMode::autoTileVertical::icon,
CResMgr::mainMenu::window::arrangementMode::autoTileVertical::accel,
this, TQT_SLOT(slotAutoTileVertical()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotAutoTileVertical()), actionCollection(),
CResMgr::mainMenu::window::arrangementMode::autoTileVertical::actionName
);
m_windowAutoTileVertical_action->setToolTip(
@@ -248,7 +248,7 @@ void BibleTime::initActions() {
m_windowAutoTileHorizontal_action = new KToggleAction(i18n("Auto-tile &horizontally"),
CResMgr::mainMenu::window::arrangementMode::autoTileHorizontal::icon,
CResMgr::mainMenu::window::arrangementMode::autoTileHorizontal::accel,
this, TQT_SLOT(slotAutoTileHorizontal()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotAutoTileHorizontal()), actionCollection(),
CResMgr::mainMenu::window::arrangementMode::autoTileHorizontal::actionName
);
m_windowAutoTileHorizontal_action->setToolTip(
@@ -265,7 +265,7 @@ void BibleTime::initActions() {
m_windowAutoCascade_action = new KToggleAction(i18n("Auto-&cascade"),
CResMgr::mainMenu::window::arrangementMode::autoCascade::icon,
CResMgr::mainMenu::window::arrangementMode::autoCascade::accel,
this, TQT_SLOT(slotAutoCascade()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotAutoCascade()), actionCollection(),
CResMgr::mainMenu::window::arrangementMode::autoCascade::actionName
);
m_windowAutoCascade_action->setToolTip(
@@ -281,7 +281,7 @@ void BibleTime::initActions() {
m_windowCascade_action = new KAction(i18n("&Cascade"),
CResMgr::mainMenu::window::cascade::icon,
CResMgr::mainMenu::window::cascade::accel,
this, TQT_SLOT(slotCascade()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotCascade()), actionCollection(),
CResMgr::mainMenu::window::cascade::actionName
);
m_windowCascade_action->setToolTip( CResMgr::mainMenu::window::cascade::tooltip );
@@ -295,7 +295,7 @@ void BibleTime::initActions() {
m_windowTileVertical_action = new KAction(i18n("Tile &vertically"),
CResMgr::mainMenu::window::tileVertical::icon,
CResMgr::mainMenu::window::tileVertical::accel,
this, TQT_SLOT(slotTileVertical()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotTileVertical()), actionCollection(),
CResMgr::mainMenu::window::tileVertical::actionName
);
m_windowTileVertical_action->setToolTip( CResMgr::mainMenu::window::tileVertical::tooltip );
@@ -307,7 +307,7 @@ void BibleTime::initActions() {
m_windowTileHorizontal_action = new KAction(i18n("Tile &horizontally"),
CResMgr::mainMenu::window::tileHorizontal::icon,
CResMgr::mainMenu::window::tileHorizontal::accel,
this, TQT_SLOT(slotTileHorizontal()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotTileHorizontal()), actionCollection(),
CResMgr::mainMenu::window::tileHorizontal::actionName
);
m_windowTileHorizontal_action->setToolTip( CResMgr::mainMenu::window::tileHorizontal::tooltip );
@@ -321,7 +321,7 @@ void BibleTime::initActions() {
m_windowCloseAll_action = new KAction(i18n("Cl&ose all"),
CResMgr::mainMenu::window::closeAll::icon,
CResMgr::mainMenu::window::closeAll::accel,
m_mdi, TQT_SLOT(deleteAll()), actionCollection(),
TQT_TQOBJECT(m_mdi), TQT_SLOT(deleteAll()), actionCollection(),
CResMgr::mainMenu::window::closeAll::actionName
);
m_windowCloseAll_action->setToolTip( CResMgr::mainMenu::window::closeAll::tooltip );
@@ -347,7 +347,7 @@ void BibleTime::initActions() {
m_windowSaveToNewProfile_action = new KAction(i18n("Save as &new session"),
CResMgr::mainMenu::window::saveToNewProfile::icon,
CResMgr::mainMenu::window::saveToNewProfile::accel,
this, TQT_SLOT(saveToNewProfile()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(saveToNewProfile()), actionCollection(),
CResMgr::mainMenu::window::saveToNewProfile::actionName
);
m_windowSaveToNewProfile_action->setToolTip( CResMgr::mainMenu::window::saveToNewProfile::tooltip );
@@ -384,7 +384,7 @@ void BibleTime::initActions() {
m_windowFullscreen_action = new KToggleAction(i18n("&Fullscreen mode"),
CResMgr::mainMenu::window::showFullscreen::icon,
CResMgr::mainMenu::window::showFullscreen::accel,
this, TQT_SLOT(toggleFullscreen()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(toggleFullscreen()), actionCollection(),
CResMgr::mainMenu::window::showFullscreen::actionName
);
m_windowFullscreen_action->setToolTip( CResMgr::mainMenu::window::showFullscreen::tooltip );
@@ -413,7 +413,7 @@ void BibleTime::initActions() {
action = new KAction(i18n("&Handbook"),
CResMgr::mainMenu::help::handbook::icon,
CResMgr::mainMenu::help::handbook::accel,
this, TQT_SLOT(openOnlineHelp_Handbook()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(openOnlineHelp_Handbook()), actionCollection(),
CResMgr::mainMenu::help::handbook::actionName
);
action->setToolTip( CResMgr::mainMenu::help::handbook::tooltip );
@@ -426,7 +426,7 @@ void BibleTime::initActions() {
action = new KAction(i18n("&Bible Study Howto"),
CResMgr::mainMenu::help::bibleStudyHowTo::icon,
CResMgr::mainMenu::help::bibleStudyHowTo::accel,
this, TQT_SLOT(openOnlineHelp_Howto()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(openOnlineHelp_Howto()), actionCollection(),
CResMgr::mainMenu::help::bibleStudyHowTo::actionName
);
action->setToolTip( CResMgr::mainMenu::help::bibleStudyHowTo::tooltip );
@@ -457,7 +457,7 @@ void BibleTime::initActions() {
action = new KAction(i18n("&Daily tip"),
CResMgr::mainMenu::help::dailyTip::icon,
CResMgr::mainMenu::help::dailyTip::accel,
this, TQT_SLOT(slotHelpTipOfDay()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(slotHelpTipOfDay()), actionCollection(),
CResMgr::mainMenu::help::dailyTip::actionName
);
action->setToolTip(CResMgr::mainMenu::help::dailyTip::tooltip);
@@ -580,7 +580,7 @@ void BibleTime::applyProfileSettings( CProfile* p ) {
Q_ASSERT(p);
if (!p) return;

if (m_initialized) { //on startup KDE sets the main geometry
if (m_initialized) { //on startup KDE sets the main tqgeometry
//see polish(), where m_initialized is set and the KDE methods are called for window resize
//first Main Window state
@@ -588,9 +588,9 @@ void BibleTime::applyProfileSettings( CProfile* p ) {
toggleFullscreen(); //either showFullscreen or showNormal
if (p->maximized()) KMainWindow::showMaximized(); //if maximized, then also call showMaximized
//Then Main Window geometry
KMainWindow::resize( p->geometry().size() ); //Don't use KMainWindowInterface::resize
KMainWindow::move( p->geometry().topLeft() );//Don't use KMainWindowInterface::move
//Then Main Window tqgeometry
KMainWindow::resize( p->tqgeometry().size() ); //Don't use KMainWindowInterface::resize
KMainWindow::move( p->tqgeometry().topLeft() );//Don't use KMainWindowInterface::move
}
}

@@ -602,8 +602,8 @@ void BibleTime::storeProfileSettings( CProfile* p ) {
p->setFullscreen( m_windowFullscreen_action->isChecked() );
p->setMaximized( this->KMainWindow::isMaximized() );

TQRect geometry;
geometry.setTopLeft(pos());
geometry.setSize(size());
p->setGeometry(geometry);
TQRect tqgeometry;
tqgeometry.setTopLeft(pos());
tqgeometry.setSize(size());
p->setGeometry(tqgeometry);
}

+ 7
- 15
bibletime/bibletime_slots.cpp View File

@@ -171,18 +171,10 @@ void BibleTime::slotWindowMenuAboutToShow() {
m_windowCloseAll_action->setEnabled( true );
}
#if QT_VERSION >= 0x030200
TQPtrList<KAction>::iterator end = m_windowOpenWindowsList.end();
for (TQPtrList<KAction>::iterator it = m_windowOpenWindowsList.begin(); it != end; ++it ) {
(*it)->unplugAll();
}
#else
TQPtrListIterator<KAction> it(m_windowOpenWindowsList);
while (it.current() != 0){
it.current()->unplugAll();
++it;
}
#endif
m_windowOpenWindowsList.setAutoDelete(true);
m_windowOpenWindowsList.clear();

@@ -196,7 +188,7 @@ void BibleTime::slotWindowMenuAboutToShow() {
TQWidget* w = windows.at(i);
Q_ASSERT(w);

KUserDataAction* action = new KUserDataAction(w->caption(), KShortcut(), this, TQT_SLOT(slotWindowMenuActivated()), m_windowActionCollection);
KUserDataAction* action = new KUserDataAction(w->caption(), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotWindowMenuActivated()), m_windowActionCollection);
Q_ASSERT(action);
action->setUserData(w);

@@ -332,12 +324,12 @@ void BibleTime::slotToggleToolbar() {
/** Shows or hides the groupmanager.
*/
void BibleTime::slotToggleMainIndex() {
//we use the parent widget because the main index is enclosed in a layout which adds the label at the top
//we use the tqparent widget because the main index is enclosed in a tqlayout which adds the label at the top
if (m_viewMainIndex_action->isChecked()) {
m_mainIndex->parentWidget()->show();
m_mainIndex->tqparentWidget()->show();
}
else {
m_mainIndex->parentWidget()->hide();
m_mainIndex->tqparentWidget()->hide();
}
}

@@ -375,7 +367,7 @@ void BibleTime::slotSearchModules() {
};
};

Search::CSearchDialog::openDialog(modules, TQString::null);
Search::CSearchDialog::openDialog(modules, TQString());
}

/* Search default Bible slot
@@ -389,7 +381,7 @@ void BibleTime::slotSearchDefaultBible() {
module.append(bible);
}

Search::CSearchDialog::openDialog(module, TQString::null);
Search::CSearchDialog::openDialog(module, TQString());
}

void BibleTime::openOnlineHelp_Handbook() {
@@ -533,7 +525,7 @@ void BibleTime::toggleFullscreen() {
/** Saves current settings into a new profile. */
void BibleTime::saveToNewProfile() {
bool ok = false;
const TQString name = QInputDialog::getText(i18n("Session name:"), i18n("Please enter a name for the new session."), TQLineEdit::Normal, TQString::null, &ok, this);
const TQString name = TQInputDialog::getText(i18n("Session name:"), i18n("Please enter a name for the new session."), TQLineEdit::Normal, TQString(), &ok, this);
if (ok && !name.isEmpty()) {
CProfile* profile = m_profileMgr.create(name);
saveProfile(profile);

+ 1
- 1
bibletime/bibletimeinterface.h