6#include <QtCore/QtGlobal>
7#if QT_VERSION >= 0x050000
8#include <QtWidgets/QMainWindow>
9#include <QtWidgets/QDockWidget>
11#include <QtGui/QMainWindow>
12#include <QtGui/QDockWidget>
41 I_ASSIGN(m_applicationInfoCompPtr,
"ApplicationInfo",
"Application info",
true,
"ApplicationInfo");
42 I_ASSIGN(m_documentManagerCompPtr,
"DocumentManager",
"Document manager",
true,
"DocumentManager");
43 I_ASSIGN_TO(m_documentManagerModelCompPtr, m_documentManagerCompPtr,
true);
44 I_ASSIGN_TO(m_documentManagerCommandsCompPtr, m_documentManagerCompPtr,
false);
45 I_ASSIGN(m_applicationCompPtr,
"Application",
"Access to the application's command line",
true,
"Application");
46 I_ASSIGN(m_dropConsumerCompPtr,
"DropConsumer",
"Optionaly defined drop consumer. If no consumer is set, the document manager will process the drop content",
false,
"DropConsumer");
47 I_ASSIGN(m_persistenceProgressCompPtr,
"PersistenceProgress",
"Progress management loading and saving of the documents",
false,
"PersistenceProgress");
48 I_ASSIGN_TO(m_persistenceProgressGuiCompPtr, m_persistenceProgressCompPtr,
false);
49 I_ASSIGN(m_isCopyPathVisibleAttrPtr,
"IsCopyPathVisible",
"If true, operation Tools/CopyDocumentPath will be visible",
true,
false);
50 I_ASSIGN(m_isOpenContainingFolderVisibleAttrPtr,
"IsOpenContainingFolderVisible",
"If true, operation Tools/Open Containing Folder will be visible",
true,
false);
51 I_ASSIGN(m_maxRecentFilesCountAttrPtr,
"MaxRecentFiles",
"Maximal size of recent file list for one document type",
true, 10);
52 I_ASSIGN(m_isOpenCommandVisibleAttrPtr,
"OpenCommandVisible",
"If enabled the open document command will be shown",
false,
true);
53 I_ASSIGN(m_isSaveCommandVisibleAttrPtr,
"SaveCommandVisible",
"If enabled the save document commands will be shown",
false,
true);
54 I_ASSIGN_MULTI_0(m_mainWindowCompTypeIdsAttrPtr,
"MainWindowCompTypeIds",
"Set of document type IDs (comma separated) to enable main window component, empty string enables component independently from document selection",
true);
66 I_ATTR(
bool, m_isCopyPathVisibleAttrPtr);
67 I_ATTR(
bool, m_isOpenContainingFolderVisibleAttrPtr);
68 I_ATTR(
int, m_maxRecentFilesCountAttrPtr);
69 I_ATTR(
bool, m_isOpenCommandVisibleAttrPtr);
70 I_ATTR(
bool, m_isSaveCommandVisibleAttrPtr);
71 I_MULTIATTR(QByteArray, m_mainWindowCompTypeIdsAttrPtr);
195 I_REGISTER_SUBELEMENT(FileCommands);
197 I_REGISTER_SUBELEMENT_INTERFACE(FileCommands,
ibase::ICommand, GetFileCommands);
198 I_REGISTER_SUBELEMENT_INTERFACE(FileCommands,
iprm::INameParam, GetFileCommands);
200 I_REGISTER_SUBELEMENT_INTERFACE(FileCommands,
istd::IChangeable, GetFileCommands);
201 I_REGISTER_SUBELEMENT(EditCommands);
203 I_REGISTER_SUBELEMENT_INTERFACE(FileCommands,
ibase::ICommand, GetEditCommands);
204 I_REGISTER_SUBELEMENT_INTERFACE(FileCommands,
iprm::INameParam, GetEditCommands);
206 I_REGISTER_SUBELEMENT_INTERFACE(FileCommands,
istd::IChangeable, GetEditCommands);
231 virtual bool OpenFile(
const QString& fileName,
const QByteArray* documentTypeIdPtr =
NULL);
270 virtual bool eventFilter(QObject* sourcePtr, QEvent* eventPtr)
override;
293 NewDocumentCommand(
CMainWindowGuiComp* parentPtr,
const QByteArray& documentTypeId): m_parent(*parentPtr), m_documentTypeId(documentTypeId){}
298 m_parent.OnNewDocument(m_documentTypeId);
305 QByteArray m_documentTypeId;
316 const QString& actionString,
319 const QString& GetActionString()
const;
320 bool IsOpenCommand()
const;
327 QString m_actionString;
328 bool m_isOpenCommand;
359 virtual void OnProgressChanged(
double cumulatedValue)
override;
360 virtual void OnTasksChanged()
override;
366 std::unique_ptr<ibase::IProgressLogger> m_currentLoggerPtr;
369 template <
class InterfaceType>
372 return &parent.m_fileCommand;
375 template <
class InterfaceType>
378 return &parent.m_editCommand;
381 ActiveUndoManager m_activeUndoManager;
403 typedef QMap<QByteArray, RecentGroupCommandPtr> RecentFilesMap;
404 RecentFilesMap m_recentFilesMap;
Progress manager delegating cumulated progress result to another manager.
Interface for the main entry point of a component-based application.
This interface provides some information about the application.
Provides single command for interaction with user.
Interface for a provider of the heriarchical commands.
Consume information about progress of some process.
Provide set of user actions needed to manage documents in MVC (Model View Controller) concept.
QMap< QString, QByteArray > FileToTypeMap
Map from file path to document type ID's.
Common interface for model objects, that supports Model/Observer design pattern.
Basic implementation for a single model observer with binding to concrete data object interface.
Interface for objects which can be enabled/disabled.
Interface for an object containing a name.
iqtgui::CSimpleMainWindowGuiComp BaseClass
Standard main window component for any document-based application.
virtual void OnActiveViewChanged()
void OnNewDocument(const QByteArray &documentTypeId)
virtual void OnRetranslate() override
Called when non-GUI elements (like commands) should be retranslated.
virtual bool OpenFile(const QString &fileName, const QByteArray *documentTypeIdPtr=NULL)
virtual bool IsMainWindowActive(int index) const
bool HasDocumentTemplate() const
virtual void AppendMenuActions(iqtgui::CHierarchicalCommand &menuCommands) override
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 void RemoveFromRecentFileList(const QString &filePath)
virtual void OnGuiCreated() override
Called just after GUI is initialized.
virtual bool SerializeRecentFileList(iser::IArchive &archive)
virtual void UpdateFixedCommands(iqtgui::CHierarchicalCommand &fixedCommands) override
virtual void OnUpdate(const istd::IChangeable::ChangeSet &changeSet) override
Called on update of observed model.
virtual void UpdateToolsCommands(iqtgui::CHierarchicalCommand &toolsCommand) override
virtual void OnComponentDestroyed() override
imod::TSingleModelObserverBase< idoc::IDocumentManager > BaseClass2
void OnCopyPathToClipboard()
virtual bool eventFilter(QObject *sourcePtr, QEvent *eventPtr) override
virtual bool OnModelDetached(imod::IModel *modelPtr) override
Callback invoked when an observable model is about to be detached from this observer.
virtual void OnDropEvent(QDropEvent *dropEventPtr)
virtual void OnActiveDocumentChanged()
virtual void OnDragEnterEvent(QDragEnterEvent *dragEnterEventPtr)
virtual void OnGuiDestroyed() override
Called just before GUI is released.
virtual void OnComponentCreated() override
void OnOpenDocumentFolder()
virtual void UpdateRecentFileList(const idoc::IDocumentManager::FileToTypeMap &fileToTypeMap)
Updates displayed list of recent used files.
virtual bool SaveActiveDocument()
CMainWindowGuiCompBase BaseClass
virtual void OnGuiDesignChanged() override
Implementation of hierarchical command based on QAction from Qt.
Interface for objects which can receive dragged objects.
Common interface for GUI objects used in ACF component context.
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.
Pointer wrapper providing automatic deleting pointed object during destruction.
Common interface to define the hierarchical graph structures.
This package contains Qt implementations related to Document/View concept.