ACF $AcfVersion:0$
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
iqtgui::TGuiObserverWrap< Gui, Observer > Class Template Reference

Join functionality of iqtgui::IGuiObject interface and imod::IObserver. More...

#include <TGuiObserverWrap.h>

Inheritance diagram for iqtgui::TGuiObserverWrap< Gui, Observer >:
imod::IModelEditor istd::IPolymorphic

Classes

class  UpdateBlocker
 

Public Member Functions

 TGuiObserverWrap ()
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
 
virtual bool OnModelDetached (imod::IModel *modelPtr) override
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Member Functions

virtual void OnGuiModelShown ()
 Called when model is attached and GUI is shown.
 
virtual void OnGuiModelHidden ()
 Called when model is detached or GUI is hidden.
 
virtual void OnGuiModelAttached ()
 Called when model is attached and GUI is created.
 
virtual void OnGuiModelDetached ()
 Called when model is detached or GUI is destroyed.
 
bool IsUpdateBlocked () const
 Check if GUI updating is blocked.
 
bool DoUpdateModel () const
 Secure update model.
 
virtual void UpdateModel () const
 Do update of the model to reflect the current contents of GUI.
 
virtual void UpdateGui (const istd::IChangeable::ChangeSet &changeSet)
 Do update of the GUI to reflect the state of model.
 
virtual void UpdateEditor (const istd::IChangeable::ChangeSet &changeSet) override
 Updates editor with model data.
 
virtual void UpdateModelFromEditor () const override
 Updates model from editor.
 
virtual void OnGuiShown () override
 
virtual void OnGuiHidden () override
 
virtual void OnGuiRetranslate () override
 
virtual void OnGuiCreated () override
 
virtual void OnGuiDestroyed () override
 
