Replace 'Event' #define strings

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

@ -3449,7 +3449,7 @@ bool KisView::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::TabletPress: case TQEvent::TabletPress:
case TQEvent::TabletRelease: case TQEvent::TabletRelease:
{ {
TQTabletEvent *te = TQT_TQTABLETEVENT(e); TQTabletEvent *te = static_cast<TQTabletEvent*>(e);
KisInputDevice device; KisInputDevice device;
switch (te->device()) { switch (te->device()) {

@ -308,11 +308,11 @@ void KoBirdEyePanel::updateVisibleArea()
bool KoBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev) bool KoBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev)
{ {
if (o == m_page->view && ev->type() == TQEvent::Resize) { if (o == m_page->view && ev->type() == TQEvent::Resize) {
resizeViewEvent(TQT_TQRESIZEEVENT(ev)->size()); resizeViewEvent(static_cast<TQResizeEvent*>(ev)->size());
} }
if (o == m_page->view && ev->type() == TQEvent::Paint) { if (o == m_page->view && ev->type() == TQEvent::Paint) {
paintViewEvent(TQT_TQPAINTEVENT(ev)); paintViewEvent(static_cast<TQPaintEvent*>(ev));
} }
if (o == m_page->view && ev->type() == TQEvent::MouseMove) { if (o == m_page->view && ev->type() == TQEvent::MouseMove) {

@ -102,7 +102,7 @@ VDocumentPreview::eventFilter( TQObject* object, TQEvent* event )
} }
KoRect rect = m_view->canvasWidget()->boundingBox(); KoRect rect = m_view->canvasWidget()->boundingBox();
TQMouseEvent* mouseEvent = TQT_TQMOUSEEVENT( event ); TQMouseEvent* mouseEvent = static_cast<TQMouseEvent*>( event );
if( event->type() == TQEvent::MouseButtonPress ) if( event->type() == TQEvent::MouseButtonPress )
{ {
m_firstPoint.setX( mouseEvent->pos().x() ); m_firstPoint.setX( mouseEvent->pos().x() );

@ -150,7 +150,7 @@ VTool::keyEvent( TQEvent* event )
// Key press events. // Key press events.
if( event->type() == TQEvent::KeyPress ) if( event->type() == TQEvent::KeyPress )
{ {
TQKeyEvent* keyEvent = TQT_TQKEYEVENT( event ); TQKeyEvent* keyEvent = static_cast<TQKeyEvent*>( event );
// Terminate the current drawing with the Enter-key: // Terminate the current drawing with the Enter-key:
if( if(
@ -211,7 +211,7 @@ VTool::keyEvent( TQEvent* event )
// Key release events: // Key release events:
if( event->type() == TQEvent::KeyRelease ) if( event->type() == TQEvent::KeyRelease )
{ {
TQKeyEvent* keyEvent = TQT_TQKEYEVENT( event ); TQKeyEvent* keyEvent = static_cast<TQKeyEvent*>( event );
TQt::Key key = (TQt::Key)keyEvent->key(); TQt::Key key = (TQt::Key)keyEvent->key();
if( key == TQt::Key_Shift ) if( key == TQt::Key_Shift )

@ -84,7 +84,7 @@ VStrokeFillPreview::paintEvent( TQPaintEvent* event )
bool bool
VStrokeFillPreview::eventFilter( TQObject *, TQEvent *event ) VStrokeFillPreview::eventFilter( TQObject *, TQEvent *event )
{ {
TQMouseEvent* e = TQT_TQMOUSEEVENT( event ); TQMouseEvent* e = static_cast<TQMouseEvent*>( event );
int ex = e->x() - int( ( width() - PANEL_SIZEX ) / 2 ); int ex = e->x() - int( ( width() - PANEL_SIZEX ) / 2 );
int ey = e->y() - int( ( height() - PANEL_SIZEY ) / 2 ); int ey = e->y() - int( ( height() - PANEL_SIZEY ) / 2 );

@ -63,7 +63,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev)
// we need to simulate the Press event // we need to simulate the Press event
if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits("TQTabWidget")) if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits("TQTabWidget"))
{ {
TQMouseEvent *mev = TQT_TQMOUSEEVENT(ev); TQMouseEvent *mev = static_cast<TQMouseEvent*>(ev);
if(mev->button() == TQt::LeftButton) if(mev->button() == TQt::LeftButton)
{ {
TQMouseEvent *myev = new TQMouseEvent(TQEvent::MouseButtonPress, mev->pos(), mev->button(), mev->state()); TQMouseEvent *myev = new TQMouseEvent(TQEvent::MouseButtonPress, mev->pos(), mev->button(), mev->state());
@ -162,7 +162,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
kdDebug() << "TQEvent::MouseButtonPress this = " << name() << endl; kdDebug() << "TQEvent::MouseButtonPress this = " << name() << endl;
m_moving = TQT_TQWIDGET(s); m_moving = TQT_TQWIDGET(s);
TQMouseEvent *mev = TQT_TQMOUSEEVENT(e); TQMouseEvent *mev = static_cast<TQMouseEvent*>(e);
m_grab = TQPoint(mev->x(), mev->y()); m_grab = TQPoint(mev->x(), mev->y());
// we are drawing a connection // we are drawing a connection
@ -239,7 +239,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
{ {
TQMouseEvent *mev = TQT_TQMOUSEEVENT(e); TQMouseEvent *mev = static_cast<TQMouseEvent*>(e);
if (!m_mousePressEventReceived) { if (!m_mousePressEventReceived) {
m_mouseReleaseEvent = *mev; m_mouseReleaseEvent = *mev;
m_objectForMouseReleaseEvent = s; m_objectForMouseReleaseEvent = s;
@ -252,7 +252,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
case TQEvent::MouseMove: case TQEvent::MouseMove:
{ {
TQMouseEvent *mev = TQT_TQMOUSEEVENT(e); TQMouseEvent *mev = static_cast<TQMouseEvent*>(e);
if(m_insertBegin!=TQPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == TQt::LeftButton) || (mev->state() == (TQt::LeftButton|TQt::ControlButton)) || if(m_insertBegin!=TQPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == TQt::LeftButton) || (mev->state() == (TQt::LeftButton|TQt::ControlButton)) ||
(mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) || (mev->state() == (TQt::LeftButton|TQt::ShiftButton)) ) ) (mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) || (mev->state() == (TQt::LeftButton|TQt::ShiftButton)) ) )
// draw the insert rect // draw the insert rect
@ -343,7 +343,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
//case TQEvent::AccelOverride: //case TQEvent::AccelOverride:
case TQEvent::KeyPress: case TQEvent::KeyPress:
{ {
TQKeyEvent *kev = TQT_TQKEYEVENT(e); TQKeyEvent *kev = static_cast<TQKeyEvent*>(e);
if(kev->key() == Key_F2) // pressing F2 == double-clicking if(kev->key() == Key_F2) // pressing F2 == double-clicking
{ {
@ -374,7 +374,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
// we simulate a mouse move event to update screen // we simulate a mouse move event to update screen
TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), TQt::NoButton, TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), TQt::NoButton,
TQt::LeftButton|TQt::ControlButton ); TQt::LeftButton|TQt::ControlButton );
eventFilter(TQT_TQOBJECT(m_moving), TQT_TQEVENT(mev)); eventFilter(m_moving, mev);
delete mev; delete mev;
} }
else if(kev->key() == FormManager::self()->contextMenuKey()) else if(kev->key() == FormManager::self()->contextMenuKey())
@ -435,7 +435,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
{ {
TQKeyEvent *kev = TQT_TQKEYEVENT(e); TQKeyEvent *kev = static_cast<TQKeyEvent*>(e);
if((kev->key() == Key_Control) && (m_state == CopyingWidget)) { if((kev->key() == Key_Control) && (m_state == CopyingWidget)) {
// cancel copying // cancel copying
//m_copyRect = TQRect(); //m_copyRect = TQRect();

@ -388,7 +388,7 @@ WidgetFactory::eventFilter(TQObject *obj, TQEvent *ev)
if(obj != (TQObject *)w) if(obj != (TQObject *)w)
return false; return false;
TQKeyEvent *e = TQT_TQKEYEVENT(ev); TQKeyEvent *e = static_cast<TQKeyEvent*>(ev);
if(((e->key() == TQt::Key_Return) || (e->key() == TQt::Key_Enter)) && (e->state() != AltButton)) if(((e->key() == TQt::Key_Return) || (e->key() == TQt::Key_Enter)) && (e->state() != AltButton))
resetEditor(); resetEditor();
if(e->key() == TQt::Key_Escape) if(e->key() == TQt::Key_Escape)

@ -749,13 +749,13 @@ WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev)
return false; return false;
if(d->lastGeoCommand) if(d->lastGeoCommand)
d->lastGeoCommand->setPos(TQT_TQMOVEEVENT(ev)->pos()); d->lastGeoCommand->setPos(static_cast<TQMoveEvent*>(ev)->pos());
else { else {
TQStringList list; TQStringList list;
foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets) foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets)
list.append((*it)->name()); list.append((*it)->name());
d->lastGeoCommand = new GeometryPropertyCommand(this, list, TQT_TQMOVEEVENT(ev)->oldPos()); d->lastGeoCommand = new GeometryPropertyCommand(this, list, static_cast<TQMoveEvent*>(ev)->oldPos());
if (KFormDesigner::FormManager::self()->activeForm()) if (KFormDesigner::FormManager::self()->activeForm())
KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastGeoCommand, false); KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastGeoCommand, false);
} }

@ -375,17 +375,17 @@ void* KexiUtils::stringToPtrInternal(const TQString& str, uint size)
void KexiUtils::setFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason) void KexiUtils::setFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason)
{ {
TQEvent fe( TQEvent::FocusIn ); TQEvent fe( TQEvent::FocusIn );
TQT_TQFOCUSEVENT(&fe)->setReason(reason); static_cast<TQFocusEvent*>(&fe)->setReason(reason);
TQApplication::sendEvent( widget, &fe ); TQApplication::sendEvent( widget, &fe );
TQT_TQFOCUSEVENT(&fe)->resetReason(); static_cast<TQFocusEvent*>(&fe)->resetReason();
} }
void KexiUtils::unsetFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason) void KexiUtils::unsetFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason)
{ {
TQEvent fe( TQEvent::FocusOut ); TQEvent fe( TQEvent::FocusOut );
TQT_TQFOCUSEVENT(&fe)->setReason(reason); static_cast<TQFocusEvent*>(&fe)->setReason(reason);
TQApplication::sendEvent( widget, &fe ); TQApplication::sendEvent( widget, &fe );
TQT_TQFOCUSEVENT(&fe)->resetReason(); static_cast<TQFocusEvent*>(&fe)->resetReason();
} }
CopyFileResult KexiUtils::copyFile(const TQString& src, const TQString& dest) CopyFileResult KexiUtils::copyFile(const TQString& src, const TQString& dest)

@ -3408,18 +3408,18 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e )
{ {
//KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name()<<endl; //KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name()<<endl;
if (e->type()==TQEvent::KeyPress) { if (e->type()==TQEvent::KeyPress) {
KexiVDebug << "KEY EVENT " << TQString::number(TQT_TQKEYEVENT(e)->key(), 16) << endl; KexiVDebug << "KEY EVENT " << TQString::number(static_cast<TQKeyEvent*>(e)->key(), 16) << endl;
KexiVDebug << endl; KexiVDebug << endl;
} }
if (e->type()==TQEvent::AccelOverride) { if (e->type()==TQEvent::AccelOverride) {
//KexiVDebug << "AccelOverride EVENT " << TQT_TQKEYEVENT(e)->key() << " " << TQT_TQKEYEVENT(e)->state() == ControlButton << endl; //KexiVDebug << "AccelOverride EVENT " << static_cast<TQKeyEvent*>(e)->key() << " " << static_cast<TQKeyEvent*>(e)->state() == ControlButton << endl;
//avoid sending CTRL+Tab key twice for tabbed/ideal mode, epecially for win32 //avoid sending CTRL+Tab key twice for tabbed/ideal mode, epecially for win32
if (TQT_TQKEYEVENT(e)->key()==TQt::Key_Tab && TQT_TQKEYEVENT(e)->state() == ControlButton) { if (static_cast<TQKeyEvent*>(e)->key()==TQt::Key_Tab && static_cast<TQKeyEvent*>(e)->state() == ControlButton) {
if (d->action_window_next->shortcut().keyCodeQt()==TQt::Key_Tab+TQt::CTRL && d->action_window_next->shortcut().count()==1 if (d->action_window_next->shortcut().keyCodeQt()==TQt::Key_Tab+TQt::CTRL && d->action_window_next->shortcut().count()==1
&& (mdiMode()==KMdi::TabPageMode || mdiMode()==KMdi::IDEAlMode)) && (mdiMode()==KMdi::TabPageMode || mdiMode()==KMdi::IDEAlMode))
{ {
TQT_TQKEYEVENT(e)->accept(); static_cast<TQKeyEvent*>(e)->accept();
} }
} }
} }
@ -3536,7 +3536,7 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e )
//remember currently focued window invalidate act. //remember currently focued window invalidate act.
if (e->type()==TQEvent::FocusOut) { if (e->type()==TQEvent::FocusOut) {
if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) {
if (KexiUtils::hasParent(TQT_TQOBJECT(d->curDialog), TQT_TQOBJECT(focus_w))) { if (KexiUtils::hasParent(TQT_TQOBJECT(d->curDialog), TQT_TQOBJECT(focus_w))) {
invalidateSharedActions(TQT_TQOBJECT(d->curDialog)); invalidateSharedActions(TQT_TQOBJECT(d->curDialog));
d->focus_before_popup=d->curDialog; d->focus_before_popup=d->curDialog;
@ -3558,14 +3558,14 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e )
d->focus_before_popup=0; d->focus_before_popup=0;
return true; return true;
} else if (e->type()==TQEvent::FocusOut) { } else if (e->type()==TQEvent::FocusOut) {
if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Tab) { if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Tab) {
//activate current child: //activate current child:
if (d->curDialog) { if (d->curDialog) {
d->curDialog->activate(); d->curDialog->activate();
return true; return true;
} }
} }
else if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { else if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) {
d->focus_before_popup=w; d->focus_before_popup=w;
} }
//invalidateSharedActions(); //invalidateSharedActions();

@ -338,7 +338,7 @@ bool KexiSimplePrintPreviewWindow::event( TQEvent * e )
{ {
TQEvent::Type t = e->type(); TQEvent::Type t = e->type();
if (t==TQEvent::KeyPress) { if (t==TQEvent::KeyPress) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
const int k = ke->key(); const int k = ke->key();
bool ok = true; bool ok = true;
if (k==TQt::Key_Equal || k==TQt::Key_Plus) if (k==TQt::Key_Equal || k==TQt::Key_Plus)
@ -358,7 +358,7 @@ bool KexiSimplePrintPreviewWindow::event( TQEvent * e )
} }
} }
else if (t==TQEvent::AccelOverride) { else if (t==TQEvent::AccelOverride) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
const int k = ke->key(); const int k = ke->key();
bool ok = true; bool ok = true;
if (k==TQt::Key_PageUp) if (k==TQt::Key_PageUp)

@ -658,7 +658,7 @@ bool KexiStartupDialog::eventFilter( TQObject *o, TQEvent *e )
{ {
if (o==d->templatesWidget_IconListBox && d->templatesWidget_IconListBox) { if (o==d->templatesWidget_IconListBox && d->templatesWidget_IconListBox) {
if (e->type()==TQEvent::KeyPress if (e->type()==TQEvent::KeyPress
&& (TQT_TQKEYEVENT(e)->key()==Key_Enter || TQT_TQKEYEVENT(e)->key()==Key_Return) && (static_cast<TQKeyEvent*>(e)->key()==Key_Enter || static_cast<TQKeyEvent*>(e)->key()==Key_Return)
|| e->type()==TQEvent::MouseButtonDblClick) || e->type()==TQEvent::MouseButtonDblClick)
{ {
const int t_id = d->templatesWidget->activePageIndex(); const int t_id = d->templatesWidget->activePageIndex();

@ -409,9 +409,9 @@ void KexiStartupFileDialog::setFocus()
bool KexiStartupFileDialog::eventFilter ( TQObject * watched, TQEvent * e ) bool KexiStartupFileDialog::eventFilter ( TQObject * watched, TQEvent * e )
{ {
//filter-out ESC key //filter-out ESC key
if (e->type()==TQEvent::KeyPress && TQT_TQKEYEVENT(e)->key()==TQt::Key_Escape if (e->type()==TQEvent::KeyPress && static_cast<TQKeyEvent*>(e)->key()==TQt::Key_Escape
&& TQT_TQKEYEVENT(e)->state()==TQt::NoButton) { && static_cast<TQKeyEvent*>(e)->state()==TQt::NoButton) {
TQT_TQKEYEVENT(e)->accept(); static_cast<TQKeyEvent*>(e)->accept();
emit rejected(); emit rejected();
return true; return true;
} }

@ -338,7 +338,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
} }
else if (e->type()==TQEvent::Enter) { else if (e->type()==TQEvent::Enter) {
if (!d->isEditable if (!d->isEditable
|| /*over button if editable combo*/buttonGeometry().contains( TQT_TQMOUSEEVENT(e)->pos() )) || /*over button if editable combo*/buttonGeometry().contains( static_cast<TQMouseEvent*>(e)->pos() ))
{ {
d->mouseOver = true; d->mouseOver = true;
update(); update();
@ -346,7 +346,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
} }
else if (e->type()==TQEvent::MouseMove) { else if (e->type()==TQEvent::MouseMove) {
if (d->isEditable) { if (d->isEditable) {
const bool overButton = buttonGeometry().contains( TQT_TQMOUSEEVENT(e)->pos() ); const bool overButton = buttonGeometry().contains( static_cast<TQMouseEvent*>(e)->pos() );
if (overButton != d->mouseOver) { if (overButton != d->mouseOver) {
d->mouseOver = overButton; d->mouseOver = overButton;
update(); update();
@ -359,7 +359,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
} }
else if (e->type()==TQEvent::KeyPress) { else if (e->type()==TQEvent::KeyPress) {
// handle F2/F4 // handle F2/F4
if (handleKeyPressEvent(TQT_TQKEYEVENT(e))) if (handleKeyPressEvent(static_cast<TQKeyEvent*>(e)))
return true; return true;
} }
else if (e->type()==TQEvent::FocusOut) { else if (e->type()==TQEvent::FocusOut) {
@ -372,11 +372,11 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
else if (!d->isEditable && d->subWidgetsWithDisabledEvents && d->subWidgetsWithDisabledEvents->find(o)) { else if (!d->isEditable && d->subWidgetsWithDisabledEvents && d->subWidgetsWithDisabledEvents->find(o)) {
if (e->type()==TQEvent::MouseButtonPress) { if (e->type()==TQEvent::MouseButtonPress) {
// clicking the subwidget should mean the same as clicking the combo box (i.e. show the popup) // clicking the subwidget should mean the same as clicking the combo box (i.e. show the popup)
if (handleMousePressEvent(TQT_TQMOUSEEVENT(e))) if (handleMousePressEvent(static_cast<TQMouseEvent*>(e)))
return true; return true;
} }
else if (e->type()==TQEvent::KeyPress) { else if (e->type()==TQEvent::KeyPress) {
if (handleKeyPressEvent(TQT_TQKEYEVENT(e))) if (handleKeyPressEvent(static_cast<TQKeyEvent*>(e)))
return true; return true;
} }
return e->type()!=TQEvent::Paint; return e->type()!=TQEvent::Paint;

@ -394,7 +394,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e )
kexipluginsdbg << "RESIZE" << endl; kexipluginsdbg << "RESIZE" << endl;
if (e->type()==TQEvent::KeyPress) { if (e->type()==TQEvent::KeyPress) {
if (preview()) { if (preview()) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
const int key = ke->key(); const int key = ke->key();
bool tab = ke->state() == TQt::NoButton && key == TQt::Key_Tab; bool tab = ke->state() == TQt::NoButton && key == TQt::Key_Tab;
bool backtab = ((ke->state() == TQt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab) bool backtab = ((ke->state() == TQt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab)
@ -569,7 +569,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e )
} }
else if (e->type()==TQEvent::FocusIn) { else if (e->type()==TQEvent::FocusIn) {
bool focusDataWidget = preview(); bool focusDataWidget = preview();
if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) {
kdDebug() << "->>> focus IN, popup" <<endl; kdDebug() << "->>> focus IN, popup" <<endl;
focusDataWidget = !d->popupFocused; focusDataWidget = !d->popupFocused;
d->popupFocused = false; d->popupFocused = false;
@ -608,7 +608,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e )
} }
} }
else if (e->type()==TQEvent::FocusOut) { else if (e->type()==TQEvent::FocusOut) {
if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) {
//d->widgetFocusedBeforePopup = (TQWidget*)watched; //d->widgetFocusedBeforePopup = (TQWidget*)watched;
d->popupFocused = true; d->popupFocused = true;
} }
@ -616,7 +616,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e )
d->popupFocused = false; d->popupFocused = false;
// d->widgetFocusedBeforePopup = 0; // d->widgetFocusedBeforePopup = 0;
// kdDebug() << "e->type()==TQEvent::FocusOut " << watched->className() << " " <<watched->name() << endl; // kdDebug() << "e->type()==TQEvent::FocusOut " << watched->className() << " " <<watched->name() << endl;
// UNSET_FOCUS_USING_REASON(watched, TQT_TQFOCUSEVENT(e)->reason()); // UNSET_FOCUS_USING_REASON(watched, static_cast<TQFocusEvent*>(e)->reason());
} }
return KexiDBFormBase::eventFilter(watched, e); return KexiDBFormBase::eventFilter(watched, e);
} }

@ -346,7 +346,7 @@ bool KexiDBLineEdit::event( TQEvent * e )
const bool ret = KLineEdit::event( e ); const bool ret = KLineEdit::event( e );
KexiDBTextWidgetInterface::event(e, this, text().isEmpty()); KexiDBTextWidgetInterface::event(e, this, text().isEmpty());
if (e->type()==TQEvent::FocusOut) { if (e->type()==TQEvent::FocusOut) {
TQFocusEvent *fe = TQT_TQFOCUSEVENT(e); TQFocusEvent *fe = static_cast<TQFocusEvent*>(e);
// if (fe->reason()!=TQFocusEvent::ActiveWindow && fe->reason()!=TQFocusEvent::Popup) { // if (fe->reason()!=TQFocusEvent::ActiveWindow && fe->reason()!=TQFocusEvent::Popup) {
if (fe->reason()==TQFocusEvent::Tab || fe->reason()==TQFocusEvent::Backtab) { if (fe->reason()==TQFocusEvent::Tab || fe->reason()==TQFocusEvent::Backtab) {
//display aligned to left after loosing the focus (only if this is tab/backtab event) //display aligned to left after loosing the focus (only if this is tab/backtab event)

@ -1630,7 +1630,7 @@ bool KexiCSVImportDialog::eventFilter ( TQObject * watched, TQEvent * e )
return true; return true;
if (watched == m_startAtLineSpinBox && t==TQEvent::KeyPress) { if (watched == m_startAtLineSpinBox && t==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) {
m_table->setFocus(); m_table->setFocus();
return true; return true;

@ -567,7 +567,7 @@ bool KexiBrowser::eventFilter ( TQObject *o, TQEvent * e )
itemRenameDone(); itemRenameDone();
} }
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) {
if (0==(ke->state() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton))) { if (0==(ke->state() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton))) {
TQListViewItem *it = m_list->selectedItem(); TQListViewItem *it = m_list->selectedItem();
@ -580,7 +580,7 @@ bool KexiBrowser::eventFilter ( TQObject *o, TQEvent * e )
} }
} }
else if (e->type()==TQEvent::AccelOverride) { else if (e->type()==TQEvent::AccelOverride) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
//override delete action //override delete action
if (ke->key()==TQt::Key_Delete && ke->state()==TQt::NoButton) { if (ke->key()==TQt::Key_Delete && ke->state()==TQt::NoButton) {
slotRemove(); slotRemove();

@ -208,10 +208,10 @@ bool KexiRelationViewTableContainerHeader::eventFilter(TQObject *, TQEvent *ev)
{ {
if (ev->type()==TQEvent::MouseMove) if (ev->type()==TQEvent::MouseMove)
{ {
if (m_dragging && TQT_TQMOUSEEVENT(ev)->state()==TQt::LeftButton) { if (m_dragging && static_cast<TQMouseEvent*>(ev)->state()==TQt::LeftButton) {
int diffX,diffY; int diffX,diffY;
diffX=TQT_TQMOUSEEVENT(ev)->globalPos().x()-m_grabX; diffX=static_cast<TQMouseEvent*>(ev)->globalPos().x()-m_grabX;
diffY=TQT_TQMOUSEEVENT(ev)->globalPos().y()-m_grabY; diffY=static_cast<TQMouseEvent*>(ev)->globalPos().y()-m_grabY;
if ((abs(diffX)>2) || (abs(diffY)>2)) if ((abs(diffX)>2) || (abs(diffY)>2))
{ {
TQPoint newPos=parentWidget()->pos()+TQPoint(diffX,diffY); TQPoint newPos=parentWidget()->pos()+TQPoint(diffX,diffY);
@ -245,8 +245,8 @@ bool KexiRelationViewTableContainerHeader::eventFilter(TQObject *, TQEvent *ev)
//move and update helpers //move and update helpers
parentWidget()->move(newPos); parentWidget()->move(newPos);
m_grabX=TQT_TQMOUSEEVENT(ev)->globalPos().x(); m_grabX=static_cast<TQMouseEvent*>(ev)->globalPos().x();
m_grabY=TQT_TQMOUSEEVENT(ev)->globalPos().y(); m_grabY=static_cast<TQMouseEvent*>(ev)->globalPos().y();
// kdDebug()<<"HEADER:emitting moved"<<endl; // kdDebug()<<"HEADER:emitting moved"<<endl;
emit moved(); emit moved();
} }

@ -456,7 +456,7 @@ void KexiBlobTableEdit::handleAction(const TQString& actionName)
bool KexiBlobTableEdit::eventFilter( TQObject *o, TQEvent *e ) bool KexiBlobTableEdit::eventFilter( TQObject *o, TQEvent *e )
{ {
if (o == d->popup && e->type()==TQEvent::KeyPress) { if (o == d->popup && e->type()==TQEvent::KeyPress) {
TQKeyEvent* ke = TQT_TQKEYEVENT(e); TQKeyEvent* ke = static_cast<TQKeyEvent*>(e);
const int state = ke->state(); const int state = ke->state();
const int k = ke->key(); const int k = ke->key();
if ( (state==TQt::NoButton && (k==TQt::Key_Tab || k==TQt::Key_Left || k==TQt::Key_Right)) if ( (state==TQt::NoButton && (k==TQt::Key_Tab || k==TQt::Key_Left || k==TQt::Key_Right))

@ -351,7 +351,7 @@ bool KexiComboBoxPopup::eventFilter( TQObject *o, TQEvent *e )
} }
else if (o==d->tv) { else if (o==d->tv) {
if (e->type()==TQEvent::KeyPress) { if (e->type()==TQEvent::KeyPress) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
const int k = ke->key(); const int k = ke->key();
if ((ke->state()==TQt::NoButton && (k==Key_Escape || k==Key_F4)) if ((ke->state()==TQt::NoButton && (k==Key_Escape || k==Key_F4))
|| (ke->state()==AltButton && k==Key_Up)) || (ke->state()==AltButton && k==Key_Up))

@ -348,7 +348,7 @@ int KexiComboBoxTableEdit::widthForValue( TQVariant &val, const TQFontMetrics &f
bool KexiComboBoxTableEdit::eventFilter( TQObject *o, TQEvent *e ) bool KexiComboBoxTableEdit::eventFilter( TQObject *o, TQEvent *e )
{ {
if (!column()->isReadOnly() && e->type()==TQEvent::MouseButtonPress && m_scrollView) { if (!column()->isReadOnly() && e->type()==TQEvent::MouseButtonPress && m_scrollView) {
TQPoint gp = TQT_TQMOUSEEVENT(e)->globalPos() TQPoint gp = static_cast<TQMouseEvent*>(e)->globalPos()
+ TQPoint(m_scrollView->childX(d->button), m_scrollView->childY(d->button)); + TQPoint(m_scrollView->childX(d->button), m_scrollView->childY(d->button));
TQRect r(d->button->mapToGlobal(d->button->geometry().topLeft()), TQRect r(d->button->mapToGlobal(d->button->geometry().topLeft()),
d->button->mapToGlobal(d->button->geometry().bottomRight())); d->button->mapToGlobal(d->button->geometry().bottomRight()));

@ -124,7 +124,7 @@ KexiTableEdit::eventFilter(TQObject* watched, TQEvent* e)
{ {
if(e->type() == TQEvent::KeyPress) if(e->type() == TQEvent::KeyPress)
{ {
TQKeyEvent* ev = TQT_TQKEYEVENT(e); TQKeyEvent* ev = static_cast<TQKeyEvent*>(e);
if(ev->key() == Key_Escape) if(ev->key() == Key_Escape)
{ {

@ -2412,7 +2412,7 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e )
if (e->type()==TQEvent::KeyPress) { if (e->type()==TQEvent::KeyPress) {
if (e->spontaneous() /*|| e->type()==TQEvent::AccelOverride*/) { if (e->spontaneous() /*|| e->type()==TQEvent::AccelOverride*/) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
const int k = ke->key(); const int k = ke->key();
int s = ke->state(); int s = ke->state();
//cell editor's events: //cell editor's events:

@ -120,7 +120,7 @@ void KexiTableViewHeader::setToolTip( int section, const TQString & toolTip )
bool KexiTableViewHeader::eventFilter(TQObject * watched, TQEvent * e) bool KexiTableViewHeader::eventFilter(TQObject * watched, TQEvent * e)
{ {
if (e->type()==TQEvent::MouseMove) { if (e->type()==TQEvent::MouseMove) {
const int section = sectionAt( TQT_TQMOUSEEVENT(e)->x() ); const int section = sectionAt( static_cast<TQMouseEvent*>(e)->x() );
if (section != m_lastToolTipSection && section >= 0 && section < (int)m_toolTips.count()) { if (section != m_lastToolTipSection && section >= 0 && section < (int)m_toolTips.count()) {
TQToolTip::remove(this, m_toolTipRect); TQToolTip::remove(this, m_toolTipRect);
TQString tip = m_toolTips[ section ]; TQString tip = m_toolTips[ section ];

@ -196,7 +196,7 @@ bool KexiRecordNavigator::eventFilter( TQObject *o, TQEvent *e )
bool recordEntered = false; bool recordEntered = false;
bool ret; bool ret;
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 TQt::Key_Escape: { case TQt::Key_Escape: {
ke->accept(); ke->accept();
@ -218,9 +218,9 @@ bool KexiRecordNavigator::eventFilter( TQObject *o, TQEvent *e )
} }
} }
else if (e->type()==TQEvent::FocusOut) { else if (e->type()==TQEvent::FocusOut) {
if (TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Tab if (static_cast<TQFocusEvent*>(e)->reason()!=TQFocusEvent::Tab
&& TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Backtab && static_cast<TQFocusEvent*>(e)->reason()!=TQFocusEvent::Backtab
&& TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Other) && static_cast<TQFocusEvent*>(e)->reason()!=TQFocusEvent::Other)
recordEntered=true; recordEntered=true;
ret = false; ret = false;
} }

@ -51,7 +51,7 @@ bool AddStencilTool::processEvent(TQEvent* e)
switch(e->type()) { switch(e->type()) {
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) {
m_leftMouseButtonPressed = true; m_leftMouseButtonPressed = true;
@ -63,7 +63,7 @@ bool AddStencilTool::processEvent(TQEvent* e)
} }
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if(m_leftMouseButtonPressed && (me->button() == TQt::LeftButton)) { if(m_leftMouseButtonPressed && (me->button() == TQt::LeftButton)) {
m_leftMouseButtonPressed = false; m_leftMouseButtonPressed = false;
@ -75,7 +75,7 @@ bool AddStencilTool::processEvent(TQEvent* e)
} }
case TQEvent::MouseMove: case TQEvent::MouseMove:
{ {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if(m_leftMouseButtonPressed) { if(m_leftMouseButtonPressed) {
resize(me->pos()); resize(me->pos());

@ -99,7 +99,7 @@ bool KivioBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev)
} }
if (o == canvas && ev->type() == TQEvent::MouseMove) { if (o == canvas && ev->type() == TQEvent::MouseMove) {
TQMouseEvent* me = TQT_TQMOUSEEVENT(ev); TQMouseEvent* me = static_cast<TQMouseEvent*>(ev);
if (me->state() == TQt::LeftButton) if (me->state() == TQt::LeftButton)
handleMouseMoveAction(me->pos()); handleMouseMoveAction(me->pos());
else else
@ -110,7 +110,7 @@ bool KivioBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev)
} }
if (o == canvas && ev->type() == TQEvent::MouseButtonPress) { if (o == canvas && ev->type() == TQEvent::MouseButtonPress) {
TQMouseEvent* me = TQT_TQMOUSEEVENT(ev); TQMouseEvent* me = static_cast<TQMouseEvent*>(ev);
if (me->button() == TQt::LeftButton) if (me->button() == TQt::LeftButton)
handleMousePress(me->pos()); handleMousePress(me->pos());

@ -93,17 +93,17 @@ bool ConnectorTool::processEvent(TQEvent* e)
switch (e->type()) switch (e->type())
{ {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
mousePress( TQT_TQMOUSEEVENT(e) ); mousePress( static_cast<TQMouseEvent*>(e) );
return true; return true;
break; break;
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
mouseRelease( TQT_TQMOUSEEVENT(e) ); mouseRelease( static_cast<TQMouseEvent*>(e) );
return true; return true;
break; break;
case TQEvent::MouseMove: case TQEvent::MouseMove:
mouseMove( TQT_TQMOUSEEVENT(e) ); mouseMove( static_cast<TQMouseEvent*>(e) );
return true; return true;
break; break;

@ -128,13 +128,13 @@ bool SelectTool::processEvent(TQEvent* e)
break; break;
case TQEvent::MouseMove: case TQEvent::MouseMove:
mouseMove( TQT_TQMOUSEEVENT(e)); mouseMove( static_cast<TQMouseEvent*>(e));
return true; return true;
break; break;
case TQEvent::KeyPress: case TQEvent::KeyPress:
if((TQT_TQKEYEVENT(e)->key() >= Key_Left) && (TQT_TQKEYEVENT(e)->key() <= Key_Down)) { if((static_cast<TQKeyEvent*>(e)->key() >= Key_Left) && (static_cast<TQKeyEvent*>(e)->key() <= Key_Down)) {
keyPress(TQT_TQKEYEVENT(e)); keyPress(static_cast<TQKeyEvent*>(e));
return true; return true;
} }
break; break;

@ -49,10 +49,10 @@ namespace Kivio {
bool TargetTool::processEvent(TQEvent* e) bool TargetTool::processEvent(TQEvent* e)
{ {
if(e->type() == TQEvent::MouseButtonPress) { if(e->type() == TQEvent::MouseButtonPress) {
mousePress(TQT_TQMOUSEEVENT(e)); mousePress(static_cast<TQMouseEvent*>(e));
return true; return true;
} else if(e->type() == TQEvent::MouseMove) { } else if(e->type() == TQEvent::MouseMove) {
mouseMove(TQT_TQMOUSEEVENT(e)); mouseMove(static_cast<TQMouseEvent*>(e));
return true; return true;
} }

@ -110,14 +110,14 @@ bool ZoomTool::processEvent(TQEvent* e)
if(!m_bHandMode) { if(!m_bHandMode) {
switch(e->type()) { switch(e->type()) {
case TQEvent::KeyPress: case TQEvent::KeyPress:
if (!m_bLockKeyboard && (TQT_TQKEYEVENT(e)->key() == Key_Shift)) { if (!m_bLockKeyboard && (static_cast<TQKeyEvent*>(e)->key() == Key_Shift)) {
m_pCurrent = m_pMinus; m_pCurrent = m_pMinus;
canvas->setCursor(*m_pMinusCursor); canvas->setCursor(*m_pMinusCursor);
return true; return true;
} }
break; break;
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
if (!m_bLockKeyboard && (TQT_TQKEYEVENT(e)->key() == Key_Shift)) { if (!m_bLockKeyboard && (static_cast<TQKeyEvent*>(e)->key() == Key_Shift)) {
m_pCurrent = m_pPlus; m_pCurrent = m_pPlus;
canvas->setCursor(*m_pPlusCursor); canvas->setCursor(*m_pPlusCursor);
return true; return true;
@ -125,7 +125,7 @@ bool ZoomTool::processEvent(TQEvent* e)
break; break;
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(m_pCurrent == m_pMinus) { if(m_pCurrent == m_pMinus) {
@ -153,7 +153,7 @@ bool ZoomTool::processEvent(TQEvent* e)
break; break;
case TQEvent::MouseMove: case TQEvent::MouseMove:
if (m_bDrawRubber) { if (m_bDrawRubber) {
canvas->continueRectDraw(TQT_TQMOUSEEVENT(e)->pos(), KivioCanvas::Rubber); canvas->continueRectDraw(static_cast<TQMouseEvent*>(e)->pos(), KivioCanvas::Rubber);
return true; return true;
} }
break; break;
@ -164,7 +164,7 @@ bool ZoomTool::processEvent(TQEvent* e)
switch(e->type()) { switch(e->type()) {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
isHandMousePressed = true; isHandMousePressed = true;
mousePos = TQT_TQMOUSEEVENT(e)->pos(); mousePos = static_cast<TQMouseEvent*>(e)->pos();
return true; return true;
break; break;
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
@ -174,7 +174,7 @@ bool ZoomTool::processEvent(TQEvent* e)
case TQEvent::MouseMove: case TQEvent::MouseMove:
if (isHandMousePressed) { if (isHandMousePressed) {
canvas->setUpdatesEnabled(false); canvas->setUpdatesEnabled(false);
TQPoint newPos = TQT_TQMOUSEEVENT(e)->pos(); TQPoint newPos = static_cast<TQMouseEvent*>(e)->pos();
mousePos -= newPos; mousePos -= newPos;
canvas->scrollDx(-mousePos.x()); canvas->scrollDx(-mousePos.x());
canvas->scrollDy(-mousePos.y()); canvas->scrollDy(-mousePos.y());

@ -226,7 +226,7 @@ bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e )
return TRUE; return TRUE;
case TQEvent::KeyPress: case TQEvent::KeyPress:
{ {
TQKeyEvent * keyev = TQT_TQKEYEVENT(e); TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
if ( keyev->key() == TDEGlobalSettings::contextMenuKey() ) { if ( keyev->key() == TDEGlobalSettings::contextMenuKey() ) {
popupContextMenu(); popupContextMenu();
return true; return true;
@ -249,7 +249,7 @@ bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::AccelOverride: case TQEvent::AccelOverride:
{ {
#ifndef NDEBUG #ifndef NDEBUG
TQKeyEvent * keyev = TQT_TQKEYEVENT(e); TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
// Debug keys // Debug keys
if ( ( keyev->state() & ControlButton ) && ( keyev->state() & ShiftButton ) ) if ( ( keyev->state() & ControlButton ) && ( keyev->state() & ShiftButton ) )
{ {

@ -357,7 +357,7 @@ bool Canvas::eventFilter( TQObject *o, TQEvent *e )
{ {
case TQEvent::KeyPress: case TQEvent::KeyPress:
{ {
TQKeyEvent * keyev = TQT_TQKEYEVENT(e); TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
if ((keyev->key()==Key_Tab) || (keyev->key()==Key_Backtab)) if ((keyev->key()==Key_Tab) || (keyev->key()==Key_Backtab))
{ {
keyPressEvent ( keyev ); keyPressEvent ( keyev );

@ -1725,7 +1725,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
{ {
// kdDebug() << " KeyPress m_currentFrameSetEdit=" << m_currentFrameSetEdit << " isRW="<<m_doc->isReadWrite() << endl; // kdDebug() << " KeyPress m_currentFrameSetEdit=" << m_currentFrameSetEdit << " isRW="<<m_doc->isReadWrite() << endl;
// kdDebug() << " m_printing=" << m_printing << " mousemode=" << m_mouseMode << " (MM_EDIT=" << MM_EDIT<<")"<<endl; // kdDebug() << " m_printing=" << m_printing << " mousemode=" << m_mouseMode << " (MM_EDIT=" << MM_EDIT<<")"<<endl;
TQKeyEvent * keyev = TQT_TQKEYEVENT(e); TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
#ifndef NDEBUG #ifndef NDEBUG
// Debug keys // Debug keys
if ( ( keyev->state() & ControlButton ) && ( keyev->state() & ShiftButton ) ) if ( ( keyev->state() & ControlButton ) && ( keyev->state() & ShiftButton ) )
@ -1768,7 +1768,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
{ {
// kdDebug() << " KeyPress m_currentFrameSetEdit=" << m_currentFrameSetEdit << " isRW="<<m_doc->isReadWrite() << endl; // kdDebug() << " KeyPress m_currentFrameSetEdit=" << m_currentFrameSetEdit << " isRW="<<m_doc->isReadWrite() << endl;
// kdDebug() << " m_printing=" << m_printing << " mousemode=" << m_mouseMode << " (MM_EDIT=" << MM_EDIT<<")"<<endl; // kdDebug() << " m_printing=" << m_printing << " mousemode=" << m_mouseMode << " (MM_EDIT=" << MM_EDIT<<")"<<endl;
TQKeyEvent * keyev = TQT_TQKEYEVENT(e); TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
// By default PgUp and PgDown move the scrollbars and not the caret anymore - this is done here // By default PgUp and PgDown move the scrollbars and not the caret anymore - this is done here
if ( !m_doc->pgUpDownMovesCaret() && ( (keyev->state() & ShiftButton) == 0 ) if ( !m_doc->pgUpDownMovesCaret() && ( (keyev->state() & ShiftButton) == 0 )
&& ( keyev->key() == TQt::Key_PageUp || keyev->key() == Key_PageDown ) ) && ( keyev->key() == TQt::Key_PageUp || keyev->key() == Key_PageDown ) )
@ -1879,7 +1879,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
} break; } break;
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
{ {
TQKeyEvent * keyev = TQT_TQKEYEVENT(e); TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
if ( keyev->key() == TQt::Key_Control ) if ( keyev->key() == TQt::Key_Control )
{ {
TQPoint mousep = mapFromGlobal(TQCursor::pos()) + TQPoint( contentsX(), contentsY() ); TQPoint mousep = mapFromGlobal(TQCursor::pos()) + TQPoint( contentsX(), contentsY() );

@ -302,7 +302,7 @@ bool KoContainerHandler::eventFilter( TQObject*, TQEvent* ev )
{ {
KoChild::Gadget gadget; KoChild::Gadget gadget;
TQPoint pos; TQPoint pos;
TQMouseEvent *e=TQT_TQMOUSEEVENT(ev); TQMouseEvent *e=static_cast<TQMouseEvent*>(ev);
KoChild *ch=child(gadget, pos, e); KoChild *ch=child(gadget, pos, e);
if ( e->button() == TQt::RightButton && gadget != KoChild::NoGadget ) if ( e->button() == TQt::RightButton && gadget != KoChild::NoGadget )
@ -327,7 +327,7 @@ bool KoContainerHandler::eventFilter( TQObject*, TQEvent* ev )
TQWidget *targetWidget = TQT_TQWIDGET( target() ); TQWidget *targetWidget = TQT_TQWIDGET( target() );
KoChild::Gadget gadget; KoChild::Gadget gadget;
TQPoint pos; TQPoint pos;
TQMouseEvent *e=TQT_TQMOUSEEVENT(ev); TQMouseEvent *e=static_cast<TQMouseEvent*>(ev);
child(gadget, pos, e); child(gadget, pos, e);
bool retval = true; bool retval = true;

@ -811,7 +811,7 @@ bool KoToolButton::eventFilter( TQObject* o, TQEvent* e )
{ {
if ( o == m_popup ) { if ( o == m_popup ) {
if ( e->type() == TQEvent::MouseButtonPress ) if ( e->type() == TQEvent::MouseButtonPress )
if ( hitArrow( mapFromGlobal( TQT_TQMOUSEEVENT( e )->globalPos() ) ) ) { if ( hitArrow( mapFromGlobal( static_cast<TQMouseEvent*>( e )->globalPos() ) ) ) {
kdDebug() << "KoToolButton::eventFilter-------------->" << endl; kdDebug() << "KoToolButton::eventFilter-------------->" << endl;
m_popup->close(); m_popup->close();
m_arrowPressed = false; m_arrowPressed = false;
@ -821,7 +821,7 @@ bool KoToolButton::eventFilter( TQObject* o, TQEvent* e )
} }
if ( e->type() == TQEvent::MouseButtonPress ) { if ( e->type() == TQEvent::MouseButtonPress ) {
m_arrowPressed = hitArrow( TQT_TQMOUSEEVENT( e )->pos() ); m_arrowPressed = hitArrow( static_cast<TQMouseEvent*>( e )->pos() );
if ( m_arrowPressed ) if ( m_arrowPressed )
m_popup->popup( mapToGlobal( TQPoint( 0, height() ) ) ); m_popup->popup( mapToGlobal( TQPoint( 0, height() ) ) );
} }

@ -916,7 +916,7 @@ bool
Editor::eventFilter( TQObject * watched, TQEvent * e ) Editor::eventFilter( TQObject * watched, TQEvent * e )
{ {
if ((watched==this || watched==viewport()) && e->type()==TQEvent::KeyPress) { if ((watched==this || watched==viewport()) && e->type()==TQEvent::KeyPress) {
if (handleKeyPress(TQT_TQKEYEVENT(e))) if (handleKeyPress(static_cast<TQKeyEvent*>(e)))
return true; return true;
} }
return TDEListView::eventFilter(watched, e); return TDEListView::eventFilter(watched, e);

@ -157,7 +157,7 @@ class GroupWidgetBase : public TQWidget
virtual bool event( TQEvent * e ) { virtual bool event( TQEvent * e ) {
if (e->type()==TQEvent::MouseButtonPress || e->type()==TQEvent::MouseButtonRelease) { if (e->type()==TQEvent::MouseButtonPress || e->type()==TQEvent::MouseButtonRelease) {
TQMouseEvent* me = TQT_TQMOUSEEVENT(e); TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if (me->button() == TQt::LeftButton) { if (me->button() == TQt::LeftButton) {
m_mouseDown = e->type()==TQEvent::MouseButtonPress; m_mouseDown = e->type()==TQEvent::MouseButtonPress;
update(); update();
@ -238,7 +238,7 @@ void GroupContainer::setContents( TQWidget* contents )
bool GroupContainer::event( TQEvent * e ) { bool GroupContainer::event( 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 && d->contents && d->groupWidget->rect().contains(me->pos())) { if (me->button() == TQt::LeftButton && d->contents && d->groupWidget->rect().contains(me->pos())) {
d->groupWidget->setOpen(!d->groupWidget->isOpen()); d->groupWidget->setOpen(!d->groupWidget->isOpen());
if (d->groupWidget->isOpen()) if (d->groupWidget->isOpen())

@ -131,7 +131,7 @@ bool
BoolEdit::eventFilter(TQObject* watched, TQEvent* e) BoolEdit::eventFilter(TQObject* watched, TQEvent* e)
{ {
if(e->type() == TQEvent::KeyPress) { if(e->type() == TQEvent::KeyPress) {
TQKeyEvent* ev = TQT_TQKEYEVENT(e); TQKeyEvent* ev = static_cast<TQKeyEvent*>(e);
const int k = ev->key(); const int k = ev->key();
if(k == TQt::Key_Space || k == TQt::Key_Enter || k == TQt::Key_Return) { if(k == TQt::Key_Space || k == TQt::Key_Enter || k == TQt::Key_Return) {
if (m_toggle) if (m_toggle)

@ -138,7 +138,7 @@ bool
FontEdit::eventFilter(TQObject* watched, TQEvent* e) FontEdit::eventFilter(TQObject* watched, TQEvent* e)
{ {
if(e->type() == TQEvent::KeyPress) { if(e->type() == TQEvent::KeyPress) {
TQKeyEvent* ev = TQT_TQKEYEVENT(e); TQKeyEvent* ev = static_cast<TQKeyEvent*>(e);
if(ev->key() == Key_Space) { if(ev->key() == Key_Space) {
m_edit->button()->animateClick(); m_edit->button()->animateClick();
return true; return true;

@ -206,7 +206,7 @@ bool
PixmapEdit::eventFilter(TQObject *o, TQEvent *ev) PixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
{ {
if(o == m_edit) { if(o == m_edit) {
if(ev->type() == TQEvent::MouseButtonPress && TQT_TQMOUSEEVENT(ev)->button()==TQt::LeftButton) { if(ev->type() == TQEvent::MouseButtonPress && static_cast<TQMouseEvent*>(ev)->button()==TQt::LeftButton) {
if(m_previewPixmap.height() <= m_edit->height() if(m_previewPixmap.height() <= m_edit->height()
&& m_previewPixmap.width() <= m_edit->width()) && m_previewPixmap.width() <= m_edit->width())
return false; return false;
@ -227,7 +227,7 @@ PixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
m_popup->hide(); m_popup->hide();
} }
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() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return)) { if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return)) {
m_button->animateClick(); m_button->animateClick();
return true; return true;

@ -63,7 +63,7 @@ IntSpinBox::eventFilter(TQObject *o, TQEvent *e)
{ {
if(e->type() == TQEvent::KeyPress) if(e->type() == TQEvent::KeyPress)
{ {
TQKeyEvent* ev = TQT_TQKEYEVENT(e); TQKeyEvent* ev = static_cast<TQKeyEvent*>(e);
if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state() !=ControlButton) if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state() !=ControlButton)
{ {
parentWidget()->eventFilter(o, e); parentWidget()->eventFilter(o, e);
@ -196,7 +196,7 @@ DoubleSpinBox::eventFilter(TQObject *o, TQEvent *e)
{ {
if(e->type() == TQEvent::KeyPress) if(e->type() == TQEvent::KeyPress)
{ {
TQKeyEvent* ev = TQT_TQKEYEVENT(e); TQKeyEvent* ev = static_cast<TQKeyEvent*>(e);
if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state()!=ControlButton) if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state()!=ControlButton)
{ {
parentWidget()->eventFilter(o, e); parentWidget()->eventFilter(o, e);

@ -109,7 +109,7 @@ Widget::eventFilter(TQObject*, TQEvent* e)
{ {
if(e->type() == TQEvent::KeyPress) if(e->type() == TQEvent::KeyPress)
{ {
TQKeyEvent* ev = TQT_TQKEYEVENT(e); TQKeyEvent* ev = static_cast<TQKeyEvent*>(e);
if(ev->key() == Key_Escape) if(ev->key() == Key_Escape)
{ {
emit rejectInput(this); emit rejectInput(this);

Loading…
Cancel
Save