summaryrefslogtreecommitdiffstats
path: root/bibletime/frontend/cinfodisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bibletime/frontend/cinfodisplay.cpp')
-rw-r--r--bibletime/frontend/cinfodisplay.cpp126
1 files changed, 63 insertions, 63 deletions
diff --git a/bibletime/frontend/cinfodisplay.cpp b/bibletime/frontend/cinfodisplay.cpp
index 255a392..70dc05f 100644
--- a/bibletime/frontend/cinfodisplay.cpp
+++ b/bibletime/frontend/cinfodisplay.cpp
@@ -32,10 +32,10 @@
#include <listkey.h>
//Qt includes
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qscrollview.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqscrollview.h>
+#include <tqregexp.h>
//KDE includes
#include <klocale.h>
@@ -47,20 +47,20 @@ using namespace sword;
namespace InfoDisplay {
- CInfoDisplay::CInfoDisplay(QWidget *parent, const char *name)
-: QWidget(parent, name) {
- QVBoxLayout* layout = new QVBoxLayout(this);
- QLabel* headingLabel = new QLabel(i18n("Mag (\"shift\" to lock)"),this);
+ CInfoDisplay::CInfoDisplay(TQWidget *parent, const char *name)
+: TQWidget(parent, name) {
+ TQVBoxLayout* layout = new TQVBoxLayout(this);
+ TQLabel* headingLabel = new TQLabel(i18n("Mag (\"shift\" to lock)"),this);
headingLabel->setMargin(5);
m_htmlPart = CDisplay::createReadInstance(0, this);
m_htmlPart->setMouseTracking(false); //we don't want strong/lemma/note mouse infos
- KStdAction::copy(m_htmlPart->connectionsProxy(), SLOT(copySelection()), 0, "copyMagSelection");
+ KStdAction::copy(m_htmlPart->connectionsProxy(), TQT_SLOT(copySelection()), 0, "copyMagSelection");
connect(
m_htmlPart->connectionsProxy(),
- SIGNAL(referenceClicked(const QString&, const QString&)),
- SLOT(lookup(const QString&, const QString&))
+ TQT_SIGNAL(referenceClicked(const TQString&, const TQString&)),
+ TQT_SLOT(lookup(const TQString&, const TQString&))
);
layout->addWidget(headingLabel);
@@ -70,7 +70,7 @@ namespace InfoDisplay {
CInfoDisplay::~CInfoDisplay() {}
- void CInfoDisplay::lookup(const QString &mod_name, const QString &key_text) {
+ void CInfoDisplay::lookup(const TQString &mod_name, const TQString &key_text) {
qWarning("%s %s", mod_name.ascii(), key_text.ascii());
CSwordModuleInfo* m = CPointers::backend()->findModuleByName(mod_name);
Q_ASSERT(m);
@@ -84,7 +84,7 @@ namespace InfoDisplay {
CDisplayTemplateMgr::Settings settings;
settings.pageCSS_ID = "infodisplay";
// settings.langAbbrev = "";
- QString content = mgr->fillTemplate(CBTConfig::get
+ TQString content = mgr->fillTemplate(CBTConfig::get
(CBTConfig::displayStyle), key->renderedText(), settings);
// qWarning("setting text:\n%s", content.latin1());
@@ -95,7 +95,7 @@ namespace InfoDisplay {
}
- void CInfoDisplay::setInfo(const InfoType type, const QString& data) {
+ void CInfoDisplay::setInfo(const InfoType type, const TQString& data) {
ListInfoData list;
list.append( qMakePair(type, data) );
@@ -114,7 +114,7 @@ namespace InfoDisplay {
return;
}
- QString text;
+ TQString text;
ListInfoData::const_iterator end = list.end();
for (ListInfoData::const_iterator it = list.begin(); it != end; ++it) {
@@ -149,7 +149,7 @@ namespace InfoDisplay {
CDisplayTemplateMgr::Settings settings;
settings.pageCSS_ID = "infodisplay";
// settings.langAbbrev = "";
- QString content = mgr->fillTemplate(CBTConfig::get
+ TQString content = mgr->fillTemplate(CBTConfig::get
(CBTConfig::displayStyle), text, settings);
// qWarning("setting text:\n%s", content.latin1());
@@ -158,13 +158,13 @@ namespace InfoDisplay {
}
- const QString CInfoDisplay::decodeAbbreviation( const QString& data ) {
- // QStringList strongs = QStringList::split("|", data);
- QString ret;
- QString text = data;
+ const TQString CInfoDisplay::decodeAbbreviation( const TQString& data ) {
+ // TQStringList strongs = TQStringList::split("|", data);
+ TQString ret;
+ TQString text = data;
ret.append(
- QString("<div class=\"abbreviation\"><h3>%1: %2</h3><p>%3</p></div>")
+ TQString("<div class=\"abbreviation\"><h3>%1: %2</h3><p>%3</p></div>")
.arg(i18n("Abbreviation"))
.arg("text")
.arg(text));
@@ -172,10 +172,10 @@ namespace InfoDisplay {
return ret;
}
- const QString CInfoDisplay::decodeCrossReference( const QString& data ) {
+ const TQString CInfoDisplay::decodeCrossReference( const TQString& data ) {
Q_ASSERT(!data.isEmpty());
if (data.isEmpty()) {
- return QString("<div class=\"crossrefinfo\"><h3>%1</h3></div>")
+ return TQString("<div class=\"crossrefinfo\"><h3>%1</h3></div>")
.arg(i18n("Cross references"));
}
@@ -201,7 +201,7 @@ namespace InfoDisplay {
(CBTConfig::standardBible);
//a prefixed module gives the module to look into
- QRegExp re("^[^ ]+:");
+ TQRegExp re("^[^ ]+:");
// re.setMinimal(true);
int pos = re.search(data,0);
if (pos != -1) {
@@ -209,7 +209,7 @@ namespace InfoDisplay {
}
if (pos > 0) {
- const QString moduleName = data.left(pos);
+ const TQString moduleName = data.left(pos);
// qWarning("found module %s", moduleName.latin1());
module = CPointers::backend()->findModuleByName(moduleName);
if (!module) {
@@ -237,16 +237,16 @@ namespace InfoDisplay {
CTextRendering::KeyTreeItem* i = 0;
if (vk && vk->isBoundSet()) { //render a range of keys
i = new CTextRendering::KeyTreeItem(
- QString::fromUtf8(vk->LowerBound().getText()),
- QString::fromUtf8(vk->UpperBound().getText()),
+ TQString::fromUtf8(vk->LowerBound().getText()),
+ TQString::fromUtf8(vk->UpperBound().getText()),
module,
settings
);
}
else {
i = new CTextRendering::KeyTreeItem(
- QString::fromUtf8(key->getText()),
- QString::fromUtf8(key->getText()),
+ TQString::fromUtf8(key->getText()),
+ TQString::fromUtf8(key->getText()),
module,
settings
);
@@ -268,32 +268,32 @@ 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
- return QString("<div class=\"crossrefinfo\"><h3>%1</h3><div class=\"para\" dir=\"%2\">%3</div></div>")
+ 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));
}
/*!
- \fn CInfoDisplay::decodeFootnote( const QString& data )
+ \fn CInfoDisplay::decodeFootnote( const TQString& data )
*/
- const QString CInfoDisplay::decodeFootnote( const QString& data ) {
- QStringList list = QStringList::split("/", data);
+ const TQString CInfoDisplay::decodeFootnote( const TQString& data ) {
+ TQStringList list = TQStringList::split("/", data);
Q_ASSERT(list.count() >= 3);
if (!list.count()) {
- return QString::null;
+ return TQString::null;
}
- const QString modulename = list.first();
- const QString swordFootnote = list.last();
+ const TQString modulename = list.first();
+ const TQString swordFootnote = list.last();
// remove the first and the last and then rejoin it to get a key
list.pop_back(); list.pop_front();
- const QString keyname = list.join("/");
+ const TQString keyname = list.join("/");
CSwordModuleInfo* module = CPointers::backend()->findModuleByName(modulename);
if (!module) {
- return QString::null;
+ return TQString::null;
}
util::scoped_ptr<CSwordKey> key( CSwordKey::createInstance(module) );
@@ -302,32 +302,32 @@ namespace InfoDisplay {
const char* note = module->module()->getEntryAttributes()["Footnote"][swordFootnote.latin1()]["body"].c_str();
- QString text = module->isUnicode() ? QString::fromUtf8(note) : QString(note);
- text = QString::fromUtf8(module->module()->RenderText(
+ TQString text = module->isUnicode() ? TQString::fromUtf8(note) : TQString(note);
+ text = TQString::fromUtf8(module->module()->RenderText(
module->isUnicode()
? (const char*)text.utf8()
: (const char*)text.latin1()
));
- return QString("<div class=\"footnoteinfo\"><h3>%1</h3><p>%2</p></div>")
+ return TQString("<div class=\"footnoteinfo\"><h3>%1</h3><p>%2</p></div>")
.arg(i18n("Footnote"))
.arg(text);
}
- const QString CInfoDisplay::decodeStrongs( const QString& data ) {
- QStringList strongs = QStringList::split("|", data);
- QString ret;
+ const TQString CInfoDisplay::decodeStrongs( const TQString& data ) {
+ TQStringList strongs = TQStringList::split("|", data);
+ TQString ret;
- QStringList::const_iterator end = strongs.end();
- for (QStringList::const_iterator it = strongs.begin(); it != end; ++it) {
+ TQStringList::const_iterator end = strongs.end();
+ for (TQStringList::const_iterator it = strongs.begin(); it != end; ++it) {
CSwordModuleInfo* const module = CBTConfig::get
(
- ((*it).left(1) == QString("H")) ?
+ ((*it).left(1) == TQString("H")) ?
CBTConfig::standardHebrewStrongsLexicon :
CBTConfig::standardGreekStrongsLexicon
);
- QString text;
+ TQString text;
if (module) {
util::scoped_ptr<CSwordKey> key( CSwordKey::createInstance(module) );
key->key( (*it).mid(1) ); //skip H or G (language sign), will have to change later if we have better modules
@@ -336,7 +336,7 @@ namespace InfoDisplay {
//if the module could not be found just display an empty lemma info
ret.append(
- QString("<div class=\"strongsinfo\"><h3>%1: %2</h3><p>%3</p></div>")
+ TQString("<div class=\"strongsinfo\"><h3>%1: %2</h3><p>%3</p></div>")
.arg(i18n("Strongs"))
.arg(*it)
.arg(text)
@@ -346,15 +346,15 @@ namespace InfoDisplay {
return ret;
}
- const QString CInfoDisplay::decodeMorph( const QString& data ) {
- QStringList morphs = QStringList::split("|", data);
- QString ret;
+ const TQString CInfoDisplay::decodeMorph( const TQString& data ) {
+ TQStringList morphs = TQStringList::split("|", data);
+ TQString ret;
- for (QStringList::iterator it = morphs.begin(); it != morphs.end(); ++it) {
+ for (TQStringList::iterator it = morphs.begin(); it != morphs.end(); ++it) {
CSwordModuleInfo* module = 0;
bool skipFirstChar = false;
- QString value = "";
- QString valueClass = "";
+ TQString value = "";
+ TQString valueClass = "";
int valStart = (*it).find(':');
if (valStart > -1) {
@@ -369,7 +369,7 @@ namespace InfoDisplay {
// Morphs usually don't have [GH] prepended, but some old OLB
// codes do. We should check if we're digit after first char
// to better guess this.
- // No need to check len, if at(1) is > len QChar::null is
+ // 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()) {
@@ -397,7 +397,7 @@ namespace InfoDisplay {
}
}
- QString text;
+ TQString text;
Q_ASSERT(module);
if (module) {
util::scoped_ptr<CSwordKey> key( CSwordKey::createInstance(module) );
@@ -415,7 +415,7 @@ namespace InfoDisplay {
}
//if the module wasn't found just display an empty morph info
- ret.append( QString("<div class=\"morphinfo\"><h3>%1: %2</h3><p>%3</p></div>")
+ ret.append( TQString("<div class=\"morphinfo\"><h3>%1: %2</h3><p>%3</p></div>")
.arg(i18n("Morphology"))
.arg(value)
.arg(text)
@@ -425,20 +425,20 @@ namespace InfoDisplay {
return ret;
}
- const QString CInfoDisplay::getWordTranslation( const QString& data ) {
+ const TQString CInfoDisplay::getWordTranslation( const TQString& data ) {
CSwordModuleInfo* const module = CBTConfig::get
(CBTConfig::standardLexicon);
if (!module) {
- return QString::null;
+ return TQString::null;
}
util::scoped_ptr<CSwordKey> key( CSwordKey::createInstance(module) );
key->key( data );
if (key->key().upper() != data.upper()) { //key not present in the lexicon
- return QString::null;
+ return TQString::null;
}
- QString ret = QString("<div class=\"translationinfo\"><h3>%1: %2</h3><p>%3</p></div>")
+ TQString ret = TQString("<div class=\"translationinfo\"><h3>%1: %2</h3><p>%3</p></div>")
.arg(i18n("Word lookup"))
.arg(data)
.arg(key->renderedText());
@@ -456,7 +456,7 @@ namespace InfoDisplay {
settings.pageCSS_ID = "infodisplay";
m_htmlPart->setText( tmgr->fillTemplate(CBTConfig::get
- (CBTConfig::displayStyle), QString::null, settings) );
+ (CBTConfig::displayStyle), TQString::null, settings) );
}
} //end of namespace InfoDisplay