ACF $AcfVersion:0$
Public Types | Public Member Functions | Protected Slots | Protected Member Functions | Friends | List of all members
iqtdoc::CMultiDocumentWorkspaceGuiComp Class Reference

This class is a Qt-based workspace implementation of a multi-document manager. More...

#include <CMultiDocumentWorkspaceGuiComp.h>

Inheritance diagram for iqtdoc::CMultiDocumentWorkspaceGuiComp:
iqtdoc::TQtDocumentManagerWrap< idoc::CMultiDocumentManagerBase, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > > > ibase::ICommandsProvider idoc::CMultiDocumentManagerBase iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > > istd::IChangeable idoc::CTmplBasedDocumentManagerBase iqtgui::TGuiComponentBase< QMdiArea > istd::IPolymorphic idoc::IDocumentManager iqtgui::CGuiComponentBase istd::IChangeable idoc::IDocumentTypesInfo iqtgui::TMakeIconProviderCompWrap< ibase::TLocalizableWrap< icomp::CComponentBase > > iqtgui::IGuiObject istd::IPolymorphic istd::IPolymorphic iqtgui::TDesignSchemaHandlerWrap< Base > iqtgui::CIconProvider istd::IPolymorphic

Public Types

enum  GroupId { GI_WINDOW = 0x300 , GI_DOCUMENT , GI_VIEW }
 
typedef iqtdoc::TQtDocumentManagerWrap< idoc::CMultiDocumentManagerBase, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > > > BaseClass
 
- Public Types inherited from iqtdoc::TQtDocumentManagerWrap< idoc::CMultiDocumentManagerBase, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > > >
typedef idoc::CMultiDocumentManagerBase BaseClass
 
typedef BaseClass::Ids Ids
 
- Public Types inherited from idoc::CMultiDocumentManagerBase
enum  ModelId { MI_UNDO_MANAGER = 1 , MI_DOCUMENT }
 
- Public Types inherited from idoc::IDocumentManager
enum  ChangeFlags {
  CF_DOCUMENT_RENAMED = 0x834d670 , CF_DOCUMENT_CREATED , CF_DOCUMENT_REMOVED , CF_DOCUMENT_COUNT_CHANGED ,
  CF_VIEW_ACTIVATION_CHANGED
}
 Possible changes in the manager data model. More...
 
enum  OperationFlags {
  OF_FILE_NEW = 0x0001 , OF_FILE_OPEN = 0x0002 , OF_FILE_SAVE = 0x0004 , OF_FILE_SAVE_AS = 0x0008 ,
  OF_KNOWN_PATH = 0x0010
}
 Flags describing possible operations that can be performed by the document manager. More...
 
typedef QMap< QString, QByteArray > FileToTypeMap
 Map from file path to document type ID's.
 
- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ACF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING ,
  CF_DELEGATED , CF_NO_UNDO
}
 Data model change notification flags. More...
 
enum  SupportedOperations {
  SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 ,
  SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4
}
 Flags for supported operations. More...
 
enum  CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT }
 Control how relationship betweeen objects are interpreted. More...
 
typedef QMultiMap< QByteArray, QVariant > ChangeInfoMap
 
- Public Types inherited from idoc::IDocumentTypesInfo
enum  SupportedFeatures { SF_NEW_DOCUMENT = 0x0001 , SF_EDIT_DOCUMENT = 0x0010 , SF_DEFAULT = 0xffff }
 Enumeration for supported types of operations with documents. More...
 
typedef QVector< QByteArray > Ids
 Type definition for document type ID collections.
 
- Public Types inherited from iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > >
typedef iqtgui::TGuiComponentBase< QMdiArea > BaseClass
 
- Public Types inherited from iqtgui::TGuiComponentBase< QMdiArea >
typedef 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 Types inherited from ibase::ICommandsProvider
enum  ChangeFlags { CF_COMMANDS = 0x62b7e8 }
 

Public Member Functions

 CMultiDocumentWorkspaceGuiComp ()
 
virtual void SetActiveView (istd::IPolymorphic *viewPtr) override
 Indicate that some view is active now.
 
virtual const ibase::IHierarchicalCommandGetCommands () const override
 Get list of menu commands.
 
