summaryrefslogtreecommitdiff
path: root/src/project.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/project.cc')
-rw-r--r--src/project.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/project.cc b/src/project.cc
index 5c45973..5ad809b 100644
--- a/src/project.cc
+++ b/src/project.cc
@@ -56,6 +56,10 @@ void Instrument::setInstrumentName(const QString& instrument_name)
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->instrument_name = instrument_name;
+ if(prefix.isEmpty())
+ {
+ setPrefix(instrument_name); // replicate name to prefix
+ }
}
}
@@ -216,6 +220,42 @@ void Instrument::setSelections(const Selections& selections)
}
}
+QString Instrument::getPrefix() const
+{
+ return prefix;
+}
+
+void Instrument::setPrefix(const QString& prefix)
+{
+ if(this->prefix == prefix)
+ {
+ return;
+ }
+
+ {
+ Project::RAIIBulkUpdate bulkUpdate(project);
+ this->prefix = prefix;
+ }
+}
+
+QString Instrument::getExportPath() const
+{
+ return export_path;
+}
+
+void Instrument::setExportPath(const QString& export_path)
+{
+ if(this->export_path == export_path)
+ {
+ return;
+ }
+
+ {
+ Project::RAIIBulkUpdate bulkUpdate(project);
+ this->export_path = export_path;
+ }
+}
+
Project& Instrument::getProject()
{
return project;