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

Last change on this file since 11925 was 11923, checked in by tbretz, 14 years ago
Possibility to switch highlighting off was missing.
File size: 1.2 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 Positions fGeom;
19
20 vector<bool> fBold;
21 vector<bool> fEnable;
22
23 vector<int> highlightedPatches;
24 vector<int> highlightedPixels;
25
26
27 int lastFace;
28
29
30public:
31 void highlightPixel(int idx, bool highlight=true);
32 void highlightPatch(int idx, bool highlight=true);
33 void clearHighlightedPatches();
34 void clearHighlightedPixels();
35 QCameraWidget(QWidget *pparent = 0);
36 void paintGL();
37 void mousePressEvent(QMouseEvent *cEvent);
38 void mouseMoveEvent(QMouseEvent *event);
39 void mouseDoubleClickEvent(QMouseEvent *event);
40 void Reset();
41 void drawCamera(bool alsoWire);
42 void drawPatches();
43 void SetEnable(int idx, bool b);
44 double GetData(int idx);
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
53private:
54 void CalculatePixelsColor();
55 void CalculatePatchColor();
56
57};
58
59typedef QCameraWidget Camera;
60#endif
Note: See TracBrowser for help on using the repository browser.