virtual void OnTryClose (bool *ignoredPtr=NULL) override
 Called when the application is attempting to close.
 
virtual void OnGuiDesignChanged () override
 
- Public Member Functions inherited from iqtdoc::TQtDocumentManagerWrap< idoc::CMultiDocumentManagerBase, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > > >
virtual QString GetSaveFilePath (const QByteArray &documentTypeId, const istd::IChangeable *dataObjectPtr, const QString &currentFilePath) const override
 
- Public Member Functions inherited from idoc::CMultiDocumentManagerBase
 CMultiDocumentManagerBase ()
 Default constructor.
 
virtual idoc::IUndoManagerGetUndoManagerForDocument (const istd::IChangeable *documentPtr) const override
 Return undo manager for document documentPtr.
 
virtual int GetDocumentsCount () const override
 Get number of opened documents.
 
virtual istd::IChangeableGetDocumentFromIndex (int index, DocumentInfo *documentInfoPtr=NULL) const override
 Get document at specified index.
 
virtual int GetViewsCount (int documentIndex) const override
 Get number of view for specified document.
 
virtual istd::IPolymorphicGetViewFromIndex (int documentIndex, int viewIndex) const override
 Get single view using its and document indices.
 
virtual istd::IPolymorphicGetActiveView () const override
 Return the active document.
 
virtual istd::IChangeableGetDocumentFromView (const istd::IPolymorphic &view, DocumentInfo *documentInfoPtr=NULL) const override
 Return the document assigned to view.
 
virtual istd::IPolymorphicAddViewToDocument (const istd::IChangeable &document, const QByteArray &viewTypeId=QByteArray()) override
 Add a new view to the document.
 
virtual QByteArray GetDocumentTypeId (const istd::IChangeable &document) const override
 Get ID of document type managed by this object.
 
virtual bool InsertNewDocument (const QByteArray &documentTypeId, bool createView=true, const QByteArray &viewTypeId="", istd::IChangeableSharedPtr *newDocumentPtr=nullptr, bool beQuiet=false, bool *ignoredPtr=NULL) override
 Creates a new document with the document ID documentTypeId.
 
virtual bool OpenDocument (const QByteArray *documentTypeIdPtr, const QString *fileNamePtr=NULL, bool createView=true, const QByteArray &viewTypeId="", istd::IChangeableSharedPtr *documentPtr=nullptr, FileToTypeMap *loadedMapPtr=NULL, bool beQuiet=false, bool *ignoredPtr=NULL, ibase::IProgressManager *progressManagerPtr=NULL) override
 Opens document(s) from the file list.
 
virtual bool SaveDocument (int documentIndex=-1, bool requestFileName=false, FileToTypeMap *savedMapPtr=NULL, bool beQuiet=false, bool *ignoredPtr=NULL, ibase::IProgressManager *progressManagerPtr=NULL) override
 Save document.
 
virtual bool SaveDirtyDocuments (bool beQuiet=false, bool *ignoredPtr=NULL) override
 Ask user (optional) and save all dirty (changed) documents.
 
virtual bool CloseDocument (int documentIndex=-1, bool beQuiet=false, bool *ignoredPtr=NULL) override
 Close document and all its views.
 
virtual bool CloseView (istd::IPolymorphic *viewPtr=NULL, bool beQuiet=false, bool *ignoredPtr=NULL) override
 Close view.
 
- Public Member Functions inherited from idoc::CTmplBasedDocumentManagerBase
 CTmplBasedDocumentManagerBase ()
 
virtual int GetAllowedOperationFlags (const istd::IPolymorphic *viewPtr=NULL) const override
 Get flags of allowed operations.
 
virtual bool IsFeatureSupported (int featureFlags, const QByteArray &documentTypeId) const override
 Return true, if the feature(s) is supported by this document template.
 
virtual Ids GetDocumentTypeIds () const override
 Get list of supported document type IDs.
 
virtual QString GetDocumentTypeName (const QByteArray &documentTypeId) const override
 Get human readable name of some document type ID.
 
virtual ifile::IFileTypeInfoGetDocumentFileTypeInfo (const QByteArray &documentTypeId) const override
 Get file type information object for some selected document type.
 
