Files
unnamed-cad-software/src/Document.h
2026-02-20 09:28:23 -07:00

43 lines
796 B
C++

// Unnamed CAD Software
//
// License: GPLv3 (or later)
// Language: C++17
// Notes:
// - use a right-handed, Z-up coordinate system to match Open CASCADE
#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