ACF $AcfVersion:0$
Public Types | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
iqtgui::CMultiPageGuiCompBase Class Referenceabstract

#include <CMultiPageGuiCompBase.h>

Inheritance diagram for iqtgui::CMultiPageGuiCompBase:
iqtgui::CMultiPageGuiCompAttr imod::CMultiModelDispatcherBase iqtgui::CGuiComponentBase istd::IPolymorphic iqtgui::TMakeIconProviderCompWrap< ibase::TLocalizableWrap< icomp::CComponentBase > > iqtgui::IGuiObject iqtgui::TDesignSchemaHandlerWrap< Base > iqtgui::CIconProvider istd::IPolymorphic iqtgui::TRestorableGuiWrap< CMultiPageGuiCompBase > iqtgui::CTabContainerGuiComp iqtgui::CComposedGuiComp iqtgui::TGuiObserverWrap< iqtgui::CComposedGuiComp, imod::TSingleModelObserverBase< iprm::IParamsSet > > iqtprm::CExtComposedParamsSetGuiComp

Public Types

enum  ModelId { MI_USER = 1000 }
 
typedef CMultiPageGuiCompAttr BaseClass
 
typedef imod::CMultiModelDispatcherBase BaseClass2
 
- Public Types inherited from iqtgui::CMultiPageGuiCompAttr
typedef iqtgui::CGuiComponentBase BaseClass
 
- Public Types inherited from iqtgui::CGuiComponentBase
typedef TMakeIconProviderCompWrap< ibase::TLocalizableWrap< icomp::CComponentBase > > BaseClass
 
- Public Types inherited from iqtgui::TMakeIconProviderCompWrap< ibase::TLocalizableWrap< icomp::CComponentBase > >
typedef ibase::TLocalizableWrap< icomp::CComponentBaseBaseClass
 
- Public Types inherited from iqtgui::TDesignSchemaHandlerWrap< Base >
typedef Base BaseClass
 

Public Member Functions

 I_REGISTER_SUBELEMENT_INTERFACE_T (PageModel, iprm::ISelectionParam, ExtractPageModel)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (PageModel, iprm::IOptionsList, ExtractPageModel)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (PageModel, iser::ISerializable, ExtractPageModel)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (PageModel, imod::IModel, ExtractPageModel)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (PageModel, istd::IChangeable, ExtractPageModel)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (PageModel, IMultiVisualStatusProvider, ExtractPageModel)
 
 CMultiPageGuiCompBase ()
 
iprm::ISelectionParamGetPageModelRef ()
 
virtual int GetPagesCount () const =0
 Get the number of the pages in the UI container.
 
virtual iqtgui::IGuiObjectGetPageGuiComponent (int pageIndex) const =0
 Get the UI component for a given page.
 
- Public Member Functions inherited from iqtgui::CGuiComponentBase
 I_REGISTER_SUBELEMENT_INTERFACE_T (VisualStatus, IVisualStatus, ExtractVisualStatus)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (VisualStatus, istd::IChangeable, ExtractVisualStatus)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (VisualStatus, imod::IModel, ExtractVisualStatus)
 
 CGuiComponentBase ()
 
bool IsGuiShown () const
 
virtual bool IsGuiCreated () const override
 Checks if the GUI has been initialized and created.
 
virtual bool CreateGui (QWidget *parentPtr) override
 Initializes the GUI and connects it to the parent widget.
 
virtual bool DestroyGui () override
 Releases GUI resources and disconnects from the parent.
 
virtual QWidget * GetWidget () const override
 Gets access to the internal QWidget object.
 
- Public Member Functions inherited from iqtgui::TDesignSchemaHandlerWrap< Base >
 TDesignSchemaHandlerWrap ()
 
virtual void EnableDesignHandler (bool enable=true)
 If enabled, listen to the design schema change events from the application context.
 
- Public Member Functions inherited from iqtgui::CIconProvider
virtual QIcon GetIcon (const QString &iconName) const
 
virtual QString GetIconPath (const QString &iconName) const
 
