diff options
Diffstat (limited to 'kexi/plugins/forms')
-rw-r--r-- | kexi/plugins/forms/widgets/kexidbcombobox.cpp | 10 | ||||
-rw-r--r-- | kexi/plugins/forms/widgets/kexidbform.cpp | 12 | ||||
-rw-r--r-- | kexi/plugins/forms/widgets/kexidbimagebox.cpp | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp index afe2e3aa..d9e33b9b 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -239,7 +239,7 @@ TQRect KexiDBComboBox::buttonGeometry() const bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e) { - if ( e->button() != Qt::LeftButton || d->designMode ) + if ( e->button() != TQt::LeftButton || d->designMode ) return true; /*todo if ( m_discardNextMousePress ) { d->discardNextMousePress = FALSE; @@ -270,9 +270,9 @@ bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e) bool KexiDBComboBox::handleKeyPressEvent(TQKeyEvent *ke) { const int k = ke->key(); - const bool dropDown = (ke->state() == Qt::NoButton && ((k==TQt::Key_F2 && !d->isEditable) || k==TQt::Key_F4)) + const bool dropDown = (ke->state() == TQt::NoButton && ((k==TQt::Key_F2 && !d->isEditable) || k==TQt::Key_F4)) || (ke->state() == TQt::AltButton && k==TQt::Key_Down); - const bool escPressed = ke->state() == Qt::NoButton && k==TQt::Key_Escape; + const bool escPressed = ke->state() == TQt::NoButton && k==TQt::Key_Escape; const bool popupVisible = popup() && popup()->isVisible(); if ((dropDown || escPressed) && popupVisible) { popup()->hide(); @@ -302,12 +302,12 @@ bool KexiDBComboBox::keyPressed(TQKeyEvent *ke) const int k = ke->key(); const bool popupVisible = popup() && popup()->isVisible(); - const bool escPressed = ke->state() == Qt::NoButton && k==TQt::Key_Escape; + const bool escPressed = ke->state() == TQt::NoButton && k==TQt::Key_Escape; if (escPressed && popupVisible) { popup()->hide(); return true; } - if (ke->state() == Qt::NoButton && (k==TQt::Key_PageDown || k==TQt::Key_PageUp) && popupVisible) + if (ke->state() == TQt::NoButton && (k==TQt::Key_PageDown || k==TQt::Key_PageUp) && popupVisible) return true; return false; } diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index a6603867..0fb4519e 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -396,8 +396,8 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) if (preview()) { TQKeyEvent *ke = TQT_TQKEYEVENT(e); const int key = ke->key(); - bool tab = ke->state() == Qt::NoButton && key == TQt::Key_Tab; - bool backtab = ((ke->state() == Qt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab) + bool tab = ke->state() == TQt::NoButton && key == TQt::Key_Tab; + bool backtab = ((ke->state() == TQt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab) || (ke->state() == TQt::ShiftButton && key == TQt::Key_Tab); TQObject *o = watched; //focusWidget(); TQWidget* realWidget = dynamic_cast<TQWidget*>(o); //will beused below (for tab/backtab handling) @@ -405,9 +405,9 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) if (!tab && !backtab) { //for buttons, left/up and right/down keys act like tab/backtab (see qbutton.cpp) if (realWidget->inherits("TQButton")) { - if (ke->state() == Qt::NoButton && (key == TQt::Key_Right || key == TQt::Key_Down)) + if (ke->state() == TQt::NoButton && (key == TQt::Key_Right || key == TQt::Key_Down)) tab = true; - else if (ke->state() == Qt::NoButton && (key == TQt::Key_Left || key == TQt::Key_Up)) + else if (ke->state() == TQt::NoButton && (key == TQt::Key_Left || key == TQt::Key_Up)) backtab = true; } } @@ -437,7 +437,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) int curCol = d->dataAwareObject->currentColumn(); bool moveToFirstField; //if true, we'll move focus to the first field (in tab order) bool moveToLastField; //if true, we'll move focus to the first field (in tab order) - if (! (ke->state() == Qt::NoButton && (key == TQt::Key_Home + if (! (ke->state() == TQt::NoButton && (key == TQt::Key_Home || key == TQt::Key_End || key == TQt::Key_Down || key == TQt::Key_Up)) /* ^^ home/end/down/up are already handled by widgets */ && d->dataAwareObject->handleKeyPress( @@ -474,7 +474,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) } } // handle Esc key - if (ke->state() == Qt::NoButton && key == TQt::Key_Escape) { + if (ke->state() == TQt::NoButton && key == TQt::Key_Escape) { //cancel field editing/row editing if possible if (d->dataAwareObject->cancelEditor()) return true; diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp index 1d81cc1c..f205de05 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp +++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp @@ -773,7 +773,7 @@ void KexiDBImageBox::setColumnInfo(KexiDB::QueryColumnInfo* cinfo) bool KexiDBImageBox::keyPressed(TQKeyEvent *ke) { // Esc key should close the popup - if (ke->state() == Qt::NoButton && ke->key() == TQt::Key_Escape) { + if (ke->state() == TQt::NoButton && ke->key() == TQt::Key_Escape) { if (m_popupMenu->isVisible()) { m_setFocusOnButtonAfterClosingPopup = true; return true; |