aboutsummaryrefslogtreecommitdiff
path: root/projectionhistory.h
diff options
context:
space:
mode:
Diffstat (limited to 'projectionhistory.h')
-rw-r--r--projectionhistory.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/projectionhistory.h b/projectionhistory.h
new file mode 100644
index 0000000..28a9b4b
--- /dev/null
+++ b/projectionhistory.h
@@ -0,0 +1,36 @@
+#ifndef PROJECTIONHISTORY_H
+#define PROJECTIONHISTORY_H
+
+#include <QObject>
+
+#include <armadillo>
+
+class ProjectionHistory
+ : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ProjectionHistory(QObject *parent = 0);
+
+ const arma::mat &Y() const { return m_Y; }
+ const arma::mat &first() const { return m_firstY; }
+ const arma::mat &prev() const { return m_prevY; }
+
+ bool hasFirst() const { return m_hasFirst; }
+ bool hasPrev() const { return m_hasPrev; }
+
+ void undo();
+ void undoAll();
+
+signals:
+ void historyChanged(const arma::mat &currentY) const;
+
+public slots:
+ void addMap(const arma::mat &Y);
+
+private:
+ arma::mat m_Y, m_firstY, m_prevY;
+ bool m_hasFirst, m_hasPrev;
+};
+
+#endif // PROJECTIONHISTORY_H