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

Last change on this file since 19314 was 15123, checked in by lyard, 6 years ago
linked statistic window do drawPatch checkbox
File size: 1.5 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
8class QCameraWidget : public BasicGlCamera
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;
26    bool fShowPixelMoveOver;
27    bool fShowPatchMoveOver;
28
29public:
30    bool fDrawPatch;
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 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
58private:
59     void CalculatePixelsColor();
60     void CalculatePatchColor();
61
62};
63
64typedef QCameraWidget Camera;
65#endif
Note: See TracBrowser for help on using the repository browser.