diff options
Diffstat (limited to 'bibletime/frontend/keychooser')
20 files changed, 326 insertions, 326 deletions
diff --git a/bibletime/frontend/keychooser/cbiblekeychooser.cpp b/bibletime/frontend/keychooser/cbiblekeychooser.cpp index 88a2a51..c8a2e0f 100644 --- a/bibletime/frontend/keychooser/cbiblekeychooser.cpp +++ b/bibletime/frontend/keychooser/cbiblekeychooser.cpp @@ -21,14 +21,14 @@ #include "util/cresmgr.h" //Qt includes -#include <qcombobox.h> -#include <qlistbox.h> -#include <qpushbutton.h> +#include <tqcombobox.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> //KDE includes #include <klocale.h> -CBibleKeyChooser::CBibleKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, QWidget *parent, const char *name ) +CBibleKeyChooser::CBibleKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent, const char *name ) : CKeyChooser(modules, key, parent, name), m_key(dynamic_cast<CSwordVerseKey*>(key)) { w_ref = 0; @@ -38,13 +38,13 @@ m_key(dynamic_cast<CSwordVerseKey*>(key)) { m_key = 0; return; } - QHBoxLayout* layout = new QHBoxLayout(this); - layout->setDirection( QBoxLayout::LeftToRight ); + TQHBoxLayout* layout = new TQHBoxLayout(this); + layout->setDirection( TQBoxLayout::LeftToRight ); w_ref = new CKeyReferenceWidget(dynamic_cast<CSwordBibleModuleInfo*>(m_modules.first()), m_key, this); layout->addWidget(w_ref); - connect(w_ref,SIGNAL(changed(CSwordVerseKey *)),SLOT(refChanged(CSwordVerseKey *))); + connect(w_ref,TQT_SIGNAL(changed(CSwordVerseKey *)),TQT_SLOT(refChanged(CSwordVerseKey *))); setKey(m_key); //set the key without changing it, setKey(key()) would change it } diff --git a/bibletime/frontend/keychooser/cbiblekeychooser.h b/bibletime/frontend/keychooser/cbiblekeychooser.h index 88e987e..71d92f9 100644 --- a/bibletime/frontend/keychooser/cbiblekeychooser.h +++ b/bibletime/frontend/keychooser/cbiblekeychooser.h @@ -12,7 +12,7 @@ #ifndef CBIBLEKEYCHOOSER_H #define CBIBLEKEYCHOOSER_H -#include <qwidget.h> +#include <tqwidget.h> #include "ckeychooser.h" #include "backend/cswordbiblemoduleinfo.h" @@ -38,7 +38,7 @@ public: * the constructor * you should not need to use this, use @ref CKeyChooser::createInstance instead */ - CBibleKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, QWidget *parent=0, const char *name=0); + CBibleKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *parent=0, const char *name=0); public slots: /** @@ -66,7 +66,7 @@ public slots: private: CKeyReferenceWidget* w_ref; - QPtrList<CSwordBibleModuleInfo> m_modules; + TQPtrList<CSwordBibleModuleInfo> m_modules; CSwordVerseKey *m_key; }; 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 diff --git a/bibletime/frontend/keychooser/cbookkeychooser.h b/bibletime/frontend/keychooser/cbookkeychooser.h index 586996e..ddb5b95 100644 --- a/bibletime/frontend/keychooser/cbookkeychooser.h +++ b/bibletime/frontend/keychooser/cbookkeychooser.h @@ -19,11 +19,11 @@ //Sword includes //Qt includes -#include <qwidget.h> -#include <qsize.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqsize.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqstringlist.h> class CSwordKey; class CSwordBookModuleInfo; @@ -33,7 +33,7 @@ namespace sword { class TreeKeyIdx; } -class QHBoxLayout; +class TQHBoxLayout; /** The keychooser implementation for books. * @author The BibleTime team @@ -41,7 +41,7 @@ class QHBoxLayout; class CBookKeyChooser : public CKeyChooser { Q_OBJECT public: - CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, QWidget *parent=0, const char *name=0); + CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *parent=0, const char *name=0); ~CBookKeyChooser(); /** * Refreshes the content. @@ -76,7 +76,7 @@ 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. */ - void setupCombo(const QString key, const int depth, const int currentItem); + void setupCombo(const TQString key, const int depth, const int currentItem); /** No descriptions */ virtual void adjustFont(); @@ -90,10 +90,10 @@ protected slots: // void previousEntry(); private: - QPtrList<CKeyChooserWidget> m_chooserWidgets; - QPtrList<CSwordBookModuleInfo> m_modules; + TQPtrList<CKeyChooserWidget> m_chooserWidgets; + TQPtrList<CSwordBookModuleInfo> m_modules; CSwordTreeKey *m_key; - QHBoxLayout* m_layout; + TQHBoxLayout* m_layout; }; #endif diff --git a/bibletime/frontend/keychooser/cbooktreechooser.cpp b/bibletime/frontend/keychooser/cbooktreechooser.cpp index 33e95fa..e15fbc2 100644 --- a/bibletime/frontend/keychooser/cbooktreechooser.cpp +++ b/bibletime/frontend/keychooser/cbooktreechooser.cpp @@ -15,17 +15,17 @@ #include "frontend/cbtconfig.h" //Qt includes -#include <qlayout.h> -#include <qheader.h> -#include <qlistview.h> -#include <qcursor.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqlistview.h> +#include <tqcursor.h> //KDE includes #include <kapplication.h> //////////// -CBookTreeChooser::TreeItem::TreeItem(QListViewItem* parent, QListViewItem* after, CSwordTreeKey* key, const QString keyName) +CBookTreeChooser::TreeItem::TreeItem(TQListViewItem* parent, TQListViewItem* after, CSwordTreeKey* key, const TQString keyName) : KListViewItem(parent, after), m_key(key), m_keyName(keyName) { @@ -33,13 +33,13 @@ m_keyName(keyName) { const unsigned long offset = m_key->getOffset(); m_key->key(m_keyName); - //setText(0, QString::fromLocal8Bit(m_key->getLocalName()) ); + //setText(0, TQString::fromLocal8Bit(m_key->getLocalName()) ); setText(0, m_key->getLocalNameUnicode() ); m_key->setOffset( offset ); }; -CBookTreeChooser::TreeItem::TreeItem(QListViewItem* parent,CSwordTreeKey* key, const QString keyName) +CBookTreeChooser::TreeItem::TreeItem(TQListViewItem* parent,CSwordTreeKey* key, const TQString keyName) : KListViewItem(parent), m_key(key), m_keyName(keyName) { @@ -47,13 +47,13 @@ m_keyName(keyName) { const unsigned int offset = m_key->getOffset(); m_key->key(m_keyName); - //setText(0, QString::fromLocal8Bit(m_key->getLocalName()) ); + //setText(0, TQString::fromLocal8Bit(m_key->getLocalName()) ); setText(0, m_key->getLocalNameUnicode() ); m_key->setOffset( offset ); }; -CBookTreeChooser::TreeItem::TreeItem(QListView* view, QListViewItem* after,CSwordTreeKey* key, const QString keyName) +CBookTreeChooser::TreeItem::TreeItem(TQListView* view, TQListViewItem* after,CSwordTreeKey* key, const TQString keyName) : KListViewItem(view,after), m_key(key), m_keyName(keyName) { @@ -61,13 +61,13 @@ m_keyName(keyName) { const unsigned int offset = m_key->getOffset(); m_key->key(m_keyName); - //setText(0, QString::fromLocal8Bit(m_key->getLocalName()) ); + //setText(0, TQString::fromLocal8Bit(m_key->getLocalName()) ); setText(0, m_key->getLocalNameUnicode() ); m_key->setOffset( offset ); }; -const QString& CBookTreeChooser::TreeItem::key() const { +const TQString& CBookTreeChooser::TreeItem::key() const { return m_keyName; }; @@ -93,7 +93,7 @@ void CBookTreeChooser::TreeItem::createChilds() { if (m_key->hasChildren()) { m_key->firstChild(); //go to the first child - QListViewItem* oldItem = 0; + TQListViewItem* oldItem = 0; do { if (oldItem) { @@ -124,7 +124,7 @@ void CBookTreeChooser::TreeItem::setOpen(bool o) { ////////////////////////////////// -CBookTreeChooser::CBookTreeChooser(ListCSwordModuleInfo modules, CSwordKey *key, QWidget *parent, const char *name) +CBookTreeChooser::CBookTreeChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent, const char *name) : CKeyChooser(modules, key, parent,name), m_key( dynamic_cast<CSwordTreeKey*>(key) ) { setModules(modules, false); @@ -135,7 +135,7 @@ m_key( dynamic_cast<CSwordTreeKey*>(key) ) { } //now setup the keychooser widgets - QHBoxLayout* layout = new QHBoxLayout(this); + TQHBoxLayout* layout = new TQHBoxLayout(this); m_treeView = new KListView(this); layout->addWidget(m_treeView); @@ -144,7 +144,7 @@ m_key( dynamic_cast<CSwordTreeKey*>(key) ) { m_treeView->setSorting(-1); m_treeView->setRootIsDecorated(true); m_treeView->setFullWidth(true); - connect(m_treeView, SIGNAL(executed(QListViewItem*)), SLOT(itemActivated(QListViewItem*))); + connect(m_treeView, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(itemActivated(TQListViewItem*))); setKey(key); adjustFont(); @@ -163,19 +163,19 @@ void CBookTreeChooser::setKey(CSwordKey* newKey, const bool emitSignal) { m_key = dynamic_cast<CSwordTreeKey*>(newKey); } - const QString key = m_key->key(); + const TQString key = m_key->key(); - QStringList siblings; + TQStringList siblings; if (m_key && !key.isEmpty()) { - siblings = QStringList::split("/",key,false); + siblings = TQStringList::split("/",key,false); } //find the right listview item const int count = siblings.count(); int index = 0; - QString currentSibling = siblings[index]; + TQString currentSibling = siblings[index]; - QListViewItem* child = m_treeView->firstChild(); + TQListViewItem* child = m_treeView->firstChild(); while( child && index < count ) { if (child->text(0) == currentSibling) { //found a parent of our item //found right entry? @@ -229,7 +229,7 @@ void CBookTreeChooser::setModules(const ListCSwordModuleInfo& modules, const boo // m_treeView->clear(); // - // const QString oldKey = m_key->key(); + // const TQString oldKey = m_key->key(); // m_key->root(); // m_key->firstChild(); // setupTree(0,0,m_key); @@ -264,7 +264,7 @@ void CBookTreeChooser::refreshContent() { } /** No descriptions */ -void CBookTreeChooser::itemActivated( QListViewItem* item ) { +void CBookTreeChooser::itemActivated( TQListViewItem* item ) { TreeItem* i = dynamic_cast<TreeItem*>(item); if (!i) { return; @@ -304,7 +304,7 @@ void CBookTreeChooser::setupTree() { m_key->root(); if (m_key->hasChildren()) { - QListViewItem* item = 0; + TQListViewItem* item = 0; m_key->firstChild(); do { diff --git a/bibletime/frontend/keychooser/cbooktreechooser.h b/bibletime/frontend/keychooser/cbooktreechooser.h index 43b03d5..49caa05 100644 --- a/bibletime/frontend/keychooser/cbooktreechooser.h +++ b/bibletime/frontend/keychooser/cbooktreechooser.h @@ -23,11 +23,11 @@ //Sword includes //Qt includes -#include <qwidget.h> -#include <qsize.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqsize.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqstringlist.h> //KDE includes #include <klistview.h> @@ -46,7 +46,7 @@ namespace sword { class CBookTreeChooser : public CKeyChooser { Q_OBJECT public: - CBookTreeChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, QWidget *parent=0, const char *name=0); + CBookTreeChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *parent=0, const char *name=0); ~CBookTreeChooser(); /** * Refreshes the content. @@ -82,15 +82,15 @@ protected: // Protected methods virtual void adjustFont(); protected slots: // Protected slots - void itemActivated( QListViewItem* item ); + void itemActivated( TQListViewItem* item ); private: class TreeItem : public KListViewItem { public: - TreeItem(QListViewItem* parent, QListViewItem* after, CSwordTreeKey* key, const QString keyName); - TreeItem(QListViewItem* parent, CSwordTreeKey* key, const QString keyName); - TreeItem(QListView* view,QListViewItem* after, CSwordTreeKey* key, const QString keyName); - const QString& key() const; + TreeItem(TQListViewItem* parent, TQListViewItem* after, CSwordTreeKey* key, const TQString keyName); + TreeItem(TQListViewItem* parent, CSwordTreeKey* key, const TQString keyName); + TreeItem(TQListView* view,TQListViewItem* after, CSwordTreeKey* key, const TQString keyName); + const TQString& key() const; void createChilds(); virtual void setOpen(bool); @@ -101,10 +101,10 @@ protected: virtual void setup(); private: CSwordTreeKey* m_key; - QString m_keyName; + TQString m_keyName; }; - QPtrList<CSwordBookModuleInfo> m_modules; + TQPtrList<CSwordBookModuleInfo> m_modules; CSwordTreeKey* m_key; KListView* m_treeView; }; diff --git a/bibletime/frontend/keychooser/ckeychooser.cpp b/bibletime/frontend/keychooser/ckeychooser.cpp index 4dcd878..0db5911 100644 --- a/bibletime/frontend/keychooser/ckeychooser.cpp +++ b/bibletime/frontend/keychooser/ckeychooser.cpp @@ -19,13 +19,13 @@ #include "cbiblekeychooser.h" #include "cbookkeychooser.h" -CKeyChooser::CKeyChooser(ListCSwordModuleInfo, CSwordKey *, QWidget *parent, const char *name ) -: QWidget(parent, name), +CKeyChooser::CKeyChooser(ListCSwordModuleInfo, CSwordKey *, TQWidget *parent, const char *name ) +: TQWidget(parent, name), m_inHistoryFunction(false) {} CKeyChooser::~CKeyChooser() {} -CKeyChooser* CKeyChooser::createInstance(ListCSwordModuleInfo modules, CSwordKey *key, QWidget *parent) { +CKeyChooser* CKeyChooser::createInstance(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent) { if (!modules.count()) { return 0; } @@ -58,7 +58,7 @@ void CKeyChooser::backInHistory(int count) { Q_ASSERT(m_prevKeyHistoryList.size()); - QStringList::iterator it = m_prevKeyHistoryList.begin(); + TQStringList::iterator it = m_prevKeyHistoryList.begin(); //pop_front count items, the top item is then the new current key int index = count; @@ -90,7 +90,7 @@ void CKeyChooser::forwardInHistory(int count) { Q_ASSERT(m_nextKeyHistoryList.size()); - QStringList::iterator it = m_nextKeyHistoryList.begin(); + TQStringList::iterator it = m_nextKeyHistoryList.begin(); //pop_front count-1 items, the top item is then the new current key int index = count; while (index > 0 && it != m_nextKeyHistoryList.end()) { @@ -124,8 +124,8 @@ void CKeyChooser::addToHistory(CSwordKey* k) { emit historyChanged(); } -const QStringList CKeyChooser::getPreviousKeys() const { - QStringList ret = m_prevKeyHistoryList; +const TQStringList CKeyChooser::getPreviousKeys() const { + TQStringList ret = m_prevKeyHistoryList; if (ret.size() >= 1) { ret.pop_front(); //the first item always is equal to the current key } @@ -133,7 +133,7 @@ const QStringList CKeyChooser::getPreviousKeys() const { return ret; } -const QStringList CKeyChooser::getNextKeys() const { +const TQStringList CKeyChooser::getNextKeys() const { return m_nextKeyHistoryList; } @@ -142,8 +142,8 @@ const QStringList CKeyChooser::getNextKeys() const { \fn CKeyChooser::polish() */ void CKeyChooser::polish() { - QWidget::polish(); + TQWidget::polish(); //connect the history calls just before we show, we want an empty history - connect(this, SIGNAL(keyChanged(CSwordKey*)), SLOT(addToHistory(CSwordKey*))); + connect(this, TQT_SIGNAL(keyChanged(CSwordKey*)), TQT_SLOT(addToHistory(CSwordKey*))); } diff --git a/bibletime/frontend/keychooser/ckeychooser.h b/bibletime/frontend/keychooser/ckeychooser.h index c5ad246..2ccb27d 100644 --- a/bibletime/frontend/keychooser/ckeychooser.h +++ b/bibletime/frontend/keychooser/ckeychooser.h @@ -12,7 +12,7 @@ #ifndef CKEYCHOOSER_H #define CKEYCHOOSER_H -#include <qwidget.h> +#include <tqwidget.h> #include "backend/cswordmoduleinfo.h" @@ -28,7 +28,7 @@ class CSwordKey; * @author The BibleTime team */ -class CKeyChooser : public QWidget { +class CKeyChooser : public TQWidget { Q_OBJECT public: @@ -41,10 +41,10 @@ public: * @param key if not NULL, the @ref CKey the KeyChooser should be set to * @param parent the parent of the widget to create */ - static CKeyChooser* createInstance(ListCSwordModuleInfo modules, CSwordKey *key, QWidget *parent); + static CKeyChooser* createInstance(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent); - const QStringList getPreviousKeys() const; - const QStringList getNextKeys() const; + const TQStringList getPreviousKeys() const; + const TQStringList getNextKeys() const; public slots: /** @@ -88,14 +88,14 @@ signals: /** * Is emitted before the key is changed! */ - void beforeKeyChange(const QString& key); + void beforeKeyChange(const TQString& key); void historyChanged(); protected: /** * the constructor - DO NOT USE! -- use @ref #createInstance instead! */ - CKeyChooser(ListCSwordModuleInfo info, CSwordKey *key=0, QWidget *parent=0, const char *name=0); + CKeyChooser(ListCSwordModuleInfo info, CSwordKey *key=0, TQWidget *parent=0, const char *name=0); virtual ~CKeyChooser(); /** * Set the appropriate font do display the modules @@ -103,8 +103,8 @@ protected: virtual void adjustFont() = 0; private: - QStringList m_prevKeyHistoryList; - QStringList m_nextKeyHistoryList; + TQStringList m_prevKeyHistoryList; + TQStringList m_nextKeyHistoryList; int m_currentKeyHistoryPos; bool m_inHistoryFunction; protected: diff --git a/bibletime/frontend/keychooser/ckeychooserwidget.cpp b/bibletime/frontend/keychooser/ckeychooserwidget.cpp index 64de499..d068545 100644 --- a/bibletime/frontend/keychooser/ckeychooserwidget.cpp +++ b/bibletime/frontend/keychooser/ckeychooserwidget.cpp @@ -16,34 +16,34 @@ //Qt includes -#include <qlineedit.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qlistbox.h> -#include <qtoolbutton.h> -#include <qevent.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qpixmap.h> -#include <qapplication.h> -#include <qtooltip.h> -#include <qrect.h> - -CKCComboBox::CKCComboBox(bool rw,QWidget* parent,const char* name) -: QComboBox(rw,parent,name) { - setFocusPolicy(QWidget::WheelFocus); +#include <tqlineedit.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqlistbox.h> +#include <tqtoolbutton.h> +#include <tqevent.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqpixmap.h> +#include <tqapplication.h> +#include <tqtooltip.h> +#include <tqrect.h> + +CKCComboBox::CKCComboBox(bool rw,TQWidget* parent,const char* name) +: TQComboBox(rw,parent,name) { + setFocusPolicy(TQWidget::WheelFocus); if (lineEdit()) { installEventFilter( lineEdit() ); } } /** Reimplementation. */ -bool CKCComboBox::eventFilter( QObject *o, QEvent *e ) { - if (e->type() == QEvent::FocusOut) { - QFocusEvent* f = static_cast<QFocusEvent*>(e); +bool CKCComboBox::eventFilter( TQObject *o, TQEvent *e ) { + if (e->type() == TQEvent::FocusOut) { + TQFocusEvent* f = static_cast<TQFocusEvent*>(e); - if (o == lineEdit() && f->reason() == QFocusEvent::Tab) { + if (o == lineEdit() && f->reason() == TQFocusEvent::Tab) { int index = listBox()->index( listBox()->findItem(currentText()) ); if (index == -1) { index = 0;// return 0 if not found @@ -53,14 +53,14 @@ bool CKCComboBox::eventFilter( QObject *o, QEvent *e ) { return false; } - else if (f->reason() == QFocusEvent::Popup) { + else if (f->reason() == TQFocusEvent::Popup) { return false; } - else if (f->reason() == QFocusEvent::ActiveWindow) { + else if (f->reason() == TQFocusEvent::ActiveWindow) { emit activated(currentText()); return false; } - else if (f->reason() == QFocusEvent::Mouse) { + else if (f->reason() == TQFocusEvent::Mouse) { emit activated(currentText()); return false; } @@ -70,12 +70,12 @@ bool CKCComboBox::eventFilter( QObject *o, QEvent *e ) { } } - return QComboBox::eventFilter(o,e); + return TQComboBox::eventFilter(o,e); } /** Scrolls in the list if the wheel of the mouse was used. */ -void CKCComboBox::wheelEvent( QWheelEvent* e ) { - return QComboBox::wheelEvent(e); +void CKCComboBox::wheelEvent( TQWheelEvent* e ) { + return TQComboBox::wheelEvent(e); const signed int change = (int)((float)e->delta()/(float)120); int current = currentItem(); @@ -92,17 +92,17 @@ void CKCComboBox::wheelEvent( QWheelEvent* e ) { //**********************************************************************************/ -CKeyChooserWidget::CKeyChooserWidget(int count, const bool useNextPrevSignals, QWidget *parent, const char *name) : QWidget(parent,name) { +CKeyChooserWidget::CKeyChooserWidget(int count, const bool useNextPrevSignals, TQWidget *parent, const char *name) : TQWidget(parent,name) { m_useNextPrevSignals = useNextPrevSignals; for (int index=1; index <= count; index++) { - m_list.append( QString::number(index) ); + m_list.append( TQString::number(index) ); } init(); reset(m_list,0,false); }; -CKeyChooserWidget::CKeyChooserWidget(QStringList *list, const bool useNextPrevSignals, QWidget *parent, const char *name ) : QWidget(parent,name) { +CKeyChooserWidget::CKeyChooserWidget(TQStringList *list, const bool useNextPrevSignals, TQWidget *parent, const char *name ) : TQWidget(parent,name) { m_useNextPrevSignals = useNextPrevSignals; if (list) { @@ -122,13 +122,13 @@ void CKeyChooserWidget::reset(const int count, int index, bool do_emit) { m_list.clear(); for (int i=1; i <= count; i++) { //TODO: CHECK - m_list.append( QString::number(i) ); + m_list.append( TQString::number(i) ); } reset(&m_list,index,do_emit); } -void CKeyChooserWidget::reset(QStringList& list, int index, bool do_emit) { +void CKeyChooserWidget::reset(TQStringList& list, int index, bool do_emit) { if (!isUpdatesEnabled()) return; @@ -137,14 +137,14 @@ void CKeyChooserWidget::reset(QStringList& list, int index, bool do_emit) { } -void CKeyChooserWidget::reset(QStringList *list, int index, bool do_emit) { +void CKeyChooserWidget::reset(TQStringList *list, int index, bool do_emit) { if (isResetting || !isUpdatesEnabled()) return; // qWarning("starting insert"); isResetting = true; - oldKey = QString::null; + oldKey = TQString::null; // m_comboBox->setUpdatesEnabled(false); //DON'T REMOVE THE HIDE: Otherwise QComboBox's sizeHint() function won't work properly @@ -168,7 +168,7 @@ void CKeyChooserWidget::reset(QStringList *list, int index, bool do_emit) { emit changed(m_comboBox->currentItem()); } - const QSize dummySize = m_comboBox->sizeHint(); //without this function call the combo box won't be properly sized! + 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! m_comboBox->show(); @@ -181,16 +181,16 @@ void CKeyChooserWidget::reset(QStringList *list, int index, bool do_emit) { /** Initializes this widget. We need this function because we have more than one constructor. */ void CKeyChooserWidget::init() { - oldKey = QString::null; + oldKey = TQString::null; - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(TQWidget::WheelFocus); m_comboBox = new CKCComboBox( true, this ); m_comboBox->setAutoCompletion( true ); - m_comboBox->setInsertionPolicy(QComboBox::NoInsertion); - m_comboBox->setFocusPolicy(QWidget::WheelFocus); + m_comboBox->setInsertionPolicy(TQComboBox::NoInsertion); + m_comboBox->setFocusPolicy(TQWidget::WheelFocus); - m_mainLayout = new QHBoxLayout( this ); + m_mainLayout = new TQHBoxLayout( this ); m_mainLayout->addWidget(m_comboBox,5); m_scroller = new CScrollerWidgetSet(this); @@ -200,25 +200,25 @@ void CKeyChooserWidget::init() { setTabOrder(m_comboBox, 0); - connect(m_scroller, SIGNAL(scroller_pressed()), SLOT(lock())); - connect(m_scroller, SIGNAL(scroller_released()), SLOT(unlock())); - connect(m_scroller, SIGNAL(change(int)), SLOT(changeCombo(int)) ); + connect(m_scroller, TQT_SIGNAL(scroller_pressed()), TQT_SLOT(lock())); + connect(m_scroller, TQT_SIGNAL(scroller_released()), TQT_SLOT(unlock())); + connect(m_scroller, TQT_SIGNAL(change(int)), TQT_SLOT(changeCombo(int)) ); - connect(m_comboBox, SIGNAL(activated(int)), SLOT(slotComboChanged(int))); - // connect(m_comboBox, SIGNAL(activated(const QString&)), SLOT(slotReturnPressed(const QString&))); - connect(m_comboBox->lineEdit(), SIGNAL(returnPressed()), SLOT(slotReturnPressed())); - connect(m_comboBox, SIGNAL(focusOut(int)), SIGNAL(focusOut(int))); + connect(m_comboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(slotComboChanged(int))); + // connect(m_comboBox, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotReturnPressed(const TQString&))); + connect(m_comboBox->lineEdit(), TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed())); + connect(m_comboBox, TQT_SIGNAL(focusOut(int)), TQT_SIGNAL(focusOut(int))); updatelock = false; isResetting = false; } /** Is called when the return key was presed in the combobox. */ -void CKeyChooserWidget::slotReturnPressed( /*const QString& text*/) { +void CKeyChooserWidget::slotReturnPressed( /*const TQString& text*/) { Q_ASSERT(comboBox()->lineEdit()); qWarning("return pressed"); - QString text = comboBox()->lineEdit()->text(); + TQString text = comboBox()->lineEdit()->text(); for (int index = 0; index < comboBox()->count(); ++index) { if (comboBox()->text(index) == text) { // emit changed(index); @@ -237,7 +237,7 @@ void CKeyChooserWidget::slotComboChanged(int index) { setUpdatesEnabled(false); - const QString key = comboBox()->text( index ); + const TQString key = comboBox()->text( index ); if (oldKey.isNull() || (oldKey != key)) { emit changed(index); } @@ -248,13 +248,13 @@ void CKeyChooserWidget::slotComboChanged(int index) { } /** Sets the tooltips for the given entries using the parameters as text. */ -void CKeyChooserWidget::setToolTips( const QString comboTip, const QString nextEntryTip, const QString scrollButtonTip, const QString previousEntryTip) { - QToolTip::add (comboBox(),comboTip); +void CKeyChooserWidget::setToolTips( const TQString comboTip, const TQString nextEntryTip, const TQString scrollButtonTip, const TQString previousEntryTip) { + TQToolTip::add (comboBox(),comboTip); m_scroller->setToolTips(nextEntryTip, scrollButtonTip, previousEntryTip); } /** Sets the current item to the one with the given text */ -bool CKeyChooserWidget::setItem( const QString item ) { +bool CKeyChooserWidget::setItem( const TQString item ) { bool ret = false; const int count = comboBox()->count(); for (int i = 0; i < count; ++i) { diff --git a/bibletime/frontend/keychooser/ckeychooserwidget.h b/bibletime/frontend/keychooser/ckeychooserwidget.h index e5893ce..d1ef131 100644 --- a/bibletime/frontend/keychooser/ckeychooserwidget.h +++ b/bibletime/frontend/keychooser/ckeychooserwidget.h @@ -12,9 +12,9 @@ #ifndef CKEYCHOOSERWIDGET_H #define CKEYCHOOSERWIDGET_H -#include <qwidget.h> -#include <qmap.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqmap.h> +#include <tqstringlist.h> #include <kcombobox.h> #include "cscrollerwidgetset.h" @@ -23,37 +23,37 @@ class CLexiconKeyChooser; //class CMinMaxLayout; -class QIconSet; -//class QComboBox; -class QStringList; -class QPoint; -class QMouseEvent; -class QWheelEvent; -class QHBoxLayout; +class TQIconSet; +//class TQComboBox; +class TQStringList; +class TQPoint; +class TQMouseEvent; +class TQWheelEvent; +class TQHBoxLayout; /* * We use this class to conrtol the focus move in the combobox * This class is used in the key chooser widgets */ -class CKCComboBox : public QComboBox { +class CKCComboBox : public TQComboBox { Q_OBJECT public: - CKCComboBox(bool rw, QWidget * parent=0, const char * name=0 ); + CKCComboBox(bool rw, TQWidget * parent=0, const char * name=0 ); /** * Returns the size this widget would like to have. */ - // virtual QSize sizeHint() const; + // virtual TQSize sizeHint() const; protected: /** * Reimplementation. */ - virtual bool eventFilter( QObject *o, QEvent *e ); + virtual bool eventFilter( TQObject *o, TQEvent *e ); /** * Scrolls in the list if the wheel of the mouse was used. */ - virtual void wheelEvent( QWheelEvent* e); + virtual void wheelEvent( TQWheelEvent* e); signals: /** @@ -64,22 +64,22 @@ signals: /** * This class implements the KeyCooser Widget, which - * consists of a @ref QComboBox, two normal ref @QToolButton + * consists of a @ref TQComboBox, two normal ref @QToolButton * and a enhanced @ref CScrollButton * * @author The BibleTime team */ -class CKeyChooserWidget : public QWidget { +class CKeyChooserWidget : public TQWidget { Q_OBJECT public: /** * the constructor */ - CKeyChooserWidget(QStringList *list=0, const bool useNextPrevSignals = false, QWidget *parent=0, const char *name=0); + CKeyChooserWidget(TQStringList *list=0, const bool useNextPrevSignals = false, TQWidget *parent=0, const char *name=0); /** * the constructor */ - CKeyChooserWidget(int count=0, const bool useNextPrevSignals = false, QWidget *parent=0, const char *name=0); + CKeyChooserWidget(int count=0, const bool useNextPrevSignals = false, TQWidget *parent=0, const char *name=0); /** * This function does clear the combobox, then fill in * the StringList, set the ComboBox' current item to index @@ -90,8 +90,8 @@ public: * @param do_emit should we emit @ref #changed(int) */ void reset(const int count, int index, bool do_emit); - void reset(QStringList& list, int index, bool do_emit); - void reset(QStringList *list, int index, bool do_emit); + void reset(TQStringList& list, int index, bool do_emit); + void reset(TQStringList *list, int index, bool do_emit); /** * Initializes this widget. We need this function because * we have more than one constructor. @@ -104,15 +104,15 @@ public: /** * Sets the tooltips for the given entries using the parameters as text. */ - void setToolTips( const QString comboTip, const QString nextEntry, const QString scrollButton, const QString previousEntry); + void setToolTips( const TQString comboTip, const TQString nextEntry, const TQString scrollButton, const TQString previousEntry); /** * Sets the current item to the one with the given text */ - bool setItem( const QString item); + bool setItem( const TQString item); /** * Return the combobox of this key chooser widget. */ - QComboBox* comboBox() {return m_comboBox;}; + TQComboBox* comboBox() {return m_comboBox;}; public slots: /** @@ -153,18 +153,18 @@ protected: /** * */ - QString oldKey; + TQString oldKey; protected slots: // Protected slots /** * Is called when the return key was presed in the combobox. */ - void slotReturnPressed( /*const QString&*/ ); + void slotReturnPressed( /*const TQString&*/ ); private: friend class CLexiconKeyChooser; - QStringList m_list; + TQStringList m_list; bool m_useNextPrevSignals; bool updatelock; @@ -172,7 +172,7 @@ private: * Members should never be public!! */ CKCComboBox* m_comboBox; - QHBoxLayout *m_mainLayout; + TQHBoxLayout *m_mainLayout; CScrollerWidgetSet * m_scroller; }; diff --git a/bibletime/frontend/keychooser/ckeyreferencewidget.cpp b/bibletime/frontend/keychooser/ckeyreferencewidget.cpp index b0fc7c9..5382efc 100644 --- a/bibletime/frontend/keychooser/ckeyreferencewidget.cpp +++ b/bibletime/frontend/keychooser/ckeyreferencewidget.cpp @@ -19,11 +19,11 @@ //Qt includes #include <klineedit.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qevent.h> -#include <qpixmap.h> -#include <qapplication.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqevent.h> +#include <tqpixmap.h> +#include <tqapplication.h> #include <kcompletion.h> #include <kglobalsettings.h> #include <kcompletionbox.h> @@ -38,28 +38,28 @@ CKeyReferenceCompletion::CKeyReferenceCompletion(CSwordBibleModuleInfo *mod) : K m_module = mod; } -QString CKeyReferenceCompletion::makeCompletion(const QString &text) { +TQString CKeyReferenceCompletion::makeCompletion(const TQString &text) { if(!text.isEmpty() && m_key->key(text)) { // XXX: key() does not check bounds properly if we only have eg the NT. return m_key->key(); } - return QString::null; + return TQString::null; } //**********************************************************************************/ /* To get popup working we have to rework KLineEdit too */ -CKeyReferenceLineEdit::CKeyReferenceLineEdit(QWidget *parent, const char *name) : KLineEdit(parent,name) { +CKeyReferenceLineEdit::CKeyReferenceLineEdit(TQWidget *parent, const char *name) : KLineEdit(parent,name) { } -void CKeyReferenceLineEdit::makeCompletion(const QString &text) { +void CKeyReferenceLineEdit::makeCompletion(const TQString &text) { KCompletion *comp = compObj(); KGlobalSettings::Completion mode = completionMode(); if ( !comp || mode == KGlobalSettings::CompletionNone ) return; // No completion object... - QString match = comp->makeCompletion( text ); + TQString match = comp->makeCompletion( text ); if ( mode == KGlobalSettings::CompletionPopup || mode == KGlobalSettings::CompletionPopupAuto ) { @@ -69,7 +69,7 @@ void CKeyReferenceLineEdit::makeCompletion(const QString &text) { compbox->hide(); compbox->clear(); } else { - QStringList t; + TQStringList t; t.append(match); setCompletedItems(t); } @@ -80,19 +80,19 @@ void CKeyReferenceLineEdit::makeCompletion(const QString &text) { //**********************************************************************************/ -CKeyReferenceWidget::CKeyReferenceWidget( CSwordBibleModuleInfo *mod, CSwordVerseKey *key, QWidget *parent, const char *name) : QWidget(parent,name) { +CKeyReferenceWidget::CKeyReferenceWidget( CSwordBibleModuleInfo *mod, CSwordVerseKey *key, TQWidget *parent, const char *name) : TQWidget(parent,name) { updatelock = false; m_module = mod; - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(TQWidget::WheelFocus); // Erase button KGuiItem erase_picture; erase_picture.setIconName("locationbar_erase"); KPushButton *clearRef = new KPushButton(this); clearRef->setGuiItem(erase_picture); - connect(clearRef, SIGNAL(clicked( ) ), SLOT(slotClearRef( ))); + connect(clearRef, TQT_SIGNAL(clicked( ) ), TQT_SLOT(slotClearRef( ))); m_bookScroller = new CScrollerWidgetSet(this); @@ -103,7 +103,7 @@ CKeyReferenceWidget::CKeyReferenceWidget( CSwordBibleModuleInfo *mod, CSwordVers m_chapterScroller = new CScrollerWidgetSet(this); m_verseScroller = new CScrollerWidgetSet(this); - m_mainLayout = new QHBoxLayout( this ); + m_mainLayout = new TQHBoxLayout( this ); m_mainLayout->addWidget(clearRef); m_mainLayout->addWidget(m_bookScroller); m_mainLayout->addWidget(m_textbox); @@ -131,16 +131,16 @@ CKeyReferenceWidget::CKeyReferenceWidget( CSwordBibleModuleInfo *mod, CSwordVers // signals and slots connections - connect(m_bookScroller, SIGNAL(change(int)), SLOT(slotBookChange(int))); - connect(m_bookScroller, SIGNAL(scroller_pressed()), SLOT(slotUpdateLock())); - connect(m_bookScroller, SIGNAL(scroller_released()), SLOT(slotUpdateUnlock())); - connect(m_textbox, SIGNAL(returnPressed()), SLOT(slotReturnPressed())); - connect(m_chapterScroller, SIGNAL(change(int)), SLOT(slotChapterChange(int))); - connect(m_chapterScroller, SIGNAL(scroller_pressed()), SLOT(slotUpdateLock())); - connect(m_chapterScroller, SIGNAL(scroller_released()), SLOT(slotUpdateUnlock())); - connect(m_verseScroller, SIGNAL(change(int)), SLOT(slotVerseChange(int))); - connect(m_verseScroller, SIGNAL(scroller_pressed()), SLOT(slotUpdateLock())); - connect(m_verseScroller, SIGNAL(scroller_released()), SLOT(slotUpdateUnlock())); + connect(m_bookScroller, TQT_SIGNAL(change(int)), TQT_SLOT(slotBookChange(int))); + connect(m_bookScroller, TQT_SIGNAL(scroller_pressed()), TQT_SLOT(slotUpdateLock())); + connect(m_bookScroller, TQT_SIGNAL(scroller_released()), TQT_SLOT(slotUpdateUnlock())); + connect(m_textbox, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed())); + connect(m_chapterScroller, TQT_SIGNAL(change(int)), TQT_SLOT(slotChapterChange(int))); + connect(m_chapterScroller, TQT_SIGNAL(scroller_pressed()), TQT_SLOT(slotUpdateLock())); + connect(m_chapterScroller, TQT_SIGNAL(scroller_released()), TQT_SLOT(slotUpdateUnlock())); + connect(m_verseScroller, TQT_SIGNAL(change(int)), TQT_SLOT(slotVerseChange(int))); + connect(m_verseScroller, TQT_SIGNAL(scroller_pressed()), TQT_SLOT(slotUpdateLock())); + connect(m_verseScroller, TQT_SIGNAL(scroller_released()), TQT_SLOT(slotUpdateUnlock())); } void CKeyReferenceWidget::setModule(CSwordBibleModuleInfo *m) { diff --git a/bibletime/frontend/keychooser/ckeyreferencewidget.h b/bibletime/frontend/keychooser/ckeyreferencewidget.h index bcb6bb9..0025945 100644 --- a/bibletime/frontend/keychooser/ckeyreferencewidget.h +++ b/bibletime/frontend/keychooser/ckeyreferencewidget.h @@ -15,8 +15,8 @@ #include "cscrollerwidgetset.h" #include "backend/cswordbiblemoduleinfo.h" -#include <qwidget.h> -#include <qlayout.h> +#include <tqwidget.h> +#include <tqlayout.h> #include <klineedit.h> #include <kcompletion.h> @@ -28,8 +28,8 @@ class CKeyReferenceCompletion : public KCompletion { Q_OBJECT public: CKeyReferenceCompletion(CSwordBibleModuleInfo*); - QString makeCompletion(const QString &); - QStringList allMatches(); + TQString makeCompletion(const TQString &); + TQStringList allMatches(); private: CSwordVerseKey *m_key; CSwordBibleModuleInfo *m_module; @@ -38,17 +38,17 @@ private: class CKeyReferenceLineEdit : public KLineEdit { Q_OBJECT public: - CKeyReferenceLineEdit(QWidget *parent=0, const char *name=0); - void makeCompletion(const QString &); + CKeyReferenceLineEdit(TQWidget *parent=0, const char *name=0); + void makeCompletion(const TQString &); }; -class CKeyReferenceWidget : public QWidget { +class CKeyReferenceWidget : public TQWidget { Q_OBJECT public: /** * the constructor */ - CKeyReferenceWidget(CSwordBibleModuleInfo *, CSwordVerseKey*, QWidget *parent=0, const char *name=0); + CKeyReferenceWidget(CSwordBibleModuleInfo *, CSwordVerseKey*, TQWidget *parent=0, const char *name=0); bool setKey(CSwordVerseKey* key); KLineEdit* textbox(); void setModule(CSwordBibleModuleInfo *m = 0); @@ -75,14 +75,14 @@ protected slots: // Protected slots private: friend class CLexiconKeyChooser; - QHBoxLayout *m_mainLayout; + TQHBoxLayout *m_mainLayout; CKeyReferenceLineEdit *m_textbox; CSwordVerseKey *m_key; CScrollerWidgetSet *m_bookScroller; CScrollerWidgetSet *m_chapterScroller; CScrollerWidgetSet *m_verseScroller; bool updatelock; - QString oldKey; + TQString oldKey; CSwordBibleModuleInfo *m_module; }; diff --git a/bibletime/frontend/keychooser/clexiconkeychooser.cpp b/bibletime/frontend/keychooser/clexiconkeychooser.cpp index ff55602..2a507ac 100644 --- a/bibletime/frontend/keychooser/clexiconkeychooser.cpp +++ b/bibletime/frontend/keychooser/clexiconkeychooser.cpp @@ -24,22 +24,22 @@ #include <map> //Qt includes -#include <qcombobox.h> -#include <qlayout.h> -#include <qlistbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqlistbox.h> //KDE includes #include <klocale.h> -CLexiconKeyChooser::CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, QWidget *parent, const char *name ) +CLexiconKeyChooser::CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key, TQWidget *parent, const char *name ) : CKeyChooser(modules, key, parent, name), m_key(dynamic_cast<CSwordLDKey*>(key)) { setModules(modules, false); //we use a layout because the key chooser should be resized to full size - m_layout = new QHBoxLayout(this, QBoxLayout::LeftToRight); - m_layout->setResizeMode(QLayout::FreeResize); + m_layout = new TQHBoxLayout(this, TQBoxLayout::LeftToRight); + m_layout->setResizeMode(TQLayout::FreeResize); m_widget = new CKeyChooserWidget(0, false, this); @@ -56,8 +56,8 @@ m_key(dynamic_cast<CSwordLDKey*>(key)) { m_layout->addWidget(m_widget,0,Qt::AlignLeft); - connect(m_widget,SIGNAL(changed(int)),SLOT(activated(int))); - connect(m_widget,SIGNAL(focusOut(int)),SLOT(activated(int))); + connect(m_widget,TQT_SIGNAL(changed(int)),TQT_SLOT(activated(int))); + connect(m_widget,TQT_SIGNAL(focusOut(int)),TQT_SLOT(activated(int))); setModules(modules, true); setKey(key); @@ -74,7 +74,7 @@ void CLexiconKeyChooser::setKey(CSwordKey* key) { } // qWarning("setKey start"); - QString newKey = m_key->key(); + TQString newKey = m_key->key(); const int index = m_widget->comboBox()->listBox()->index(m_widget->comboBox()->listBox()->findItem( newKey )); m_widget->comboBox()->setCurrentItem(index); @@ -84,7 +84,7 @@ void CLexiconKeyChooser::setKey(CSwordKey* key) { void CLexiconKeyChooser::activated(int index) { // qWarning("activated"); - const QString text = m_widget->comboBox()->text(index); + const TQString text = m_widget->comboBox()->text(index); // To prevent from eternal loop, because activated() is emitted again if (m_key && m_key->key() != text) { @@ -94,7 +94,7 @@ void CLexiconKeyChooser::activated(int index) { // qWarning("activated end"); } -inline const bool my_cmpEntries(const QString& a, const QString& b) { +inline const bool my_cmpEntries(const TQString& a, const TQString& b) { return a < b; }; @@ -105,19 +105,19 @@ void CLexiconKeyChooser::refreshContent() { // qWarning("resetted"); } else { - typedef std::multimap<unsigned int, QStringList*> EntryMap; + typedef std::multimap<unsigned int, TQStringList*> EntryMap; EntryMap entryMap; - QStringList* entries = 0; + TQStringList* entries = 0; for (m_modules.first(); m_modules.current(); m_modules.next()) { entries = m_modules.current()->entries(); entryMap.insert( std::make_pair(entries->count(), entries) ); } - QStringList goodEntries; //The string list which contains the entries which are available in all modules + TQStringList goodEntries; //The string list which contains the entries which are available in all modules EntryMap::iterator it = entryMap.begin(); //iterator to go thoigh all selected modules - QStringList refEntries = *(it->second); //copy the items for the first time - QStringList* cmpEntries = ( ++it )->second; //list for comparision, starts with the second module in the map + TQStringList refEntries = *(it->second); //copy the items for the first time + TQStringList* cmpEntries = ( ++it )->second; //list for comparision, starts with the second module in the map while(it != entryMap.end()) { std::set_intersection( diff --git a/bibletime/frontend/keychooser/clexiconkeychooser.h b/bibletime/frontend/keychooser/clexiconkeychooser.h index 10283eb..d28adc9 100644 --- a/bibletime/frontend/keychooser/clexiconkeychooser.h +++ b/bibletime/frontend/keychooser/clexiconkeychooser.h @@ -12,14 +12,14 @@ #ifndef CLEXICONKEYCHOOSER_H #define CLEXICONKEYCHOOSER_H -#include <qwidget.h> +#include <tqwidget.h> #include "ckeychooser.h" #include "backend/cswordldkey.h" #include "backend/cswordmoduleinfo.h" #include "backend/cswordlexiconmoduleinfo.h" class CKeyChooserWidget; -class QHBoxLayout; +class TQHBoxLayout; /** * This class implements the KeyChooser for lexicons @@ -37,7 +37,7 @@ public: * * you should not need to use this, use @ref CKeyChooser::createInstance instead */ - CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, QWidget *parent=0, const char *name=0); + CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, TQWidget *parent=0, const char *name=0); public slots: /** @@ -67,8 +67,8 @@ public slots: protected: CKeyChooserWidget *m_widget; CSwordLDKey* m_key; - QPtrList<CSwordLexiconModuleInfo> m_modules; - QHBoxLayout *m_layout; + TQPtrList<CSwordLexiconModuleInfo> m_modules; + TQHBoxLayout *m_layout; virtual void adjustFont(); diff --git a/bibletime/frontend/keychooser/crefselectdialog.cpp b/bibletime/frontend/keychooser/crefselectdialog.cpp index e0c0552..fd82470 100644 --- a/bibletime/frontend/keychooser/crefselectdialog.cpp +++ b/bibletime/frontend/keychooser/crefselectdialog.cpp @@ -12,9 +12,9 @@ #include "crefselectdialog.h" // QT -#include "qlayout.h" -#include "qlineedit.h" -#include "qlabel.h" +#include "tqlayout.h" +#include "tqlineedit.h" +#include "tqlabel.h" // backend #include "backend/cswordkey.h" @@ -24,21 +24,21 @@ #include <klocale.h> -//CRefSelectDialog::CRefSelectDialog(QWidget *parent) +//CRefSelectDialog::CRefSelectDialog(TQWidget *parent) // : KDialogBase(parent, "Refenences", // true, i18n("Refenence selector"), // KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true), // m_oldPos(0,0) // //{ -// m_page = new QWidget( this ); -// m_placeholder = new QWidget( m_page); -// QVBoxLayout* layout = new QVBoxLayout( m_page, 0, spacingHint()); -// m_lineedit = new QLineEdit( QString::null, m_page, "select" ); +// 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" ); // m_lineedit->setMinimumWidth(fontMetrics().maxWidth()*8); // -// QHBoxLayout* hlayout = new QHBoxLayout(m_page, 0, spacingHint()); -// hlayout->addWidget(new QLabel(i18n("Verse key:"), m_page)); +// 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); @@ -47,8 +47,8 @@ // m_oldParent = NULL; // setMainWidget(m_page); // -// connect(this, SIGNAL(okClicked()), SLOT(slotPressedOk())); -// connect(this, SIGNAL(cancelClicked()), SLOT(slotPressedCancel())); +// connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(slotPressedOk())); +// connect(this, TQT_SIGNAL(cancelClicked()), TQT_SLOT(slotPressedCancel())); //} // //CRefSelectDialog::~CRefSelectDialog() { @@ -67,7 +67,7 @@ // // // we temporary borrow chooser widget from the MDI window // m_placeholder->setMinimumSize(chooser->size()); -// chooser->reparent(m_placeholder, QPoint(0,0), true); +// chooser->reparent(m_placeholder, TQPoint(0,0), true); // } //} // diff --git a/bibletime/frontend/keychooser/crefselectdialog.h b/bibletime/frontend/keychooser/crefselectdialog.h index 3d78ffe..fc2430a 100644 --- a/bibletime/frontend/keychooser/crefselectdialog.h +++ b/bibletime/frontend/keychooser/crefselectdialog.h @@ -12,9 +12,9 @@ #ifndef CREFSELECTDIALOG_H #define CREFSELECTDIALOG_H //Qt includes -#include <qwidget.h> -#include <qstring.h> -class QLineEdit; +#include <tqwidget.h> +#include <tqstring.h> +class TQLineEdit; //KDE includes #include <kdialog.h> @@ -27,7 +27,7 @@ class QLineEdit; //class CRefSelectDialog : public KDialogBase { // Q_OBJECT // public: -// CRefSelectDialog(QWidget *parent); +// CRefSelectDialog(TQWidget *parent); // virtual ~CRefSelectDialog(); // // void setChooser(CKeyChooser* const chooser); @@ -41,12 +41,12 @@ class QLineEdit; // void restoreParent(); // // private: -// QWidget* m_page; -// QWidget* m_placeholder; -// QWidget* m_oldParent; +// TQWidget* m_page; +// TQWidget* m_placeholder; +// TQWidget* m_oldParent; // CKeyChooser* m_chooser; -// QLineEdit* m_lineedit; -// QPoint m_oldPos; +// TQLineEdit* m_lineedit; +// TQPoint m_oldPos; //}; #endif diff --git a/bibletime/frontend/keychooser/cscrollbutton.cpp b/bibletime/frontend/keychooser/cscrollbutton.cpp index c9952cc..65f7a04 100644 --- a/bibletime/frontend/keychooser/cscrollbutton.cpp +++ b/bibletime/frontend/keychooser/cscrollbutton.cpp @@ -17,17 +17,17 @@ #include <math.h> //Qt includes -#include <qevent.h> -#include <qapplication.h> -#include <qcursor.h> +#include <tqevent.h> +#include <tqapplication.h> +#include <tqcursor.h> -CScrollButton::CScrollButton(QWidget *parent, const char *name ) : QToolButton(parent,name) { - setFocusPolicy(QWidget::WheelFocus); +CScrollButton::CScrollButton(TQWidget *parent, const char *name ) : TQToolButton(parent,name) { + setFocusPolicy(TQWidget::WheelFocus); setCursor( splitVCursor ); m_isLocked = false; - connect(this, SIGNAL(pressed() ), SLOT(was_pressed() )); - connect(this, SIGNAL(released()), SLOT(was_released())); + connect(this, TQT_SIGNAL(pressed() ), TQT_SLOT(was_pressed() )); + connect(this, TQT_SIGNAL(released()), TQT_SLOT(was_released())); } const bool CScrollButton::isLocked( ) const { @@ -35,7 +35,7 @@ const bool CScrollButton::isLocked( ) const { } void CScrollButton::was_pressed( ) { - QApplication::setOverrideCursor( BlankCursor ); + TQApplication::setOverrideCursor( BlankCursor ); m_isLocked = true; lock_Point = get_lock_Point(); @@ -44,19 +44,19 @@ void CScrollButton::was_pressed( ) { } void CScrollButton::was_released( ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_isLocked = false; emit unlock(); } -const QPoint CScrollButton::get_lock_Point() const { - return mapToGlobal( QPoint( width()/2, height()/2 ) ); +const TQPoint CScrollButton::get_lock_Point() const { + return mapToGlobal( TQPoint( width()/2, height()/2 ) ); } -void CScrollButton::mouseMoveEvent( QMouseEvent* e ) { +void CScrollButton::mouseMoveEvent( TQMouseEvent* e ) { if (m_isLocked) { - int vchange = (QCursor::pos().y() - lock_Point.y()); + int vchange = (TQCursor::pos().y() - lock_Point.y()); if (abs(vchange) < 10) { vchange = (int)((vchange>0 ? 1 : -1) * pow(abs(vchange), 0.3)); @@ -75,17 +75,17 @@ void CScrollButton::mouseMoveEvent( QMouseEvent* e ) { emit change_requested( vchange ); } - QCursor::setPos( lock_Point ); + TQCursor::setPos( lock_Point ); } else { - QToolButton::mouseMoveEvent(e); + TQToolButton::mouseMoveEvent(e); } } /** If the wheel of the mouse is used while the mouse stays over our scrollbutton the content is scrolled like the mouse was pressed and moved. */ -void CScrollButton::wheelEvent( QWheelEvent* e ) { +void CScrollButton::wheelEvent( TQWheelEvent* e ) { /** * The problem is, that wheel events do everytime have the delta value 120 */ diff --git a/bibletime/frontend/keychooser/cscrollbutton.h b/bibletime/frontend/keychooser/cscrollbutton.h index bd6e900..daf02fc 100644 --- a/bibletime/frontend/keychooser/cscrollbutton.h +++ b/bibletime/frontend/keychooser/cscrollbutton.h @@ -12,21 +12,21 @@ #ifndef CSRCOLLBUTTON_H #define CSRCOLLBUTTON_H -#include <qwidget.h> -#include <qtoolbutton.h> +#include <tqwidget.h> +#include <tqtoolbutton.h> -class QMouseEvent; +class TQMouseEvent; /** This Class implements the direct chooser button used in the KeyChooser Widget * @author The BibleTime team */ -class CScrollButton : public QToolButton { +class CScrollButton : public TQToolButton { Q_OBJECT public: /** * The constructor */ - CScrollButton(QWidget *parent=0, const char *name=0); + CScrollButton(TQWidget *parent=0, const char *name=0); const bool isLocked() const; signals: @@ -60,17 +60,17 @@ protected: * Reimplementation from @ref QWidget#mouseMoveEvent - processes * the mouse move events */ - virtual void mouseMoveEvent( QMouseEvent* e ); + virtual void mouseMoveEvent( TQMouseEvent* e ); /** * used to find the lock point - the middle of the button * @return the lock point */ - const QPoint get_lock_Point() const; + const TQPoint get_lock_Point() const; /** * If the wheel of the mouse is used while the mouse stays over our scrollbutton the content is * scrolled like the mouse was pressed and moved. */ - virtual void wheelEvent( QWheelEvent* e ); + virtual void wheelEvent( TQWheelEvent* e ); private: /** @@ -80,7 +80,7 @@ private: /** * stores the lock point */ - QPoint lock_Point; + TQPoint lock_Point; }; #endif diff --git a/bibletime/frontend/keychooser/cscrollerwidgetset.cpp b/bibletime/frontend/keychooser/cscrollerwidgetset.cpp index dd4201b..bbb5b48 100644 --- a/bibletime/frontend/keychooser/cscrollerwidgetset.cpp +++ b/bibletime/frontend/keychooser/cscrollerwidgetset.cpp @@ -16,59 +16,59 @@ #include "frontend/cbtconfig.h" //Qt includes -#include <qlineedit.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qlistbox.h> -#include <qtoolbutton.h> -#include <qevent.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qpixmap.h> -#include <qapplication.h> -#include <qtooltip.h> -#include <qrect.h> -#include <qlayout.h> +#include <tqlineedit.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqlistbox.h> +#include <tqtoolbutton.h> +#include <tqevent.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqpixmap.h> +#include <tqapplication.h> +#include <tqtooltip.h> +#include <tqrect.h> +#include <tqlayout.h> const unsigned int WIDTH = 16; const unsigned int ARROW_HEIGHT = 12; const unsigned int MOVER_HEIGHT = 6; -CScrollerWidgetSet::CScrollerWidgetSet(QWidget *parent, const char *name) : QWidget(parent,name) { - m_layout = new QVBoxLayout(this); +CScrollerWidgetSet::CScrollerWidgetSet(TQWidget *parent, const char *name) : TQWidget(parent,name) { + m_layout = new TQVBoxLayout(this); m_layout->setAlignment(Qt::AlignHCenter | Qt::AlignCenter); //setAlignment(Qt::AlignHCenter | Qt::AlignCenter); - btn_up = new QToolButton( UpArrow, this, "btn_up" ); + btn_up = new TQToolButton( UpArrow, this, "btn_up" ); btn_up->setFixedSize(WIDTH, ARROW_HEIGHT); - btn_up->setFocusPolicy(QWidget::NoFocus); + btn_up->setFocusPolicy(TQWidget::NoFocus); btn_fx = new CScrollButton( this, "btn_fx" ); btn_fx->setFixedSize(WIDTH, MOVER_HEIGHT); - btn_fx->setFocusPolicy(QWidget::NoFocus); + btn_fx->setFocusPolicy(TQWidget::NoFocus); - btn_down = new QToolButton( DownArrow, this, "btn_down" ); + btn_down = new TQToolButton( DownArrow, this, "btn_down" ); btn_down->setFixedSize(WIDTH, ARROW_HEIGHT); - btn_down->setFocusPolicy(QWidget::NoFocus); + btn_down->setFocusPolicy(TQWidget::NoFocus); m_layout->addWidget( btn_up,0 ); m_layout->addWidget( btn_fx,0 ); m_layout->addWidget( btn_down,0 ); setMinimumWidth(WIDTH+4); // Kludge to add some spacing but seems to work. - connect(btn_fx, SIGNAL(lock()), SLOT(slotLock())); - connect(btn_fx, SIGNAL(unlock()), SLOT(slotUnlock())); - connect(btn_fx, SIGNAL(change_requested(int)), SLOT(slotScroller(int))); - connect(btn_up, SIGNAL(clicked()), SLOT(slotUpClick())); - connect(btn_down, SIGNAL(clicked()), SLOT(slotDownClick())); + connect(btn_fx, TQT_SIGNAL(lock()), TQT_SLOT(slotLock())); + connect(btn_fx, TQT_SIGNAL(unlock()), TQT_SLOT(slotUnlock())); + connect(btn_fx, TQT_SIGNAL(change_requested(int)), TQT_SLOT(slotScroller(int))); + connect(btn_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotUpClick())); + connect(btn_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotDownClick())); } /** Sets the tooltips for the given entries using the parameters as text. */ -void CScrollerWidgetSet::setToolTips( const QString nextEntryTip, const QString scrollButtonTip, const QString previousEntryTip) { - QToolTip::add (btn_fx, scrollButtonTip); - QToolTip::add (btn_down, nextEntryTip); - QToolTip::add (btn_up, previousEntryTip); +void CScrollerWidgetSet::setToolTips( const TQString nextEntryTip, const TQString scrollButtonTip, const TQString previousEntryTip) { + TQToolTip::add (btn_fx, scrollButtonTip); + TQToolTip::add (btn_down, nextEntryTip); + TQToolTip::add (btn_up, previousEntryTip); } void CScrollerWidgetSet::slotLock() { emit scroller_pressed(); } diff --git a/bibletime/frontend/keychooser/cscrollerwidgetset.h b/bibletime/frontend/keychooser/cscrollerwidgetset.h index dd3e6d8..5435e5f 100644 --- a/bibletime/frontend/keychooser/cscrollerwidgetset.h +++ b/bibletime/frontend/keychooser/cscrollerwidgetset.h @@ -12,32 +12,32 @@ #ifndef CSCROLLERWIDGETSET_H #define CSCROLLERWIDGETSET_H -#include <qwidget.h> -#include <qmap.h> -#include <qstringlist.h> -#include <qlayout.h> -#include <qlayout.h> +#include <tqwidget.h> +#include <tqmap.h> +#include <tqstringlist.h> +#include <tqlayout.h> +#include <tqlayout.h> #include <kcombobox.h> #include "cscrollbutton.h" /** * This class implements the Scroller Widget-set, which - * consists of two normal ref @QToolButton and a enhanced @ref CScrollButton + * consists of two normal ref @TQToolButton and a enhanced @ref CScrollButton * * @author The BibleTime team */ -class CScrollerWidgetSet : public QWidget { +class CScrollerWidgetSet : public TQWidget { Q_OBJECT public: /** * the constructor */ - CScrollerWidgetSet(QWidget *parent=0, const char *name=0); + CScrollerWidgetSet(TQWidget *parent=0, const char *name=0); /** * Sets the tooltips for the given entries using the parameters as text. */ - void setToolTips( const QString nextEntry, const QString scrollButton, const QString previousEntry); + void setToolTips( const TQString nextEntry, const TQString scrollButton, const TQString previousEntry); signals: /** @@ -53,8 +53,8 @@ signals: void scroller_released(); protected: - QToolButton* btn_up; - QToolButton* btn_down; + TQToolButton* btn_up; + TQToolButton* btn_down; CScrollButton* btn_fx; protected slots: @@ -65,7 +65,7 @@ protected slots: void slotScroller(int); private: - QVBoxLayout *m_layout; + TQVBoxLayout *m_layout; }; |