diff options
Diffstat (limited to 'tdeui/tdecompletionbox.cpp')
| -rw-r--r-- | tdeui/tdecompletionbox.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tdeui/tdecompletionbox.cpp b/tdeui/tdecompletionbox.cpp index a8a2bd237..9ff9b95e5 100644 --- a/tdeui/tdecompletionbox.cpp +++ b/tdeui/tdecompletionbox.cpp @@ -61,19 +61,19 @@ TDECompletionBox::TDECompletionBox( TQWidget *parent, const char *name ) if ( parent ) setFocusProxy( parent ); else - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); setVScrollBarMode( Auto ); setHScrollBarMode( AlwaysOff ); - connect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem * )), - TQT_SLOT( slotActivated( TQListBoxItem * )) ); + connect( this, TQ_SIGNAL( doubleClicked( TQListBoxItem * )), + TQ_SLOT( slotActivated( TQListBoxItem * )) ); // grmbl, just TQListBox workarounds :[ Thanks Volker. - connect( this, TQT_SIGNAL( currentChanged( TQListBoxItem * )), - TQT_SLOT( slotCurrentChanged() )); - connect( this, TQT_SIGNAL( clicked( TQListBoxItem * )), - TQT_SLOT( slotItemClicked( TQListBoxItem * )) ); + connect( this, TQ_SIGNAL( currentChanged( TQListBoxItem * )), + TQ_SLOT( slotCurrentChanged() )); + connect( this, TQ_SIGNAL( clicked( TQListBoxItem * )), + TQ_SLOT( slotItemClicked( TQListBoxItem * )) ); } TDECompletionBox::~TDECompletionBox() @@ -109,13 +109,13 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) { int type = e->type(); - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->m_parent) ) { + if ( o == d->m_parent ) { if ( isVisible() ) { if ( type == TQEvent::KeyPress ) { - TQKeyEvent *ev = TQT_TQKEYEVENT( e ); + TQKeyEvent *ev = static_cast<TQKeyEvent*>( e ); switch ( ev->key() ) { case Key_BackTab: - if ( d->tabHandling && (ev->state() == Qt::NoButton || + if ( d->tabHandling && (ev->state() == TQt::NoButton || (ev->state() & ShiftButton)) ) { up(); ev->accept(); @@ -123,7 +123,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) } break; case Key_Tab: - if ( d->tabHandling && (ev->state() == Qt::NoButton) ) { + if ( d->tabHandling && (ev->state() == TQt::NoButton) ) { down(); // Only on TAB!! ev->accept(); return true; @@ -185,7 +185,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) else if ( type == TQEvent::AccelOverride ) { // Override any acceleartors that match // the key sequences we use here... - TQKeyEvent *ev = TQT_TQKEYEVENT( e ); + TQKeyEvent *ev = static_cast<TQKeyEvent*>( e ); switch ( ev->key() ) { case Key_Down: case Key_Up: @@ -199,7 +199,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) break; case Key_Tab: case Key_BackTab: - if ( ev->state() == Qt::NoButton || + if ( ev->state() == TQt::NoButton || (ev->state() & ShiftButton)) { ev->accept(); @@ -230,11 +230,11 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) // any mouse-click on something else than "this" makes us hide else if ( type == TQEvent::MouseButtonPress ) { - TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); + TQMouseEvent *ev = static_cast<TQMouseEvent*>( e ); if ( !rect().contains( ev->pos() )) // this widget hide(); - if ( !d->emitSelected && currentItem() && !::tqqt_cast<TQScrollBar*>(o) ) + if ( !d->emitSelected && currentItem() && !::tqt_cast<TQScrollBar*>(o) ) { emit highlighted( currentText() ); hide(); @@ -343,9 +343,9 @@ TQRect TDECompletionBox::calculateGeometry() const // to adjust it. Do that here as well, for consistency const TQObject* combo; if ( d->m_parent && (combo = d->m_parent->parent() ) && - combo->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) ) + combo->inherits("TQComboBox") ) { - const TQComboBox* cb = static_cast<const TQComboBox*>(TQT_TQWIDGET_CONST(combo)); + const TQComboBox* cb = static_cast<const TQComboBox*>(combo); //Expand to the combo width w = TQMAX( w, cb->width() ); |
