aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-02-09 21:36:34 -0200
committerSamuel Fadel <samuelfadel@gmail.com>2016-02-09 21:36:34 -0200
commit5c26dd04dd171112d14bfb24db96cf286566e19b (patch)
tree62a2dd9370a54968bf543344153ef69a85561840 /main.cpp
parent886bdd0fa43a2fcdeca306648b643b623af99f88 (diff)
Slightly reworked rewinding; added values rewinding.
Needs a solution to the problem of which values must be displayed and/or interpolated. Currently, whenever the user rewinds, the current error measure is displayed, regardless of what was being displayed before. This will probably be trivial to solve once we have a nice way of changing the current measure. * Also changed all OpenMP-powered for loops to use signed integers, requirements of OMP2.x (which is what MSVC supports currently) * The above change comes with a new header for utility functions
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index b1a8e8b..c2d79df 100644
--- a/main.cpp
+++ b/main.cpp
@@ -174,8 +174,6 @@ int main(int argc, char **argv)
m->rpPlot, SLOT(setXY(const arma::mat &)));
QObject::connect(&manipulationHandler, SIGNAL(rpChanged(const arma::mat &)),
m->splat, SLOT(setSites(const arma::mat &)));
- QObject::connect(plotTC, SIGNAL(tChanged(double)),
- &manipulationHandler, SLOT(setRewind(double)));
// Keep both scatterplots and the splat scaled equally and relative to the
// full plot
@@ -250,6 +248,23 @@ int main(int argc, char **argv)
QObject::connect(&rpSelectionHandler, SIGNAL(selectionChanged(const std::vector<bool> &)),
&projectionObserver, SLOT(setRPSelection(const std::vector<bool> &)));
+ // Connect visual components (but not barcharts) to rewinding mechanism
+ QObject::connect(plotTC, SIGNAL(tChanged(double)),
+ &manipulationHandler, SLOT(setRewind(double)));
+ QObject::connect(&manipulationHandler, SIGNAL(cpRewound(const arma::mat &)),
+ m->cpPlot, SLOT(setXY(const arma::mat &)));
+ QObject::connect(&manipulationHandler, SIGNAL(rpRewound(const arma::mat &)),
+ m->rpPlot, SLOT(setXY(const arma::mat &)));
+ QObject::connect(&manipulationHandler, SIGNAL(rpRewound(const arma::mat &)),
+ m->splat, SLOT(setSites(const arma::mat &)));
+
+ QObject::connect(plotTC, SIGNAL(tChanged(double)),
+ m->projectionObserver, SLOT(setRewind(double)));
+ QObject::connect(m->projectionObserver, SIGNAL(cpValuesRewound(const arma::vec &)),
+ m->cpPlot, SLOT(setColorData(const arma::vec &)));
+ QObject::connect(m->projectionObserver, SIGNAL(rpValuesRewound(const arma::vec &)),
+ m->splat, SLOT(setValues(const arma::vec &)));
+
// General component set up
plotTC->setAcceptedMouseButtons(Qt::MiddleButton);
m->cpPlot->setDragEnabled(true);