1 | // %flair:license{ |
---|
2 | // This file is part of the Flair framework distributed under the |
---|
3 | // CECILL-C License, Version 1.0. |
---|
4 | // %flair:license} |
---|
5 | /*! |
---|
6 | * \file UsRangeFinder.h |
---|
7 | * \brief Base class for UsRangeFinder |
---|
8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253 |
---|
9 | * \date 2014/01/22 |
---|
10 | * \version 4.0 |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef USRANGEFINDER_H |
---|
14 | #define USRANGEFINDER_H |
---|
15 | |
---|
16 | #include <IODevice.h> |
---|
17 | |
---|
18 | namespace flair |
---|
19 | { |
---|
20 | namespace core |
---|
21 | { |
---|
22 | class cvmatrix; |
---|
23 | } |
---|
24 | namespace gui |
---|
25 | { |
---|
26 | class Tab; |
---|
27 | class TabWidget; |
---|
28 | class GroupBox; |
---|
29 | class Layout; |
---|
30 | class DataPlot1D; |
---|
31 | } |
---|
32 | } |
---|
33 | |
---|
34 | namespace flair |
---|
35 | { |
---|
36 | namespace sensor |
---|
37 | { |
---|
38 | /*! \class UsRangeFinder |
---|
39 | * |
---|
40 | * \brief Base class for UsRangeFinder |
---|
41 | * |
---|
42 | * Use this class to define a custom UsRangeFinder. |
---|
43 | * |
---|
44 | */ |
---|
45 | class UsRangeFinder : public core::IODevice |
---|
46 | { |
---|
47 | public: |
---|
48 | /*! |
---|
49 | * \brief Constructor |
---|
50 | * |
---|
51 | * Construct a UsRangeFinder. Control part. |
---|
52 | * |
---|
53 | * \param parent parent |
---|
54 | * \param name name |
---|
55 | */ |
---|
56 | UsRangeFinder(const core::FrameworkManager* parent,std::string name); |
---|
57 | |
---|
58 | /*! |
---|
59 | * \brief Constructor |
---|
60 | * |
---|
61 | * Construct a UsRangeFinder. Simulation part. |
---|
62 | * |
---|
63 | * \param parent parent |
---|
64 | * \param name name |
---|
65 | */ |
---|
66 | UsRangeFinder(const core::IODevice* parent,std::string name); |
---|
67 | |
---|
68 | /*! |
---|
69 | * \brief Destructor |
---|
70 | * |
---|
71 | */ |
---|
72 | ~UsRangeFinder(); |
---|
73 | |
---|
74 | /*! |
---|
75 | * \brief Lock user interface |
---|
76 | * |
---|
77 | */ |
---|
78 | void LockUserInterface(void) const; |
---|
79 | |
---|
80 | /*! |
---|
81 | * \brief Unlock user interface |
---|
82 | * |
---|
83 | */ |
---|
84 | void UnlockUserInterface(void) const; |
---|
85 | |
---|
86 | /*! |
---|
87 | * \brief Use default plot |
---|
88 | * |
---|
89 | * Should no be used for the simulation part. |
---|
90 | */ |
---|
91 | void UseDefaultPlot(void); |
---|
92 | |
---|
93 | /*! |
---|
94 | * \brief Plot |
---|
95 | * |
---|
96 | * \return DataPlot1D |
---|
97 | */ |
---|
98 | gui::DataPlot1D* GetPlot(void) const; |
---|
99 | |
---|
100 | /*! |
---|
101 | * \brief Setup Layout |
---|
102 | * |
---|
103 | * \return a Layout available |
---|
104 | */ |
---|
105 | gui::Layout* GetLayout(void) const; |
---|
106 | |
---|
107 | /*! |
---|
108 | * \brief Plot tab |
---|
109 | * |
---|
110 | * \return plot Tab |
---|
111 | */ |
---|
112 | gui::Tab* GetPlotTab(void) const; |
---|
113 | |
---|
114 | /*! |
---|
115 | * \brief Value |
---|
116 | * |
---|
117 | * \return output value |
---|
118 | */ |
---|
119 | float Value(void) const; |
---|
120 | |
---|
121 | protected: |
---|
122 | /*! |
---|
123 | * \brief Output matrix |
---|
124 | * |
---|
125 | * \return output matrix |
---|
126 | */ |
---|
127 | core::cvmatrix *output; |
---|
128 | |
---|
129 | /*! |
---|
130 | * \brief Setup GroupBox |
---|
131 | * |
---|
132 | * \return a GroupBox available |
---|
133 | */ |
---|
134 | gui::GroupBox* GetGroupBox(void) const; |
---|
135 | |
---|
136 | private: |
---|
137 | /*! |
---|
138 | * \brief Update using provided datas |
---|
139 | * |
---|
140 | * Reimplemented from IODevice. |
---|
141 | * |
---|
142 | * \param data data from the parent to process |
---|
143 | */ |
---|
144 | void UpdateFrom(const core::io_data *data){}; |
---|
145 | |
---|
146 | gui::Tab* main_tab; |
---|
147 | gui::TabWidget *tab; |
---|
148 | gui::GroupBox* setup_groupbox; |
---|
149 | gui::Tab* sensor_tab; |
---|
150 | gui::DataPlot1D* plot; |
---|
151 | gui::Tab* plot_tab; |
---|
152 | }; |
---|
153 | } // end namespace sensor |
---|
154 | } // end namespace flair |
---|
155 | #endif // USRANGEFINDER_H |
---|