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

Last change on this file since 11944 was 11941, checked in by lyard, 14 years ago
added autoRefresh flag to GL widgets
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#include <set>
7
8
9using namespace std;
10
11class QCameraWidget : public BasicGlCamera
12{
13 Q_OBJECT
14
15 typedef pair<double, double> Position;
16 typedef vector<Position> Positions;
17
18 //FIXME this variable seems to be deprecated
19 Positions fGeom;
20
21 vector<bool> fBold;
22 vector<bool> fEnable;
23
24 vector<int> highlightedPatches;
25 vector<int> highlightedPixels;
26
27
28 int lastFace;
29
30
31public:
32 void highlightPixel(int idx, bool highlight=true);
33 void highlightPatch(int idx, bool highlight=true);
34 void clearHighlightedPatches();
35 void clearHighlightedPixels();
36 QCameraWidget(QWidget *pparent = 0);
37 void paintGL();
38 void mousePressEvent(QMouseEvent *cEvent);
39 void mouseMoveEvent(QMouseEvent *event);
40 void mouseDoubleClickEvent(QMouseEvent *event);
41 void Reset();
42 void drawCamera(bool alsoWire);
43 void drawPatches();
44 void SetEnable(int idx, bool b);
45 double GetData(int idx);
46 const char *GetName();
47
48 int GetIdx(float px, float py);
49 char *GetObjectInfo(int px, int py);
50
51 void SetData(const valarray<double> &ddata);
52
53
54private:
55 void CalculatePixelsColor();
56 void CalculatePatchColor();
57
58};
59
60typedef QCameraWidget Camera;
61#endif
Note: See TracBrowser for help on using the repository browser.