-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntropySlider.h
More file actions
28 lines (23 loc) · 1.23 KB
/
EntropySlider.h
File metadata and controls
28 lines (23 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef ENTROPY_SLIDER_H
#define ENTROPY_SLIDER_H
#include <QSlider>
#include "DataManager.h"
#include "DataMgrVect.h"
#include "AppSettings.h"
//This class is an QSlider adapted for usage for entropy querying
//It stores its own gradient as well as additional entropy querying information
class EntropySlider : public QSlider
{
public:
EntropySlider(DataManager * dataManager, AppSettings * appSettings);
void setRunEntropyQueries(bool runEntropyQueries) { this->runEntropyQueries = runEntropyQueries; }
bool getRunEntropyQueries() { return runEntropyQueries; }
QLinearGradient * getGradient() { return gradient; }
void paintEvent(QPaintEvent *);
private:
bool runEntropyQueries = true; //If true, slider events associated with this widget will initiate new entropy queries. If false, they will not. This is needed becuase sometimes we must do a setValue function call without having another event fire.
DataManager * dataManager; //A reference to the data manager object
QLinearGradient * gradient; //The gradient maintained by the entropy slider
AppSettings * appSettings; //Reference to the app settings object - can be useful when we need to check min and max entropy threshold values that are possible
};
#endif //ENTROPY_SLIDER_H