virtual Ids GetDocumentTypeIdsForFile (const QString &filePath) const override
 Get list of supported document IDs that can handle the specified file.
 
virtual QString GetDefaultDirectory (const QString &sugestedDir="", const QByteArray *documentTypeIdPtr=NULL) const override
 Return default directory for specified document type.
 
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations.
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one.
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object.
 
virtual istd::TUniqueInterfacePtr< istd::IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object.
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state.
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction.
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction.
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes.
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 
- Public Member Functions inherited from iqtgui::TGuiComponentBase< QMdiArea >
 TGuiComponentBase ()
 
virtual QMdiArea * 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)
 

Protected Slots

void OnWindowActivated (QMdiSubWindow *window)
 
void OnCloseAllViews ()
 

Protected Member Functions

void UpdateAllTitles ()
 Update titles of views or all views of specified document.
 
iqtgui::IGuiObjectGetViewFromWidget (const QWidget &widget) const
 Find view object associated with specified Qt widget.
 
int GetDocumentIndexFromWidget (const QWidget &widget) const
 Find index of document associated with specified Qt widget.
 
virtual void CreateConnections ()
 Creates signal/slot connnections for the implementation.
 
void OnViewsCountChanged ()
 Called when number of windows changed.
 
virtual istd::IChangeableSharedPtr OpenSingleDocument (const QString &filePath, bool createView, const QByteArray &viewTypeId, QByteArray &documentTypeId, bool beQuiet, bool *ignoredPtr, ibase::IProgressManager *progressManagerPtr) override
 Open single document using its file path.
 
virtual bool eventFilter (QObject *sourcePtr, QEvent *eventPtr) override
 
virtual void OnRestoreSettings (const QSettings &settings) override
 
virtual void OnSaveSettings (QSettings &settings) const override
 
virtual void CloseAllDocuments () override
 
virtual QStringList GetOpenFilePaths (const QByteArray *documentTypeIdPtr=NULL) const override
 Gets open file names.
 
virtual void OnViewRegistered (istd::IPolymorphic *viewPtr, const SingleDocumentData &documentData) override
 Called after view is registered.
 
virtual void OnViewRemoved (istd::IPolymorphic *viewPtr) override
 Called before view is removed.
 
virtual bool QueryDocumentSave (const SingleDocumentData &info, bool *ignoredPtr) override
 Query user if this document should be saved.
 
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 OnGuiRetranslate () override
 Called from widget event filter when GUI should be retranslated.
 
virtual void OnComponentCreated () override
 
virtual void OnEndChanges (const ChangeSet &changeSet) override
 Callback function for end change event.
 
- Protected Member Functions inherited from iqtdoc::TQtDocumentManagerWrap< idoc::CMultiDocumentManagerBase, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > > >
virtual QStringList CreateFileDialogFilters (const QByteArray *documentTypeIdPtr, const istd::IChangeable *dataObjectPtr, int flags) const
 Creates the filter for the file selection dialog.
 
void UpdateLastDirectory (const QString &filePath) const
 
virtual QStringList GetOpenFilePathesFromDialog (const QByteArray *documentTypeIdPtr) const
 
- Protected Member Functions inherited from idoc::CMultiDocumentManagerBase
SingleDocumentDataGetSingleDocumentData (int index) const
 Get internal document data object.
 
SingleDocumentDataGetActiveDocumentInfo () const
 Get document info assigned to active view.
 
SingleDocumentDataGetDocumentInfoFromView (const istd::IPolymorphic &view) const
 Get document info assigned to specified view.
 
SingleDocumentDataGetDocumentInfoFromPath (const QString &filePath) const
 Get document info assigned to specified file.
 
int GetDocumentIndex (const SingleDocumentData &document) const
 Get position index of the given document in the document list.
 
virtual SingleDocumentDataCreateUnregisteredDocument (const QByteArray &documentTypeId, bool createView, const QByteArray &viewTypeId, bool initialize, bool beQuiet, bool *ignoredPtr) const
 Create instance of specified document without attaching to this manager.
 
