source: trunk/FACT++/gui/QCameraWidget.h@ 11820

Last change on this file since 11820 was 11796, checked in by lyard, 14 years ago
added tooltip for all cameras
File size: 1.3 KB
Line 
1#ifndef Q_CAMERA_WIDGET_H_
2#define Q_CAMERA_WIDGET_H_
3
4#include "BasicGlCamera.h"
5#include <valarray>
6
7using namespace std;
8
9class 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;
27public:
28 QCameraWidget(QWidget *pparent = 0);
29 void paintGL();
30 void mousePressEvent(QMouseEvent *cEvent);
31 void mouseMoveEvent(QMouseEvent *event);
32 void mouseDoubleClickEvent(QMouseEvent *event);
33 void Reset();
34 void drawCamera(bool alsoWire);
35 void SetBold(int idx);
36 void SetWhite(int idx);
37 void SetEnable(int idx, bool b);
38 void Toggle(int idx);
39 double GetData(int idx);
40 void SetMin(int64_t min);
41 void SetMax(int64_t max);
42 const char *GetName();
43
44 int GetIdx(float px, float py);
45 char *GetObjectInfo(int px, int py);
46
47 void SetData(const valarray<double> &ddata);
48
49Q_SIGNALS:
50 void signalCurrentPixel(int pixel);
51 void signalPixelMoveOver(int pixel);
52 void signalPixelDoubleClick(int pixel);
53
54private:
55 void CalculatePixelsColor();
56};
57
58typedef QCameraWidget Camera;
59#endif
Note: See TracBrowser for help on using the repository browser.