6#include <QtCore/QtGlobal>
7#if QT_VERSION >= 0x050000
8#include <QtWidgets/QMdiArea>
9#include <QtWidgets/QMdiSubWindow>
11#include <QtGui/QMdiArea>
12#include <QtGui/QMdiSubWindow>
143 idoc::CMultiDocumentManagerBase,
144 iqtgui::TRestorableGuiWrap<
145 iqtgui::TGuiComponentBase<QMdiArea> > >,
160 I_REGISTER_SUBELEMENT(DocumentSelection);
162 I_REGISTER_SUBELEMENT_INTERFACE(DocumentSelection,
imod::IModel, ExtractSelectionInfo);
163 I_REGISTER_SUBELEMENT_INTERFACE(DocumentSelection,
istd::IChangeable, ExtractSelectionInfo);
164 I_REGISTER_SUBELEMENT_INTERFACE(DocumentSelection,
iprm::IOptionsList, ExtractSelectionInfo);
165 I_ASSIGN(m_documentTemplateCompPtr,
"DocumentTemplate",
"Document template",
true,
"DocumentTemplate");
166 I_ASSIGN(m_showMaximizedAttrPtr,
"ShowViewMaximized",
"At start shows the document view maximized",
false,
true);
167 I_ASSIGN(m_showPathAsTipAttrPtr,
"ShowFilePathAsToolTip",
"if enabled, the current document file path will be shown as tool tip of document tab",
true,
false);
168 I_ASSIGN(m_allowViewRepeatingAttrPtr,
"AllowViewRepeating",
"If enabled, multiple views for the same document are allowed",
false,
true);
169 I_ASSIGN(m_rememberOpenDocumentsParamPtr,
"RememberOpenDocumentsOnExit",
"If enabled, restores open documents from previous session",
false,
"RememberOpenDocumentsOnExit");
170 I_ASSIGN(m_workspaceBackgroundColorAttrPtr,
"WorkspaceBackgroundColor",
"Background color of the MDI workspace",
false,
"");
171 I_ASSIGN(m_defaultCreatedDocumentTypeIdAttrPtr,
"DefaultCreatedDocumentTypeId",
"Type-ID of the document that should be created if the workspace is empty",
false,
"");
226 const QString& filePath,
228 const QByteArray& viewTypeId,
229 QByteArray& documentTypeId,
235 virtual bool eventFilter(QObject* sourcePtr, QEvent* eventPtr)
override;
268 DocumentSelectionInfo();
274 virtual int GetSelectedOptionIndex()
const override;
275 virtual bool SetSelectedOptionIndex(
int index)
override;
279 virtual int GetOptionsFlags()
const override;
280 virtual int GetOptionsCount()
const override;
281 virtual QString GetOptionName(
int index)
const override;
282 virtual QString GetOptionDescription(
int index)
const override;
283 virtual QByteArray GetOptionId(
int index)
const override;
284 virtual bool IsOptionEnabled(
int index)
const override;
290 int m_selectedDocumentIndex;
297 template <
class InterfaceType>
300 return &component.m_documentSelectionInfo;
311 mutable QString m_lastDirectory;
317 QString m_organizationName;
318 QString m_applicationName;
320 bool m_forceQuietClose;
324 I_ATTR(
bool, m_showMaximizedAttrPtr);
325 I_ATTR(
bool, m_showPathAsTipAttrPtr);
326 I_ATTR(
bool, m_allowViewRepeatingAttrPtr);
327 I_ATTR(QString, m_workspaceBackgroundColorAttrPtr);
328 I_ATTR(QByteArray, m_defaultCreatedDocumentTypeIdAttrPtr);
Interface for a provider of the heriarchical commands.
Consume information about progress of some process.
Basic implementation of a template-based multiple document manager.
Provide set of user actions needed to manage documents in MVC (Model View Controller) concept.
Common interface for a document template.
Provide information about different document types.
Common interface for model objects, that supports Model/Observer design pattern.
This model wrapper provides a simple connection between a concrete istd::IChangeable implementation a...
Interface for objects which can be enabled/disabled.
Constraints of selection from set of possibilities.
Interface allowing to select single option from list of options.
This class is a Qt-based workspace implementation of a multi-document manager.
virtual void OnGuiCreated() override
Called just after GUI is initialized.
virtual void OnRestoreSettings(const QSettings &settings) override
virtual void OnGuiRetranslate() override
Called from widget event filter when GUI should be retranslated.
virtual void CloseAllDocuments() override
virtual void OnRetranslate() override
Called when non-GUI elements (like commands) should be retranslated.
virtual void CreateConnections()
Creates signal/slot connnections for the implementation.
virtual void OnEndChanges(const ChangeSet &changeSet) override
Callback function for end change event.
virtual void OnSaveSettings(QSettings &settings) const override
virtual bool QueryDocumentSave(const SingleDocumentData &info, bool *ignoredPtr) override
Query user if this document should be saved.
virtual const ibase::IHierarchicalCommand * GetCommands() const override
Get list of menu commands.
virtual bool eventFilter(QObject *sourcePtr, QEvent *eventPtr) override
virtual void SetActiveView(istd::IPolymorphic *viewPtr) override
Indicate that some view is active now.
virtual void OnViewRegistered(istd::IPolymorphic *viewPtr, const SingleDocumentData &documentData) override
Called after view is registered.
iqtgui::IGuiObject * GetViewFromWidget(const QWidget &widget) const
Find view object associated with specified Qt widget.
CMultiDocumentWorkspaceGuiComp()
virtual void OnGuiDesignChanged() override
int GetDocumentIndexFromWidget(const QWidget &widget) const
Find index of document associated with specified Qt widget.
virtual void OnComponentCreated() override
virtual QStringList GetOpenFilePaths(const QByteArray *documentTypeIdPtr=NULL) const override
Gets open file names.
void UpdateAllTitles()
Update titles of views or all views of specified document.
virtual void OnTryClose(bool *ignoredPtr=NULL) override
Called when the application is attempting to close.
iqtdoc::TQtDocumentManagerWrap< idoc::CMultiDocumentManagerBase, iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMdiArea > > > BaseClass
void OnViewsCountChanged()
Called when number of windows changed.
virtual void OnViewRemoved(istd::IPolymorphic *viewPtr) override
Called before view is removed.
virtual void OnGuiDestroyed() override
Called just before GUI is released.
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.
void OnWindowActivated(QMdiSubWindow *window)
Wrapper for general functionality of a Qt based document workspace.
Implementation of hierarchical command based on QAction from Qt.
Common interface for GUI objects used in ACF component context.
Base class for all Qt GUI componentes.
A wrapper for saving/restoring of GUI component states in the application settings.
Represents an input/output persistence archive for object serialization.
Set of change flags (its IDs).
Common interface for data model objects, which can be changed.
Base interface for all used interfaces and implementations.
Common interface to define the hierarchical graph structures.
This package contains Qt implementations related to Document/View concept.
Document data definition.