Line | |
---|
1 | #ifndef Q_CAMERA_WIDGET_H_
|
---|
2 | #define Q_CAMERA_WIDGET_H_
|
---|
3 |
|
---|
4 | #include "BasicGlCamera.h"
|
---|
5 | #include <valarray>
|
---|
6 |
|
---|
7 | using namespace std;
|
---|
8 |
|
---|
9 | class QCameraWidget : public BasicGlCamera
|
---|
10 | {
|
---|
11 | Q_OBJECT
|
---|
12 |
|
---|
13 | typedef pair<double, double> Position;
|
---|
14 | typedef vector<Position> Positions;
|
---|
15 |
|
---|
16 | Positions fGeom;
|
---|
17 |
|
---|
18 | vector<bool> fBold;
|
---|
19 | vector<bool> fEnable;
|
---|
20 |
|
---|
21 | int fWhite;
|
---|
22 |
|
---|
23 | int64_t fMin;
|
---|
24 | int64_t fMax;
|
---|
25 |
|
---|
26 | int lastFace;
|
---|
27 |
|
---|
28 | bool pixelColorUpToDate;
|
---|
29 |
|
---|
30 | public:
|
---|
31 | QCameraWidget(QWidget *pparent = 0);
|
---|
32 | void paintGL();
|
---|
33 | void mousePressEvent(QMouseEvent *cEvent);
|
---|
34 | void mouseMoveEvent(QMouseEvent *event);
|
---|
35 | void mouseDoubleClickEvent(QMouseEvent *event);
|
---|
36 | void Reset();
|
---|
37 | void drawCamera(bool alsoWire);
|
---|
38 | void SetBold(int idx);
|
---|
39 | void SetWhite(int idx);
|
---|
40 | void SetEnable(int idx, bool b);
|
---|
41 | void Toggle(int idx);
|
---|
42 | double GetData(int idx);
|
---|
43 | void SetMin(int64_t min);
|
---|
44 | void SetMax(int64_t max);
|
---|
45 | const char *GetName();
|
---|
46 |
|
---|
47 | int GetIdx(float px, float py);
|
---|
48 | char *GetObjectInfo(int px, int py);
|
---|
49 |
|
---|
50 | void SetData(const valarray<double> &ddata);
|
---|
51 |
|
---|
52 | Q_SIGNALS:
|
---|
53 | void signalCurrentPixel(int pixel);
|
---|
54 | void signalPixelMoveOver(int pixel);
|
---|
55 | void signalPixelDoubleClick(int pixel);
|
---|
56 |
|
---|
57 | private:
|
---|
58 | void CalculatePixelsColor();
|
---|
59 | };
|
---|
60 |
|
---|
61 | typedef QCameraWidget Camera;
|
---|
62 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.