Replace 'Event' #define strings

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/430/head
Michele Calgaro 12 months ago
parent 5590077e66
commit 8aea8afbc5
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -79,13 +79,13 @@ bool KRootWidget::eventFilter ( TQObject *, TQEvent * e )
{ {
if (e->type() == TQEvent::MouseButtonPress) if (e->type() == TQEvent::MouseButtonPress)
{ {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
KRootWm::self()->mousePressed( me->globalPos(), me->button() ); KRootWm::self()->mousePressed( me->globalPos(), me->button() );
return true; return true;
} }
else if (e->type() == TQEvent::Wheel) else if (e->type() == TQEvent::Wheel)
{ {
TQWheelEvent *we = TQT_TQWHEELEVENT(e); TQWheelEvent *we = static_cast<TQWheelEvent*>(e);
emit wheelRolled(we->delta()); emit wheelRolled(we->delta());
return true; return true;
} }

@ -676,7 +676,7 @@ void KDIconView::wheelEvent( TQWheelEvent* e )
TQIconViewItem *item = findItem( e->pos() ); TQIconViewItem *item = findItem( e->pos() );
if ( !item ) if ( !item )
{ {
TQWheelEvent *we = TQT_TQWHEELEVENT(e); TQWheelEvent *we = static_cast<TQWheelEvent*>(e);
if ( we->state() == ControlButton ) if ( we->state() == ControlButton )
{ {

@ -329,7 +329,7 @@ bool View::eventFilter( TQObject *o, TQEvent *e )
htmlDocument().links().length() == 0 ) htmlDocument().links().length() == 0 )
return TDEHTMLPart::eventFilter( o, e ); return TDEHTMLPart::eventFilter( o, e );
TQKeyEvent *ke = TQT_TQKEYEVENT( e ); TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
if ( ke->state() & TQt::ShiftButton && ke->key() == Key_Space ) { if ( ke->state() & TQt::ShiftButton && ke->key() == Key_Space ) {
// If we're on the first page, it does not make sense to go back. // If we're on the first page, it does not make sense to go back.
if ( baseURL().path().endsWith( "/index.html" ) ) if ( baseURL().path().endsWith( "/index.html" ) )

@ -1678,7 +1678,7 @@ bool ClockApplet::eventFilter( TQObject *o, TQEvent *e )
if (( o == _clock->widget() || o == _date || o == _dayOfWeek) && if (( o == _clock->widget() || o == _date || o == _dayOfWeek) &&
e->type() == TQEvent::MouseButtonPress ) e->type() == TQEvent::MouseButtonPress )
{ {
mousePressEvent(TQT_TQMOUSEEVENT(e) ); mousePressEvent(static_cast<TQMouseEvent*>(e) );
return true; return true;
} }

@ -193,7 +193,7 @@ bool Lockout::eventFilter( TQObject *o, TQEvent *e )
TDEConfig *conf = config(); TDEConfig *conf = config();
conf->setGroup("lockout"); conf->setGroup("lockout");
TQMouseEvent *me = TQT_TQMOUSEEVENT( e ); TQMouseEvent *me = static_cast<TQMouseEvent*>( e );
if( me->button() == TQt::RightButton ) if( me->button() == TQt::RightButton )
{ {
if( o == lockButton ) if( o == lockButton )

@ -838,11 +838,11 @@ bool SystemTrayApplet::eventFilter(TQObject* watched, TQEvent* e)
TQPoint p; TQPoint p;
if (e->type() == TQEvent::ContextMenu) if (e->type() == TQEvent::ContextMenu)
{ {
p = TQT_TQCONTEXTMENUEVENT(e)->globalPos(); p = static_cast<TQContextMenuEvent*>(e)->globalPos();
} }
else if (e->type() == TQEvent::MouseButtonPress) else if (e->type() == TQEvent::MouseButtonPress)
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if (me->button() == TQt::RightButton) if (me->button() == TQt::RightButton)
{ {
p = me->globalPos(); p = me->globalPos();
@ -855,7 +855,7 @@ bool SystemTrayApplet::eventFilter(TQObject* watched, TQEvent* e)
contextMenu->insertItem(SmallIcon("configure"), i18n("Configure System Tray..."), contextMenu->insertItem(SmallIcon("configure"), i18n("Configure System Tray..."),
this, TQT_SLOT(configure())); this, TQT_SLOT(configure()));
contextMenu->exec(TQT_TQCONTEXTMENUEVENT(e)->globalPos()); contextMenu->exec(static_cast<TQContextMenuEvent*>(e)->globalPos());
delete contextMenu; delete contextMenu;
return true; return true;

@ -112,7 +112,7 @@ bool KNewButton::eventFilter(TQObject *o, TQEvent *e)
e->type() == TQEvent::MouseButtonPress || e->type() == TQEvent::MouseButtonPress ||
e->type() == TQEvent::MouseButtonDblClick ) e->type() == TQEvent::MouseButtonDblClick )
{ {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
if (rect().contains(mapFromGlobal(me->globalPos()))) if (rect().contains(mapFromGlobal(me->globalPos())))
{ {
if (m_pressedDuringPopup && m_popup && m_openTimer != -1 if (m_pressedDuringPopup && m_popup && m_openTimer != -1

@ -224,7 +224,7 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e)
{ {
if (e->type() == TQEvent::MouseButtonPress) if (e->type() == TQEvent::MouseButtonPress)
{ {
TQMouseEvent* ev = TQT_TQMOUSEEVENT(e); TQMouseEvent* ev = static_cast<TQMouseEvent*>(e);
if (ev->button() == TQt::LeftButton || ev->button() == TQt::MidButton) if (ev->button() == TQt::LeftButton || ev->button() == TQt::MidButton)
{ {
emit moveApplet(m_applet->mapFromGlobal(ev->globalPos())); emit moveApplet(m_applet->mapFromGlobal(ev->globalPos()));
@ -234,7 +234,7 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e)
if (m_menuButton && e->type() == TQEvent::MouseButtonPress) if (m_menuButton && e->type() == TQEvent::MouseButtonPress)
{ {
TQMouseEvent* ev = TQT_TQMOUSEEVENT(e); TQMouseEvent* ev = static_cast<TQMouseEvent*>(e);
if (ev->button() == TQt::RightButton) if (ev->button() == TQt::RightButton)
{ {
if (!m_menuButton->isDown()) if (!m_menuButton->isDown())

@ -235,7 +235,7 @@ bool ButtonContainer::eventFilter(TQObject *o, TQEvent *e)
} }
sentinal = true; sentinal = true;
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
switch (me->button()) switch (me->button())
{ {
case TQt::MidButton: case TQt::MidButton:

@ -2145,7 +2145,7 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
{ {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if ( me->button() == TQt::LeftButton ) if ( me->button() == TQt::LeftButton )
{ {
if (inResizeArea(me->pos())) if (inResizeArea(me->pos()))
@ -2180,7 +2180,7 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if ( me->button() == TQt::LeftButton ) if ( me->button() == TQt::LeftButton )
{ {
_is_lmb_down = false; _is_lmb_down = false;
@ -2190,7 +2190,7 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
case TQEvent::MouseMove: case TQEvent::MouseMove:
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if (KickerSettings::useResizeHandle()) if (KickerSettings::useResizeHandle())
{ {
KPanelExtension::Position pos = position(); KPanelExtension::Position pos = position();

@ -84,7 +84,7 @@ bool AppletWidget::eventFilter(TQObject*, TQEvent* e)
{ {
if (e->type() == TQEvent::MouseButtonPress) if (e->type() == TQEvent::MouseButtonPress)
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if (me->button() & TQt::LeftButton) if (me->button() & TQt::LeftButton)
{ {
m_dragStart = me->pos(); m_dragStart = me->pos();
@ -97,7 +97,7 @@ bool AppletWidget::eventFilter(TQObject*, TQEvent* e)
if (e->type() == TQEvent::MouseMove) if (e->type() == TQEvent::MouseMove)
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if ((me->pos() - m_dragStart).manhattanLength() > if ((me->pos() - m_dragStart).manhattanLength() >
TDEGlobalSettings::dndEventDelay()) TDEGlobalSettings::dndEventDelay())
{ {

@ -480,11 +480,11 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e)
TQPoint p; TQPoint p;
if (e->type() == TQEvent::MouseMove || e->type() == TQEvent::MouseButtonPress) { if (e->type() == TQEvent::MouseMove || e->type() == TQEvent::MouseButtonPress) {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
p = me->globalPos(); p = me->globalPos();
} }
else if (e->type() == TQEvent::Wheel) { else if (e->type() == TQEvent::Wheel) {
TQWheelEvent* we = TQT_TQWHEELEVENT(e); TQWheelEvent* we = static_cast<TQWheelEvent*>(e);
p = we->globalPos(); p = we->globalPos();
} }
@ -589,7 +589,7 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e)
if (view) if (view)
{ {
bool handled = true; bool handled = true;
switch (TQT_TQKEYEVENT(e)->key()) { switch (static_cast<TQKeyEvent*>(e)->key()) {
case Key_Up: case Key_Up:
if (view->selectedItem()) { if (view->selectedItem()) {
view->setSelected(view->selectedItem()->itemAbove(),true); view->setSelected(view->selectedItem()->itemAbove(),true);

@ -996,7 +996,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
{ {
if (e->type() == TQEvent::MouseMove) if (e->type() == TQEvent::MouseMove)
{ {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
if (rect().contains(mapFromGlobal(me->globalPos())) && if (rect().contains(mapFromGlobal(me->globalPos())) &&
((me->state() & ControlButton) != 0 || ((me->state() & ControlButton) != 0 ||
(me->state() & ShiftButton) != 0)) (me->state() & ShiftButton) != 0))
@ -1008,7 +1008,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
else if (e->type() == TQEvent::MouseButtonPress || else if (e->type() == TQEvent::MouseButtonPress ||
e->type() == TQEvent::MouseButtonDblClick) e->type() == TQEvent::MouseButtonDblClick)
{ {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
if (rect().contains(mapFromGlobal(me->globalPos()))) if (rect().contains(mapFromGlobal(me->globalPos())))
{ {
m_pressedDuringPopup = true; m_pressedDuringPopup = true;
@ -1017,7 +1017,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
} }
else if (e->type() == TQEvent::MouseButtonRelease) else if (e->type() == TQEvent::MouseButtonRelease)
{ {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
if (rect().contains(mapFromGlobal(me->globalPos()))) if (rect().contains(mapFromGlobal(me->globalPos())))
{ {
if (m_pressedDuringPopup && m_popup) if (m_pressedDuringPopup && m_popup)

@ -1424,7 +1424,7 @@ bool TaskContainer::eventFilter(TQObject *o, TQEvent *e)
{ {
if (!m_dragStartPos.isNull()) if (!m_dragStartPos.isNull())
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
TQPoint p(me->globalPos()); TQPoint p(me->globalPos());
if (me->state() & TQt::LeftButton && if (me->state() & TQt::LeftButton &&

@ -399,7 +399,7 @@ bool KonqCombo::eventFilter( TQObject *o, TQEvent *ev )
if ( o == edit ) { if ( o == edit ) {
int type = ev->type(); int type = ev->type();
if ( type == TQEvent::KeyPress ) { if ( type == TQEvent::KeyPress ) {
TQKeyEvent *e = TQT_TQKEYEVENT( ev ); TQKeyEvent *e = static_cast<TQKeyEvent*>( ev );
if ( e->key() == Key_Return || e->key() == Key_Enter ) { if ( e->key() == Key_Return || e->key() == Key_Enter ) {
m_modifier = e->state(); m_modifier = e->state();

@ -177,7 +177,7 @@ bool KonqFrameStatusBar::eventFilter(TQObject* o, TQEvent *e)
{ {
emit clicked(); emit clicked();
update(); update();
if ( TQT_TQMOUSEEVENT(e)->button() == TQt::RightButton) if ( static_cast<TQMouseEvent*>(e)->button() == TQt::RightButton)
splitFrameMenu(); splitFrameMenu();
return true; return true;
} }
@ -397,7 +397,7 @@ bool KonqFrame::eventFilter(TQObject* /*obj*/, TQEvent *ev)
{ {
if (ev->type()==TQEvent::KeyPress) if (ev->type()==TQEvent::KeyPress)
{ {
TQKeyEvent * keyEv = TQT_TQKEYEVENT(ev); TQKeyEvent * keyEv = static_cast<TQKeyEvent*>(ev);
if ((keyEv->key()==Key_Tab) && (keyEv->state()==ControlButton)) if ((keyEv->key()==Key_Tab) && (keyEv->state()==ControlButton))
{ {
emit ((KonqFrameContainer*)parent())->ctrlTabPressed(); emit ((KonqFrameContainer*)parent())->ctrlTabPressed();

@ -3466,7 +3466,7 @@ bool KonqMainWindow::eventFilter(TQObject*obj,TQEvent *ev)
{ {
//kdDebug(1202) << "KonqMainWindow::eventFilter " << obj << " " << obj->className() << " " << obj->name() << endl; //kdDebug(1202) << "KonqMainWindow::eventFilter " << obj << " " << obj->className() << " " << obj->name() << endl;
TQFocusEvent * focusEv = TQT_TQFOCUSEVENT(ev); TQFocusEvent * focusEv = static_cast<TQFocusEvent*>(ev);
if (focusEv->reason() == TQFocusEvent::Popup) if (focusEv->reason() == TQFocusEvent::Popup)
{ {
return KParts::MainWindow::eventFilter( obj, ev ); return KParts::MainWindow::eventFilter( obj, ev );

@ -1293,7 +1293,7 @@ bool KonqView::eventFilter( TQObject *obj, TQEvent *e )
{ {
if ( e->type() == TQEvent::ContextMenu ) if ( e->type() == TQEvent::ContextMenu )
{ {
TQContextMenuEvent *ev = TQT_TQCONTEXTMENUEVENT( e ); TQContextMenuEvent *ev = static_cast<TQContextMenuEvent*>( e );
if ( ev->reason() == TQContextMenuEvent::Mouse ) if ( ev->reason() == TQContextMenuEvent::Mouse )
{ {
return true; return true;
@ -1301,7 +1301,7 @@ bool KonqView::eventFilter( TQObject *obj, TQEvent *e )
} }
else if ( e->type() == TQEvent::MouseButtonPress ) else if ( e->type() == TQEvent::MouseButtonPress )
{ {
TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent *ev = static_cast<TQMouseEvent*>( e );
if ( ev->button() == TQt::RightButton ) if ( ev->button() == TQt::RightButton )
{ {
return true; return true;
@ -1309,7 +1309,7 @@ bool KonqView::eventFilter( TQObject *obj, TQEvent *e )
} }
else if ( e->type() == TQEvent::MouseButtonRelease ) else if ( e->type() == TQEvent::MouseButtonRelease )
{ {
TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent *ev = static_cast<TQMouseEvent*>( e );
if ( ev->button() == TQt::RightButton ) if ( ev->button() == TQt::RightButton )
{ {
emit backRightClick(); emit backRightClick();
@ -1318,7 +1318,7 @@ bool KonqView::eventFilter( TQObject *obj, TQEvent *e )
} }
else if ( e->type() == TQEvent::MouseMove ) else if ( e->type() == TQEvent::MouseMove )
{ {
TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent *ev = static_cast<TQMouseEvent*>( e );
if ( ev->state() == TQt::RightButton ) if ( ev->state() == TQt::RightButton )
{ {
obj->removeEventFilter( this ); obj->removeEventFilter( this );

@ -1931,14 +1931,14 @@ bool TEWidget::eventFilter( TQObject *obj, TQEvent *e )
if ( (e->type() == TQEvent::Accel || if ( (e->type() == TQEvent::Accel ||
e->type() == TQEvent::AccelAvailable ) && tqApp->focusWidget() == this ) e->type() == TQEvent::AccelAvailable ) && tqApp->focusWidget() == this )
{ {
TQT_TQKEYEVENT( e )->ignore(); static_cast<TQKeyEvent*>( e )->ignore();
return false; return false;
} }
if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ ) if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ )
return false; // not us return false; // not us
if ( e->type() == TQEvent::KeyPress ) if ( e->type() == TQEvent::KeyPress )
{ {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
actSel=0; // Key stroke implies a screen update, so TEWidget won't actSel=0; // Key stroke implies a screen update, so TEWidget won't
// know where the current selection is. // know where the current selection is.
@ -1956,13 +1956,13 @@ bool TEWidget::eventFilter( TQObject *obj, TQEvent *e )
} }
if ( e->type() == TQEvent::KeyRelease ) if ( e->type() == TQEvent::KeyRelease )
{ {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
emit keyReleasedSignal(ke); emit keyReleasedSignal(ke);
return true; return true;
} }
if ( e->type() == TQEvent::FocusIn ) if ( e->type() == TQEvent::FocusIn )
{ {
TQFocusEvent *fe = TQT_TQFOCUSEVENT(e); TQFocusEvent *fe = static_cast<TQFocusEvent*>(e);
if (fe->gotFocus()) if (fe->gotFocus())
{ {
emit focusInSignal(fe); emit focusInSignal(fe);
@ -2050,7 +2050,7 @@ bool TEWidget::event( TQEvent *e )
{ {
if ( e->type() == TQEvent::AccelOverride ) if ( e->type() == TQEvent::AccelOverride )
{ {
TQKeyEvent *ke = TQT_TQKEYEVENT( e ); TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
KKey key( ke ); KKey key( ke );
int keyCodeQt = key.keyCodeQt(); int keyCodeQt = key.keyCodeQt();

@ -991,12 +991,12 @@ bool Konsole::eventFilter( TQObject *o, TQEvent *ev )
// is moved by a small distance. // is moved by a small distance.
if (ev->type() == TQEvent::MouseButtonPress) if (ev->type() == TQEvent::MouseButtonPress)
{ {
TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
m_newSessionButtonMousePressPos = mev->pos(); m_newSessionButtonMousePressPos = 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() - m_newSessionButtonMousePressPos).manhattanLength() if ((mev->pos() - m_newSessionButtonMousePressPos).manhattanLength()
> TDEGlobalSettings::dndEventDelay()) > TDEGlobalSettings::dndEventDelay())
{ {
@ -1006,7 +1006,7 @@ bool Konsole::eventFilter( TQObject *o, TQEvent *ev )
} }
else if (ev->type() == TQEvent::ContextMenu) else if (ev->type() == TQEvent::ContextMenu)
{ {
TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev);
slotTabbarContextMenu(mev->globalPos()); slotTabbarContextMenu(mev->globalPos());
return true; return true;
} }

@ -139,19 +139,19 @@ KdmThemer::widgetEvent( TQEvent *e )
switch (e->type()) { switch (e->type()) {
case TQEvent::MouseMove: case TQEvent::MouseMove:
{ {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
rootItem->mouseEvent( me->x(), me->y() ); rootItem->mouseEvent( me->x(), me->y() );
} }
break; break;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
{ {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
rootItem->mouseEvent( me->x(), me->y(), true ); rootItem->mouseEvent( me->x(), me->y(), true );
} }
break; break;
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
{ {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
rootItem->mouseEvent( me->x(), me->y(), false, true ); rootItem->mouseEvent( me->x(), me->y(), false, true );
} }
break; break;
@ -164,7 +164,7 @@ KdmThemer::widgetEvent( TQEvent *e )
break; break;
case TQEvent::Paint: case TQEvent::Paint:
{ {
TQRect paintRect = TQT_TQPAINTEVENT(e)->rect(); TQRect paintRect = static_cast<TQPaintEvent*>(e)->rect();
kdDebug() << timestamp() << " paint on: " << paintRect << endl; kdDebug() << timestamp() << " paint on: " << paintRect << endl;
if (!argb_visual_available) { if (!argb_visual_available) {

@ -1183,22 +1183,22 @@ bool B2Client::eventFilter(TQObject *o, TQEvent *e)
return false; return false;
switch (e->type()) { switch (e->type()) {
case TQEvent::Resize: case TQEvent::Resize:
resizeEvent(TQT_TQRESIZEEVENT(e)); resizeEvent(static_cast<TQResizeEvent*>(e));
return true; return true;
case TQEvent::Paint: case TQEvent::Paint:
paintEvent(TQT_TQPAINTEVENT(e)); paintEvent(static_cast<TQPaintEvent*>(e));
return true; return true;
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
titlebar->mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e)); titlebar->mouseDoubleClickEvent(static_cast<TQMouseEvent*>(e));
return true; return true;
case TQEvent::Wheel: case TQEvent::Wheel:
titlebar->wheelEvent(TQT_TQWHEELEVENT(e)); titlebar->wheelEvent(static_cast<TQWheelEvent*>(e));
return true; return true;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
processMousePressEvent(TQT_TQMOUSEEVENT(e)); processMousePressEvent(static_cast<TQMouseEvent*>(e));
return true; return true;
case TQEvent::Show: case TQEvent::Show:
showEvent(TQT_TQSHOWEVENT(e)); showEvent(static_cast<TQShowEvent*>(e));
return true; return true;
default: default:
break; break;

@ -1802,23 +1802,23 @@ bool KeramikClient::eventFilter( TQObject* o, TQEvent* e )
switch ( e->type() ) switch ( e->type() )
{ {
case TQEvent::Resize: case TQEvent::Resize:
resizeEvent( TQT_TQRESIZEEVENT( e ) ); resizeEvent( static_cast<TQResizeEvent*>( e ) );
return true; return true;
case TQEvent::Paint: case TQEvent::Paint:
paintEvent( TQT_TQPAINTEVENT( e ) ); paintEvent( static_cast<TQPaintEvent*>( e ) );
return true; return true;
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
mouseDoubleClickEvent( TQT_TQMOUSEEVENT( e ) ); mouseDoubleClickEvent( static_cast<TQMouseEvent*>( e ) );
return true; return true;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
processMousePressEvent( TQT_TQMOUSEEVENT( e ) ); processMousePressEvent( static_cast<TQMouseEvent*>( e ) );
return true; return true;
case TQEvent::Wheel: case TQEvent::Wheel:
wheelEvent( TQT_TQWHEELEVENT( e )); wheelEvent( static_cast<TQWheelEvent*>( e ));
return true; return true;
default: default:

@ -106,7 +106,7 @@ bool Decoration::eventFilter( TQObject* o, TQEvent* e )
{ {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
{ // FRAME { // FRAME
processMousePressEvent( TQT_TQMOUSEEVENT( e )); processMousePressEvent( static_cast<TQMouseEvent*>( e ));
return true; return true;
} }
case TQEvent::Show: case TQEvent::Show:

@ -1300,25 +1300,25 @@ bool Client::eventFilter( TQObject* o, TQEvent* e )
return false; return false;
if( e->type() == TQEvent::MouseButtonPress ) if( e->type() == TQEvent::MouseButtonPress )
{ {
TQMouseEvent* ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent* ev = static_cast<TQMouseEvent*>( e );
return buttonPressEvent( decorationId(), qtToX11Button( ev->button()), qtToX11State( ev->state()), return buttonPressEvent( decorationId(), qtToX11Button( ev->button()), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() ); ev->x(), ev->y(), ev->globalX(), ev->globalY() );
} }
if( e->type() == TQEvent::MouseButtonRelease ) if( e->type() == TQEvent::MouseButtonRelease )
{ {
TQMouseEvent* ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent* ev = static_cast<TQMouseEvent*>( e );
return buttonReleaseEvent( decorationId(), qtToX11Button( ev->button()), qtToX11State( ev->state()), return buttonReleaseEvent( decorationId(), qtToX11Button( ev->button()), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() ); ev->x(), ev->y(), ev->globalX(), ev->globalY() );
} }
if( e->type() == TQEvent::MouseMove ) // FRAME i fake z enter/leave? if( e->type() == TQEvent::MouseMove ) // FRAME i fake z enter/leave?
{ {
TQMouseEvent* ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent* ev = static_cast<TQMouseEvent*>( e );
return motionNotifyEvent( decorationId(), qtToX11State( ev->state()), return motionNotifyEvent( decorationId(), qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() ); ev->x(), ev->y(), ev->globalX(), ev->globalY() );
} }
if( e->type() == TQEvent::Wheel ) if( e->type() == TQEvent::Wheel )
{ {
TQWheelEvent* ev = TQT_TQWHEELEVENT( e ); TQWheelEvent* ev = static_cast<TQWheelEvent*>( e );
bool r = buttonPressEvent( decorationId(), ev->delta() > 0 ? Button4 : Button5, qtToX11State( ev->state()), bool r = buttonPressEvent( decorationId(), ev->delta() > 0 ? Button4 : Button5, qtToX11State( ev->state()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() ); ev->x(), ev->y(), ev->globalX(), ev->globalY() );
r = r || buttonReleaseEvent( decorationId(), ev->delta() > 0 ? Button4 : Button5, qtToX11State( ev->state()), r = r || buttonReleaseEvent( decorationId(), ev->delta() > 0 ? Button4 : Button5, qtToX11State( ev->state()),
@ -1327,7 +1327,7 @@ bool Client::eventFilter( TQObject* o, TQEvent* e )
} }
if( e->type() == TQEvent::Resize ) if( e->type() == TQEvent::Resize )
{ {
TQResizeEvent* ev = TQT_TQRESIZEEVENT( e ); TQResizeEvent* ev = static_cast<TQResizeEvent*>( e );
// Filter out resize events that inform about size different than frame size. // Filter out resize events that inform about size different than frame size.
// This will ensure that decoration->width() etc. and decoration->widget()->width() will be in sync. // This will ensure that decoration->width() etc. and decoration->widget()->width() will be in sync.
// These events only seem to be delayed events from initial resizing before show() was called // These events only seem to be delayed events from initial resizing before show() was called

@ -176,7 +176,7 @@ bool DetectDialog::eventFilter( TQObject* o, TQEvent* e )
return false; return false;
delete grabber; delete grabber;
grabber = NULL; grabber = NULL;
if( TQT_TQMOUSEEVENT( e )->button() != TQt::LeftButton ) if( static_cast<TQMouseEvent*>( e )->button() != TQt::LeftButton )
{ {
emit detectionDone( false ); emit detectionDone( false );
return true; return true;

@ -849,19 +849,19 @@ bool KCommonDecoration::eventFilter( TQObject* o, TQEvent* e )
switch( e->type()) switch( e->type())
{ {
case TQEvent::Resize: case TQEvent::Resize:
resizeEvent(TQT_TQRESIZEEVENT(e) ); resizeEvent(static_cast<TQResizeEvent*>(e) );
return true; return true;
case TQEvent::Paint: case TQEvent::Paint:
paintEvent(TQT_TQPAINTEVENT( e )); paintEvent(static_cast<TQPaintEvent*>( e ));
return true; return true;
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
mouseDoubleClickEvent(TQT_TQMOUSEEVENT( e )); mouseDoubleClickEvent(static_cast<TQMouseEvent*>( e ));
return true; return true;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
processMousePressEvent(TQT_TQMOUSEEVENT( e )); processMousePressEvent(static_cast<TQMouseEvent*>( e ));
return true; return true;
case TQEvent::Wheel: case TQEvent::Wheel:
wheelEvent(TQT_TQWHEELEVENT( e )); wheelEvent(static_cast<TQWheelEvent*>( e ));
return true; return true;
default: default:
return false; return false;

Loading…
Cancel
Save