virtual void AfterUpdate (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
 
virtual bool IsReadOnly () const override
 Returns true if the model data can be changed.
 
virtual void SetReadOnly (bool state) override
 Set flag that the model data can be changed.
 
void SetDisableUiIfReadOnly (bool state)
 Control if GUI should be disaled for read-only editors.
 

Protected Attributes

bool m_isReadOnly
 

Additional Inherited Members

- Public Types inherited from imod::IModelEditor
enum  ChangeFlags { CF_INIT_EDITOR = 0x3720694 }
 Data model change notification flags. More...
 

Detailed Description

template<class Gui, class Observer>
class iqtgui::TGuiObserverWrap< Gui, Observer >

Join functionality of iqtgui::IGuiObject interface and imod::IObserver.

Definition at line 28 of file TGuiObserverWrap.h.

Constructor & Destructor Documentation

◆ TGuiObserverWrap()

template<class Gui , class Observer >
iqtgui::TGuiObserverWrap< Gui, Observer >::TGuiObserverWrap ( )

Definition at line 143 of file TGuiObserverWrap.h.

Member Function Documentation

◆ AfterUpdate()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::AfterUpdate ( imod::IModel modelPtr,
const istd::IChangeable::ChangeSet changeSet 
)
overrideprotectedvirtual

◆ DoUpdateModel()

template<class Gui , class Observer >
bool iqtgui::TGuiObserverWrap< Gui, Observer >::DoUpdateModel ( ) const
protected

Secure update model.

It use GUI block mechanism and it is designed to be called directly from UI slot.

Definition at line 250 of file TGuiObserverWrap.h.

◆ IsReadOnly()

template<class Gui , class Observer >
bool iqtgui::TGuiObserverWrap< Gui, Observer >::IsReadOnly ( ) const
overrideprotectedvirtual

Returns true if the model data can be changed.

Implements imod::IModelEditor.

Definition at line 395 of file TGuiObserverWrap.h.

◆ IsUpdateBlocked()

template<class Gui , class Observer >
bool iqtgui::TGuiObserverWrap< Gui, Observer >::IsUpdateBlocked ( ) const
protected

Check if GUI updating is blocked.

Definition at line 234 of file TGuiObserverWrap.h.

◆ OnGuiCreated()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiCreated ( )
overrideprotectedvirtual

◆ OnGuiDestroyed()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiDestroyed ( )
overrideprotectedvirtual

Reimplemented in iqtprm::CExtComposedParamsSetGuiComp.

Definition at line 364 of file TGuiObserverWrap.h.

References NULL.

◆ OnGuiHidden()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiHidden ( )
overrideprotectedvirtual

Definition at line 325 of file TGuiObserverWrap.h.

References NULL.

◆ OnGuiModelAttached()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiModelAttached ( )
protectedvirtual

◆ OnGuiModelDetached()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiModelDetached ( )
protectedvirtual

Called when model is detached or GUI is destroyed.

Reimplemented in iqt2d::CImageViewComp, iqtdoc::CDocumentMetaInfoEditorComp, and iqtprm::CExtComposedParamsSetGuiComp.

Definition at line 222 of file TGuiObserverWrap.h.

References NULL.

◆ OnGuiModelHidden()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiModelHidden ( )
protectedvirtual

Called when model is detached or GUI is hidden.

Definition at line 205 of file TGuiObserverWrap.h.

◆ OnGuiModelShown()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiModelShown ( )
protectedvirtual

Called when model is attached and GUI is shown.

Definition at line 199 of file TGuiObserverWrap.h.

◆ OnGuiRetranslate()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiRetranslate ( )
overrideprotectedvirtual

Definition at line 336 of file TGuiObserverWrap.h.

◆ OnGuiShown()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::OnGuiShown ( )
overrideprotectedvirtual

Definition at line 305 of file TGuiObserverWrap.h.

References NULL.

◆ OnModelAttached()

template<class Gui , class Observer >
bool iqtgui::TGuiObserverWrap< Gui, Observer >::OnModelAttached ( imod::IModel modelPtr,
istd::IChangeable::ChangeSet changeMask 
)
overridevirtual

Definition at line 156 of file TGuiObserverWrap.h.

References NULL.

◆ OnModelDetached()

template<class Gui , class Observer >
bool iqtgui::TGuiObserverWrap< Gui, Observer >::OnModelDetached ( imod::IModel modelPtr)
overridevirtual

Definition at line 177 of file TGuiObserverWrap.h.

◆ SetDisableUiIfReadOnly()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::SetDisableUiIfReadOnly ( bool  state)
protected

Control if GUI should be disaled for read-only editors.

By default it is set to true.

Definition at line 241 of file TGuiObserverWrap.h.

◆ SetReadOnly()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::SetReadOnly ( bool  state)
overrideprotectedvirtual

Set flag that the model data can be changed.

Returns
true, if this feature is supported.

Implements imod::IModelEditor.

Reimplemented in iqtprm::CExtComposedParamsSetGuiComp.

Definition at line 402 of file TGuiObserverWrap.h.

References NULL.

◆ UpdateEditor()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::UpdateEditor ( const istd::IChangeable::ChangeSet changeSet)
overrideprotectedvirtual

Updates editor with model data.

This method will be called only if GUI is connected.

Parameters
changeSetthe same as changeSet in istd::IChangeable.

Implements imod::IModelEditor.

Reimplemented in iqtprm::CExtComposedParamsSetGuiComp.

Definition at line 280 of file TGuiObserverWrap.h.

◆ UpdateGui()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::UpdateGui ( const istd::IChangeable::ChangeSet changeSet)
protectedvirtual

Do update of the GUI to reflect the state of model.

This method should be implmented by derived classes instead of imod::IModelEditor::UpdateEditor().

Reimplemented in CTextEditorComp, iqt2d::CImageViewComp, iqt2d::CMultiBitmapViewComp, iqtdoc::CDocumentMetaInfoEditorComp, and iqtgui::CStatusGuiComp.

Definition at line 272 of file TGuiObserverWrap.h.

◆ UpdateModel()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::UpdateModel ( ) const
protectedvirtual

Do update of the model to reflect the current contents of GUI.

This method should be implmented by derived classes instead of imod::IModelEditor::UpdateModelFromEditor().

Reimplemented in CTextEditorComp, and iqtprm::CExtComposedParamsSetGuiComp.

Definition at line 266 of file TGuiObserverWrap.h.

◆ UpdateModelFromEditor()

template<class Gui , class Observer >
void iqtgui::TGuiObserverWrap< Gui, Observer >::UpdateModelFromEditor ( ) const
overrideprotectedvirtual

Updates model from editor.

This method will be called only if GUI is connected and model is attached.

Implements imod::IModelEditor.

Definition at line 294 of file TGuiObserverWrap.h.

Member Data Documentation

◆ m_isReadOnly

template<class Gui , class Observer >
bool iqtgui::TGuiObserverWrap< Gui, Observer >::m_isReadOnly
protected

Definition at line 119 of file TGuiObserverWrap.h.


The documentation for this class was generated from the following file: