From 0c633db98017e3aa6eb6acac5dbb3a28ced6f020 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Thu, 18 Sep 2014 19:03:25 +0200 Subject: qeditor: when switching type tab, automagically switch view, implement reload Change-Id: I7360af3b5dd7380151732687d6d8de3dbd503f20 Reviewed-on: http://gerrit.rockbox.org/976 Reviewed-by: Amaury Pouly --- utils/regtools/qeditor/regtab.cpp | 17 +++++++++++++++++ utils/regtools/qeditor/regtab.h | 2 ++ 2 files changed, 19 insertions(+) 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 -- cgit v1.2.3