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

Last change on this file since 12006 was 11997, checked in by tbretz, 14 years ago
Added a SetDatat taking a valarray of floats as argument -- could be replaced by a template if more are needed.
File size: 1.4 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 DrawCameraText();
44 void drawPatches();
45 void SetEnable(int idx, bool b);
46 double GetData(int idx);
47 const char *GetName();
48
49 int GetIdx(float px, float py);
50 char *GetObjectInfo(int px, int py);
51
52 void SetData(const valarray<double> &ddata);
53 void SetData(const valarray<float> &ddata);
54
55
56private:
57 void CalculatePixelsColor();
58 void CalculatePatchColor();
59
60};
61
62typedef QCameraWidget Camera;
63#endif
Note: See TracBrowser for help on using the repository browser.