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
v3.5.13-sru
tpearson 14 years ago
parent 1ed307edd0
commit b6027ae3f7

@ -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;

@ -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

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

@ -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());

@ -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;

@ -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;
};

@ -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);

@ -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);*/
}

@ -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");
};

@ -23,7 +23,7 @@
#include "util/scoped_resource.h"
//Qt includes
//TQt includes
#include <tqapplication.h>
#include <tqregexp.h>

@ -22,7 +22,7 @@
//Sword includes
#include <swdisp.h>
//Qt includes
//TQt includes
#include <tqstring.h>
class CSwordModuleInfo;

@ -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);
}

@ -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();
}
}

@ -12,7 +12,7 @@
#ifndef CLANGUAGEMGR_H
#define CLANGUAGEMGR_H
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqvaluelist.h>

@ -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";
}

@ -12,7 +12,7 @@
#ifndef CREFERENCEMANAGER_H
#define CREFERENCEMANAGER_H
//Qt includes
//TQt includes
#include <tqstring.h>
#include "cswordmoduleinfo.h"

@ -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) {

@ -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

@ -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) {

@ -16,7 +16,7 @@
#include "cswordmoduleinfo.h"
#include "cswordversekey.h"
//Qt includes
//TQt includes
#include <tqstringlist.h>
//Sword includes

@ -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.

@ -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)) {

@ -15,7 +15,7 @@
//Own includes
//Qt includes
//TQt includes
#include <tqstring.h>
//forward declarations

@ -13,7 +13,7 @@
#include "cswordldkey.h"
#include "cswordlexiconmoduleinfo.h"
//Qt includes
//TQt includes
#include <tqtextcodec.h>
//Sword includes

@ -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* );
/**

@ -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()) );

@ -15,7 +15,7 @@
//own includes
#include "cswordmoduleinfo.h"
//Qt includes
//TQt includes
#include <tqstringlist.h>
/**

@ -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;
}

@ -15,7 +15,7 @@
//BibleTime includes
#include "clanguagemgr.h"
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqvaluelist.h>
#include <tqsignal.h>

@ -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;

@ -18,7 +18,7 @@
//BibleTime - utils
#include "util/cpointers.h"
//Qt includes
//TQt includes
#include <tqptrlist.h>
#include <tqstring.h>
#include <tqsignal.h>

@ -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 );

@ -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

@ -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
*/

@ -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 ) {

@ -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() );

@ -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"));
}

@ -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

@ -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);

@ -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);
}

@ -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);

@ -12,7 +12,7 @@
#ifndef BIBLETIME_INTERFACE_H
#define BIBLETIME_INTERFACE_H
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqstringlist.h>

@ -22,11 +22,11 @@ static const char* const BibleTimeInterface_ftable[14][3] = {
{ "void", "openWindow(TQString,TQString)", "openWindow(TQString moduleName,TQString key)" },
{ "void", "openDefaultBible(TQString)", "openDefaultBible(TQString key)" },
{ "void", "closeAllModuleWindows()", "closeAllModuleWindows()" },
{ "TQString", "getCurrentReference()", "getCurrentReference()" },
{ "TQStringList", "searchInModule(TQString,TQString)", "searchInModule(TQString moduleName,TQString searchText)" },
{ "TQStringList", "searchInOpenModules(TQString)", "searchInOpenModules(TQString searchText)" },
{ "TQStringList", "searchInDefaultBible(TQString)", "searchInDefaultBible(TQString searchText)" },
{ "TQStringList", "getModulesOfType(TQString)", "getModulesOfType(TQString type)" },
{ TQSTRING_OBJECT_NAME_STRING, "getCurrentReference()", "getCurrentReference()" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "searchInModule(TQString,TQString)", "searchInModule(TQString moduleName,TQString searchText)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "searchInOpenModules(TQString)", "searchInOpenModules(TQString searchText)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "searchInDefaultBible(TQString)", "searchInDefaultBible(TQString searchText)" },
{ TQSTRINGLIST_OBJECT_NAME_STRING, "getModulesOfType(TQString)", "getModulesOfType(TQString type)" },
{ 0, 0, 0 }
};
static const int BibleTimeInterface_ftable_hiddens[13] = {
@ -53,7 +53,7 @@ bool BibleTimeInterface::process(const TQCString &fun, const TQByteArray &data,
for ( int i = 0; BibleTimeInterface_ftable[i][1]; i++ )
fdict->insert( BibleTimeInterface_ftable[i][1], new int( i ) );
}
int* fp = fdict->find( fun );
int* fp = fdict->tqfind( fun );
switch ( fp?*fp:-1) {
case 0: { // void syncAllBibles(TQString)
TQString arg0;

@ -12,7 +12,7 @@
#include "util/cpointers.h"
#include "cbtconfig.h"
//Qt includes
//TQt includes
#include <tqfile.h>
#include <tqfileinfo.h>
@ -41,7 +41,7 @@ namespace BookshelfManager {
const TQString BTInstallMgr::Tool::LocalConfig::swordConfigFilename() {
// Q_ASSERT( CPointers::backend()->sysconfig );
return TQString::fromLatin1("%1/.sword/sword.conf").arg(getenv("HOME"));
return TQString::tqfromLatin1("%1/.sword/sword.conf").tqarg(getenv("HOME"));
}
TQStringList BTInstallMgr::Tool::RemoteConfig::sourceList( sword::InstallMgr* mgr ) {
@ -65,7 +65,7 @@ namespace BookshelfManager {
while (sourceBegin != sourceEnd) {
InstallSource is("DIR", sourceBegin->second.c_str());
names << TQString::fromLatin1(is.caption.c_str());
names << TQString::tqfromLatin1(is.caption.c_str());
sourceBegin++;
}
@ -91,7 +91,7 @@ namespace BookshelfManager {
filename = LocalConfig::swordConfigFilename();
directAccess = true;
}
else if ( !i.exists() && dirInfo.isWritable() ) { // if the file doesn't exist but th eparent is writable for us, create it
else if ( !i.exists() && dirInfo.isWritable() ) { // if the file doesn't exist but th etqparent is writable for us, create it
filename = LocalConfig::swordConfigFilename();
directAccess = true;
}
@ -102,12 +102,12 @@ namespace BookshelfManager {
for (TQStringList::const_iterator it = targets.begin(); it != targets.end(); ++it) {
TQString t = *it;
if (t.contains( TQString("%1/.sword").arg(getenv("HOME")) )) {
if (t.tqcontains( TQString("%1/.sword").tqarg(getenv("HOME")) )) {
//we don't want HOME/.sword in the config
continue;
}
else {
conf["Install"].insert( std::make_pair(!setDataPath ? SWBuf("DataPath") : SWBuf("AugmentPath"), t.local8Bit()) );
conf["Install"].insert( std::make_pair(!setDataPath ? SWBuf("DataPath") : SWBuf("AugmentPath"), t.local8Bit().data()) );
setDataPath = true;
}
@ -117,7 +117,7 @@ namespace BookshelfManager {
if (!directAccess) { //use kdesu to move the file to the right place
KProcess *proc = new KProcess;
*proc << "kdesu";
*proc << TQString::fromLatin1("-c") << TQString("mv %1 %2").arg(filename).arg(LocalConfig::swordConfigFilename());
*proc << TQString::tqfromLatin1("-c") << TQString("mv %1 %2").tqarg(filename).tqarg(LocalConfig::swordConfigFilename());
proc->start(KProcess::Block);
}
}
@ -326,8 +326,8 @@ namespace BookshelfManager {
emit completed(totalPercent, filePercent);
}
void BTInstallMgr::preStatus(long totalBytes, long completedBytes, const char* /*message*/) {
qWarning("pre Status: %i / %i", (int)totalBytes, (int)completedBytes);
void BTInstallMgr::pretqStatus(long totalBytes, long completedBytes, const char* /*message*/) {
qWarning("pre tqStatus: %i / %i", (int)totalBytes, (int)completedBytes);
emit downloadStarted( "unknown filename" );
m_completedBytes = completedBytes;

@ -21,7 +21,7 @@
#include <installmgr.h>
#include <ftptrans.h>
//Qt includes
//TQt includes
#include <tqobject.h>
#include <tqptrlist.h>
#include <tqstring.h>
@ -40,6 +40,7 @@ namespace BookshelfManager {
*/
class BTInstallMgr : public TQObject, public sword::InstallMgr, public sword::StatusReporter {
Q_OBJECT
TQ_OBJECT
public:
class Tool {
public:
@ -93,7 +94,7 @@ public:
protected:
/* Reimplementations of method in StatusReporter */
virtual void statusUpdate(double dltotal, double dlnow);
virtual void preStatus(long totalBytes, long completedBytes, const char *message);
virtual void pretqStatus(long totalBytes, long completedBytes, const char *message);
// virtual FTPTransport *createFTPTransport(const char *host, StatusReporter *statusReporter);

@ -17,7 +17,7 @@
#include "util/cpointers.h"
//Qt includes
//TQt includes
#include <tqapplication.h>
#include <tqfontdatabase.h>
#include <tqstring.h>
@ -58,7 +58,7 @@ const TQString CBTConfig::getKey( const CBTConfig::strings ID) {
case displayStyle: return "displayStyle";
case bookshelfCurrentItem: return "bookshelfCurrentItem";
}
return TQString::null;
return TQString();
}
const TQString CBTConfig::getDefault( const CBTConfig::strings ID) {
@ -68,7 +68,7 @@ const TQString CBTConfig::getDefault( const CBTConfig::strings ID) {
case displayStyle: return CDisplayTemplateMgr::defaultTemplate();
case bookshelfCurrentItem: return TQString();
}
return TQString::null;
return TQString();
}
const TQString CBTConfig::getKey( const CBTConfig::modules ID) {
@ -83,7 +83,7 @@ const TQString CBTConfig::getKey( const CBTConfig::modules ID) {
case standardGreekMorphLexicon: return "standardGreekMorphLexicon";
}
return TQString::null;
return TQString();
}
const TQString CBTConfig::getDefault( const CBTConfig::modules ID) {
@ -100,7 +100,7 @@ const TQString CBTConfig::getDefault( const CBTConfig::modules ID) {
case standardGreekMorphLexicon: return "StrongsGreek";
}
return TQString::null;
return TQString();
}
const TQString CBTConfig::getKey( const CBTConfig::bools ID) {
@ -125,7 +125,7 @@ const TQString CBTConfig::getKey( const CBTConfig::bools ID) {
case crashedLastTime: return "crashedLastTime";
case crashedTwoTimes: return "crashedTwoTimes";
}
return TQString::null;
return TQString();
}
const TQString CBTConfig::getKey( const CBTConfig::ints ID) {
@ -145,7 +145,7 @@ const TQString CBTConfig::getKey( const CBTConfig::ints ID) {
case bookshelfContentsY: return "bookshelfContentsY";
case magDelay: return "magDelay";
}
return TQString::null;
return TQString();
}
const bool CBTConfig::getDefault( const CBTConfig::bools ID) {
@ -199,7 +199,7 @@ const TQString CBTConfig::getKey( const CBTConfig::intLists ID) {
case mainSplitterSizes: return "mainSplitterSizes";
}
return TQString::null;
return TQString();
}
const TQValueList<int> CBTConfig::getDefault( const CBTConfig::intLists ID) {
@ -219,14 +219,14 @@ const TQString CBTConfig::getKey( const CBTConfig::stringLists ID) {
case searchTexts: return TQString("searchTexts");
case bookshelfOpenGroups: return TQString("bookshelfOpenGroups");
}
return TQString::null;
return TQString();
}
const TQStringList CBTConfig::getDefault( const CBTConfig::stringLists ID) {
switch ( ID ) {
case searchTexts: {
TQStringList list;
list.append(TQString::null);
list.append(TQString());
return list;
}
case searchCompletionTexts:
@ -242,7 +242,7 @@ const TQString CBTConfig::getKey( const CBTConfig::stringMaps ID) {
case searchScopes:
return TQString("SearchScopes");
};
return TQString::null;
return TQString();
}
const CBTConfig::StringMap CBTConfig::getDefault( const CBTConfig::stringMaps ID) {
@ -386,8 +386,8 @@ const CBTConfig::StringMap CBTConfig::get
const CBTConfig::FontSettingsPair CBTConfig::get
( const CLanguageMgr::Language* const language ) {
if (fontConfigMap && fontConfigMap->contains(language)) {
return fontConfigMap->find(language).data();
if (fontConfigMap && fontConfigMap->tqcontains(language)) {
return fontConfigMap->tqfind(language).data();
}
if (!fontConfigMap) {
@ -423,7 +423,7 @@ void CBTConfig::set
( const CBTConfig::modules ID, CSwordModuleInfo* const value ) {
KConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "modules");
config->writeEntry(getKey(ID), value ? value->name() : TQString::null);
config->writeEntry(getKey(ID), value ? value->name() : TQString());
}
void CBTConfig::set
@ -479,12 +479,12 @@ void CBTConfig::set
* will always work with each locale set.
*/
CBTConfig::StringMap::ConstIterator it;
TQString data;// = TQString::null;
TQString data;// = TQString();
sword::VerseKey vk;
for (it = value.begin(); it != value.end(); ++it) {
sword::ListKey list = vk.ParseVerseList(it.data().utf8(), "Genesis 1:1", true);
data = TQString::null;
data = TQString();
for (int i = 0; i < list.Count(); ++i) {
if ( sword::VerseKey* range = dynamic_cast<sword::VerseKey*>(list.GetElement(i)) ) {
range->setLocale("en");
@ -515,7 +515,7 @@ void CBTConfig::set
config->setGroup("font standard settings");
config->writeEntry(getKey(language), value.first);
if (fontConfigMap && fontConfigMap->contains(language)) {
if (fontConfigMap && fontConfigMap->tqcontains(language)) {
fontConfigMap->remove
(language); //remove it from the cache
}
@ -642,7 +642,7 @@ const TQString CBTConfig::getModuleEncryptionKey( const TQString& module ) {
KConfig* config = CBTConfig::getConfig();
KConfigGroupSaver groupSaver(config, "Module keys");
return config->readEntry(module, TQString::null);
return config->readEntry(module, TQString());
}
void CBTConfig::setModuleEncryptionKey( const TQString& module, const TQString& key ) {

@ -15,7 +15,7 @@
#include "backend/cswordbackend.h"
#include "backend/clanguagemgr.h"
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqfont.h>
#include <tqvaluelist.h>

@ -19,7 +19,7 @@
//Sword includes
#include "versekey.h"
//Qt includes
//TQt includes
#include <tqevent.h>
#include <tqdom.h>
@ -48,7 +48,7 @@ const char* CDragDropMgr::BTDrag::format( int i ) const {
bool CDragDropMgr::BTDrag::decode(const TQMimeSource* e, TQString& str) {
if (canDecode(e)) {
str = TQString( e->encodedData( "BibleTime/DND" ) );
str = TQString( e->tqencodedData( "BibleTime/DND" ) );
return true;
}
return false;
@ -58,17 +58,17 @@ bool CDragDropMgr::BTDrag::decode(const TQMimeSource* e, TQString& str, TQCStrin
return decode(e, str);
};
TQByteArray CDragDropMgr::BTDrag::encodedData( const char* /*type*/ ) const {
return TQTextDrag::encodedData("text/plain"); //hack because TQTextDrag only accepts text/plainand not our BibleTime/DND type
TQByteArray CDragDropMgr::BTDrag::tqencodedData( const char* /*type*/ ) const {
return TQTextDrag::tqencodedData("text/plain"); //hack because TQTextDrag only accepts text/plainand not our BibleTime/DND type
};
///////////////////////////// new class //////////////////////
CDragDropMgr::Item::Item( const TQString& text )
: m_type(Text),
m_bookmarkModuleName(TQString::null),
m_bookmarkKey(TQString::null),
m_bookmarkDescription(TQString::null),
m_bookmarkModuleName(TQString()),
m_bookmarkKey(TQString()),
m_bookmarkDescription(TQString()),
m_text(text) {}
CDragDropMgr::Item::Item( const TQString& moduleName, const TQString& key, const TQString& description )
@ -76,7 +76,7 @@ CDragDropMgr::Item::Item( const TQString& moduleName, const TQString& key, const
m_bookmarkModuleName(moduleName),
m_bookmarkKey(key),
m_bookmarkDescription(description),
m_text(TQString::null) {
m_text(TQString()) {
//we have to make sure the key is saved in it's english representation, so we convert it
if (CSwordModuleInfo* mod = CPointers::backend()->findModuleByName( moduleName )) {
if (mod->type() == CSwordModuleInfo::Bible || mod->type() == CSwordModuleInfo::Commentary) {
@ -217,14 +217,14 @@ CDragDropMgr::ItemList CDragDropMgr::decode( const TQMimeSource* const src) {
while (!elem.isNull()) {
if (elem.tagName() == "BOOKMARK") { //we found a bookmark!
// qWarning("found a bookmark!");
const TQString key = elem.hasAttribute("key") ? elem.attribute("key") : TQString::null;
const TQString moduleName = elem.hasAttribute("moduleName") ? elem.attribute("moduleName") : TQString::null;
const TQString description = elem.hasAttribute("description") ? elem.attribute("description") : TQString::null;
const TQString key = elem.hasAttribute("key") ? elem.attribute("key") : TQString();
const TQString moduleName = elem.hasAttribute("moduleName") ? elem.attribute("moduleName") : TQString();
const TQString description = elem.hasAttribute("description") ? elem.attribute("description") : TQString();
dndItems.append( CDragDropMgr::Item(moduleName, key, description) );
}
else if (elem.tagName() == "TEXT") { //we found a plain text passage!
const TQString text = elem.hasAttribute("text") ? elem.attribute("text") : TQString::null;
const TQString text = elem.hasAttribute("text") ? elem.attribute("text") : TQString();
dndItems.append( CDragDropMgr::Item(text) );
};
elem = elem.nextSibling().toElement();

@ -12,7 +12,7 @@
#ifndef CDRAGDROPMGR_H
#define CDRAGDROPMGR_H
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqcstring.h>
#include <tqdragobject.h>
@ -82,7 +82,7 @@ public:
* This constructor automatically sets the type member to Text
* This is also the default constructor
*/
Item(const TQString& text = TQString::null );
Item(const TQString& text = TQString() );
/** Constructor for a Bookmark item
* This constructor automatically sets the type member to Bookmark
*/
@ -135,7 +135,7 @@ public:
virtual bool provides( const char* type ) const;
virtual const char* format( int i = 0 ) const;
virtual TQByteArray encodedData( const char* type ) const;
virtual TQByteArray tqencodedData( const char* type ) const;
protected:
friend class CDragDropMgr;

@ -25,7 +25,7 @@
#include "util/ctoolclass.h"
#include "util/scoped_resource.h"
//Qt includes
//TQt includes
#include <tqclipboard.h>
#include <tqptrlist.h>
#include <tqprogressdialog.h>
@ -44,7 +44,7 @@ using namespace Rendering;
using namespace Printing;
CExportManager::CExportManager(const TQString& caption, const bool showProgress, const TQString& progressLabel, const CSwordBackend::FilterOptions filterOptions, const CSwordBackend::DisplayOptions displayOptions) {
m_caption = !caption.isEmpty() ? caption : TQString::fromLatin1("BibleTime");
m_caption = !caption.isEmpty() ? caption : TQString::tqfromLatin1("BibleTime");
m_progressLabel = progressLabel;
m_filterOptions = filterOptions;
m_displayOptions = displayOptions;
@ -237,7 +237,7 @@ const bool CExportManager::copyKey(CSwordKey* key, const Format format, const bo
text = render->renderSingleKey(key->key(), modules);
}
KApplication::clipboard()->setText(text);
KApplication::tqclipboard()->setText(text);
return true;
};
@ -272,7 +272,7 @@ const bool CExportManager::copyKeyList(sword::ListKey* list, CSwordModuleInfo* m
}
const TQString text = render->renderKeyTree(tree);
KApplication::clipboard()->setText(text);
KApplication::tqclipboard()->setText(text);
return true;
};
@ -306,7 +306,7 @@ const bool CExportManager::copyKeyList(TQPtrList<CSwordKey>& list, const Format
};
const TQString text = render->renderKeyTree(tree);
KApplication::clipboard()->setText(text);
KApplication::tqclipboard()->setText(text);
return true;
};
@ -441,11 +441,11 @@ const bool CExportManager::printKeyList(const TQStringList& list,CSwordModuleInf
CPrinter::KeyTree tree;
setProgressRange(list.count());
//ToDo: Fix that as soon as we use Qt > 3.1
//ToDo: Fix that as soon as we use TQt > 3.1
// const TQStringList::const_iterator end = list.constEnd();
const TQStringList::const_iterator end = list.end();
//ToDo: Fix that as soon as we use Qt > 3.1
//ToDo: Fix that as soon as we use TQt > 3.1
// for (TQStringList::const_iterator it = list.constBegin(); (it != end) && !progressWasCancelled(); ++it) {
for (TQStringList::const_iterator it = list.begin(); (it != end) && !progressWasCancelled(); ++it) {
@ -479,15 +479,15 @@ const TQString CExportManager::filterString( const Format format ) {
/** Returns a filename to save a file. */
const TQString CExportManager::getSaveFileName(const Format format) {
return KFileDialog::getSaveFileName(TQString::null, filterString(format), 0, m_caption);
return KFileDialog::getSaveFileName(TQString(), filterString(format), 0, m_caption);
}
/** Returns a string containing the linebreak for the current format. */
const TQString CExportManager::lineBreak(const Format format) {
if (static_cast<bool>(m_displayOptions.lineBreaks))
return (format == HTML) ? TQString::fromLatin1("<br/>\n") : TQString::fromLatin1("\n");
return (format == HTML) ? TQString::tqfromLatin1("<br/>\n") : TQString::tqfromLatin1("\n");
return TQString::null;
return TQString();
}
/** No descriptions */
@ -497,7 +497,7 @@ void CExportManager::setProgressRange( const int items ) {
dlg->setProgress(0);
dlg->setMinimumDuration(0);
dlg->show();
// dlg->repaint();
// dlg->tqrepaint();
KApplication::kApplication()->processEvents(); //do not lock the GUI!
}
}

@ -18,7 +18,7 @@
#include "util/cpointers.h"
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqptrlist.h>
@ -39,7 +39,7 @@ public:
Text
};
CExportManager(const TQString& caption, const bool showProgress = true, const TQString& progressLabel = TQString::null, const CSwordBackend::FilterOptions filterOptions = CBTConfig::getFilterOptionDefaults(), const CSwordBackend::DisplayOptions displayOptions = CBTConfig::getDisplayOptionDefaults());
CExportManager(const TQString& caption, const bool showProgress = true, const TQString& progressLabel = TQString(), const CSwordBackend::FilterOptions filterOptions = CBTConfig::getFilterOptionDefaults(), const CSwordBackend::DisplayOptions displayOptions = CBTConfig::getDisplayOptionDefaults());
const bool saveKey(CSwordKey* key, const Format format, const bool addText);
const bool saveKeyList(sword::ListKey* list, CSwordModuleInfo* module, const Format format, const bool addText);

@ -31,7 +31,7 @@
//Sword includes
#include <listkey.h>
//Qt includes
//TQt includes
#include <tqlayout.h>
#include <tqlabel.h>
#include <tqscrollview.h>
@ -47,9 +47,9 @@ using namespace sword;
namespace InfoDisplay {
CInfoDisplay::CInfoDisplay(TQWidget *parent, const char *name)
: TQWidget(parent, name) {
TQVBoxLayout* layout = new TQVBoxLayout(this);
CInfoDisplay::CInfoDisplay(TQWidget *tqparent, const char *name)
: TQWidget(tqparent, name) {
TQVBoxLayout* tqlayout = new TQVBoxLayout(this);
TQLabel* headingLabel = new TQLabel(i18n("Mag (\"shift\" to lock)"),this);
headingLabel->setMargin(5);
@ -63,8 +63,8 @@ namespace InfoDisplay {
TQT_SLOT(lookup(const TQString&, const TQString&))
);
layout->addWidget(headingLabel);
layout->addWidget(m_htmlPart->view());
tqlayout->addWidget(headingLabel);
tqlayout->addWidget(m_htmlPart->view());
}
@ -97,7 +97,7 @@ namespace InfoDisplay {
void CInfoDisplay::setInfo(const InfoType type, const TQString& data) {
ListInfoData list;
list.append( qMakePair(type, data) );
list.append( tqMakePair(type, data) );
setInfo(list);
}
@ -165,9 +165,9 @@ namespace InfoDisplay {
ret.append(
TQString("<div class=\"abbreviation\"><h3>%1: %2</h3><p>%3</p></div>")
.arg(i18n("Abbreviation"))
.arg("text")
.arg(text));
.tqarg(i18n("Abbreviation"))
.tqarg("text")
.tqarg(text));
return ret;
}
@ -176,7 +176,7 @@ namespace InfoDisplay {
Q_ASSERT(!data.isEmpty());
if (data.isEmpty()) {
return TQString("<div class=\"crossrefinfo\"><h3>%1</h3></div>")
.arg(i18n("Cross references"));
.tqarg(i18n("Cross references"));
}
// qWarning("setting crossref %s", data.latin1());
@ -267,11 +267,11 @@ namespace InfoDisplay {
}
// qWarning("rendered the tree: %s", renderer.renderKeyTree(tree).latin1());
//spanns containing rtl text need dir=rtl on their parent tag to be aligned properly
//spanns containing rtl text need dir=rtl on their tqparent tag to be aligned properly
return TQString("<div class=\"crossrefinfo\"><h3>%1</h3><div class=\"para\" dir=\"%2\">%3</div></div>")
.arg(i18n("Cross references"))
.arg(module ? ((module->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl") : "")
.arg(renderer.renderKeyTree(tree));
.tqarg(i18n("Cross references"))
.tqarg(module ? ((module->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl") : "")
.tqarg(renderer.renderKeyTree(tree));
}
/*!
@ -281,7 +281,7 @@ namespace InfoDisplay {
TQStringList list = TQStringList::split("/", data);
Q_ASSERT(list.count() >= 3);
if (!list.count()) {
return TQString::null;
return TQString();
}
const TQString modulename = list.first();
@ -293,7 +293,7 @@ namespace InfoDisplay {
CSwordModuleInfo* module = CPointers::backend()->findModuleByName(modulename);
if (!module) {
return TQString::null;
return TQString();
}
util::scoped_ptr<CSwordKey> key( CSwordKey::createInstance(module) );
@ -310,8 +310,8 @@ namespace InfoDisplay {
));
return TQString("<div class=\"footnoteinfo\"><h3>%1</h3><p>%2</p></div>")
.arg(i18n("Footnote"))
.arg(text);
.tqarg(i18n("Footnote"))
.tqarg(text);
}
const TQString CInfoDisplay::decodeStrongs( const TQString& data ) {
@ -337,9 +337,9 @@ namespace InfoDisplay {
ret.append(
TQString("<div class=\"strongsinfo\"><h3>%1: %2</h3><p>%3</p></div>")
.arg(i18n("Strongs"))
.arg(*it)
.arg(text)
.tqarg(i18n("Strongs"))
.tqarg(*it)
.tqarg(text)
);
}
@ -356,7 +356,7 @@ namespace InfoDisplay {
TQString value = "";
TQString valueClass = "";
int valStart = (*it).find(':');
int valStart = (*it).tqfind(':');
if (valStart > -1) {
valueClass = (*it).mid(0, valStart);
module = CPointers::backend()->findModuleByName( valueClass );
@ -372,7 +372,7 @@ namespace InfoDisplay {
// No need to check len, if at(1) is > len TQChar::null is
// returned which is ok to .isDigit()
if (value.at(1).isDigit()) {
switch (value.at(0).latin1()) {
switch (value.tqat(0).latin1()) {
case 'G':
module = CBTConfig::get
(CBTConfig::standardGreekMorphLexicon);
@ -416,9 +416,9 @@ namespace InfoDisplay {
//if the module wasn't found just display an empty morph info
ret.append( TQString("<div class=\"morphinfo\"><h3>%1: %2</h3><p>%3</p></div>")
.arg(i18n("Morphology"))
.arg(value)
.arg(text)
.tqarg(i18n("Morphology"))
.tqarg(value)
.tqarg(text)
);
}
@ -429,19 +429,19 @@ namespace InfoDisplay {
CSwordModuleInfo* const module = CBTConfig::get
(CBTConfig::standardLexicon);
if (!module) {
return TQString::null;
return TQString();
}
util::scoped_ptr<CSwordKey> key( CSwordKey::createInstance(module) );
key->key( data );
if (key->key().upper() != data.upper()) { //key not present in the lexicon
return TQString::null;
return TQString();
}
TQString ret = TQString("<div class=\"translationinfo\"><h3>%1: %2</h3><p>%3</p></div>")
.arg(i18n("Word lookup"))
.arg(data)
.arg(key->renderedText());
.tqarg(i18n("Word lookup"))
.tqarg(data)
.tqarg(key->renderedText());
return ret;
}
@ -456,7 +456,7 @@ namespace InfoDisplay {
settings.pageCSS_ID = "infodisplay";
m_htmlPart->setText( tmgr->fillTemplate(CBTConfig::get
(CBTConfig::displayStyle), TQString::null, settings) );
(CBTConfig::displayStyle), TQString(), settings) );
}
} //end of namespace InfoDisplay

@ -16,7 +16,7 @@
//Backend
#include "backend/ctextrendering.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqvaluelist.h>
#include <tqpair.h>
@ -31,6 +31,7 @@ namespace InfoDisplay {
*/
class CInfoDisplay : public TQWidget {
Q_OBJECT
TQ_OBJECT
public:
enum InfoType {
Abbreviation,
@ -45,7 +46,7 @@ public:
typedef TQPair<InfoType, TQString> InfoData;
typedef TQValueList<InfoData> ListInfoData;
CInfoDisplay(TQWidget *parent = 0, const char *name = 0);
CInfoDisplay(TQWidget *tqparent = 0, const char *name = 0);
virtual ~CInfoDisplay();
void setInfo(const InfoType, const TQString& data);

@ -12,7 +12,7 @@
//own includes
#include "cinputdialog.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqlabel.h>
#include <tqtextedit.h>
@ -23,7 +23,7 @@
#include <klocale.h>
#include <kseparator.h>
CInputDialog::CInputDialog(const TQString& caption, const TQString& description, const TQString& text, TQWidget *parent, const char *name, const bool modal ) : KDialog(parent,name,modal) {
CInputDialog::CInputDialog(const TQString& caption, const TQString& description, const TQString& text, TQWidget *tqparent, const char *name, const bool modal ) : KDialog(tqparent,name,modal) {
setPlainCaption(caption);
TQVBoxLayout* topLayout = new TQVBoxLayout(this, 5,5);
@ -76,9 +76,9 @@ const TQString CInputDialog::text() {
}
/** A static function to get some using CInputDialog. */
const TQString CInputDialog::getText( const TQString& caption, const TQString& description, const TQString& text, bool* ok, TQWidget* parent, bool modal) {
CInputDialog* dlg = new CInputDialog(caption, description, text, parent, "", modal);
TQString ret = TQString::null;
const TQString CInputDialog::getText( const TQString& caption, const TQString& description, const TQString& text, bool* ok, TQWidget* tqparent, bool modal) {
CInputDialog* dlg = new CInputDialog(caption, description, text, tqparent, "", modal);
TQString ret = TQString();
const bool isOk = (dlg->exec() == CInputDialog::Accepted);
if (isOk) {

@ -24,12 +24,13 @@ class TQWidget;
*/
class CInputDialog : public KDialog {
Q_OBJECT
TQ_OBJECT
public:
CInputDialog(const TQString& caption, const TQString& description, const TQString& text, TQWidget *parent=0, const char *name=0, const bool modal = true);
CInputDialog(const TQString& caption, const TQString& description, const TQString& text, TQWidget *tqparent=0, const char *name=0, const bool modal = true);
/**
* A static function to get some using CInputDialog.
*/
static const TQString getText( const TQString& caption, const TQString& description, const TQString& text = TQString::null, bool* ok = 0, TQWidget* parent = 0, bool modal = true);
static const TQString getText( const TQString& caption, const TQString& description, const TQString& text = TQString(), bool* ok = 0, TQWidget* tqparent = 0, bool modal = true);
/**
* Returns the text entered at the moment.
*/

@ -22,7 +22,7 @@
#include "backend/cswordmoduleinfo.h"
#include "backend/cswordbackend.h"
//Qt includes
//TQt includes
#include <tqlabel.h>
#include <tqlayout.h>
#include <tqframe.h>
@ -40,8 +40,8 @@
namespace BookshelfManager {
/** Constructor */
CManageIndicesWidget::CManageIndicesWidget(TQWidget* parent, const char* name) :
ManageIndicesForm(parent, name) {
CManageIndicesWidget::CManageIndicesWidget(TQWidget* tqparent, const char* name) :
ManageIndicesForm(tqparent, name) {
initView();
populateModuleList();
@ -68,7 +68,7 @@ void CManageIndicesWidget::initView()
m_moduleList->addColumn(i18n("Index size"));
m_moduleList->setRootIsDecorated(true);
m_moduleList->setColumnWidth(0, 150);
m_moduleList->setColumnAlignment(1, Qt::AlignRight);
m_moduleList->setColumnAlignment(1, TQt::AlignRight);
m_moduleList->setSorting( -1 );
m_autoDeleteOrphanedIndicesBox->setChecked( CBTConfig::get( CBTConfig::autoDeleteOrphanedIndices ) );
@ -103,7 +103,7 @@ void CManageIndicesWidget::populateModuleList() {
if ((*it)->hasIndex()) {
item = new TQCheckListItem(m_modsWithIndices, (*it)->name(),
TQCheckListItem::CheckBox);
item->setText(1, TQString("%1 ").arg((*it)->indexSize() / 1024) + i18n("KiB"));
item->setText(1, TQString("%1 ").tqarg((*it)->indexSize() / 1024) + i18n("KiB"));
}
else {
item = new TQCheckListItem(m_modsWithoutIndices, (*it)->name(),

@ -28,12 +28,13 @@ namespace BookshelfManager {
class CManageIndicesWidget : public ManageIndicesForm
{
Q_OBJECT
TQ_OBJECT
public:
/**
* Constructor
*/
CManageIndicesWidget(TQWidget* parent, const char* name = 0);
CManageIndicesWidget(TQWidget* tqparent, const char* name = 0);
/**
* Destructor

@ -28,17 +28,13 @@
#include <tqtimer.h>
#include <tqevent.h>
#include <tqtimer.h>
#if QT_VERSION < 0x030200
//We need this to close all windows with Qt < 3.2
#include <tqwidgetlist.h>
#endif
CMDIArea::CMDIArea(TQWidget *parent, const char *name )
: TQWorkspace(parent, name),
CMDIArea::CMDIArea(TQWidget *tqparent, const char *name )
: TQWorkspace(tqparent, name),
m_guiOption(Nothing),
m_childEvent(false),
m_appCaption(TQString::null) {
m_appCaption(TQString()) {
initView();
initConnections();
readSettings();
@ -47,7 +43,7 @@ m_appCaption(TQString::null) {
/** Initializes the view of the MDI area */
void CMDIArea::initView() {
setPaletteBackgroundColor( parentWidget()->paletteBackgroundColor() ); //work around a KDE bug (IMHO was in KDE 2.x)
setPaletteBackgroundColor( tqparentWidget()->paletteBackgroundColor() ); //work around a KDE bug (IMHO was in KDE 2.x)
}
/** Initilizes the connectiosn to SIGNALS */
@ -93,7 +89,7 @@ void CMDIArea::childEvent( TQChildEvent * e ) {
m_childEvent = true;
if (!windowList().count()) {
m_appCaption = TQString::null;
m_appCaption = TQString();
emit sigSetToplevelCaption( KApplication::kApplication()->makeStdCaption(m_appCaption) );
emit sigLastPresenterClosed();
}
@ -129,15 +125,7 @@ void CMDIArea::readSettings() {}
/** Deletes all the presenters in the MDI area. */
void CMDIArea::deleteAll() {
#if QT_VERSION >= 0x030200
closeAllWindows();
#else
TQWidgetListIt it(windowList());
while (it.current() != 0){
it.current()->close();
++it;
}
#endif
}
/** Enable / disable autoCascading */
@ -176,7 +164,7 @@ void CMDIArea::myTileHorizontal() {
if ((windows.count() == 1) && windows.at(0)) {
m_appCaption = windows.at(0)->caption();
windows.at(0)/*->parentWidget()*/->showMaximized();
windows.at(0)/*->tqparentWidget()*/->showMaximized();
}
else {
@ -191,13 +179,13 @@ void CMDIArea::myTileHorizontal() {
int y = 0;
for ( int i = 0; i < int(windows.count()); ++i ) {
TQWidget *window = windows.at(i);
window->parentWidget()->showNormal();
qApp->sendPostedEvents( 0, TQEvent::ShowNormal );
window->tqparentWidget()->showNormal();
tqApp->sendPostedEvents( 0, TQEvent::ShowNormal );
const int preferredHeight = window->minimumHeight() + window->parentWidget()->baseSize().height();
const int actHeight = QMAX(heightForEach, preferredHeight);
const int preferredHeight = window->minimumHeight() + window->tqparentWidget()->baseSize().height();
const int actHeight = TQMAX(heightForEach, preferredHeight);
window->parentWidget()->setGeometry( 0, y, width(), actHeight );
window->tqparentWidget()->setGeometry( 0, y, width(), actHeight );
y += actHeight;
}
@ -221,7 +209,7 @@ void CMDIArea::myCascade() {
if ((windows.count() == 1) && windows.at(0)) {
m_appCaption = windows.at(0)->caption();
windows.at(0)->parentWidget()->showMaximized();
windows.at(0)->tqparentWidget()->showMaximized();
}
else {
const int offsetX = 40;
@ -248,8 +236,8 @@ void CMDIArea::myCascade() {
window->setUpdatesEnabled(false);
window->parentWidget()->raise(); //make it the on-top-of-window-stack window to make sure they're in the right order
window->parentWidget()->setGeometry(x, y, windowWidth, windowHeight);
window->tqparentWidget()->raise(); //make it the on-top-of-window-stack window to make sure they're in the right order
window->tqparentWidget()->setGeometry(x, y, windowWidth, windowHeight);
x += offsetX;
y += offsetY;
@ -258,8 +246,8 @@ void CMDIArea::myCascade() {
setUpdatesEnabled(true);
active->parentWidget()->setGeometry(x, y, windowWidth, windowHeight);
active->parentWidget()->raise();
active->tqparentWidget()->setGeometry(x, y, windowWidth, windowHeight);
active->tqparentWidget()->raise();
active->setActiveWindow();
blockSignals(false);
@ -303,9 +291,8 @@ bool CMDIArea::eventFilter( TQObject *o, TQEvent *e ) {
TQWidget* w = dynamic_cast<TQWidget*>( o );
bool ret = TQWorkspace::eventFilter(o,e);
#if QT_VERSION >= 0x030300
if ( w && (e->type() == TQEvent::WindowStateChange) ) {
if (o->inherits("CDisplayWindow") && ((w->windowState() & Qt::WindowMinimized) || w->isHidden())) { //window was minimized, trigger a tile/cascade update if necessary
if (o->inherits("CDisplayWindow") && ((w->windowState() & TQt::WindowMinimized) || w->isHidden())) { //window was minimized, trigger a tile/cascade update if necessary
triggerWindowUpdate();
ret = false;
}
@ -315,20 +302,6 @@ bool CMDIArea::eventFilter( TQObject *o, TQEvent *e ) {
//o->dumpObjectTree();
}
}
#else
if (w && o->inherits("CDisplayWindow")){
if ((e->type() == TQEvent::ShowMinimized) ||
(e->type() == TQEvent::Hide)){
triggerWindowUpdate();
ret = false;
}
}
else if (!o->inherits("CDisplayWindow")){
qDebug("bad mdi child classname: %s", o->className());
//o->dumpObjectInfo();
//o->dumpObjectTree();
}
#endif
return ret; // standard event processing
}

@ -16,7 +16,7 @@
#include "util/cpointers.h"
#include "backend/cswordmoduleinfo.h"
//Qt includes
//TQt includes
#include <tqworkspace.h>
#include <tqptrlist.h>
#include <tqstrlist.h>
@ -32,6 +32,7 @@ class CSwordKey;
*/
class CMDIArea : public TQWorkspace, public CPointers {
Q_OBJECT
TQ_OBJECT
public:
/**
@ -43,7 +44,7 @@ public:
autoCascade,
Nothing
};
CMDIArea(TQWidget *parent, const char *name = 0 );
CMDIArea(TQWidget *tqparent, const char *name = 0 );
/**
*/
void readSettings();
@ -84,8 +85,8 @@ public slots:
* Also necessary for autoTile feature
*/
void myTileVertical();
/** Horizontal tile function
* This function was taken from Qt's MDI example.
/**Qt::Horizontal tile function
* This function was taken from TQt's MDI example.
*/
void myTileHorizontal();
/**

@ -14,7 +14,7 @@
#include "util/scoped_resource.h"
//Qt includes
//TQt includes
#include <tqstring.h>
//KDE includes
@ -38,7 +38,7 @@ void CModuleIndexDialog::indexAllModules( const ListCSwordModuleInfo& modules )
}
m_currentModuleIndex = 0;
progress = new KProgressDialog(0, "progressDialog", i18n("Preparing instant search"), TQString::null, true);
progress = new KProgressDialog(0, "progressDialog", i18n("Preparing instant search"), TQString(), true);
progress->setAllowCancel(false);
progress->progressBar()->setTotalSteps( modules.count() * 100 );
progress->setMinimumDuration(0);
@ -50,7 +50,7 @@ void CModuleIndexDialog::indexAllModules( const ListCSwordModuleInfo& modules )
(*it)->connectIndexingFinished(this, TQT_SLOT(slotFinished()));
(*it)->connectIndexingProgress(this, TQT_SLOT(slotModuleProgress(int)));
progress->setLabel(i18n("Creating index for work %1").arg((*it)->name()));
progress->setLabel(i18n("Creating index for work %1").tqarg((*it)->name()));
qDebug("Building index for work %s", (*it)->name().latin1());
(*it)->buildIndex();
@ -87,12 +87,12 @@ void CModuleIndexDialog::slotModuleProgress( int percentage ) {
// qDebug("progress %d", percentage);
progress->progressBar()->setProgress( m_currentModuleIndex * 100 + percentage );
KApplication::kApplication()->processEvents( 10 ); //10 ms only
KApplication::kApplication()->tqprocessEvents( 10 ); //10 ms only
}
void CModuleIndexDialog::slotFinished( ) {
qDebug("indexing finished()");
progress->progressBar()->setProgress( progress->progressBar()->totalSteps() );
KApplication::kApplication()->processEvents( 1 ); //1 ms only
KApplication::kApplication()->tqprocessEvents( 1 ); //1 ms only
}

@ -14,7 +14,7 @@
#include "backend/cswordmoduleinfo.h"
//Qt includes
//TQt includes
#include <tqobject.h>
//forward declaration
@ -29,6 +29,7 @@ class KProgressDialog;
*/
class CModuleIndexDialog : public TQObject {
Q_OBJECT
TQ_OBJECT
public:
/** Get the singleton instance.
*

@ -71,8 +71,8 @@
using std::string;
using std::list;
COptionsDialog::COptionsDialog(TQWidget *parent, const char *name, KActionCollection* actionCollection )
: KDialogBase(IconList, i18n("Configure BibleTime"), Ok | Cancel | Apply, Ok, parent, name, true, true, TQString::null, TQString::null, TQString::null) {
COptionsDialog::COptionsDialog(TQWidget *tqparent, const char *name, KActionCollection* actionCollection )
: KDialogBase(IconList, i18n("Configure BibleTime"), Ok | Cancel | Apply, Ok, tqparent, name, true, true, TQString(), TQString(), TQString()) {
m_settings.keys.application.actionCollection = actionCollection;
setIconListAllVisible(true);
@ -84,13 +84,13 @@ COptionsDialog::COptionsDialog(TQWidget *parent, const char *name, KActionCollec
}
COptionsDialog::~COptionsDialog() {
//the actionCollections objects are deleted by their TQWidget parent
//the actionCollections objects are deleted by their TQWidget tqparent
}
/** */
void COptionsDialog::newDisplayWindowFontSelected(const TQFont &newFont) {
CBTConfig::FontSettingsPair oldSettings = m_settings.fonts.fontMap[ m_settings.fonts.usage->currentText() ];
m_settings.fonts.fontMap.replace( m_settings.fonts.usage->currentText(), CBTConfig::FontSettingsPair(oldSettings.first, newFont) );
m_settings.fonts.fontMap.tqreplace( m_settings.fonts.usage->currentText(), CBTConfig::FontSettingsPair(oldSettings.first, newFont) );
}
/** Called when the combobox contents is changed */
@ -135,9 +135,9 @@ const bool COptionsDialog::showPart( COptionsDialog::Parts /*ID*/ ) {
/** Initializes the startup section of the OD. */
void COptionsDialog::initDisplay() {
TQFrame* page = addPage(i18n("Display"), TQString::null, DesktopIcon(CResMgr::settings::startup::icon,32));
TQVBoxLayout* layout = new TQVBoxLayout(page);
layout->setSpacing( 5 );
TQFrame* page = addPage(i18n("Display"), TQString(), DesktopIcon(CResMgr::settings::startup::icon,32));
TQVBoxLayout* tqlayout = new TQVBoxLayout(page);
tqlayout->setSpacing( 5 );
{//daily tips
m_settings.startup.showTips = new TQCheckBox(page);
@ -149,8 +149,8 @@ void COptionsDialog::initDisplay() {
m_settings.startup.showTips->setChecked( CBTConfig::get
(CBTConfig::tips) );
}
layout->addWidget(m_settings.startup.showTips);
layout->addSpacing(5);
tqlayout->addWidget(m_settings.startup.showTips);
tqlayout->addSpacing(5);
{ //startup logo
m_settings.startup.showLogo = new TQCheckBox(page);
@ -161,39 +161,39 @@ void COptionsDialog::initDisplay() {
m_settings.startup.showLogo->setChecked(CBTConfig::get
(CBTConfig::logo));
layout->addWidget(m_settings.startup.showLogo);
layout->addSpacing(20);
tqlayout->addWidget(m_settings.startup.showLogo);
tqlayout->addSpacing(20);
}
layout->addWidget(
tqlayout->addWidget(
CToolClass::explanationLabel(page, i18n("Display templates"),
i18n("Display templates define how text is displayed. Please choose a template you like.")
)
);
layout->addSpacing( 5 );
tqlayout->addSpacing( 5 );
TQHBoxLayout* hboxlayout = new TQHBoxLayout();
TQHBoxLayout* hboxtqlayout = new TQHBoxLayout();
m_settings.displayStyle.styleChooser = new TQComboBox( page ); //create first to enable buddy for label
connect( m_settings.displayStyle.styleChooser, TQT_SIGNAL( activated( int ) ),
this, TQT_SLOT( updateStylePreview() ) );
hboxlayout->addWidget(
hboxtqlayout->addWidget(
new TQLabel(m_settings.displayStyle.styleChooser, i18n("Available display styles:"), page)
);
hboxlayout->addWidget( m_settings.displayStyle.styleChooser );
hboxlayout->addStretch();
layout->addLayout( hboxlayout );
hboxtqlayout->addWidget( m_settings.displayStyle.styleChooser );
hboxtqlayout->addStretch();
tqlayout->addLayout( hboxtqlayout );
m_settings.displayStyle.stylePreview = new KHTMLPart(page);
layout->addWidget(
tqlayout->addWidget(
new TQLabel(
m_settings.displayStyle.stylePreview->view(),
i18n("Style preview"), page
)
);
layout->addWidget(m_settings.displayStyle.stylePreview->view());
tqlayout->addWidget(m_settings.displayStyle.stylePreview->view());
m_settings.displayStyle.styleChooser->insertStringList(
CPointers::displayTemplateManager()->availableTemplates()
@ -211,12 +211,12 @@ void COptionsDialog::initDisplay() {
/** Init fonts section. */
void COptionsDialog::initLanguages() {
TQFrame* page = addPage(i18n("Languages"), TQString::null, DesktopIcon(CResMgr::settings::fonts::icon, 32));
TQVBoxLayout* layout = new TQVBoxLayout(page,5);
layout->setResizeMode( TQLayout::Minimum );
TQFrame* page = addPage(i18n("Languages"), TQString(), DesktopIcon(CResMgr::settings::fonts::icon, 32));
TQVBoxLayout* tqlayout = new TQVBoxLayout(page,5);
tqlayout->setResizeMode( TQLayout::Minimum );
{ //Sword locales
layout->addWidget(
tqlayout->addWidget(
CToolClass::explanationLabel(page, i18n("Specify a language for names of Bible books"),
i18n("Sword has a number of locales available which can be used to internationalize the \
names of books of the Bible. You can specify which locale to use. If you want to \
@ -233,7 +233,7 @@ void COptionsDialog::initLanguages() {
hBoxLayout->addWidget(label);
hBoxLayout->addWidget(m_settings.fonts.swordLocaleCombo);
hBoxLayout->addStretch();
layout->addLayout(hBoxLayout);
tqlayout->addLayout(hBoxLayout);
TQStringList languageNames;
languageNames.append( languageMgr()->languageForAbbrev("en_US")->translatedName() );
@ -267,7 +267,7 @@ void COptionsDialog::initLanguages() {
);
TQString currentLanguageName;
if ( l->isValid() && languageNames.contains(l->translatedName()) ) { //tranlated language name is in the box
if ( l->isValid() && languageNames.tqcontains(l->translatedName()) ) { //tranlated language name is in the box
currentLanguageName = l->translatedName();
}
else { //a language like "German Abbrevs" might be the language to set
@ -276,7 +276,7 @@ void COptionsDialog::initLanguages() {
(CBTConfig::language).local8Bit()
);
if (locale) {
currentLanguageName = TQString::fromLatin1(locale->getDescription());
currentLanguageName = TQString::tqfromLatin1(locale->getDescription());
}
}
@ -294,10 +294,10 @@ void COptionsDialog::initLanguages() {
}
}
layout->addSpacing( 20 );
tqlayout->addSpacing( 20 );
}
{ //Font settings
layout->addWidget(
tqlayout->addWidget(
CToolClass::explanationLabel(
page,
i18n("Select custom fonts per-language"),
@ -306,7 +306,7 @@ void COptionsDialog::initLanguages() {
to be displayed correctly.")
)
);
layout->addSpacing(5);
tqlayout->addSpacing(5);
TQHBoxLayout* hLayout = new TQHBoxLayout();
m_settings.fonts.usage = new TQComboBox(page);
@ -338,12 +338,12 @@ void COptionsDialog::initLanguages() {
connect(m_settings.fonts.useOwnFontBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(useOwnFontClicked(bool)));
hLayout->addWidget(m_settings.fonts.useOwnFontBox);
layout->addLayout(hLayout);
tqlayout->addLayout(hLayout);
//#warning TODO: remember the last selected font and jump there.
m_settings.fonts.fontChooser = new KFontChooser(page, "fonts", false, TQStringList(), true, 5);
m_settings.fonts.fontChooser->setSampleText(i18n("The quick brown fox jumps over the lazy dog."));
layout->addWidget(m_settings.fonts.fontChooser);
tqlayout->addWidget(m_settings.fonts.fontChooser);
connect(m_settings.fonts.fontChooser, TQT_SIGNAL(fontSelected(const TQFont&)), TQT_SLOT(newDisplayWindowFontSelected(const TQFont&)));
connect(m_settings.fonts.usage, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(newDisplayWindowFontAreaSelected(const TQString&)));
@ -351,14 +351,14 @@ void COptionsDialog::initLanguages() {
m_settings.fonts.fontChooser->setFont( m_settings.fonts.fontMap[m_settings.fonts.usage->currentText()].second );
useOwnFontClicked( m_settings.fonts.fontMap[m_settings.fonts.usage->currentText()].first );
m_settings.fonts.useOwnFontBox->setChecked( m_settings.fonts.fontMap[m_settings.fonts.usage->currentText()].first );
m_settings.fonts.fontChooser->setMinimumSize(m_settings.fonts.fontChooser->sizeHint());
m_settings.fonts.fontChooser->setMinimumSize(m_settings.fonts.fontChooser->tqsizeHint());
}
}
/** Init accel key section. */
void COptionsDialog::initAccelerators() {
TQVBox* page = addVBoxPage(i18n("HotKeys"), TQString::null, DesktopIcon(CResMgr::settings::keys::icon,32));
TQVBox* page = addVBoxPage(i18n("HotKeys"), TQString(), DesktopIcon(CResMgr::settings::keys::icon,32));
CBTConfig::setupAccelSettings(
CBTConfig::application,
@ -455,7 +455,7 @@ void COptionsDialog::initAccelerators() {
/** Init Sword section. */
void COptionsDialog::initSword() {
TQVBox* page = addVBoxPage(i18n("Desk"),TQString::null, DesktopIcon(CResMgr::settings::sword::icon,32));
TQVBox* page = addVBoxPage(i18n("Desk"),TQString(), DesktopIcon(CResMgr::settings::sword::icon,32));
KTabCtl* tabCtl = new KTabCtl(page);
{ //Standard works
@ -635,11 +635,11 @@ void COptionsDialog::initSword() {
moduleList << m->config(CSwordModuleInfo::Description);
}
else {
moduleList << TQString::null;
moduleList << TQString();
}
}
TQString module = TQString::null;
TQString module = TQString();
int item = 0;
int count = 0;
for (TQComboBox* combo = comboList.first(); combo; combo = comboList.next() ) {
@ -658,71 +658,71 @@ void COptionsDialog::initSword() {
{ // ---------- new tab: filters -------- //
TQFrame* currentTab = new TQFrame(tabCtl);
tabCtl->addTab(currentTab, i18n("Text filters"));
TQVBoxLayout* layout = new TQVBoxLayout(currentTab,5);
TQVBoxLayout* tqlayout = new TQVBoxLayout(currentTab,5);
layout->addWidget( CToolClass::explanationLabel(currentTab, i18n("Text filters"),
tqlayout->addWidget( CToolClass::explanationLabel(currentTab, i18n("Text filters"),
i18n("Filters control the appearance of text. \
Here you can specify default settings for all filters. \
You can change the filter settings in each display window, of course.")) );
layout->addSpacing(5);
tqlayout->addSpacing(5);
m_settings.swords.lineBreaks = new TQCheckBox(currentTab);
m_settings.swords.lineBreaks->setText(i18n("Insert line break after each verse"));
m_settings.swords.lineBreaks->setChecked(CBTConfig::get
(CBTConfig::lineBreaks));
layout->addWidget(m_settings.swords.lineBreaks);
tqlayout->addWidget(m_settings.swords.lineBreaks);
m_settings.swords.verseNumbers = new TQCheckBox(currentTab);
m_settings.swords.verseNumbers->setText(i18n("Show verse numbers"));
m_settings.swords.verseNumbers->setChecked(CBTConfig::get
(CBTConfig::verseNumbers));
layout->addWidget(m_settings.swords.verseNumbers);
tqlayout->addWidget(m_settings.swords.verseNumbers);
m_settings.swords.headings = new TQCheckBox(currentTab);
m_settings.swords.headings->setText(i18n("Show section headings"));
m_settings.swords.headings->setChecked(CBTConfig::get
(CBTConfig::headings));
layout->addWidget(m_settings.swords.headings);
tqlayout->addWidget(m_settings.swords.headings);
m_settings.swords.scriptureReferences = new TQCheckBox(currentTab);
m_settings.swords.scriptureReferences->setText(i18n("Show scripture cross-references"));
m_settings.swords.scriptureReferences->setChecked(CBTConfig::get
(CBTConfig::scriptureReferences));
layout->addWidget(m_settings.swords.scriptureReferences);
tqlayout->addWidget(m_settings.swords.scriptureReferences);
m_settings.swords.greekAccents = new TQCheckBox(currentTab);
m_settings.swords.greekAccents->setText(i18n("Show Greek accents"));
m_settings.swords.greekAccents->setChecked(CBTConfig::get
(CBTConfig::greekAccents));
layout->addWidget(m_settings.swords.greekAccents);
tqlayout->addWidget(m_settings.swords.greekAccents);
m_settings.swords.hebrewPoints = new TQCheckBox(currentTab);
m_settings.swords.hebrewPoints->setText(i18n("Show Hebrew vowel points"));
m_settings.swords.hebrewPoints->setChecked(CBTConfig::get
(CBTConfig::hebrewPoints));
layout->addWidget(m_settings.swords.hebrewPoints);
tqlayout->addWidget(m_settings.swords.hebrewPoints);
m_settings.swords.hebrewCantillation = new TQCheckBox(currentTab);
m_settings.swords.hebrewCantillation->setText(i18n("Show Hebrew cantillation marks"));
m_settings.swords.hebrewCantillation->setChecked(CBTConfig::get
(CBTConfig::hebrewCantillation));
layout->addWidget(m_settings.swords.hebrewCantillation);
tqlayout->addWidget(m_settings.swords.hebrewCantillation);
m_settings.swords.morphSegmentation = new TQCheckBox(currentTab);
m_settings.swords.morphSegmentation->setText(i18n("Show morph segmentation"));
m_settings.swords.morphSegmentation->setChecked(CBTConfig::get
(CBTConfig::morphSegmentation));
layout->addWidget(m_settings.swords.morphSegmentation);
tqlayout->addWidget(m_settings.swords.morphSegmentation);
m_settings.swords.textualVariants = new TQCheckBox(currentTab);
m_settings.swords.textualVariants->setText(i18n("Use textual variants"));
m_settings.swords.textualVariants->setChecked(CBTConfig::get
(CBTConfig::textualVariants));
layout->addWidget(m_settings.swords.textualVariants);
tqlayout->addWidget(m_settings.swords.textualVariants);
layout->addStretch(4);
tqlayout->addStretch(4);
}
}
@ -800,7 +800,7 @@ void COptionsDialog::saveDisplay() {
/** No descriptions */
void COptionsDialog::saveSword() {
for (int i = 0; i <= (int)CBTConfig::lastModuleType; ++i) {
TQString moduleDescription = TQString::null;
TQString moduleDescription = TQString();
CBTConfig::modules moduleType = (CBTConfig::modules)(i);
switch (moduleType) {
@ -853,8 +853,8 @@ void COptionsDialog::saveSword() {
SWLocale* locale = LocaleMgr::getSystemLocaleMgr()->getLocale((*it).c_str());
Q_ASSERT(locale);
if ( locale && (TQString::fromLatin1(locale->getDescription()) == currentLanguageName) ) {
languageAbbrev = TQString::fromLatin1(locale->getName()); //we found the abbrevation for the current language
if ( locale && (TQString::tqfromLatin1(locale->getDescription()) == currentLanguageName) ) {
languageAbbrev = TQString::tqfromLatin1(locale->getName()); //we found the abbrevation for the current language
break;
}
}
@ -922,36 +922,36 @@ void COptionsDialog::updateStylePreview() {
tree.append( new CTextRendering::KeyTreeItem(
TQString("\n<span class=\"entryname\"><a name=\"John316\" href=\"sword://Bible/WEB/John 3:16\">16</a></span>%1")
.arg(i18n("For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.")),
.tqarg(i18n("For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.")),
settings));
tree.append( new CTextRendering::KeyTreeItem(
TQString("\n<span class=\"entryname\"><a name=\"John317\" href=\"sword://Bible/WEB/John 3:17\">17</a></span>%1")
.arg(i18n("For God didn't send his Son into the world to judge the world, but that the world should be saved through him.")),
.tqarg(i18n("For God didn't send his Son into the world to judge the world, but that the world should be saved through him.")),
settings));
settings.highlight = true;
tree.append( new CTextRendering::KeyTreeItem(
TQString("\n<span class=\"entryname\"><a name=\"John318\" href=\"sword://Bible/WEB/John 3:18\">18</a></span>%1")
.arg(i18n("He who believes in him is not judged. He who doesn't believe has been judged already, because he has not believed in the name of the one and only Son of God.")),
.tqarg(i18n("He who believes in him is not judged. He who doesn't believe has been judged already, because he has not believed in the name of the one and only Son of God.")),
settings) );
settings.highlight = false;
tree.append( new CTextRendering::KeyTreeItem(
TQString("\n<span class=\"entryname\"><a name=\"John319\" href=\"sword://Bible/WEB/John 3:19\">19</a></span>%1")
.arg(i18n("This is the judgment, that the light has come into the world, and men loved the darkness rather than the light; for their works were evil.")),
.tqarg(i18n("This is the judgment, that the light has come into the world, and men loved the darkness rather than the light; for their works were evil.")),
settings));
tree.append( new CTextRendering::KeyTreeItem(
TQString("\n<span class=\"entryname\"><a name=\"John320\" href=\"sword://Bible/WEB/John 3:20\">20</a></span>%1<br/>")
.arg(i18n("For everyone who does evil hates the light, and doesn't come to the light, lest his works would be exposed.")),
.tqarg(i18n("For everyone who does evil hates the light, and doesn't come to the light, lest his works would be exposed.")),
settings));
tree.append( new CTextRendering::KeyTreeItem(
TQString("\n<span class=\"entryname\"><a name=\"John321\" href=\"sword://Bible/WEB/John 3:21\">21</a></span>%1")
.arg(i18n("But he who does the truth comes to the light, that his works may be revealed, that they have been done in God.")),
.tqarg(i18n("But he who does the truth comes to the light, that his works may be revealed, that they have been done in God.")),
settings));
const TQString oldStyleName = CBTConfig::get
@ -978,33 +978,13 @@ void COptionsDialog::slotKeyChooserTypeChanged(const TQString& title) {
list.append(m_settings.keys.book.keyChooser);
//commit all changes in the keychoosers
#if QT_VERSION >= 0x030200
for (KeyChooserList::iterator it(list.begin()); it != list.end(); ++it) {
if (*it) { //the list may contain NULL pointers
(*it)->commitChanges();
}
}
#else
//Normally we know a TQPtrListIterator is done when it.current() == 0
//but now a value can actually be zero, which would be
//indistinguishable from the end condition.
//Therefore, more complex logic is needed.
TQPtrListIterator<KKeyChooser> it(list);
if (!it.isEmpty()){
while (!it.atLast()){
if (it.current()){
it.current()->commitChanges();
}
++it;
}
//We still have the last item to process.
if (it.current()){
it.current()->commitChanges();
}
}
#endif
/* Delete all the keychoosers in the list,
* the keychoosers are set to NULL, because they are QGuardedPtr
* the keychoosers are set to NULL, because they are TQGuardedPtr
*/
list.setAutoDelete(true);
list.clear();

@ -52,9 +52,10 @@ class KActionCollection;
*/
class COptionsDialog : public KDialogBase, public CPointers {
Q_OBJECT
TQ_OBJECT
public:
COptionsDialog(TQWidget *parent, const char *name, KActionCollection* actionCollection);
COptionsDialog(TQWidget *tqparent, const char *name, KActionCollection* actionCollection);
virtual ~COptionsDialog();
enum Parts {

@ -53,7 +53,7 @@ namespace Printing {
m_htmlPart->write(renderKeyTree(tree));
m_htmlPart->end();
m_htmlPart->view()->layout();
m_htmlPart->view()->tqlayout();
m_htmlPart->view()->print();
}
@ -72,7 +72,7 @@ namespace Printing {
return vk.key();
case KeyTreeItem::Settings::NoKey:
return TQString::null;
return TQString();
case KeyTreeItem::Settings::SimpleKey: //fall through
default:
@ -89,7 +89,7 @@ namespace Printing {
Q_ASSERT(printItem);
if (printItem && printItem->hasAlternativeContent()) {
TQString ret = TQString::fromLatin1("<div class=\"entry\"><div class=\"rangeheading\">%1</div>").arg(printItem->getAlternativeContent());
TQString ret = TQString::tqfromLatin1("<div class=\"entry\"><div class=\"rangeheading\">%1</div>").tqarg(printItem->getAlternativeContent());
if (i.hasChildItems()) {
KeyTree const * tree = i.childList();
@ -121,7 +121,7 @@ namespace Printing {
: "unknown";
settings.pageDirection = (modules.count() == 1)
? ((modules.first()->textDirection() == CSwordModuleInfo::LeftToRight) ? "ltr" : "rtl")
: TQString::null;
: TQString();
CDisplayTemplateMgr* tMgr = CPointers::displayTemplateManager();
return tMgr->fillTemplate(CBTConfig::get(CBTConfig::displayStyle), text, settings);

@ -19,7 +19,7 @@
//BibleTime frontend
#include "frontend/cbtconfig.h"
//Qt includes
//TQt includes
#include <tqobject.h>
class KHTMLPart;
@ -33,9 +33,10 @@ namespace Printing {
*/
class CPrinter : public TQObject, public Rendering::CDisplayRendering {
Q_OBJECT
TQ_OBJECT
public:
CPrinter(
TQObject *parent, CSwordBackend::DisplayOptions displayOptions, CSwordBackend::FilterOptions filterOptions
TQObject *tqparent, CSwordBackend::DisplayOptions displayOptions, CSwordBackend::FilterOptions filterOptions
);
virtual ~CPrinter();

@ -11,7 +11,7 @@
#include "cprofile.h"
//Qt includes
//TQt includes
#include <tqdom.h>
#include <tqfile.h>
#include <tqstring.h>
@ -30,7 +30,7 @@ CProfile::CProfile( const TQString& file, const TQString& name ):
m_name(name.isEmpty() ? i18n("unknown") : name),
m_filename(file),
m_fullscreen(false),
m_geometry(10,20,640,480) {
m_tqgeometry(10,20,640,480) {
m_profileWindows.setAutoDelete(true);
if (!m_filename.isEmpty() && name.isEmpty()) {
@ -38,7 +38,7 @@ m_geometry(10,20,640,480) {
}
else if (m_filename.isEmpty() && !name.isEmpty()) {
m_filename = name;
m_filename.replace(TQRegExp("\\s=#."),"_");
m_filename.tqreplace(TQRegExp("\\s=#."),"_");
KStandardDirs stdDirs;
m_filename = stdDirs.saveLocation("data", "bibletime/sessions/") + m_filename + ".xml";
init(m_filename);
@ -216,14 +216,14 @@ const bool CProfile::save(TQPtrList<CProfileWindow> windows) {
TQDomElement mainWindow = doc.createElement("MAINWINDOW");
mainWindow.setAttribute("fullscreen", fullscreen());
TQDomElement geometry = doc.createElement("GEOMETRY");
mainWindow.appendChild(geometry);
const TQRect r = this->geometry();
geometry.setAttribute("x",r.x());
geometry.setAttribute("y",r.y());
geometry.setAttribute("width",r.width());
geometry.setAttribute("height",r.height());
geometry.setAttribute("isMaximized",static_cast<int>(this->maximized()));
TQDomElement tqgeometry = doc.createElement("GEOMETRY");
mainWindow.appendChild(tqgeometry);
const TQRect r = this->tqgeometry();
tqgeometry.setAttribute("x",r.x());
tqgeometry.setAttribute("y",r.y());
tqgeometry.setAttribute("width",r.width());
tqgeometry.setAttribute("height",r.height());
tqgeometry.setAttribute("isMaximized",static_cast<int>(this->maximized()));
content.appendChild(mainWindow);
}
@ -253,14 +253,14 @@ const bool CProfile::save(TQPtrList<CProfileWindow> windows) {
window.setAttribute("hasFocus", p->hasFocus());
//save geomtery
const TQRect r = p->geometry();
TQDomElement geometry = doc.createElement("GEOMETRY");
geometry.setAttribute("x",r.x());
geometry.setAttribute("y",r.y());
geometry.setAttribute("width",r.width());
geometry.setAttribute("height",r.height());
geometry.setAttribute("isMaximized",static_cast<int>(p->maximized()));
window.appendChild( geometry );
const TQRect r = p->tqgeometry();
TQDomElement tqgeometry = doc.createElement("GEOMETRY");
tqgeometry.setAttribute("x",r.x());
tqgeometry.setAttribute("y",r.y());
tqgeometry.setAttribute("width",r.width());
tqgeometry.setAttribute("height",r.height());
tqgeometry.setAttribute("isMaximized",static_cast<int>(p->maximized()));
window.appendChild( tqgeometry );
TQDomElement modules = doc.createElement("MODULES");
modules.setAttribute("separator", "|");
@ -384,14 +384,14 @@ void CProfile::setMaximized( const bool maximized ) {
m_maximized = maximized;
}
/** Returns the geometry of the main window */
const TQRect CProfile::geometry() {
return m_geometry;
/** Returns the tqgeometry of the main window */
const TQRect CProfile::tqgeometry() {
return m_tqgeometry;
}
/** Stes the geoemtry of the main window */
void CProfile::setGeometry( const TQRect rect ) {
m_geometry = rect;
m_tqgeometry = rect;
}
} //end of namespace Profile

@ -14,7 +14,7 @@
#include "cprofilewindow.h"
//Qt includes
//TQt includes
#include <tqptrlist.h>
namespace Profile {
@ -24,7 +24,7 @@ namespace Profile {
*/
class CProfile {
public:
CProfile(const TQString& fileName, const TQString& name = TQString::null);
CProfile(const TQString& fileName, const TQString& name = TQString());
~CProfile();
/**
@ -78,9 +78,9 @@ public:
*/
void setGeometry( const TQRect rect );
/**
* Returns the geometry of the main window
* Returns the tqgeometry of the main window
*/
const TQRect geometry();
const TQRect tqgeometry();
private:
/**
@ -94,7 +94,7 @@ private:
TQString m_filename;
bool m_fullscreen;
bool m_maximized;
TQRect m_geometry;
TQRect m_tqgeometry;
};
} //end of namespace Profile

@ -11,7 +11,7 @@
#include "cprofilemgr.h"
//Qt includes
//TQt includes
#include <tqdir.h>
#include <tqfile.h>
#include <tqptrlist.h>
@ -51,7 +51,7 @@ const TQPtrList<CProfile>& CProfileMgr::profiles() {
/** Creates a new profile with the name "name" (first parameter). @return The profile object */
CProfile* CProfileMgr::create( const TQString name ) {
CProfile* p = new CProfile(TQString::null, name);
CProfile* p = new CProfile(TQString(), name);
m_profiles.append(p);
return p;
@ -97,7 +97,7 @@ CProfile* CProfileMgr::profile(const TQString& name) {
/** Returns the startup profile if it exists, otherwise return 0. */
CProfile* CProfileMgr::startupProfile() {
if (!m_startupProfile) {
m_startupProfile = new CProfile(TQString::null, "_startup_");
m_startupProfile = new CProfile(TQString(), "_startup_");
}
return m_startupProfile;

@ -14,7 +14,7 @@
#include "cprofile.h"
//Qt includes
//TQt includes
#include <tqstring.h>
namespace Profile {

@ -17,7 +17,7 @@ CProfileWindow::CProfileWindow(CSwordModuleInfo::ModuleType type)
: m_type(type),
m_windowGeometry(),
m_moduleList(),
m_key(TQString::null),
m_key(TQString()),
m_maximized(false),
m_hasFocus(false),
m_windowSettings(0),
@ -29,7 +29,7 @@ m_writeWindowType(0) {
CProfileWindow::~CProfileWindow() {}
/** Returns the size of the window including the x,y coordinates. */
const TQRect& CProfileWindow::geometry() const {
const TQRect& CProfileWindow::tqgeometry() const {
return m_windowGeometry;
}

@ -15,7 +15,7 @@
#include "backend/cswordmoduleinfo.h"
#include "backend/cswordbackend.h"
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqrect.h>
#include <tqstringlist.h>
@ -54,7 +54,7 @@ public:
/**
* Returns the size of the window including the x,y coordinates.
*/
const TQRect& geometry() const;
const TQRect& tqgeometry() const;
/**
* Returns a list of module names which are chosen in the managed window profile.
*/

@ -39,7 +39,7 @@ namespace InfoDisplay {
switch (item.settings().keyRenderingFace) {
case KeyTreeItem::Settings::NoKey: {
linkText = TQString::null;
linkText = TQString();
break; //no key is valid for all modules
}
case KeyTreeItem::Settings::CompleteShort: {
@ -72,17 +72,17 @@ namespace InfoDisplay {
if (!linkText.isEmpty()) { //if we have a valid link text
// qWarning("rendering");
return TQString("<a href=\"%1\">%2</a>")
.arg(
.tqarg(
CReferenceManager::encodeHyperlink(
module->name(),
item.key(),
CReferenceManager::typeFromModule(module->type())
)
)
.arg(linkText);
.tqarg(linkText);
}
return TQString::null;
return TQString();
}
};

@ -55,8 +55,8 @@ using namespace sword;
namespace BookshelfManager {
CSwordSetupDialog::CSwordSetupDialog(TQWidget *parent, const char *name )
: KDialogBase(IconList, i18n("Bookshelf Manager"), Ok, Ok, parent, name, true, true, TQString::null, TQString::null, TQString::null),
CSwordSetupDialog::CSwordSetupDialog(TQWidget *tqparent, const char *name )
: KDialogBase(IconList, i18n("Bookshelf Manager"), Ok, Ok, tqparent, name, true, true, TQString(), TQString(), TQString()),
m_removeModuleListView(0),
m_installModuleListPage(0),
m_installModuleListView(0),
@ -72,73 +72,73 @@ namespace BookshelfManager {
}
void CSwordSetupDialog::initSwordConfig() {
TQFrame* page = m_swordConfigPage = addPage(i18n("Bookshelf path(s)"), TQString::null, SmallIcon("bt_swordconfig",32));
TQFrame* page = m_swordConfigPage = addPage(i18n("Bookshelf path(s)"), TQString(), SmallIcon("bt_swordconfig",32));
page->setMinimumSize(500,400);
TQGridLayout* layout = new TQGridLayout(page, 6, 4);
layout->setMargin(5);
TQGridLayout* tqlayout = new TQGridLayout(page, 6, 4);
tqlayout->setMargin(5);
layout->setSpacing(10);
layout->setColStretch(0,1);
layout->setRowStretch(5,1);
tqlayout->setSpacing(10);
tqlayout->setColStretch(0,1);
tqlayout->setRowStretch(5,1);
TQLabel* mainLabel = CToolClass::explanationLabel(page,
i18n("Configure bookshelf path(s)"),
i18n("You can store your bookshelfs in one or more directories, which you can specify here.")
);
layout->addMultiCellWidget(mainLabel, 0, 0, 0, 3);
tqlayout->addMultiCellWidget(mainLabel, 0, 0, 0, 3);
TQString swordConfPath = BTInstallMgr::Tool::LocalConfig::swordConfigFilename();
TQLabel* confPathLabel = new TQLabel(i18n("Your bookshelf configuration file is <b>%1</b>").arg(swordConfPath), page);
layout->addMultiCellWidget(confPathLabel, 1,1,0,3);
TQLabel* confPathLabel = new TQLabel(i18n("Your bookshelf configuration file is <b>%1</b>").tqarg(swordConfPath), page);
tqlayout->addMultiCellWidget(confPathLabel, 1,1,0,3);
m_swordPathListBox = new TQListView(page);
// m_swordPathListBox->setFullWidth(true);
m_swordPathListBox->addColumn(i18n("Path to bookshelf"));
connect(m_swordPathListBox, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slot_swordPathSelected()));
layout->addMultiCellWidget(m_swordPathListBox, 2,5,0,1);
tqlayout->addMultiCellWidget(m_swordPathListBox, 2,5,0,1);
m_swordEditPathButton = new TQPushButton(i18n("Edit Entry"), page);
m_swordEditPathButton->setIconSet(SmallIcon("edit", 16));
connect(m_swordEditPathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordEditClicked()));
layout->addWidget(m_swordEditPathButton, 2, 3);
tqlayout->addWidget(m_swordEditPathButton, 2, 3);
m_swordAddPathButton = new TQPushButton(i18n("Add Entry"), page);
m_swordAddPathButton->setIconSet(SmallIcon("edit_add", 16));
connect(m_swordAddPathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordAddClicked()));
layout->addWidget(m_swordAddPathButton, 3,3);
tqlayout->addWidget(m_swordAddPathButton, 3,3);
m_swordRemovePathButton = new TQPushButton(i18n("Remove Entry"), page);
m_swordRemovePathButton->setIconSet(SmallIcon("editdelete", 16));
connect(m_swordRemovePathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordRemoveClicked()));
layout->addWidget(m_swordRemovePathButton, 4,3);
tqlayout->addWidget(m_swordRemovePathButton, 4,3);
setupSwordPathListBox();
}
void CSwordSetupDialog::initInstall() {
m_installPage = addPage(i18n("Install/Update works"), TQString::null, SmallIcon("bt_bible",32));
m_installPage = addPage(i18n("Install/Update works"), TQString(), SmallIcon("bt_bible",32));
TQVBoxLayout* vboxlayout = new TQVBoxLayout(m_installPage);
TQHBoxLayout* hboxlayout = new TQHBoxLayout();
hboxlayout->setAutoAdd( true );
TQVBoxLayout* vboxtqlayout = new TQVBoxLayout(m_installPage);
TQHBoxLayout* hboxtqlayout = new TQHBoxLayout();
hboxtqlayout->setAutoAdd( true );
vboxlayout->addLayout(hboxlayout);
vboxtqlayout->addLayout(hboxtqlayout);
m_installWidgetStack = new TQWidgetStack(m_installPage);
hboxlayout->addWidget(m_installWidgetStack);
hboxtqlayout->addWidget(m_installWidgetStack);
m_installSourcePage = new TQWidget(0);
m_installWidgetStack->addWidget(m_installSourcePage);
// m_installSourcePage->setMinimumSize(500,400);
TQGridLayout* layout = new TQGridLayout(m_installSourcePage, 7, 3);
layout->setMargin(5);
layout->setSpacing(10);
layout->setRowStretch(6,5);
layout->setColStretch(0,5);
TQGridLayout* tqlayout = new TQGridLayout(m_installSourcePage, 7, 3);
tqlayout->setMargin(5);
tqlayout->setSpacing(10);
tqlayout->setRowStretch(6,5);
tqlayout->setColStretch(0,5);
TQLabel* installLabel = CToolClass::explanationLabel(m_installSourcePage,
i18n("Install/update works - Step 1"),
@ -147,39 +147,39 @@ After that step click on the connect button.<br/>\
<b>WARNING: If you live in a persecuted country and do not wish to risk detection you should NOT use \
the module remote installation feature!</b>")
);
layout->addMultiCellWidget(installLabel, 0,0,0,2);
tqlayout->addMultiCellWidget(installLabel, 0,0,0,2);
TQLabel* sourceHeadingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select library")), m_installSourcePage);
layout->addMultiCellWidget(sourceHeadingLabel, 1,1,0,1);
TQLabel* sourceHeadingLabel = new TQLabel(TQString("<b>%1</b>").tqarg(i18n("Select library")), m_installSourcePage);
tqlayout->addMultiCellWidget(sourceHeadingLabel, 1,1,0,1);
m_sourceCombo = new TQComboBox(m_installSourcePage);
layout->addWidget(m_sourceCombo, 2, 0);
tqlayout->addWidget(m_sourceCombo, 2, 0);
TQPushButton* deleteSourceButton = new TQPushButton(i18n("Delete library"), m_installSourcePage);
deleteSourceButton->setIconSet(SmallIcon("remove", 16));
connect(deleteSourceButton, TQT_SIGNAL(clicked()), TQT_SLOT(slot_installDeleteSource()));
layout->addWidget(deleteSourceButton, 2, 1, Qt::AlignLeft);
tqlayout->addWidget(deleteSourceButton, 2, 1, TQt::AlignLeft);
TQPushButton* addSourceButton = new TQPushButton(i18n("Add library"), m_installSourcePage);
addSourceButton->setIconSet(SmallIcon("folder_new", 16));
connect(addSourceButton, TQT_SIGNAL(clicked()), TQT_SLOT(slot_installAddSource()));
layout->addWidget(addSourceButton, 2, 2, Qt::AlignLeft);
tqlayout->addWidget(addSourceButton, 2, 2, TQt::AlignLeft);
m_sourceLabel = new TQLabel(m_installSourcePage);
layout->addMultiCellWidget(m_sourceLabel, 3,3,0,1);
tqlayout->addMultiCellWidget(m_sourceLabel, 3,3,0,1);
TQLabel* targetHeadingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select bookshelf path")), m_installSourcePage);
layout->addMultiCellWidget(targetHeadingLabel, 4,4,0,1);
TQLabel* targetHeadingLabel = new TQLabel(TQString("<b>%1</b>").tqarg(i18n("Select bookshelf path")), m_installSourcePage);
tqlayout->addMultiCellWidget(targetHeadingLabel, 4,4,0,1);
m_targetCombo = new TQComboBox(m_installSourcePage);
layout->addWidget(m_targetCombo, 5, 0);
tqlayout->addWidget(m_targetCombo, 5, 0);
m_targetLabel = new TQLabel(m_installSourcePage);
layout->addMultiCellWidget(m_targetLabel, 6,6,0,0,Qt::AlignTop);
tqlayout->addMultiCellWidget(m_targetLabel, 6,6,0,0,TQt::AlignTop);
//part beloew main layout with the back/next buttons
//part beloew main tqlayout with the back/next buttons
TQHBoxLayout* myHBox = new TQHBoxLayout();
vboxlayout->addLayout(myHBox);
vboxtqlayout->addLayout(myHBox);
m_installBackButton = new TQPushButton(i18n("Back"), m_installPage);
m_installBackButton->setIconSet(SmallIcon("back",16));
@ -203,32 +203,32 @@ the module remote installation feature!</b>")
}
void CSwordSetupDialog::initRemove() {
TQFrame* page = m_removePage = addPage(i18n("Remove works"), TQString::null, SmallIcon("edittrash",32));
TQFrame* page = m_removePage = addPage(i18n("Remove works"), TQString(), SmallIcon("edittrash",32));
page->setMinimumSize(500,400);
TQGridLayout* layout = new TQGridLayout(page, 4, 4);
layout->setMargin(5);
TQGridLayout* tqlayout = new TQGridLayout(page, 4, 4);
tqlayout->setMargin(5);
layout->setSpacing(10);
layout->setColStretch(1,1);
layout->setRowStretch(2,1);
tqlayout->setSpacing(10);
tqlayout->setColStretch(1,1);
tqlayout->setRowStretch(2,1);
TQLabel* mainLabel= CToolClass::explanationLabel(page,
i18n("Remove installed work(s)"),
i18n("This dialog lets you remove installed works from your system. Choose the modules and then click on the remove button.")
);
layout->addMultiCellWidget(mainLabel, 0, 0, 0, 3);
tqlayout->addMultiCellWidget(mainLabel, 0, 0, 0, 3);
TQLabel* headingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select works to be uninstalled")), page);
layout->addMultiCellWidget(headingLabel, 1, 1, 0, 3);
TQLabel* headingLabel = new TQLabel(TQString("<b>%1</b>").tqarg(i18n("Select works to be uninstalled")), page);
tqlayout->addMultiCellWidget(headingLabel, 1, 1, 0, 3);
m_removeModuleListView = new CSwordSetupModuleListView(page, false);
layout->addMultiCellWidget( m_removeModuleListView, 2,2,0,3);
tqlayout->addMultiCellWidget( m_removeModuleListView, 2,2,0,3);
m_removeRemoveButton = new TQPushButton(i18n("Remove selected work(s)"), page);
m_removeRemoveButton->setIconSet( SmallIcon("edittrash", 16) );
layout->addWidget(m_removeRemoveButton, 3, 3, Qt::AlignRight);
tqlayout->addWidget(m_removeRemoveButton, 3, 3, TQt::AlignRight);
connect(m_removeRemoveButton, TQT_SIGNAL(clicked()),
this, TQT_SLOT(slot_doRemoveModules()));
@ -239,7 +239,7 @@ the module remote installation feature!</b>")
void CSwordSetupDialog::initManageIndices()
{
TQFrame* page = m_manageIndiciesPage = addPage(i18n("Manage search indicies"),
TQString::null, SmallIcon("filefind",32));
TQString(), SmallIcon("filetqfind",32));
page->setMinimumSize(500,400);
TQVBoxLayout* box = new TQVBoxLayout(page, 4, 4);
@ -364,12 +364,12 @@ the module remote installation feature!</b>")
TQString source = sourceName;
TQString rep = i18n("[Local]") + " ";
int i = source.find(rep);
int i = source.tqfind(rep);
if (i>=0) {
source.remove(i, rep.length());
}
rep = i18n("[Remote]") + " ";
i = source.find(rep);
i = source.tqfind(rep);
if (i>=0) {
source.remove(i, rep.length());
}
@ -379,10 +379,10 @@ the module remote installation feature!</b>")
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&mgr, source) ;
if (BTInstallMgr::Tool::RemoteConfig::isRemoteSource(&is)) {
url = TQString("ftp://%1%2").arg(is.source.c_str()).arg(is.directory.c_str());
url = TQString("ftp://%1%2").tqarg(is.source.c_str()).tqarg(is.directory.c_str());
}
else {
url = TQString("%1").arg(is.directory.c_str());
url = TQString("%1").tqarg(is.directory.c_str());
}
m_sourceLabel->setText( url );
@ -405,7 +405,7 @@ the module remote installation feature!</b>")
}
const TQString message = i18n("You selected the following work(s): %1.\n\n"
"Do you really want to remove them from your system?").arg(moduleList.join(", "));
"Do you really want to remove them from your system?").tqarg(moduleList.join(", "));
if ((KMessageBox::warningYesNo(0, message, i18n("Warning")) == KMessageBox::Yes)) { //Yes was pressed.
sword::InstallMgr installMgr;
@ -420,11 +420,11 @@ the module remote installation feature!</b>")
dataPath = dataPath.mid(2);
}
if (prefixPath.contains(dataPath)) { //remove module part to get the prefix path
prefixPath = prefixPath.remove( prefixPath.find(dataPath), dataPath.length() );
if (prefixPath.tqcontains(dataPath)) { //remove module part to get the prefix path
prefixPath = prefixPath.remove( prefixPath.tqfind(dataPath), dataPath.length() );
}
else { //fall back to default Sword config path
prefixPath = TQString::fromLatin1(backend()->prefixPath);
prefixPath = TQString::tqfromLatin1(backend()->prefixPath);
}
sword::SWMgr* mgr = mgrDict[ prefixPath ];
@ -481,7 +481,7 @@ the module remote installation feature!</b>")
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&iMgr, sourceName);
bool success = false;
m_progressDialog = new KProgressDialog(this, 0, i18n("Download"), TQString::null, true);
m_progressDialog = new KProgressDialog(this, 0, i18n("Download"), TQString(), true);
m_progressDialog->progressBar()->setTotalSteps(100);
m_progressDialog->setLabel( i18n("Downloading library information...") );
m_progressDialog->setMinimumDuration(0); //show immediately
@ -601,7 +601,7 @@ the module remote installation feature!</b>")
(*it),
installedModule
? installedModule->config(CSwordModuleInfo::ModuleVersion)
: TQString::null
: TQString()
);
}
m_installModuleListView->finish();
@ -612,16 +612,16 @@ the module remote installation feature!</b>")
if (!m_installModuleListPage) { //the widgets are not yet created
m_installModuleListPage = new TQWidget(0);
TQGridLayout* layout = new TQGridLayout(m_installModuleListPage, 7, 2);
layout->setMargin(5);
layout->setSpacing(10);
TQGridLayout* tqlayout = new TQGridLayout(m_installModuleListPage, 7, 2);
tqlayout->setMargin(5);
tqlayout->setSpacing(10);
TQLabel* installLabel = CToolClass::explanationLabel(m_installModuleListPage,
i18n("Install/update works - Step 2"),
i18n("Please choose the works which should be installed and/or updated and click the install button.")
);
layout->addMultiCellWidget(installLabel, 0,0,0,1);
layout->setRowStretch(0,0);
tqlayout->addMultiCellWidget(installLabel, 0,0,0,1);
tqlayout->setRowStretch(0,0);
m_installWidgetStack->addWidget(m_installModuleListPage);
m_installModuleListPage->setMinimumSize(500,400);
@ -631,9 +631,9 @@ the module remote installation feature!</b>")
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&iMgr, currentInstallSource());
m_installModuleListView = new CSwordSetupModuleListView(m_installModuleListPage, true, &is);
layout->addMultiCellWidget( m_installModuleListView, 1,6,0,1);
layout->setColStretch(0,5);
layout->setRowStretch(1,5);
tqlayout->addMultiCellWidget( m_installModuleListView, 1,6,0,1);
tqlayout->setColStretch(0,5);
tqlayout->setRowStretch(1,5);
connect(m_installModuleListView, TQT_SIGNAL(selectedModulesChanged()), TQT_SLOT(slot_installModulesChanged()));
}
@ -696,7 +696,7 @@ the module remote installation feature!</b>")
}
const TQString message = i18n("You selected the following works: %1.\n\n\
Do you really want to install them on your system?").arg(moduleList.join(", "));
Do you really want to install them on your system?").tqarg(moduleList.join(", "));
if ((KMessageBox::warningYesNo(0, message, i18n("Warning")) == KMessageBox::Yes)) { //Yes was pressed.
BTInstallMgr iMgr;
@ -722,7 +722,7 @@ the module remote installation feature!</b>")
//module are removed in this section of code
m_installedModuleCount = 0;
m_progressDialog = new KProgressDialog(this, 0, i18n("Download of work(s)"), TQString::null, true);
m_progressDialog = new KProgressDialog(this, 0, i18n("Download of work(s)"), TQString(), true);
m_progressDialog->progressBar()->setTotalSteps(100 * moduleList.count());
m_progressDialog->setMinimumDuration(0); //show immediately
m_progressDialog->setAutoClose(false);
@ -753,12 +753,12 @@ the module remote installation feature!</b>")
dataPath = dataPath.mid(2);
}
if (prefixPath.contains(dataPath)) {
prefixPath.remove( prefixPath.find(dataPath), dataPath.length() ); //complicated to work with Qt 3.0
//prefixPath = prefixPath.replace(dataPath, ""); //old code working with Qt 3.2
if (prefixPath.tqcontains(dataPath)) {
prefixPath.remove( prefixPath.tqfind(dataPath), dataPath.length() ); //complicated to work with TQt 3.0
//prefixPath = prefixPath.tqreplace(dataPath, ""); //old code working with TQt 3.2
}
else {
prefixPath = TQString::fromLatin1(backend()->prefixPath);
prefixPath = TQString::tqfromLatin1(backend()->prefixPath);
}
sword::SWMgr mgr(prefixPath.latin1());
@ -795,7 +795,7 @@ the module remote installation feature!</b>")
void CSwordSetupDialog::installCompleted( const int total, const int /* file */) {
if (m_progressDialog) {
m_progressDialog->progressBar()->setProgress(total+100*m_installedModuleCount);
m_progressDialog->setLabel( i18n("[%1]: %2% complete").arg(m_installingModule).arg(total) );
m_progressDialog->setLabel( i18n("[%1]: %2% complete").tqarg(m_installingModule).tqarg(total) );
}
KApplication::kApplication()->processEvents();
}
@ -834,7 +834,7 @@ the module remote installation feature!</b>")
}
void CSwordSetupDialog::slot_swordAddClicked() {
KURL url = KDirSelectDialog::selectDirectory(TQString::null, true);
KURL url = KDirSelectDialog::selectDirectory(TQString(), true);
if (url.isValid()) {
const TQFileInfo fi( url.path() );
if (!fi.exists() || !fi.isWritable()) {
@ -885,12 +885,12 @@ the module remote installation feature!</b>")
const TQString CSwordSetupDialog::currentInstallSource() {
TQString source = m_sourceCombo->currentText();
TQString rep = i18n("[Local]") + " ";
int i = source.find(rep);
int i = source.tqfind(rep);
if (i>=0) {
source.remove(i, rep.length());
}
rep = i18n("[Remote]") + " ";
i = source.find(rep);
i = source.tqfind(rep);
if (i>=0) {
source.remove(i, rep.length());
}

@ -44,9 +44,10 @@ namespace BookshelfManager {
*/
class CSwordSetupDialog : public KDialogBase, public CPointers {
Q_OBJECT
TQ_OBJECT
public:
CSwordSetupDialog(TQWidget *parent=0, const char *name=0);
CSwordSetupDialog(TQWidget *tqparent=0, const char *name=0);
enum Parts {
Sword,

@ -13,7 +13,7 @@
#include "cswordsetupinstallsourcesdialog.h"
#include "util/scoped_resource.h"
//Qt includes
//TQt includes
#include <tqlayout.h>
#include <tqlabel.h>
#include <tqcombobox.h>
@ -32,7 +32,7 @@ namespace BookshelfManager {
const TQString PROTO_FTP( i18n("Remote") ); //Remote path
CSwordSetupInstallSourcesDialog::CSwordSetupInstallSourcesDialog(/*TQWidget *parent*/)
CSwordSetupInstallSourcesDialog::CSwordSetupInstallSourcesDialog(/*TQWidget *tqparent*/)
: TQDialog() {
TQVBoxLayout* mainLayout = new TQVBoxLayout( this );
@ -49,29 +49,29 @@ namespace BookshelfManager {
mainLayout->addSpacing( 10 );
TQGridLayout* layout = new TQGridLayout( mainLayout, 3, 3 );
layout->setSpacing( 5 );
TQGridLayout* tqlayout = new TQGridLayout( mainLayout, 3, 3 );
tqlayout->setSpacing( 5 );
label = new TQLabel(i18n("Type"), this);
layout->addWidget( label, 0, 0);
tqlayout->addWidget( label, 0, 0);
m_serverLabel = new TQLabel(i18n("Server"), this);
layout->addWidget( m_serverLabel, 0, 1);
tqlayout->addWidget( m_serverLabel, 0, 1);
label = new TQLabel(i18n("Path"), this);
layout->addWidget( label, 0, 2 );
tqlayout->addWidget( label, 0, 2 );
m_protocolCombo = new TQComboBox( this );
layout->addWidget(m_protocolCombo, 1, 0);
tqlayout->addWidget(m_protocolCombo, 1, 0);
m_protocolCombo->insertItem( PROTO_FTP );
m_protocolCombo->insertItem( PROTO_FILE );
m_serverEdit = new TQLineEdit( this );
layout->addWidget( m_serverEdit, 1, 1 );
tqlayout->addWidget( m_serverEdit, 1, 1 );
m_serverEdit->setText("ftp.crosswire.org");
m_pathEdit = new TQLineEdit( this );
layout->addWidget( m_pathEdit, 1, 2 );
tqlayout->addWidget( m_pathEdit, 1, 2 );
m_pathEdit->setText("/pub/sword/raw");
mainLayout->addSpacing( 10 );
@ -134,7 +134,7 @@ namespace BookshelfManager {
m_serverLabel->hide();
m_serverEdit->hide();
KURL url = KDirSelectDialog::selectDirectory(TQString::null, true);
KURL url = KDirSelectDialog::selectDirectory(TQString(), true);
if (url.isValid()) {
m_pathEdit->setText( url.path() );
}

@ -12,6 +12,7 @@ namespace BookshelfManager {
class CSwordSetupInstallSourcesDialog : public TQDialog {
Q_OBJECT
TQ_OBJECT
public:
static sword::InstallSource getSource();

@ -50,7 +50,7 @@ namespace BookshelfManager {
TQListViewItem* i = m_parent->itemAt(pos);
Q_ASSERT(i);
const TQRect rect = m_parent->itemRect(i);
const TQRect rect = m_parent->tqitemRect(i);
if (m_parent->showTooltip(i, pos, 0)) {
const TQString tipText = m_parent->tooltip(i, 0);
tip(rect, tipText);
@ -65,8 +65,8 @@ namespace BookshelfManager {
* @short InstallationManager module listviews
* @author Martin Gruner
*/
CSwordSetupModuleListView::CSwordSetupModuleListView(TQWidget *parent, bool is_remote, sword::InstallSource* installSource)
: KListView(parent), m_is_remote( is_remote ) {
CSwordSetupModuleListView::CSwordSetupModuleListView(TQWidget *tqparent, bool is_remote, sword::InstallSource* installSource)
: KListView(tqparent), m_is_remote( is_remote ) {
Q_ASSERT(installSource);
new BookshelfManager::ToolTip(this);
m_backend = installSource ? BTInstallMgr::Tool::backend(installSource) : CPointers::backend();
@ -75,17 +75,17 @@ namespace BookshelfManager {
setColumnWidthMode( 0, TQListView::Maximum );
setColumnWidth( 0, 200 ); //don`t get too broad
addColumn(i18n("Status"));
setColumnAlignment(1, Qt::AlignRight);
addColumn(i18n("tqStatus"));
setColumnAlignment(1, TQt::AlignRight);
addColumn(i18n("Installed version")); //version
setColumnAlignment(2, Qt::AlignHCenter);
setColumnAlignment(2, TQt::AlignHCenter);
if (m_is_remote) {
addColumn(i18n("Remote version")); //version
} else {
addColumn(i18n("Location"));
}
setColumnAlignment(3, Qt::AlignLeft);
setColumnAlignment(3, TQt::AlignLeft);
setAllColumnsShowFocus(true);
setFullWidth(true);
@ -103,22 +103,12 @@ namespace BookshelfManager {
}
void CSwordSetupModuleListView::init() {
#if QT_VERSION >= 0x030200
m_categoryBible = new TQCheckListItem(this, i18n("Bibles"), TQCheckListItem::CheckBoxController);
m_categoryCommentary = new TQCheckListItem(this, i18n("Commentaries"), TQCheckListItem::CheckBoxController);
m_categoryLexicon = new TQCheckListItem(this, i18n("Lexicons"), TQCheckListItem::CheckBoxController);
m_categoryBook = new TQCheckListItem(this, i18n("Books"), TQCheckListItem::CheckBoxController);
m_categoryDevotionals = new TQCheckListItem(this, i18n("Daily Devotionals"), TQCheckListItem::CheckBoxController);
m_categoryGlossaries = new TQCheckListItem(this, i18n("Glossaries"), TQCheckListItem::CheckBoxController);
#else
// Qt <= 3.1.x doesn't support the CheckBoxController!, remove the define as soon as we switch to the new Qt
m_categoryBible = new TQCheckListItem(this, i18n("Bibles"), TQCheckListItem::Controller);
m_categoryCommentary = new TQCheckListItem(this, i18n("Commentaries"), TQCheckListItem::Controller);
m_categoryLexicon = new TQCheckListItem(this, i18n("Lexicons"), TQCheckListItem::Controller);
m_categoryBook = new TQCheckListItem(this, i18n("Books"), TQCheckListItem::Controller);
m_categoryDevotionals = new TQCheckListItem(this, i18n("Daily Devotionals"), TQCheckListItem::Controller);
m_categoryGlossaries = new TQCheckListItem(this, i18n("Glossaries"), TQCheckListItem::Controller);
#endif
m_categoryBible->setPixmap(0, SmallIcon(CResMgr::mainIndex::closedFolder::icon, 16));
m_categoryCommentary->setPixmap(0, SmallIcon(CResMgr::mainIndex::closedFolder::icon, 16));
@ -161,31 +151,31 @@ namespace BookshelfManager {
void CSwordSetupModuleListView::addModule(CSwordModuleInfo* module, TQString localVersion) {
TQListViewItem* parent = 0;
TQListViewItem* tqparent = 0;
switch ( module->type() ) {
case CSwordModuleInfo::Bible:
parent = m_categoryBible;
tqparent = m_categoryBible;
break;
case CSwordModuleInfo::Commentary:
parent = m_categoryCommentary;
tqparent = m_categoryCommentary;
break;
case CSwordModuleInfo::Lexicon:
parent = m_categoryLexicon;
tqparent = m_categoryLexicon;
break;
case CSwordModuleInfo::GenericBook:
parent = m_categoryBook;
tqparent = m_categoryBook;
break;
default:
parent = 0;
tqparent = 0;
break;
}
//handling for special module types
if ((parent == m_categoryLexicon) && (module->category() == CSwordModuleInfo::Glossary)) {
parent = m_categoryGlossaries;
if ((tqparent == m_categoryLexicon) && (module->category() == CSwordModuleInfo::Glossary)) {
tqparent = m_categoryGlossaries;
}
if ((parent == m_categoryLexicon) && (module->category() == CSwordModuleInfo::DailyDevotional)) {
parent = m_categoryDevotionals;
if ((tqparent == m_categoryLexicon) && (module->category() == CSwordModuleInfo::DailyDevotional)) {
tqparent = m_categoryDevotionals;
}
//now we know the category, find the right language group in that category
@ -196,8 +186,8 @@ namespace BookshelfManager {
}
TQListViewItem * langFolder = 0;
if (parent) {
langFolder = parent->firstChild();
if (tqparent) {
langFolder = tqparent->firstChild();
while( langFolder ) { //try to find language folder if it exsists
if (langFolder->text(0) == langName) { //found right folder
@ -209,12 +199,7 @@ namespace BookshelfManager {
}
if (!langFolder) { //not yet there
#if QT_VERSION >= 0x030200
langFolder = new TQCheckListItem(parent, langName, TQCheckListItem::CheckBoxController);
#else
langFolder = new TQCheckListItem(parent, langName, TQCheckListItem::Controller);
#endif
langFolder = new TQCheckListItem(tqparent, langName, TQCheckListItem::CheckBoxController);
langFolder->setPixmap(0, SmallIcon(CResMgr::mainIndex::closedFolder::icon, 16));
langFolder->setOpen(false);

@ -29,9 +29,10 @@ namespace BookshelfManager {
class CSwordSetupModuleListView : public KListView {
Q_OBJECT
TQ_OBJECT
public:
CSwordSetupModuleListView(TQWidget* parent, bool is_remote, sword::InstallSource* installSource = 0);
CSwordSetupModuleListView(TQWidget* tqparent, bool is_remote, sword::InstallSource* installSource = 0);
virtual ~CSwordSetupModuleListView();
void addModule(CSwordModuleInfo *, TQString localVersion);

@ -19,7 +19,7 @@
#include "util/ctoolclass.h"
//Qt includes
//TQt includes
#include <tqclipboard.h>
#include <tqpopupmenu.h>
#include <tqtimer.h>
@ -94,7 +94,7 @@ void CDisplayConnections::saveAnchorWithText() {
}
void CDisplayConnections::clear() {
m_display->setText(TQString::null);
m_display->setText(TQString());
}
void CDisplayConnections::zoomIn() {
@ -112,23 +112,23 @@ void CDisplayConnections::openFindTextDialog() {
/*----------------------*/
CReadDisplay* CDisplay::createReadInstance( CReadWindow* readWindow, TQWidget* parent ) {
return new CHTMLReadDisplay(readWindow, parent);
CReadDisplay* CDisplay::createReadInstance( CReadWindow* readWindow, TQWidget* tqparent ) {
return new CHTMLReadDisplay(readWindow, tqparent);
}
CWriteDisplay* CDisplay::createWriteInstance( CWriteWindow* writeWindow, const CWriteDisplay::WriteDisplayType& type, TQWidget* parent ) {
CWriteDisplay* CDisplay::createWriteInstance( CWriteWindow* writeWindow, const CWriteDisplay::WriteDisplayType& type, TQWidget* tqparent ) {
// qWarning("CDisplay::createWriteInstance");
if (type == PlainTextDisplay) {
return new CPlainWriteDisplay(writeWindow, parent);
return new CPlainWriteDisplay(writeWindow, tqparent);
}
else {
return new CHTMLWriteDisplay(writeWindow, parent);
return new CHTMLWriteDisplay(writeWindow, tqparent);
};
}
CDisplay::CDisplay(CDisplayWindow* parent) :
m_parentWindow(parent),
CDisplay::CDisplay(CDisplayWindow* tqparent) :
m_parentWindow(tqparent),
m_connections( new CDisplayConnections( this ) ),
m_popup(0) {}
@ -139,7 +139,7 @@ CDisplay::~CDisplay() {
const bool CDisplay::copy( const CDisplay::TextType format, const CDisplay::TextPart part ) {
const TQString content = text(format, part);
QClipboard* cb = KApplication::clipboard();
TQClipboard* cb = KApplication::tqclipboard();
cb->setText(content);
return true;
}
@ -147,7 +147,7 @@ const bool CDisplay::copy( const CDisplay::TextType format, const CDisplay::Text
const bool CDisplay::save( const CDisplay::TextType format, const CDisplay::TextPart part ) {
// qWarning("CDisplay::save( const CDisplay::TextType format, const CDisplay::TextPart part )");
const TQString content = text(format, part);
TQString filter = TQString::null;
TQString filter = TQString();
switch (format) {
case HTMLText:
@ -158,7 +158,7 @@ const bool CDisplay::save( const CDisplay::TextType format, const CDisplay::Text
break;
};
const TQString filename = KFileDialog::getSaveFileName(TQString::null, filter, 0, i18n("Save document ..."));
const TQString filename = KFileDialog::getSaveFileName(TQString(), filter, 0, i18n("Save document ..."));
if (!filename.isEmpty()) {
CToolClass::savePlainFile(filename, content);
@ -199,7 +199,7 @@ CDisplayConnections* const CDisplay::connectionsProxy() const {
return m_connections;
}
CDisplayWindow* const CDisplay::parentWindow() const {
CDisplayWindow* const CDisplay::tqparentWindow() const {
return m_parentWindow;
}

@ -16,7 +16,7 @@
#include "util/cpointers.h"
#include "backend/cswordbackend.h"
//Qt includes
//TQt includes
#include <tqobject.h>
#include <tqstring.h>
#include <tqmap.h>
@ -43,8 +43,8 @@ public:
PlainTextDisplay
};
static CReadDisplay* createReadInstance(CReadWindow* readWindow, TQWidget* parent = 0);
static CWriteDisplay* createWriteInstance( CWriteWindow* writeWindow, const WriteDisplayType& type = PlainTextDisplay, TQWidget* parent = 0 );
static CReadDisplay* createReadInstance(CReadWindow* readWindow, TQWidget* tqparent = 0);
static CWriteDisplay* createWriteInstance( CWriteWindow* writeWindow, const WriteDisplayType& type = PlainTextDisplay, TQWidget* tqparent = 0 );
enum TextType {
HTMLText, /* Used for HTML markup */
@ -94,9 +94,9 @@ public:
*/
virtual CDisplayConnections* const connectionsProxy() const;
/**
* Returns the parent window used for this display widget.
* Returns the tqparent window used for this display widget.
*/
CDisplayWindow* const parentWindow() const;
CDisplayWindow* const tqparentWindow() const;
virtual void print( const CDisplay::TextPart, CSwordBackend::DisplayOptions displayOptions, CSwordBackend::FilterOptions filterOptions) = 0;
/**
* Installs the popup which should be opened when the right mouse button was pressed.
@ -131,7 +131,7 @@ protected:
void emitReferenceClicked( const TQString& reference );
protected:
CDisplay(CDisplayWindow* parent);
CDisplay(CDisplayWindow* tqparent);
virtual ~CDisplay();
private:
@ -142,8 +142,9 @@ private:
class CDisplayConnections : public TQObject {
Q_OBJECT
TQ_OBJECT
public:
CDisplayConnections( CDisplay* parent );
CDisplayConnections( CDisplay* tqparent );
public slots:
virtual void selectAll();

@ -24,10 +24,10 @@
#include "util/cpointers.h"
#include "util/scoped_resource.h"
//We will need to reference this in the Qt includes
//We will need to reference this in the TQt includes
#include <kdeversion.h>
//Qt includes
//TQt includes
#include <tqcursor.h>
#include <tqscrollview.h>
#include <tqwidget.h>
@ -52,10 +52,10 @@
using namespace InfoDisplay;
CHTMLReadDisplay::CHTMLReadDisplay(CReadWindow* readWindow, TQWidget* parentWidget)
: KHTMLPart((m_view = new CHTMLReadDisplayView(this, parentWidget ? parentWidget : readWindow)), readWindow ? readWindow : parentWidget),
CHTMLReadDisplay::CHTMLReadDisplay(CReadWindow* readWindow, TQWidget* tqparentWidget)
: KHTMLPart((m_view = new CHTMLReadDisplayView(this, tqparentWidget ? tqparentWidget : readWindow)), TQT_TQOBJECT(readWindow ? readWindow : tqparentWidget)),
CReadDisplay(readWindow),
m_currentAnchorCache(TQString::null) {
m_currentAnchorCache(TQString()) {
setDNDEnabled(false);
setJavaEnabled(false);
setJScriptEnabled(false);
@ -75,7 +75,7 @@ const TQString CHTMLReadDisplay::text( const CDisplay::TextType format, const CD
return document().toHTML();
}
else {
CDisplayWindow* window = parentWindow();
CDisplayWindow* window = tqparentWindow();
CSwordKey* const key = window->key();
CSwordModuleInfo* module = key->module();
//return htmlDocument().body().innerText().string().latin1();
@ -106,7 +106,7 @@ const TQString CHTMLReadDisplay::text( const CDisplay::TextType format, const CD
case SelectedText: {
if (!hasSelection()) {
return TQString::null;
return TQString();
}
else if (format == HTMLText) {
DOM::Range range = selection();
@ -138,7 +138,7 @@ const TQString CHTMLReadDisplay::text( const CDisplay::TextType format, const CD
return key->strippedText();
}
return TQString::null;
return TQString();
}
case AnchorWithText: {
@ -168,14 +168,14 @@ const TQString CHTMLReadDisplay::text( const CDisplay::TextType format, const CD
.append(key->module()->name())
.append(")");
/* ("%1\n(%2, %3)")
.arg()
.arg(key->key())
.arg(key->module()->name());*/
.tqarg()
.tqarg(key->key())
.tqarg(key->module()->name());*/
}
return TQString::null;
return TQString();
}
default:
return TQString::null;
return TQString();
}
}
@ -271,7 +271,7 @@ void CHTMLReadDisplay::khtmlMousePressEvent( khtml::MousePressEvent* event ) {
if (event->qmouseEvent()->button() == Qt::RightButton) {
DOM::Node tmpNode = event->innerNode();
DOM::Node attr;
m_nodeInfo[CDisplay::Lemma] = TQString::null;
m_nodeInfo[CDisplay::Lemma] = TQString();
do {
if (!tmpNode.isNull() && (tmpNode.nodeType() ==
@ -305,7 +305,7 @@ void CHTMLReadDisplay::khtmlMousePressEvent( khtml::MousePressEvent* event ) {
/** Reimplementation for our drag&drop system. Also needed for the mouse tracking */
void CHTMLReadDisplay::khtmlMouseMoveEvent( khtml::MouseMoveEvent* e ) {
if( e->qmouseEvent()->state() & LeftButton == LeftButton) { //left mouse button pressed
if( e->qmouseEvent()->state() & Qt::LeftButton == Qt::LeftButton) { //left mouse button pressed
const int delay = KGlobalSettings::dndEventDelay();
TQPoint newPos = TQPoint(e->x(), e->y());
@ -315,15 +315,15 @@ void CHTMLReadDisplay::khtmlMouseMoveEvent( khtml::MouseMoveEvent* e ) {
TQDragObject* d = 0;
if (!m_dndData.anchor.isEmpty() && (m_dndData.dragType == DNDData::Link) && !m_dndData.node.isNull() ) {
// create a new bookmark drag!
TQString module = TQString::null;
TQString key = TQString::null;
TQString module = TQString();
TQString key = TQString();
CReferenceManager::Type type;
if ( !CReferenceManager::decodeHyperlink(m_dndData.anchor.string(), module, key, type) )
return;
CDragDropMgr::ItemList dndItems;
//no description!
dndItems.append( CDragDropMgr::Item(module, key, TQString::null) );
dndItems.append( CDragDropMgr::Item(module, key, TQString()) );
d = CDragDropMgr::dragObject(dndItems, KHTMLPart::view()->viewport());
}
else if ((m_dndData.dragType == DNDData::Text) && !m_dndData.selection.isEmpty()) {
@ -344,7 +344,7 @@ void CHTMLReadDisplay::khtmlMouseMoveEvent( khtml::MouseMoveEvent* e ) {
}
}
}
else if (getMouseTracking() && !(e->qmouseEvent()->state() & Qt::ShiftButton == Qt::ShiftButton)) {
else if (getMouseTracking() && !(e->qmouseEvent()->state() & TQt::ShiftButton == TQt::ShiftButton)) {
//no mouse button pressed and tracking enabled
DOM::Node node = e->innerNode();
//if no link was under the mouse try to find a title attribute
@ -352,7 +352,7 @@ void CHTMLReadDisplay::khtmlMouseMoveEvent( khtml::MouseMoveEvent* e ) {
// we want to avoid processing the node again
// After some millisecs the new timer activates the Mag window update, see timerEvent()
// SHIFT key not pressed, so we start timer
if ( !(e->qmouseEvent()->state() & Qt::ShiftButton)) {
if ( !(e->qmouseEvent()->state() & TQt::ShiftButton)) {
// TQObject has simple timer
killTimers();
startTimer( CBTConfig::get(CBTConfig::magDelay) );
@ -378,27 +378,27 @@ void CHTMLReadDisplay::timerEvent( TQTimerEvent *e ) {
if (!currentNode.isNull() && (currentNode.nodeType() == DOM::Node::ELEMENT_NODE) && currentNode.hasAttributes()) { //found right node
attr = currentNode.attributes().getNamedItem("note");
if (!attr.isNull()) {
infoList.append( qMakePair(CInfoDisplay::Footnote, attr.nodeValue().string()) );
infoList.append( tqMakePair(CInfoDisplay::Footnote, attr.nodeValue().string()) );
}
attr = currentNode.attributes().getNamedItem("lemma");
if (!attr.isNull()) {
infoList.append( qMakePair(CInfoDisplay::Lemma, attr.nodeValue().string()) );
infoList.append( tqMakePair(CInfoDisplay::Lemma, attr.nodeValue().string()) );
}
attr = currentNode.attributes().getNamedItem("morph");
if (!attr.isNull()) {
infoList.append( qMakePair(CInfoDisplay::Morph, attr.nodeValue().string()) );
infoList.append( tqMakePair(CInfoDisplay::Morph, attr.nodeValue().string()) );
}
attr = currentNode.attributes().getNamedItem("expansion");
if (!attr.isNull()) {
infoList.append( qMakePair(CInfoDisplay::Abbreviation, attr.nodeValue().string()) );
infoList.append( tqMakePair(CInfoDisplay::Abbreviation, attr.nodeValue().string()) );
}
attr = currentNode.attributes().getNamedItem("crossrefs");
if (!attr.isNull()) {
infoList.append( qMakePair(CInfoDisplay::CrossReference, attr.nodeValue().string()) );
infoList.append( tqMakePair(CInfoDisplay::CrossReference, attr.nodeValue().string()) );
}
}
@ -422,7 +422,7 @@ void CHTMLReadDisplay::timerEvent( TQTimerEvent *e ) {
// ---------------------
CHTMLReadDisplayView::CHTMLReadDisplayView(CHTMLReadDisplay* displayWidget, TQWidget* parent) : KHTMLView(displayWidget, parent), m_display(displayWidget) {
CHTMLReadDisplayView::CHTMLReadDisplayView(CHTMLReadDisplay* displayWidget, TQWidget* tqparent) : KHTMLView(displayWidget, tqparent), m_display(displayWidget) {
viewport()->setAcceptDrops(true);
setMarginWidth(4);
setMarginHeight(4);
@ -482,7 +482,7 @@ void CHTMLReadDisplay::slotGoToAnchor() {
qDebug("anchor %s not present!", m_currentAnchorCache.latin1());
}
}
m_currentAnchorCache = TQString::null;
m_currentAnchorCache = TQString();
}
void CHTMLReadDisplay::zoomIn() {

@ -16,7 +16,7 @@
#include "creaddisplay.h"
//#include "frontend/ctooltip.h"
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqwidget.h>
@ -32,6 +32,7 @@ class CHTMLReadDisplayView;
*/
class CHTMLReadDisplay : public KHTMLPart, public CReadDisplay {
Q_OBJECT
TQ_OBJECT
public:
//reimplemented functions from CDisplay
/**
@ -60,7 +61,7 @@ public:
protected:
friend class CDisplay;
CHTMLReadDisplay( CReadWindow* readWindow, TQWidget* parent = 0 );
CHTMLReadDisplay( CReadWindow* readWindow, TQWidget* tqparent = 0 );
virtual ~CHTMLReadDisplay();
virtual void urlSelected( const TQString& url, int button, int state, const TQString& _target, KParts::URLArgs args);
@ -113,11 +114,12 @@ protected slots:
class CHTMLReadDisplayView : public KHTMLView, public CPointers {
Q_OBJECT
TQ_OBJECT
protected: // Protected methods
friend class CHTMLReadDisplay;
CHTMLReadDisplayView(CHTMLReadDisplay* display, TQWidget* parent);
CHTMLReadDisplayView(CHTMLReadDisplay* display, TQWidget* tqparent);
/**
* Reimplementation from TQScrollView. Sets the right slots
*/

@ -15,7 +15,7 @@
#include "util/cresmgr.h"
//Qt includes
//TQt includes
#include <tqpopupmenu.h>
#include <tqtooltip.h>
@ -27,14 +27,14 @@
#include <kcolorbutton.h>
#include <kpopupmenu.h>
CHTMLWriteDisplay::CHTMLWriteDisplay(CWriteWindow* parentWindow, TQWidget* parent)
: CPlainWriteDisplay(parentWindow,parent) {
CHTMLWriteDisplay::CHTMLWriteDisplay(CWriteWindow* tqparentWindow, TQWidget* tqparent)
: CPlainWriteDisplay(tqparentWindow,tqparent) {
m_actions.bold = 0;
m_actions.italic = 0;
m_actions.underline = 0;
m_actions.selectAll = 0;
setTextFormat(Qt::RichText);
setTextFormat(TQt::RichText);
setAcceptDrops(true);
viewport()->setAcceptDrops(true);
}
@ -43,7 +43,7 @@ CHTMLWriteDisplay::~CHTMLWriteDisplay() {}
void CHTMLWriteDisplay::setText( const TQString& newText ) {
TQString text = newText;
// text.replace("\n<br/><!-- BT newline -->\n", "\n");
// text.tqreplace("\n<br/><!-- BT newline -->\n", "\n");
TQTextEdit::setText(text);
}
@ -66,40 +66,40 @@ void CHTMLWriteDisplay::toggleUnderline() {
void CHTMLWriteDisplay::alignLeft() {
setAlignment(Qt::AlignLeft);
tqsetAlignment(TQt::AlignLeft);
};
void CHTMLWriteDisplay::alignCenter() {
setAlignment(Qt::AlignHCenter);
tqsetAlignment(TQt::AlignHCenter);
};
void CHTMLWriteDisplay::alignRight() {
setAlignment(Qt::AlignRight);
tqsetAlignment(TQt::AlignRight);
};
/** The text's alignment changed. Enable the right buttons. */
/** The text's tqalignment changed. Enable the right buttons. */
void CHTMLWriteDisplay::slotAlignmentChanged( int a ) {
bool alignLeft = false;
bool alignCenter = false;
bool alignRight = false;
// bool alignJustify = false;
if (a & Qt::AlignLeft) {
if (a & TQt::AlignLeft) {
alignLeft = true;
}
else if ((a & Qt::AlignHCenter) || (a & Qt::AlignCenter)) {
else if ((a & TQt::AlignHCenter) || (a & TQt::AlignCenter)) {
alignCenter = true;
}
else if (a & Qt::AlignRight) {
else if (a & TQt::AlignRight) {
alignRight = true;
}
// else if (a & Qt::AlignJustify) {
// else if (a & TQt::AlignJustify) {
// alignJustify = true;
// }
else {
alignLeft = true;
qWarning("unknown alignment %i", a);
qWarning("unknown tqalignment %i", a);
}
m_actions.alignLeft->setChecked( alignLeft );
@ -138,7 +138,7 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
m_actions.fontChooser->setToolTip( CResMgr::displaywindows::writeWindow::fontFamily::tooltip );
m_actions.fontChooser->plug(bar);
connect(m_actions.fontChooser, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(setFamily(const TQString&)));
connect(m_actions.fontChooser, TQT_SIGNAL(activated(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(setFamily(const TQString&)));
m_actions.fontSizeChooser = new KFontSizeAction( i18n("Choose a font size"),
@ -149,11 +149,11 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
m_actions.fontSizeChooser->setToolTip( CResMgr::displaywindows::writeWindow::fontSize::tooltip );
m_actions.fontSizeChooser->plug(bar);
connect(m_actions.fontSizeChooser, TQT_SIGNAL(fontSizeChanged(int)), this, TQT_SLOT(setPointSize(int)));
connect(m_actions.fontSizeChooser, TQT_SIGNAL(fontSizeChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(setPointSize(int)));
m_colorButton = new KColorButton(bar);
connect(m_colorButton, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(slotColorSelected(const TQColor&)));
bar->insertWidget(50, m_colorButton->sizeHint().width(), m_colorButton);
connect(m_colorButton, TQT_SIGNAL(changed(const TQColor&)), TQT_TQOBJECT(this), TQT_SLOT(slotColorSelected(const TQColor&)));
bar->insertWidget(50, m_colorButton->tqsizeHint().width(), m_colorButton);
TQToolTip::add
(m_colorButton, CResMgr::displaywindows::writeWindow::fontColor::tooltip );
@ -164,7 +164,7 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
m_actions.bold = new KToggleAction( i18n("Bold"),
CResMgr::displaywindows::writeWindow::boldText::icon,
CResMgr::displaywindows::writeWindow::boldText::accel,
this, TQT_SLOT(toggleBold()),
TQT_TQOBJECT(this), TQT_SLOT(toggleBold()),
actions,
CResMgr::displaywindows::writeWindow::boldText::actionName
);
@ -175,7 +175,7 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
m_actions.italic = new KToggleAction( i18n("Italic"),
CResMgr::displaywindows::writeWindow::italicText::icon,
CResMgr::displaywindows::writeWindow::italicText::accel,
this, TQT_SLOT(toggleItalic()),
TQT_TQOBJECT(this), TQT_SLOT(toggleItalic()),
actions,
CResMgr::displaywindows::writeWindow::italicText::actionName
);
@ -186,7 +186,7 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
m_actions.underline = new KToggleAction( i18n("Underline"),
CResMgr::displaywindows::writeWindow::underlinedText::icon,
CResMgr::displaywindows::writeWindow::underlinedText::accel,
this, TQT_SLOT(toggleUnderline()),
TQT_TQOBJECT(this), TQT_SLOT(toggleUnderline()),
actions,
CResMgr::displaywindows::writeWindow::underlinedText::actionName
);
@ -195,12 +195,12 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
m_actions.underline->plug(bar);
(new KActionSeparator())->plug(bar); //seperate formatting from alignment buttons
(new KActionSeparator())->plug(bar); //seperate formatting from tqalignment buttons
m_actions.alignLeft = new KToggleAction( i18n("Left"),
CResMgr::displaywindows::writeWindow::alignLeft::icon,
CResMgr::displaywindows::writeWindow::alignLeft::accel,
this, TQT_SLOT( alignLeft() ),
TQT_TQOBJECT(this), TQT_SLOT( alignLeft() ),
actions,
CResMgr::displaywindows::writeWindow::alignLeft::actionName
);
@ -211,7 +211,7 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
m_actions.alignCenter = new KToggleAction( i18n("Center"),
CResMgr::displaywindows::writeWindow::alignCenter::icon,
CResMgr::displaywindows::writeWindow::alignCenter::accel,
this, TQT_SLOT(alignCenter()),
TQT_TQOBJECT(this), TQT_SLOT(alignCenter()),
actions,
CResMgr::displaywindows::writeWindow::alignCenter::actionName
);
@ -222,7 +222,7 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
m_actions.alignRight = new KToggleAction( i18n("Right"),
CResMgr::displaywindows::writeWindow::alignRight::icon,
CResMgr::displaywindows::writeWindow::alignRight::accel,
this, TQT_SLOT(alignRight()),
TQT_TQOBJECT(this), TQT_SLOT(alignRight()),
actions,
CResMgr::displaywindows::writeWindow::alignRight::actionName
);
@ -248,14 +248,14 @@ void CHTMLWriteDisplay::setupToolbar(KToolBar * bar, KActionCollection * actions
//set initial values for toolbar items
slotFontChanged( font() );
slotAlignmentChanged( alignment() );
slotAlignmentChanged( tqalignment() );
slotColorChanged( color() );
}
/** Reimplementation to show a popup menu if the right mouse butoon was clicked. */
TQPopupMenu* CHTMLWriteDisplay::createPopupMenu( const TQPoint& /*pos*/ ) {
if (!m_actions.selectAll) {
m_actions.selectAll = new KAction(i18n("Select all"), KShortcut(0), this, TQT_SLOT(selectAll()), this);
m_actions.selectAll = new KAction(i18n("Select all"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(selectAll()), TQT_TQOBJECT(this));
}
KPopupMenu* popup = new KPopupMenu(this);

@ -15,7 +15,7 @@
//BibleTime includes
#include "cplainwritedisplay.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqtextedit.h>
@ -34,6 +34,7 @@ class KColorButton;
*/
class CHTMLWriteDisplay : public CPlainWriteDisplay {
Q_OBJECT
TQ_OBJECT
public:
/**
* Sets the new text for this display widget.
@ -51,7 +52,7 @@ public:
protected:
friend class CDisplay;
CHTMLWriteDisplay(CWriteWindow* parentWindow, TQWidget* parent);
CHTMLWriteDisplay(CWriteWindow* tqparentWindow, TQWidget* tqparent);
~CHTMLWriteDisplay();
/**
* Reimplementation to show a popup menu if the right mouse butoon was clicked.
@ -69,7 +70,7 @@ protected slots:
void slotFontChanged( const TQFont& );
/**
* The text's alignment changed. Enable the right buttons.
* The text's tqalignment changed. Enable the right buttons.
*/
void slotAlignmentChanged( int );
/**

@ -17,14 +17,14 @@
#include "util/scoped_resource.h"
//Qt includes
//TQt includes
//KDE includes
#include <kaction.h>
#include <klocale.h>
CPlainWriteDisplay::CPlainWriteDisplay(CWriteWindow* parentWindow, TQWidget* parent) : TQTextEdit(parentWindow ? parentWindow : parent), CWriteDisplay(parentWindow) {
setTextFormat(Qt::PlainText);
CPlainWriteDisplay::CPlainWriteDisplay(CWriteWindow* tqparentWindow, TQWidget* tqparent) : TQTextEdit(tqparentWindow ? tqparentWindow : tqparent), CWriteDisplay(tqparentWindow) {
setTextFormat(TQt::PlainText);
setAcceptDrops(true);
viewport()->setAcceptDrops(true);
@ -42,8 +42,8 @@ void CPlainWriteDisplay::selectAll() {
void CPlainWriteDisplay::setText( const TQString& newText ) {
//make sure the text has been converted to show \n instead of <br/>
TQString text = newText;
// text.replace("\n<br /><!-- BT newline -->\n", "\n");
text.replace("<br />", "\n"); //inserted by BT or the Qt textedit widget
// text.tqreplace("\n<br /><!-- BT newline -->\n", "\n");
text.tqreplace("<br />", "\n"); //inserted by BT or the TQt textedit widget
TQTextEdit::setText(text);
}
@ -58,7 +58,7 @@ TQWidget* CPlainWriteDisplay::view() {
}
const TQString CPlainWriteDisplay::text( const CDisplay::TextType /*format*/, const CDisplay::TextPart /*part*/) {
return TQString::null;
return TQString();
}
void CPlainWriteDisplay::print( const CDisplay::TextPart, CSwordBackend::DisplayOptions displayOptions, CSwordBackend::FilterOptions filterOptions ) {
@ -80,7 +80,7 @@ const TQString CPlainWriteDisplay::plainText() {
TQString ret = TQTextEdit::text();
//in plain text mode the text just contains newlines, convert them into <br/> before we return the text for display in a HTML widget
ret.replace("\n", "<br />");
ret.tqreplace("\n", "<br />");
return ret;
}
@ -138,7 +138,7 @@ void CPlainWriteDisplay::contentsDropEvent( TQDropEvent* e ) {
TQString moduleText = key->strippedText();
const TQString text = TQString::fromLatin1("%1\n(%2, %3)\n").arg(moduleText).arg((*it).bookmarkKey()).arg((*it).bookmarkModule());
const TQString text = TQString::tqfromLatin1("%1\n(%2, %3)\n").tqarg(moduleText).tqarg((*it).bookmarkKey()).tqarg((*it).bookmarkModule());
placeCursor( e->pos() );
insert( text );

@ -15,7 +15,7 @@
//Bibletime include files
#include "cwritedisplay.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqtextedit.h>
@ -66,7 +66,7 @@ protected:
friend class CDisplay;
friend class CHTMLWriteDisplay;
CPlainWriteDisplay(CWriteWindow* parentWindow, TQWidget* parent);
CPlainWriteDisplay(CWriteWindow* tqparentWindow, TQWidget* tqparent);
virtual ~CPlainWriteDisplay();
/**
* Reimplementation from TQTextEdit. Provides an popup menu for the given position.

@ -28,7 +28,7 @@
#include "util/scoped_resource.h"
//Qt includes
//TQt includes
#include <tqpopupmenu.h>
//KDE includes
@ -36,7 +36,7 @@
CReadDisplay::CReadDisplay(CReadWindow* readWindow) :
CDisplay(readWindow),
m_activeAnchor(TQString::null),
m_activeAnchor(TQString()),
m_useMouseTracking(true) {}
CReadDisplay::~CReadDisplay() {}
@ -59,12 +59,12 @@ const bool CReadDisplay::hasActiveAnchor() {
void CReadDisplay::print(const CDisplay::TextPart type, CSwordBackend::DisplayOptions displayOptions, CSwordBackend::FilterOptions filterOptions) {
CDisplayWindow* window = parentWindow();
CDisplayWindow* window = tqparentWindow();
CSwordKey* const key = window->key();
CSwordModuleInfo* module = key->module();
CExportManager mgr(i18n("Print keys"),false, TQString::null, parentWindow()->filterOptions(), parentWindow()->displayOptions());
CExportManager mgr(i18n("Print keys"),false, TQString(), tqparentWindow()->filterOptions(), tqparentWindow()->displayOptions());
switch (type) {
case Document: {

@ -14,7 +14,7 @@
#include "frontend/displaywindow/cwritewindow.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
CWriteDisplay::CWriteDisplay( CWriteWindow* writeWindow ) : CDisplay(writeWindow) {}

@ -29,7 +29,7 @@
#include <math.h>
//Qt includes
//TQt includes
#include <tqwidgetlist.h>
#include <tqtimer.h>
@ -40,7 +40,7 @@
using namespace Profile;
CBibleReadWindow::CBibleReadWindow(ListCSwordModuleInfo moduleList, CMDIArea* parent, const char *name ) : CLexiconReadWindow(moduleList, parent,name) {
CBibleReadWindow::CBibleReadWindow(ListCSwordModuleInfo moduleList, CMDIArea* tqparent, const char *name ) : CLexiconReadWindow(moduleList, tqparent,name) {
}
CBibleReadWindow::~CBibleReadWindow() {}
@ -53,10 +53,10 @@ void CBibleReadWindow::applyProfileSettings( CProfileWindow* const settings ) {
for (int i = count-1; i>=1; i--) {
if (result-(int)pow((double)2,i-1)>= 0) { //2^i was added before, so item with index i is set
result -= (int)pow((double)2,i-1);
displaySettingsButton()->setItemStatus(i,true);
displaySettingsButton()->setItemtqStatus(i,true);
}
else {
displaySettingsButton()->setItemStatus(i,false);
displaySettingsButton()->setItemtqStatus(i,false);
}
}
displaySettingsButton()->setChanged();
@ -69,7 +69,7 @@ void CBibleReadWindow::storeProfileSettings( CProfileWindow* const settings ) {
int result = 0;
//now check every item
for (int i = 1; i < count; i++) { //first item is a title
if (displaySettingsButton()->itemStatus(i)) //item is checked
if (displaySettingsButton()->itemtqStatus(i)) //item is checked
result += (int)pow((double)2,i-1);//add 2^i (the i. digit in binary)
}
settings->setWindowSettings(result);
@ -133,37 +133,37 @@ void CBibleReadWindow::initActions() {
new KAction(
i18n("Next book"),
CResMgr::displaywindows::bibleWindow::nextBook::accel,
this, TQT_SLOT(nextBook()),
TQT_TQOBJECT(this), TQT_SLOT(nextBook()),
actionCollection(), "nextBook"
);
new KAction(
i18n("Previous book"),
CResMgr::displaywindows::bibleWindow::previousBook::accel,
this, TQT_SLOT(previousBook()),
TQT_TQOBJECT(this), TQT_SLOT(previousBook()),
actionCollection(), "previousBook"
);
new KAction(
i18n("Next chapter"),
CResMgr::displaywindows::bibleWindow::nextChapter::accel,
this, TQT_SLOT(nextChapter()),
TQT_TQOBJECT(this), TQT_SLOT(nextChapter()),
actionCollection(), "nextChapter"
);
new KAction(
i18n("Previous chapter"),
CResMgr::displaywindows::bibleWindow::previousChapter::accel,
this, TQT_SLOT(previousChapter()),
TQT_TQOBJECT(this), TQT_SLOT(previousChapter()),
actionCollection(), "previousChapter"
);
new KAction(
i18n("Next verse"),
CResMgr::displaywindows::bibleWindow::nextVerse::accel,
this, TQT_SLOT(nextVerse()),
TQT_TQOBJECT(this), TQT_SLOT(nextVerse()),
actionCollection(), "nextVerse"
);
new KAction(
i18n("Previous verse"),
CResMgr::displaywindows::bibleWindow::previousVerse::accel,
this, TQT_SLOT(previousVerse()),
TQT_TQOBJECT(this), TQT_SLOT(previousVerse()),
actionCollection(), "previousVerse"
);
@ -177,7 +177,7 @@ void CBibleReadWindow::initActions() {
i18n("Strong's Search"),
CResMgr::displaywindows::general::findStrongs::icon,
CResMgr::displaywindows::general::findStrongs::accel,
this, TQT_SLOT(openSearchStrongsDialog()),
TQT_TQOBJECT(this), TQT_SLOT(openSearchStrongsDialog()),
actionCollection(),
CResMgr::displaywindows::general::findStrongs::actionName);
@ -188,20 +188,20 @@ void CBibleReadWindow::initActions() {
m_actions.copy.referenceAndText = new KAction(i18n("Reference with text"), KShortcut(0), displayWidget()->connectionsProxy(), TQT_SLOT(copyAnchorWithText()), actionCollection(), "copyReferenceWithText");
m_actions.copy.chapter = new KAction(i18n("Chapter"), KShortcut(0), this, TQT_SLOT(copyDisplayedText()), actionCollection(), "copyChapter");
m_actions.copy.chapter = new KAction(i18n("Chapter"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(copyDisplayedText()), actionCollection(), "copyChapter");
m_actions.copy.selectedText = actionCollection()->action("copySelectedText");
Q_ASSERT(m_actions.copy.selectedText);
m_actions.save.referenceAndText = new KAction(i18n("Reference with text"), KShortcut(0), displayWidget()->connectionsProxy(), TQT_SLOT(saveAnchorWithText()), actionCollection(), "saveReferenceWithText");
m_actions.save.chapterAsPlain = new KAction(i18n("Chapter as plain text"), KShortcut(0), this, TQT_SLOT(saveChapterPlain()), actionCollection(), "saveChapterAsPlainText");
m_actions.save.chapterAsPlain = new KAction(i18n("Chapter as plain text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(saveChapterPlain()), actionCollection(), "saveChapterAsPlainText");
m_actions.save.chapterAsHTML = new KAction(i18n("Chapter as HTML"), KShortcut(0), this, TQT_SLOT(saveChapterHTML()), actionCollection(), "saveChapterAsHTML");
m_actions.save.chapterAsHTML = new KAction(i18n("Chapter as HTML"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(saveChapterHTML()), actionCollection(), "saveChapterAsHTML");
m_actions.print.reference = new KAction(i18n("Reference with text"), KShortcut(0), this, TQT_SLOT(printAnchorWithText()), actionCollection(), "saveReferenceWithText");
m_actions.print.reference = new KAction(i18n("Reference with text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(printAnchorWithText()), actionCollection(), "saveReferenceWithText");
m_actions.print.chapter = new KAction(i18n("Chapter"), KShortcut(0), this, TQT_SLOT(printAll()), actionCollection(), "printChapter");
m_actions.print.chapter = new KAction(i18n("Chapter"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(printAll()), actionCollection(), "printChapter");
CBTConfig::setupAccelSettings(CBTConfig::bibleWindow, actionCollection());
}
@ -221,7 +221,7 @@ void CBibleReadWindow::initToolbars() {
void CBibleReadWindow::initView() {
CLexiconReadWindow::initView();
parentWidget()->installEventFilter( this );
tqparentWidget()->installEventFilter( this );
}
/** Reimplementation. */
@ -232,26 +232,26 @@ void CBibleReadWindow::setupPopupMenu() {
m_actions.findStrongs->plug(popup());
m_actions.selectAll->plug(popup());
(new KActionSeparator(this))->plug( popup() );
(new KActionSeparator(TQT_TQOBJECT(this)))->plug( popup() );
m_actions.copyMenu = new KActionMenu(i18n("Copy..."), CResMgr::displaywindows::bibleWindow::copyMenu::icon, popup());
m_actions.copyMenu = new KActionMenu(i18n("Copy..."), CResMgr::displaywindows::bibleWindow::copyMenu::icon, TQT_TQOBJECT(popup()));
m_actions.copyMenu->setDelayed( false );
m_actions.copyMenu->insert(m_actions.copy.referenceOnly);
m_actions.copyMenu->insert(m_actions.copy.referenceTextOnly);
m_actions.copyMenu->insert(m_actions.copy.referenceAndText);
m_actions.copyMenu->insert(m_actions.copy.chapter);
m_actions.copyMenu->insert(new KActionSeparator(this));
m_actions.copyMenu->insert(new KActionSeparator(TQT_TQOBJECT(this)));
m_actions.copyMenu->insert(m_actions.copy.selectedText);
m_actions.copyMenu->plug(popup());
m_actions.saveMenu = new KActionMenu(i18n("Save..."),CResMgr::displaywindows::bibleWindow::saveMenu::icon, popup());
m_actions.saveMenu = new KActionMenu(i18n("Save..."),CResMgr::displaywindows::bibleWindow::saveMenu::icon,TQT_TQOBJECT(popup()));
m_actions.saveMenu->setDelayed( false );
m_actions.saveMenu->insert(m_actions.save.referenceAndText);
m_actions.saveMenu->insert(m_actions.save.chapterAsPlain);
m_actions.saveMenu->insert(m_actions.save.chapterAsHTML);
m_actions.saveMenu->plug(popup());
m_actions.printMenu = new KActionMenu(i18n("Print..."),CResMgr::displaywindows::bibleWindow::printMenu::icon, popup());
m_actions.printMenu = new KActionMenu(i18n("Print..."),CResMgr::displaywindows::bibleWindow::printMenu::icon, TQT_TQOBJECT(popup()));
m_actions.printMenu->setDelayed(false);
m_actions.printMenu->insert(m_actions.print.reference);
m_actions.printMenu->insert(m_actions.print.chapter);
@ -273,7 +273,7 @@ void CBibleReadWindow::updatePopupMenu() {
// }
//
// m_actions.findStrongs->setEnabled( hasStrongs );
m_actions.findStrongs->setEnabled( displayWidget()->getCurrentNodeInfo()[CDisplay::Lemma] != TQString::null );
m_actions.findStrongs->setEnabled( displayWidget()->getCurrentNodeInfo()[CDisplay::Lemma] != TQString() );
m_actions.copy.referenceOnly->setEnabled( displayWidget()->hasActiveAnchor() );
@ -422,9 +422,9 @@ bool CBibleReadWindow::eventFilter( TQObject* o, TQEvent* e) {
* the mousebutton clicked.
*
* This is not really in a KHTML event handler but works anyway.
* Sometime KDE/Qt is hard to use ...
* Sometime KDE/TQt is hard to use ...
*/
TQTimer::singleShot(0, this, TQT_SLOT(syncWindows()));
TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(syncWindows()));
}
return ret;

@ -18,7 +18,7 @@
#include "backend/cswordkey.h"
#include "backend/cswordversekey.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
//KDE includes
@ -33,8 +33,9 @@ class CTransliterationButton;
class CBibleReadWindow : public CLexiconReadWindow {
Q_OBJECT
TQ_OBJECT
public:
CBibleReadWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
CBibleReadWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name=0);
virtual ~CBibleReadWindow();
/**
* Store the settings of this window in the given CProfileWindow object.

@ -23,7 +23,7 @@
#include "util/ctoolclass.h"
#include "util/cresmgr.h"
//Qt includes
//TQt includes
#include <tqsplitter.h>
//KDE includes
@ -33,7 +33,7 @@
using namespace Profile;
CBookReadWindow::CBookReadWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name) : CLexiconReadWindow(modules, parent, name) {}
CBookReadWindow::CBookReadWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name) : CLexiconReadWindow(modules, tqparent, name) {}
CBookReadWindow::~CBookReadWindow() {}
@ -65,7 +65,7 @@ void CBookReadWindow::initActions() {
i18n("Toggle tree view"),
CResMgr::displaywindows::bookWindow::toggleTree::icon,
CResMgr::displaywindows::bookWindow::toggleTree::accel,
this, TQT_SLOT(treeToggled()),
TQT_TQOBJECT(this), TQT_SLOT(treeToggled()),
actionCollection(), "toggleTree");
CBTConfig::setupAccelSettings(CBTConfig::bookWindow, actionCollection());
@ -93,7 +93,7 @@ void CBookReadWindow::initConnections() {
CLexiconReadWindow::initConnections();
connect(m_treeChooser, TQT_SIGNAL(keyChanged(CSwordKey*)),
this, TQT_SLOT(lookup(CSwordKey*)));
TQT_TQOBJECT(this), TQT_SLOT(lookup(CSwordKey*)));
connect(m_treeChooser, TQT_SIGNAL(keyChanged(CSwordKey*)),
keyChooser(), TQT_SLOT(updateKey(CSwordKey*)));
connect(keyChooser(), TQT_SIGNAL(keyChanged(CSwordKey*)),
@ -134,7 +134,7 @@ void CBookReadWindow::initToolbars() {
m_actions.backInHistory->plug( mainToolBar(), 0 );
m_actions.forwardInHistory->plug( mainToolBar(), 1 );
mainToolBar()->insertWidget(0,keyChooser()->sizeHint().width(),keyChooser());
mainToolBar()->insertWidget(0,keyChooser()->tqsizeHint().width(),keyChooser());
m_treeAction->plug(buttonsToolBar());
m_treeAction->setChecked(false);

@ -26,10 +26,11 @@ class CBookTreeChooser;
*/
class CBookReadWindow : public CLexiconReadWindow {
Q_OBJECT
TQ_OBJECT
public:
static void insertKeyboardActions( KActionCollection* const a );
CBookReadWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
CBookReadWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name=0);
virtual ~CBookReadWindow();
/**

@ -16,7 +16,7 @@
#include "util/cpointers.h"
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqtooltip.h>
@ -25,8 +25,8 @@
#include <klocale.h>
// CTransliterationButton::CTransliterationButton(CSwordBackend::FilterOptions* filterOptions, TQWidget *parent, const char *name )
// : KToolBarButton(CResMgr::displaywindows::transliteration::icon, 0,parent,name) {
// CTransliterationButton::CTransliterationButton(CSwordBackend::FilterOptions* filterOptions, TQWidget *tqparent, const char *name )
// : KToolBarButton(CResMgr::displaywindows::transliteration::icon, 0,tqparent,name) {
// m_filterOptions = filterOptions;
// m_filterOptions->transliteration = 0;
//
@ -65,7 +65,7 @@
// sword::StringList::iterator it;
//
// for (it = options.begin(); it != options.end(); ++it) {
// int id = m_popup->insertItem(TQString::fromLatin1((*it).c_str()));
// int id = m_popup->insertItem(TQString::tqfromLatin1((*it).c_str()));
// if (m_filterOptions->transliteration == m_popup->indexOf(id)-1 ) { //workaround
// m_popup->setItemChecked(id, true);
// }
@ -86,8 +86,8 @@
*********** CDisplaySettingsButton *************
************************************************/
CDisplaySettingsButton::CDisplaySettingsButton(CSwordBackend::DisplayOptions *displaySettings, CSwordBackend::FilterOptions *moduleSettings, const ListCSwordModuleInfo& useModules,TQWidget *parent, const char *name )
: KToolBarButton(CResMgr::displaywindows::displaySettings::icon, 0, parent, name) {
CDisplaySettingsButton::CDisplaySettingsButton(CSwordBackend::DisplayOptions *displaySettings, CSwordBackend::FilterOptions *moduleSettings, const ListCSwordModuleInfo& useModules,TQWidget *tqparent, const char *name )
: KToolBarButton(CResMgr::displaywindows::displaySettings::icon, 0, tqparent, name) {
// qWarning("CDisplaySettingsButton::CDisplaySettingsButton");
m_displaySettings = displaySettings;
m_moduleSettings = moduleSettings;
@ -198,7 +198,7 @@ const int CDisplaySettingsButton::menuItemCount() {
}
/** Sets the item at position pos to the satet given as 2nd paramter. */
void CDisplaySettingsButton::setItemStatus( const int index, const bool checked ) {
void CDisplaySettingsButton::setItemtqStatus( const int index, const bool checked ) {
const int ID = m_popup->idAt(index);
m_popup->setItemChecked(ID, checked);
const TQString text = m_popup->text(ID).remove('&');
@ -208,7 +208,7 @@ void CDisplaySettingsButton::setItemStatus( const int index, const bool checked
}
/** Returns the status of the item at position "index" */
const bool CDisplaySettingsButton::itemStatus( const int index ) {
const bool CDisplaySettingsButton::itemtqStatus( const int index ) {
return m_popup->isItemChecked( m_popup->idAt(index) );
}

@ -29,8 +29,9 @@ class KPopupMenu;
*/
// class CTransliterationButton : public KToolBarButton {
// Q_OBJECT
// TQ_OBJECT
// public:
// CTransliterationButton(CSwordBackend::FilterOptions* displayOptions, TQWidget *parent, const char *name=0);
// CTransliterationButton(CSwordBackend::FilterOptions* displayOptions, TQWidget *tqparent, const char *name=0);
// ~CTransliterationButton();
// /**
// * Setup the menu entries.
@ -57,13 +58,14 @@ class KPopupMenu;
*/
class CDisplaySettingsButton : public KToolBarButton {
Q_OBJECT
TQ_OBJECT
public:
CDisplaySettingsButton(CSwordBackend::DisplayOptions *displaySettings, CSwordBackend::FilterOptions *settings, const ListCSwordModuleInfo& useModules, TQWidget *parent=0, const char *name=0);
CDisplaySettingsButton(CSwordBackend::DisplayOptions *displaySettings, CSwordBackend::FilterOptions *settings, const ListCSwordModuleInfo& useModules, TQWidget *tqparent=0, const char *name=0);
void reset(const ListCSwordModuleInfo& useModules);
/**
* Sets the item at position pos to the satet given as 2nd paramter.
*/
void setItemStatus( const int pos, const bool checked );
void setItemtqStatus( const int pos, const bool checked );
/**
* Returns the number of usable menu items in the setttings menu.
*/
@ -71,7 +73,7 @@ public:
/**
* Returns the status of the item at position "index"
*/
const bool itemStatus( const int index );
const bool itemtqStatus( const int index );
/**
* Sets the status to changed. The signal changed will be emitted.
*/

@ -21,7 +21,7 @@
#include "util/ctoolclass.h"
#include "util/cresmgr.h"
//Qt includes
//TQt includes
//KDE includes
#include <kaction.h>
@ -31,7 +31,7 @@
using namespace Profile;
CCommentaryReadWindow::CCommentaryReadWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name) : CLexiconReadWindow(modules, parent,name) {}
CCommentaryReadWindow::CCommentaryReadWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name) : CLexiconReadWindow(modules, tqparent,name) {}
void CCommentaryReadWindow::insertKeyboardActions( KActionCollection* const a ) {
new KAction(
@ -110,37 +110,37 @@ void CCommentaryReadWindow::initActions() {
new KAction(
i18n("Next book"),
CResMgr::displaywindows::bibleWindow::nextBook::accel,
this, TQT_SLOT(nextBook()),
TQT_TQOBJECT(this), TQT_SLOT(nextBook()),
actionCollection(), "nextBook"
);
new KAction(
i18n("Previous book"),
CResMgr::displaywindows::bibleWindow::previousBook::accel,
this, TQT_SLOT(previousBook()),
TQT_TQOBJECT(this), TQT_SLOT(previousBook()),
actionCollection(), "previousBook"
);
new KAction(
i18n("Next chapter"),
CResMgr::displaywindows::bibleWindow::nextChapter::accel,
this, TQT_SLOT(nextChapter()),
TQT_TQOBJECT(this), TQT_SLOT(nextChapter()),
actionCollection(), "nextChapter"
);
new KAction(
i18n("Previous chapter"),
CResMgr::displaywindows::bibleWindow::previousChapter::accel,
this, TQT_SLOT(previousChapter()),
TQT_TQOBJECT(this), TQT_SLOT(previousChapter()),
actionCollection(), "previousChapter"
);
new KAction(
i18n("Next verse"),
CResMgr::displaywindows::bibleWindow::nextVerse::accel,
this, TQT_SLOT(nextVerse()),
TQT_TQOBJECT(this), TQT_SLOT(nextVerse()),
actionCollection(), "nextVerse"
);
new KAction(
i18n("Previous verse"),
CResMgr::displaywindows::bibleWindow::previousVerse::accel,
this, TQT_SLOT(previousVerse()),
TQT_TQOBJECT(this), TQT_SLOT(previousVerse()),
actionCollection(), "previousVerse"
);

@ -15,7 +15,7 @@
//BibleTime includes
#include "cbiblereadwindow.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
/**
@ -24,13 +24,14 @@
class CCommentaryReadWindow : public CLexiconReadWindow {
Q_OBJECT
TQ_OBJECT
public:
/**
* Reimplementation.
*/
static void insertKeyboardActions( KActionCollection* const a );
CCommentaryReadWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
CCommentaryReadWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name=0);
/**
* Store the settings of this window in the given CProfileWindow object.
*/

@ -39,7 +39,7 @@
#include "util/cresmgr.h"
//Qt includes
//TQt includes
//KDE includes
#include <kdeversion.h>
@ -48,16 +48,16 @@
using namespace Profile;
CReadWindow* CDisplayWindow::createReadInstance(ListCSwordModuleInfo modules, CMDIArea* parent, const char* name) {
CReadWindow* CDisplayWindow::createReadInstance(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char* name) {
switch (modules.first()->type()) {
case CSwordModuleInfo::Bible:
return new CBibleReadWindow(modules, parent, name);
return new CBibleReadWindow(modules, tqparent, name);
case CSwordModuleInfo::Commentary:
return new CCommentaryReadWindow(modules, parent, name);
return new CCommentaryReadWindow(modules, tqparent, name);
case CSwordModuleInfo::Lexicon:
return new CLexiconReadWindow(modules, parent, name);
return new CLexiconReadWindow(modules, tqparent, name);
case CSwordModuleInfo::GenericBook:
return new CBookReadWindow(modules, parent, name);
return new CBookReadWindow(modules, tqparent, name);
default:
qWarning("unknown module type");
break;
@ -66,23 +66,23 @@ CReadWindow* CDisplayWindow::createReadInstance(ListCSwordModuleInfo modules, CM
}
CWriteWindow* CDisplayWindow::createWriteInstance(ListCSwordModuleInfo modules, CMDIArea* parent, const CDisplayWindow::WriteWindowType type, const char* name) {
CWriteWindow* CDisplayWindow::createWriteInstance(ListCSwordModuleInfo modules, CMDIArea* tqparent, const CDisplayWindow::WriteWindowType type, const char* name) {
if (type == HTMLWindow) {
return new CHTMLWriteWindow(modules, parent, name);
return new CHTMLWriteWindow(modules, tqparent, name);
}
else {
return new CPlainWriteWindow(modules, parent, name);
return new CPlainWriteWindow(modules, tqparent, name);
}
return 0;
}
CDisplayWindow::CDisplayWindow(ListCSwordModuleInfo modules, CMDIArea *parent, const char *name )
CDisplayWindow::CDisplayWindow(ListCSwordModuleInfo modules, CMDIArea *tqparent, const char *name )
#if KDE_VERSION >= 0x030200
: KMainWindow(KMainWindow::NoDCOPObject, parent, name, WDestructiveClose),
: KMainWindow(KMainWindow::NoDCOPObject, tqparent, name, WDestructiveClose),
#else
: KMainWindow(parent, name, WDestructiveClose),
: KMainWindow(tqparent, name, WDestructiveClose),
#endif
m_mdi(parent),
m_mdi(tqparent),
m_filterOptions(),
m_displayOptions(),
m_displaySettingsButton(0),
@ -108,7 +108,7 @@ CMDIArea* const CDisplayWindow::mdi() const {
/** Returns the right window caption. */
const TQString CDisplayWindow::windowCaption() {
if (!m_modules.count()) {
return TQString::null;
return TQString();
}
return TQString(key()->key()).append(" (").append(m_modules.join(" | ")).append(")");
@ -161,7 +161,7 @@ void CDisplayWindow::initActions() {
new KAction(i18n("Search"),
CResMgr::displaywindows::general::search::icon,
CResMgr::displaywindows::general::search::accel,
this, TQT_SLOT(slotSearchInModules()),
TQT_TQOBJECT(this), TQT_SLOT(slotSearchInModules()),
actionCollection(), CResMgr::displaywindows::general::search::actionName
);
@ -174,7 +174,7 @@ void CDisplayWindow::initActions() {
actionCollection(), "zoomOut"
);
KStdAction::close(
this, TQT_SLOT(close()),
TQT_TQOBJECT(this), TQT_SLOT(close()),
actionCollection(), "closeWindow"
);
@ -195,13 +195,13 @@ void CDisplayWindow::initActions() {
new KToolBarPopupAction(
i18n("Back in history"), CResMgr::displaywindows::general::backInHistory::icon, CResMgr::displaywindows::general::backInHistory::accel,
keyChooser(), TQT_SLOT( backInHistory() ),
TQT_TQOBJECT(keyChooser()), TQT_SLOT( backInHistory() ),
actionCollection(), CResMgr::displaywindows::general::backInHistory::actionName
);
new KToolBarPopupAction(
i18n("Forward in history"), CResMgr::displaywindows::general::forwardInHistory::icon, CResMgr::displaywindows::general::forwardInHistory::accel,
keyChooser(), TQT_SLOT( forwardInHistory() ),
TQT_TQOBJECT(keyChooser()), TQT_SLOT( forwardInHistory() ),
actionCollection(), CResMgr::displaywindows::general::forwardInHistory::actionName
);
@ -351,8 +351,8 @@ const bool CDisplayWindow::init() {
setCaption(windowCaption());
//setup focus stuff.
setFocusPolicy(TQWidget::ClickFocus);
parentWidget()->setFocusPolicy(TQWidget::ClickFocus);
setFocusPolicy(TQ_ClickFocus);
tqparentWidget()->setFocusPolicy(TQ_ClickFocus);
initActions();
initToolbars();
@ -421,7 +421,7 @@ void CDisplayWindow::lookup( const TQString& moduleName, const TQString& keyName
}
//ToDo: check for containsRef compat
if (m && modules().contains(m)) {
if (m && modules().tqcontains(m)) {
key()->key(keyName);
keyChooser()->setKey(key()); //the key chooser does send an update signal
}

@ -24,7 +24,7 @@
#include "frontend/cprofilewindow.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
//KDE includes
@ -51,14 +51,15 @@ class KPopupMenu;
class CDisplayWindow : public KMainWindow, public CPointers {
Q_OBJECT
TQ_OBJECT
public:
enum WriteWindowType {
HTMLWindow = 1,
PlainTextWindow = 2
};
static CReadWindow* createReadInstance(ListCSwordModuleInfo modules, CMDIArea* parent, const char* name = 0);
static CWriteWindow* createWriteInstance(ListCSwordModuleInfo modules, CMDIArea* parent, const WriteWindowType type = HTMLWindow, const char* name = 0);
static CReadWindow* createReadInstance(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char* name = 0);
static CWriteWindow* createWriteInstance(ListCSwordModuleInfo modules, CMDIArea* tqparent, const WriteWindowType type = HTMLWindow, const char* name = 0);
/**
* Insert the keyboard accelerators of this window into the given KAccel object.
*/
@ -71,7 +72,7 @@ public:
*/
const TQString windowCaption();
/**
* Returns the used modules as a QPtrList
* Returns the used modules as a TQPtrList
*/
ListCSwordModuleInfo modules();
/**
@ -194,7 +195,7 @@ protected:
friend class CMDIArea;
friend class CBibleReadWindow;
CDisplayWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
CDisplayWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name=0);
virtual ~CDisplayWindow();
/**
* Initializes the intern keyboard actions.

@ -17,7 +17,7 @@
#include "util/cresmgr.h"
//Qt includes
//TQt includes
//KDE includes
#include <kaction.h>
@ -25,8 +25,8 @@
using namespace Profile;
CHTMLWriteWindow::CHTMLWriteWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name)
: CPlainWriteWindow(modules, parent, name) {}
CHTMLWriteWindow::CHTMLWriteWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name)
: CPlainWriteWindow(modules, tqparent, name) {}
CHTMLWriteWindow::~CHTMLWriteWindow() {}
@ -41,7 +41,7 @@ void CHTMLWriteWindow::initView() {
addDockWindow(mainToolBar());
setKeyChooser( CKeyChooser::createInstance(modules(), key(), mainToolBar()) );
mainToolBar()->insertWidget(0,keyChooser()->sizeHint().width(),keyChooser());
mainToolBar()->insertWidget(0,keyChooser()->tqsizeHint().width(),keyChooser());
mainToolBar()->setFullSize(false);
};
@ -49,9 +49,9 @@ void CHTMLWriteWindow::initConnections() {
CWriteWindow::initConnections();
connect(keyChooser(), TQT_SIGNAL(keyChanged(CSwordKey*)),
this, TQT_SLOT(lookup(CSwordKey*)));
TQT_TQOBJECT(this), TQT_SLOT(lookup(CSwordKey*)));
connect(displayWidget()->connectionsProxy(), TQT_SIGNAL(textChanged()),
this, TQT_SLOT(textChanged()) );
TQT_TQOBJECT(this), TQT_SLOT(textChanged()) );
};
void CHTMLWriteWindow::initToolbars() {
@ -68,7 +68,7 @@ void CHTMLWriteWindow::initToolbars() {
m_actions.saveText = new KAction( i18n("Save text"),
CResMgr::displaywindows::writeWindow::saveText::icon,
CResMgr::displaywindows::writeWindow::saveText::accel,
this, TQT_SLOT( saveCurrentText() ),
TQT_TQOBJECT(this), TQT_SLOT( saveCurrentText() ),
actionCollection(),
CResMgr::displaywindows::writeWindow::saveText::actionName
);
@ -78,7 +78,7 @@ void CHTMLWriteWindow::initToolbars() {
m_actions.deleteEntry = new KAction(i18n("Delete current entry"),
CResMgr::displaywindows::writeWindow::deleteEntry::icon,
CResMgr::displaywindows::writeWindow::deleteEntry::accel,
this, TQT_SLOT(deleteEntry()),
TQT_TQOBJECT(this), TQT_SLOT(deleteEntry()),
actionCollection(),
CResMgr::displaywindows::writeWindow::deleteEntry::actionName
);
@ -88,7 +88,7 @@ void CHTMLWriteWindow::initToolbars() {
m_actions.restoreText = new KAction(i18n("Restore original text"),
CResMgr::displaywindows::writeWindow::restoreText::icon,
CResMgr::displaywindows::writeWindow::restoreText::accel,
this, TQT_SLOT(restoreText()), actionCollection(),
TQT_TQOBJECT(this), TQT_SLOT(restoreText()), actionCollection(),
CResMgr::displaywindows::writeWindow::restoreText::actionName
);
m_actions.restoreText->setToolTip( CResMgr::displaywindows::writeWindow::restoreText::tooltip );

@ -15,7 +15,7 @@
//BibleTime includes
#include "cplainwritewindow.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
class KAction;
@ -25,8 +25,9 @@ class KAction;
*/
class CHTMLWriteWindow : public CPlainWriteWindow {
Q_OBJECT
TQ_OBJECT
public:
CHTMLWriteWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name = 0);
CHTMLWriteWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name = 0);
virtual ~CHTMLWriteWindow();
/**

@ -26,7 +26,7 @@
#include "util/ctoolclass.h"
#include "util/cresmgr.h"
//Qt includes
//TQt includes
//KDE includes
#include <kaccel.h>
@ -36,7 +36,7 @@
#include <kdeversion.h>
// #include <kactionclasses.h>
CLexiconReadWindow::CLexiconReadWindow(ListCSwordModuleInfo moduleList, CMDIArea* parent, const char *name) : CReadWindow(moduleList, parent,name) {
CLexiconReadWindow::CLexiconReadWindow(ListCSwordModuleInfo moduleList, CMDIArea* tqparent, const char *name) : CReadWindow(moduleList, tqparent,name) {
setKey( CSwordKey::createInstance(moduleList.first()) );
}
@ -81,12 +81,12 @@ void CLexiconReadWindow::initActions() {
new KAction(
i18n("Next entry"), CResMgr::displaywindows::lexiconWindow::nextEntry::accel,
this, TQT_SLOT( nextEntry() ),
TQT_TQOBJECT(this), TQT_SLOT( nextEntry() ),
actionCollection(), "nextEntry"
);
new KAction(
i18n("Previous entry"), CResMgr::displaywindows::lexiconWindow::previousEntry::accel,
this, TQT_SLOT( previousEntry() ),
TQT_TQOBJECT(this), TQT_SLOT( previousEntry() ),
actionCollection(), "previousEntry"
);
@ -101,7 +101,7 @@ void CLexiconReadWindow::initActions() {
i18n("Strong's Search"),
CResMgr::displaywindows::general::findStrongs::icon,
CResMgr::displaywindows::general::findStrongs::accel,
this, TQT_SLOT(openSearchStrongsDialog()),
TQT_TQOBJECT(this), TQT_SLOT(openSearchStrongsDialog()),
actionCollection(),
CResMgr::displaywindows::general::findStrongs::actionName);
@ -112,13 +112,13 @@ void CLexiconReadWindow::initActions() {
m_actions.copy.selectedText = actionCollection()->action("copySelectedText");
Q_ASSERT(m_actions.copy.selectedText);
m_actions.save.entryAsPlain = new KAction(i18n("Entry as plain text"), KShortcut(0), this, TQT_SLOT(saveAsPlain()),actionCollection(), "saveEntryAsPlain");
m_actions.save.entryAsPlain = new KAction(i18n("Entry as plain text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(saveAsPlain()),actionCollection(), "saveEntryAsPlain");
m_actions.save.entryAsHTML = new KAction(i18n("Entry as HTML"), KShortcut(0), this, TQT_SLOT(saveAsHTML()), actionCollection(), "saveEntryAsHTML");
m_actions.save.entryAsHTML = new KAction(i18n("Entry as HTML"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(saveAsHTML()), actionCollection(), "saveEntryAsHTML");
m_actions.print.reference = new KAction(i18n("Reference only"), KShortcut(0), this, TQT_SLOT(printAnchorWithText()), actionCollection(), "printReferenceOnly");
m_actions.print.reference = new KAction(i18n("Reference only"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(printAnchorWithText()), actionCollection(), "printReferenceOnly");
m_actions.print.entry = new KAction(i18n("Entry with text"), KShortcut(0), this, TQT_SLOT(printAll()), actionCollection(), "printEntryWithText");
m_actions.print.entry = new KAction(i18n("Entry with text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(printAll()), actionCollection(), "printEntryWithText");
// init with the user defined settings
CBTConfig::setupAccelSettings(CBTConfig::lexiconWindow, actionCollection());
@ -129,14 +129,14 @@ void CLexiconReadWindow::initConnections() {
Q_ASSERT(keyChooser());
connect(keyChooser(), TQT_SIGNAL(keyChanged(CSwordKey*)),
this, TQT_SLOT(lookup(CSwordKey*)));
TQT_TQOBJECT(this), TQT_SLOT(lookup(CSwordKey*)));
connect(keyChooser(), TQT_SIGNAL(historyChanged()),
this, TQT_SLOT(slotUpdateHistoryButtons()));
TQT_TQOBJECT(this), TQT_SLOT(slotUpdateHistoryButtons()));
//connect the history actions to the right slots
connect(
m_actions.backInHistory->popupMenu(), TQT_SIGNAL(aboutToShow()),
this, TQT_SLOT(slotFillBackHistory())
TQT_TQOBJECT(this), TQT_SLOT(slotFillBackHistory())
);
connect(
m_actions.backInHistory->popupMenu(), TQT_SIGNAL(activated(int)),
@ -144,7 +144,7 @@ void CLexiconReadWindow::initConnections() {
);
connect(
m_actions.forwardInHistory->popupMenu(), TQT_SIGNAL(aboutToShow()),
this, TQT_SLOT(slotFillForwardHistory())
TQT_TQOBJECT(this), TQT_SLOT(slotFillForwardHistory())
);
connect(
m_actions.forwardInHistory->popupMenu(), TQT_SIGNAL(activated(int)),
@ -162,7 +162,7 @@ void CLexiconReadWindow::initView() {
setKeyChooser( CKeyChooser::createInstance(modules(), key(), mainToolBar()) );
mainToolBar()->insertWidget(0, keyChooser()->sizeHint().width(), keyChooser());
mainToolBar()->insertWidget(0, keyChooser()->tqsizeHint().width(), keyChooser());
mainToolBar()->setFullSize(false);
setModuleChooserBar( new CModuleChooserBar(modules(), modules().first()->type(), this) );
@ -206,14 +206,14 @@ void CLexiconReadWindow::setupPopupMenu() {
m_actions.selectAll->plug(popup());
(new KActionSeparator(this))->plug( popup() );
(new KActionSeparator(TQT_TQOBJECT(this)))->plug( popup() );
m_actions.copyMenu = new KActionMenu(i18n("Copy..."), CResMgr::displaywindows::lexiconWindow::copyMenu::icon, actionCollection());
m_actions.copyMenu->setDelayed(false);
m_actions.copyMenu->insert(m_actions.copy.reference);
m_actions.copyMenu->insert(m_actions.copy.entry);
m_actions.copyMenu->insert(new KActionSeparator(this));
m_actions.copyMenu->insert(new KActionSeparator(TQT_TQOBJECT(this)));
m_actions.copyMenu->insert(m_actions.copy.selectedText);
m_actions.copyMenu->plug(popup());
@ -242,7 +242,7 @@ void CLexiconReadWindow::updatePopupMenu() {
}
}
m_actions.findStrongs->setEnabled( hasStrongs );*/
m_actions.findStrongs->setEnabled( displayWidget()->getCurrentNodeInfo()[CDisplay::Lemma] != TQString::null );
m_actions.findStrongs->setEnabled( displayWidget()->getCurrentNodeInfo()[CDisplay::Lemma] != TQString() );
m_actions.copy.reference->setEnabled( displayWidget()->hasActiveAnchor() );
//m_actions.copy.entry->setEnabled( displayWidget()->hasActiveAnchor() );

@ -15,7 +15,7 @@
//BibleTime includes
#include "creadwindow.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
//KDE includes
@ -32,8 +32,9 @@ class KToolBarPopupAction;
class CLexiconReadWindow : public CReadWindow {
Q_OBJECT
TQ_OBJECT
public:
CLexiconReadWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
CLexiconReadWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name=0);
virtual ~CLexiconReadWindow();
/**
* Store the settings of this window in the given CProfileWindow object.

@ -14,8 +14,8 @@
#include <tqtimer.h>
CModuleChooserBar::CModuleChooserBar(ListCSwordModuleInfo useModules, CSwordModuleInfo::ModuleType type, TQWidget *parent, const char *name )
: KToolBar(parent,name),
CModuleChooserBar::CModuleChooserBar(ListCSwordModuleInfo useModules, CSwordModuleInfo::ModuleType type, TQWidget *tqparent, const char *name )
: KToolBar(tqparent,name),
m_moduleType(type),
m_idCounter(0),
m_buttonLimit(-1) //-1 means no limit

@ -19,7 +19,7 @@
#include "util/cpointers.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqhbox.h>
@ -31,11 +31,12 @@
*/
class CModuleChooserBar : public KToolBar {
Q_OBJECT
TQ_OBJECT
public:
/**
* Default constructor
*/
CModuleChooserBar(ListCSwordModuleInfo useModules, CSwordModuleInfo::ModuleType type, TQWidget *parent=0, const char *name=0);
CModuleChooserBar(ListCSwordModuleInfo useModules, CSwordModuleInfo::ModuleType type, TQWidget *tqparent=0, const char *name=0);
/**
* Returns a list of selected modules.
*/

@ -16,7 +16,7 @@
#include "util/cresmgr.h"
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqtooltip.h>
#include <tqdict.h>
@ -27,9 +27,9 @@
#include <kglobal.h>
#include <kiconloader.h>
CModuleChooserButton::CModuleChooserButton(CSwordModuleInfo* useModule,CSwordModuleInfo::ModuleType type, const int id, CModuleChooserBar *parent, const char *name )
: KToolBarButton(iconName(), id, parent, name),
m_id(id), m_popup(0), m_moduleChooserBar(parent) {
CModuleChooserButton::CModuleChooserButton(CSwordModuleInfo* useModule,CSwordModuleInfo::ModuleType type, const int id, CModuleChooserBar *tqparent, const char *name )
: KToolBarButton(iconName(), id, tqparent, name),
m_id(id), m_popup(0), m_moduleChooserBar(tqparent) {
m_moduleType = type;
m_module = useModule;
if (!m_module) {
@ -85,7 +85,7 @@ CSwordModuleInfo* CModuleChooserButton::module() {
for (unsigned int i = 0; i < popup->count(); i++) {
if ( m_popup->isItemChecked(popup->idAt(i)) ) {
TQString mod = popup->text(popup->idAt(i)).remove('&');
return backend()->findModuleByName( mod.left(mod.find(" ")) );
return backend()->findModuleByName( mod.left(mod.tqfind(" ")) );
}
}
@ -190,14 +190,14 @@ void CModuleChooserButton::populateMenu() {
TQString lang = (*it)->language()->translatedName();
if (lang.isEmpty()) {
//lang = TQString::fromLatin1("xx"); //unknown language -- do not use English as default!!
//lang = TQString::tqfromLatin1("xx"); //unknown language -- do not use English as default!!
lang = (*it)->language()->abbrev();
if (lang.isEmpty()) {
lang = "xx";
}
}
if (languages.find( lang ) == languages.end() ) { //this lang was not yet added
if (languages.tqfind( lang ) == languages.end() ) { //this lang was not yet added
languages += lang;
KPopupMenu* menu = new KPopupMenu;
@ -222,7 +222,7 @@ void CModuleChooserButton::populateMenu() {
}
TQString name((*it)->name());
name.append(" ").append((*it)->isLocked() ? i18n("[locked]") : TQString::null);
name.append(" ").append((*it)->isLocked() ? i18n("[locked]") : TQString());
const int id = langdict[lang]->insertItem( name );
if ( m_module && (*it)->name() == m_module->name()) {
@ -258,14 +258,14 @@ void CModuleChooserButton::updateMenuItems() {
for (unsigned int i = 0; i < popup->count(); i++) {
moduleName = popup->text(popup->idAt(i)).remove('&');
module = backend()->findModuleByName( moduleName.left(moduleName.findRev(" ")) );
module = backend()->findModuleByName( moduleName.left(moduleName.tqfindRev(" ")) );
Q_ASSERT(module);
// if (!module) {
// qWarning("Can't find module with name %s", moduleName.latin1());
// }
bool alreadyChosen = chosenModules.contains( module );
bool alreadyChosen = chosenModules.tqcontains( module );
if (m_module) {
alreadyChosen = alreadyChosen && (m_module->name() != moduleName);
}

@ -16,7 +16,7 @@
#include "backend/cswordmoduleinfo.h"
#include "util/cpointers.h"
//Qt includes
//TQt includes
#include <tqdict.h>
#include <tqtoolbutton.h>
@ -33,8 +33,9 @@ class CModuleChooserBar;
*/
class CModuleChooserButton : public KToolBarButton, public CPointers {
Q_OBJECT
TQ_OBJECT
public:
CModuleChooserButton(CSwordModuleInfo* useModule, CSwordModuleInfo::ModuleType type, const int id, CModuleChooserBar *parent, const char *name = 0 );
CModuleChooserButton(CSwordModuleInfo* useModule, CSwordModuleInfo::ModuleType type, const int id, CModuleChooserBar *tqparent, const char *name = 0 );
~CModuleChooserButton();
CSwordModuleInfo* module();

@ -17,7 +17,7 @@
#include "util/cresmgr.h"
//Qt includes
//TQt includes
#include <tqregexp.h>
//KDE includes
@ -28,7 +28,7 @@
using namespace Profile;
CPlainWriteWindow::CPlainWriteWindow(ListCSwordModuleInfo moduleList, CMDIArea* parent, const char *name ) : CWriteWindow(moduleList, parent, name) {
CPlainWriteWindow::CPlainWriteWindow(ListCSwordModuleInfo moduleList, CMDIArea* tqparent, const char *name ) : CWriteWindow(moduleList, tqparent, name) {
setKey( CSwordKey::createInstance(moduleList.first()) );
}
@ -46,7 +46,7 @@ void CPlainWriteWindow::initView() {
addDockWindow(mainToolBar());
setKeyChooser( CKeyChooser::createInstance(modules(), key(), mainToolBar()) );
mainToolBar()->insertWidget(0,keyChooser()->sizeHint().width(),keyChooser());
mainToolBar()->insertWidget(0,keyChooser()->tqsizeHint().width(),keyChooser());
mainToolBar()->setFullSize(false);
}
@ -65,7 +65,7 @@ void CPlainWriteWindow::initToolbars() {
m_actions.saveText = new KAction(i18n("Save text"),
CResMgr::displaywindows::writeWindow::saveText::icon,
CResMgr::displaywindows::writeWindow::saveText::accel,
this, TQT_SLOT(saveCurrentText()),
TQT_TQOBJECT(this), TQT_SLOT(saveCurrentText()),
actionCollection(),
CResMgr::displaywindows::writeWindow::saveText::actionName
);
@ -76,7 +76,7 @@ void CPlainWriteWindow::initToolbars() {
m_actions.deleteEntry = new KAction(i18n("Delete current entry"),
CResMgr::displaywindows::writeWindow::deleteEntry::icon,
CResMgr::displaywindows::writeWindow::deleteEntry::accel,
this, TQT_SLOT(deleteEntry()),
TQT_TQOBJECT(this), TQT_SLOT(deleteEntry()),
actionCollection(),
CResMgr::displaywindows::writeWindow::deleteEntry::actionName
);
@ -87,7 +87,7 @@ void CPlainWriteWindow::initToolbars() {
m_actions.restoreText = new KAction(i18n("Restore original text"),
CResMgr::displaywindows::writeWindow::restoreText::icon,
CResMgr::displaywindows::writeWindow::restoreText::accel,
this, TQT_SLOT(restoreText()),
TQT_TQOBJECT(this), TQT_SLOT(restoreText()),
actionCollection(),
CResMgr::displaywindows::writeWindow::restoreText::actionName
);
@ -98,10 +98,10 @@ void CPlainWriteWindow::initToolbars() {
void CPlainWriteWindow::initConnections() {
CWriteWindow::initConnections();
connect(keyChooser(), TQT_SIGNAL(keyChanged(CSwordKey*)),
this, TQT_SLOT(lookup(CSwordKey*)));
TQT_TQOBJECT(this), TQT_SLOT(lookup(CSwordKey*)));
connect(displayWidget()->connectionsProxy(), TQT_SIGNAL(textChanged()),
this, TQT_SLOT(textChanged()) );
TQT_TQOBJECT(this), TQT_SLOT(textChanged()) );
}
void CPlainWriteWindow::storeProfileSettings( CProfileWindow* profileWindow ) {
@ -122,8 +122,8 @@ void CPlainWriteWindow::saveCurrentText( const TQString& /*key*/ ) {
//since t is a complete HTML page at the moment, strip away headers and footers of a HTML page
TQRegExp re("(?:<html.*>.+<body.*>)", false); //remove headers, case insensitive
re.setMinimal(true);
t.replace(re, "");
t.replace(TQRegExp("</body></html>", false), "");//remove footer
t.tqreplace(re, "");
t.tqreplace(TQRegExp("</body></html>", false), "");//remove footer
const TQString& oldKey = this->key()->key();
if( modules().first()->isWritable() ) {
@ -134,9 +134,9 @@ void CPlainWriteWindow::saveCurrentText( const TQString& /*key*/ ) {
textChanged();
} else {
KMessageBox::error( this,
TQString::fromLatin1("<qt><B>%1</B><BR>%2</qt>")
.arg( i18n("Module is not writable.") )
.arg( i18n("Either the module may not be edited, or "
TQString::tqfromLatin1("<qt><B>%1</B><BR>%2</qt>")
.tqarg( i18n("Module is not writable.") )
.tqarg( i18n("Either the module may not be edited, or "
"you do not have write permission.") ),
i18n("Module not writable") );
}

@ -15,7 +15,7 @@
//BibleTime includes
#include "cwritewindow.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
@ -27,8 +27,9 @@ class KToggleAction;
*/
class CPlainWriteWindow : public CWriteWindow {
Q_OBJECT
TQ_OBJECT
public:
CPlainWriteWindow( ListCSwordModuleInfo modules, CMDIArea* parent, const char *name = 0 );
CPlainWriteWindow( ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name = 0 );
virtual ~CPlainWriteWindow();
/**

@ -35,8 +35,8 @@
using namespace Profile;
CReadWindow::CReadWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name )
: CDisplayWindow(modules,parent,name),
CReadWindow::CReadWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name )
: CDisplayWindow(modules,tqparent,name),
m_displayWidget(0) {
// installEventFilter(this);
@ -114,15 +114,15 @@ void CReadWindow::lookup( CSwordKey* newKey ) {
/** Store the settings of this window in the given CProfileWindow object. */
void CReadWindow::storeProfileSettings(CProfileWindow * const settings) {
TQRect rect;
rect.setX(parentWidget()->x());
rect.setY(parentWidget()->y());
rect.setX(tqparentWidget()->x());
rect.setY(tqparentWidget()->y());
rect.setWidth(width());
rect.setHeight(height());
settings->setGeometry(rect);
// settings->setScrollbarPositions( m_htmlWidget->view()->horizontalScrollBar()->value(), m_htmlWidget->view()->verticalScrollBar()->value() );
settings->setType(modules().first()->type());
settings->setMaximized(isMaximized() || parentWidget()->isMaximized());
settings->setMaximized(isMaximized() || tqparentWidget()->isMaximized());
settings->setFocus( (this == mdi()->activeWindow()) ); //set property to true if this window is the active one.
if (key()) {
@ -149,17 +149,17 @@ void CReadWindow::storeProfileSettings(CProfileWindow * const settings) {
}
void CReadWindow::applyProfileSettings(CProfileWindow * const settings) {
// parentWidget()->setUpdatesEnabled(false);
// tqparentWidget()->setUpdatesEnabled(false);
setUpdatesEnabled(false);
if (settings->maximized()) { //maximize this window
// Use parentWidget() to call showMaximized. Otherwise we'd get lot's of X11 errors
parentWidget()->showMaximized();
// Use tqparentWidget() to call showMaximized. Otherwise we'd get lot's of X11 errors
tqparentWidget()->showMaximized();
}
else {
const TQRect rect = settings->geometry();
const TQRect rect = settings->tqgeometry();
resize(rect.width(), rect.height());
parentWidget()->move(rect.x(), rect.y());
tqparentWidget()->move(rect.x(), rect.y());
}
setUpdatesEnabled(true);
@ -185,9 +185,9 @@ void CReadWindow::resizeEvent(TQResizeEvent* /*e*/) {
void CReadWindow::openSearchStrongsDialog() {
// qWarning("looking for lemma %s", displayWidget()->getCurrentNodeInfo()[CDisplay::Lemma].latin1() );
TQString searchText = TQString::null;
TQString searchText = TQString();
if (displayWidget()->getCurrentNodeInfo()[CDisplay::Lemma] != TQString::null) {
if (displayWidget()->getCurrentNodeInfo()[CDisplay::Lemma] != TQString()) {
searchText.append("strong:").append(displayWidget()->getCurrentNodeInfo() [CDisplay::Lemma]);
}

@ -18,7 +18,7 @@
#include "frontend/display/cdisplay.h"
#include "frontend/display/creaddisplay.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqpopupmenu.h>
@ -30,11 +30,12 @@ class KPopupMenu;
class CReadWindow : public CDisplayWindow {
Q_OBJECT
TQ_OBJECT
public:
// static void insertKeyboardActions( KAccel* const a );
static void insertKeyboardActions( KActionCollection* const a );
CReadWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
CReadWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name=0);
virtual ~CReadWindow();
/**
* Store the settings of this window in the given CProfileWindow object.

@ -22,8 +22,8 @@
using namespace Profile;
CWriteWindow::CWriteWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name )
: CDisplayWindow(modules, parent,name), m_writeDisplay(0) {}
CWriteWindow::CWriteWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name )
: CDisplayWindow(modules, tqparent,name), m_writeDisplay(0) {}
CWriteWindow::~CWriteWindow() {}
@ -55,21 +55,21 @@ void CWriteWindow::storeProfileSettings(CProfileWindow * const settings) {
settings->setWriteWindowType( writeWindowType() );
TQRect rect;
rect.setX(parentWidget()->x());
rect.setY(parentWidget()->y());
rect.setX(tqparentWidget()->x());
rect.setY(tqparentWidget()->y());
rect.setWidth(width());
rect.setHeight(height());
settings->setGeometry(rect);
// settings->setScrollbarPositions( m_htmlWidget->view()->horizontalScrollBar()->value(), m_htmlWidget->view()->verticalScrollBar()->value() );
settings->setType(modules().first()->type());
settings->setMaximized(isMaximized() || parentWidget()->isMaximized());
settings->setMaximized(isMaximized() || tqparentWidget()->isMaximized());
if (key()) {
sword::VerseKey* vk = dynamic_cast<sword::VerseKey*>(key());
TQString oldLang;
if (vk) {
oldLang = TQString::fromLatin1(vk->getLocale());
oldLang = TQString::tqfromLatin1(vk->getLocale());
vk->setLocale("en"); //save english locale names as default!
}
settings->setKey( key()->key() );
@ -92,13 +92,13 @@ void CWriteWindow::applyProfileSettings(CProfileWindow * const settings) {
setUpdatesEnabled(false);
if (settings->maximized()) {
parentWidget()->showMaximized();
tqparentWidget()->showMaximized();
}
else {
const TQRect rect = settings->geometry();
const TQRect rect = settings->tqgeometry();
resize(rect.width(), rect.height());
parentWidget()->move(rect.x(), rect.y());
//setGeometry( settings->geometry() );
tqparentWidget()->move(rect.x(), rect.y());
//setGeometry( settings->tqgeometry() );
}
// displayWidget()->view()->horizontalScrollBar()->setValue( settings->scrollbarPositions().horizontal );
// m_htmlWidget->view()->verticalScrollBar()->setValue( settings->scrollbarPositions().vertical );

@ -16,7 +16,7 @@
#include "frontend/display/cwritedisplay.h"
#include "cdisplaywindow.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
/**The base class for all write-only display windows.
@ -25,10 +25,11 @@
class CWriteWindow : public CDisplayWindow {
Q_OBJECT
TQ_OBJECT
public:
static void insertKeyboardActions( KActionCollection* const a );
CWriteWindow(ListCSwordModuleInfo modules, CMDIArea* parent, const char *name=0);
CWriteWindow(ListCSwordModuleInfo modules, CMDIArea* tqparent, const char *name=0);
virtual ~CWriteWindow();
/**
* Store the settings of this window in the given CProfileWindow object.

@ -20,7 +20,7 @@
#include "util/cresmgr.h"
//Qt includes
//TQt includes
#include <tqcombobox.h>
#include <tqlistbox.h>
#include <tqpushbutton.h>
@ -28,8 +28,8 @@
//KDE includes
#include <klocale.h>
CBibleKeyChooser::CBibleKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent, const char *name )
: CKeyChooser(modules, key, parent, name),
CBibleKeyChooser::CBibleKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *tqparent, const char *name )
: CKeyChooser(modules, key, tqparent, name),
m_key(dynamic_cast<CSwordVerseKey*>(key)) {
w_ref = 0;
setModules(modules, false);
@ -38,11 +38,11 @@ m_key(dynamic_cast<CSwordVerseKey*>(key)) {
m_key = 0;
return;
}
TQHBoxLayout* layout = new TQHBoxLayout(this);
layout->setDirection( TQBoxLayout::LeftToRight );
TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
tqlayout->setDirection( TQBoxLayout::LeftToRight );
w_ref = new CKeyReferenceWidget(dynamic_cast<CSwordBibleModuleInfo*>(m_modules.first()), m_key, this);
layout->addWidget(w_ref);
tqlayout->addWidget(w_ref);
connect(w_ref,TQT_SIGNAL(changed(CSwordVerseKey *)),TQT_SLOT(refChanged(CSwordVerseKey *)));

@ -32,19 +32,22 @@ class CSwordBibleModuleInfo;
class CBibleKeyChooser : public CKeyChooser {
Q_OBJECT
TQ_OBJECT
public:
/**
* the constructor
* you should not need to use this, use @ref CKeyChooser::createInstance instead
*/
CBibleKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *parent=0, const char *name=0);
CBibleKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *tqparent=0, const char *name=0);
public slots:
/**
* see @ref CKeyChooser::getKey
*/
#ifndef Q_MOC_RUN
CSwordKey* const key();
#endif // Q_MOC_RUN
/**
* see @ref CKeyChooser::setKey
*/

@ -14,14 +14,14 @@
#include "backend/cswordbookmoduleinfo.h"
#include "frontend/cbtconfig.h"
//Qt includes
//TQt includes
#include <tqlayout.h>
#include <tqmap.h>
TQMap<TQObject*, int> boxes;
CBookKeyChooser::CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent, const char *name)
: CKeyChooser(modules, key, parent,name), m_layout(0) {
CBookKeyChooser::CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *tqparent, const char *name)
: CKeyChooser(modules, key, tqparent,name), m_layout(0) {
setModules(modules, false);
m_key = dynamic_cast<CSwordTreeKey*>(key);
@ -166,7 +166,7 @@ void CBookKeyChooser::setModules(const ListCSwordModuleInfo& modules, const bool
connect(w, TQT_SIGNAL(focusOut(int)), TQT_SLOT(keyChooserChanged(int)));
m_layout->addWidget(w);
boxes[w] = i;
boxes[TQT_TQOBJECT(w)] = i;
w->show();
}
@ -230,7 +230,7 @@ void CBookKeyChooser::setupCombo(const TQString key, const int depth, const int
//insert an empty item at the top
TQStringList items;
if (depth > 0) {
items << TQString::null;
items << TQString();
}
do {
@ -250,7 +250,7 @@ void CBookKeyChooser::setupCombo(const TQString key, const int depth, const int
/** A keychooser changed. Update and emit a signal if necessary. */
void CBookKeyChooser::keyChooserChanged(int /*newIndex*/) {
const int activeID = boxes[const_cast<TQObject*>(sender())]; //no so good code!
const int activeID = boxes[TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))]; //no so good code!
TQStringList items;
CKeyChooserWidget* chooser;
@ -261,7 +261,7 @@ void CBookKeyChooser::keyChooserChanged(int /*newIndex*/) {
const TQString currentText =
(chooser && chooser->comboBox())
? chooser->comboBox()->currentText()
: TQString::null;
: TQString();
if (currentText.isEmpty() || i > activeID) {
break;

@ -18,7 +18,7 @@
//Sword includes
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqsize.h>
#include <tqmap.h>
@ -40,8 +40,9 @@ class TQHBoxLayout;
*/
class CBookKeyChooser : public CKeyChooser {
Q_OBJECT
TQ_OBJECT
public:
CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *parent=0, const char *name=0);
CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *tqparent=0, const char *name=0);
~CBookKeyChooser();
/**
* Refreshes the content.
@ -74,7 +75,7 @@ public slots: // Public slots
protected: // Protected methods
/**
* Fills the combo given by depth with the items from the key having depth "depth".
* The parent sibling is given by key.
* The tqparent sibling is given by key.
*/
void setupCombo(const TQString key, const int depth, const int currentItem);
/** No descriptions */

@ -14,7 +14,7 @@
#include "backend/cswordbookmoduleinfo.h"
#include "frontend/cbtconfig.h"
//Qt includes
//TQt includes
#include <tqlayout.h>
#include <tqheader.h>
#include <tqlistview.h>
@ -25,8 +25,8 @@
////////////
CBookTreeChooser::TreeItem::TreeItem(TQListViewItem* parent, TQListViewItem* after, CSwordTreeKey* key, const TQString keyName)
: KListViewItem(parent, after),
CBookTreeChooser::TreeItem::TreeItem(TQListViewItem* tqparent, TQListViewItem* after, CSwordTreeKey* key, const TQString keyName)
: KListViewItem(tqparent, after),
m_key(key),
m_keyName(keyName) {
//qDebug("first CBookTreeChooser::TreeItem ctor");
@ -39,8 +39,8 @@ m_keyName(keyName) {
m_key->setOffset( offset );
};
CBookTreeChooser::TreeItem::TreeItem(TQListViewItem* parent,CSwordTreeKey* key, const TQString keyName)
: KListViewItem(parent),
CBookTreeChooser::TreeItem::TreeItem(TQListViewItem* tqparent,CSwordTreeKey* key, const TQString keyName)
: KListViewItem(tqparent),
m_key(key),
m_keyName(keyName) {
//qDebug("second CBookTreeChooser::TreeItem ctor");
@ -124,8 +124,8 @@ void CBookTreeChooser::TreeItem::setOpen(bool o) {
//////////////////////////////////
CBookTreeChooser::CBookTreeChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent, const char *name)
: CKeyChooser(modules, key, parent,name),
CBookTreeChooser::CBookTreeChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *tqparent, const char *name)
: CKeyChooser(modules, key, tqparent,name),
m_key( dynamic_cast<CSwordTreeKey*>(key) ) {
setModules(modules, false);
@ -135,10 +135,10 @@ m_key( dynamic_cast<CSwordTreeKey*>(key) ) {
}
//now setup the keychooser widgets
TQHBoxLayout* layout = new TQHBoxLayout(this);
TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
m_treeView = new KListView(this);
layout->addWidget(m_treeView);
tqlayout->addWidget(m_treeView);
m_treeView->addColumn("Tree");
m_treeView->header()->hide();
m_treeView->setSorting(-1);
@ -177,7 +177,7 @@ void CBookTreeChooser::setKey(CSwordKey* newKey, const bool emitSignal) {
TQListViewItem* child = m_treeView->firstChild();
while( child && index < count ) {
if (child->text(0) == currentSibling) { //found a parent of our item
if (child->text(0) == currentSibling) { //found a tqparent of our item
//found right entry?
TreeItem* i = dynamic_cast<TreeItem*>(child);
if (!i || i->key() == key) {
@ -291,7 +291,7 @@ void CBookTreeChooser::show() {
if (!m_treeView->childCount()) {
KApplication::setOverrideCursor(WaitCursor);
setupTree(); //create the first level of the tree structure
m_treeView->resize(m_treeView->sizeHint());
m_treeView->resize(m_treeView->tqsizeHint());
KApplication::restoreOverrideCursor();
}
}

@ -22,7 +22,7 @@
//Sword includes
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqsize.h>
#include <tqmap.h>
@ -45,8 +45,9 @@ namespace sword {
*/
class CBookTreeChooser : public CKeyChooser {
Q_OBJECT
TQ_OBJECT
public:
CBookTreeChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *parent=0, const char *name=0);
CBookTreeChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *tqparent=0, const char *name=0);
~CBookTreeChooser();
/**
* Refreshes the content.
@ -87,8 +88,8 @@ protected slots: // Protected slots
private:
class TreeItem : public KListViewItem {
public:
TreeItem(TQListViewItem* parent, TQListViewItem* after, CSwordTreeKey* key, const TQString keyName);
TreeItem(TQListViewItem* parent, CSwordTreeKey* key, const TQString keyName);
TreeItem(TQListViewItem* tqparent, TQListViewItem* after, CSwordTreeKey* key, const TQString keyName);
TreeItem(TQListViewItem* tqparent, CSwordTreeKey* key, const TQString keyName);
TreeItem(TQListView* view,TQListViewItem* after, CSwordTreeKey* key, const TQString keyName);
const TQString& key() const;
void createChilds();

@ -19,13 +19,13 @@
#include "cbiblekeychooser.h"
#include "cbookkeychooser.h"
CKeyChooser::CKeyChooser(ListCSwordModuleInfo, CSwordKey *, TQWidget *parent, const char *name )
: TQWidget(parent, name),
CKeyChooser::CKeyChooser(ListCSwordModuleInfo, CSwordKey *, TQWidget *tqparent, const char *name )
: TQWidget(tqparent, name),
m_inHistoryFunction(false) {}
CKeyChooser::~CKeyChooser() {}
CKeyChooser* CKeyChooser::createInstance(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent) {
CKeyChooser* CKeyChooser::createInstance(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *tqparent) {
if (!modules.count()) {
return 0;
}
@ -34,13 +34,13 @@ CKeyChooser* CKeyChooser::createInstance(ListCSwordModuleInfo modules, CSwordKey
switch ( modules.first()->type() ) {
case CSwordModuleInfo::Commentary: //Bibles and commentaries uise the same key chooser
case CSwordModuleInfo::Bible:
ck = new CBibleKeyChooser(modules,key,parent);
ck = new CBibleKeyChooser(modules,key,tqparent);
break;
case CSwordModuleInfo::Lexicon:
ck = new CLexiconKeyChooser(modules,key,parent);
ck = new CLexiconKeyChooser(modules,key,tqparent);
break;
case CSwordModuleInfo::GenericBook:
ck = new CBookKeyChooser(modules,key,parent);
ck = new CBookKeyChooser(modules,key,tqparent);
break;
default:
return 0;

@ -30,6 +30,7 @@ class CSwordKey;
class CKeyChooser : public TQWidget {
Q_OBJECT
TQ_OBJECT
public:
/**
@ -39,9 +40,9 @@ public:
* @ref CBibleKeyChooser
* @param info the @ref CModuleInfo to be represented by the KeyChooser
* @param key if not NULL, the @ref CKey the KeyChooser should be set to
* @param parent the parent of the widget to create
* @param tqparent the tqparent of the widget to create
*/
static CKeyChooser* createInstance(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent);
static CKeyChooser* createInstance(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *tqparent);
const TQStringList getPreviousKeys() const;
const TQStringList getNextKeys() const;
@ -62,7 +63,9 @@ public slots:
*
* @return the current @ref CKey
*/
#ifndef Q_MOC_RUN
virtual CSwordKey* const key() = 0;
#endif // Q_MOC_RUN
/**
* Sets the module of this keychooser and refreshes the comboboxes
*/
@ -95,7 +98,7 @@ protected:
/**
* the constructor - DO NOT USE! -- use @ref #createInstance instead!
*/
CKeyChooser(ListCSwordModuleInfo info, CSwordKey *key=0, TQWidget *parent=0, const char *name=0);
CKeyChooser(ListCSwordModuleInfo info, CSwordKey *key=0, TQWidget *tqparent=0, const char *name=0);
virtual ~CKeyChooser();
/**
* Set the appropriate font do display the modules

@ -15,7 +15,7 @@
#include "frontend/cbtconfig.h"
//Qt includes
//TQt includes
#include <tqlineedit.h>
#include <tqstring.h>
#include <tqstringlist.h>
@ -30,9 +30,9 @@
#include <tqtooltip.h>
#include <tqrect.h>
CKCComboBox::CKCComboBox(bool rw,TQWidget* parent,const char* name)
: TQComboBox(rw,parent,name) {
setFocusPolicy(TQWidget::WheelFocus);
CKCComboBox::CKCComboBox(bool rw,TQWidget* tqparent,const char* name)
: TQComboBox(rw,tqparent,name) {
setFocusPolicy(TQ_WheelFocus);
if (lineEdit()) {
installEventFilter( lineEdit() );
}
@ -41,10 +41,10 @@ CKCComboBox::CKCComboBox(bool rw,TQWidget* parent,const char* name)
/** Reimplementation. */
bool CKCComboBox::eventFilter( TQObject *o, TQEvent *e ) {
if (e->type() == TQEvent::FocusOut) {
TQFocusEvent* f = static_cast<TQFocusEvent*>(e);
TQFocusEvent* f = TQT_TQFOCUSEVENT(e);
if (o == lineEdit() && f->reason() == TQFocusEvent::Tab) {
int index = listBox()->index( listBox()->findItem(currentText()) );
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit()) && f->reason() == TQFocusEvent::Tab) {
int index = listBox()->index( listBox()->tqfindItem(currentText()) );
if (index == -1) {
index = 0;// return 0 if not found
}
@ -64,7 +64,7 @@ bool CKCComboBox::eventFilter( TQObject *o, TQEvent *e ) {
emit activated(currentText());
return false;
}
else if (o == this) {
else if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) {
emit activated(currentText());
return false;
}
@ -92,7 +92,7 @@ void CKCComboBox::wheelEvent( TQWheelEvent* e ) {
//**********************************************************************************/
CKeyChooserWidget::CKeyChooserWidget(int count, const bool useNextPrevSignals, TQWidget *parent, const char *name) : TQWidget(parent,name) {
CKeyChooserWidget::CKeyChooserWidget(int count, const bool useNextPrevSignals, TQWidget *tqparent, const char *name) : TQWidget(tqparent,name) {
m_useNextPrevSignals = useNextPrevSignals;
for (int index=1; index <= count; index++) {
@ -102,7 +102,7 @@ CKeyChooserWidget::CKeyChooserWidget(int count, const bool useNextPrevSignals,
reset(m_list,0,false);
};
CKeyChooserWidget::CKeyChooserWidget(TQStringList *list, const bool useNextPrevSignals, TQWidget *parent, const char *name ) : TQWidget(parent,name) {
CKeyChooserWidget::CKeyChooserWidget(TQStringList *list, const bool useNextPrevSignals, TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) {
m_useNextPrevSignals = useNextPrevSignals;
if (list) {
@ -144,10 +144,10 @@ void CKeyChooserWidget::reset(TQStringList *list, int index, bool do_emit) {
// qWarning("starting insert");
isResetting = true;
oldKey = TQString::null;
oldKey = TQString();
// m_comboBox->setUpdatesEnabled(false);
//DON'T REMOVE THE HIDE: Otherwise QComboBox's sizeHint() function won't work properly
//DON'T REMOVE THE HIDE: Otherwise TQComboBox's tqsizeHint() function won't work properly
m_comboBox->hide();
m_comboBox->clear();
if (list) {
@ -168,8 +168,8 @@ void CKeyChooserWidget::reset(TQStringList *list, int index, bool do_emit) {
emit changed(m_comboBox->currentItem());
}
const TQSize dummySize = m_comboBox->sizeHint(); //without this function call the combo box won't be properly sized!
//DON'T REMOVE OR MOVE THE show()! Otherwise QComboBox's sizeHint() function won't work properly!
const TQSize dummySize = m_comboBox->tqsizeHint(); //without this function call the combo box won't be properly sized!
//DON'T REMOVE OR MOVE THE show()! Otherwise TQComboBox's tqsizeHint() function won't work properly!
m_comboBox->show();
// m_comboBox->setFont( m_comboBox->font() );
@ -181,14 +181,14 @@ void CKeyChooserWidget::reset(TQStringList *list, int index, bool do_emit) {
/** Initializes this widget. We need this function because we have more than one constructor. */
void CKeyChooserWidget::init() {
oldKey = TQString::null;
oldKey = TQString();
setFocusPolicy(TQWidget::WheelFocus);
setFocusPolicy(TQ_WheelFocus);
m_comboBox = new CKCComboBox( true, this );
m_comboBox->setAutoCompletion( true );
m_comboBox->setInsertionPolicy(TQComboBox::NoInsertion);
m_comboBox->setFocusPolicy(TQWidget::WheelFocus);
m_comboBox->setFocusPolicy(TQ_WheelFocus);
m_mainLayout = new TQHBoxLayout( this );
m_mainLayout->addWidget(m_comboBox,5);

@ -37,13 +37,14 @@ class TQHBoxLayout;
*/
class CKCComboBox : public TQComboBox {
Q_OBJECT
TQ_OBJECT
public:
CKCComboBox(bool rw, TQWidget * parent=0, const char * name=0 );
CKCComboBox(bool rw, TQWidget * tqparent=0, const char * name=0 );
/**
* Returns the size this widget would like to have.
*/
// virtual TQSize sizeHint() const;
// virtual TQSize tqsizeHint() const;
protected:
/**
@ -64,22 +65,23 @@ signals:
/**
* This class implements the KeyCooser Widget, which
* consists of a @ref TQComboBox, two normal ref @QToolButton
* consists of a @ref TQComboBox, two normal ref @TQToolButton
* and a enhanced @ref CScrollButton
*
* @author The BibleTime team
*/
class CKeyChooserWidget : public TQWidget {
Q_OBJECT
TQ_OBJECT
public:
/**
* the constructor
*/
CKeyChooserWidget(TQStringList *list=0, const bool useNextPrevSignals = false, TQWidget *parent=0, const char *name=0);
CKeyChooserWidget(TQStringList *list=0, const bool useNextPrevSignals = false, TQWidget *tqparent=0, const char *name=0);
/**
* the constructor
*/
CKeyChooserWidget(int count=0, const bool useNextPrevSignals = false, TQWidget *parent=0, const char *name=0);
CKeyChooserWidget(int count=0, const bool useNextPrevSignals = false, TQWidget *tqparent=0, const char *name=0);
/**
* This function does clear the combobox, then fill in
* the StringList, set the ComboBox' current item to index

@ -17,7 +17,7 @@
#include "backend/cswordversekey.h"
#include "util/cresmgr.h"
//Qt includes
//TQt includes
#include <klineedit.h>
#include <tqstring.h>
#include <tqstringlist.h>
@ -44,12 +44,12 @@ TQString CKeyReferenceCompletion::makeCompletion(const TQString &text) {
return m_key->key();
}
return TQString::null;
return TQString();
}
//**********************************************************************************/
/* To get popup working we have to rework KLineEdit too */
CKeyReferenceLineEdit::CKeyReferenceLineEdit(TQWidget *parent, const char *name) : KLineEdit(parent,name) {
CKeyReferenceLineEdit::CKeyReferenceLineEdit(TQWidget *tqparent, const char *name) : KLineEdit(tqparent,name) {
}
void CKeyReferenceLineEdit::makeCompletion(const TQString &text) {
@ -80,12 +80,12 @@ void CKeyReferenceLineEdit::makeCompletion(const TQString &text) {
//**********************************************************************************/
CKeyReferenceWidget::CKeyReferenceWidget( CSwordBibleModuleInfo *mod, CSwordVerseKey *key, TQWidget *parent, const char *name) : TQWidget(parent,name) {
CKeyReferenceWidget::CKeyReferenceWidget( CSwordBibleModuleInfo *mod, CSwordVerseKey *key, TQWidget *tqparent, const char *name) : TQWidget(tqparent,name) {
updatelock = false;
m_module = mod;
setFocusPolicy(TQWidget::WheelFocus);
setFocusPolicy(TQ_WheelFocus);
// Erase button
KGuiItem erase_picture;

@ -26,6 +26,7 @@ class CSwordVerseKey;
class CKeyReferenceCompletion : public KCompletion {
Q_OBJECT
TQ_OBJECT
public:
CKeyReferenceCompletion(CSwordBibleModuleInfo*);
TQString makeCompletion(const TQString &);
@ -37,18 +38,20 @@ private:
class CKeyReferenceLineEdit : public KLineEdit {
Q_OBJECT
TQ_OBJECT
public:
CKeyReferenceLineEdit(TQWidget *parent=0, const char *name=0);
CKeyReferenceLineEdit(TQWidget *tqparent=0, const char *name=0);
void makeCompletion(const TQString &);
};
class CKeyReferenceWidget : public TQWidget {
Q_OBJECT
TQ_OBJECT
public:
/**
* the constructor
*/
CKeyReferenceWidget(CSwordBibleModuleInfo *, CSwordVerseKey*, TQWidget *parent=0, const char *name=0);
CKeyReferenceWidget(CSwordBibleModuleInfo *, CSwordVerseKey*, TQWidget *tqparent=0, const char *name=0);
bool setKey(CSwordVerseKey* key);
KLineEdit* textbox();
void setModule(CSwordBibleModuleInfo *m = 0);

@ -23,7 +23,7 @@
#include <iterator>
#include <map>
//Qt includes
//TQt includes
#include <tqcombobox.h>
#include <tqlayout.h>
#include <tqlistbox.h>
@ -31,13 +31,13 @@
//KDE includes
#include <klocale.h>
CLexiconKeyChooser::CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent, const char *name )
: CKeyChooser(modules, key, parent, name),
CLexiconKeyChooser::CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *tqparent, const char *name )
: CKeyChooser(modules, key, tqparent, name),
m_key(dynamic_cast<CSwordLDKey*>(key)) {
setModules(modules, false);
//we use a layout because the key chooser should be resized to full size
//we use a tqlayout because the key chooser should be resized to full size
m_layout = new TQHBoxLayout(this, TQBoxLayout::LeftToRight);
m_layout->setResizeMode(TQLayout::FreeResize);
@ -54,7 +54,7 @@ m_key(dynamic_cast<CSwordLDKey*>(key)) {
CResMgr::displaywindows::lexiconWindow::previousEntry::tooltip
);
m_layout->addWidget(m_widget,0,Qt::AlignLeft);
m_layout->addWidget(m_widget,0,TQt::AlignLeft);
connect(m_widget,TQT_SIGNAL(changed(int)),TQT_SLOT(activated(int)));
connect(m_widget,TQT_SIGNAL(focusOut(int)),TQT_SLOT(activated(int)));
@ -75,7 +75,7 @@ void CLexiconKeyChooser::setKey(CSwordKey* key) {
// qWarning("setKey start");
TQString newKey = m_key->key();
const int index = m_widget->comboBox()->listBox()->index(m_widget->comboBox()->listBox()->findItem( newKey ));
const int index = m_widget->comboBox()->listBox()->index(m_widget->comboBox()->listBox()->tqfindItem( newKey ));
m_widget->comboBox()->setCurrentItem(index);
// qWarning("setKey end");

@ -31,20 +31,23 @@ class TQHBoxLayout;
*/
class CLexiconKeyChooser : public CKeyChooser {
Q_OBJECT
TQ_OBJECT
public:
/**
* The constructor
*
* you should not need to use this, use @ref CKeyChooser::createInstance instead
*/
CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *parent=0, const char *name=0);
CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *tqparent=0, const char *name=0);
public slots:
/**
* see @ref CKeyChooser::getKey
* @return Return the key object we use.
*/
#ifndef Q_MOC_RUN
virtual CSwordKey* const key();
#endif // Q_MOC_RUN
/**
* see @ref CKeyChooser::setKey
*/

@ -24,8 +24,8 @@
#include <klocale.h>
//CRefSelectDialog::CRefSelectDialog(TQWidget *parent)
// : KDialogBase(parent, "Refenences",
//CRefSelectDialog::CRefSelectDialog(TQWidget *tqparent)
// : KDialogBase(tqparent, "Refenences",
// true, i18n("Refenence selector"),
// KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true),
// m_oldPos(0,0)
@ -33,15 +33,15 @@
//{
// m_page = new TQWidget( this );
// m_placeholder = new TQWidget( m_page);
// TQVBoxLayout* layout = new TQVBoxLayout( m_page, 0, spacingHint());
// m_lineedit = new TQLineEdit( TQString::null, m_page, "select" );
// TQVBoxLayout* tqlayout = new TQVBoxLayout( m_page, 0, spacingHint());
// m_lineedit = new TQLineEdit( TQString(), m_page, "select" );
// m_lineedit->setMinimumWidth(fontMetrics().maxWidth()*8);
//
// TQHBoxLayout* hlayout = new TQHBoxLayout(m_page, 0, spacingHint());
// hlayout->addWidget(new TQLabel(i18n("Verse key:"), m_page));
// hlayout->addWidget(m_lineedit);
// layout->addItem(hlayout);
// layout->addWidget(m_placeholder);
// TQHBoxLayout* htqlayout = new TQHBoxLayout(m_page, 0, spacingHint());
// htqlayout->addWidget(new TQLabel(i18n("Verse key:"), m_page));
// htqlayout->addWidget(m_lineedit);
// tqlayout->addItem(htqlayout);
// tqlayout->addWidget(m_placeholder);
//
// m_chooser = NULL;
// m_oldParent = NULL;
@ -62,7 +62,7 @@
// m_chooser = chooser;
//
// // store old owner and position
// m_oldParent = chooser->parentWidget(false);
// m_oldParent = chooser->tqparentWidget(false);
// m_oldPos = chooser->pos();
//
// // we temporary borrow chooser widget from the MDI window
@ -77,12 +77,12 @@
// key->key(m_lineedit->text());
// m_chooser->setKey(key);
//
// // restore parent of stolen widget
// // restore tqparent of stolen widget
// restoreParent();
//}
//
//void CRefSelectDialog::slotPressedCancel() {
// // restore parent of stolen widget
// // restore tqparent of stolen widget
// restoreParent();
//}
//

@ -11,7 +11,7 @@
#ifndef CREFSELECTDIALOG_H
#define CREFSELECTDIALOG_H
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqstring.h>
class TQLineEdit;
@ -26,8 +26,9 @@ class TQLineEdit;
//class CRefSelectDialog : public KDialogBase {
// Q_OBJECT
TQ_OBJECT
// public:
// CRefSelectDialog(TQWidget *parent);
// CRefSelectDialog(TQWidget *tqparent);
// virtual ~CRefSelectDialog();
//
// void setChooser(CKeyChooser* const chooser);

@ -16,13 +16,13 @@
#include <stdlib.h>
#include <math.h>
//Qt includes
//TQt includes
#include <tqevent.h>
#include <tqapplication.h>
#include <tqcursor.h>
CScrollButton::CScrollButton(TQWidget *parent, const char *name ) : TQToolButton(parent,name) {
setFocusPolicy(TQWidget::WheelFocus);
CScrollButton::CScrollButton(TQWidget *tqparent, const char *name ) : TQToolButton(tqparent,name) {
setFocusPolicy(TQ_WheelFocus);
setCursor( splitVCursor );
m_isLocked = false;

@ -22,11 +22,12 @@ class TQMouseEvent;
*/
class CScrollButton : public TQToolButton {
Q_OBJECT
TQ_OBJECT
public:
/**
* The constructor
*/
CScrollButton(TQWidget *parent=0, const char *name=0);
CScrollButton(TQWidget *tqparent=0, const char *name=0);
const bool isLocked() const;
signals:
@ -57,7 +58,7 @@ protected slots:
protected:
/**
* Reimplementation from @ref QWidget#mouseMoveEvent - processes
* Reimplementation from @ref TQWidget#mouseMoveEvent - processes
* the mouse move events
*/
virtual void mouseMoveEvent( TQMouseEvent* e );

@ -15,7 +15,7 @@
//BibleTime frontend includes
#include "frontend/cbtconfig.h"
//Qt includes
//TQt includes
#include <tqlineedit.h>
#include <tqstring.h>
#include <tqstringlist.h>
@ -35,23 +35,23 @@ const unsigned int WIDTH = 16;
const unsigned int ARROW_HEIGHT = 12;
const unsigned int MOVER_HEIGHT = 6;
CScrollerWidgetSet::CScrollerWidgetSet(TQWidget *parent, const char *name) : TQWidget(parent,name) {
CScrollerWidgetSet::CScrollerWidgetSet(TQWidget *tqparent, const char *name) : TQWidget(tqparent,name) {
m_layout = new TQVBoxLayout(this);
m_layout->setAlignment(Qt::AlignHCenter | Qt::AlignCenter);
m_layout->tqsetAlignment(TQt::AlignHCenter | TQt::AlignCenter);
//setAlignment(Qt::AlignHCenter | Qt::AlignCenter);
//tqsetAlignment(TQt::AlignHCenter | TQt::AlignCenter);
btn_up = new TQToolButton( UpArrow, this, "btn_up" );
btn_up->setFixedSize(WIDTH, ARROW_HEIGHT);
btn_up->setFocusPolicy(TQWidget::NoFocus);
btn_up->setFocusPolicy(TQ_NoFocus);
btn_fx = new CScrollButton( this, "btn_fx" );
btn_fx->setFixedSize(WIDTH, MOVER_HEIGHT);
btn_fx->setFocusPolicy(TQWidget::NoFocus);
btn_fx->setFocusPolicy(TQ_NoFocus);
btn_down = new TQToolButton( DownArrow, this, "btn_down" );
btn_down->setFixedSize(WIDTH, ARROW_HEIGHT);
btn_down->setFocusPolicy(TQWidget::NoFocus);
btn_down->setFocusPolicy(TQ_NoFocus);
m_layout->addWidget( btn_up,0 );
m_layout->addWidget( btn_fx,0 );
m_layout->addWidget( btn_down,0 );

@ -29,11 +29,12 @@
*/
class CScrollerWidgetSet : public TQWidget {
Q_OBJECT
TQ_OBJECT
public:
/**
* the constructor
*/
CScrollerWidgetSet(TQWidget *parent=0, const char *name=0);
CScrollerWidgetSet(TQWidget *tqparent=0, const char *name=0);
/**
* Sets the tooltips for the given entries using the parameters as text.
*/

@ -12,7 +12,7 @@
//Own includes
#include "kstartuplogo.h"
//Qt includes
//TQt includes
#include <tqapplication.h>
#include <tqlabel.h>
#include <tqlayout.h>
@ -67,7 +67,7 @@ KStartupLogo::KStartupLogo()
//Please not change the margin
textLabel = new TQLabel(this);
textLabel->setGeometry(0,pm.height(),pm.width(),textLabel->sizeHint().height()+10);
textLabel->setGeometry(0,pm.height(),pm.width(),textLabel->tqsizeHint().height()+10);
textLabel->setBackgroundColor( TQColor("#0d6de9") );
textLabel->setFrameStyle(TQFrame::Panel | TQFrame::Plain);
textLabel->setLineWidth(1);
@ -78,10 +78,10 @@ KStartupLogo::KStartupLogo()
textLabel->setFont( f );
TQPalette p = palette();
p.setColor( TQPalette::Inactive, TQColorGroup::Text, Qt::white );
p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, Qt::white );
p.setColor( TQPalette::Normal, TQColorGroup::Text, Qt::white );
p.setColor( TQPalette::Normal, TQColorGroup::Foreground, Qt::white );
p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQt::white );
p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, TQt::white );
p.setColor( TQPalette::Normal, TQColorGroup::Text, TQt::white );
p.setColor( TQPalette::Normal, TQColorGroup::Foreground, TQt::white );
setPalette( p );
setGeometry (
@ -94,7 +94,7 @@ KStartupLogo::KStartupLogo()
void KStartupLogo::setText(const TQString text) {
//Please not make the text bold & let the first character be blank
textLabel->setText( TQString::fromLatin1(" %1").arg(text) );
textLabel->setText( TQString::tqfromLatin1(" %1").tqarg(text) );
KApplication::kApplication()->processEvents();
}

@ -33,7 +33,7 @@
#include <string.h>
//Qt includes
//TQt includes
#include <tqdragobject.h>
#include <tqstringlist.h>
#include <tqfile.h>
@ -57,15 +57,15 @@ CItemBase::CItemBase(CMainIndex* mainIndex, const Type type)
m_type(type),
m_sortingEnabled(true) {}
CItemBase::CItemBase(CItemBase* parentItem, const Type type)
: KListViewItem(parentItem),
CItemBase::CItemBase(CItemBase* tqparentItem, const Type type)
: KListViewItem(tqparentItem),
m_type(type),
m_sortingEnabled(true) {}
CItemBase::~CItemBase() {}
const TQString CItemBase::toolTip() {
return TQString::null;
return TQString();
}
/** Returns the used main index. */
@ -87,7 +87,7 @@ void CItemBase::moveAfter( CItemBase* const item ) {
if (!item)
return;
if ( parent() == item->parent() ) { //same parent means level
if ( tqparent() == item->tqparent() ) { //same tqparent means level
moveItem(item); //both items are on the same level, so we can use moveItem
}
}
@ -140,7 +140,7 @@ void CItemBase::sort() {
/* ---------- new class: CModuleItem ------------ */
/* ---------------------------------------------- */
CModuleItem::CModuleItem(CTreeFolder* parentItem, CSwordModuleInfo* module) : CItemBase(parentItem), m_module(module) {}
CModuleItem::CModuleItem(CTreeFolder* tqparentItem, CSwordModuleInfo* module) : CItemBase(tqparentItem), m_module(module) {}
CModuleItem::~CModuleItem() {}
@ -252,10 +252,10 @@ const bool CModuleItem::enableAction( const MenuAction action ) {
/* ---------- new class: CBookmarkItem ------------*/
/* ----------------------------------------------*/
CBookmarkItem::CBookmarkItem(CFolderBase* parentItem, CSwordModuleInfo* module, const TQString& key, const TQString& description)
: CItemBase(parentItem),
CBookmarkItem::CBookmarkItem(CFolderBase* tqparentItem, CSwordModuleInfo* module, const TQString& key, const TQString& description)
: CItemBase(tqparentItem),
m_description(description),
m_moduleName(module ? module->name() : TQString::null) {
m_moduleName(module ? module->name() : TQString()) {
if ((module && (module->type() == CSwordModuleInfo::Bible) || (module->type() == CSwordModuleInfo::Commentary)) ) {
CSwordVerseKey vk(0);
vk = key;
@ -269,11 +269,11 @@ m_moduleName(module ? module->name() : TQString::null) {
m_startupXML = TQDomElement(); //empty XML code
}
CBookmarkItem::CBookmarkItem(CFolderBase* parentItem, TQDomElement& xml )
: CItemBase(parentItem),
m_key(TQString::null),
m_description(TQString::null),
m_moduleName(TQString::null) {
CBookmarkItem::CBookmarkItem(CFolderBase* tqparentItem, TQDomElement& xml )
: CItemBase(tqparentItem),
m_key(TQString()),
m_description(TQString()),
m_moduleName(TQString()) {
m_startupXML = xml;
}
@ -284,9 +284,9 @@ void CBookmarkItem::update() {
setMultiLinesEnabled(true);
setPixmap(0,SmallIcon(CResMgr::mainIndex::bookmark::icon,16));
const TQString title = TQString::fromLatin1("%1 (%2)")
.arg(key())
.arg(module() ? module()->name() : i18n("unknown"));
const TQString title = TQString::tqfromLatin1("%1 (%2)")
.tqarg(key())
.tqarg(module() ? module()->name() : i18n("unknown"));
setText(0, title);
}
@ -306,7 +306,7 @@ void CBookmarkItem::init() {
/** Reimplementation. */
const TQString CBookmarkItem::toolTip() {
if (!module()) {
return TQString::null;
return TQString();
}
CSwordBackend::FilterOptions filterOptions = CBTConfig::getFilterOptionDefaults();
@ -324,20 +324,20 @@ const TQString CBookmarkItem::toolTip() {
Q_ASSERT(k.get());
if (fontPair.first) { //use a special font
qWarning("using a font, %s", fontPair.second.family().latin1());
ret = TQString::fromLatin1("<b>%1 (%2)</b><br/><small>%3</small><hr><font face=\"%4\" size=\"4\">%5</font>")
.arg(key())
.arg(module()->name())
.arg(description())
.arg(fontPair.second.family())
.arg(k->renderedText());
qWarning("using a font, %s", TQString(fontPair.second.family()).latin1());
ret = TQString::tqfromLatin1("<b>%1 (%2)</b><br/><small>%3</small><hr><font face=\"%4\" size=\"4\">%5</font>")
.tqarg(key())
.tqarg(module()->name())
.tqarg(description())
.tqarg(fontPair.second.family())
.tqarg(k->renderedText());
}
else {
ret = TQString::fromLatin1("<b>%1 (%2)</b><br/><small>%3</small><hr>%4")
.arg(key())
.arg(module()->name())
.arg(description())
.arg(k->renderedText());
ret = TQString::tqfromLatin1("<b>%1 (%2)</b><br/><small>%3</small><hr>%4")
.tqarg(key())
.tqarg(module()->name())
.tqarg(description())
.tqarg(k->renderedText());
}
return ret;
@ -405,7 +405,7 @@ TQDomElement CBookmarkItem::saveToXML( TQDomDocument& doc ) {
elem.setAttribute("key", englishKey());
elem.setAttribute("description", description());
elem.setAttribute("modulename", m_moduleName);
elem.setAttribute("moduledescription", module() ? module()->config(CSwordModuleInfo::Description) : TQString::null);
elem.setAttribute("moduledescription", module() ? module()->config(CSwordModuleInfo::Description) : TQString());
return elem;
}
@ -445,9 +445,9 @@ bool CBookmarkItem::acceptDrop(const TQMimeSource* /*src*/) const {
CFolderBase::CFolderBase(CMainIndex* mainIndex, const Type type) : CItemBase(mainIndex, type) {}
CFolderBase::CFolderBase(CFolderBase* parentItem, const Type type) : CItemBase(parentItem, type) {}
CFolderBase::CFolderBase(CFolderBase* tqparentItem, const Type type) : CItemBase(tqparentItem, type) {}
CFolderBase::CFolderBase(CFolderBase* parentFolder, const TQString& caption) : CItemBase(parentFolder) {
CFolderBase::CFolderBase(CFolderBase* tqparentFolder, const TQString& caption) : CItemBase(tqparentFolder) {
setText(0, caption);
}
@ -510,7 +510,7 @@ TQPtrList<TQListViewItem> CFolderBase::getChildList() {
return childs;
TQListViewItem* i = firstChild();
while (i && (i->parent() == this)) {
while (i && (i->tqparent() == this)) {
CItemBase* item = dynamic_cast<CItemBase*>(i);
if (item) { //we found a valid item
childs.append(item);
@ -527,7 +527,7 @@ TQPtrList<TQListViewItem> CFolderBase::getChildList() {
do {
i = i->nextSibling();
}
while (i && (i->parent() != this));
while (i && (i->tqparent() != this));
}
return childs;
@ -652,22 +652,22 @@ void CTreeFolder::initTree() {
continue;
}
if (language() == TQString::fromLatin1("*") || (language() != TQString::fromLatin1("*") && TQString::fromLatin1((*it)->module()->Lang()) == language()) )//right type and language!
if (language() == TQString::tqfromLatin1("*") || (language() != TQString::tqfromLatin1("*") && TQString::tqfromLatin1((*it)->module()->Lang()) == language()) )//right type and language!
usedModules.append(*it);
}
}
//we have now all modules we want to have
if (language() == TQString::fromLatin1("*")) { //create subfolders for each language
if (language() == TQString::tqfromLatin1("*")) { //create subfolders for each language
TQStringList usedLangs;
// for (CSwordModuleInfo* m = usedModules.first(); m; m = usedModules.next()) {
/*ListCSwordModuleInfo::iterator*/
end_it = usedModules.end();
for (ListCSwordModuleInfo::iterator it(usedModules.begin()); it != end_it; ++it) {
TQString lang = TQString::fromLatin1((*it)->module()->Lang());
TQString lang = TQString::tqfromLatin1((*it)->module()->Lang());
// if (lang.isEmpty())
// lang = ");
if (!usedLangs.contains(lang)) {
if (!usedLangs.tqcontains(lang)) {
usedLangs.append(lang);
}
}
@ -714,55 +714,55 @@ namespace Bookmarks {
content.setAttribute("syntaxVersion", CURRENT_SYNTAX_VERSION);
doc.appendChild(content);
//first create the bookmark groups in the XML document, then add the bookmarks to each parent
TQMap<int, TQDomElement> parentMap; //maps parent ids to dom elements
//first create the bookmark groups in the XML document, then add the bookmarks to each tqparent
TQMap<int, TQDomElement> tqparentMap; //maps tqparent ids to dom elements
TQStringList groupList = config->readListEntry("Groups");
TQValueList<int> parentList = config->readIntListEntry("Group parents");
TQValueList<int> tqparentList = config->readIntListEntry("Group tqparents");
TQStringList::Iterator it_groups = groupList.begin();
TQValueList<int>::Iterator it_parents = parentList.begin();
TQValueList<int>::Iterator it_parents = tqparentList.begin();
int parentIDCounter = 0;
while ( (it_groups != groupList.end()) && (it_parents != parentList.end()) ) {
TQDomElement parentElement = (*it_parents == -1) ? content : parentMap[*it_parents];
if (parentElement.isNull()) {
int tqparentIDCounter = 0;
while ( (it_groups != groupList.end()) && (it_parents != tqparentList.end()) ) {
TQDomElement tqparentElement = (*it_parents == -1) ? content : tqparentMap[*it_parents];
if (tqparentElement.isNull()) {
qWarning("EMPTY PARENT FOUND!");
parentElement = content;
tqparentElement = content;
};
TQDomElement elem = doc.createElement("Folder");
elem.setAttribute("caption", (*it_groups));
parentMap.insert(parentIDCounter, elem);
tqparentMap.insert(tqparentIDCounter, elem);
parentElement.appendChild( elem );
tqparentElement.appendChild( elem );
++it_parents;
++it_groups;
++parentIDCounter;
++tqparentIDCounter;
}
//groups are now read in, create now the bookmarks
parentList = config->readIntListEntry("Bookmark parents");
tqparentList = config->readIntListEntry("Bookmark tqparents");
TQStringList bookmarkList = config->readListEntry("Bookmarks");
TQStringList bookmarkModulesList = config->readListEntry("Bookmark modules");
TQStringList bookmarkDescriptionsList = config->readListEntry("Bookmark descriptions");
it_parents = parentList.begin();
it_parents = tqparentList.begin();
TQStringList::Iterator it_bookmarks = bookmarkList.begin();
TQStringList::Iterator it_modules = bookmarkModulesList.begin();
TQStringList::Iterator it_descriptions = bookmarkDescriptionsList.begin();
while ( it_bookmarks != bookmarkList.end()
&& it_parents != parentList.end()
&& it_parents != tqparentList.end()
&& it_modules != bookmarkModulesList.end()
) {
TQDomElement parentElement = ((*it_parents) == -1) ? content : parentMap[(*it_parents)];
if (parentElement.isNull()) {
TQDomElement tqparentElement = ((*it_parents) == -1) ? content : tqparentMap[(*it_parents)];
if (tqparentElement.isNull()) {
qWarning("EMPTY PARENT FOUND!");
parentElement = content;
tqparentElement = content;
};
TQDomElement elem = doc.createElement("Bookmark");
@ -771,9 +771,9 @@ namespace Bookmarks {
elem.setAttribute("modulename", *it_modules);
CSwordModuleInfo* m = CPointers::backend()->findModuleByName( *it_modules );
elem.setAttribute("moduledescription", m ? m->config(CSwordModuleInfo::Description) : TQString::null);
elem.setAttribute("moduledescription", m ? m->config(CSwordModuleInfo::Description) : TQString());
parentElement.appendChild( elem );
tqparentElement.appendChild( elem );
++it_parents;
@ -810,7 +810,7 @@ OldBookmarksFolder::OldBookmarksFolder(CTreeFolder* folder) : CBookmarkFolder(fo
// Append the XML nodes of all child items
CItemBase* i = dynamic_cast<CItemBase*>(firstChild());
while( i ) {
if (i->parent() == this) {
if (i->tqparent() == this) {
TQDomElement newElem = i->saveToXML( doc );
if (!newElem.isNull()) {
elem.appendChild( newElem ); //append to this folder
@ -833,12 +833,12 @@ OldBookmarksFolder::OldBookmarksFolder(CTreeFolder* folder) : CBookmarkFolder(fo
// New class SubFolder
SubFolder::SubFolder(CFolderBase* parentItem, const TQString& caption) : CBookmarkFolder(parentItem, BookmarkFolder) {
SubFolder::SubFolder(CFolderBase* tqparentItem, const TQString& caption) : CBookmarkFolder(tqparentItem, BookmarkFolder) {
m_startupXML = TQDomElement();
setText( 0, caption );
}
SubFolder::SubFolder(CFolderBase* parentItem, TQDomElement& xml ) : CBookmarkFolder(parentItem, BookmarkFolder) {
SubFolder::SubFolder(CFolderBase* tqparentItem, TQDomElement& xml ) : CBookmarkFolder(tqparentItem, BookmarkFolder) {
m_startupXML = xml;
}
@ -892,7 +892,7 @@ SubFolder::SubFolder(CFolderBase* parentItem, TQDomElement& xml ) : CBookmarkFol
//append the XML nodes of all child items
CItemBase* i = dynamic_cast<CItemBase*>(firstChild());
while( i ) {
if (i->parent() == this) {
if (i->tqparent() == this) {
TQDomElement newElem = i->saveToXML( doc );
if (!newElem.isNull()) {
elem.appendChild( newElem ); //append to this folder
@ -912,7 +912,7 @@ SubFolder::SubFolder(CFolderBase* parentItem, TQDomElement& xml ) : CBookmarkFol
//restore all child items
TQDomElement child = elem.firstChild().toElement();
CItemBase* oldItem = 0;
while ( !child.isNull() && child.parentNode() == elem ) {
while ( !child.isNull() && child.tqparentNode() == elem ) {
CItemBase* i = 0;
if (child.tagName() == "Folder") {
i = new Bookmarks::SubFolder(this, child);
@ -939,7 +939,7 @@ CBookmarkFolder::CBookmarkFolder(CMainIndex* mainIndex, const Type type) : CTree
setSortingEnabled(false);
}
CBookmarkFolder::CBookmarkFolder(CFolderBase* parentItem, const Type type) : CTreeFolder(parentItem, type, "*") {
CBookmarkFolder::CBookmarkFolder(CFolderBase* tqparentItem, const Type type) : CTreeFolder(tqparentItem, type, "*") {
setSortingEnabled(false);
}
@ -971,7 +971,7 @@ const bool CBookmarkFolder::enableAction(const MenuAction action) {
void CBookmarkFolder::exportBookmarks() {
TQString fileName = KFileDialog::getSaveFileName(TQString::null, i18n("*.btb | BibleTime bookmark files (*.btb)\n*.* | All files (*.*)"), 0, i18n("BibleTime - Export bookmarks"));
TQString fileName = KFileDialog::getSaveFileName(TQString(), i18n("*.btb | BibleTime bookmark files (*.btb)\n*.* | All files (*.*)"), 0, i18n("BibleTime - Export bookmarks"));
if (!fileName.isEmpty()) {
saveBookmarks( fileName, false ); //false means we don't want to overwrite the file without asking the user
};
@ -979,7 +979,7 @@ void CBookmarkFolder::exportBookmarks() {
void CBookmarkFolder::importBookmarks() {
TQString fileName = KFileDialog::getOpenFileName(TQString::null, i18n("*.btb | BibleTime bookmark files (*.btb)\n*.* | All files (*.*)"), 0, i18n("BibleTime - Import bookmarks"));
TQString fileName = KFileDialog::getOpenFileName(TQString(), i18n("*.btb | BibleTime bookmark files (*.btb)\n*.* | All files (*.*)"), 0, i18n("BibleTime - Import bookmarks"));
if (!fileName.isEmpty()) {
//we have to decide if we should load an old bookmark file from 1.2 or earlier or the new XML format of > 1.3
if ( !loadBookmarks(fileName) ) { //if this failed try to load it as old bookmark file
@ -1035,7 +1035,7 @@ const bool CBookmarkFolder::saveBookmarks( const TQString& filename, const bool&
//append the XML nodes of all child items
CItemBase* i = dynamic_cast<CItemBase*>( firstChild() );
while( i ) {
if (i->parent() == this) { //only one level under this folder
if (i->tqparent() == this) { //only one level under this folder
TQDomElement newElem = i->saveToXML( doc ); // the cild creates it's own XML code
if (!newElem.isNull()) {
content.appendChild( newElem ); //append to this folder
@ -1059,7 +1059,7 @@ const bool CBookmarkFolder::loadBookmarksFromXML( const TQString& xml ) {
CItemBase* oldItem = 0;
//restore all child items
TQDomElement child = document.firstChild().toElement();
while ( !child.isNull() && child.parentNode() == document) {
while ( !child.isNull() && child.tqparentNode() == document) {
CItemBase* i = 0;
if (child.tagName() == "Folder") {
i = new Bookmarks::SubFolder(this, child);
@ -1097,7 +1097,7 @@ const bool CBookmarkFolder::loadBookmarks( const TQString& filename ) {
if (file.open(IO_ReadOnly)) {
TQTextStream t;
t.setEncoding(TQTextStream::UnicodeUTF8); //set encoding before file is used for input!
t.setDevice(&file);
t.setDevice(TQT_TQIODEVICE(&file));
xml = t.read();
file.close();
}
@ -1138,8 +1138,8 @@ void CGlossaryFolder::initTree() {
}
//found a glossary
//ToDo: this is ugly code
if (language() == TQString::fromLatin1("*")
|| (language() != TQString::fromLatin1("*")
if (language() == TQString::tqfromLatin1("*")
|| (language() != TQString::tqfromLatin1("*")
&& (*it)->config(CSwordModuleInfo::GlossaryFrom) == fromLanguage()
&& (*it)->config(CSwordModuleInfo::GlossaryTo) == toLanguage()
)
@ -1150,7 +1150,7 @@ void CGlossaryFolder::initTree() {
}
//we have now all modules we want to have
if (language() == TQString::fromLatin1("*")) { //create subfolders for each language
if (language() == TQString::tqfromLatin1("*")) { //create subfolders for each language
typedef std::pair<TQString, TQString> LanguagePair;
typedef TQValueList<LanguagePair> LanguagePairList;
@ -1163,7 +1163,7 @@ void CGlossaryFolder::initTree() {
(*it)->config(CSwordModuleInfo::GlossaryTo)
);
if (!usedLangs.contains(langPair)) {
if (!usedLangs.tqcontains(langPair)) {
usedLangs.append(langPair);
}
}

@ -17,7 +17,7 @@
#include "backend/cswordmoduleinfo.h"
//Qt includes
//TQt includes
#include <tqdom.h>
//KDE includes
@ -167,8 +167,8 @@ private:
class CBookmarkItem : public CItemBase {
public:
CBookmarkItem(CFolderBase* parentItem, CSwordModuleInfo* module, const TQString& key, const TQString& description);
CBookmarkItem(CFolderBase* parentItem, TQDomElement& xml);
CBookmarkItem(CFolderBase* tqparentItem, CSwordModuleInfo* module, const TQString& key, const TQString& description);
CBookmarkItem(CFolderBase* tqparentItem, TQDomElement& xml);
virtual ~CBookmarkItem();
CSwordModuleInfo* const module();
const TQString key();
@ -228,8 +228,8 @@ private: // Private methods
class CFolderBase : public CItemBase {
public:
CFolderBase(CMainIndex* mainIndex, const Type type);
CFolderBase(CFolderBase* parentFolder, const Type type);
CFolderBase(CFolderBase* parentFolder, const TQString& caption);
CFolderBase(CFolderBase* tqparentFolder, const Type type);
CFolderBase(CFolderBase* tqparentFolder, const TQString& caption);
virtual ~CFolderBase();
virtual const bool isFolder();
@ -263,7 +263,7 @@ protected:
class CTreeFolder : public CFolderBase {
public:
CTreeFolder(CMainIndex* mainIndex, const Type type, const TQString& language );
CTreeFolder(CFolderBase* parentFolder, const Type type, const TQString& language );
CTreeFolder(CFolderBase* tqparentFolder, const Type type, const TQString& language );
virtual ~CTreeFolder();
virtual void addGroup(const Type type, const TQString language);
@ -284,7 +284,7 @@ private:
class CGlossaryFolder : public CTreeFolder {
public:
CGlossaryFolder(CMainIndex* mainIndex, const Type type, const TQString& fromLanguage, const TQString& toLanguage );
CGlossaryFolder(CFolderBase* parentFolder, const Type type, const TQString& fromLanguage, const TQString& toLanguage );
CGlossaryFolder(CFolderBase* tqparentFolder, const Type type, const TQString& fromLanguage, const TQString& toLanguage );
virtual ~CGlossaryFolder();
virtual void initTree();
@ -309,7 +309,7 @@ private:
class CBookmarkFolder : public CTreeFolder {
public:
CBookmarkFolder(CMainIndex* mainIndex, const Type type = BookmarkFolder);
CBookmarkFolder(CFolderBase* parentItem, const Type type = BookmarkFolder);
CBookmarkFolder(CFolderBase* tqparentItem, const Type type = BookmarkFolder);
virtual ~CBookmarkFolder();
virtual const bool enableAction(const MenuAction action);
virtual void exportBookmarks();
@ -356,7 +356,7 @@ public:
/**
* This function converts the old config based bookmarks into a valid 1.3 XML file, so importing is easy
*/
static const TQString oldBookmarksXML( const TQString& configFileName = TQString::null );
static const TQString oldBookmarksXML( const TQString& configFileName = TQString() );
private:
// made provate because we offer one static functions which doesn't need constructor and destructor
OldBookmarkImport();
@ -365,8 +365,8 @@ private:
class SubFolder : public CBookmarkFolder {
public:
SubFolder(CFolderBase* parentItem, const TQString& caption);
SubFolder(CFolderBase* parentItem, TQDomElement& xml);
SubFolder(CFolderBase* tqparentItem, const TQString& caption);
SubFolder(CFolderBase* tqparentItem, TQDomElement& xml);
virtual ~SubFolder();
virtual void init();
/**

@ -26,7 +26,7 @@
#include "util/cresmgr.h"
#include "util/scoped_resource.h"
//Qt includes
//TQt includes
#include <tqheader.h>
#include <tqlistview.h>
#include <tqdragobject.h>
@ -42,7 +42,7 @@
using namespace Printing;
CMainIndex::ToolTip::ToolTip(CMainIndex* parent) : TQToolTip(parent->viewport()), m_mainIndex(parent) {}
CMainIndex::ToolTip::ToolTip(CMainIndex* tqparent) : TQToolTip(tqparent->viewport()), m_mainIndex(tqparent) {}
void CMainIndex::ToolTip::maybeTip(const TQPoint& p) {
CItemBase* i = dynamic_cast<CItemBase*>(m_mainIndex->itemAt(p));
@ -51,7 +51,7 @@ void CMainIndex::ToolTip::maybeTip(const TQPoint& p) {
return;
}
TQRect r = m_mainIndex->itemRect(i);
TQRect r = m_mainIndex->tqitemRect(i);
if (!r.isValid()) {
return;
}
@ -77,7 +77,7 @@ void CMainIndex::ToolTip::maybeTip(const TQPoint& p) {
}
}
CMainIndex::CMainIndex(TQWidget *parent) : KListView(parent),
CMainIndex::CMainIndex(TQWidget *tqparent) : KListView(tqparent),
m_searchDialog(0), m_toolTip(0), m_itemsMovable(false), m_autoOpenFolder(0), m_autoOpenTimer(this) {
initView();
initConnections();
@ -101,7 +101,7 @@ void CMainIndex::addGroup(const CItemBase::Type type, const TQString language) {
break;
case CItemBase::GlossaryModuleFolder:
//we have no second language
i = new CGlossaryFolder(this, type, language, TQString::null);
i = new CGlossaryFolder(this, type, language, TQString());
break;
default:
i = new CTreeFolder(this, type, language);
@ -119,17 +119,17 @@ void CMainIndex::addGroup(const CItemBase::Type type, const TQString language) {
/** Initializes the view. */
void CMainIndex::initView() {
addColumn(TQString::null);
addColumn(TQString());
header()->hide();
m_toolTip = new ToolTip(this);
setTooltipColumn(-1);
//to disable Qt's tooltips
//to disable TQt's tooltips
setShowToolTips(false);
setBackgroundMode(PaletteBase);
setFullWidth(true);
setFocusPolicy(WheelFocus);
setFocusPolicy(TQ_WheelFocus);
setAcceptDrops( true );
setDragEnabled( true );
@ -146,37 +146,37 @@ void CMainIndex::initView() {
m_popup = new KPopupMenu(viewport());
m_popup->insertTitle(i18n("Bookshelf"));
m_actions.newFolder = new KAction(i18n("Create a new folder"), CResMgr::mainIndex::newFolder::icon, 0, this, TQT_SLOT(createNewFolder()), this);
m_actions.changeFolder = new KAction(i18n("Change this folder"),CResMgr::mainIndex::changeFolder::icon, 0, this, TQT_SLOT(changeFolder()), this);
m_actions.newFolder = new KAction(i18n("Create a new folder"), CResMgr::mainIndex::newFolder::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(createNewFolder()), TQT_TQOBJECT(this));
m_actions.changeFolder = new KAction(i18n("Change this folder"),CResMgr::mainIndex::changeFolder::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(changeFolder()), TQT_TQOBJECT(this));
m_actions.changeBookmark = new KAction(i18n("Change bookmark description"),CResMgr::mainIndex::changeBookmark::icon, 0, this, TQT_SLOT(changeBookmark()), this);
m_actions.importBookmarks = new KAction(i18n("Import bookmarks"),CResMgr::mainIndex::importBookmarks::icon, 0, this, TQT_SLOT(importBookmarks()), this);
m_actions.exportBookmarks = new KAction(i18n("Export bookmarks"),CResMgr::mainIndex::exportBookmarks::icon, 0, this, TQT_SLOT(exportBookmarks()), this);
m_actions.printBookmarks = new KAction(i18n("Print bookmarks"),CResMgr::mainIndex::printBookmarks::icon, 0, this, TQT_SLOT(printBookmarks()), this);
m_actions.changeBookmark = new KAction(i18n("Change bookmark description"),CResMgr::mainIndex::changeBookmark::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(changeBookmark()), TQT_TQOBJECT(this));
m_actions.importBookmarks = new KAction(i18n("Import bookmarks"),CResMgr::mainIndex::importBookmarks::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(importBookmarks()), TQT_TQOBJECT(this));
m_actions.exportBookmarks = new KAction(i18n("Export bookmarks"),CResMgr::mainIndex::exportBookmarks::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(exportBookmarks()), TQT_TQOBJECT(this));
m_actions.printBookmarks = new KAction(i18n("Print bookmarks"),CResMgr::mainIndex::printBookmarks::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(printBookmarks()), TQT_TQOBJECT(this));
m_actions.deleteEntries = new KAction(i18n("Remove selected item(s)"),CResMgr::mainIndex::deleteItems::icon, 0, this, TQT_SLOT(deleteEntries()), this);
m_actions.deleteEntries = new KAction(i18n("Remove selected item(s)"),CResMgr::mainIndex::deleteItems::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(deleteEntries()), TQT_TQOBJECT(this));
m_actions.editModuleMenu = new KActionMenu(i18n("Edit this work"),CResMgr::mainIndex::editModuleMenu::icon, this);
m_actions.editModuleMenu = new KActionMenu(i18n("Edit this work"),CResMgr::mainIndex::editModuleMenu::icon, TQT_TQOBJECT(this));
m_actions.editModuleMenu->setDelayed(false);
m_actions.editModulePlain = new KAction(i18n("Plain text"),CResMgr::mainIndex::editModulePlain::icon, 0, this, TQT_SLOT(editModulePlain()), this);
m_actions.editModuleHTML = new KAction(i18n("HTML"),CResMgr::mainIndex::editModuleHTML::icon, 0, this, TQT_SLOT(editModuleHTML()), this);
m_actions.editModulePlain = new KAction(i18n("Plain text"),CResMgr::mainIndex::editModulePlain::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(editModulePlain()), TQT_TQOBJECT(this));
m_actions.editModuleHTML = new KAction(i18n("HTML"),CResMgr::mainIndex::editModuleHTML::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(editModuleHTML()), TQT_TQOBJECT(this));
m_actions.searchInModules = new KAction(i18n("Search in selected work(s)"),CResMgr::mainIndex::search::icon, 0, this, TQT_SLOT(searchInModules()), this);
m_actions.unlockModule = new KAction(i18n("Unlock this work"),CResMgr::mainIndex::unlockModule::icon, 0, this, TQT_SLOT(unlockModule()), this);
m_actions.aboutModule = new KAction(i18n("About this work"),CResMgr::mainIndex::aboutModule::icon, 0, this, TQT_SLOT(aboutModule()), this);
m_actions.searchInModules = new KAction(i18n("Search in selected work(s)"),CResMgr::mainIndex::search::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(searchInModules()), TQT_TQOBJECT(this));
m_actions.unlockModule = new KAction(i18n("Unlock this work"),CResMgr::mainIndex::unlockModule::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(unlockModule()), TQT_TQOBJECT(this));
m_actions.aboutModule = new KAction(i18n("About this work"),CResMgr::mainIndex::aboutModule::icon, 0, TQT_TQOBJECT(this), TQT_SLOT(aboutModule()), TQT_TQOBJECT(this));
//fill the popup menu itself
m_actions.newFolder->plug(m_popup);
m_actions.changeFolder->plug(m_popup);
(new KActionSeparator(this))->plug(m_popup);
(new KActionSeparator(TQT_TQOBJECT(this)))->plug(m_popup);
m_actions.changeBookmark->plug(m_popup);
m_actions.importBookmarks->plug(m_popup);
m_actions.exportBookmarks->plug(m_popup);
m_actions.printBookmarks->plug(m_popup);
(new KActionSeparator(this))->plug(m_popup);
(new KActionSeparator(TQT_TQOBJECT(this)))->plug(m_popup);
m_actions.deleteEntries->plug(m_popup);
(new KActionSeparator(this))->plug(m_popup);
(new KActionSeparator(TQT_TQOBJECT(this)))->plug(m_popup);
m_actions.editModuleMenu->plug(m_popup);
//sub item of edit module menu
m_actions.editModuleMenu->insert(m_actions.editModulePlain);
@ -214,7 +214,7 @@ void CMainIndex::slotExecuted( TQListViewItem* i ) {
CSwordModuleInfo* mod = m->module();
ListCSwordModuleInfo modules;
modules.append(mod);
emit createReadDisplayWindow(modules, TQString::null);
emit createReadDisplayWindow(modules, TQString());
}
else if (CBookmarkItem* b = dynamic_cast<CBookmarkItem*>(i) ) { //clicked on a bookmark
if (CSwordModuleInfo* mod = b->module()) {
@ -243,7 +243,7 @@ TQDragObject* CMainIndex::dragObject() {
if (CBookmarkItem* bookmark = dynamic_cast<CBookmarkItem*>( items.current() )) {
//take care of bookmarks which have no valid module any more, e.g. if it was uninstalled
const TQString moduleName = bookmark->module() ? bookmark->module()->name() : TQString::null;
const TQString moduleName = bookmark->module() ? bookmark->module()->name() : TQString();
dndItems.append( CDragDropMgr::Item(moduleName, bookmark->key(), bookmark->description()) );
}
}
@ -272,9 +272,9 @@ void CMainIndex::initTree() {
}
/** No descriptions */
void CMainIndex::dropped( TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after) {
void CMainIndex::dropped( TQDropEvent* e, TQListViewItem* tqparent, TQListViewItem* after) {
Q_ASSERT(after);
Q_ASSERT(parent);
Q_ASSERT(tqparent);
//the drop was started in this main index widget
if (m_itemsMovable && ((e->source()) == (viewport()))) {
@ -283,7 +283,7 @@ void CMainIndex::dropped( TQDropEvent* e, TQListViewItem* parent, TQListViewItem
* folder or one of its subfolders
* we remove the current items because the new ones will be inserted soon.
*/
if (dynamic_cast<CBookmarkFolder*>(parent) || dynamic_cast<Bookmarks::SubFolder*>(parent)) {
if (dynamic_cast<CBookmarkFolder*>(tqparent) || dynamic_cast<Bookmarks::SubFolder*>(tqparent)) {
// we drop onto the bookmark folder or one of it's subfolders
// TQPtrList<TQListViewItem> items = selectedItems();
// items.setAutoDelete(true);
@ -292,7 +292,7 @@ void CMainIndex::dropped( TQDropEvent* e, TQListViewItem* parent, TQListViewItem
}
//finally do the drop, either with external drop data or with the moved items' data
CItemBase* const parentItem = dynamic_cast<CItemBase*>(parent);
CItemBase* const tqparentItem = dynamic_cast<CItemBase*>(tqparent);
CItemBase* const afterItem = dynamic_cast<CItemBase*>(after);
bool removeSelectedItems = true;
@ -305,11 +305,11 @@ void CMainIndex::dropped( TQDropEvent* e, TQListViewItem* parent, TQListViewItem
afterItem->setOpen(true);
afterItem->dropped(e); //inserts new items, moving only works on the same level
}
else if (afterItem && !afterItem->isFolder() && parentItem) {
else if (afterItem && !afterItem->isFolder() && tqparentItem) {
const bool justMoveSelected =
(e->source() == viewport())
&& m_itemsMovable
&& parentItem->acceptDrop(e)
&& tqparentItem->acceptDrop(e)
&& !afterItem->acceptDrop(e);
if (justMoveSelected) {
@ -323,19 +323,19 @@ void CMainIndex::dropped( TQDropEvent* e, TQListViewItem* parent, TQListViewItem
if (afterItem->acceptDrop(e)) {
afterItem->dropped(e, after);
}
else { //insert in the parent folder and then move the inserted items
parentItem->dropped(e, after);
else { //insert in the tqparent folder and then move the inserted items
tqparentItem->dropped(e, after);
}
}
parentItem->setOpen(true);
tqparentItem->setOpen(true);
}
else if (parentItem) { //no after item present, but a parent is there
else if (tqparentItem) { //no after item present, but a tqparent is there
moveSelectedItems = false;
removeSelectedItems = false;
parentItem->setOpen(true);
parentItem->dropped(e);
tqparentItem->setOpen(true);
tqparentItem->dropped(e);
}
if (moveSelectedItems) {
@ -520,7 +520,7 @@ void CMainIndex::printBookmarks() {
}
util::scoped_ptr<CPrinter> printer(
new CPrinter( this, CBTConfig::getDisplayOptionDefaults(), CBTConfig::getFilterOptionDefaults() )
new CPrinter( TQT_TQOBJECT(this), CBTConfig::getDisplayOptionDefaults(), CBTConfig::getFilterOptionDefaults() )
);
printer->printKeyTree(tree);
}
@ -564,14 +564,14 @@ void CMainIndex::searchInModules() {
}
}
Search::CSearchDialog::openDialog(modules, TQString::null);
Search::CSearchDialog::openDialog(modules, TQString());
}
/** Unlocks the current module. */
void CMainIndex::unlockModule() {
if (CModuleItem* i = dynamic_cast<CModuleItem*>(currentItem())) {
bool ok = false;
const TQString unlockKey = QInputDialog::getText(i18n("BibleTime - Unlock work"),
const TQString unlockKey = TQInputDialog::getText(i18n("BibleTime - Unlock work"),
i18n("Enter the unlock key for this work."),
TQLineEdit::Normal, i->module()->config(CSwordModuleInfo::CipherKey), &ok);
@ -702,7 +702,7 @@ void CMainIndex::editModulePlain() {
}
}
if (modules.count() == 1) {
emit createWriteDisplayWindow(modules.first(), TQString::null, CDisplayWindow::PlainTextWindow);
emit createWriteDisplayWindow(modules.first(), TQString(), CDisplayWindow::PlainTextWindow);
};
}
@ -717,7 +717,7 @@ void CMainIndex::editModuleHTML() {
}
if (modules.count() == 1) {
emit createWriteDisplayWindow(modules.first(), TQString::null, CDisplayWindow::HTMLWindow);
emit createWriteDisplayWindow(modules.first(), TQString(), CDisplayWindow::HTMLWindow);
}
}
@ -762,13 +762,13 @@ void CMainIndex::readSettings() {
TQStringList openGroups = CBTConfig::get(CBTConfig::bookshelfOpenGroups);
for (TQStringList::Iterator it( openGroups.begin() ); it != openGroups.end(); ++it) {
TQStringList path = TQStringList::split("/", (*it)); //e.g. with items parent, child
TQStringList path = TQStringList::split("/", (*it)); //e.g. with items tqparent, child
TQListViewItem* item = firstChild(); //begin on the top for each item
Q_ASSERT(item);
unsigned int index = 1;
for (TQStringList::Iterator p_it( path.begin() ); p_it != path.end(); ++p_it) {
TQString itemName = (*p_it).replace("\\/", "/");
TQString itemName = (*p_it).tqreplace("\\/", "/");
while (item && (item->text(0) != itemName)) {
item = item->nextSibling();
@ -833,9 +833,9 @@ void CMainIndex::saveSettings() {
//it.current()'s full name needs to be added to the list
TQListViewItem* i = it.current();
TQString fullName = i->text(0);
while (i->parent()) {
i = i->parent();
fullName.prepend("/").prepend( i->text(0).replace("/", "\\/")); // parent / child
while (i->tqparent()) {
i = i->tqparent();
fullName.prepend("/").prepend( i->text(0).tqreplace("/", "\\/")); // tqparent / child
}
openGroups << fullName;
}
@ -856,7 +856,7 @@ void CMainIndex::saveSettings() {
TQString path;
while (item) {
path.prepend( item->text(0) + "/" );
item = item->parent();
item = item->tqparent();
}
CBTConfig::set(CBTConfig::bookshelfCurrentItem, path);
}

@ -20,7 +20,7 @@
#include "util/cpointers.h"
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqtimer.h>
#include <tqtooltip.h>
@ -36,10 +36,11 @@ class CSearchDialog;
*/
class CMainIndex : public KListView {
Q_OBJECT
TQ_OBJECT
class ToolTip : public TQToolTip {
public:
ToolTip(CMainIndex* parent);
ToolTip(CMainIndex* tqparent);
virtual ~ToolTip() {}
/**
* Displays a tooltip for position p using the getToolTip() function of CGroupManagerItem
@ -51,7 +52,7 @@ class CMainIndex : public KListView {
};
public:
CMainIndex(TQWidget *parent);
CMainIndex(TQWidget *tqparent);
virtual ~CMainIndex();
void initTree();

@ -21,18 +21,18 @@
#include <tqwhatsthis.h>
/*
* Constructs a ManageIndicesForm as a child of 'parent', with the
* Constructs a ManageIndicesForm as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
ManageIndicesForm::ManageIndicesForm( TQWidget* parent, const char* name, WFlags fl )
: TQWidget( parent, name, fl )
ManageIndicesForm::ManageIndicesForm( TQWidget* tqparent, const char* name, WFlags fl )
: TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "ManageIndicesForm" );
ManageIndicesFormLayout = new TQVBoxLayout( this, 0, 8, "ManageIndicesFormLayout");
m_labelFrame = new TQFrame( this, "m_labelFrame" );
m_labelFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, m_labelFrame->sizePolicy().hasHeightForWidth() ) );
m_labelFrame->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, m_labelFrame->sizePolicy().hasHeightForWidth() ) );
m_labelFrame->setFrameShape( TQFrame::NoFrame );
m_labelFrame->setFrameShadow( TQFrame::Plain );
ManageIndicesFormLayout->addWidget( m_labelFrame );
@ -43,18 +43,18 @@ ManageIndicesForm::ManageIndicesForm( TQWidget* parent, const char* name, WFlags
m_moduleList = new KListView( this, "m_moduleList" );
ManageIndicesFormLayout->addWidget( m_moduleList );
layout1 = new TQHBoxLayout( 0, 0, 6, "layout1");
tqlayout1 = new TQHBoxLayout( 0, 0, 6, "tqlayout1");
spacer1 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
layout1->addItem( spacer1 );
tqlayout1->addItem( spacer1 );
m_createIndicesButton = new TQPushButton( this, "m_createIndicesButton" );
layout1->addWidget( m_createIndicesButton );
tqlayout1->addWidget( m_createIndicesButton );
m_deleteIndicesButton = new TQPushButton( this, "m_deleteIndicesButton" );
layout1->addWidget( m_deleteIndicesButton );
ManageIndicesFormLayout->addLayout( layout1 );
tqlayout1->addWidget( m_deleteIndicesButton );
ManageIndicesFormLayout->addLayout( tqlayout1 );
languageChange();
resize( TQSize(415, 404).expandedTo(minimumSizeHint()) );
resize( TQSize(415, 404).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
}
@ -63,7 +63,7 @@ ManageIndicesForm::ManageIndicesForm( TQWidget* parent, const char* name, WFlags
*/
ManageIndicesForm::~ManageIndicesForm()
{
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, TQt does it all for us
}
/*

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ManageIndicesForm</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>ManageIndicesForm</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -25,7 +25,7 @@
<property name="spacing">
<number>8</number>
</property>
<widget class="QFrame">
<widget class="TQFrame">
<property name="name">
<cstring>m_labelFrame</cstring>
</property>
@ -44,7 +44,7 @@
<enum>Plain</enum>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>m_autoDeleteOrphanedIndicesBox</cstring>
</property>
@ -60,9 +60,9 @@
<cstring>m_moduleList</cstring>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout1</cstring>
<cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
@ -78,14 +78,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>m_createIndicesButton</cstring>
</property>
@ -93,7 +93,7 @@
<string>&amp;Create selected indices</string>
</property>
</widget>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>m_deleteIndicesButton</cstring>
</property>
@ -107,7 +107,7 @@
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>

@ -19,7 +19,7 @@
#include "util/cresmgr.h"
#include "util/ctoolclass.h"
//Qt includes
//TQt includes
#include <tqhbox.h>
#include <tqvbox.h>
#include <tqptrlist.h>
@ -48,7 +48,7 @@ namespace Search {
/****************************/
/****************************/
CModuleChooser::ModuleCheckBoxItem::ModuleCheckBoxItem(TQListViewItem* item, CSwordModuleInfo* module) : TQCheckListItem(item, TQString::null, TQCheckListItem::CheckBox) {
CModuleChooser::ModuleCheckBoxItem::ModuleCheckBoxItem(TQListViewItem* item, CSwordModuleInfo* module) : TQCheckListItem(item, TQString(), TQCheckListItem::CheckBox) {
m_module = module;
setText(0,m_module->name());
};
@ -66,7 +66,7 @@ CSwordModuleInfo* const CModuleChooser::ModuleCheckBoxItem::module() const {
/****************************/
/****************************/
CModuleChooser::CModuleChooser(TQWidget* parent) : KListView(parent) {
CModuleChooser::CModuleChooser(TQWidget* tqparent) : KListView(tqparent) {
initView();
initTree();
}
@ -120,7 +120,7 @@ void CModuleChooser::initTree() {
while (ok) {
ListCSwordModuleInfo modsForType;
TQString typeFolderCaption = TQString::null;
TQString typeFolderCaption = TQString();
incType = false;
if (static_cast<CSwordModuleInfo::ModuleType>(type) == CSwordModuleInfo::Lexicon) {
if (!addedLexs) {
@ -136,7 +136,7 @@ void CModuleChooser::initTree() {
};
addedLexs = true;
typeFolderCaption = TQString::null;
typeFolderCaption = TQString();
}
else if (!addedDevotionals) {
// for (mods.first(); mods.current(); mods.next()) {
@ -186,7 +186,7 @@ void CModuleChooser::initTree() {
// for (modsForType.first(); modsForType.current(); modsForType.next()) {
ListCSwordModuleInfo::iterator end_it = modsForType.end();
for (ListCSwordModuleInfo::iterator it(modsForType.begin()); it != end_it; ++it) {
if ( !langs.contains(TQString( (*it)->module()->Lang() ))) {
if ( !langs.tqcontains(TQString( (*it)->module()->Lang() ))) {
langs.append( (*it)->module()->Lang() );
}
};
@ -205,7 +205,7 @@ void CModuleChooser::initTree() {
};
TQString language = TQString::null;
TQString language = TQString();
CLanguageMgr* langMgr = languageMgr();
for ( TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it ) {
language = langMgr->languageForAbbrev(*it)->translatedName();
@ -256,7 +256,7 @@ void CModuleChooser::setModules( ListCSwordModuleInfo modules ) {
TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
if ( ModuleCheckBoxItem* i = dynamic_cast<ModuleCheckBoxItem*>(it.current()) ) {
i->setOn(modules.contains(i->module())); //set the status for the module checkbox item
i->setOn(modules.tqcontains(i->module())); //set the status for the module checkbox item
// if (i->isOn()) { //if it's checked, show the item
// qWarning("show item!");
// ensureItemVisible(i);
@ -267,8 +267,8 @@ void CModuleChooser::setModules( ListCSwordModuleInfo modules ) {
/****************************/
CModuleChooserDialog::CModuleChooserDialog( TQWidget* parentDialog, ListCSwordModuleInfo modules ) :
KDialogBase(Plain, i18n("Choose work(s)"), Ok, Ok, parentDialog, "CModuleChooser", false, true) {
CModuleChooserDialog::CModuleChooserDialog( TQWidget* tqparentDialog, ListCSwordModuleInfo modules ) :
KDialogBase(Plain, i18n("Choose work(s)"), Ok, Ok, tqparentDialog, "CModuleChooser", false, true) {
initView();
initConnections();
@ -283,10 +283,10 @@ void CModuleChooserDialog::initView() {
setButtonOKText(i18n("Use chosen work(s)"));
TQFrame* page = plainPage();
TQHBoxLayout* layout = new TQHBoxLayout(page);
TQHBoxLayout* tqlayout = new TQHBoxLayout(page);
m_moduleChooser = new CModuleChooser(page);
m_moduleChooser->setMinimumSize(320,400);
layout->addWidget(m_moduleChooser);
tqlayout->addWidget(m_moduleChooser);
}
/** Initializes the connections of this dialog. */

@ -23,7 +23,7 @@
//Sword includes
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqstring.h>
#include <tqcanvas.h>
@ -40,6 +40,7 @@ namespace Search {
class CModuleChooser : public KListView, public CPointers {
Q_OBJECT
TQ_OBJECT
public:
class ModuleCheckBoxItem : virtual public TQCheckListItem {
public:
@ -53,7 +54,7 @@ public:
CSwordModuleInfo* m_module;
};
CModuleChooser(TQWidget* parent);
CModuleChooser(TQWidget* tqparent);
~CModuleChooser();
/**
* Sets the list of modules and updates the state of the checkbox items.
@ -84,8 +85,9 @@ protected: // Protected methods
class CModuleChooserDialog : public KDialogBase {
Q_OBJECT
TQ_OBJECT
public:
CModuleChooserDialog(TQWidget* parentDialog, ListCSwordModuleInfo modules);
CModuleChooserDialog(TQWidget* tqparentDialog, ListCSwordModuleInfo modules);
~CModuleChooserDialog();
signals:

@ -19,7 +19,7 @@
#include "util/cresmgr.h"
#include "util/ctoolclass.h"
//Qt includes
//TQt includes
//KDE includes
#include <klocale.h>
@ -34,8 +34,8 @@ namespace Search {
************ ModuleResultList **************
********************************************/
CModuleResultView::CModuleResultView(TQWidget* parent, const char* name) :
KListView(parent, name) {
CModuleResultView::CModuleResultView(TQWidget* tqparent, const char* name) :
KListView(tqparent, name) {
initView();
initConnections();
strongsResults = 0;
@ -60,25 +60,25 @@ void CModuleResultView::initView() {
m_popup = new KPopupMenu(this);
// m_popup->insertTitle(i18n("Bible window"));
m_actions.copyMenu = new KActionMenu(i18n("Copy..."), CResMgr::searchdialog::result::moduleList::copyMenu::icon, m_popup);
m_actions.copyMenu = new KActionMenu(i18n("Copy..."), CResMgr::searchdialog::result::moduleList::copyMenu::icon, TQT_TQOBJECT(m_popup));
m_actions.copyMenu->setDelayed(false);
m_actions.copy.result = new KAction(i18n("Reference only"), KShortcut(0), this, TQT_SLOT(copyResult()), this);
m_actions.copy.result = new KAction(i18n("Reference only"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(copyResult()), TQT_TQOBJECT(this));
m_actions.copyMenu->insert(m_actions.copy.result);
m_actions.copy.resultWithText = new KAction(i18n("Reference with text"), KShortcut(0), this, TQT_SLOT(copyResultWithText()), this);
m_actions.copy.resultWithText = new KAction(i18n("Reference with text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(copyResultWithText()), TQT_TQOBJECT(this));
m_actions.copyMenu->insert(m_actions.copy.resultWithText);
m_actions.copyMenu->plug(m_popup);
m_actions.saveMenu = new KActionMenu(i18n("Save..."), CResMgr::searchdialog::result::moduleList::saveMenu::icon, m_popup);
m_actions.saveMenu = new KActionMenu(i18n("Save..."), CResMgr::searchdialog::result::moduleList::saveMenu::icon, TQT_TQOBJECT(m_popup));
m_actions.saveMenu->setDelayed( false );
m_actions.save.result = new KAction(i18n("Reference only"), KShortcut(0), this, TQT_SLOT(saveResult()), this);
m_actions.save.result = new KAction(i18n("Reference only"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(saveResult()), TQT_TQOBJECT(this));
m_actions.saveMenu->insert(m_actions.save.result);
m_actions.save.resultWithText = new KAction(i18n("Reference with text"), KShortcut(0), this, TQT_SLOT(saveResultWithText()), this);
m_actions.save.resultWithText = new KAction(i18n("Reference with text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(saveResultWithText()), TQT_TQOBJECT(this));
m_actions.saveMenu->insert(m_actions.save.resultWithText);
m_actions.saveMenu->plug(m_popup);
m_actions.printMenu = new KActionMenu(i18n("Print..."), CResMgr::searchdialog::result::moduleList::printMenu::icon, m_popup);
m_actions.printMenu = new KActionMenu(i18n("Print..."), CResMgr::searchdialog::result::moduleList::printMenu::icon, TQT_TQOBJECT(m_popup));
m_actions.printMenu->setDelayed(false);
m_actions.print.result = new KAction(i18n("Reference with text"), KShortcut(0), this, TQT_SLOT(printResult()), this);
m_actions.print.result = new KAction(i18n("Reference with text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(printResult()), TQT_TQOBJECT(this));
m_actions.printMenu->insert(m_actions.print.result);
@ -125,7 +125,7 @@ void CModuleResultView::setupTree( ListCSwordModuleInfo modules, const TQString&
// I choose option number 2 at this time.
//----------------------------------------------------------------------
int sstIndex, sTokenIndex; // strong search text index for finding "strong:"
if ((sstIndex = searchedText.find("strong:", 0)) != -1) {
if ((sstIndex = searchedText.tqfind("strong:", 0)) != -1) {
TQString sNumber;
//--------------------------------------------------
// get the strongs number from the search text
@ -133,7 +133,7 @@ void CModuleResultView::setupTree( ListCSwordModuleInfo modules, const TQString&
// first find the first space after "strong:"
// this should indicate a change in search token
sstIndex = sstIndex + 7;
sTokenIndex = searchedText.find(" ", sstIndex);
sTokenIndex = searchedText.tqfind(" ", sstIndex);
sNumber = searchedText.mid(sstIndex, sTokenIndex - sstIndex);
setupStrongsResults((*it), item, sNumber);
@ -150,7 +150,7 @@ void CModuleResultView::setupTree( ListCSwordModuleInfo modules, const TQString&
executed(currentItem());
}
void CModuleResultView::setupStrongsResults(CSwordModuleInfo* module, TQListViewItem* parent,
void CModuleResultView::setupStrongsResults(CSwordModuleInfo* module, TQListViewItem* tqparent,
const TQString& sNumber) {
TQString lText;
util::CSortListViewItem* item = 0;
@ -160,7 +160,7 @@ void CModuleResultView::setupStrongsResults(CSwordModuleInfo* module, TQListView
for (int cnt = 0; cnt < strongsResults->Count(); ++cnt) {
lText = strongsResults->keyText(cnt);
item = new util::CSortListViewItem(parent, lText, TQString::number(strongsResults->keyCount(cnt)));
item = new util::CSortListViewItem(tqparent, lText, TQString::number(strongsResults->keyCount(cnt)));
item->setColumnSorting(1, util::CSortListViewItem::Number);
}
}
@ -201,10 +201,10 @@ CSwordModuleInfo* const CModuleResultView::activeModule() {
return 0;
}
// we need to find the parent most node because that is the node
// we need to find the tqparent most node because that is the node
// that is the module name.
while (item->parent()) {
item = item->parent();
while (item->tqparent()) {
item = item->tqparent();
}
if (item) {

@ -16,7 +16,7 @@
#include "backend/cswordmoduleinfo.h"
#include "csearchdialogpages.h"
//Qt includes
//TQt includes
//KDE includes
#include <klistview.h>
@ -41,8 +41,9 @@ namespace Search {
class CModuleResultView : public KListView {
Q_OBJECT
TQ_OBJECT
public:
CModuleResultView(TQWidget* parent, const char* name = 0);
CModuleResultView(TQWidget* tqparent, const char* name = 0);
~CModuleResultView();
/**
@ -64,7 +65,7 @@ protected: // Protected methods
*/
void initConnections();
void setupStrongsResults(CSwordModuleInfo* module, TQListViewItem* parent, const TQString& searchedText);
void setupStrongsResults(CSwordModuleInfo* module, TQListViewItem* tqparent, const TQString& searchedText);
protected slots: // Protected slots
/**

@ -19,7 +19,7 @@
#include "util/cresmgr.h"
#include "util/ctoolclass.h"
//Qt includes
//TQt includes
#include <tqhbox.h>
#include <tqvbox.h>
#include <tqptrlist.h>
@ -71,7 +71,7 @@ void CRangeChooserDialog::RangeItem::setCaption(const TQString newCaption) {
/**************************/
CRangeChooserDialog::CRangeChooserDialog( TQWidget* parentDialog ) : KDialogBase(Plain, i18n("Search range editor"), Default | Ok | Cancel, Ok, parentDialog, "CRangeChooserDialog", false, true) {
CRangeChooserDialog::CRangeChooserDialog( TQWidget* tqparentDialog ) : KDialogBase(Plain, i18n("Search range editor"), Default | Ok | Cancel, Ok, tqparentDialog, "CRangeChooserDialog", false, true) {
initView();
initConnections();
@ -100,7 +100,7 @@ void CRangeChooserDialog::initView() {
m_rangeList = new KListView(plainPage());
m_rangeList->addColumn(i18n("Search range"));
m_rangeList->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding));
m_rangeList->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding));
m_rangeList->setFullWidth(true);
m_rangeList->setSorting(0, true);
m_rangeList->header()->setClickEnabled(false);
@ -123,9 +123,9 @@ void CRangeChooserDialog::initView() {
grid->addWidget(m_nameEdit,0,4);
label = new TQLabel(i18n("Edit current search range:"), plainPage());
label->setFixedSize(label->sizeHint());
label->setFixedSize(label->tqsizeHint());
m_rangeEdit = new TQTextEdit(plainPage());
m_rangeEdit->setTextFormat(Qt::PlainText);
m_rangeEdit->setTextFormat(TQt::PlainText);
grid->addMultiCellWidget(label,1,1,3,4);
grid->addMultiCellWidget(m_rangeEdit,2,2,3,4);
@ -190,7 +190,7 @@ void CRangeChooserDialog::parseRange() {
//hack: repair range to work with Sword 1.5.6
TQString range( m_rangeEdit->text() );
range.replace(TQRegExp("\\s{0,}-\\s{0,}"), "-" );
range.tqreplace(TQRegExp("\\s{0,}-\\s{0,}"), "-" );
sword::VerseKey key;
sword::ListKey verses = key.ParseVerseList((const char*)range.utf8(), "Genesis 1:1", true);
@ -207,7 +207,7 @@ void CRangeChooserDialog::rangeChanged() {
) {
TQString range( m_rangeEdit->text() );
//hack: repair range to work with Sword 1.5.6
range.replace(TQRegExp("\\s{0,}-\\s{0,}"), "-" );
range.tqreplace(TQRegExp("\\s{0,}-\\s{0,}"), "-" );
i->setRange(range);
};
}

@ -21,7 +21,7 @@
//Sword includes
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqstring.h>
#include <tqcanvas.h>
@ -46,14 +46,15 @@ namespace Search {
class CRangeChooserDialog : public KDialogBase {
Q_OBJECT
TQ_OBJECT
public:
CRangeChooserDialog(TQWidget* parentDialog);
CRangeChooserDialog(TQWidget* tqparentDialog);
~CRangeChooserDialog();
protected: // Protected methods
class RangeItem : public KListViewItem {
public:
RangeItem(TQListView*, TQListViewItem* afterThis = 0, const TQString caption = TQString::null, const TQString range = TQString::null);
RangeItem(TQListView*, TQListViewItem* afterThis = 0, const TQString caption = TQString(), const TQString range = TQString());
~RangeItem();
const TQString& range();
const TQString caption();

@ -20,7 +20,7 @@
#include "util/cresmgr.h"
#include "util/ctoolclass.h"
//Qt includes
//TQt includes
#include <tqhbox.h>
#include <tqvbox.h>
#include <tqptrlist.h>
@ -67,7 +67,7 @@ const int LEGEND_WIDTH = 85;
/****************************/
CSearchAnalysisDialog::CSearchAnalysisDialog( ListCSwordModuleInfo modules, TQWidget* parentDialog ) : KDialogBase(Plain, i18n("Search analysis"), Close, Close, parentDialog, 0, true) {
CSearchAnalysisDialog::CSearchAnalysisDialog( ListCSwordModuleInfo modules, TQWidget* tqparentDialog ) : KDialogBase(Plain, i18n("Search analysis"), Close, Close, tqparentDialog, 0, true) {
initView();
initConnections();
m_analysis->reset();
@ -80,19 +80,19 @@ CSearchAnalysisDialog::~CSearchAnalysisDialog() {}
/** Initializes this dialog. */
void CSearchAnalysisDialog::initView() {
TQVBoxLayout* layout = new TQVBoxLayout(plainPage(),0);
TQVBoxLayout* tqlayout = new TQVBoxLayout(plainPage(),0);
TQPushButton* button = new TQPushButton(plainPage(), "button");
button->setIconSet(SmallIconSet("filesave"));
button->setText(i18n("Save search analysis as HTML"));
button->setFixedSize(button->sizeHint());
layout->addWidget(button);
layout->addSpacing(10);
button->setFixedSize(button->tqsizeHint());
tqlayout->addWidget(button);
tqlayout->addSpacing(10);
m_analysis = new CSearchAnalysis(plainPage());
m_analysis = new CSearchAnalysis(TQT_TQOBJECT(plainPage()));
m_analysisView = new CSearchAnalysisView(m_analysis, plainPage());
m_analysisView->show();
layout->addWidget(m_analysisView);
tqlayout->addWidget(m_analysisView);
connect(button, TQT_SIGNAL(clicked()), m_analysis, TQT_SLOT(saveAsHTML()));
}
@ -104,12 +104,12 @@ void CSearchAnalysisDialog::initConnections() {}
/* CSearchAnalysis */
/****************************/
CSearchAnalysis::CSearchAnalysis(TQObject *parent, const char *name )
: TQCanvas(parent,name) {
CSearchAnalysis::CSearchAnalysis(TQObject *tqparent, const char *name )
: TQCanvas(tqparent,name) {
m_scaleFactor = 0.0;
m_legend = 0;
setBackgroundColor(Qt::white);
setBackgroundColor(TQt::white);
m_canvasItemList.resize(67);
m_canvasItemList.setAutoDelete(true);
resize(1,1);
@ -160,8 +160,8 @@ void CSearchAnalysis::analyse(ListCSwordModuleInfo modules) {
moduleIndex = 0;
ListCSwordModuleInfo::iterator end_it = m_moduleList.end();
for (ListCSwordModuleInfo::iterator it(m_moduleList.begin()); it != end_it; ++it) {
KApplication::kApplication()->processEvents( 10 ); //10 ms only
if (!m_lastPosList.contains(*it)) {
KApplication::kApplication()->tqprocessEvents( 10 ); //10 ms only
if (!m_lastPosList.tqcontains(*it)) {
m_lastPosList.insert(*it,0);
}
@ -244,27 +244,27 @@ void CSearchAnalysis::slotResized() {
TQColor CSearchAnalysis::getColor(int index) {
switch (index) {
case 0:
return Qt::red;
return TQt::red;
case 1:
return Qt::darkGreen;
return TQt::darkGreen;
case 2:
return Qt::blue;
return TQt::blue;
case 3:
return Qt::cyan;
return TQt::cyan;
case 4:
return Qt::magenta;
return TQt::magenta;
case 5:
return Qt::darkRed;
return TQt::darkRed;
case 6:
return Qt::darkGray;
return TQt::darkGray;
case 7:
return Qt::black;
return TQt::black;
case 8:
return Qt::darkCyan;
return TQt::darkCyan;
case 9:
return Qt::darkMagenta;
return TQt::darkMagenta;
default:
return Qt::red;
return TQt::red;
}
}
@ -281,7 +281,7 @@ const unsigned int CSearchAnalysis::getCount( const TQString book, CSwordModuleI
i++;
++count;
}
m_lastPosList.contains(module) ? m_lastPosList.replace(module,i) : m_lastPosList.insert(module,i);
m_lastPosList.tqcontains(module) ? m_lastPosList.tqreplace(module,i) : m_lastPosList.insert(module,i);
return count;
}
@ -290,8 +290,8 @@ const unsigned int CSearchAnalysis::getCount( const TQString book, CSwordModuleI
//------------------------------------------------------------------
//------------------------------------------------------------------
CSearchAnalysisItem::CSearchAnalysisItem(TQCanvas *parent, const int moduleCount, const TQString &bookname, double *scaleFactor, ListCSwordModuleInfo* modules)
: TQCanvasRectangle(parent),
CSearchAnalysisItem::CSearchAnalysisItem(TQCanvas *tqparent, const int moduleCount, const TQString &bookname, double *scaleFactor, ListCSwordModuleInfo* modules)
: TQCanvasRectangle(tqparent),
m_moduleList( modules ),
m_scaleFactor(scaleFactor),
m_bookName(bookname),
@ -324,7 +324,7 @@ void CSearchAnalysisItem::draw(TQPainter& painter) {
painter.setFont(f);
setPen(TQPen(black,1));
setBrush(Qt::red);
setBrush(TQt::red);
/**
* We have to paint so many bars as we have modules available (we use m_moduleCount)
* We paint inside the area which is given by height and width of this rectangle item
@ -381,7 +381,7 @@ int CSearchAnalysisItem::width() {
/** Returns the tooltip for this item. */
const TQString CSearchAnalysisItem::getToolTip() {
TQString ret = TQString("<center><b>%1</b></center><hr/>").arg(m_bookName);
TQString ret = TQString("<center><b>%1</b></center><hr/>").tqarg(m_bookName);
ret += "<table cellspacing=\"0\" cellpadding=\"3\" width=\"100%\" height=\"100%\" align=\"center\">";
//ToDo: Fix that loop
@ -395,10 +395,10 @@ const TQString CSearchAnalysisItem::getToolTip() {
ret.append(
TQString("<tr bgcolor=\"white\"><td><b><font color=\"#%1\">%2</font></b></td><td>%3 (%4%)</td></tr>")
.arg(TQString().sprintf("%02X%02X%02X",c.red(),c.green(),c.blue()))
.arg(info ? info->name() : TQString::null)
.arg( m_resultCountArray[i] )
.arg( (info && m_resultCountArray[i])? ((double)m_resultCountArray[i] / (double)info->searchResult().Count())*(double)100 : 0.0, 0, 'g', 2)
.tqarg(TQString().sprintf("%02X%02X%02X",c.red(),c.green(),c.blue()))
.tqarg(info ? info->name() : TQString())
.tqarg( m_resultCountArray[i] )
.tqarg( (info && m_resultCountArray[i])? ((double)m_resultCountArray[i] / (double)info->searchResult().Count())*(double)100 : 0.0, 0, 'g', 2)
);
++i;
}
@ -411,18 +411,18 @@ const TQString CSearchAnalysisItem::getToolTip() {
//------------------------------------------------------------------
//------------------------------------------------------------------
CSearchAnalysisView::CSearchAnalysisView(TQCanvas* canvas, TQWidget* parent)
: TQCanvasView(canvas, parent) {
setFocusPolicy(TQWidget::WheelFocus);
CSearchAnalysisView::CSearchAnalysisView(TQCanvas* canvas, TQWidget* tqparent)
: TQCanvasView(canvas, tqparent) {
setFocusPolicy(TQ_WheelFocus);
m_toolTip = new ToolTip(this);
resize(sizeHint());
resize(tqsizeHint());
}
/** Returns the sizeHint for this view */
TQSize CSearchAnalysisView::sizeHint() {
if ( parentWidget() )
return parentWidget()->sizeHint();
return TQCanvasView::sizeHint();
/** Returns the tqsizeHint for this view */
TQSize CSearchAnalysisView::tqsizeHint() {
if ( tqparentWidget() )
return tqparentWidget()->tqsizeHint();
return TQCanvasView::tqsizeHint();
}
/** No descriptions */
@ -431,10 +431,10 @@ void CSearchAnalysisView::resizeEvent( TQResizeEvent* e) {
canvas()->resize( canvas()->width(), viewport()->height() );
}
CSearchAnalysisView::ToolTip::ToolTip(TQWidget* parent) : TQToolTip(parent) {}
CSearchAnalysisView::ToolTip::ToolTip(TQWidget* tqparent) : TQToolTip(tqparent) {}
void CSearchAnalysisView::ToolTip::maybeTip(const TQPoint& p) {
CSearchAnalysisView* view = dynamic_cast<CSearchAnalysisView*>(parentWidget());
CSearchAnalysisView* view = dynamic_cast<CSearchAnalysisView*>(tqparentWidget());
if (!view)
return;
TQPoint point(p);
@ -453,7 +453,7 @@ void CSearchAnalysisView::ToolTip::maybeTip(const TQPoint& p) {
TQPoint p2 = view->viewport()->mapTo(view, view->contentsToViewport(i->rect().bottomRight()));
p2.setY(view->height());
TQRect r = TQRect( p1, p2 );
if (r.contains(p))
if (r.tqcontains(p))
tip(r, text);
}
@ -469,8 +469,8 @@ CSearchAnalysisItem* CSearchAnalysisView::itemAt( const TQPoint& p ) {
//------------------------------------------------------------------
//------------------------------------------------------------------
CSearchAnalysisLegendItem::CSearchAnalysisLegendItem(TQCanvas *parent, ListCSwordModuleInfo *list )
: TQCanvasRectangle(parent) {
CSearchAnalysisLegendItem::CSearchAnalysisLegendItem(TQCanvas *tqparent, ListCSwordModuleInfo *list )
: TQCanvasRectangle(tqparent) {
m_moduleList = list;
}
@ -479,7 +479,7 @@ void CSearchAnalysisLegendItem::draw (TQPainter& painter) {
painter.save();
setPen( TQPen(black,2) );
setBrush( Qt::white );
setBrush( TQt::white );
//the outer rectangle
TQPoint p1( (int)x(), (int)y() );
TQPoint p2( (int)x()+width(), (int)y() + height() );
@ -513,8 +513,8 @@ void CSearchAnalysisLegendItem::draw (TQPainter& painter) {
/** No descriptions */
void CSearchAnalysis::saveAsHTML() {
const TQString file = KFileDialog::getSaveFileName(TQString::null,
TQString("*.html | %1").arg(i18n("HTML files")),
const TQString file = KFileDialog::getSaveFileName(TQString(),
TQString("*.html | %1").tqarg(i18n("HTML files")),
0,
i18n("Save Search Analysis"));
if (file.isNull()) {
@ -535,7 +535,7 @@ void CSearchAnalysis::saveAsHTML() {
key.key("Genesis 1:1");
CSearchAnalysisItem* analysisItem = m_canvasItemList.find( key.book() );
CSearchAnalysisItem* analysisItem = m_canvasItemList.tqfind( key.book() );
TQString text = "<html>\n<head>\n<title>" + i18n("BibleTime Search Analysis") + "</title>\n" + txtCSS + metaEncoding + "</head>\n<body>\n";
text += "<table>\n<tr><th>" + i18n("Search text :") + "</th><th>" + CSearchDialog::getSearchDialog()->searchText() + "</th></tr>\n";
@ -560,7 +560,7 @@ void CSearchAnalysis::saveAsHTML() {
bool ok = true;
while (ok) {
m_searchAnalysisHTML += TQString("<tr><td>") + key.book() + TQString("</td>");
analysisItem = m_canvasItemList.find( key.book() );
analysisItem = m_canvasItemList.tqfind( key.book() );
// for (moduleIndex = 0, m_moduleList.first(); m_moduleList.current(); m_moduleList.next(), ++moduleIndex) {
moduleIndex = 0;

@ -23,7 +23,7 @@
//Sword includes
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqstring.h>
#include <tqcanvas.h>
@ -52,8 +52,9 @@ class CSearchAnalysisView;
*/
class CSearchAnalysis : public TQCanvas {
Q_OBJECT
TQ_OBJECT
public:
CSearchAnalysis(TQObject *parent=0, const char *name=0);
CSearchAnalysis(TQObject *tqparent=0, const char *name=0);
virtual ~CSearchAnalysis();
/**
* Starts the analysis of the search result.
@ -101,8 +102,9 @@ public slots: // Public slots
class CSearchAnalysisDialog : public KDialogBase {
Q_OBJECT
TQ_OBJECT
public:
CSearchAnalysisDialog(ListCSwordModuleInfo modules, TQWidget* parentDialog);
CSearchAnalysisDialog(ListCSwordModuleInfo modules, TQWidget* tqparentDialog);
~CSearchAnalysisDialog();
protected: // Protected methods
@ -133,7 +135,7 @@ public:
/**
* Standard constructor.
*/
CSearchAnalysisItem(TQCanvas* parent, const int moduleCount, const TQString& bookname, double *scaleFactor, ListCSwordModuleInfo* modules);
CSearchAnalysisItem(TQCanvas* tqparent, const int moduleCount, const TQString& bookname, double *scaleFactor, ListCSwordModuleInfo* modules);
virtual ~CSearchAnalysisItem();
/**
* Sets the resultcount of this item
@ -167,7 +169,7 @@ private:
class CSearchAnalysisLegendItem : public TQCanvasRectangle {
public:
CSearchAnalysisLegendItem(TQCanvas* parent, ListCSwordModuleInfo* list );
CSearchAnalysisLegendItem(TQCanvas* tqparent, ListCSwordModuleInfo* list );
private:
virtual void draw (TQPainter & painter);
@ -178,17 +180,18 @@ private:
//----------------------------------------------------------
class CSearchAnalysisView : public TQCanvasView {
Q_OBJECT
TQ_OBJECT
public:
/**
* Standard constructor
*/
CSearchAnalysisView(TQCanvas* canvas, TQWidget* parent);
CSearchAnalysisView(TQCanvas* canvas, TQWidget* tqparent);
/**
* Returns the sizeHint for this view
* We give back the size of the parent widgetas default.
* This is a reimplementation from TQCanvasView::sizeHint().
* Returns the tqsizeHint for this view
* We give back the size of the tqparent widgetas default.
* This is a reimplementation from TQCanvasView::tqsizeHint().
*/
virtual TQSize sizeHint();
virtual TQSize tqsizeHint();
/**
* Returns the item at position p.
* If there no item at that point return 0.
@ -204,7 +207,7 @@ protected:
private:
class ToolTip : public TQToolTip {
public:
ToolTip(TQWidget* parent);
ToolTip(TQWidget* tqparent);
virtual ~ToolTip() {}
;
/**

@ -23,7 +23,7 @@
#include "util/cresmgr.h"
#include "util/ctoolclass.h"
//Qt includes
//TQt includes
#include <tqhbox.h>
#include <tqvbox.h>
#include <tqptrlist.h>
@ -49,9 +49,9 @@ namespace Search {
static CSearchDialog* m_staticDialog = 0;
void CSearchDialog::openDialog(const ListCSwordModuleInfo modules, const TQString& searchText, TQWidget* parentDialog) {
void CSearchDialog::openDialog(const ListCSwordModuleInfo modules, const TQString& searchText, TQWidget* tqparentDialog) {
if (!m_staticDialog) {
m_staticDialog = new CSearchDialog(parentDialog);
m_staticDialog = new CSearchDialog(tqparentDialog);
};
m_staticDialog->reset();
@ -81,13 +81,13 @@ CSearchDialog* const CSearchDialog::getSearchDialog() {
return m_staticDialog;
};
CSearchDialog::CSearchDialog(TQWidget *parent)
: KDialogBase(Plain, i18n("Search dialog"), Close | User1, User1, parent, "CSearchDialog", false, true, i18n("Search")) {
CSearchDialog::CSearchDialog(TQWidget *tqparent)
: KDialogBase(Plain, i18n("Search dialog"), Close | User1, User1, tqparent, "CSearchDialog", false, true, i18n("Search")) {
setWFlags( getWFlags() | Qt::WStyle_MinMax );
setWFlags( getWFlags() | TQt::WStyle_MinMax );
setIcon(CResMgr::searchdialog::icon);
m_searcher.connectFinished( this, TQT_SLOT(searchFinished()));
m_searcher.connectFinished( TQT_TQOBJECT(this), TQT_SLOT(searchFinished()));
initView();
initConnections();
@ -172,7 +172,7 @@ const ListCSwordModuleInfo CSearchDialog::modules() {
/** Sets the list of modules for the search. */
void CSearchDialog::setModules( const ListCSwordModuleInfo modules ) {
m_searchOptionsPage->setModules(modules);
resize( sizeHint() );
resize( tqsizeHint() );
}
/** Returns the search text which is set currently. */

@ -24,7 +24,7 @@
//Sword includes
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqstring.h>
#include <tqcanvas.h>
@ -46,9 +46,10 @@ namespace Search {
*/
class CSearchDialog : public KDialogBase {
Q_OBJECT
TQ_OBJECT
public:
static void openDialog(const ListCSwordModuleInfo modules, const TQString& searchText = TQString::null, TQWidget* parentDialog = 0);
static void openDialog(const ListCSwordModuleInfo modules, const TQString& searchText = TQString(), TQWidget* tqparentDialog = 0);
protected:
friend class Analysis::CSearchAnalysis;
@ -64,7 +65,7 @@ protected:
* The cinstructor of the dialog. It's protected because you should use the static public function openDialog.
* The dialog destroys itself if it was closed.
*/
CSearchDialog(TQWidget *parent);
CSearchDialog(TQWidget *tqparent);
~CSearchDialog();
/**

@ -27,7 +27,7 @@
#include "util/cresmgr.h"
#include "util/ctoolclass.h"
//Qt includes
//TQt includes
#include <tqlayout.h>
#include <tqpushbutton.h>
#include <tqlabel.h>
@ -73,7 +73,7 @@ void StrongsResultClass::initStrongsResults(void) {
count = result.Count();
if (!count)
return;
KApplication::kApplication()->processEvents( 1 ); //1 ms only
KApplication::kApplication()->tqprocessEvents( 1 ); //1 ms only
srList.clear();
// for whatever reason the text "Parsing...translations." does not appear.
// this is not critical but the text is necessary to get the dialog box
@ -85,7 +85,7 @@ KApplication::kApplication()->processEvents( 1 ); //1 ms only
progress->raise();
for (index = 0; index < count; index++){
progress->progressBar()->setProgress( int( (index*100) / count ) );
KApplication::kApplication()->processEvents( 1 ); //1 ms only
KApplication::kApplication()->tqprocessEvents( 1 ); //1 ms only
key = TQString::fromUtf8(result.GetElement(index)->getText());
text = render.renderSingleKey(key, modules, settings);
@ -121,25 +121,25 @@ TQString StrongsResultClass::getStrongsNumberText(const TQString& verseContent,
const bool cs = false;
if (*startIndex == 0) {
index = verseContent.find("<body", 0);
index = verseContent.tqfind("<body", 0);
}
else {
index = *startIndex;
}
// find all the "lemma=" inside the the content
while((index = verseContent.find("lemma=", index, cs)) != -1) {
while((index = verseContent.tqfind("lemma=", index, cs)) != -1) {
// get the strongs number after the lemma and compare it with the
// strongs number we are looking for
idx1 = verseContent.find("\"", index) + 1;
idx2 = verseContent.find("\"", idx1 + 1);
idx1 = verseContent.tqfind("\"", index) + 1;
idx2 = verseContent.tqfind("\"", idx1 + 1);
sNumber = verseContent.mid(idx1, idx2 - idx1);
if (sNumber == lemmaText) {
// strongs number is found now we need to get the text of this node
// search right until the ">" is found. Get the text from here to
// the next "<".
index = verseContent.find(">", index, cs) + 1;
idx2 = verseContent.find("<", index, cs);
index = verseContent.tqfind(">", index, cs) + 1;
idx2 = verseContent.tqfind("<", index, cs);
strongsText = verseContent.mid(index, idx2 - index);
index = idx2;
*startIndex = index;
@ -150,15 +150,15 @@ TQString StrongsResultClass::getStrongsNumberText(const TQString& verseContent,
index += 6; // 6 is the length of "lemma="
}
}
return TQString::null;
return TQString();
}
/********************************************
********** CSearchDialogResultPage *********
********************************************/
CSearchResultPage::CSearchResultPage(TQWidget *parent, const char *name ) :
SearchResultsForm(parent, name) {
CSearchResultPage::CSearchResultPage(TQWidget *tqparent, const char *name ) :
SearchResultsForm(tqparent, name) {
initView();
initConnections();
}
@ -198,7 +198,7 @@ void CSearchResultPage::setSearchResult(ListCSwordModuleInfo modules) {
void CSearchResultPage::reset() {
m_moduleListBox->clear();
m_resultListBox->clear();
m_previewDisplay->setText(TQString::null);
m_previewDisplay->setText(TQString());
m_analyseButton->setEnabled(false);
// m_modules.setAutoDelete(false); //make sure we don't delete modules accidentally
m_modules.clear();
@ -413,12 +413,12 @@ TQStringList CSearchResultPage::QueryParser(const TQString& queryString) {
}
// if the token contains a ^ then trim the remainder of the
// token from the ^
else if ( (pos = (*it).contains("^")) >= 0 ) {
else if ( (pos = (*it).tqcontains("^")) >= 0 ) {
(*it) = (*it).left(pos - 1);
}
// if the token contains a ~ then trim the remainder of the
// token from the ~
else if ( (pos = (*it).contains("~")) >= 0 ) {
else if ( (pos = (*it).tqcontains("~")) >= 0 ) {
(*it) = (*it).left(pos - 2) + "*";
}
}
@ -432,7 +432,7 @@ const TQString CSearchResultPage::highlightSearchedText(const TQString& content,
const bool cs = false;
// int index = 0;
int index = ret.find("<body", 0);
int index = ret.tqfind("<body", 0);
int matchLen = 0;
int length = searchedText.length();
@ -449,7 +449,7 @@ const TQString CSearchResultPage::highlightSearchedText(const TQString& content,
//---------------------------------------------------------------------
// search the searched text for "strong:" until it is not found anymore
sstIndex = 0;
while ((sstIndex = newSearchText.find("strong:", sstIndex)) != -1) {
while ((sstIndex = newSearchText.tqfind("strong:", sstIndex)) != -1) {
int idx1, idx2, sTokenIndex, sTokenIndex2;
TQString sNumber, lemmaText;
const TQString rep3("style=\"background-color:#FFFF66;\" ");
@ -461,8 +461,8 @@ const TQString CSearchResultPage::highlightSearchedText(const TQString& content,
// first find the first space after "strong:"
// this should indicate a change in search token
sstIndex = sstIndex + 7;
sTokenIndex = newSearchText.find(" ", sstIndex);
sTokenIndex2 = newSearchText.find("|", sstIndex);
sTokenIndex = newSearchText.tqfind(" ", sstIndex);
sTokenIndex2 = newSearchText.tqfind("|", sstIndex);
if ((sTokenIndex2 != -1) && (sTokenIndex2 < sTokenIndex)) {
sNumber = newSearchText.mid(sstIndex, sTokenIndex2 - sstIndex);
}
@ -471,13 +471,13 @@ const TQString CSearchResultPage::highlightSearchedText(const TQString& content,
}
// remove this strong entry
sstIndex -= 7;
newSearchText.replace(sstIndex, sTokenIndex - sstIndex, "");
newSearchText.tqreplace(sstIndex, sTokenIndex - sstIndex, "");
// find all the "lemma=" inside the the content
while((strongIndex = ret.find("lemma=", strongIndex, cs)) != -1) {
while((strongIndex = ret.tqfind("lemma=", strongIndex, cs)) != -1) {
// get the strongs number after the lemma and compare it with the
// strongs number we are looking for
idx1 = ret.find("\"", strongIndex) + 1;
idx2 = ret.find("\"", idx1 + 1);
idx1 = ret.tqfind("\"", strongIndex) + 1;
idx2 = ret.tqfind("\"", idx1 + 1);
lemmaText = ret.mid(idx1, idx2 - idx1);
if (lemmaText == sNumber) {
// strongs number is found now we need to highlight it
@ -521,9 +521,9 @@ const TQString CSearchResultPage::highlightSearchedText(const TQString& content,
for ( int wi = 0; (unsigned int)wi < words.count(); ++wi ) { //search for every word in the list
TQRegExp findExp;
TQString word = words[ wi ];
if (word.contains("*")) {
if (word.tqcontains("*")) {
length = word.length() - 1;
word.replace('*', "\\S*"); //match within a word
word.tqreplace('*', "\\S*"); //match within a word
findExp = TQRegExp(word);
findExp.setMinimal(TRUE);
}
@ -533,9 +533,9 @@ const TQString CSearchResultPage::highlightSearchedText(const TQString& content,
}
// index = 0; //for every word start at the beginning
index = ret.find("<body", 0);
index = ret.tqfind("<body", 0);
findExp.setCaseSensitive(cs);
//while ( (index = ret.find(findExp, index)) != -1 ) { //while we found the word
//while ( (index = ret.tqfind(findExp, index)) != -1 ) { //while we found the word
while ( (index = findExp.search(ret, index)) != -1 ) { //while we found the word
matchLen = findExp.matchedLength();
if (!CToolClass::inHTMLTag(index, ret)) {
@ -577,8 +577,8 @@ void CSearchResultPage::showAnalysis() {
namespace Options {
CSearchOptionsPage::CSearchOptionsPage(TQWidget *parent, const char *name ) :
SearchOptionsForm(parent,name) {
CSearchOptionsPage::CSearchOptionsPage(TQWidget *tqparent, const char *name ) :
SearchOptionsForm(tqparent,name) {
initView();
readSettings();
}
@ -658,16 +658,16 @@ void CSearchOptionsPage::setModules( ListCSwordModuleInfo modules ) {
continue;
}
if ( !m_modules.contains(*it) ) {
if ( !m_modules.tqcontains(*it) ) {
m_modules.append( *it );
t.append( (*it)->name() );
if (*it != modules.last()) {
t += TQString::fromLatin1(", "); // so that it will become a readable list (WLC, LXX, GerLut...)
t += TQString::tqfromLatin1(", "); // so that it will become a readable list (WLC, LXX, GerLut...)
}
}
};
m_modulesLabel->setText(t);
emit( sigSetSearchButtonStatus( (modules.count() != 0) ) );
emit( sigSetSearchButtontqStatus( (modules.count() != 0) ) );
}
/** Opens the modules chooser dialog. */

@ -20,7 +20,7 @@
#include "frontend/searchdialog/searchoptionsform.h" // uic generated
#include "frontend/searchdialog/searchresultsform.h" // uic generated
//Qt includes
//TQt includes
#include <tqwidget.h>
#include <tqvgroupbox.h>
@ -54,13 +54,13 @@ namespace Search {
* - Each strongs text result will contain a list of verses (keyNames).
* - The number of verses (keyNames) is returned by keyCount().
* - The text for the strongs text result is returned by keyText().
* - The list of verses (keyNames) is returned by getKeyList() [as QStringList].
* - The list of verses (keyNames) is returned by getKeyList() [as TQStringList].
*
* To add a new verse to a strongs text result use addKeyName.
*/
class StrongsResult {
public:
StrongsResult() /*: text(TQString::null)*/ {
StrongsResult() /*: text(TQString())*/ {
//keyNameList.clear();
}
@ -78,7 +78,7 @@ public:
return keyNameList.count();
}
void addKeyName(const TQString& keyName) {
if (keyNameList.findIndex(keyName) == -1)
if (keyNameList.tqfindIndex(keyName) == -1)
keyNameList.append(keyName);
}
TQStringList* getKeyList() {
@ -112,7 +112,7 @@ typedef TQValueList<StrongsResult> StrongsResultList;
* - Each strongs text result will contain a list of verses (keyNames).
* - The number of verses (keyNames) is returned by keyCount().
* - The text for the strongs text result is returned by keyText().
* - The list of verses (keyNames) is returned by getKeyList() [as QStringList].
* - The list of verses (keyNames) is returned by getKeyList() [as TQStringList].
*
* To add a new verse to a strongs text result use addKeyName.
*/
@ -151,16 +151,17 @@ private:
*/
class CSearchResultPage : public SearchResultsForm {
Q_OBJECT
TQ_OBJECT
public:
CSearchResultPage(TQWidget *parent=0, const char *name=0);
CSearchResultPage(TQWidget *tqparent=0, const char *name=0);
~CSearchResultPage();
/**
* Sets the modules which contain the result of each.
*/
void setSearchResult(ListCSwordModuleInfo modules);
TQSize sizeHint() const { return baseSize(); }
TQSize minimumSizeHint() const { return minimumSize(); }
TQSize tqsizeHint() const { return baseSize(); }
TQSize tqminimumSizeHint() const { return tqminimumSize(); }
public slots: // Public slots
/**
@ -207,8 +208,9 @@ protected slots: // Protected slots
class CSearchOptionsPage : public SearchOptionsForm {
Q_OBJECT
TQ_OBJECT
public:
CSearchOptionsPage(TQWidget *parent=0, const char *name=0);
CSearchOptionsPage(TQWidget *tqparent=0, const char *name=0);
~CSearchOptionsPage();
/**
* Sets the search text used in the page.
@ -239,8 +241,8 @@ public:
*/
//const CSwordModuleSearch::scopeType scopeType();
TQSize sizeHint() const { return baseSize(); }
TQSize minimumSizeHint() const { return minimumSize(); }
TQSize tqsizeHint() const { return baseSize(); }
TQSize tqminimumSizeHint() const { return tqminimumSize(); }
bool hasSearchScope();
private:
@ -283,7 +285,7 @@ protected slots: // Protected slots
void syntaxHelp();
signals:
void sigSetSearchButtonStatus(bool);
void sigSetSearchButtontqStatus(bool);
};
} //end of namespace Search::Options

@ -18,7 +18,7 @@
#include "util/cresmgr.h"
//Qt includes
//TQt includes
//KDE includes
#include <klocale.h>
@ -28,8 +28,8 @@
namespace Search {
namespace Result {
CSearchResultView::CSearchResultView(TQWidget* parent, const char* name) :
KListView(parent, name), m_module(0) {
CSearchResultView::CSearchResultView(TQWidget* tqparent, const char* name) :
KListView(tqparent, name), m_module(0) {
initView();
initConnections();
}
@ -48,25 +48,25 @@ void CSearchResultView::initView() {
//setup the popup menu
m_popup = new KPopupMenu(this);
m_actions.copyMenu = new KActionMenu(i18n("Copy..."), CResMgr::searchdialog::result::foundItems::copyMenu::icon, m_popup);
m_actions.copyMenu = new KActionMenu(i18n("Copy..."), CResMgr::searchdialog::result::foundItems::copyMenu::icon, TQT_TQOBJECT(m_popup));
m_actions.copyMenu->setDelayed(false);
m_actions.copy.result = new KAction(i18n("Reference only"), KShortcut(0), this, TQT_SLOT(copyItems()), this);
m_actions.copy.result = new KAction(i18n("Reference only"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(copyItems()), TQT_TQOBJECT(this));
m_actions.copyMenu->insert(m_actions.copy.result);
m_actions.copy.resultWithText = new KAction(i18n("Reference with text"), KShortcut(0), this, TQT_SLOT(copyItemsWithText()), this);
m_actions.copy.resultWithText = new KAction(i18n("Reference with text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(copyItemsWithText()), TQT_TQOBJECT(this));
m_actions.copyMenu->insert(m_actions.copy.resultWithText);
m_actions.copyMenu->plug(m_popup);
m_actions.saveMenu = new KActionMenu(i18n("Save..."),CResMgr::searchdialog::result::foundItems::saveMenu::icon, m_popup);
m_actions.saveMenu = new KActionMenu(i18n("Save..."),CResMgr::searchdialog::result::foundItems::saveMenu::icon, TQT_TQOBJECT(m_popup));
m_actions.saveMenu->setDelayed( false );
m_actions.save.result = new KAction(i18n("Reference only"), KShortcut(0), this, TQT_SLOT(saveItems()), this);
m_actions.save.result = new KAction(i18n("Reference only"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(saveItems()), TQT_TQOBJECT(this));
m_actions.saveMenu->insert(m_actions.save.result);
m_actions.save.resultWithText = new KAction(i18n("Reference with text"), KShortcut(0), this, TQT_SLOT(saveItemsWithText()), this);
m_actions.save.resultWithText = new KAction(i18n("Reference with text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(saveItemsWithText()), TQT_TQOBJECT(this));
m_actions.saveMenu->insert(m_actions.save.resultWithText);
m_actions.saveMenu->plug(m_popup);
m_actions.printMenu = new KActionMenu(i18n("Print..."),CResMgr::searchdialog::result::foundItems::printMenu::icon, m_popup);
m_actions.printMenu = new KActionMenu(i18n("Print..."),CResMgr::searchdialog::result::foundItems::printMenu::icon, TQT_TQOBJECT(m_popup));
m_actions.printMenu->setDelayed(false);
m_actions.print.result = new KAction(i18n("Reference with text"), KShortcut(0), this, TQT_SLOT(printItems()), this);
m_actions.print.result = new KAction(i18n("Reference with text"), KShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(printItems()), TQT_TQOBJECT(this));
m_actions.printMenu->insert(m_actions.print.result);
m_actions.printMenu->plug(m_popup);
}
@ -260,7 +260,7 @@ TQDragObject* CSearchResultView::dragObject() {
TQPtrList<TQListViewItem> items = selectedItems();
for (items.first(); items.current(); items.next()) {
dndItems.append( CDragDropMgr::Item(m_module->name(), items.current()->text(0), TQString::null) ); //no description
dndItems.append( CDragDropMgr::Item(m_module->name(), items.current()->text(0), TQString()) ); //no description
};
return CDragDropMgr::dragObject(dndItems, viewport());

@ -38,8 +38,9 @@ namespace Search {
class CSearchResultView : public KListView {
Q_OBJECT
TQ_OBJECT
public:
CSearchResultView(TQWidget* parent, const char* name = 0);
CSearchResultView(TQWidget* tqparent, const char* name = 0);
virtual ~CSearchResultView();
/** Returns the module which is currently used. */
CSwordModuleInfo* const module();

@ -20,15 +20,15 @@
#include <tqwhatsthis.h>
/*
* Constructs a SearchOptionsForm as a child of 'parent', with the
* Constructs a SearchOptionsForm as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
SearchOptionsForm::SearchOptionsForm( TQWidget* parent, const char* name, WFlags fl )
: TQWidget( parent, name, fl )
SearchOptionsForm::SearchOptionsForm( TQWidget* tqparent, const char* name, WFlags fl )
: TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "SearchOptionsForm" );
setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
setMinimumSize( TQSize( 260, 130 ) );
setBaseSize( TQSize( 420, 150 ) );
SearchOptionsFormLayout = new TQHBoxLayout( this, 0, 3, "SearchOptionsFormLayout");
@ -36,13 +36,13 @@ SearchOptionsForm::SearchOptionsForm( TQWidget* parent, const char* name, WFlags
searchGroupBox = new TQGroupBox( this, "searchGroupBox" );
searchGroupBox->setMargin( 0 );
searchGroupBox->setColumnLayout(0, Qt::Vertical );
searchGroupBox->layout()->setSpacing( 3 );
searchGroupBox->layout()->setMargin( 6 );
searchGroupBoxLayout = new TQGridLayout( searchGroupBox->layout() );
searchGroupBoxLayout->setAlignment( Qt::AlignTop );
searchGroupBox->tqlayout()->setSpacing( 3 );
searchGroupBox->tqlayout()->setMargin( 6 );
searchGroupBoxLayout = new TQGridLayout( searchGroupBox->tqlayout() );
searchGroupBoxLayout->tqsetAlignment( TQt::AlignTop );
m_searchTextLabel = new TQLabel( searchGroupBox, "m_searchTextLabel" );
m_searchTextLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_searchTextLabel->sizePolicy().hasHeightForWidth() ) );
m_searchTextLabel->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_searchTextLabel->sizePolicy().hasHeightForWidth() ) );
searchGroupBoxLayout->addWidget( m_searchTextLabel, 0, 0 );
@ -59,17 +59,17 @@ SearchOptionsForm::SearchOptionsForm( TQWidget* parent, const char* name, WFlags
searchGroupBoxLayout->addWidget( m_chooseRangeButton, 2, 2 );
m_searchScopeLabel = new TQLabel( searchGroupBox, "m_searchScopeLabel" );
m_searchScopeLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_searchScopeLabel->sizePolicy().hasHeightForWidth() ) );
m_searchScopeLabel->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_searchScopeLabel->sizePolicy().hasHeightForWidth() ) );
searchGroupBoxLayout->addWidget( m_searchScopeLabel, 2, 0 );
m_rangeChooserCombo = new KComboBox( FALSE, searchGroupBox, "m_rangeChooserCombo" );
m_rangeChooserCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_rangeChooserCombo->sizePolicy().hasHeightForWidth() ) );
m_rangeChooserCombo->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_rangeChooserCombo->sizePolicy().hasHeightForWidth() ) );
searchGroupBoxLayout->addWidget( m_rangeChooserCombo, 2, 1 );
m_searchTextCombo = new KHistoryCombo( searchGroupBox, "m_searchTextCombo" );
m_searchTextCombo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_searchTextCombo->sizePolicy().hasHeightForWidth() ) );
m_searchTextCombo->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_searchTextCombo->sizePolicy().hasHeightForWidth() ) );
m_searchTextCombo->setFocusPolicy( KHistoryCombo::WheelFocus );
m_searchTextCombo->setSizeLimit( 25 );
m_searchTextCombo->setInsertionPolicy( KHistoryCombo::AtBottom );
@ -78,14 +78,14 @@ SearchOptionsForm::SearchOptionsForm( TQWidget* parent, const char* name, WFlags
searchGroupBoxLayout->addWidget( m_searchTextCombo, 0, 1 );
m_modulesLabel = new TQLabel( searchGroupBox, "m_modulesLabel" );
m_modulesLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_modulesLabel->sizePolicy().hasHeightForWidth() ) );
m_modulesLabel->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_modulesLabel->sizePolicy().hasHeightForWidth() ) );
m_modulesLabel->setTextFormat( TQLabel::RichText );
m_modulesLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
m_modulesLabel->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
searchGroupBoxLayout->addMultiCellWidget( m_modulesLabel, 1, 1, 0, 1 );
SearchOptionsFormLayout->addWidget( searchGroupBox );
languageChange();
resize( TQSize(648, 130).expandedTo(minimumSizeHint()) );
resize( TQSize(648, 130).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
}
@ -94,7 +94,7 @@ SearchOptionsForm::SearchOptionsForm( TQWidget* parent, const char* name, WFlags
*/
SearchOptionsForm::~SearchOptionsForm()
{
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, TQt does it all for us
}
/*

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SearchOptionsForm</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>SearchOptionsForm</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>260</width>
<height>130</height>
@ -39,7 +39,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>searchGroupBox</cstring>
</property>
@ -59,7 +59,7 @@
<property name="spacing">
<number>3</number>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>m_searchTextLabel</cstring>
</property>
@ -75,7 +75,7 @@
<string>Search for:</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="2">
<widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>m_syntaxButton</cstring>
</property>
@ -86,7 +86,7 @@
<string>Alt+H</string>
</property>
</widget>
<widget class="QPushButton" row="1" column="2">
<widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>m_chooseModulesButton</cstring>
</property>
@ -97,7 +97,7 @@
<string>Alt+C</string>
</property>
</widget>
<widget class="QPushButton" row="2" column="2">
<widget class="TQPushButton" row="2" column="2">
<property name="name">
<cstring>m_chooseRangeButton</cstring>
</property>
@ -108,7 +108,7 @@
<string>Alt+S</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>m_searchScopeLabel</cstring>
</property>
@ -162,7 +162,7 @@
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
<widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_modulesLabel</cstring>
</property>
@ -180,7 +180,7 @@
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="alignment">
<property name="tqalignment">
<set>WordBreak|AlignVCenter|AlignLeft</set>
</property>
</widget>
@ -190,7 +190,7 @@
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="3" margin="0"/>
<tqlayoutdefaults spacing="3" margin="0"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>

@ -21,15 +21,15 @@
#include "csearchresultview.h"
/*
* Constructs a SearchResultsForm as a child of 'parent', with the
* Constructs a SearchResultsForm as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
SearchResultsForm::SearchResultsForm( TQWidget* parent, const char* name, WFlags fl )
: TQWidget( parent, name, fl )
SearchResultsForm::SearchResultsForm( TQWidget* tqparent, const char* name, WFlags fl )
: TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "SearchResultsForm" );
setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
setMinimumSize( TQSize( 300, 220 ) );
setBaseSize( TQSize( 440, 290 ) );
SearchResultsFormLayout = new TQVBoxLayout( this, 0, 3, "SearchResultsFormLayout");
@ -58,12 +58,12 @@ SearchResultsForm::SearchResultsForm( TQWidget* parent, const char* name, WFlags
rightSideBox->addLayout( buttonLayout );
m_displayFrame = new TQFrame( displaySplitter, "m_displayFrame" );
m_displayFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_displayFrame->sizePolicy().hasHeightForWidth() ) );
m_displayFrame->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_displayFrame->sizePolicy().hasHeightForWidth() ) );
m_displayFrame->setFrameShape( TQFrame::NoFrame );
m_displayFrame->setFrameShadow( TQFrame::Plain );
SearchResultsFormLayout->addWidget( displaySplitter );
languageChange();
resize( TQSize(300, 220).expandedTo(minimumSizeHint()) );
resize( TQSize(300, 220).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
}
@ -72,7 +72,7 @@ SearchResultsForm::SearchResultsForm( TQWidget* parent, const char* name, WFlags
*/
SearchResultsForm::~SearchResultsForm()
{
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, TQt does it all for us
}
/*

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SearchResultsForm</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>SearchResultsForm</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>300</width>
<height>220</height>
@ -45,11 +45,11 @@
<property name="spacing">
<number>3</number>
</property>
<widget class="QSplitter">
<widget class="TQSplitter">
<property name="name">
<cstring>displaySplitter</cstring>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>134</width>
<height>44</height>
@ -58,7 +58,7 @@
<property name="orientation">
<enum>Horizontal</enum>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>rightSideBox</cstring>
</property>
@ -69,7 +69,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QSplitter">
<widget class="TQSplitter">
<property name="name">
<cstring>resultSplitter</cstring>
</property>
@ -87,7 +87,7 @@
</property>
</widget>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>buttonLayout</cstring>
</property>
@ -98,7 +98,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>m_analyseButton</cstring>
</property>
@ -116,7 +116,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>10</width>
<height>20</height>
@ -127,7 +127,7 @@
</widget>
</vbox>
</widget>
<widget class="QFrame">
<widget class="TQFrame">
<property name="name">
<cstring>m_displayFrame</cstring>
</property>
@ -188,7 +188,7 @@
<data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data>
</image>
</images>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>cmoduleresultview.h</includehint>
<includehint>csearchresultview.h</includehint>

@ -15,37 +15,37 @@
namespace util {
CSortListViewItem::CSortListViewItem(TQListViewItem* parent) : KListViewItem(parent)
CSortListViewItem::CSortListViewItem(TQListViewItem* tqparent) : KListViewItem(tqparent)
{
}
CSortListViewItem::CSortListViewItem( TQListView * parent, TQListViewItem * after )
: KListViewItem ( parent, after )
CSortListViewItem::CSortListViewItem( TQListView * tqparent, TQListViewItem * after )
: KListViewItem ( tqparent, after )
{
}
CSortListViewItem::CSortListViewItem( TQListViewItem * parent, TQListViewItem * after )
: KListViewItem ( parent, after )
CSortListViewItem::CSortListViewItem( TQListViewItem * tqparent, TQListViewItem * after )
: KListViewItem ( tqparent, after )
{
}
CSortListViewItem::CSortListViewItem( TQListView * parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8 )
: KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
CSortListViewItem::CSortListViewItem( TQListView * tqparent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8 )
: KListViewItem( tqparent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
CSortListViewItem::CSortListViewItem( TQListViewItem * parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8 )
: KListViewItem ( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
CSortListViewItem::CSortListViewItem( TQListViewItem * tqparent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8 )
: KListViewItem ( tqparent, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
CSortListViewItem::CSortListViewItem( TQListView * parent, TQListViewItem * after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8 )
: KListViewItem ( parent, after, label1, label2, label3, label4, label5, label6, label7, label8 )
CSortListViewItem::CSortListViewItem( TQListView * tqparent, TQListViewItem * after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8 )
: KListViewItem ( tqparent, after, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
CSortListViewItem::CSortListViewItem( TQListViewItem * parent, TQListViewItem * after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8 )
: KListViewItem ( parent, after, label1, label2, label3, label4, label5, label6, label7, label8 )
CSortListViewItem::CSortListViewItem( TQListViewItem * tqparent, TQListViewItem * after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8 )
: KListViewItem ( tqparent, after, label1, label2, label3, label4, label5, label6, label7, label8 )
{
}
@ -57,7 +57,7 @@ CSortListViewItem::~CSortListViewItem() {
int CSortListViewItem::compare( TQListViewItem* i, int col, bool ascending ) const {
int ret = 0;
if ( !columnSorting.contains(col) ) {
if ( !columnSorting.tqcontains(col) ) {
return KListViewItem::compare(i, col, ascending);
}

@ -29,19 +29,19 @@ public:
Number, String/*, BibleKey*/
};
CSortListViewItem( TQListViewItem* parent );
CSortListViewItem( TQListViewItem* tqparent );
CSortListViewItem( TQListView * parent, TQListViewItem * after );
CSortListViewItem( TQListView * tqparent, TQListViewItem * after );
CSortListViewItem( TQListViewItem * parent, TQListViewItem * after );
CSortListViewItem( TQListViewItem * tqparent, TQListViewItem * after );
CSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null );
CSortListViewItem( TQListView * tqparent, TQString label1, TQString label2 = TQString(), TQString label3 = TQString(), TQString label4 = TQString(), TQString label5 = TQString(), TQString label6 = TQString(), TQString label7 = TQString(), TQString label8 = TQString() );
CSortListViewItem( TQListViewItem * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null );
CSortListViewItem( TQListViewItem * tqparent, TQString label1, TQString label2 = TQString(), TQString label3 = TQString(), TQString label4 = TQString(), TQString label5 = TQString(), TQString label6 = TQString(), TQString label7 = TQString(), TQString label8 = TQString() );
CSortListViewItem( TQListView * parent, TQListViewItem * after, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null );
CSortListViewItem( TQListView * tqparent, TQListViewItem * after, TQString label1, TQString label2 = TQString(), TQString label3 = TQString(), TQString label4 = TQString(), TQString label5 = TQString(), TQString label6 = TQString(), TQString label7 = TQString(), TQString label8 = TQString() );
CSortListViewItem( TQListViewItem * parent, TQListViewItem * after, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null );
CSortListViewItem( TQListViewItem * tqparent, TQListViewItem * after, TQString label1, TQString label2 = TQString(), TQString label3 = TQString(), TQString label4 = TQString(), TQString label5 = TQString(), TQString label6 = TQString(), TQString label7 = TQString(), TQString label8 = TQString() );
virtual ~CSortListViewItem();

@ -30,7 +30,7 @@
#include "frontend/kstartuplogo.h"
#include "frontend/cbtconfig.h"
//Qt includes
//TQt includes
#include <tqdir.h>
//KDE includes
@ -46,7 +46,7 @@
bool showDebugMessages = false;
BibleTime* bibletime_ptr = 0;
void myMessageOutput( QtMsgType type, const char *msg ) {
void myMessageOutput( TQtMsgType type, const char *msg ) {
//we use this messagehandler to switch debugging off in final releases
switch ( type ) {
case QtDebugMsg:
@ -116,7 +116,7 @@ extern "C" {
}
int main(int argc, char* argv[]) {
qInstallMsgHandler( myMessageOutput );
tqInstallMsgHandler( myMessageOutput );
//create about data for this application
static KCmdLineOptions options[] =

@ -59,14 +59,14 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "view_sidetree";
const KShortcut accel = Qt::Key_F9;
const KShortcut accel = TQt::Key_F9;
const char* actionName = "viewMainIndex_action";
}
namespace showInfoDisplay {
TQString tooltip;
const TQString icon = "view_sidetree";
const KShortcut accel = Qt::Key_F8;
const KShortcut accel = TQt::Key_F8;
const char* actionName = "viewInfoDisplay_action";
}
namespace showToolBar { //a standard action
@ -79,15 +79,15 @@ namespace CResMgr {
namespace search {
TQString tooltip;
const TQString icon = "find";
const KShortcut accel = Qt::CTRL + Qt::Key_O;
const TQString icon = "tqfind";
const KShortcut accel = TQt::CTRL + TQt::Key_O;
const char* actionName = "mainindex_search_action";
}
namespace searchdefaultbible {
TQString tooltip;
const TQString icon = "find";
const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_F;
const TQString icon = "tqfind";
const KShortcut accel = TQt::CTRL + TQt::ALT + TQt::Key_F;
const char* actionName = "mainindex_searchdefaultbible_action";
}
}
@ -109,7 +109,7 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "view_sidetree";
const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_S;
const KShortcut accel = TQt::CTRL + TQt::ALT + TQt::Key_S;
const char* actionName = "windowSaveToNewProfile_action";
}
namespace deleteProfile {
@ -122,7 +122,7 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "window_fullscreen";
const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_F;
const KShortcut accel = TQt::CTRL + TQt::SHIFT + TQt::Key_F;
const char* actionName = "windowFullscreen_action";
}
namespace arrangementMode {
@ -136,28 +136,28 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "bt_tile";
const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_M;
const KShortcut accel = TQt::CTRL + TQt::ALT + TQt::Key_M;
const char* actionName = "windowArrangementManual_action";
}
namespace autoTileHorizontal {
TQString tooltip;
const TQString icon = "bt_tile_auto";
const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_H;
const KShortcut accel = TQt::CTRL + TQt::ALT + TQt::Key_H;
const char* actionName = "windowAutoTileHorizontal_action";
}
namespace autoTileVertical {
TQString tooltip;
const TQString icon = "bt_tile_auto";
const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_G;
const KShortcut accel = TQt::CTRL + TQt::ALT + TQt::Key_G;
const char* actionName = "windowAutoTileVertical_action";
}
namespace autoCascade {
TQString tooltip;
const TQString icon = "bt_cascade_auto";
const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_J;
const KShortcut accel = TQt::CTRL + TQt::ALT + TQt::Key_J;
const char* actionName = "windowAutoCascade_action";
}
}
@ -165,28 +165,28 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "bt_tile";
const KShortcut accel = Qt::CTRL + Qt::Key_H;
const KShortcut accel = TQt::CTRL + TQt::Key_H;
const char* actionName = "windowTileHorizontal_action";
}
namespace tileVertical {
TQString tooltip;
const TQString icon = "bt_tile";
const KShortcut accel = Qt::CTRL + Qt::Key_G;
const KShortcut accel = TQt::CTRL + TQt::Key_G;
const char* actionName = "windowTileVertical_action";
}
namespace cascade {
TQString tooltip;
const TQString icon = "bt_cascade";
const KShortcut accel = Qt::CTRL + Qt::Key_J;
const KShortcut accel = TQt::CTRL + TQt::Key_J;
const char* actionName = "windowCascade_action";
}
namespace closeAll {
TQString tooltip;
const TQString icon = "fileclose";
const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_W;
const KShortcut accel = TQt::CTRL + TQt::ALT + TQt::Key_W;
const char* actionName = "windowCloseAll_action";
}
}
@ -204,7 +204,7 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "bt_swordconfig";
const KShortcut accel = Qt::Key_F4;
const KShortcut accel = TQt::Key_F4;
const char* actionName = "options_sword_setup";
}
@ -215,14 +215,14 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "contents";
const KShortcut accel = Qt::Key_F1;
const KShortcut accel = TQt::Key_F1;
const char* actionName = "helpHandbook_action";
}
namespace bibleStudyHowTo {
TQString tooltip;
const TQString icon = "contents";
const KShortcut accel = Qt::Key_F2;
const KShortcut accel = TQt::Key_F2;
const char* actionName = "helpHowTo_action";
}
namespace bugreport { // available as KStdAction
@ -233,7 +233,7 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "idea";
const KShortcut accel = Qt::Key_F3;
const KShortcut accel = TQt::Key_F3;
const char* actionName = "helpDailyTip_action";
}
namespace aboutBibleTime { // available as KStdAction
@ -248,7 +248,7 @@ namespace CResMgr {
} //end of main menu
namespace searchdialog {
const TQString icon = "find";
const TQString icon = "tqfind";
namespace searchButton {
TQString tooltip;
@ -379,8 +379,8 @@ namespace CResMgr {
namespace search {
TQString tooltip;
const TQString icon = "find";
const KShortcut accel = Qt::CTRL + Qt::Key_L;
const TQString icon = "tqfind";
const KShortcut accel = TQt::CTRL + TQt::Key_L;
const char* actionName = "window_search_action";
}
@ -388,14 +388,14 @@ namespace CResMgr {
TQString tooltip;
const TQString icon = "previous";
const KShortcut accel = Qt::ALT + Qt::Key_Left;
const KShortcut accel = TQt::ALT + TQt::Key_Left;
const char* actionName = "window_history_back_action";
}
namespace forwardInHistory {
TQString tooltip;
const TQString icon = "next";
const KShortcut accel = Qt::ALT + Qt::Key_Right;
const KShortcut accel = TQt::ALT + TQt::Key_Right;
const char* actionName = "window_history_forward_action";
}
namespace findStrongs {
@ -415,12 +415,12 @@ namespace CResMgr {
namespace nextBook {
TQString tooltip;
const KShortcut accel = Qt::CTRL + Qt::Key_Y;
const KShortcut accel = TQt::CTRL + TQt::Key_Y;
}
namespace previousBook {
TQString tooltip;
const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_Y;
const KShortcut accel = TQt::CTRL + TQt::SHIFT + TQt::Key_Y;
}
namespace chapterList {
@ -428,22 +428,22 @@ namespace CResMgr {
}
namespace nextChapter {
TQString tooltip;
const KShortcut accel = Qt::CTRL + Qt::Key_X;
const KShortcut accel = TQt::CTRL + TQt::Key_X;
}
namespace previousChapter {
TQString tooltip;
const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_X;
const KShortcut accel = TQt::CTRL + TQt::SHIFT + TQt::Key_X;
}
namespace verseList {
TQString tooltip;
}
namespace nextVerse {
TQString tooltip;
const KShortcut accel = Qt::CTRL + Qt::Key_V;
const KShortcut accel = TQt::CTRL + TQt::Key_V;
}
namespace previousVerse {
TQString tooltip;
const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_V;
const KShortcut accel = TQt::CTRL + TQt::SHIFT + TQt::Key_V;
}
namespace copyMenu {
@ -470,11 +470,11 @@ namespace CResMgr {
}
namespace nextEntry {
TQString tooltip;
const KShortcut accel = Qt::CTRL + Qt::Key_V;
const KShortcut accel = TQt::CTRL + TQt::Key_V;
}
namespace previousEntry {
TQString tooltip;
const KShortcut accel = Qt::CTRL + Qt::SHIFT + Qt::Key_V;
const KShortcut accel = TQt::CTRL + TQt::SHIFT + TQt::Key_V;
}
namespace copyMenu {
@ -668,8 +668,8 @@ namespace CResMgr {
namespace search {
TQString tooltip;
const TQString icon = "find";
const KShortcut accel = Qt::CTRL + Qt::ALT + Qt::Key_M;
const TQString icon = "tqfind";
const KShortcut accel = TQt::CTRL + TQt::ALT + TQt::Key_M;
const char* actionName = "GMsearch_action";
}
namespace newFolder {

@ -12,7 +12,7 @@
#ifndef CRESMGR_H
#define CRESMGR_H
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqkeysequence.h>

@ -47,22 +47,22 @@ TQString CToolClass::locatehtml(const TQString &filename) {
TQString CToolClass::htmlToText(const TQString& html) {
TQString newText = html;
// convert some tags we need in code
newText.replace( TQRegExp(" "),"#SPACE#" );
newText.replace( TQRegExp("<br/?>\\s*"), "<br/>\n" );
newText.replace( TQRegExp("#SPACE#")," " );
newText.tqreplace( TQRegExp(" "),"#SPACE#" );
newText.tqreplace( TQRegExp("<br/?>\\s*"), "<br/>\n" );
newText.tqreplace( TQRegExp("#SPACE#")," " );
TQRegExp re("<.+>");
re.setMinimal(true);
newText.replace( re,"" );
newText.tqreplace( re,"" );
return newText;
}
/** Converts text to HTML (\n to <BR>) */
TQString CToolClass::textToHTML(const TQString& text) {
TQString newText = text;
newText.replace( TQRegExp("<BR>\n"),"#NEWLINE#" );
newText.replace( TQRegExp("\n"),"<BR>\n" );
newText.replace( TQRegExp("#NEWLINE#"),"<BR>\n");
newText.tqreplace( TQRegExp("<BR>\n"),"#NEWLINE#" );
newText.tqreplace( TQRegExp("\n"),"<BR>\n" );
newText.tqreplace( TQRegExp("#NEWLINE#"),"<BR>\n");
return newText;
}
@ -74,9 +74,9 @@ bool CToolClass::savePlainFile( const TQString& filename, const TQString& text,
if (saveFile.exists()) {
if (!forceOverwrite && KMessageBox::warningYesNo(0,
TQString::fromLatin1("<qt><B>%1</B><BR>%2</qt>")
.arg( i18n("The file already exists.") )
.arg( i18n("Do you want to overwrite it?")
TQString::tqfromLatin1("<qt><B>%1</B><BR>%2</qt>")
.tqarg( i18n("The file already exists.") )
.tqarg( i18n("Do you want to overwrite it?")
)
) == KMessageBox::No
) {
@ -95,9 +95,9 @@ bool CToolClass::savePlainFile( const TQString& filename, const TQString& text,
ret = true;
}
else {
KMessageBox::error(0, TQString::fromLatin1("<qt>%1<BR><B>%2</B></qt>")
.arg( i18n("The file couldn't be saved.") )
.arg( i18n("Please check permissions etc.")));
KMessageBox::error(0, TQString::tqfromLatin1("<qt>%1<BR><B>%2</B></qt>")
.tqarg( i18n("The file couldn't be saved.") )
.tqarg( i18n("Please check permissions etc.")));
saveFile.close();
ret = false;
}
@ -159,8 +159,8 @@ TQPixmap CToolClass::getIconForModule( CSwordModuleInfo* module_info ) {
return img;
}
TQLabel* CToolClass::explanationLabel(TQWidget* parent, const TQString& heading, const TQString& text ) {
TQLabel* label = new TQLabel( TQString::fromLatin1("<B>%1</B><BR>%2").arg(heading).arg(text),parent );
TQLabel* CToolClass::explanationLabel(TQWidget* tqparent, const TQString& heading, const TQString& text ) {
TQLabel* label = new TQLabel( TQString::tqfromLatin1("<B>%1</B><BR>%2").tqarg(heading).tqarg(text),tqparent );
label->setAutoResize(true);
label->setMargin(1);
label->setFrameStyle(TQFrame::Box | TQFrame::Plain);
@ -169,10 +169,10 @@ TQLabel* CToolClass::explanationLabel(TQWidget* parent, const TQString& heading,
/** No descriptions */
bool CToolClass::inHTMLTag(int pos, TQString & text) {
int i1=text.findRev("<",pos);
int i2=text.findRev(">",pos);
int i3=text.find(">",pos);
int i4=text.find("<",pos);
int i1=text.tqfindRev("<",pos);
int i2=text.tqfindRev(">",pos);
int i3=text.tqfind(">",pos);
int i4=text.tqfind("<",pos);
// if ((i1>0) && (i2==-1)) //we're in th first html tag
@ -192,25 +192,25 @@ bool CToolClass::inHTMLTag(int pos, TQString & text) {
TQString CToolClass::moduleToolTip(CSwordModuleInfo* module) {
Q_ASSERT(module);
if (!module) {
return TQString::null;
return TQString();
}
TQString text;
text = TQString("<b>%1</b> ").arg( module->name() )
+ ((module->category() == CSwordModuleInfo::Cult) ? TQString::fromLatin1("<small><b>%1</b></small><br>").arg(i18n("Take care, this work contains cult / questionable material!")) : TQString::null);
text = TQString("<b>%1</b> ").tqarg( module->name() )
+ ((module->category() == CSwordModuleInfo::Cult) ? TQString::tqfromLatin1("<small><b>%1</b></small><br>").tqarg(i18n("Take care, this work contains cult / questionable material!")) : TQString());
text += TQString("<small>(") + module->config(CSwordModuleInfo::Description) + TQString(")</small><hr>");
text += i18n("Language") + TQString(": %1<br>").arg( module->language()->translatedName() );
text += i18n("Language") + TQString(": %1<br>").tqarg( module->language()->translatedName() );
if (module->isEncrypted()) {
text += i18n("Unlock key") + TQString(": %1<br>")
.arg(!module->config(CSwordModuleInfo::CipherKey).isEmpty() ? module->config(CSwordModuleInfo::CipherKey) : TQString("<font COLOR=\"red\">%1</font>").arg(i18n("not set")));
.tqarg(!module->config(CSwordModuleInfo::CipherKey).isEmpty() ? module->config(CSwordModuleInfo::CipherKey) : TQString("<font COLOR=\"red\">%1</font>").tqarg(i18n("not set")));
}
if (module->hasVersion()) {
text += i18n("Version") + TQString(": %1<br>").arg( module->config(CSwordModuleInfo::ModuleVersion) );
text += i18n("Version") + TQString(": %1<br>").tqarg( module->config(CSwordModuleInfo::ModuleVersion) );
}
TQString options;
@ -218,7 +218,7 @@ TQString CToolClass::moduleToolTip(CSwordModuleInfo* module) {
for (opts = CSwordModuleInfo::filterTypesMIN; opts <= CSwordModuleInfo::filterTypesMAX; ++opts) {
if (module->has( static_cast<CSwordModuleInfo::FilterTypes>(opts) )) {
if (!options.isEmpty()) {
options += TQString::fromLatin1(", ");
options += TQString::tqfromLatin1(", ");
}
options += CSwordBackend::translatedOptionName(
@ -228,10 +228,10 @@ TQString CToolClass::moduleToolTip(CSwordModuleInfo* module) {
}
if (!options.isEmpty()) {
text += i18n("Options") + TQString::fromLatin1(": <small>") + options + TQString("</small>");
text += i18n("Options") + TQString::tqfromLatin1(": <small>") + options + TQString("</small>");
}
if (text.right(4) == TQString::fromLatin1("<br>")) {
if (text.right(4) == TQString::tqfromLatin1("<br>")) {
text = text.left(text.length()-4);
}

@ -9,7 +9,7 @@
//Qt includes
//TQt includes
#include <tqstring.h>
#include <tqpixmap.h>
#include <tqtextstream.h>
@ -65,7 +65,7 @@ public:
* This function returns a label with heading "heading" and explanation "text". This label should be used to
* explain difficult things of the GUI, e.g. in the optionsdialog.
*/
static TQLabel* explanationLabel(TQWidget* parent, const TQString& heading, const TQString& text );
static TQLabel* explanationLabel(TQWidget* tqparent, const TQString& heading, const TQString& text );
/**
* Returns true if the character at position "pos" of text is inside an HTML tag. Returns false if it's not inside an HTML tag.
*/

@ -12,7 +12,7 @@
#include "directoryutil.h"
//Qt includes
//TQt includes
#include <tqdir.h>
namespace util {
@ -21,7 +21,7 @@ namespace filesystem {
void DirectoryUtil::removeRecursive(const TQString& dir) {
qWarning("removeRecursive(%s)", dir.latin1());
if (dir == TQString::null) {
if (dir == TQString()) {
return;
}

@ -96,7 +96,7 @@ ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$"
LDFLAGS="$LDFLAGS -L$ac_cv_clucene_libdir -L$ac_cv_sword_libdir"
LIBS="$LIB_CLUCENE -lz -lsword"
LIBS="$LIB_CLUCENE -lz -lsword -ltqt"
LD_LIBRARY_PATH="$ac_cv_clucene_libdir"
export LD_LIBRARY_PATH
LIBRARY_PATH=

@ -98,7 +98,7 @@ ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$"
LDFLAGS="$LDFLAGS -L$ac_cv_sword_libdir"
LIBS="$LIB_SWORD -lz"
LIBS="$LIB_SWORD -lz -ltqt"
LD_LIBRARY_PATH="$ac_cv_sword_libdir"
export LD_LIBRARY_PATH
LIBRARY_PATH=
@ -161,7 +161,7 @@ ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$"
LDFLAGS="$LDFLAGS -L$ac_cv_sword_libdir"
LIBS="$LIB_SWORD -lz"
LIBS="$LIB_SWORD -lz -ltqt"
LD_LIBRARY_PATH="$ac_cv_sword_libdir"
export LD_LIBRARY_PATH
LIBRARY_PATH=

Loading…
Cancel
Save