aboutsummaryrefslogtreecommitdiff
path: root/barchart.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-01-13 15:09:20 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2016-01-13 15:09:20 +0100
commit26c4d3e5974f89fe4c140292d4a9b6c33e42450b (patch)
treef31d1939faa004fbad908fdf3a319a2fb845ff29 /barchart.h
parent29d0c06eb3a69cd838e1224f46942389c501f9b8 (diff)
BarChart: values are now sorted in descreasing order.
Diffstat (limited to 'barchart.h')
-rw-r--r--barchart.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/barchart.h b/barchart.h
index 164e0eb..ba96470 100644
--- a/barchart.h
+++ b/barchart.h
@@ -1,9 +1,13 @@
#ifndef BARCHART_H
#define BARCHART_H
+#include <vector>
+
#include <QtQuick>
#include <armadillo>
+#include "scale.h"
+
class BarChart : public QQuickItem
{
Q_OBJECT
@@ -26,9 +30,11 @@ private:
QSGNode *newBarNode() const;
void updateBarNodeGeom(QSGNode *barNode, float x, float width, float height);
void updateBars(QSGNode *root);
+ bool m_shouldUpdateBars;
arma::vec m_values;
- bool m_shouldUpdateBars;
+ std::vector<int> m_originalIndices;
+ LinearScale<float> m_scale;
};
#endif // BARCHART_H