From b08620dd304f54943c057405da49d44102ebcc77 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 27 Sep 2014 13:29:44 +0200 Subject: qeditor: introduce a message widget to display non-interactive messages Change-Id: Iad43efa1f09428389fbd09403c1ae20d2805f1c5 Reviewed-on: http://gerrit.rockbox.org/987 Reviewed-by: Amaury Pouly --- utils/regtools/qeditor/regtab.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'utils/regtools/qeditor/regtab.cpp') diff --git a/utils/regtools/qeditor/regtab.cpp b/utils/regtools/qeditor/regtab.cpp index c92dad49d5..32d08a73d3 100644 --- a/utils/regtools/qeditor/regtab.cpp +++ b/utils/regtools/qeditor/regtab.cpp @@ -149,8 +149,10 @@ RegTab::RegTab(Backend *backend, QWidget *parent) data_sel_layout->addWidget(m_data_sel_reload); data_sel_group->setLayout(data_sel_layout); m_data_soc_label->setFrameStyle(QFrame::StyledPanel | QFrame::Raised); + m_msg = new MessageWidget(this); m_right_panel->addWidget(data_sel_group, 0); + m_right_panel->addWidget(m_msg, 0); m_right_content = 0; SetPanel(new EmptyRegTabPanel); QWidget *w = new QWidget; @@ -176,6 +178,9 @@ RegTab::RegTab(Backend *backend, QWidget *parent) connect(m_data_sel_reload, SIGNAL(clicked(bool)), this, SLOT(OnBackendReload(bool))); connect(m_type_selector, SIGNAL(currentChanged(int)), this, SLOT(OnTypeChanged(int))); + SetMessage(MessageWidget::Information, + "You can browse the registers. Select a data source to analyse the values."); + OnSocListChanged(); SetDataSocName(""); UpdateTabName(); @@ -310,6 +315,11 @@ void RegTab::DisplaySoc(const SocRef& ref) SetPanel(new SocDisplayPanel(this, ref)); } +void RegTab::SetMessage(MessageWidget::MessageType type, const QString& msg) +{ + m_msg->SetMessage(type, msg); +} + void RegTab::SetPanel(RegTabPanel *panel) { delete m_right_content; -- cgit v1.2.3