CNumericParamsGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtmeas_CNumericParamsGuiComp_included
2 #define iqtmeas_CNumericParamsGuiComp_included
3 
4 
5 // Qt includes
6 #include<QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QFrame>
9 #include <QtWidgets/QGroupBox>
10 #else
11 #include <QtGui/QFrame>
12 #include <QtGui/QGroupBox>
13 #endif
14 
15 // ACF includes
16 #include "istd/TPointerVector.h"
17 #include "imod/TModelWrap.h"
19 
20 // ACF-Solutions includes
21 #include "imeas/INumericValue.h"
23 
24 
25 namespace iqtmeas
26 {
27 
28 
31  iqtgui::TGuiObserverWrap<
32  iqtgui::TGuiComponentBase<QWidget>,
33  imod::TSingleModelObserverBase<imeas::INumericValue> > >
34 {
35  Q_OBJECT
36 public:
41 
42  I_BEGIN_COMPONENT(CNumericParamsGuiComp);
43  I_REGISTER_INTERFACE(imod::IModelEditor);
44  I_ASSIGN(m_isSliderVisibleAttrPtr, "SliderVisible", "Enables slider control", true, true);
45  I_ASSIGN(m_isButtonsVisibleAttrPtr, "ButtonsVisible", "Enables min/max buttons", true, true);
46  I_ASSIGN(m_inputPolicyAttrPtr, "InputSizePolicy", "0 - minimal width (default)\n1 - expanding input \n2 - label and input have same width", true, 0);
47  I_END_COMPONENT;
48 
49  virtual ~CNumericParamsGuiComp();
50 
51  // reimplemented (imod::IModelEditor)
52  virtual void UpdateModel() const;
53 
54 protected:
55  // reimplemented (iqtgui::CGuiComponentBase)
56  virtual void OnGuiDestroyed();
57 
58  // reimplemented (iqtgui::TGuiObserverWrap)
59  virtual void UpdateGui(int changeFlags);
60 
61 public Q_SLOTS:
62  void OnValueChanged();
63 
64 private:
65  I_ATTR(bool, m_isSliderVisibleAttrPtr);
66  I_ATTR(bool, m_isButtonsVisibleAttrPtr);
67  I_ATTR(int, m_inputPolicyAttrPtr);
68 
70 };
71 
72 
73 } // namespace iqtmeas
74 
75 
76 #endif // !iqtmeas_CNumericParamsGuiComp_included
77 
78 
ibase::TModelObserverCompWrap< iqtgui::TGuiObserverWrap< iqtgui::TGuiComponentBase< QWidget >, imod::TSingleModelObserverBase< imeas::INumericValue > > > BaseClass
virtual void UpdateModel() const
virtual void UpdateGui(int changeFlags)

© 2007-2011 Witold Gantzke and Kirill Lepskiy