bool RegisterDocument (SingleDocumentData *documentPtr)
 Register (attach) created document as new working document.
 
bool SerializeOpenDocumentList (iser::IArchive &archive)
 Serializes open documents information.
 
virtual void OnDocumentSaved ()
 Execute after document saved.
 
- Protected Member Functions inherited from idoc::CTmplBasedDocumentManagerBase
virtual const idoc::IDocumentTemplateGetDocumentTemplate () const
 
void SetDocumentTemplate (const idoc::IDocumentTemplate *documentTemplatePtr)
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event.
 
- Protected Member Functions inherited from iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > >
virtual bool CreateGui (QWidget *parentPtr) override
 
virtual bool DestroyGui () override
 
- Protected Member Functions inherited from iqtgui::CGuiComponentBase
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.
 
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 void OnComponentDestroyed () override
 
- Protected Member Functions inherited from iqtgui::CIconProvider
virtual QIcon CreateIcon (const QString &iconName) const
 

Friends

class imod::TModelWrap< DocumentSelectionInfo >
 

Additional Inherited Members

- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes.
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set.
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set.
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set.
 
- Protected Types inherited from idoc::CMultiDocumentManagerBase
typedef istd::IChangeableSharedPtr DocumentPtr
 
typedef idoc::IUndoManagerSharedPtr UndoManagerPtr
 
typedef idoc::IDocumentTemplate::ViewSharedPtr ViewPtr
 
typedef QList< ViewInfoViews
 
typedef istd::TPointerVector< SingleDocumentDataDocumentInfos
 
- Protected Attributes inherited from idoc::CMultiDocumentManagerBase
DocumentInfos m_documentInfos
 
istd::IPolymorphicm_activeViewPtr
 
- Protected Attributes inherited from iqtgui::CGuiComponentBase
imod::TModelWrap< VisualStatusm_visualStatus
 

Detailed Description

This class is a Qt-based workspace implementation of a multi-document manager.

Provides a Multiple Document Interface (MDI) workspace using Qt's QMdiArea. This component manages multiple documents simultaneously, each with its own view(s) displayed in the workspace. Users can switch between documents, tile/cascade windows, and work with multiple documents at once.

MDI applications are useful for:

Component Attributes
  • ShowViewMaximized - Start with views maximized (default: true)
  • ShowFilePathAsToolTip - Show full path in tab tooltip (default: false)
  • AllowViewRepeating - Allow multiple views of same document (default: true)
  • RememberOpenDocumentsOnExit - Restore session on restart (default: false)
  • WorkspaceBackgroundColor - MDI area background color (default: empty = system)
  • DefaultCreatedDocumentTypeId - Auto-create document type on startup
Component References
  • DocumentTemplate - Document template for creating documents (required)
View Modes
The workspace supports different view modes for organizing document windows:
  • Tabbed - Documents appear in tabs (modern, clean interface)
  • Windowed - Traditional MDI with movable/resizable sub-windows
Configuration Example
DocumentTemplate = CompositeTemplate
// View display settings
ShowViewMaximized = false
ShowFilePathAsToolTip = true
// Multiple views support
AllowViewRepeating = true
// Session persistence
RememberOpenDocumentsOnExit = true
// Auto-create on startup
DefaultCreatedDocumentTypeId = "TextDocument"
// Appearance
WorkspaceBackgroundColor = "#f0f0f0"
}
This class is a Qt-based workspace implementation of a multi-document manager.
Tabbed Mode Configuration
DocumentTemplate = MyTemplate
ViewMode = "Tabbed"
IsViewCloseEnabled = true
IsTabsMovable = true
}
Usage in Application
ApplicationInfo = AppInfo
DocumentManager = MultiDocManager
DocumentTemplate = CompositeTemplate
AllowViewRepeating = true
RememberOpenDocumentsOnExit = true
}
}
Standard main window component for any document-based application.
Document Management Commands
The workspace provides commands for:
  • Window > Cascade - Arrange windows in cascade
  • Window > Tile - Tile windows to fill workspace
  • Window > Close - Close active document
  • Window > Close All - Close all documents
  • Window > Next - Switch to next document
  • Window > Previous - Switch to previous document
  • Window list - Quick selection of open documents
