diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-05-25 22:18:42 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-05-25 22:18:42 +0200 |
commit | 668058ed445d56fe46ac7d5e5c2c2cc65b4e1e4c (patch) | |
tree | 8644e63ca3ab413150376fa5bfdd9985968f63fe /src/project.cc | |
parent | cb896a4fa1acd9167d3e7ee9f6336a63309eebde (diff) |
Store export path and prefix.
Diffstat (limited to 'src/project.cc')
-rw-r--r-- | src/project.cc | 40 |
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; |