diff options
Diffstat (limited to 'tdeui/tdetoolbarbutton.cpp')
| -rw-r--r-- | tdeui/tdetoolbarbutton.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/tdeui/tdetoolbarbutton.cpp b/tdeui/tdetoolbarbutton.cpp index 791b47db1..1c3f550db 100644 --- a/tdeui/tdetoolbarbutton.cpp +++ b/tdeui/tdetoolbarbutton.cpp @@ -123,21 +123,21 @@ TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id, TQToolButton::setTextLabel(_txt); d->m_instance = _instance; - d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_parent); + d->m_parent = dynamic_cast<TDEToolBar*>(_parent); if (d->m_parent) { - connect(d->m_parent, TQT_SIGNAL( modechange() ), - this, TQT_SLOT( modeChange() )); + connect(d->m_parent, TQ_SIGNAL( modechange() ), + this, TQ_SLOT( modeChange() )); } - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); // connect all of our slots and start trapping events - connect(this, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( slotClicked() ) ); - connect(this, TQT_SIGNAL( pressed() ), - this, TQT_SLOT( slotPressed() ) ); - connect(this, TQT_SIGNAL( released() ), - this, TQT_SLOT( slotReleased() ) ); + connect(this, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( slotClicked() ) ); + connect(this, TQ_SIGNAL( pressed() ), + this, TQ_SLOT( slotPressed() ) ); + connect(this, TQ_SIGNAL( released() ), + this, TQ_SLOT( slotReleased() ) ); installEventFilter(this); d->m_iconName = _icon; @@ -156,21 +156,21 @@ TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id, d->m_id = _id; TQToolButton::setTextLabel(txt); - d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_parent); + d->m_parent = dynamic_cast<TDEToolBar*>(_parent); if (d->m_parent) { - connect(d->m_parent, TQT_SIGNAL( modechange() ), - this, TQT_SLOT( modeChange() )); + connect(d->m_parent, TQ_SIGNAL( modechange() ), + this, TQ_SLOT( modeChange() )); } - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); // connect all of our slots and start trapping events - connect(this, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( slotClicked() )); - connect(this, TQT_SIGNAL( pressed() ), - this, TQT_SLOT( slotPressed() )); - connect(this, TQT_SIGNAL( released() ), - this, TQT_SLOT( slotReleased() )); + connect(this, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( slotClicked() )); + connect(this, TQ_SIGNAL( pressed() ), + this, TQ_SLOT( slotPressed() )); + connect(this, TQ_SIGNAL( released() ), + this, TQ_SLOT( slotReleased() )); installEventFilter(this); // set our pixmap and do our initial setup @@ -251,7 +251,7 @@ void TDEToolBarButton::modeChange() break; } - mysize = style().tqsizeFromContents(TQStyle::CT_ToolButton, this, mysize). + mysize = style().sizeFromContents(TQStyle::CT_ToolButton, this, mysize). expandedTo(TQApplication::globalStrut()); // make sure that this isn't taller then it is wide @@ -410,7 +410,7 @@ void TDEToolBarButton::enterEvent(TQEvent *) bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) + if (o == this) { // Popup the menu when the left mousebutton is pressed and the mouse @@ -419,12 +419,12 @@ bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { if (ev->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); + TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev); d->m_mousePressPos = mev->pos(); } else if (ev->type() == TQEvent::MouseMove) { - TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); + TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev); if ((mev->pos() - d->m_mousePressPos).manhattanLength() > TDEGlobalSettings::dndEventDelay()) { @@ -455,10 +455,10 @@ void TDEToolBarButton::mousePressEvent( TQMouseEvent * e ) { d->m_buttonDown = true; - if ( e->button() == Qt::MidButton ) + if ( e->button() == TQt::MidButton ) { // Get TQToolButton to show the button being down while pressed - TQMouseEvent ev( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), Qt::LeftButton, e->state() ); + TQMouseEvent ev( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), TQt::LeftButton, e->state() ); TQToolButton::mousePressEvent(&ev); return; } @@ -468,9 +468,9 @@ void TDEToolBarButton::mousePressEvent( TQMouseEvent * e ) void TDEToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) { TQt::ButtonState state = TQt::ButtonState(e->button() | (e->state() & KeyButtonMask)); - if ( e->button() == Qt::MidButton ) + if ( e->button() == TQt::MidButton ) { - TQMouseEvent ev( TQEvent::MouseButtonRelease, e->pos(), e->globalPos(), Qt::LeftButton, e->state() ); + TQMouseEvent ev( TQEvent::MouseButtonRelease, e->pos(), e->globalPos(), TQt::LeftButton, e->state() ); TQToolButton::mouseReleaseEvent(&ev); } else @@ -628,7 +628,7 @@ void TDEToolBarButton::drawButton( TQPainter *_painter ) if (isDown()) arrowFlags |= TQStyle::Style_Down; if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; - style().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter, + style().drawPrimitive(TQStyle::PE_ArrowDown, _painter, TQRect(width()-7, height()-7, 7, 7), colorGroup(), arrowFlags, TQStyleOption() ); } @@ -676,8 +676,8 @@ void TDEToolBarButton::slotClicked() // emit buttonClicked when the button was clicked while being in an extension popupmenu if ( d->m_parent && !d->m_parent->rect().contains( geometry().center() ) ) { ButtonState state = TDEApplication::keyboardMouseState(); - if ( ( state & Qt::MouseButtonMask ) == Qt::NoButton ) - state = ButtonState( Qt::LeftButton | state ); + if ( ( state & TQt::MouseButtonMask ) == TQt::NoButton ) + state = ButtonState( TQt::LeftButton | state ); emit buttonClicked( d->m_id, state ); // Doesn't work with MidButton } } @@ -734,9 +734,9 @@ void TDEToolBarButton::setToggle(bool flag) { setToggleButton(flag); if (flag) - connect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); + connect(this, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotToggled())); else - disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); + disconnect(this, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotToggled())); } TQSize TDEToolBarButton::sizeHint() const |