virtual QString GetStyleSheetPath (const QString &styleSheetPath) const
 
QByteArray GetCurrentThemeId () const
 
void SetThemeId (const QByteArray &themeId)
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Slots

virtual void OnPageChanged (int widgetIndex)
 

Protected Member Functions

virtual int GetDesignType () const =0
 Get the container UI mode.
 
virtual int GetLogicalPageIndex (int physicalWidgetIndex) const
 Get logical page index from a given widget index.
 
virtual bool CreatePage (int pageIndex)
 Create a page in the page container widget.
 
virtual void RemovePage (int pageIndex)
 Remove a page from the container widget.
 
virtual void SetCurrentPage (int pageIndex)
 Set current page.
 
virtual void UpdateVisualElements ()
 Update visual status of the page elements.
 
virtual void CreatePages ()
 Create all container pages.
 
virtual void ResetPages ()
 Clear all container pages.
 
virtual QWidget * CreateQtWidget (QWidget *parentPtr) override
 Create slave widget object.
 
virtual void OnGuiCreated () override
 Called just after GUI is initialized.
 
virtual void OnGuiDestroyed () override
 Called just before GUI is released.
 
virtual void OnGuiRetranslate () override
 Called from widget event filter when GUI should be retranslated.
 
virtual void OnTryClose (bool *ignoredPtr=NULL) override
 Called when the application is attempting to close.
 
virtual void OnComponentCreated () override
 
virtual void OnComponentDestroyed () override
 
virtual void OnModelChanged (int modelId, const istd::IChangeable::ChangeSet &changeSet) override
 Called when some model observed by dispatcher will be changed.
 
bool EnsurePageInitialized (int pageIndex)
 
- Protected Member Functions inherited from iqtgui::CMultiPageGuiCompAttr
 I_MULTITEXTATTR (m_pageNamesAttrPtr)
 
- Protected Member Functions inherited from iqtgui::CGuiComponentBase
virtual void OnGuiDesignChanged ()
 
virtual void OnGuiShown ()
 Called from widget event filter when slave widget is shown.
 
virtual void OnGuiHidden ()
 Called from widget event filter when slave widget is hidden.
 
virtual bool OnKeyPressed (QKeyEvent *event)
 Called from widget event filter when key is pressed.
 
virtual void OnRetranslate ()
 Called when non-GUI elements (like commands) should be retranslated.
 
void SetStatusIcon (const QIcon &icon)
 Set status icon;.
 
void SetStatusText (const QString &text)
 Set status text;.
 
void SetDefaultVisualStatus ()
 
virtual void OnLanguageChanged () override
 
virtual void OnDesignSchemaChanged (const QByteArray &themeId) override
 
virtual bool eventFilter (QObject *sourcePtr, QEvent *eventPtr) override
 
- Protected Member Functions inherited from iqtgui::CIconProvider
virtual QIcon CreateIcon (const QString &iconName) const
 
bool RegisterModel (IModel *modelPtr, int modelId=0, const istd::IChangeable::ChangeSet &relevantFlags=istd::IChangeable::GetAllChanges())
 Register the data model to be observed.
 
void UnregisterModel (int modelId=0)
 Unregister the data model object.
 
void UnregisterAllModels ()
 Unregister all observed data objects.
 
template<class Object >
Object * GetObjectAt (int modelId) const
 Get concrete object instance of the obsered model.
 

Protected Attributes

imod::TModelWrap< PageModel > m_pageModel
 
- Protected Attributes inherited from iqtgui::CGuiComponentBase
imod::TModelWrap< VisualStatusm_visualStatus
 

Detailed Description

Definition at line 55 of file CMultiPageGuiCompBase.h.

Member Typedef Documentation

◆ BaseClass

Definition at line 61 of file CMultiPageGuiCompBase.h.

◆ BaseClass2

Definition at line 62 of file CMultiPageGuiCompBase.h.

Member Enumeration Documentation

◆ ModelId

Enumerator
MI_USER 

Minimal number which should be used for user-specific data models.

Definition at line 64 of file CMultiPageGuiCompBase.h.

