-
Notifications
You must be signed in to change notification settings - Fork 2
/
Project.h
53 lines (38 loc) · 1.01 KB
/
Project.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef PROJECT_H
#define PROJECT_H
#include "Document.h"
#include <QDir>
#include <QList>
#include <QObject>
#include <QSettings>
#include <QString>
namespace q2d {
// forward declaration
class ApplicationContext;
// TODO documentation
// TODO saving
// TODO loading
class Project : public QObject {
Q_OBJECT
private:
ApplicationContext* m_applicationContext;
QString m_name;
QStandardItemModel m_documents;
QSettings m_projectSettings;
void save(QDir projectDirectory);
public:
Project(QString name, ApplicationContext* parent = nullptr);
QStandardItemModel* getDocuments();
Document* createDocument(QString name);
void loadDocument(QString path);
// TODO void deleteDocument(Document &toDelete);
void setupSignalsAndSlots();
signals:
void signal_showDocument(Document* document);
void signal_nameChanged(QString newName);
public slots:
void slot_newDocument(QString m_name);
void slot_save();
};
} // namespace q2d
#endif // PROJECT_H