summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/statusframecontent.cc52
-rw-r--r--plugingui/statusframecontent.h10
2 files changed, 62 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)
{
diff --git a/plugingui/statusframecontent.h b/plugingui/statusframecontent.h
index 0ca5bfe..20fbfd9 100644
--- a/plugingui/statusframecontent.h
+++ b/plugingui/statusframecontent.h
@@ -46,9 +46,14 @@ public:
void updateContent();
void updateDrumkitLoadStatus(LoadStatus load_status);
+ void updateDrumkitName(std::string const& drumkit_name);
+ void updateDrumkitDescription(std::string const& drumkit_description);
+ void updateDrumkitVersion(std::string const& drumkit_version);
+ void updateDrumkitSamplerate(std::size_t drumkit_samplerate);
void updateMidimapLoadStatus(LoadStatus load_status);
void updateSamplerate(double samplerate);
void updateResamplingEnabled(bool enable_resampling);
+ void updateResamplingActive(bool resampling_active);
void updateNumberOfUnderruns(std::size_t number_of_underruns);
private:
@@ -57,9 +62,14 @@ private:
SettingsNotifier& settings_notifier;
std::string drumkit_load_status;
+ std::string drumkit_name;
+ std::string drumkit_description;
+ std::string drumkit_version;
+ std::string drumkit_samplerate;
std::string midimap_load_status;
std::string samplerate;
std::string resampling_enabled;
+ std::string resampling_active;
std::string number_of_underruns;
};