Constructor & Destructor Documentation

◆ CMultiPageGuiCompBase()

iqtgui::CMultiPageGuiCompBase::CMultiPageGuiCompBase ( )

Member Function Documentation

◆ CreatePage()

virtual bool iqtgui::CMultiPageGuiCompBase::CreatePage ( int  pageIndex)
protectedvirtual

Create a page in the page container widget.

◆ CreatePages()

virtual void iqtgui::CMultiPageGuiCompBase::CreatePages ( )
protectedvirtual

Create all container pages.

Reimplemented in iqtprm::CExtComposedParamsSetGuiComp.

◆ CreateQtWidget()

virtual QWidget * iqtgui::CMultiPageGuiCompBase::CreateQtWidget ( QWidget *  parentPtr)
overrideprotectedvirtual

Create slave widget object.

Implements iqtgui::CGuiComponentBase.

◆ EnsurePageInitialized()

bool iqtgui::CMultiPageGuiCompBase::EnsurePageInitialized ( int  pageIndex)
protected

◆ GetDesignType()

virtual int iqtgui::CMultiPageGuiCompBase::GetDesignType ( ) const
protectedpure virtual

Get the container UI mode.

See also
iqtgui::CMultiPageWidget::DesignType

Implemented in iqtgui::CComposedGuiComp, and iqtgui::CTabContainerGuiComp.

◆ GetLogicalPageIndex()

virtual int iqtgui::CMultiPageGuiCompBase::GetLogicalPageIndex ( int  physicalWidgetIndex) const
protectedvirtual

Get logical page index from a given widget index.

◆ GetPageGuiComponent()

virtual iqtgui::IGuiObject * iqtgui::CMultiPageGuiCompBase::GetPageGuiComponent ( int  pageIndex) const
pure virtual

Get the UI component for a given page.

Implemented in iqtgui::CComposedGuiComp, and iqtgui::CTabContainerGuiComp.

◆ GetPageModelRef()

iprm::ISelectionParam & iqtgui::CMultiPageGuiCompBase::GetPageModelRef ( )

◆ GetPagesCount()

virtual int iqtgui::CMultiPageGuiCompBase::GetPagesCount ( ) const
pure virtual

Get the number of the pages in the UI container.

Implemented in iqtgui::CComposedGuiComp, and iqtgui::CTabContainerGuiComp.

◆ I_REGISTER_SUBELEMENT_INTERFACE_T() [1/6]

iqtgui::CMultiPageGuiCompBase::I_REGISTER_SUBELEMENT_INTERFACE_T ( PageModel  ,
imod::IModel  ,
ExtractPageModel   
)

◆ I_REGISTER_SUBELEMENT_INTERFACE_T() [2/6]

iqtgui::CMultiPageGuiCompBase::I_REGISTER_SUBELEMENT_INTERFACE_T ( PageModel  ,
IMultiVisualStatusProvider  ,
ExtractPageModel   
)

◆ I_REGISTER_SUBELEMENT_INTERFACE_T() [3/6]

iqtgui::CMultiPageGuiCompBase::I_REGISTER_SUBELEMENT_INTERFACE_T ( PageModel  ,
iprm::IOptionsList  ,
ExtractPageModel   
)

◆ I_REGISTER_SUBELEMENT_INTERFACE_T() [4/6]

iqtgui::CMultiPageGuiCompBase::I_REGISTER_SUBELEMENT_INTERFACE_T ( PageModel  ,
iprm::ISelectionParam  ,
ExtractPageModel   
)

◆ I_REGISTER_SUBELEMENT_INTERFACE_T() [5/6]

iqtgui::CMultiPageGuiCompBase::I_REGISTER_SUBELEMENT_INTERFACE_T ( PageModel  ,
iser::ISerializable  ,
ExtractPageModel   
)

◆ I_REGISTER_SUBELEMENT_INTERFACE_T() [6/6]

iqtgui::CMultiPageGuiCompBase::I_REGISTER_SUBELEMENT_INTERFACE_T ( PageModel  ,
istd::IChangeable  ,
ExtractPageModel   
)

