COptionsManagerGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtprm_COptionsManagerGuiComp_included
2 #define iqtprm_COptionsManagerGuiComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QComboBox>
9 #else
10 #include <QtGui/QComboBox>
11 #endif
12 
13 
14 // ACF includes
15 #include <istd/TPointerVector.h>
17 #include <iprm/ISelectionParam.h>
18 #include <iprm/IOptionsManager.h>
19 #include <iqtgui/IIconProvider.h>
21 #include <GeneratedFiles/iqtprm/ui_COptionsManagerGuiComp.h>
22 
23 
24 namespace iqtprm
25 {
26 
27 
33  Ui::COptionsManagerGuiComp, iprm::IOptionsManager>,
35 {
36  Q_OBJECT
37 
38 public:
40  Ui::COptionsManagerGuiComp, iprm::IOptionsManager> BaseClass;
41 
46  {
51 
56  };
57 
58  I_BEGIN_COMPONENT(COptionsManagerGuiComp);
59  I_ASSIGN(m_optionsLabelAttrPtr, "OptionsLabel", "Command label for the options selector", false, "Select");
60  I_ASSIGN(m_infoLabelAttrPtr, "InfoLabel", "Information label for the options selector", false, "Info");
61  I_ASSIGN(m_infoIconProviderCompPtr, "InfoIconProvider", "Provider of the info icon", false, "InfoIconProvider");
62  I_ASSIGN(m_iconSizeAttrPtr, "IconSize", "Size of the used icons", false, 32);
63  I_ASSIGN(m_labelPositionAttrPtr, "LabelPosition", "Selection label position. 0 - Left from the selector,\n1 - On top of the selector", false, LP_LEFT);
64  I_END_COMPONENT;
65 
67 
68 protected:
69  // reimplemented (iqtgui::TGuiObserverWrap)
70  virtual void OnGuiModelAttached();
71  virtual void OnGuiModelDetached();
72  virtual void UpdateModel() const;
73  virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet);
74 
75  // reimplemented (iqtgui::CGuiComponentBase)
76  virtual void OnGuiCreated();
77  virtual void OnGuiDestroyed();
78  virtual void OnGuiShown();
79  virtual void OnGuiRetranslate();
80 
81  // reimplemented (imod::CMultiModelDispatcherBase)
82  virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet);
83 
84 protected Q_SLOTS:
85  void OnSelectionChanged(int index);
86  void OnEditingFinished();
87  void OnTextEdited(const QString& text);
88  void OnTextChanged(const QString& text);
89 
90 private:
91  void UpdateComboBox();
92  void UpdateDescriptionFrame();
93 
94 private:
95  I_TEXTATTR(m_optionsLabelAttrPtr);
96  I_TEXTATTR(m_infoLabelAttrPtr);
97  I_ATTR(int, m_labelPositionAttrPtr);
98  I_ATTR(int, m_iconSizeAttrPtr);
99  I_REF(iqtgui::IIconProvider, m_infoIconProviderCompPtr);
100 
104  bool m_isEditingFlag;
105  istd::TDelPtr<QLabel> m_selectorLabelPtr;
106 
107  bool m_isUpdateBlocked;
108 };
109 
110 
111 } // namespace iqtprm
112 
113 
114 #endif // !iqtprm_COptionsManagerGuiComp_included
115 
116 
Simple editor for an exclusive option selection.
void OnTextChanged(const QString &text)
This interface provides acces to an icon.
Definition: IIconProvider.h:21
virtual void OnGuiDestroyed()
Called just before GUI is released.
LabelPosition
Command label position.
Generic implementation of a data model changes notifier.
virtual void OnGuiModelAttached()
Called when model is attached and GUI is created.
virtual void OnGuiCreated()
Called just after GUI is initialized.
Common interface for the management of the dynamic selection constraints.
void OnSelectionChanged(int index)
virtual void UpdateModel() const
Do update of the model to reflect the current contents of GUI.
virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet)
Base class for all Qt GUI components.
virtual void OnGuiShown()
Called from widget event filter when slave widget is shown.
iqtgui::TDesignerGuiObserverCompBase< Ui::COptionsManagerGuiComp, iprm::IOptionsManager > BaseClass
Set of change flags (its IDs).
Definition: IChangeable.h:30
virtual void OnGuiRetranslate()
Called from widget event filter when GUI should be retranslated.
virtual void OnGuiModelDetached()
Called when model is detached or GUI is destroyed.
void OnTextEdited(const QString &text)
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet)
Do update of the GUI to reflect the state of model.

© 2007-2017 Witold Gantzke and Kirill Lepskiy