|
ACF $AcfVersion:0$
|
Component realizing static connection between GUI and model components. More...
#include <CModelEditorGuiComp.h>
Public Types | |
| typedef icomp::CComponentBase | BaseClass |
Public Types inherited from imod::IModelEditor | |
| enum | ChangeFlags { CF_INIT_EDITOR = 0x3720694 } |
| Data model change notification flags. More... | |
Public Member Functions | |
| CModelEditorGuiComp () | |
| 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. | |
| virtual void | OnTryClose (bool *ignoredPtr=NULL) override |
| Called when the application is attempting to close. | |
| virtual void | UpdateEditor (const istd::IChangeable::ChangeSet &changeSet) override |
| Updates editor with model data. | |
| virtual void | UpdateModelFromEditor () const override |
| Updates model from editor. | |
| 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. | |
Public Member Functions inherited from icomp::CComponentBase | |
| CComponentBase () | |
| Create component and assign it to specific context. | |
| virtual const icomp::IComponent * | GetParentComponent (bool ownerOnly=false) const override |
| Get parent of this component. | |
| virtual void * | GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="") override |
| Get access to specified component interface. | |
| virtual IComponentContextSharedPtr | GetComponentContext () const override |
| Get access to component context describing all application-specified component information loaded from components registry. | |
| virtual void | SetComponentContext (const IComponentContextSharedPtr &contextPtr, const icomp::IComponent *parentPtr, bool isParentOwner) override |
| Set component context of this component. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Protected Member Functions | |
| virtual void | OnComponentCreated () override |
| virtual void | OnComponentDestroyed () override |
Protected Member Functions inherited from icomp::CComponentBase | |
| bool | IsComponentActive () const |
| Check if component is active. | |
| virtual const icomp::IRealComponentStaticInfo & | GetComponentStaticInfo () const =0 |
| Get access to static info of this component. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from icomp::CComponentBase | |
| static const icomp::IRealComponentStaticInfo & | InitStaticInfo (IComponent *componentPtr) |
| static QByteArray | GetComponentId (const icomp::IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray()) |
Component realizing static connection between GUI and model components.
It allows to use boundle of model and GUI-observer components as simple GUI object.
Definition at line 23 of file CModelEditorGuiComp.h.
Definition at line 29 of file CModelEditorGuiComp.h.
| iqtgui::CModelEditorGuiComp::CModelEditorGuiComp | ( | ) |
|
overridevirtual |
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. |
Implements iqtgui::IGuiObject.
|
overridevirtual |
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.
Implements iqtgui::IGuiObject.
|
overridevirtual |
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.
Implements iqtgui::IGuiObject.
|
overridevirtual |
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.
Implements iqtgui::IGuiObject.
|
overridevirtual |
Returns true if the model data can be changed.
Implements imod::IModelEditor.
|
overrideprotectedvirtual |
Reimplemented from icomp::CComponentBase.
|
overrideprotectedvirtual |
Reimplemented from icomp::CComponentBase.
|
overridevirtual |
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. |
Implements iqtgui::IGuiObject.
|
overridevirtual |
Set flag that the model data can be changed.
Implements imod::IModelEditor.
|
overridevirtual |
Updates editor with model data.
This method will be called only if GUI is connected.
| changeSet | the same as changeSet in istd::IChangeable. |
Implements imod::IModelEditor.
|
overridevirtual |
Updates model from editor.
This method will be called only if GUI is connected and model is attached.
Implements imod::IModelEditor.