|
ACF $AcfVersion:0$
|
Standard main window component for any document-based application. More...
#include <CMainWindowGuiComp.h>
Public Member Functions | |
| CMainWindowGuiComp () | |
| virtual bool | OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override |
| Callback invoked when an observable model is about to be attached to this observer. | |
| virtual bool | OnModelDetached (imod::IModel *modelPtr) override |
| Callback invoked when an observable model is about to be detached from this observer. | |
Public Member Functions inherited from iqtgui::CSimpleMainWindowGuiComp | |
| CSimpleMainWindowGuiComp () | |
| virtual void | OnTryClose (bool *ignoredPtr=NULL) override |
| Called when the application is attempting to close. | |
Public Member Functions inherited from iqtgui::TGuiComponentBase< QMainWindow > | |
| TGuiComponentBase () | |
| virtual QMainWindow * | GetQtWidget () const |
| virtual QWidget * | CreateQtWidget (QWidget *parentPtr) override |
| Create slave widget object. | |
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 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 | |
| void | OnNew () |
| void | OnOpen () |
| void | OnSave () |
| void | OnSaveAs () |
| void | OnQuit () |
| void | OnUndo () |
| void | OnRedo () |
| void | OnCopyPathToClipboard () |
| void | OnOpenDocumentFolder () |
Protected Slots inherited from iqtgui::CSimpleMainWindowGuiComp | |
| void | OnShowToolbars () |
| void | OnFullScreen () |
| void | OnAbout () |
| void | OnHelpManual () |
| void | OnSettings () |
| void | OnShowOtherCommandTriggered (bool enabled) |
Protected Member Functions | |
| virtual bool | OpenFile (const QString &fileName, const QByteArray *documentTypeIdPtr=NULL) |
| virtual bool | SaveActiveDocument () |
| virtual void | OnActiveViewChanged () |
| virtual void | OnActiveDocumentChanged () |
| virtual void | OnDragEnterEvent (QDragEnterEvent *dragEnterEventPtr) |
| virtual void | OnDropEvent (QDropEvent *dropEventPtr) |
| void | SetupNewCommand () |
| bool | HasDocumentTemplate () const |
| void | UpdateUndoMenu () |
| void | OnNewDocument (const QByteArray &documentTypeId) |
| virtual bool | SerializeRecentFileList (iser::IArchive &archive) |
| virtual void | UpdateRecentFileList (const idoc::IDocumentManager::FileToTypeMap &fileToTypeMap) |
| Updates displayed list of recent used files. | |
| virtual void | RemoveFromRecentFileList (const QString &filePath) |
| virtual bool | IsMainWindowActive (int index) const |
| virtual void | UpdateFixedCommands (iqtgui::CHierarchicalCommand &fixedCommands) override |
| virtual void | UpdateToolsCommands (iqtgui::CHierarchicalCommand &toolsCommand) override |
| virtual void | AppendMenuActions (iqtgui::CHierarchicalCommand &menuCommands) override |
| virtual void | OnGuiCreated () override |
| Called just after GUI is initialized. | |
| virtual void | OnGuiDestroyed () override |
| Called just before GUI is released. | |
| virtual void | OnRetranslate () override |
| Called when non-GUI elements (like commands) should be retranslated. | |
| virtual void | OnGuiDesignChanged () override |
| virtual void | OnUpdate (const istd::IChangeable::ChangeSet &changeSet) override |
| Called on update of observed model. | |
| virtual bool | eventFilter (QObject *sourcePtr, QEvent *eventPtr) override |
| virtual void | OnComponentCreated () override |
| virtual void | OnComponentDestroyed () override |
Protected Member Functions inherited from iqtgui::CSimpleMainWindowGuiComp | |
| virtual void | UpdateMenuActions () |
| virtual void | SetupMainWindowComponents (QMainWindow &mainWindow) |
| virtual void | AddMainComponent (int componentIndex, iqtgui::IMainWindowComponent *componentPtr) |
| virtual void | RemoveMainComponent (iqtgui::IMainWindowComponent *componentPtr) |
| virtual void | CreateMenuBar () |
| virtual void | CreateDefaultToolBar () |
| virtual void | SetToolBarsVisible (bool isVisible=true) |
| virtual void | SetupMenu () |
| virtual void | UpdateViewCommands (iqtgui::CHierarchicalCommand &viewCommand) |
| virtual void | UpdateHelpCommands (iqtgui::CHierarchicalCommand &helpCommand) |
| virtual void | UpdateMainWindowComponentsVisibility () |
| Set main window visible or invisible, depending on menu commands. | |
| virtual void | OnRestoreSettings (const QSettings &settings) override |
| virtual void | OnSaveSettings (QSettings &settings) const override |
| virtual void | OnGuiShown () override |
| Called from widget event filter when slave widget is shown. | |
Protected Member Functions inherited from iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMainWindow > > | |
| virtual bool | CreateGui (QWidget *parentPtr) override |
| virtual bool | DestroyGui () override |
Protected Member Functions inherited from iqtgui::CGuiComponentBase | |
| 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 | OnGuiRetranslate () |
| Called from widget event filter when GUI 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 |
Protected Member Functions inherited from iqtgui::CIconProvider | |
| virtual QIcon | CreateIcon (const QString &iconName) const |
Protected Member Functions inherited from imod::TSingleModelObserverBase< idoc::IDocumentManager > | |
| virtual idoc::IDocumentManager * | CastFromModel (imod::IModel *modelPtr) const |
| TSingleModelObserverBase () | |
| idoc::IDocumentManager * | GetObservedObject () const |
| Get instance of observed object. | |
| idoc::IDocumentManager * | GetObjectPtr () const |
| Get instance of observed object. | |
| bool | AttachOrSetObject (idoc::IDocumentManager *objectPtr) |
| Attach to model of object or set object pointer, if no connection is possible. | |
Protected Member Functions inherited from imod::CSingleModelObserverBase | |
| void | SetModelPtr (imod::IModel *modelPtr) |
| Set internal model pointer to specified value. | |
| CSingleModelObserverBase () | |
| virtual | ~CSingleModelObserverBase () |
| imod::IModel * | GetObservedModel () const |
| Get access to observed model. | |
| imod::IModel * | GetModelPtr () const |
| Get access to observed model. | |
| void | EnsureModelDetached () |
| Make sure this observer is detached. | |
| void | SetObservedIds (const istd::IChangeable::ChangeSet &changeMask) |
| Set list of ID's beeing observed. | |
| virtual bool | IsModelAttached (const imod::IModel *modelPtr=NULL) const override |
| Checks if the specified model is currently attached to this observer. | |
| virtual void | BeforeUpdate (imod::IModel *modelPtr) override |
| Callback invoked before an update of the observer's content occurs. | |
| virtual void | AfterUpdate (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override |
| Callback invoked after an update of the observer's content occurs. | |
Additional Inherited Members | |
Protected Types inherited from imod::TSingleModelObserverBase< idoc::IDocumentManager > | |
| typedef CSingleModelObserverBase | BaseClass |
| typedef idoc::IDocumentManager | ModelType |
Protected Types inherited from imod::CSingleModelObserverBase | |
| typedef imod::IModel | ModelType |
Protected Attributes inherited from iqtgui::CSimpleMainWindowGuiComp | |
| CommandsObserver | m_commandsObserver |
Protected Attributes inherited from iqtgui::CGuiComponentBase | |
| imod::TModelWrap< VisualStatus > | m_visualStatus |
Static Protected Attributes inherited from imod::CSingleModelObserverBase | |
| static const istd::IChangeable::ChangeSet | s_undoChanges |
Standard main window component for any document-based application.
This component provides a complete main window implementation for document-based applications, including menus, toolbars, file operations, undo/redo, and document management integration. It's designed to work seamlessly with IDocumentManager and provides a professional application UI out of the box.
Definition at line 184 of file CMainWindowGuiComp.h.
Definition at line 191 of file CMainWindowGuiComp.h.
| typedef imod::TSingleModelObserverBase<idoc::IDocumentManager> iqtdoc::CMainWindowGuiComp::BaseClass2 |
Definition at line 192 of file CMainWindowGuiComp.h.
| Enumerator | |
|---|---|
| CPI_DOCUMENT_MANAGER | |
| CPI_ACTIVE_VIEW | |
| CPI_ACTIVE_DOCUMENT | |
Definition at line 217 of file CMainWindowGuiComp.h.
| Enumerator | |
|---|---|
| GI_APPLICATION | |
| GI_DOCUMENT | |
| GI_UNDO | |
| GI_RECENT_FILE | |
Definition at line 209 of file CMainWindowGuiComp.h.
| iqtdoc::CMainWindowGuiComp::CMainWindowGuiComp | ( | ) |
|
overrideprotectedvirtual |
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
overrideprotectedvirtual |
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
protected |
|
protectedvirtual |
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
protectedvirtual |
|
protectedvirtual |
|
overrideprotectedvirtual |
Reimplemented from iqtgui::CGuiComponentBase.
|
overrideprotectedvirtual |
Reimplemented from iqtgui::CGuiComponentBase.
|
protectedslot |
|
protectedvirtual |
|
protectedvirtual |
|
overrideprotectedvirtual |
Called just after GUI is initialized.
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
overrideprotectedvirtual |
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
overrideprotectedvirtual |
Called just before GUI is released.
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
overridevirtual |
Callback invoked when an observable model is about to be attached to this observer.
This method is called by the model when attempting to establish an observer relationship. The implementation should:
| modelPtr | Pointer to the model object being attached. Never nullptr. |
| changeMask | Output parameter where the observer specifies which change types it wants to be notified about. Set the appropriate change flags using changeMask.Set(changeId). An empty mask means the observer wants all changes. |
Reimplemented from imod::TSingleModelObserverBase< idoc::IDocumentManager >.
|
overridevirtual |
Callback invoked when an observable model is about to be detached from this observer.
This method is called when the observer-model relationship is being terminated, either explicitly or because the model is being destroyed. The implementation should clean up any state or resources related to this model.
| modelPtr | Pointer to the model object being detached |
Reimplemented from imod::TSingleModelObserverBase< idoc::IDocumentManager >.
|
protectedslot |
|
protected |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
overrideprotectedvirtual |
Called when non-GUI elements (like commands) should be retranslated.
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
overrideprotectedvirtual |
Called on update of observed model.
This method is designed to be overload by derrived classes.
Reimplemented from imod::CSingleModelObserverBase.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
overrideprotectedvirtual |
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
protectedvirtual |
Updates displayed list of recent used files.
| fileToTypeMap | list of new files and corresponding types. |
|
overrideprotectedvirtual |
Reimplemented from iqtgui::CSimpleMainWindowGuiComp.
|
protected |