From 5c26dd04dd171112d14bfb24db96cf286566e19b Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 9 Feb 2016 21:36:34 -0200 Subject: 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 --- main.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'main.cpp') 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 &)), &projectionObserver, SLOT(setRPSelection(const std::vector &))); + // 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); -- cgit v1.2.3