summaryrefslogtreecommitdiff
path: root/plugingui/statusframecontent.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2019-07-25 17:49:16 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2019-09-28 20:37:47 +0200
commit9d1ea1e7cfa256c7f5cac027382d92f658734ccb (patch)
tree39ec7cdaa8ed571137430ccbbc0a391bb27427a3 /plugingui/statusframecontent.cc
parentcd9af98abdce1fe3759e786d6b010a7fe3395e2c (diff)
Add generic logger interface for propagating messages while loading drumkits to the commandline
and/or plugin UI.
Diffstat (limited to 'plugingui/statusframecontent.cc')
-rw-r--r--plugingui/statusframecontent.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/plugingui/statusframecontent.cc b/plugingui/statusframecontent.cc
index 34903e8..d457dee 100644
--- a/plugingui/statusframecontent.cc
+++ b/plugingui/statusframecontent.cc
@@ -29,9 +29,9 @@
namespace GUI
{
-StatusframeContent::StatusframeContent(
- Widget* parent, SettingsNotifier& settings_notifier)
- : Widget(parent), settings_notifier(settings_notifier)
+StatusframeContent::StatusframeContent(Widget* parent,
+ SettingsNotifier& settings_notifier)
+ : Widget(parent), settings_notifier(settings_notifier)
{
CONNECT(this, settings_notifier.drumkit_load_status,
this, &StatusframeContent::updateDrumkitLoadStatus);
@@ -48,6 +48,9 @@ StatusframeContent::StatusframeContent(
CONNECT(this, settings_notifier.number_of_underruns,
this, &StatusframeContent::updateNumberOfUnderruns);
+ CONNECT(this, settings_notifier.load_status_text,
+ this, &StatusframeContent::loadStatusTextChanged);
+
text_field.move(0, 0);
text_field.setReadOnly(true);
@@ -95,21 +98,21 @@ void StatusframeContent::updateDrumkitLoadStatus(LoadStatus load_status)
updateContent();
}
-void StatusframeContent::updateDrumkitName(std::string const& drumkit_name)
+void StatusframeContent::updateDrumkitName(const std::string& drumkit_name)
{
this->drumkit_name = drumkit_name;
updateContent();
}
-void StatusframeContent::updateDrumkitDescription(std::string const& drumkit_description)
+void StatusframeContent::updateDrumkitDescription(const std::string& drumkit_description)
{
this->drumkit_description = drumkit_description;
updateContent();
}
-void StatusframeContent::updateDrumkitVersion(std::string const& drumkit_version)
+void StatusframeContent::updateDrumkitVersion(const std::string& drumkit_version)
{
this->drumkit_version = drumkit_version;
@@ -151,4 +154,9 @@ void StatusframeContent::updateNumberOfUnderruns(std::size_t number_of_underruns
updateContent();
}
+void StatusframeContent::loadStatusTextChanged(const std::string& text)
+{
+ text_field.setText(text);
+}
+
} // GUI::