summaryrefslogtreecommitdiff
path: root/src/data/tikzdocument.h
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2018-01-04 16:00:52 +0100
committerAleks Kissinger <aleks0@gmail.com>2018-01-04 16:00:52 +0100
commit738ecbd5fad2b46836bfd6a94aeebf165ae2bbca (patch)
treedf04709807cc9ec8481a3ebc7d80ac25e5b2f457 /src/data/tikzdocument.h
parent0421a96749743868554d44585050b1b3d04864d2 (diff)
relocated source code to the root
Diffstat (limited to 'src/data/tikzdocument.h')
-rw-r--r--src/data/tikzdocument.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/data/tikzdocument.h b/src/data/tikzdocument.h
new file mode 100644
index 0000000..f574f5c
--- /dev/null
+++ b/src/data/tikzdocument.h
@@ -0,0 +1,43 @@
+/**
+ * This class contains a tikz Graph, source code, file info, and undo stack. It serves as the model
+ * in the MVC triple (TikzDocument, TikzView, TikzScene).
+ */
+
+#ifndef TIKZDOCUMENT_H
+#define TIKZDOCUMENT_H
+
+#include "graph.h"
+
+#include <QObject>
+#include <QUndoStack>
+
+class TikzDocument : public QObject
+{
+ Q_OBJECT
+public:
+ explicit TikzDocument(QObject *parent = 0);
+ ~TikzDocument();
+
+ Graph *graph() const;
+ QString tikz() const;
+ QUndoStack *undoStack() const;
+ bool parseSuccess() const;
+
+ void open(QString fileName);
+
+ QString shortName() const;
+
+private:
+ Graph *_graph;
+ QString _tikz;
+ QString _fileName;
+ QString _shortName;
+ QUndoStack *_undoStack;
+ bool _parseSuccess;
+
+signals:
+
+public slots:
+};
+
+#endif // TIKZDOCUMENT_H