|
enum | GroupId { GI_WINDOW = 0x300
, GI_DOCUMENT
, GI_VIEW
} |
|
typedef idocgui::TQtDocumentManagerWrap< idoc::CMultiDocumentManagerBase, istdgui::TRestorableGuiWrap< istdgui::TGuiComponentBase< QMdiArea > > > | BaseClass |
|
typedef idoc::CMultiDocumentManagerBase | BaseClass |
|
typedef BaseClass::Ids | Ids |
|
enum | ModelId { MI_UNDO_MANAGER = 1
, MI_DOCUMENT
} |
|
enum | ChangeFlags {
CF_DOCUMENT_RENAMED = 0x834d670
, CF_DOCUMENT_CREATED
, CF_DOCUMENT_REMOVED
, CF_DOCUMENT_COUNT_CHANGED
,
CF_VIEW_ACTIVATION_CHANGED
} |
| Possible changes in the mananger 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. More...
|
|
typedef QMap< QString, QByteArray > | FileToTypeMap |
| Map from file path to ducument type ID's.
|
|
enum | ChangeFlags {
CF_ICF_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
, SO_CHANGE_LOCK = 1 << 5
} |
| 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...
|
|
enum | SupportedFeatures { SF_NEW_DOCUMENT = 0x0001
, SF_EDIT_DOCUMENT = 0x0010
, SF_DEFAULT = 0xffff
} |
| Enumeration for supported types of operation with the document. More...
|
|
typedef QVector< QByteArray > | Ids |
|
typedef istdgui::TGuiComponentBase< QMdiArea > | BaseClass |
|
typedef CGuiComponentBase | BaseClass |
|
typedef ibase::TVisualChangesHandlerWrap< icomp::CComponentBase > | BaseClass |
|
Public Types inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase > |
typedef icomp::CComponentBase | BaseClass |
|
Public Types inherited from ibase::ICommandsProvider |
enum | ChangeFlags { CF_COMMANDS = 0x62b7e8
} |
|
|
| CMultiDocumentWorkspaceGuiComp () |
|
void | SetActiveView (istd::IPolymorphic *viewPtr) override |
| Indicate that some view is active now.
|
|
const ibase::IHierarchicalCommand * | GetCommands () const override |
| Get list of menu commands.
|
|
void | OnTryClose (bool *ignoredPtr=nullptr) override |
| Called on trying to close application.
|
|
void | OnRestoreSettings (const QSettings &settings) override |
|
void | OnSaveSettings (QSettings &settings) const override |
|
QString | GetSaveFilePath (const QByteArray &documentTypeId, const istd::IChangeable *dataObjectPtr, const QString ¤tFilePath) const override |
|
| CMultiDocumentManagerBase () |
| Default constructor.
|
|
virtual idoc::IUndoManager * | GetUndoManagerForDocument (const istd::IChangeable *documentPtr) const |
| Return undo mananger for document documenPtr .
|
|
virtual int | GetDocumentsCount () const |
| Get number of opened documents.
|
|
virtual istd::IChangeable & | GetDocumentFromIndex (int index, DocumentInfo *documentInfoPtr=nullptr) const |
| Get document at specified index.
|
|
virtual int | GetViewsCount (int documentIndex) const |
| Get number of view for specified document.
|
|
virtual istd::IPolymorphic * | GetViewFromIndex (int documentIndex, int viewIndex) const |
| Get single view using its and document indices.
|
|
virtual istd::IPolymorphic * | GetActiveView () const |
| Return the active document.
|
|
virtual istd::IChangeable * | GetDocumentFromView (const istd::IPolymorphic &view, DocumentInfo *documentInfoPtr=nullptr) const |
| Return the document assigned to view.
|
|
virtual istd::IPolymorphic * | AddViewToDocument (const istd::IChangeable &document, const QByteArray &viewTypeId=QByteArray()) |
| Add a new view to the document.
|
|
virtual QByteArray | GetDocumentTypeId (const istd::IChangeable &document) const |
| Get ID of document type managed by this object.
|
|
virtual bool | InsertNewDocument (const QByteArray &documentTypeId, bool createView=true, const QByteArray &viewTypeId="", istd::IChangeable **newDocumentPtr=nullptr, bool beQuiet=false, bool *ignoredPtr=nullptr) |
| Creates a new document with the document ID documentTypeId .
|
|
virtual bool | OpenDocument (const QByteArray *documentTypeIdPtr, const QString *fileNamePtr=nullptr, bool createView=true, const QByteArray &viewTypeId="", istd::IChangeable **documentPtr=nullptr, FileToTypeMap *loadedMapPtr=nullptr, bool beQuiet=false, bool *ignoredPtr=nullptr, iproc::IProgressManager *progressManagerPtr=nullptr) |
| Opens document(s) from the file list.
|
|
virtual bool | SaveDocument (int documentIndex=-1, bool requestFileName=false, FileToTypeMap *savedMapPtr=nullptr, bool beQuiet=false, bool *ignoredPtr=nullptr, iproc::IProgressManager *progressManagerPtr=nullptr) |
| Save document.
|
|
virtual bool | SaveDirtyDocuments (bool beQuiet=false, bool *ignoredPtr=nullptr) |
| Ask user (optional) and save all dirty (changed) documents.
|
|
virtual bool | CloseDocument (int documentIndex=-1, bool beQuiet=false, bool *ignoredPtr=nullptr) |
| Close document and all its views.
|
|
virtual bool | CloseView (istd::IPolymorphic *viewPtr=nullptr, bool beQuiet=false, bool *ignoredPtr=nullptr) |
| Close view.
|
|
| CTmplBasedDocumentManagerBase () |
|
virtual int | GetAllowedOperationFlags (const istd::IPolymorphic *viewPtr=nullptr) const |
| Get flags of allowed operations.
|
|
virtual bool | IsFeatureSupported (int featureFlags, const QByteArray &documentTypeId) const |
| Return true , if the feature(s) is supported by this document template.
|
|
virtual Ids | GetDocumentTypeIds () const |
| Get list of supported document ID's can be created for specified file.
|
|
virtual QString | GetDocumentTypeName (const QByteArray &documentTypeId) const |
| Get human readable name of some document type ID.
|
|
virtual ifile::IFileTypeInfo * | GetDocumentFileTypeInfo (const QByteArray &documentTypeId) const |
| Get file type information object for some selected document type.
|
|
virtual Ids | GetDocumentTypeIdsForFile (const QString &filePath) const |
| Get list of supported document ID's can be created for specified file.
|
|
virtual QString | GetDefaultDirectory (const QString &sugestedDir="", const QByteArray *documentTypeIdPtr=nullptr) const |
| Return default directory for specified document type.
|
|
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 std::unique_ptr< IChangeable > | CloneMe (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 QMutex * | GetChangesLock () const |
| Get mutex beeing locked during changes, if available.
|
|
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.
|
|
| TGuiComponentBase () |
|
virtual QMdiArea * | GetQtWidget () const |
|
| 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 |
|
bool | IsGuiCreated () const override |
| Inform if GUI was initilized.
|
|
QWidget * | GetWidget () const override |
| Get access to internal QWidget object.
|
|
Public Member Functions inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase > |
| TVisualChangesHandlerWrap (Args &&... args) |
|
virtual void | EnableVisualChangesHandler (bool enableLocalization=true) |
| If enabled, listen to the language change event from the application context.
|
|
| CComponentBase () |
| Create component and assign it to specific context.
|
|
| CComponentBase (const CComponentBase &)=delete |
|
CComponentBase & | operator= (const CComponentBase &)=delete |
|
virtual const ICompositeComponent * | GetParentComponent (bool ownerOnly=false) const |
| Get parent of this component.
|
|
virtual void * | GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="") |
| Get access to specified component interface.
|
|
virtual const IComponentContext * | GetComponentContext () const |
| Get access to component context describing all application-specified component information loaded from components registry.
|
|
virtual void | SetComponentContext (const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner) |
| Set component context of this component.
|
|
Public Member Functions inherited from ibase::ICommandsProvider |
|
void | UpdateAllTitles () |
| Update titles of views or all views of specified document.
|
|
istdgui::IGuiObject * | GetViewFromWidget (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.
|
|
istd::IChangeable * | OpenSingleDocument (const QString &filePath, bool createView, const QByteArray &viewTypeId, QByteArray &documentTypeId, bool beQuiet, bool *ignoredPtr, iproc::IProgressManager *progressManagerPtr) override |
| Open single document using its file path.
|
|
bool | eventFilter (QObject *sourcePtr, QEvent *eventPtr) override |
|
void | OnRestoreSettings (const QSettings &settings) override |
|
void | OnSaveSettings (QSettings &settings) const override |
|
void | CloseAllDocuments () override |
|
QStringList | GetOpenFilePaths (const QByteArray *documentTypeIdPtr=nullptr) const override |
| Gets open file names.
|
|
void | OnViewRegistered (istd::IPolymorphic *viewPtr, const SingleDocumentData &documentData) override |
| Called after view is registered.
|
|
void | OnViewRemoved (istd::IPolymorphic *viewPtr) override |
| Called before view is removed.
|
|
bool | QueryDocumentSave (const SingleDocumentData &info, bool *ignoredPtr) override |
| Query user if this document should be saved.
|
|
void | OnGuiCreated () override |
| Called just after GUI is initialized.
|
|
void | OnGuiDestroyed () override |
| Called just before GUI is released.
|
|
void | OnRetranslate () override |
| Called when non-GUI elements (like commands) should be retranslated.
|
|
void | OnGuiRetranslate () override |
| Called from widget event filter when GUI should be retranslated.
|
|
void | OnComponentCreated () override |
|
void | OnEndChanges (const ChangeSet &changeSet) override |
| Callback function for end change event.
|
|
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 |
|
SingleDocumentData & | GetSingleDocumentData (int index) const |
| Get internal document data object.
|
|
SingleDocumentData * | GetActiveDocumentInfo () const |
| Get document info assigned to active view.
|
|
SingleDocumentData * | GetDocumentInfoFromView (const istd::IPolymorphic &view) const |
| Get document info assigned to specified view.
|
|
SingleDocumentData * | GetDocumentInfoFromPath (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 std::unique_ptr< SingleDocumentData > | CreateUnregisteredDocument (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.
|
|
virtual const idoc::IDocumentTemplate * | GetDocumentTemplate () const |
|
void | SetDocumentTemplate (const idoc::IDocumentTemplate *documentTemplatePtr) |
|
virtual void | OnBeginChanges () |
| Callback function for begin change event.
|
|
bool | CreateGui (QWidget *parentPtr) override |
|
bool | DestroyGui () override |
|
virtual QWidget * | CreateQtWidget (QWidget *parentPtr) |
| Create slave widget object.
|
|
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 | OnLanguageChanged () override |
|
void | OnDesignSchemaChanged () override |
|
bool | eventFilter (QObject *sourcePtr, QEvent *eventPtr) override |
|
void | OnComponentDestroyed () override |
|
Protected Member Functions inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase > |
bool | IsComponentActive () const |
| Check if component is active.
|
|
virtual const IRealComponentStaticInfo & | GetComponentStaticInfo () const =0 |
| Get access to static info of this component.
|
|
This class is a Qt-based workspace implementation of a document manager.
Definition at line 33 of file CMultiDocumentWorkspaceGuiComp.h.