summaryrefslogtreecommitdiffstats
path: root/bibletime/frontend/keychooser/cbookkeychooser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bibletime/frontend/keychooser/cbookkeychooser.cpp')
-rw-r--r--bibletime/frontend/keychooser/cbookkeychooser.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/bibletime/frontend/keychooser/cbookkeychooser.cpp b/bibletime/frontend/keychooser/cbookkeychooser.cpp
index 0741bad..233476e 100644
--- a/bibletime/frontend/keychooser/cbookkeychooser.cpp
+++ b/bibletime/frontend/keychooser/cbookkeychooser.cpp
@@ -15,12 +15,12 @@
#include "frontend/cbtconfig.h"
//Qt includes
-#include <qlayout.h>
-#include <qmap.h>
+#include <tqlayout.h>
+#include <tqmap.h>
-QMap<QObject*, int> boxes;
+TQMap<TQObject*, int> boxes;
-CBookKeyChooser::CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, QWidget *parent, const char *name)
+CBookKeyChooser::CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent, const char *name)
: CKeyChooser(modules, key, parent,name), m_layout(0) {
setModules(modules, false);
@@ -48,7 +48,7 @@ void CBookKeyChooser::setKey(CSwordKey* newKey, const bool emitSignal) {
m_key = dynamic_cast<CSwordTreeKey*>(newKey);
}
- /*const */QString oldKey = m_key->key();
+ /*const */TQString oldKey = m_key->key();
if (oldKey.isEmpty()) { //don't set keys equal to "/", always use a key which may have content
m_key->firstChild();
@@ -56,9 +56,9 @@ void CBookKeyChooser::setKey(CSwordKey* newKey, const bool emitSignal) {
}
const int oldOffset = m_key->getOffset();
- QStringList siblings;
+ TQStringList siblings;
if (m_key && !oldKey.isEmpty()) {
- siblings = QStringList::split("/", oldKey, false);
+ siblings = TQStringList::split("/", oldKey, false);
}
int depth = 0;
@@ -67,9 +67,9 @@ void CBookKeyChooser::setKey(CSwordKey* newKey, const bool emitSignal) {
m_key->root();
while( m_key->firstChild() && (depth <= int(siblings.count())) ) {
- const QString key = m_key->key();
+ const TQString key = m_key->key();
index = (depth == 0) ? -1 : 0;
- const QString sibling = siblings[depth];
+ const TQString sibling = siblings[depth];
if (!sibling.isEmpty()) { //found it
bool found = false;
@@ -77,7 +77,7 @@ void CBookKeyChooser::setKey(CSwordKey* newKey, const bool emitSignal) {
do {
++index;
//qDebug("set 'found'");
- //found = (QString::fromLocal8Bit(m_key->getLocalName()) == sibling);
+ //found = (TQString::fromLocal8Bit(m_key->getLocalName()) == sibling);
found = (m_key->getLocalNameUnicode() == sibling);
}
while (!found && m_key->nextSibling());
@@ -134,7 +134,7 @@ void CBookKeyChooser::setModules(const ListCSwordModuleInfo& modules, const bool
//refresh the number of combos
if (refresh && m_modules.count() && m_key) {
if (!m_layout) {
- m_layout = new QHBoxLayout(this);
+ m_layout = new TQHBoxLayout(this);
}
//delete old widgets
@@ -162,8 +162,8 @@ void CBookKeyChooser::setModules(const ListCSwordModuleInfo& modules, const bool
w->comboBox()->setMaximumWidth(maxWidth);
w->comboBox()->setCurrentItem(0);
- connect(w, SIGNAL(changed(int)), SLOT(keyChooserChanged(int)));
- connect(w, SIGNAL(focusOut(int)), SLOT(keyChooserChanged(int)));
+ connect(w, TQT_SIGNAL(changed(int)), TQT_SLOT(keyChooserChanged(int)));
+ connect(w, TQT_SIGNAL(focusOut(int)), TQT_SLOT(keyChooserChanged(int)));
m_layout->addWidget(w);
boxes[w] = i;
@@ -181,12 +181,12 @@ void CBookKeyChooser::setModules(const ListCSwordModuleInfo& modules, const bool
Q_ASSERT(chooser);
if (chooser && chooser_prev) {
- QWidget::setTabOrder(chooser_prev, chooser);
+ TQWidget::setTabOrder(chooser_prev, chooser);
}
chooser_prev = chooser;
}
- QWidget::setTabOrder(chooser, 0);
+ TQWidget::setTabOrder(chooser, 0);
updateKey(m_key);
adjustFont(); // only when refresh is set.
@@ -210,7 +210,7 @@ void CBookKeyChooser::refreshContent() {
}
}
-void CBookKeyChooser::setupCombo(const QString key, const int depth, const int currentItem) {
+void CBookKeyChooser::setupCombo(const TQString key, const int depth, const int currentItem) {
CKeyChooserWidget* chooserWidget = m_chooserWidgets.at(depth);
const unsigned long oldOffset = m_key->getOffset();
@@ -228,13 +228,13 @@ void CBookKeyChooser::setupCombo(const QString key, const int depth, const int c
//insert an empty item at the top
- QStringList items;
+ TQStringList items;
if (depth > 0) {
- items << QString::null;
+ items << TQString::null;
}
do {
- //items << QString::fromLocal8Bit(m_key->getLocalName());
+ //items << TQString::fromLocal8Bit(m_key->getLocalName());
items << m_key->getLocalNameUnicode();
}
while (m_key->nextSibling());
@@ -250,18 +250,18 @@ void CBookKeyChooser::setupCombo(const QString key, const int depth, const int c
/** A keychooser changed. Update and emit a signal if necessary. */
void CBookKeyChooser::keyChooserChanged(int /*newIndex*/) {
- const int activeID = boxes[const_cast<QObject*>(sender())]; //no so good code!
+ const int activeID = boxes[const_cast<TQObject*>(sender())]; //no so good code!
- QStringList items;
+ TQStringList items;
CKeyChooserWidget* chooser;
const int count = m_chooserWidgets.count();
for (int i = 0; i < count; ++i) {
chooser = m_chooserWidgets.at(i);
- const QString currentText =
+ const TQString currentText =
(chooser && chooser->comboBox())
? chooser->comboBox()->currentText()
- : QString::null;
+ : TQString::null;
if (currentText.isEmpty() || i > activeID) {
break;
@@ -270,7 +270,7 @@ void CBookKeyChooser::keyChooserChanged(int /*newIndex*/) {
items << currentText;
}
- QString newKey("/");
+ TQString newKey("/");
newKey.append(items.join("/"));
if (newKey.length() > 1) {
newKey.remove(newKey.length(),1); //remove the traling slash