diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-05-13 09:35:53 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-05-13 09:35:53 +0200 |
commit | f92d78241228f6a9c0b649c8addcc7ae82071167 (patch) | |
tree | ff62e5b54976473345b3c2a4689d85f13f9d3793 /src/project.h | |
parent | b59fa46fd31c812519527e6e21f9f2e080f128c8 (diff) |
Added list of Instrument to Project including serialiser/deserialiser.
Diffstat (limited to 'src/project.h')
-rw-r--r-- | src/project.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/project.h b/src/project.h index 097b7c9..2124730 100644 --- a/src/project.h +++ b/src/project.h @@ -26,9 +26,32 @@ */ #pragma once +#include <list> + #include <QObject> #include <QString> +class Project; + +class Instrument +{ +public: + Instrument(Project& project, int id); + + int getId() const; + + QString getInstrumentName() const; + void setInstrumentName(const QString& instrument_name); + +private: + friend class ProjectSerialiser; + + int id; + QString instrument_name; + + Project& project; +}; + class Project : public QObject { @@ -63,6 +86,10 @@ public: QString getRawFileRoot() const; void setRawFileRoot(const QString& raw_file_root); + Instrument& getInstrument(int id); + int createInstrument(); + void deleteInstrument(int id); + void reset(); signals: @@ -75,5 +102,8 @@ private: QString project_name; QString raw_file_root; + std::list<Instrument> instruments; + int next_id{0}; + int update_count{0}; }; |