diff options
author | Michele Calgaro <[email protected]> | 2023-11-30 20:43:20 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-11-30 23:46:05 +0900 |
commit | 5761876d3a71e9b3c5a93b5b535b071d2240b08e (patch) | |
tree | 0ea383b7af28380ecec4a4059b1ed0bdcdbe8338 /kexi | |
parent | 2891d3c2d54dea1e2dd2a6702ee209b6f01f73f4 (diff) | |
download | koffice-5761876d3a71e9b3c5a93b5b535b071d2240b08e.tar.gz koffice-5761876d3a71e9b3c5a93b5b535b071d2240b08e.zip |
Replace 'Event' #define strings
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit d7ae9fb514226c126e04cfe4f34800beb9f4ea19)
Diffstat (limited to 'kexi')
21 files changed, 55 insertions, 55 deletions
diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index 17f1ced8..ae75caa2 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -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(); diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp index 14fd2665..6611be2f 100644 --- a/kexi/formeditor/widgetfactory.cpp +++ b/kexi/formeditor/widgetfactory.cpp @@ -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) diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index 99e6f511..5beed16b 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -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); } diff --git a/kexi/kexiutils/utils.cpp b/kexi/kexiutils/utils.cpp index ed62c07c..4a0d5489 100644 --- a/kexi/kexiutils/utils.cpp +++ b/kexi/kexiutils/utils.cpp @@ -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) diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index 1c313ba2..0920928b 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -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(); diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp index 3870f09e..b6cb9f44 100644 --- a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp +++ b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp @@ -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) diff --git a/kexi/main/startup/KexiStartupDialog.cpp b/kexi/main/startup/KexiStartupDialog.cpp index 9f3e5de7..c738d192 100644 --- a/kexi/main/startup/KexiStartupDialog.cpp +++ b/kexi/main/startup/KexiStartupDialog.cpp @@ -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(); diff --git a/kexi/main/startup/KexiStartupFileDialog.cpp b/kexi/main/startup/KexiStartupFileDialog.cpp index 7b0aa5c8..61aa0735 100644 --- a/kexi/main/startup/KexiStartupFileDialog.cpp +++ b/kexi/main/startup/KexiStartupFileDialog.cpp @@ -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; } diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp index 088d0a48..5fb89443 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -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; diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index 0fb4519e..81ce6684 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -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); } diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp index 5d1fadf6..5e2ac08a 100644 --- a/kexi/plugins/forms/widgets/kexidblineedit.cpp +++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp @@ -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) diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp index daf536c5..9c9c5f22 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp @@ -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; diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp index 1d59dae0..dd0b16a1 100644 --- a/kexi/widget/kexibrowser.cpp +++ b/kexi/widget/kexibrowser.cpp @@ -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(); diff --git a/kexi/widget/relations/kexirelationviewtable.cpp b/kexi/widget/relations/kexirelationviewtable.cpp index 347805be..7053c778 100644 --- a/kexi/widget/relations/kexirelationviewtable.cpp +++ b/kexi/widget/relations/kexirelationviewtable.cpp @@ -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(); } diff --git a/kexi/widget/tableview/kexiblobtableedit.cpp b/kexi/widget/tableview/kexiblobtableedit.cpp index 75f51611..b3de3419 100644 --- a/kexi/widget/tableview/kexiblobtableedit.cpp +++ b/kexi/widget/tableview/kexiblobtableedit.cpp @@ -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)) diff --git a/kexi/widget/tableview/kexicomboboxpopup.cpp b/kexi/widget/tableview/kexicomboboxpopup.cpp index dfd6edb4..6877bd78 100644 --- a/kexi/widget/tableview/kexicomboboxpopup.cpp +++ b/kexi/widget/tableview/kexicomboboxpopup.cpp @@ -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)) diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp index a818e40b..0ac9923e 100644 --- a/kexi/widget/tableview/kexicomboboxtableedit.cpp +++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp @@ -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())); diff --git a/kexi/widget/tableview/kexitableedit.cpp b/kexi/widget/tableview/kexitableedit.cpp index 943ec1e8..a4b70aab 100644 --- a/kexi/widget/tableview/kexitableedit.cpp +++ b/kexi/widget/tableview/kexitableedit.cpp @@ -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) { diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index 284cbd1d..dbb89f5d 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -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: diff --git a/kexi/widget/tableview/kexitableviewheader.cpp b/kexi/widget/tableview/kexitableviewheader.cpp index 0ee90f5a..305222ca 100644 --- a/kexi/widget/tableview/kexitableviewheader.cpp +++ b/kexi/widget/tableview/kexitableviewheader.cpp @@ -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 ]; diff --git a/kexi/widget/utils/kexirecordnavigator.cpp b/kexi/widget/utils/kexirecordnavigator.cpp index d61c7dc8..334c605a 100644 --- a/kexi/widget/utils/kexirecordnavigator.cpp +++ b/kexi/widget/utils/kexirecordnavigator.cpp @@ -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; } |