summaryrefslogtreecommitdiffstats
path: root/bibletime/frontend/keychooser/ckeychooserwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bibletime/frontend/keychooser/ckeychooserwidget.cpp')
-rw-r--r--bibletime/frontend/keychooser/ckeychooserwidget.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/bibletime/frontend/keychooser/ckeychooserwidget.cpp b/bibletime/frontend/keychooser/ckeychooserwidget.cpp
index d068545..1fb828b 100644
--- a/bibletime/frontend/keychooser/ckeychooserwidget.cpp
+++ b/bibletime/frontend/keychooser/ckeychooserwidget.cpp
@@ -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);