aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-01-11 15:46:23 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2016-01-11 15:46:23 +0100
commitc069008f3c101a88da12ecf00452d61f1155c316 (patch)
treec80861b37f7cb58b53fbe71e93e8cf5d2fc04501 /main.cpp
parenta09992bd876495ac9e24ed3fb1fac9b3b2dd7948 (diff)
Scatterplot: new methods for setting visual attrs without issuing update()s.
* Also added calls to these new methods in main().
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp34
1 files changed, 4 insertions, 30 deletions
diff --git a/main.cpp b/main.cpp
index 672ffd5..3d1173a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -17,9 +17,6 @@
#include "barchart.h"
#include "interactionhandler.h"
#include "selectionhandler.h"
-#include "effectivenessobserver.h"
-#include "distortionobserver.h"
-#include "npdistortion.h"
#include "skelft.h"
static QObject *mainProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
@@ -211,12 +208,6 @@ int main(int argc, char **argv)
plot, SLOT(setXY(const arma::mat &)));
m->setTechnique(InteractionHandler::TECHNIQUE_LAMP);
- // Update splat whenever the main plot is also updated
- //QObject::connect(plot, SIGNAL(xyChanged(const arma::mat &)),
- // splat, SLOT(setPoints(const arma::mat &)));
- //QObject::connect(plot, SIGNAL(colorDataChanged(const arma::vec &)),
- // splat, SLOT(setValues(const arma::vec &)));
-
// Linking between selections in subsample plot and full dataset plot
SelectionHandler selectionHandler(sampleIndices);
QObject::connect(subsamplePlot, SIGNAL(selectionChanged(const QSet<int> &)),
@@ -234,29 +225,12 @@ int main(int argc, char **argv)
BarChart *barChart = engine.rootObjects()[0]->findChild<BarChart *>("barChart");
barChart->setValues(arma::randn<arma::vec>(100));
- // Map distortion as the glyph color
- //DistortionObserver distortionObs(X, sampleIndices);
- //std::unique_ptr<DistortionMeasure> distortionMeasure(new NPDistortion());
- //distortionObs.setMeasure(distortionMeasure.get());
- //QObject::connect(&interactionHandler, SIGNAL(subsampleChanged(const arma::mat &)),
- // &distortionObs, SLOT(setMap(const arma::mat &)));
- //QObject::connect(&distortionObs, SIGNAL(mapChanged(const arma::vec &)),
- // plot, SLOT(setColorData(const arma::vec &)));
-
- //EffectiveInteractionEnforcer enforcer(sampleIndices);
- //QObject::connect(subsamplePlot, SIGNAL(selectionChanged(const QSet<int> &)),
- // &enforcer, SLOT(setSelection(const QSet<int> &)));
- //QObject::connect(plot, SIGNAL(colorDataChanged(const arma::vec &)),
- // &enforcer, SLOT(setMeasureDifference(const arma::vec &)));
- //QObject::connect(&enforcer, SIGNAL(effectivenessChanged(const arma::vec &)),
- // subsamplePlot, SLOT(setColorData(const arma::vec &)));
-
//history->addHistoryItem(Ys);
- subsamplePlot->setXY(Ys);
- subsamplePlot->setColorData(labels(sampleIndices));
plot->setColorScale(&colorScale);
- //splat->setColorScale(&colorScale);
- plot->setColorData(labels);
+ plot->setColorData(labels, false);
+ subsamplePlot->setXY(Ys, false);
+ subsamplePlot->setColorData(labels(sampleIndices), false);
+ subsamplePlot->update();
auto ret = app.exec();