Replace 'Event' #define strings

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/246/head
Michele Calgaro 12 months ago
parent 7a00e005dd
commit f22a9c72dd
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -533,7 +533,7 @@ void KateArgHint::show()
bool KateArgHint::eventFilter( TQObject*, TQEvent* e ) bool KateArgHint::eventFilter( TQObject*, TQEvent* e )
{ {
if( isVisible() && e->type() == TQEvent::KeyPress ){ if( isVisible() && e->type() == TQEvent::KeyPress ){
TQKeyEvent* ke = TQT_TQKEYEVENT( e ); TQKeyEvent* ke = static_cast<TQKeyEvent*>( e );
if( (ke->state() & ControlButton) && ke->key() == Key_Left ){ if( (ke->state() & ControlButton) && ke->key() == Key_Left ){
setCurrentFunction( currentFunction() - 1 ); setCurrentFunction( currentFunction() - 1 );
ke->accept(); ke->accept();

@ -99,11 +99,11 @@ bool KCheckAccelerators::eventFilter( TQObject * , TQEvent * e)
switch ( e->type() ) { // just simplify debuggin switch ( e->type() ) { // just simplify debuggin
case TQEvent::Accel: case TQEvent::Accel:
if ( key && (TQT_TQKEYEVENT(e)->key() == key) ) { if ( key && (static_cast<TQKeyEvent*>(e)->key() == key) ) {
block = true; block = true;
checkAccelerators( false ); checkAccelerators( false );
block = false; block = false;
TQT_TQKEYEVENT(e)->accept(); static_cast<TQKeyEvent*>(e)->accept();
return true; return true;
} }
break; break;

@ -557,7 +557,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
// Indicate that the accelerator has been overridden. // Indicate that the accelerator has been overridden.
if (t == TQEvent::AccelOverride) if (t == TQEvent::AccelOverride)
{ {
TQT_TQKEYEVENT(event)->accept(); static_cast<TQKeyEvent*>(event)->accept();
return true; return true;
} }
else else
@ -571,7 +571,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
if (edit) if (edit)
{ {
// We have a keypress for a lineedit... // We have a keypress for a lineedit...
TQKeyEvent *kevent = TQT_TQKEYEVENT(event); TQKeyEvent *kevent = static_cast<TQKeyEvent*>(event);
KKey key(kevent); KKey key(kevent);
if (_selectAll.contains(key)) if (_selectAll.contains(key))
{ {
@ -609,7 +609,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
if (medit) if (medit)
{ {
// We have a keypress for a multilineedit... // We have a keypress for a multilineedit...
TQKeyEvent *kevent = TQT_TQKEYEVENT(event); TQKeyEvent *kevent = static_cast<TQKeyEvent*>(event);
if (_selectAll.contains(KKey(kevent))) if (_selectAll.contains(KKey(kevent)))
{ {
if (t == TQEvent::KeyPress) if (t == TQEvent::KeyPress)
@ -628,7 +628,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
{ {
TQWidget* w = TQT_TQWIDGET( receiver ); TQWidget* w = TQT_TQWIDGET( receiver );
#if defined Q_WS_X11 #if defined Q_WS_X11
if( w->isTopLevel() && !startupId().isEmpty() && !TQT_TQSHOWEVENT(event)->spontaneous()) // TODO better done using window group leader? if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<TQShowEvent*>(event)->spontaneous()) // TODO better done using window group leader?
TDEStartupInfo::setWindowStartupId( w->winId(), startupId()); TDEStartupInfo::setWindowStartupId( w->winId(), startupId());
#endif #endif
if( w->isTopLevel() && !w->testWFlags( WX11BypassWM ) && !w->isPopup() && !event->spontaneous()) if( w->isTopLevel() && !w->testWFlags( WX11BypassWM ) && !w->isPopup() && !event->spontaneous())

@ -890,7 +890,7 @@ bool ComboBoxWidget::event(TQEvent *e)
return true; return true;
if (e->type()==TQEvent::KeyPress) if (e->type()==TQEvent::KeyPress)
{ {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
switch(ke->key()) switch(ke->key())
{ {
case Key_Return: case Key_Return:
@ -909,7 +909,7 @@ bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e)
{ {
if (dest==listBox() && e->type()==TQEvent::KeyPress) if (dest==listBox() && e->type()==TQEvent::KeyPress)
{ {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
bool forward = false; bool forward = false;
switch(ke->key()) switch(ke->key())
{ {

@ -642,7 +642,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// Don't count popup as a valid reason for losing the focus // Don't count popup as a valid reason for losing the focus
// (example: opening the options of a select combobox shouldn't emit onblur) // (example: opening the options of a select combobox shouldn't emit onblur)
if ( TQT_TQFOCUSEVENT(e)->reason() != TQFocusEvent::Popup ) if ( static_cast<TQFocusEvent*>(e)->reason() != TQFocusEvent::Popup )
handleFocusOut(); handleFocusOut();
break; break;
case TQEvent::FocusIn: case TQEvent::FocusIn:
@ -663,7 +663,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
// TODO this seems wrong - Qt events are not correctly translated to DOM ones, // TODO this seems wrong - Qt events are not correctly translated to DOM ones,
// like in TDEHTMLView::dispatchKeyEvent() // like in TDEHTMLView::dispatchKeyEvent()
if (element()->dispatchKeyEvent(TQT_TQKEYEVENT(e),false)) if (element()->dispatchKeyEvent(static_cast<TQKeyEvent*>(e),false))
filtered = true; filtered = true;
break; break;
@ -674,7 +674,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// or something while wheeling a webpage. // or something while wheeling a webpage.
if (tqApp->focusWidget() != widget() && if (tqApp->focusWidget() != widget() &&
widget()->focusPolicy() <= TQWidget::StrongFocus) { widget()->focusPolicy() <= TQWidget::StrongFocus) {
TQT_TQWHEELEVENT(e)->ignore(); static_cast<TQWheelEvent*>(e)->ignore();
TQApplication::sendEvent(view(), e); TQApplication::sendEvent(view(), e);
filtered = true; filtered = true;
} }
@ -697,22 +697,22 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
void RenderWidget::EventPropagator::sendEvent(TQEvent *e) { void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) { switch(e->type()) {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
mousePressEvent(TQT_TQMOUSEEVENT(e)); mousePressEvent(static_cast<TQMouseEvent*>(e));
break; break;
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
mouseReleaseEvent(TQT_TQMOUSEEVENT(e)); mouseReleaseEvent(static_cast<TQMouseEvent*>(e));
break; break;
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e)); mouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));
break; break;
case TQEvent::MouseMove: case TQEvent::MouseMove:
mouseMoveEvent(TQT_TQMOUSEEVENT(e)); mouseMoveEvent(static_cast<TQMouseEvent*>(e));
break; break;
case TQEvent::KeyPress: case TQEvent::KeyPress:
keyPressEvent(TQT_TQKEYEVENT(e)); keyPressEvent(static_cast<TQKeyEvent*>(e));
break; break;
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
keyReleaseEvent(TQT_TQKEYEVENT(e)); keyReleaseEvent(static_cast<TQKeyEvent*>(e));
break; break;
default: default:
break; break;
@ -722,22 +722,22 @@ void RenderWidget::EventPropagator::sendEvent(TQEvent *e) {
void RenderWidget::ScrollViewEventPropagator::sendEvent(TQEvent *e) { void RenderWidget::ScrollViewEventPropagator::sendEvent(TQEvent *e) {
switch(e->type()) { switch(e->type()) {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
viewportMousePressEvent(TQT_TQMOUSEEVENT(e)); viewportMousePressEvent(static_cast<TQMouseEvent*>(e));
break; break;
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
viewportMouseReleaseEvent(TQT_TQMOUSEEVENT(e)); viewportMouseReleaseEvent(static_cast<TQMouseEvent*>(e));
break; break;
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
viewportMouseDoubleClickEvent(TQT_TQMOUSEEVENT(e)); viewportMouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));
break; break;
case TQEvent::MouseMove: case TQEvent::MouseMove:
viewportMouseMoveEvent(TQT_TQMOUSEEVENT(e)); viewportMouseMoveEvent(static_cast<TQMouseEvent*>(e));
break; break;
case TQEvent::KeyPress: case TQEvent::KeyPress:
keyPressEvent(TQT_TQKEYEVENT(e)); keyPressEvent(static_cast<TQKeyEvent*>(e));
break; break;
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
keyReleaseEvent(TQT_TQKEYEVENT(e)); keyReleaseEvent(static_cast<TQKeyEvent*>(e));
break; break;
default: default:
break; break;
@ -811,9 +811,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
TQMouseEvent e(type, p, button, state); TQMouseEvent e(type, p, button, state);
TQScrollView * sc = ::tqt_cast<TQScrollView*>(m_widget); TQScrollView * sc = ::tqt_cast<TQScrollView*>(m_widget);
if (sc && !::tqt_cast<TQListBox*>(m_widget)) if (sc && !::tqt_cast<TQListBox*>(m_widget))
static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(TQT_TQEVENT(&e)); static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(static_cast<TQEvent*>(&e));
else else
static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&e)); static_cast<EventPropagator *>(m_widget)->sendEvent(static_cast<TQEvent*>(&e));
ret = e.isAccepted(); ret = e.isAccepted();
break; break;
} }
@ -827,7 +827,7 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break; if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break;
TQKeyEvent* const ke = domKeyEv.qKeyEvent(); TQKeyEvent* const ke = domKeyEv.qKeyEvent();
static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(ke)); static_cast<EventPropagator *>(m_widget)->sendEvent(static_cast<TQEvent*>(ke));
ret = ke->isAccepted(); ret = ke->isAccepted();
break; break;
} }
@ -854,9 +854,9 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
if (ke->isAutoRepeat()) { if (ke->isAutoRepeat()) {
TQKeyEvent releaseEv( TQEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(), TQKeyEvent releaseEv( TQEvent::KeyRelease, ke->key(), ke->ascii(), ke->state(),
ke->text(), ke->isAutoRepeat(), ke->count() ); ke->text(), ke->isAutoRepeat(), ke->count() );
static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&releaseEv)); static_cast<EventPropagator *>(m_widget)->sendEvent(static_cast<TQEvent*>(&releaseEv));
} }
static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(ke)); static_cast<EventPropagator *>(m_widget)->sendEvent(static_cast<TQEvent*>(ke));
ret = ke->isAccepted(); ret = ke->isAccepted();
break; break;
} }

@ -1114,9 +1114,9 @@ static inline void forwardPeripheralEvent(tdehtml::RenderWidget* r, TQMouseEvent
TQWidget* w = r->widget(); TQWidget* w = r->widget();
TQScrollView* sc = ::tqt_cast<TQScrollView*>(w); TQScrollView* sc = ::tqt_cast<TQScrollView*>(w);
if (sc && !::tqt_cast<TQListBox*>(w)) if (sc && !::tqt_cast<TQListBox*>(w))
static_cast<tdehtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(TQT_TQEVENT(&fw)); static_cast<tdehtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(static_cast<TQEvent*>(&fw));
else if(w) else if(w)
static_cast<tdehtml::RenderWidget::EventPropagator*>(w)->sendEvent(TQT_TQEVENT(&fw)); static_cast<tdehtml::RenderWidget::EventPropagator*>(w)->sendEvent(static_cast<TQEvent*>(&fw));
} }
@ -1899,7 +1899,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
// we need to install an event filter on all children of the viewport to // we need to install an event filter on all children of the viewport to
// be able to get correct stacking of children within the document. // be able to get correct stacking of children within the document.
if(e->type() == TQEvent::ChildInserted) { if(e->type() == TQEvent::ChildInserted) {
TQObject *c = TQT_TQOBJECT(TQT_TQCHILDEVENT(e)->child()); TQObject *c = TQT_TQOBJECT(static_cast<TQChildEvent*>(e)->child());
if (c->isWidgetType()) { if (c->isWidgetType()) {
TQWidget *w = TQT_TQWIDGET(c); TQWidget *w = TQT_TQWIDGET(c);
// don't install the event filter on toplevels // don't install the event filter on toplevels
@ -1951,7 +1951,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
v = v->parentWidget(); v = v->parentWidget();
} }
viewportToContents( x, y, x, y ); viewportToContents( x, y, x, y );
TQPaintEvent *pe = TQT_TQPAINTEVENT(e); TQPaintEvent *pe = static_cast<TQPaintEvent*>(e);
bool asap = !d->contentsMoving && ::tqt_cast<TQScrollView *>(c); bool asap = !d->contentsMoving && ::tqt_cast<TQScrollView *>(c);
// TQScrollView needs fast repaints // TQScrollView needs fast repaints
@ -1970,7 +1970,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
case TQEvent::MouseButtonDblClick: { case TQEvent::MouseButtonDblClick: {
if ( (w->parentWidget() == view || ::tqt_cast<TQScrollView*>(c)) && !::tqt_cast<TQScrollBar *>(w)) { if ( (w->parentWidget() == view || ::tqt_cast<TQScrollView*>(c)) && !::tqt_cast<TQScrollBar *>(w)) {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
TQPoint pt = w->mapTo( view, me->pos()); TQPoint pt = w->mapTo( view, me->pos());
TQMouseEvent me2(me->type(), pt, me->button(), me->state()); TQMouseEvent me2(me->type(), pt, me->button(), me->state());
@ -1989,7 +1989,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::KeyPress: case TQEvent::KeyPress:
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
if (w->parentWidget() == view && !::tqt_cast<TQScrollBar *>(w)) { if (w->parentWidget() == view && !::tqt_cast<TQScrollBar *>(w)) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
if (e->type() == TQEvent::KeyPress) if (e->type() == TQEvent::KeyPress)
keyPressEvent(ke); keyPressEvent(ke);
else else

@ -279,7 +279,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
if (m_movingState==WaitingForMoveStart) { if (m_movingState==WaitingForMoveStart) {
TQPoint p( ((TQMouseEvent*)event)->pos() - m_startEvent->pos() ); TQPoint p( ((TQMouseEvent*)event)->pos() - m_startEvent->pos() );
if( p.manhattanLength() > TDEGlobalSettings::dndEventDelay()) { if( p.manhattanLength() > TDEGlobalSettings::dndEventDelay()) {
m_dockManager->eventFilter(m_dragPanel,TQT_TQEVENT(m_startEvent)); m_dockManager->eventFilter(m_dragPanel,static_cast<TQEvent*>(m_startEvent));
m_dockManager->eventFilter(m_dragPanel,event); m_dockManager->eventFilter(m_dragPanel,event);
m_movingState=Moving; m_movingState=Moving;
} }

@ -303,7 +303,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
TQPoint p( ( ( TQMouseEvent* ) event )->pos() - m_startEvent->pos() ); TQPoint p( ( ( TQMouseEvent* ) event )->pos() - m_startEvent->pos() );
if ( p.manhattanLength() > TDEGlobalSettings::dndEventDelay() ) if ( p.manhattanLength() > TDEGlobalSettings::dndEventDelay() )
{ {
m_dockManager->eventFilter( m_dragPanel, TQT_TQEVENT(m_startEvent) ); m_dockManager->eventFilter( m_dragPanel, static_cast<TQEvent*>(m_startEvent) );
m_dockManager->eventFilter( m_dragPanel, event ); m_dockManager->eventFilter( m_dragPanel, event );
m_movingState = Moving; m_movingState = Moving;
} }

@ -55,7 +55,7 @@ public:
switch( ev->type() ) { switch( ev->type() ) {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
case TQEvent::MouseButtonDblClick: { case TQEvent::MouseButtonDblClick: {
TQMouseEvent* mev = TQT_TQMOUSEEVENT( ev ); TQMouseEvent* mev = static_cast<TQMouseEvent*>( ev );
m_reason = mev->button() == TQt::LeftButton m_reason = mev->button() == TQt::LeftButton
? PartManager::ReasonLeftClick ? PartManager::ReasonLeftClick
: ( mev->button() == TQt::MidButton : ( mev->button() == TQt::MidButton
@ -64,7 +64,7 @@ public:
break; break;
} }
case TQEvent::FocusIn: case TQEvent::FocusIn:
m_reason = TQT_TQFOCUSEVENT( ev )->reason(); m_reason = static_cast<TQFocusEvent*>( ev )->reason();
break; break;
default: default:
kdWarning(1000) << "PartManagerPrivate::setReason got unexpected ev type " << ev->type() << endl; kdWarning(1000) << "PartManagerPrivate::setReason got unexpected ev type " << ev->type() << endl;
@ -192,7 +192,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev )
TQMouseEvent* mev = 0L; TQMouseEvent* mev = 0L;
if ( ev->type() == TQEvent::MouseButtonPress || ev->type() == TQEvent::MouseButtonDblClick ) if ( ev->type() == TQEvent::MouseButtonPress || ev->type() == TQEvent::MouseButtonDblClick )
{ {
mev = TQT_TQMOUSEEVENT( ev ); mev = static_cast<TQMouseEvent*>( ev );
#ifdef DEBUG_PARTMANAGER #ifdef DEBUG_PARTMANAGER
kdDebug(1000) << "PartManager::eventFilter button: " << mev->button() << " " << "d->m_activationButtonMask=" << d->m_activationButtonMask << endl; kdDebug(1000) << "PartManager::eventFilter button: " << mev->button() << " " << "d->m_activationButtonMask=" << d->m_activationButtonMask << endl;
#endif #endif

@ -2808,7 +2808,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
return false; return false;
recursion = true; recursion = true;
object->event( TQT_TQPAINTEVENT( event ) ); object->event( static_cast<TQPaintEvent*>( event ) );
TQWidget* widget = TQT_TQWIDGET( object ); TQWidget* widget = TQT_TQWIDGET( object );
TQPainter p( widget ); TQPainter p( widget );
Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, ceData.rect, Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, ceData.rect,
@ -2827,7 +2827,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
case TQEvent::Resize: case TQEvent::Resize:
{ {
TQListBox* listbox = static_cast<TQListBox*>(TQT_TQWIDGET(object)); TQListBox* listbox = static_cast<TQListBox*>(TQT_TQWIDGET(object));
TQResizeEvent* resize = TQT_TQRESIZEEVENT(event); TQResizeEvent* resize = static_cast<TQResizeEvent*>(event);
if (resize->size().height() < 6) if (resize->size().height() < 6)
return false; return false;
@ -2891,7 +2891,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
{ {
firstComboPopupRelease = false; firstComboPopupRelease = false;
TQMouseEvent* mev = TQT_TQMOUSEEVENT(event); TQMouseEvent* mev = static_cast<TQMouseEvent*>(event);
TQListBox* box = static_cast<TQListBox*>(TQT_TQWIDGET(object)); TQListBox* box = static_cast<TQListBox*>(TQT_TQWIDGET(object));
TQWidget* parent = box->parentWidget(); TQWidget* parent = box->parentWidget();

@ -1011,7 +1011,7 @@ bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev )
KCursor::autoHideEventFilter( TQT_TQOBJECT(this), ev ); KCursor::autoHideEventFilter( TQT_TQOBJECT(this), ev );
if ( ev->type() == TQEvent::AccelOverride ) if ( ev->type() == TQEvent::AccelOverride )
{ {
TQKeyEvent *e = TQT_TQKEYEVENT( ev ); TQKeyEvent *e = static_cast<TQKeyEvent*>( ev );
if (overrideAccel (e)) if (overrideAccel (e))
{ {
e->accept(); e->accept();
@ -1020,7 +1020,7 @@ bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev )
} }
else if( ev->type() == TQEvent::KeyPress ) else if( ev->type() == TQEvent::KeyPress )
{ {
TQKeyEvent *e = TQT_TQKEYEVENT( ev ); TQKeyEvent *e = static_cast<TQKeyEvent*>( ev );
if( e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter ) if( e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter )
{ {

@ -620,7 +620,7 @@ bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e)
} }
if (o == textEdit() && (e->type() == TQEvent::KeyPress)) { if (o == textEdit() && (e->type() == TQEvent::KeyPress)) {
TQKeyEvent *k = TQT_TQKEYEVENT(e); TQKeyEvent *k = static_cast<TQKeyEvent*>(e);
d->autoReady = true; d->autoReady = true;
if (d->rehighlightRequest->isActive()) // try to stay out of the users way if (d->rehighlightRequest->isActive()) // try to stay out of the users way
d->rehighlightRequest->changeInterval( 500 ); d->rehighlightRequest->changeInterval( 500 );

@ -308,7 +308,7 @@ void KURLLabel::enterEvent (TQEvent* e)
TQLabel::enterEvent (e); TQLabel::enterEvent (e);
TQRect r( activeRect() ); TQRect r( activeRect() );
if (!r.contains( TQT_TQMOUSEEVENT(e)->pos() )) if (!r.contains( static_cast<TQMouseEvent*>(e)->pos() ))
return; return;
if (!d->AltPixmap.isNull() && pixmap()) if (!d->AltPixmap.isNull() && pixmap())
@ -372,7 +372,7 @@ bool KURLLabel::event (TQEvent *e)
return result; return result;
} }
else if (e->type() == TQEvent::KeyPress) { else if (e->type() == TQEvent::KeyPress) {
TQKeyEvent* ke = TQT_TQKEYEVENT(e); TQKeyEvent* ke = static_cast<TQKeyEvent*>(e);
if (ke->key() == TQt::Key_Enter || ke->key() == TQt::Key_Return) { if (ke->key() == TQt::Key_Enter || ke->key() == TQt::Key_Return) {
setLinkColor (d->HighlightedLinkColor); setLinkColor (d->HighlightedLinkColor);
d->Timer->start (300); d->Timer->start (300);
@ -384,12 +384,12 @@ bool KURLLabel::event (TQEvent *e)
} }
else if (e->type() == TQEvent::MouseButtonPress) { else if (e->type() == TQEvent::MouseButtonPress) {
TQRect r( activeRect() ); TQRect r( activeRect() );
d->MousePressed = r.contains(TQT_TQMOUSEEVENT(e)->pos()); d->MousePressed = r.contains(static_cast<TQMouseEvent*>(e)->pos());
} }
else if (e->type() == TQEvent::MouseMove) { else if (e->type() == TQEvent::MouseMove) {
if (d->Cursor) { if (d->Cursor) {
TQRect r( activeRect() ); TQRect r( activeRect() );
bool inside = r.contains(TQT_TQMOUSEEVENT(e)->pos()); bool inside = r.contains(static_cast<TQMouseEvent*>(e)->pos());
if (d->WasInsideRect != inside) { if (d->WasInsideRect != inside) {
if (inside) if (inside)
TQLabel::setCursor(*d->Cursor); TQLabel::setCursor(*d->Cursor);

@ -112,7 +112,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e )
if ( o == d->m_parent ) { if ( o == d->m_parent ) {
if ( isVisible() ) { if ( isVisible() ) {
if ( type == TQEvent::KeyPress ) { if ( type == TQEvent::KeyPress ) {
TQKeyEvent *ev = TQT_TQKEYEVENT( e ); TQKeyEvent *ev = static_cast<TQKeyEvent*>( e );
switch ( ev->key() ) { switch ( ev->key() ) {
case Key_BackTab: case Key_BackTab:
if ( d->tabHandling && (ev->state() == TQt::NoButton || if ( d->tabHandling && (ev->state() == TQt::NoButton ||
@ -185,7 +185,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e )
else if ( type == TQEvent::AccelOverride ) { else if ( type == TQEvent::AccelOverride ) {
// Override any acceleartors that match // Override any acceleartors that match
// the key sequences we use here... // the key sequences we use here...
TQKeyEvent *ev = TQT_TQKEYEVENT( e ); TQKeyEvent *ev = static_cast<TQKeyEvent*>( e );
switch ( ev->key() ) { switch ( ev->key() ) {
case Key_Down: case Key_Down:
case Key_Up: case Key_Up:
@ -230,7 +230,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e )
// any mouse-click on something else than "this" makes us hide // any mouse-click on something else than "this" makes us hide
else if ( type == TQEvent::MouseButtonPress ) { else if ( type == TQEvent::MouseButtonPress ) {
TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent *ev = static_cast<TQMouseEvent*>( e );
if ( !rect().contains( ev->pos() )) // this widget if ( !rect().contains( ev->pos() )) // this widget
hide(); hide();

@ -419,12 +419,12 @@ bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
{ {
if (ev->type() == TQEvent::MouseButtonPress) if (ev->type() == TQEvent::MouseButtonPress)
{ {
TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
d->m_mousePressPos = mev->pos(); d->m_mousePressPos = mev->pos();
} }
else if (ev->type() == TQEvent::MouseMove) else if (ev->type() == TQEvent::MouseMove)
{ {
TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
if ((mev->pos() - d->m_mousePressPos).manhattanLength() if ((mev->pos() - d->m_mousePressPos).manhattanLength()
> TDEGlobalSettings::dndEventDelay()) > TDEGlobalSettings::dndEventDelay())
{ {

Loading…
Cancel
Save