◆ OnComponentCreated()

virtual void iqtgui::CMultiPageGuiCompBase::OnComponentCreated ( )
overrideprotectedvirtual

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnComponentDestroyed()

virtual void iqtgui::CMultiPageGuiCompBase::OnComponentDestroyed ( )
overrideprotectedvirtual

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnGuiCreated()

virtual void iqtgui::CMultiPageGuiCompBase::OnGuiCreated ( )
overrideprotectedvirtual

◆ OnGuiDestroyed()

virtual void iqtgui::CMultiPageGuiCompBase::OnGuiDestroyed ( )
overrideprotectedvirtual

◆ OnGuiRetranslate()

virtual void iqtgui::CMultiPageGuiCompBase::OnGuiRetranslate ( )
overrideprotectedvirtual

Called from widget event filter when GUI should be retranslated.

Reimplemented from iqtgui::CGuiComponentBase.

Reimplemented in iqtgui::TGuiObserverWrap< iqtgui::CComposedGuiComp, imod::TSingleModelObserverBase< iprm::IParamsSet > >.

◆ OnModelChanged()

virtual void iqtgui::CMultiPageGuiCompBase::OnModelChanged ( int  modelId,
const istd::IChangeable::ChangeSet changeSet 
)
overrideprotectedvirtual

Called when some model observed by dispatcher will be changed.

Implements imod::CMultiModelDispatcherBase.

◆ OnPageChanged

virtual void iqtgui::CMultiPageGuiCompBase::OnPageChanged ( int  widgetIndex)
protectedvirtualslot

◆ OnTryClose()

virtual void iqtgui::CMultiPageGuiCompBase::OnTryClose ( bool *  ignoredPtr = NULL)
overrideprotectedvirtual

Called when the application is attempting to close.

This method is invoked before the application closes, giving the GUI component a chance to prevent the close operation (e.g., to save unsaved data, show confirmation dialogs, or perform cleanup operations).

Parameters
ignoredPtrOptional pointer to a boolean flag. If not nullptr and the component wants to prevent closing (e.g., user cancels a save dialog), the implementation should set *ignoredPtr to true. If nullptr, the close operation cannot be prevented.
Note
If ignoredPtr is nullptr, the implementation must not try to prevent closing and should only perform necessary cleanup.
This method may be called multiple times if the close is initially prevented but later attempted again.
// Example implementation
virtual void OnTryClose(bool* ignoredPtr)
{
if (m_hasUnsavedData) {
if (ignoredPtr) {
// Show save dialog
int result = QMessageBox::question(GetWidget(),
"Unsaved Changes",
"Do you want to save your changes?",
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
if (result == QMessageBox::Save) {
SaveData();
} else if (result == QMessageBox::Cancel) {
*ignoredPtr = true; // Prevent closing
return;
}
}
}
// Perform cleanup if needed
}
virtual QWidget * GetWidget() const override
Gets access to the internal QWidget object.
virtual void OnTryClose(bool *ignoredPtr=NULL) override
Called when the application is attempting to close.
See also
DestroyGui()

Reimplemented from iqtgui::CGuiComponentBase.

◆ RemovePage()

virtual void iqtgui::CMultiPageGuiCompBase::RemovePage ( int  pageIndex)
protectedvirtual

Remove a page from the container widget.

◆ ResetPages()

virtual void iqtgui::CMultiPageGuiCompBase::ResetPages ( )
protectedvirtual

Clear all container pages.

◆ SetCurrentPage()

virtual void iqtgui::CMultiPageGuiCompBase::SetCurrentPage ( int  pageIndex)
protectedvirtual

Set current page.

◆ UpdateVisualElements()

virtual void iqtgui::CMultiPageGuiCompBase::UpdateVisualElements ( )
protectedvirtual

Update visual status of the page elements.

Member Data Documentation

◆ m_pageModel

imod::TModelWrap<PageModel> iqtgui::CMultiPageGuiCompBase::m_pageModel
protected

Definition at line 221 of file CMultiPageGuiCompBase.h.


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