Multiple Views
When AllowViewRepeating is enabled, users can create multiple views of the same document (e.g., split view for large documents):
// Create additional view for same document
idoc::IDocumentManager* docMgr = GetDocumentManager();
istd::IPolymorphic* view1 = docMgr->GetActiveView();
istd::IChangeable* doc = docMgr->GetDocumentFromView(*view1);
// Create second view for same document
istd::IPolymorphic* view2 = docMgr->AddViewToDocument(*doc);
Provide set of user actions needed to manage documents in MVC (Model View Controller) concept.
virtual istd::IChangeable * GetDocumentFromView(const istd::IPolymorphic &view, DocumentInfo *documentInfoPtr=NULL) const =0
Return the document assigned to view.
virtual istd::IPolymorphic * AddViewToDocument(const istd::IChangeable &document, const QByteArray &viewTypeId=QByteArray())=0
Add a new view to the document.
virtual istd::IPolymorphic * GetActiveView() const =0
Return the active document.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
Base interface for all used interfaces and implementations.
Session Restoration
When RememberOpenDocumentsOnExit is enabled:
  • All open document paths are saved on exit
  • Documents are automatically reopened on next launch
  • Window positions and states are preserved
  • Active document is restored
See also
CMainWindowGuiComp, CMultiDocumentManagerBase, CSingleDocumentWorkspaceGuiComp

Definition at line 141 of file CMultiDocumentWorkspaceGuiComp.h.

Member Typedef Documentation

◆ BaseClass

Definition at line 154 of file CMultiDocumentWorkspaceGuiComp.h.

Member Enumeration Documentation

◆ GroupId

Enumerator
GI_WINDOW 
GI_DOCUMENT 
GI_VIEW 

Definition at line 174 of file CMultiDocumentWorkspaceGuiComp.h.

Constructor & Destructor Documentation

◆ CMultiDocumentWorkspaceGuiComp()

iqtdoc::CMultiDocumentWorkspaceGuiComp::CMultiDocumentWorkspaceGuiComp ( )

Member Function Documentation

◆ CloseAllDocuments()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::CloseAllDocuments ( )
overrideprotectedvirtual

Reimplemented from idoc::CMultiDocumentManagerBase.

◆ CreateConnections()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::CreateConnections ( )
protectedvirtual

Creates signal/slot connnections for the implementation.

◆ eventFilter()

virtual bool iqtdoc::CMultiDocumentWorkspaceGuiComp::eventFilter ( QObject *  sourcePtr,
QEvent *  eventPtr 
)
overrideprotectedvirtual

Reimplemented from iqtgui::CGuiComponentBase.

◆ GetCommands()

virtual const ibase::IHierarchicalCommand * iqtdoc::CMultiDocumentWorkspaceGuiComp::GetCommands ( ) const
overridevirtual

Get list of menu commands.

These commands will be integrated in global menu system, independent from actual selected view. For support of normal pull down menu, depth of this tree structure should be at least 3.

Reimplemented from ibase::ICommandsProvider.

◆ GetDocumentIndexFromWidget()

int iqtdoc::CMultiDocumentWorkspaceGuiComp::GetDocumentIndexFromWidget ( const QWidget &  widget) const
protected

Find index of document associated with specified Qt widget.

Parameters
widgetQt widget representing view.
Returns
index of document or negative value if nothing is found.

◆ GetOpenFilePaths()

virtual QStringList iqtdoc::CMultiDocumentWorkspaceGuiComp::GetOpenFilePaths ( const QByteArray *  documentTypeIdPtr = NULL) const
overrideprotectedvirtual

Gets open file names.

Implements idoc::CMultiDocumentManagerBase.

◆ GetViewFromWidget()

iqtgui::IGuiObject * iqtdoc::CMultiDocumentWorkspaceGuiComp::GetViewFromWidget ( const QWidget &  widget) const
protected

Find view object associated with specified Qt widget.

Parameters
widgetQt widget representing view.
Returns
associated view or NULL if nothing is found.

◆ OnCloseAllViews

void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnCloseAllViews ( )
protectedslot

