From f92d78241228f6a9c0b649c8addcc7ae82071167 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 13 May 2018 09:35:53 +0200 Subject: Added list of Instrument to Project including serialiser/deserialiser. --- src/project.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/project.h') 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 + #include #include +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 instruments; + int next_id{0}; + int update_count{0}; }; -- cgit v1.2.3