![]() |
OpenWalnut
1.5.0dev
|
A menu derived from QMenu with additional filtering. More...
#include <WQtMenuFiltered.h>
Inheritance diagram for WQtMenuFiltered:
Collaboration diagram for WQtMenuFiltered:Public Slots | |
| void | filterUpdate () |
| Updates the filter. More... | |
| void | resetFilter () |
| Resets the filter. More... | |
Public Member Functions | |
| WQtMenuFiltered (QAction *config=0, QWidget *parent=0) | |
| Create filtered menu. More... | |
| WQtMenuFiltered (const QString &title, QAction *config=0, QWidget *parent=0) | |
| Create filtered menu. More... | |
| virtual | ~WQtMenuFiltered () |
| Destructor. More... | |
Protected Member Functions | |
| virtual void | keyPressEvent (QKeyEvent *e) |
| Grab key events. More... | |
| void | hideEvent (QHideEvent *e) |
| Called when hiding the menu. More... | |
Static Private Member Functions | |
| static void | setupFilter (WQtMenuFiltered *to, QAction *config=0) |
| Setup filter on given menu. More... | |
Private Attributes | |
| QLineEdit * | m_edit |
| Filter textfield. More... | |
A menu derived from QMenu with additional filtering.
Definition at line 39 of file WQtMenuFiltered.h.
| WQtMenuFiltered::WQtMenuFiltered | ( | QAction * | config = 0, |
| QWidget * | parent = 0 |
||
| ) |
Create filtered menu.
| parent | parent widget |
| config | the optional configure action |
Definition at line 35 of file WQtMenuFiltered.cpp.
References setupFilter().
Here is the call graph for this function:| WQtMenuFiltered::WQtMenuFiltered | ( | const QString & | title, |
| QAction * | config = 0, |
||
| QWidget * | parent = 0 |
||
| ) |
Create filtered menu.
| title | the menu title |
| parent | the parent |
| config | the optional configure action |
Definition at line 41 of file WQtMenuFiltered.cpp.
References setupFilter().
Here is the call graph for this function:
|
virtual |
Destructor.
Definition at line 47 of file WQtMenuFiltered.cpp.
|
slot |
Updates the filter.
Definition at line 123 of file WQtMenuFiltered.cpp.
References m_edit, and string_utils::tokenize().
Referenced by setupFilter().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Called when hiding the menu.
Used to reset the filter.
| e | the event |
Definition at line 117 of file WQtMenuFiltered.cpp.
References resetFilter().
Here is the call graph for this function:
|
protectedvirtual |
Grab key events.
Used for filtering.
| e | the key event |
Definition at line 86 of file WQtMenuFiltered.cpp.
References m_edit, and resetFilter().
Here is the call graph for this function:
|
slot |
Resets the filter.
All elements are visible again.
Definition at line 177 of file WQtMenuFiltered.cpp.
References m_edit.
Referenced by hideEvent(), and keyPressEvent().
Here is the caller graph for this function:
|
staticprivate |
Setup filter on given menu.
| to | the menu |
| config | optional config action shown in the filter |
Definition at line 52 of file WQtMenuFiltered.cpp.
References filterUpdate(), and m_edit.
Referenced by WQtMenuFiltered().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Filter textfield.
Definition at line 101 of file WQtMenuFiltered.h.
Referenced by filterUpdate(), keyPressEvent(), resetFilter(), and setupFilter().