Schim
project.h
1 #ifndef PROJECT_H
2 #define PROJECT_H
3 
4 #include "sheet.h"
5 
6 #include <QList>
7 #include <QMap>
8 #include <QString>
9 
16 class Project : public Entity
17 {
18 public:
19  // CONSTRUCTORS
21  Project();
22  explicit Project(const QList<Sheet*> &sheets);
23  ~Project();
24 
25  // GETTERS
26  QString getProperty(const QString name);
27  QList<Sheet *> &getSheets();
28  QList<Sheet *> getSheets() const;
32  virtual Entity *getParent() const = delete;
33 
34  // SETTERS
35  void setProperty(const QString &name, const QString &value);
36  void addSheet(Sheet *sheet, int index=-1);
37  void removeSheet(Sheet *sheet);
41  virtual void setParent() const = delete;
42 
43  // MISCELLANEOUS
44  QList<Sheet *>::iterator begin();
45  QList<Sheet *>::iterator end();
46 
47  // OPERATORS
48  Project &operator=(Project &&project);
49 
50 private:
51  // ATTRIBUTES
52  QList<Sheet *> sheets;
57  // TODO provide better integration with variables
58  QMap<QString, QString> properties {
59  {"author", ""},
60  {"number", ""},
61  {"revision", ""},
62  {"standard", ""},
63  };
64 };
65 
66 #endif // PROJECT_H
Project()
Construct an empty project with default properties.
A project is essentially a list of sheets, along with some project properties.
Definition: project.h:16
Base class for entities.
Definition: entity.h:32
virtual void setParent() const =delete
A project is an entity that has no parent.
QString name
The name of the entity.
Definition: entity.h:67
virtual Entity * getParent() const =delete
A project is an entity that has no parent.
This class models a sheet of paper.
Definition: sheet.h:16