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::TabletRelease:
{
TQTabletEvent *te = TQT_TQTABLETEVENT(e);
TQTabletEvent *te = static_cast<TQTabletEvent*>(e);
KisInputDevice device;
switch (te->device()) {

@ -308,11 +308,11 @@ void KoBirdEyePanel::updateVisibleArea()
bool KoBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev)
{
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) {
paintViewEvent(TQT_TQPAINTEVENT(ev));
paintViewEvent(static_cast<TQPaintEvent*>(ev));
}
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();
TQMouseEvent* mouseEvent = TQT_TQMOUSEEVENT( event );
TQMouseEvent* mouseEvent = static_cast<TQMouseEvent*>( event );
if( event->type() == TQEvent::MouseButtonPress )
{
m_firstPoint.setX( mouseEvent->pos().x() );

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

@ -84,7 +84,7 @@ VStrokeFillPreview::paintEvent( TQPaintEvent* event )
bool
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 ey = e->y() - int( ( height() - PANEL_SIZEY ) / 2 );

@ -63,7 +63,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev)
// we need to simulate the Press event
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)
{
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;
m_moving = TQT_TQWIDGET(s);
TQMouseEvent *mev = TQT_TQMOUSEEVENT(e);
TQMouseEvent *mev = static_cast<TQMouseEvent*>(e);
m_grab = TQPoint(mev->x(), mev->y());
// we are drawing a connection
@ -239,7 +239,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
case TQEvent::MouseButtonRelease:
{
TQMouseEvent *mev = TQT_TQMOUSEEVENT(e);
TQMouseEvent *mev = static_cast<TQMouseEvent*>(e);
if (!m_mousePressEventReceived) {
m_mouseReleaseEvent = *mev;
m_objectForMouseReleaseEvent = s;
@ -252,7 +252,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
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)) ||
(mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) || (mev->state() == (TQt::LeftButton|TQt::ShiftButton)) ) )
// draw the insert rect
@ -343,7 +343,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
//case TQEvent::AccelOverride:
case TQEvent::KeyPress:
{
TQKeyEvent *kev = TQT_TQKEYEVENT(e);
TQKeyEvent *kev = static_cast<TQKeyEvent*>(e);
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
TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), TQt::NoButton,
TQt::LeftButton|TQt::ControlButton );
eventFilter(TQT_TQOBJECT(m_moving), TQT_TQEVENT(mev));
eventFilter(m_moving, mev);
delete mev;
}
else if(kev->key() == FormManager::self()->contextMenuKey())
@ -435,7 +435,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
case TQEvent::KeyRelease:
{
TQKeyEvent *kev = TQT_TQKEYEVENT(e);
TQKeyEvent *kev = static_cast<TQKeyEvent*>(e);
if((kev->key() == Key_Control) && (m_state == CopyingWidget)) {
// cancel copying
//m_copyRect = TQRect();

@ -388,7 +388,7 @@ WidgetFactory::eventFilter(TQObject *obj, TQEvent *ev)
if(obj != (TQObject *)w)
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))
resetEditor();
if(e->key() == TQt::Key_Escape)

@ -749,13 +749,13 @@ WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev)
return false;
if(d->lastGeoCommand)
d->lastGeoCommand->setPos(TQT_TQMOVEEVENT(ev)->pos());
d->lastGeoCommand->setPos(static_cast<TQMoveEvent*>(ev)->pos());
else {
TQStringList list;
foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets)
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())
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)
{
TQEvent fe( TQEvent::FocusIn );
TQT_TQFOCUSEVENT(&fe)->setReason(reason);
static_cast<TQFocusEvent*>(&fe)->setReason(reason);
TQApplication::sendEvent( widget, &fe );
TQT_TQFOCUSEVENT(&fe)->resetReason();
static_cast<TQFocusEvent*>(&fe)->resetReason();
}
void KexiUtils::unsetFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason)
{
TQEvent fe( TQEvent::FocusOut );
TQT_TQFOCUSEVENT(&fe)->setReason(reason);
static_cast<TQFocusEvent*>(&fe)->setReason(reason);
TQApplication::sendEvent( widget, &fe );
TQT_TQFOCUSEVENT(&fe)->resetReason();
static_cast<TQFocusEvent*>(&fe)->resetReason();
}
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;
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;
}
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
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
&& (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.
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))) {
invalidateSharedActions(TQT_TQOBJECT(d->curDialog));
d->focus_before_popup=d->curDialog;
@ -3558,14 +3558,14 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e )
d->focus_before_popup=0;
return true;
} else if (e->type()==TQEvent::FocusOut) {
if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Tab) {
if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Tab) {
//activate current child:
if (d->curDialog) {
d->curDialog->activate();
return true;
}
}
else if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
else if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) {
d->focus_before_popup=w;
}
//invalidateSharedActions();

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

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

