Scanframe Modular Application 0.1.0
|
#include <LayoutEditorAppModule.h>
Public Member Functions | |
LayoutEditorAppModule (const Parameters ¶ms) | |
void | initialize (InitializeStage stage) override |
Called when al modules are loaded or when a module added. | |
void | addPropertyPages (PropertySheetDialog *) override |
Adds module property pages to the passed sheet. | |
MultiDocInterface * | createWidget (QWidget *parent) const override |
Creates child of the passed parent (i.e. QMdiArea). | |
QString | getName () const override |
Gets the description of this instance. | |
QString | getDescription () const override |
Gets the description of this instance. | |
QString | getLibraryFilename () const override |
Gets the library filename. | |
QString | getSvgIconResource () const override |
Gets svg icon resource name and can be overridden to change the default. | |
void | settingsReadWrite (bool save) |
DockWidgetList | createDockingWidgets (QWidget *parent) override |
Creates docking widgets having the passed parent. | |
void | documentActivated (MultiDocInterface *interface, bool yn) const override |
Called from main window when a document is activated or deactivated. | |
~LayoutEditorAppModule () override | |
Public Member Functions inherited from sf::AppModuleInterface | |
AppModuleInterface (const Parameters &) | |
Constructor for passing general structure for derived classes. | |
~AppModuleInterface () override | |
Virtual destructor for derived classes. | |
virtual void | addMenuItems (MenuType menuType, QMenu *menu) |
Adds menu items for the passed type of menu. | |
virtual void | addToolBars (QMainWindow *mainWindow) |
Adds toolbars to the passed main window. | |
bool | hasFileTypes () const |
void | addFileType (const QString &name, const QString &suffix) |
Adds a file type handled by this instance. | |
void | addFileType (const QString &mime) |
Adds a file type handled by this instance. | |
void | addFileType (const QMimeType &mime) |
Adds a file type using the passed QMimeType instance. | |
QString | getFileTypeFilters () const |
Gets the filter string for a file dialog. | |
MultiDocInterface * | createChild (QWidget *parent) const |
Calls createChild() and assigns this creating instance for reference. | |
QSettings * | getSettings () const |
Gets the settings class passed on creation. | |
MultiDocInterface * | openFile (const QString &filename, AppModuleInterface *ami=nullptr) const |
Makes the application open a file. | |
Public Attributes | |
QSettings * | _settings |
HierarchyViewer * | _hierarchyViewer {nullptr} |
QTreeView * | _tvProperties {nullptr} |
bool | _readOnly = true |
Additional Inherited Members | |
Public Types inherited from sf::AppModuleInterface | |
enum | InitializeStage { Uninitialize = 0 , Initialize , Finalize } |
enum | MenuType { Settings , View , Tools } |
typedef QMap< QString, AppModuleInterface * > | Map |
typedef QList< QDockWidget * > | DockWidgetList |
Type definition for containing dock widgets. | |
typedef TClosure< MultiDocInterface *, const QString &, AppModuleInterface * > | OpenFileClosure |
Type definition for the callback closure. | |
Static Public Member Functions inherited from sf::AppModuleInterface | |
static void | instantiate (QSettings *settings, QObject *parent) |
Creates instances of all available/loaded interface implementations. | |
static size_t | initializeInstances (InitializeStage stage) |
Initializes all uninitialized instances or visa versa. | |
static void | addAllPropertyPages (PropertySheetDialog *sheet) |
Adds property pages from all modules to the passed sheet. | |
static void | addAllMenuItems (MenuType menuType, QMenu *menu) |
Adds items from all modules to this menu. | |
static const Map & | getMap () |
Gets the named module map. | |
static DockWidgetList | createAllDockingWidgets (QWidget *parent) |
Creates all docking widgets of the loaded modules by calling createDockingWidgets(). | |
static void | addAllToolBars (QMainWindow *mainWindow) |
Creates all toolbars of the loaded modules by calling addToolBars(). | |
static AppModuleInterface * | findByFile (const QString &filename) |
Find the instance handling the file using the file suffix. | |
static QString | getFileTypeFilters (bool all_files) |
Gets the filter string for the open file dialog. | |
static AppModuleInterface * | selectDialog (const QString &title, QSettings *settings, QWidget *parent=nullptr) |
Determined if this module handles this mime type. | |
static QAbstractItemModel * | getListModel (bool file_only, QObject *parent) |
Gets a list model from the available instances. | |
Static Public Attributes inherited from sf::AppModuleInterface | |
static OpenFileClosure | callbackOpenFile |
Holds a callback to open a file in the application. | |
|
explicit |
|
override |
|
overridevirtual |
Adds module property pages to the passed sheet.
Implements sf::AppModuleInterface.
|
overridevirtual |
Creates docking widgets having the passed parent.
Reimplemented from sf::AppModuleInterface.
|
overridevirtual |
Creates child of the passed parent (i.e. QMdiArea).
parent | Parent widget of the returned object. |
Reimplemented from sf::AppModuleInterface.
|
overridevirtual |
Called from main window when a document is activated or deactivated.
iface | MDI interface which can be dynamically cast to the actual document. |
yn |
Reimplemented from sf::AppModuleInterface.
|
overridevirtual |
Gets the description of this instance.
Implements sf::AppModuleInterface.
|
overridevirtual |
Gets the library filename.
Implements sf::AppModuleInterface.
|
overridevirtual |
Gets the description of this instance.
Implements sf::AppModuleInterface.
|
overridevirtual |
Gets svg icon resource name and can be overridden to change the default.
Reimplemented from sf::AppModuleInterface.
|
overridevirtual |
Called when al modules are loaded or when a module added.
stage | Determines initialization or uninitialization. |
Implements sf::AppModuleInterface.
void sf::LayoutEditorAppModule::settingsReadWrite | ( | bool | save | ) |
HierarchyViewer* sf::LayoutEditorAppModule::_hierarchyViewer {nullptr} |
bool sf::LayoutEditorAppModule::_readOnly = true |
QSettings* sf::LayoutEditorAppModule::_settings |
QTreeView* sf::LayoutEditorAppModule::_tvProperties {nullptr} |