diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2021-07-29 21:17:38 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2021-07-29 21:18:15 -0400 |
| commit | 4c1e6c0348fd0d275c077b93db06fa7d82c1941f (patch) | |
| tree | 3d80615afdff4f989ebf56975ad9db7f395c1b9d /ui/typeview.h | |
| parent | 1a4a0f56dc17e68e5743fa3a550b46992ec461e1 (diff) | |
Fix some sidebar focus issues and add a toggle command
Diffstat (limited to 'ui/typeview.h')
| -rw-r--r-- | ui/typeview.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/ui/typeview.h b/ui/typeview.h index 5d0a59fc..5c29bdd7 100644 --- a/ui/typeview.h +++ b/ui/typeview.h @@ -239,6 +239,8 @@ public: void showContextMenu(Menu* source = nullptr); + void focusAtTopOfView(); + protected: virtual void resizeEvent(QResizeEvent* event) override; virtual void paintEvent(QPaintEvent* event) override; @@ -299,13 +301,28 @@ public: }; +class BINARYNINJAUIAPI TypeFilterEdit: public QLineEdit +{ + Q_OBJECT + +public: + TypeFilterEdit(QWidget* parent); + +protected: + virtual void keyPressEvent(QKeyEvent* event) override; + +Q_SIGNALS: + void focusView(); +}; + + class BINARYNINJAUIAPI TypeFilter: public QWidget { Q_OBJECT TypesContainer* m_container; ClickableIcon* m_showSystemTypes; - QLineEdit* m_textFilter; + TypeFilterEdit* m_textFilter; bool MatchesAutoFilter(BinaryViewRef data, const BinaryNinja::QualifiedName& name); bool MatchesTextFilter(const std::vector<TypeDefinitionLine>& lines); @@ -313,6 +330,9 @@ class BINARYNINJAUIAPI TypeFilter: public QWidget Q_SIGNALS: void filterChanged(); +private Q_SLOTS: + void focusView(); + public: TypeFilter(TypesContainer* container = nullptr); void setContainer(TypesContainer* container) { m_container = container; } |
