36 lines
636 B
C++
36 lines
636 B
C++
#ifndef DOCUMENT_H
|
|
#define DOCUMENT_H
|
|
|
|
#include <QObject>
|
|
#include <QList>
|
|
|
|
class Feature;
|
|
|
|
class Document : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit Document(QObject *parent = nullptr);
|
|
~Document();
|
|
|
|
void addFeature(Feature* feature);
|
|
void clear();
|
|
|
|
bool save(const QString& path) const;
|
|
bool load(const QString& path);
|
|
|
|
const QList<Feature*>& features() const;
|
|
void setFileName(const QString& fileName);
|
|
QString fileName() const;
|
|
|
|
signals:
|
|
void featureAdded(Feature* feature);
|
|
void cleared();
|
|
|
|
private:
|
|
QList<Feature*> m_features;
|
|
QString m_fileName;
|
|
};
|
|
|
|
#endif // DOCUMENT_H
|