|
ACF $AcfVersion:0$
|
Common interface for GUI objects used in ACF component context. More...
#include <IGuiObject.h>
Public Member Functions | |
| virtual bool | IsGuiCreated () const =0 |
| Checks if the GUI has been initialized and created. | |
| virtual bool | CreateGui (QWidget *parentPtr)=0 |
| Initializes the GUI and connects it to the parent widget. | |
| virtual bool | DestroyGui ()=0 |
| Releases GUI resources and disconnects from the parent. | |
| virtual QWidget * | GetWidget () const =0 |
| Gets access to the internal QWidget object. | |
| virtual void | OnTryClose (bool *ignoredPtr=NULL)=0 |
| Called when the application is attempting to close. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Common interface for GUI objects used in ACF component context.
IGuiObject provides a standardized interface for managing the lifecycle of GUI components within the ACF framework. It handles initialization, parent-child relationships, and cleanup of Qt-based GUI elements in a component-oriented architecture.
The typical lifecycle of a GUI object follows these stages:
Definition at line 132 of file IGuiObject.h.
|
pure virtual |
Initializes the GUI and connects it to the parent widget.
This method creates and initializes all Qt widgets that form the GUI component. It should only be called once; subsequent calls should be ignored or return false. The created widgets become children of the specified parent widget.
| parentPtr | Pointer to the parent QWidget. The created GUI will be a child of this widget. Can be nullptr for top-level widgets. |
Implemented in iqtgui::CGuiComponentBase, iqtgui::CModelEditorGuiComp, iqtgui::TRestorableGuiWrap< CMultiPageGuiCompBase >, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMainWindow > >, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > >, and iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QWidget > >.
|
pure virtual |
Releases GUI resources and disconnects from the parent.
This method destroys all Qt widgets created by CreateGui() and cleans up associated resources. After calling this method, IsGuiCreated() should return false, and GetWidget() should return nullptr or an invalid pointer.
Implemented in iqtgui::CGuiComponentBase, iqtgui::CModelEditorGuiComp, iqtgui::TRestorableGuiWrap< CMultiPageGuiCompBase >, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMainWindow > >, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > >, and iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QWidget > >.
|
pure virtual |
Gets access to the internal QWidget object.
Returns a pointer to the main QWidget that represents this GUI component. This widget can be used for layout management, showing/hiding, or other Qt-specific operations.
Implemented in iqtgui::CGuiComponentBase, and iqtgui::CModelEditorGuiComp.
|
pure virtual |
Checks if the GUI has been initialized and created.
This method returns true after CreateGui() has been successfully called and before DestroyGui() is called. It can be used to verify the GUI state before performing operations that require an active GUI.
Implemented in iqtgui::CGuiComponentBase, and iqtgui::CModelEditorGuiComp.
|
pure virtual |
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).
| ignoredPtr | Optional 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. |
Implemented in iqtdoc::CMultiDocumentWorkspaceGuiComp, iqtdoc::CSingleDocumentWorkspaceGuiComp, iqtgui::CGuiComponentBase, iqtgui::CModelEditorGuiComp, iqtgui::CMultiPageGuiCompBase, and iqtgui::CSimpleMainWindowGuiComp.