summaryrefslogtreecommitdiff
path: root/plugingui/statusframecontent.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-22 13:09:42 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-22 13:17:42 +0200
commitcc0f25cd2b9fc5856f16b71a412ce8c17edc39a7 (patch)
tree8054bd08a5c19b5265d790106906532884c9bb13 /plugingui/statusframecontent.cc
parentd4e2178776342e046886f9426d752fa6a7808350 (diff)
Include new information into the status frame.
Diffstat (limited to 'plugingui/statusframecontent.cc')
-rw-r--r--plugingui/statusframecontent.cc52
1 files changed, 52 insertions, 0 deletions
diff --git a/plugingui/statusframecontent.cc b/plugingui/statusframecontent.cc
index 196c0d3..928aeaa 100644
--- a/plugingui/statusframecontent.cc
+++ b/plugingui/statusframecontent.cc
@@ -35,12 +35,22 @@ StatusframeContent::StatusframeContent(
{
CONNECT(this, settings_notifier.drumkit_load_status,
this, &StatusframeContent::updateDrumkitLoadStatus);
+ CONNECT(this, settings_notifier.drumkit_name,
+ this, &StatusframeContent::updateDrumkitName);
+ CONNECT(this, settings_notifier.drumkit_description,
+ this, &StatusframeContent::updateDrumkitDescription);
+ CONNECT(this, settings_notifier.drumkit_version,
+ this, &StatusframeContent::updateDrumkitVersion);
+ CONNECT(this, settings_notifier.drumkit_samplerate,
+ this, &StatusframeContent::updateDrumkitSamplerate);
CONNECT(this, settings_notifier.midimap_load_status,
this, &StatusframeContent::updateMidimapLoadStatus);
CONNECT(this, settings_notifier.samplerate,
this, &StatusframeContent::updateSamplerate);
CONNECT(this, settings_notifier.enable_resampling,
this, &StatusframeContent::updateResamplingEnabled);
+ CONNECT(this, settings_notifier.resampling_active,
+ this, &StatusframeContent::updateResamplingActive);
CONNECT(this, settings_notifier.number_of_underruns,
this, &StatusframeContent::updateNumberOfUnderruns);
@@ -62,8 +72,13 @@ void StatusframeContent::updateContent()
text_field.setText(
"Drumkit load status: " + drumkit_load_status + "\n"
"Midimap load status: " + midimap_load_status + "\n"
+ "Drumkit name: " + drumkit_name + "\n"
+ "Drumkit description: " + drumkit_description + "\n"
+ "Drumkit version: " + drumkit_version + "\n"
+ "Drumkit samplerate: " + drumkit_samplerate + "\n"
"Samplerate: " + samplerate + "\n"
"Resampling enabled: " + resampling_enabled + "\n"
+ "Resampling active: " + resampling_active + "\n"
"Number of underruns: " + number_of_underruns + "\n"
);
}
@@ -89,6 +104,36 @@ void StatusframeContent::updateDrumkitLoadStatus(LoadStatus load_status)
updateContent();
}
+void StatusframeContent::updateDrumkitName(std::string const& drumkit_name)
+{
+ this->drumkit_name = drumkit_name;
+
+ updateContent();
+}
+
+void StatusframeContent::updateDrumkitDescription(std::string const& drumkit_description)
+{
+ this->drumkit_description = drumkit_description;
+
+ updateContent();
+}
+
+void StatusframeContent::updateDrumkitVersion(std::string const& drumkit_version)
+{
+ this->drumkit_version = drumkit_version;
+
+ updateContent();
+}
+
+void StatusframeContent::updateDrumkitSamplerate(std::size_t drumkit_samplerate)
+{
+ this->drumkit_samplerate = drumkit_samplerate == 0
+ ? ""
+ : std::to_string(drumkit_samplerate);
+
+ updateContent();
+}
+
void StatusframeContent::updateMidimapLoadStatus(LoadStatus load_status)
{
switch(load_status)
@@ -124,6 +169,13 @@ void StatusframeContent::updateResamplingEnabled(bool enable_resampling)
updateContent();
}
+void StatusframeContent::updateResamplingActive(bool resampling_active)
+{
+ this->resampling_active = resampling_active ? "yes" : "no";
+
+ updateContent();
+}
+
void StatusframeContent::updateNumberOfUnderruns(
std::size_t number_of_underruns)
{