aboutsummaryrefslogtreecommitdiff
path: root/selectionhandler.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-01-21 19:36:14 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2016-01-21 19:36:14 +0100
commitd414b68cea008edc063e26133564d120a7430bd2 (patch)
tree7ae861a100d0b1560294b646014743dcd785ab4b /selectionhandler.h
parente9d14f93498832687cbdbeb79748f9030e49fb2f (diff)
Added selection linking. Needs more tests.
Diffstat (limited to 'selectionhandler.h')
-rw-r--r--selectionhandler.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/selectionhandler.h b/selectionhandler.h
index e5b9686..dad59cc 100644
--- a/selectionhandler.h
+++ b/selectionhandler.h
@@ -1,24 +1,28 @@
#ifndef SELECTIONHANDLER_H
#define SELECTIONHANDLER_H
+#include <set>
+#include <vector>
+
#include <QObject>
-#include <QSet>
-#include <armadillo>
-class SelectionHandler : public QObject
+class SelectionHandler
+ : public QObject
{
Q_OBJECT
public:
- SelectionHandler(const arma::uvec &sampleIndices);
+ SelectionHandler(int numItems);
signals:
- void selectionChanged(const QSet<int> &selection);
+ void selectionChanged(const std::vector<bool> &selection);
public slots:
- void setSelection(const QSet<int> &selection);
+ void setSelection(const std::vector<bool> &selection);
+ void setSelected(int item, bool selected = true);
+ void setSelected(const std::set<int> &items, bool selected = true);
private:
- arma::uvec m_sampleIndices;
+ std::vector<bool> m_selection;
};
#endif // SELECTIONHANDLER_H