/
projectmanager.h
79 lines (58 loc) · 1.94 KB
/
projectmanager.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef PROJECTMANAGER_H
#define PROJECTMANAGER_H
#include <QObject>
#include <QList>
#include <QGraphicsScene>
#include <QFileInfo>
#include <QUndoGroup>
#include <QUndoView>
//Interfaces
#include "loggerinterface.h"
#include "plugininterface.h"
#include "importerplugininterface.h"
#include "exporterplugininterface.h"
#include "array.h"
#include "arraysettings.h"
#include "projectsettings.h"
#include "plugincentral.h"
class ProjectManager : public QObject
{
Q_OBJECT
public:
explicit ProjectManager(LoggerInterface* logger, const PluginCentral* plugincentral, QObject *parent = 0);
QStringList getImportFilters() const;
QStringList getExportFilters() const;
QAction* getRedoAction(QObject* parent,const QString& prefix = QString()) const;
QAction* getUndoAction(QObject* parent,const QString& prefix = QString()) const;
void setUndoViewer(QUndoView *toSet);
signals:
void newArrayCreated(int tabIndex,Array* array);
public slots:
void createNewArray(int tabIndex);
protected slots:
void registerPlugin(const QString& type, PluginInterface* plugin);
void loadImage(Array* requester, const QString& path);
void exportArray(Array* toExport,const QString& type);
void setCurrentArray(Array* newArray);
protected:
//central function to connect all signals & slots
void connectArray(Array* array);
void createNewArray(const QString& name="");
private:
//convenient functions for internal use
void logError(const QString& msg);
void logWarning(const QString& msg);
void logInfo(const QString& msg);
protected:
LoggerInterface* Logger;
QList<Array*> ArrayList;
Array* CurrentArray;
ArraySettings* DefaultArraySettings;
ProjectSettings Settings;
QList<ImporterPluginInterface*> ImporterList;
QList<ExporterPluginInterface*> ExporterList;
QStringList ImportFilterList;
QStringList ExportFilterList;
QUndoGroup UndoManager;
};
#endif // PROJECTMANAGER_H