CSelectableGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtprm_CSelectableGuiComp_included
2 #define iqtprm_CSelectableGuiComp_included
3 
4 
5 // ACF includes
6 #include <istd/TPointerVector.h>
7 
8 #include <iprm/ISelectionParam.h>
9 
11 
12 #include <GeneratedFiles/iqtprm/ui_CSelectableGuiComp.h>
13 
14 
15 namespace iqtprm
16 {
17 
18 
23  Ui::CSelectableGuiComp,
24  iprm::ISelectionParam>
25 {
26  Q_OBJECT
27 public:
29  Ui::CSelectableGuiComp,
31 
32  I_BEGIN_COMPONENT(CSelectableGuiComp);
33  I_ASSIGN_MULTI_0(m_slaveGuisCompPtr, "SlaveGuis", "List of the slave GUI's", true);
34  I_ASSIGN(m_noSelectionLabelAttrPtr, "NoSelectionLabel", "Text to be shown for empty selection", false, "Nothing selected");
35  I_ASSIGN(m_noSelectionIconAttrPtr, "NoSelectionIcon", "File path to the image to be shown for empty selection", false, "");
36  I_ASSIGN(m_selectorGuiCompPtr, "SelectorGui", "UI for selection change", false, "SelectorGui");
37  I_ASSIGN_TO(m_selectorObserverCompPtr, m_selectorGuiCompPtr, false);
38  I_END_COMPONENT;
39 
40 protected:
41  // reimplemented (iqtgui::TGuiObserverWrap)
42  virtual void OnGuiModelAttached();
43  virtual void OnGuiModelDetached();
44  virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet);
45 
46  // reimplemented (iqtgui::CGuiComponentBase)
47  virtual void OnGuiCreated();
48  virtual void OnGuiDestroyed();
49 
50 protected:
51  I_MULTIREF(iqtgui::IGuiObject, m_slaveGuisCompPtr);
52  I_TEXTATTR(m_noSelectionLabelAttrPtr);
53  I_ATTR(QString, m_noSelectionIconAttrPtr);
54  I_REF(iqtgui::IGuiObject, m_selectorGuiCompPtr);
55  I_REF(imod::IObserver, m_selectorObserverCompPtr);
56 
57 private:
58  typedef QMap<QWidget*, iqtgui::IGuiObject*> WidgetGuiMap;
59 
60  WidgetGuiMap m_widgetToGuiMap;
61 };
62 
63 
64 } // namespace iqtprm
65 
66 
67 #endif // !iqtprm_CSelectableGuiComp_included
68 
69 
Component to show any selected GUI, implemented as observer of iprm::ISelectionParam.
virtual void OnGuiModelDetached()
Called when model is detached or GUI is destroyed.
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet)
Do update of the GUI to reflect the state of model.
virtual void OnGuiModelAttached()
Called when model is attached and GUI is created.
Base class for all Qt GUI components.
Common interface for GUI objects using in component context.
Definition: IGuiObject.h:25
virtual void OnGuiCreated()
Called just after GUI is initialized.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition: IObserver.h:24
I_TEXTATTR(m_noSelectionLabelAttrPtr)
Set of change flags (its IDs).
Definition: IChangeable.h:30
Interface allowing to select single option from list of options.
iqtgui::TDesignerGuiObserverCompBase< Ui::CSelectableGuiComp, iprm::ISelectionParam > BaseClass
virtual void OnGuiDestroyed()
Called just before GUI is released.

© 2007-2017 Witold Gantzke and Kirill Lepskiy