@ -338,7 +338,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
}
else if (e->type()==TQEvent::Enter) {
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;
update();
@ -346,7 +346,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
}
else if (e->type()==TQEvent::MouseMove) {
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) {
d->mouseOver = overButton;
update();
@ -359,7 +359,7 @@ bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
}
else if (e->type()==TQEvent::KeyPress) {
// handle F2/F4
if (handleKeyPressEvent(TQT_TQKEYEVENT(e)))
if (handleKeyPressEvent(static_cast<TQKeyEvent*>(e)))
return true;
}
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)) {
if (e->type()==TQEvent::MouseButtonPress) {
// 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;
}
else if (e->type()==TQEvent::KeyPress) {
if (handleKeyPressEvent(TQT_TQKEYEVENT(e)))
if (handleKeyPressEvent(static_cast<TQKeyEvent*>(e)))
return true;
}
return e->type()!=TQEvent::Paint;

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

@ -346,7 +346,7 @@ bool KexiDBLineEdit::event( TQEvent * e )
const bool ret = KLineEdit::event( e );
KexiDBTextWidgetInterface::event(e, this, text().isEmpty());
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::Tab || fe->reason()==TQFocusEvent::Backtab) {
//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;
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) {
m_table->setFocus();
return true;

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

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

@ -456,7 +456,7 @@ void KexiBlobTableEdit::handleAction(const TQString& actionName)
bool KexiBlobTableEdit::eventFilter( TQObject *o, TQEvent *e )
{
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 k = ke->key();
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) {
if (e->type()==TQEvent::KeyPress) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e);
TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
const int k = ke->key();
if ((ke->state()==TQt::NoButton && (k==Key_Escape || k==Key_F4))
|| (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 )
{
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));
TQRect r(d->button->mapToGlobal(d->button->geometry().topLeft()),
d->button->mapToGlobal(d->button->geometry().bottomRight()));

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

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

@ -120,7 +120,7 @@ void KexiTableViewHeader::setToolTip( int section, const TQString & toolTip )
bool KexiTableViewHeader::eventFilter(TQObject * watched, TQEvent * e)
{
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()) {
TQToolTip::remove(this, m_toolTipRect);
TQString tip = m_toolTips[ section ];

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

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

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

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

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

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

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

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

@ -357,7 +357,7 @@ bool Canvas::eventFilter( TQObject *o, TQEvent *e )
{
case TQEvent::KeyPress:
{
TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
if ((keyev->key()==Key_Tab) || (keyev->key()==Key_Backtab))
{
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() << " 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
// Debug keys
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() << " 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
if ( !m_doc->pgUpDownMovesCaret() && ( (keyev->state() & ShiftButton) == 0 )
&& ( keyev->key() == TQt::Key_PageUp || keyev->key() == Key_PageDown ) )
@ -1879,7 +1879,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
} break;
case TQEvent::KeyRelease:
{
TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
TQKeyEvent * keyev = static_cast<TQKeyEvent*>(e);
if ( keyev->key() == TQt::Key_Control )
{
TQPoint mousep = mapFromGlobal(TQCursor::pos()) + TQPoint( contentsX(), contentsY() );

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

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

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

@ -157,7 +157,7 @@ class GroupWidgetBase : public TQWidget
virtual bool event( TQEvent * e ) {
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) {
m_mouseDown = e->type()==TQEvent::MouseButtonPress;
update();
@ -238,7 +238,7 @@ void GroupContainer::setContents( TQWidget* contents )
bool GroupContainer::event( TQEvent * e ) {
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())) {
d->groupWidget->setOpen(!d->groupWidget->isOpen());
if (d->groupWidget->isOpen())

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

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

@ -206,7 +206,7 @@ bool
PixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
{
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()
&& m_previewPixmap.width() <= m_edit->width())
return false;
@ -227,7 +227,7 @@ PixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
m_popup->hide();
}
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)) {
m_button->animateClick();
return true;

@ -63,7 +63,7 @@ IntSpinBox::eventFilter(TQObject *o, TQEvent *e)
{
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)
{
parentWidget()->eventFilter(o, e);
@ -196,7 +196,7 @@ DoubleSpinBox::eventFilter(TQObject *o, TQEvent *e)
{
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)
{
parentWidget()->eventFilter(o, e);

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

Loading…
Cancel
Save