Replace 'Event' #define strings

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 8aea8afbc5)
pull/478/head
Michele Calgaro 12 months ago
parent 6b5d95d534
commit b19e4cab88
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

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

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

@ -329,7 +329,7 @@ bool View::eventFilter( TQObject *o, TQEvent *e )
htmlDocument().links().length() == 0 )
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 we're on the first page, it does not make sense to go back.
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) &&
e->type() == TQEvent::MouseButtonPress )
{
mousePressEvent(TQT_TQMOUSEEVENT(e) );
mousePressEvent(static_cast<TQMouseEvent*>(e) );
return true;
}

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

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

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

@ -224,7 +224,7 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e)
{
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)
{
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)
{
TQMouseEvent* ev = TQT_TQMOUSEEVENT(e);
TQMouseEvent* ev = static_cast<TQMouseEvent*>(e);
if (ev->button() == TQt::RightButton)
{
if (!m_menuButton->isDown())

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

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

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

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

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

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

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

@ -177,7 +177,7 @@ bool KonqFrameStatusBar::eventFilter(TQObject* o, TQEvent *e)
{
emit clicked();
update();
if ( TQT_TQMOUSEEVENT(e)->button() == TQt::RightButton)
if ( static_cast<TQMouseEvent*>(e)->button() == TQt::RightButton)
splitFrameMenu();
return true;
}
@ -397,7 +397,7 @@ bool KonqFrame::eventFilter(TQObject* /*obj*/, TQEvent *ev)
{
if (ev->type()==TQEvent::KeyPress)
{
TQKeyEvent * keyEv = TQT_TQKEYEVENT(ev);
TQKeyEvent * keyEv = static_cast<TQKeyEvent*>(ev);
if ((keyEv->key()==Key_Tab) && (keyEv->state()==ControlButton))
{
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;
TQFocusEvent * focusEv = TQT_TQFOCUSEVENT(ev);
TQFocusEvent * focusEv = static_cast<TQFocusEvent*>(ev);
if (focusEv->reason() == TQFocusEvent::Popup)
{
return KParts::MainWindow::eventFilter( obj, ev );

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

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

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

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

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

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

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

@ -1300,25 +1300,25 @@ bool Client::eventFilter( TQObject* o, TQEvent* e )
return false;
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()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
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()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
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()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
}
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()),
ev->x(), ev->y(), ev->globalX(), ev->globalY() );
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 )
{
TQResizeEvent* ev = TQT_TQRESIZEEVENT( e );
TQResizeEvent* ev = static_cast<TQResizeEvent*>( e );
// 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.
// 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;
delete grabber;
grabber = NULL;
if( TQT_TQMOUSEEVENT( e )->button() != TQt::LeftButton )
if( static_cast<TQMouseEvent*>( e )->button() != TQt::LeftButton )
{
emit detectionDone( false );
return true;

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

Loading…
Cancel
Save