diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-09-18 19:03:25 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-09-19 10:57:59 +0200 |
commit | 0c633db98017e3aa6eb6acac5dbb3a28ced6f020 (patch) | |
tree | a66f2bad0c3e6ca4984c1e3407c5e20dab780547 | |
parent | e1f1f22b66350dff529d72270b9e0f7067488584 (diff) |
qeditor: when switching type tab, automagically switch view, implement reload
Change-Id: I7360af3b5dd7380151732687d6d8de3dbd503f20
Reviewed-on: http://gerrit.rockbox.org/976
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
-rw-r--r-- | utils/regtools/qeditor/regtab.cpp | 17 | ||||
-rw-r--r-- | utils/regtools/qeditor/regtab.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/utils/regtools/qeditor/regtab.cpp b/utils/regtools/qeditor/regtab.cpp index b3f88321fb..9292248c61 100644 --- a/utils/regtools/qeditor/regtab.cpp +++ b/utils/regtools/qeditor/regtab.cpp @@ -372,3 +372,20 @@ void RegTab::OnDumpRegs(bool c) "There was an error when dumping the registers"); } } + +void RegTab::OnBackendReload(bool c) +{ + Q_UNUSED(c); + m_io_backend->Reload(); + OnDataChanged(); +} + +void RegTab::OnTypeChanged(int index) +{ + if(index == -1) + return; + if(index == 0) /* registers */ + OnRegItemClicked(m_reg_tree->currentItem(), 0); + else if(index == 1) /* analysers */ + OnAnalyserClicked(m_analysers_list->currentItem()); +} diff --git a/utils/regtools/qeditor/regtab.h b/utils/regtools/qeditor/regtab.h index f93c68278c..781deff41c 100644 --- a/utils/regtools/qeditor/regtab.h +++ b/utils/regtools/qeditor/regtab.h @@ -88,6 +88,8 @@ private slots: void OnAnalyserClicked(QListWidgetItem *clicked); void OnReadOnlyClicked(bool); void OnDumpRegs(bool); + void OnBackendReload(bool); + void OnTypeChanged(int index); }; #endif /* REGTAB_H */
\ No newline at end of file |