-
Notifications
You must be signed in to change notification settings - Fork 4
/
rangecontrol.h
75 lines (63 loc) · 1.82 KB
/
rangecontrol.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef RANGEDIALOG_H
#define RANGEDIALOG_H
/* ====================================================================================
The definition of the range control window class.
==================================================================================== */
/*
Fetch header files.
*/
#include <vector>
#include "colortable.h"
#include "ui_rangecontrol.h"
#include "enums.h"
class Skymap;
class RangeControl : public QWidget, private Ui::RangeControl
{
Q_OBJECT
public:
RangeControl (QWidget *parent = 0);
// initialize and associate with a given sky map
void init(Skymap *map_);
// Let others know the current state
Projection getProjection() const { return proj; };
Field getField() const { return fld; };
PolVectors getPolVect() const { return pv; };
int getMapIndex(void) const;
float getMinimum() { return minv; };
float getMaximum() { return maxv; };
int getRigging() const { return rigging; };
ColorTable *getColorTable() const;
void setProjection(Projection);
void setField(Field);
void setPolarVect(PolVectors);
signals:
// Need to retexture the sphere
void reTextureNeeded();
// Update the rigging
void changeProjRigging();
// Update the displayed field info
void changeFieldInfo();
// Update showing the polarization vectors
void changePolVect();
private:
// state variables
Projection proj;
Field fld;
int rigging;
PolVectors pv;
float minv;
float maxv;
ColorTableList ctl; // List of supported color tables.
Skymap *map;
std::vector<Field> fields;
private slots:
// auto-connect the ComboBoxes with their responses
void on_projectionSelect_activated(int);
void on_fieldSelect_activated(int);
void on_riggingSelect_activated(int);
void on_colorSelect_activated(int);
void on_polarVectorBox_clicked(bool);
// need to update the texture
void updateTexture(float l, float u);
};
#endif