FACT++  1.0
QCameraWidget.h
Go to the documentation of this file.
1 #ifndef Q_CAMERA_WIDGET_H_
2 #define Q_CAMERA_WIDGET_H_
3 
4 #include "BasicGlCamera.h"
5 #include <valarray>
6 #include <set>
7 
9 {
10  Q_OBJECT
11 
12  typedef std::pair<double, double> Position;
13  typedef std::vector<Position> Positions;
14 
15  //FIXME this variable seems to be deprecated
16  Positions fGeom;
17 
18  std::vector<bool> fBold;
19  std::vector<bool> fEnable;
20 
21  std::vector<int> highlightedPatches;
22  std::vector<int> highlightedPixels;
23 
24 
25  int lastFace;
28 
29 public:
30  bool fDrawPatch;
31  void highlightPixel(int idx, bool highlight=true);
32  void highlightPatch(int idx, bool highlight=true);
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 DrawCameraText();
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 std::valarray<double> &ddata);
52  void SetData(const std::valarray<float> &ddata);
53 
54 
55  void ShowPixelCursor(bool);
56  void ShowPatchCursor(bool);
57 
58 private:
59  void CalculatePixelsColor();
60  void CalculatePatchColor();
61 
62 };
63 
65 #endif
const char * GetName()
int GetIdx(float px, float py)
void SetEnable(int idx, bool b)
std::vector< int > highlightedPixels
Definition: QCameraWidget.h:22
void mousePressEvent(QMouseEvent *cEvent)
void highlightPatch(int idx, bool highlight=true)
void CalculatePatchColor()
void ShowPixelCursor(bool)
bool fShowPatchMoveOver
Definition: QCameraWidget.h:27
void clearHighlightedPatches()
std::vector< Position > Positions
Definition: QCameraWidget.h:13
char * GetObjectInfo(int px, int py)
double GetData(int idx)
void ShowPatchCursor(bool)
void DrawCameraText()
Positions fGeom
Definition: QCameraWidget.h:16
QCameraWidget(QWidget *pparent=0)
std::pair< double, double > Position
Definition: QCameraWidget.h:12
void SetData(const std::valarray< double > &ddata)
bool fShowPixelMoveOver
Definition: QCameraWidget.h:26
QCameraWidget Camera
Definition: QCameraWidget.h:64
void mouseDoubleClickEvent(QMouseEvent *event)
std::vector< int > highlightedPatches
Definition: QCameraWidget.h:21
void highlightPixel(int idx, bool highlight=true)
void drawCamera(bool alsoWire)
std::vector< bool > fBold
Definition: QCameraWidget.h:18
void CalculatePixelsColor()
void clearHighlightedPixels()
void mouseMoveEvent(QMouseEvent *event)
std::vector< bool > fEnable
Definition: QCameraWidget.h:19