blob: 9fe9ffc9c33d3dd4b3b67eedb675b12f45661ac8 (
plain)
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
|
#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 reset();
signals:
void undoPerformed(const arma::mat &prevY) const;
void resetPerformed(const arma::mat &firstY) const;
void mapAdded(const arma::mat &newY) 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
|