◆ OnComponentCreated()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnComponentCreated ( )
overrideprotectedvirtual

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnEndChanges()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnEndChanges ( const ChangeSet changeSet)
overrideprotectedvirtual

Callback function for end change event.

Reimplemented from istd::IChangeable.

◆ OnGuiCreated()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnGuiCreated ( )
overrideprotectedvirtual

Called just after GUI is initialized.

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnGuiDesignChanged()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnGuiDesignChanged ( )
overridevirtual

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnGuiDestroyed()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnGuiDestroyed ( )
overrideprotectedvirtual

Called just before GUI is released.

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnGuiRetranslate()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnGuiRetranslate ( )
overrideprotectedvirtual

Called from widget event filter when GUI should be retranslated.

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnRestoreSettings()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnRestoreSettings ( const QSettings &  settings)
overrideprotectedvirtual

◆ OnRetranslate()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnRetranslate ( )
overrideprotectedvirtual

Called when non-GUI elements (like commands) should be retranslated.

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnSaveSettings()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnSaveSettings ( QSettings &  settings) const
overrideprotectedvirtual

◆ OnTryClose()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnTryClose ( bool *  ignoredPtr = NULL)
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).

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 void OnTryClose(bool *ignoredPtr=NULL) override
Called when the application is attempting to close.
virtual QWidget * GetWidget() const override
Gets access to the internal QWidget object.
See also
DestroyGui()

Reimplemented from iqtgui::CGuiComponentBase.

◆ OnViewRegistered()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnViewRegistered ( istd::IPolymorphic viewPtr,
const SingleDocumentData documentData 
)
overrideprotectedvirtual

Called after view is registered.

Implements idoc::CMultiDocumentManagerBase.

◆ OnViewRemoved()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnViewRemoved ( istd::IPolymorphic viewPtr)
overrideprotectedvirtual

Called before view is removed.

Implements idoc::CMultiDocumentManagerBase.

◆ OnViewsCountChanged()

void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnViewsCountChanged ( )
protected

Called when number of windows changed.

◆ OnWindowActivated

void iqtdoc::CMultiDocumentWorkspaceGuiComp::OnWindowActivated ( QMdiSubWindow *  window)
protectedslot

◆ OpenSingleDocument()

virtual istd::IChangeableSharedPtr iqtdoc::CMultiDocumentWorkspaceGuiComp::OpenSingleDocument ( const QString &  filePath,
bool  createView,
const QByteArray &  viewTypeId,
QByteArray &  documentTypeId,
bool  beQuiet,
bool *  ignoredPtr,
ibase::IProgressManager progressManagerPtr 
)
overrideprotectedvirtual

Open single document using its file path.

Parameters
filePathfile path.
createViewif true, instance of view will be created.
viewTypeIdoptional view type ID should be created.
documentTypeIdoutput parameter returning loaded ducument type ID.
Returns
instance of created document or NULL if error occurred.

Reimplemented from idoc::CMultiDocumentManagerBase.

◆ QueryDocumentSave()

virtual bool iqtdoc::CMultiDocumentWorkspaceGuiComp::QueryDocumentSave ( const SingleDocumentData info,
bool *  ignoredPtr 
)
overrideprotectedvirtual

Query user if this document should be saved.

Parameters
infodocument info of document will be closed.
ignoredPtroptional return flag indicating that user ignored this close operation.

Implements idoc::CMultiDocumentManagerBase.

◆ SetActiveView()

virtual void iqtdoc::CMultiDocumentWorkspaceGuiComp::SetActiveView ( istd::IPolymorphic viewPtr)
overridevirtual

Indicate that some view is active now.

Reimplemented from idoc::CMultiDocumentManagerBase.

◆ UpdateAllTitles()

void iqtdoc::CMultiDocumentWorkspaceGuiComp::UpdateAllTitles ( )
protected

Update titles of views or all views of specified document.

Parameters
optionaldocument object, if you want to update only views of single document.

Friends And Related Symbol Documentation

◆ imod::TModelWrap< DocumentSelectionInfo >

friend class imod::TModelWrap< DocumentSelectionInfo >
friend

Definition at line 262 of file CMultiDocumentWorkspaceGuiComp.h.


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