Changeset 2eb48c96 in OpenModelica
- Timestamp:
- 2020-08-05T10:16:13+02:00 (4 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
- Children:
- c229655
- Parents:
- 85cad8f
- git-author:
- Adeel Asghar <adeel.asghar@…> (08/05/20 10:16:13)
- git-committer:
- GitHub <noreply@…> (08/05/20 10:16:13)
- Location:
- OMEdit/OMEditLIB/Util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OMEdit/OMEditLIB/Util/Utilities.cpp
r895904a r2eb48c96 66 66 mpFilterTextBox = new QLineEdit; 67 67 mpFilterTextBox->installEventFilter(this); 68 connect(this, SIGNAL(clearFilter(QString)), mpFilterTextBox, SIGNAL(textEdited(QString))); 68 69 // filter timer 69 70 mpFilterTimer = new QTimer; … … 118 119 /*! 119 120 * \brief TreeSearchFilters::eventFilter 120 * Handles the ESC key press for searchtext box121 * Handles the ESC key press for filter text box 121 122 * \param pObject 122 123 * \param pEvent … … 126 127 { 127 128 /* Ticket #3987 128 * Clear contents of searchfield by clicking ESC key.129 * Clear contents of filter field by clicking ESC key. 129 130 */ 130 QLineEdit *p SearchTextBox = qobject_cast<QLineEdit*>(pObject);131 if (p SearchTextBox && pEvent->type() == QEvent::KeyPress) {131 QLineEdit *pFilterTextBox = qobject_cast<QLineEdit*>(pObject); 132 if (pFilterTextBox && pEvent->type() == QEvent::KeyPress) { 132 133 QKeyEvent *pKeyEvent = static_cast<QKeyEvent*>(pEvent); 133 134 if (pKeyEvent && pKeyEvent->key() == Qt::Key_Escape) { 134 pSearchTextBox->clear(); 135 pFilterTextBox->clear(); 136 /* Ticket #5998 137 * Emit clearFilter signal which calls textEdited signal of mpFilterTextBox to reset filter. 138 */ 139 emit clearFilter(""); 135 140 return true; 136 141 } -
OMEdit/OMEditLIB/Util/Utilities.h
r2a7939a r2eb48c96 124 124 private slots: 125 125 void showHideFilters(bool On); 126 signals: 127 void clearFilter(const QString &); 126 128 }; 127 129
Note: See TracChangeset
for help on using the changeset viewer.