diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-11 12:03:59 -0200 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-11 12:03:59 -0200 |
commit | b5ca997b2d2a64f955b78208d0362cba0278f8d3 (patch) | |
tree | 0dbd235d7c91c11968946142e8ed7df155471c7e /manipulationhandler.cpp | |
parent | ff08c0541156faf8a220a62b4192a80803b86da3 (diff) |
Modified the way the history interacts with other components.
* Main class is now responsible for updating map components
whenever the current map changes (even rewinding): this simplifies
other objects because they don't have to know anything about how
the data is being displayed later (no CP/RP juggling everywhere)
* Added undo/reset actions to main view, including menu items
* ProjectionHistory now has specific signals for each change
happening to the history
Diffstat (limited to 'manipulationhandler.cpp')
-rw-r--r-- | manipulationhandler.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/manipulationhandler.cpp b/manipulationhandler.cpp index f764eaf..f561ad7 100644 --- a/manipulationhandler.cpp +++ b/manipulationhandler.cpp @@ -3,22 +3,16 @@ #include <algorithm> #include "mp.h" -#include "numericrange.h" ManipulationHandler::ManipulationHandler(const arma::mat &X, const arma::uvec &cpIndices, ProjectionHistory *history) : m_X(X) , m_cpIndices(cpIndices) - , m_rpIndices(X.n_rows - cpIndices.n_elem) , m_history(history) , m_technique(TECHNIQUE_LAMP) { Q_ASSERT(history); - - NumericRange<arma::uword> allIndices(0, m_X.n_rows); - std::set_symmetric_difference(allIndices.cbegin(), allIndices.cend(), - m_cpIndices.cbegin(), m_cpIndices.cend(), m_rpIndices.begin()); } void ManipulationHandler::setCP(const arma::mat &Ys) @@ -39,8 +33,6 @@ void ManipulationHandler::setCP(const arma::mat &Ys) break; } - emit cpChanged(Y.rows(m_cpIndices)); - emit rpChanged(Y.rows(m_rpIndices)); emit mapChanged(Y); } @@ -51,7 +43,5 @@ void ManipulationHandler::setRewind(double t) } arma::mat Y = m_history->Y() * t + m_history->prev() * (1.0 - t); - emit cpRewound(Y.rows(m_cpIndices)); - emit rpRewound(Y.rows(m_rpIndices)); emit mapRewound(Y); } |