From 8cc4c24249600392871cc802f3ac4dd27368d335 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 18 Jan 2016 15:46:05 +0100 Subject: Added observer to update values displayed based on some metric. * Modified main() function to connect signals/slots to display calculated values * Color scales are no longer shared; they are also normalized to each component's own data * Stub mouse handling in BarChart (changes cursor shape) --- projectionobserver.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 projectionobserver.h (limited to 'projectionobserver.h') diff --git a/projectionobserver.h b/projectionobserver.h new file mode 100644 index 0000000..5ac6988 --- /dev/null +++ b/projectionobserver.h @@ -0,0 +1,30 @@ +#ifndef PROJECTIONOBSERVER_H +#define PROJECTIONOBSERVER_H + +#include +#include + +#include "distortionmeasure.h" + +class ProjectionObserver : public QObject +{ + Q_OBJECT +public: + ProjectionObserver(const arma::mat &X, const arma::uvec &cpIndices); + +signals: + void mapChanged(const arma::vec &values) const; + +public slots: + void setMap(const arma::mat &Y); + +private: + arma::mat m_X, m_Y, m_origY, m_prevY; + arma::mat m_distX, m_distY, m_distOrigY, m_distPrevY; + arma::uvec m_cpIndices; + + // TODO: one per implemented measure + arma::vec m_values; +}; + +#endif // PROJECTIONOBSERVER_H -- cgit v1.2.3