CNameParamGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtprm_CNameParamGuiComp_included
2 #define iqtprm_CNameParamGuiComp_included
3 
4 
5 // ACF includes
6 #include <iprm/INameParam.h>
7 
9 
10 #include <GeneratedFiles/iqtprm/ui_CNameParamGuiComp.h>
11 
12 
13 namespace iqtprm
14 {
15 
16 
18  Ui::CNameParamGuiComp,
19  iprm::INameParam>
20 {
21  Q_OBJECT
22 
23 public:
25  Ui::CNameParamGuiComp,
31  {
36 
41  };
42 
43  I_BEGIN_COMPONENT(CNameParamGuiComp);
44  I_ASSIGN(m_labelAttrPtr, "Label", "Label for the named object", false, "");
45  I_ASSIGN(m_labelPositionAttrPtr, "LabelPosition", "Selection label position. 0 - Left from the selector,\n1 - On top of the selector", false, LP_LEFT);
46  I_ASSIGN(m_regularExpressionAttrPtr, "InputFilter", "Input filter in form of a regular expression", false, "");
47  I_ASSIGN(m_updateOnEveryChangeAttrPtr, "UpdateOnEveryTextChange", "If set the model will be updated after every text change, else only if Enter pressed or focus lost", true, true);
48  I_END_COMPONENT;
49 
50  // reimplemented (iqtgui::TGuiObserverWrap)
51  virtual void UpdateModel() const;
52  virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet);
53 
54  // reimplemented (iqtgui::CGuiComponentBase)
55  virtual void OnGuiCreated();
56 
57 private Q_SLOTS:
58  void OnNameChanged(const QString& text);
59  void OnNameEdited();
60 
61 private:
62  I_TEXTATTR(m_labelAttrPtr);
63  I_ATTR(int, m_labelPositionAttrPtr);
64  I_ATTR(QByteArray, m_regularExpressionAttrPtr);
65  I_ATTR(bool, m_updateOnEveryChangeAttrPtr);
66 };
67 
68 
69 } // namespace iqtprm
70 
71 
72 #endif // !iqtprm_CNameParamGuiComp_included
73 
74 
Left from the name field.
Interface for a object containing simple text.
Definition: INameParam.h:20
LabelPosition
Command label position.
virtual void UpdateModel() const
Do update of the model to reflect the current contents of GUI.
virtual void OnGuiCreated()
Called just after GUI is initialized.
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet)
Do update of the GUI to reflect the state of model.
iqtgui::TDesignerGuiObserverCompBase< Ui::CNameParamGuiComp, iprm::INameParam > BaseClass
On top of the name field.
Base class for all Qt GUI components.
Set of change flags (its IDs).
Definition: IChangeable.h:30

© 2007-2017 Witold Gantzke and Kirill Lepskiy