diff options
author | Bernd Weimer <bernd.weimer@pelagicore.com> | 2018-03-29 16:38:14 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2018-04-10 22:44:45 +0000 |
commit | 6aa3295386b0a0f0b8c7ae1b0f827dd28b6323ca (patch) | |
tree | 3a5700f4aac211bb2c2d9a456c827e896d999a86 | |
parent | 056167ddb944c4051d09c93c5cce70a991304a76 (diff) | |
download | qtapplicationmanager-6aa3295386b0a0f0b8c7ae1b0f827dd28b6323ca.tar.gz |
Update documentation
- Added documentation for StartupInterface
- Added reference to ProcessMonitor
- Enabled links to StartupInterface and ContainerInterface
- Unveiled ApplicationManagerWindow again
Change-Id: I8a555a8c21c4669bc4315d746b041f63e19409a5
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | doc/configuration.qdoc | 6 | ||||
-rw-r--r-- | doc/elements-systemui.qdoc | 4 | ||||
-rw-r--r-- | doc/index.qdoc | 2 | ||||
-rw-r--r-- | doc/singlevsmultiprocess.qdoc | 2 | ||||
-rw-r--r-- | src/plugin-interfaces/startupinterface.cpp | 77 |
5 files changed, 85 insertions, 6 deletions
diff --git a/doc/configuration.qdoc b/doc/configuration.qdoc index f0ae8bcb..fdb45030 100644 --- a/doc/configuration.qdoc +++ b/doc/configuration.qdoc @@ -206,7 +206,7 @@ all your imports paths and file references relative to your main config file. \li A string-to-string-list map that defines plugins that the application-manager should load. The value must be a list of plugin library file path names. A single plugin will also be accepted. Currently the only valid key is \c startup. The plugin itself must implement the - \c StartupInterface. The application-manager will call the function hooks during startup of + StartupInterface. The application-manager will call the function hooks during startup of the System-UI. \row \target system properties @@ -487,9 +487,9 @@ an additional column specifying which runtime a configuration option applies to: value must be a list of plugin library file path names. A single plugin will also be accepted. Currently the only valid keys are \c startup and \c container: \list - \li \c startup: this plugin must implement the \c StartupInterface. The QML runtime will + \li \c startup: this plugin must implement the StartupInterface. The QML runtime will call the function hooks during startup of an application. - \li \c container: this plugin must implement the \c ContainerInterface (see \l Containers). + \li \c container: this plugin must implement the ContainerInterface (see \l Containers). \endlist \row \li \c quicklaunchQml diff --git a/doc/elements-systemui.qdoc b/doc/elements-systemui.qdoc index aee589e1..cbae72f3 100644 --- a/doc/elements-systemui.qdoc +++ b/doc/elements-systemui.qdoc @@ -50,9 +50,11 @@ item models. \li WindowManager - The window model and controller. \li NotificationManager - The notification model, which handles freedesktop.org compliant notification requests. + \li ApplicationIPCManager - Central registry for interfaces for System-UI-to-app communication. \li SystemMonitor - The system monitoring model, giving access to a range of measurements, e.g. CPU load, frame rate, etc. - \li ApplicationIPCManager - Central registry for interfaces for System-UI-to-app communication. + \li ProcessMonitor - The process monitoring model, providing measurements like memory usage and + frame rate, etc. \li StartupTimer - A tool for startup performance analysis. \endlist diff --git a/doc/index.qdoc b/doc/index.qdoc index d95284a2..40202326 100644 --- a/doc/index.qdoc +++ b/doc/index.qdoc @@ -61,7 +61,7 @@ high-level overview of the package. \section1 Reference \list - \li \l{Manifest Definition}{Manifest Definition (info.yaml)} + \li \l{Manifest Definition}{Applications Manifest Definition (info.yaml)} \li \l{System-UI QML Types} \li \l{Applications QML Types} \endlist diff --git a/doc/singlevsmultiprocess.qdoc b/doc/singlevsmultiprocess.qdoc index 1000f921..44570996 100644 --- a/doc/singlevsmultiprocess.qdoc +++ b/doc/singlevsmultiprocess.qdoc @@ -121,7 +121,7 @@ Consequently, when the application is restarted again, the state might be differ multi-process case, where the singleton is instantiated anew. -\section1 ApplicationManagerWindow +\section1 Application Windows A major difference between single- and multi-process mode is how windows are represented. Windows are exposed from the application to the System-UI through WindowManager::windowReady. For diff --git a/src/plugin-interfaces/startupinterface.cpp b/src/plugin-interfaces/startupinterface.cpp index a21e9343..1cf76f70 100644 --- a/src/plugin-interfaces/startupinterface.cpp +++ b/src/plugin-interfaces/startupinterface.cpp @@ -42,3 +42,80 @@ #include "startupinterface.h" StartupInterface::~StartupInterface() { } + + +/*! \class StartupInterface + \inmodule QtApplicationManager + \brief An interface that allows to implement custom startup activities. + + This interface provides hooks that are called during the startup of application-manager + processes. Hence, implementers of the interface can run their custom code at certain points + during the startup phase. + + A plugin has to implemet the pure virtual functions of the StartupInterface. The interface is + the same for the System-UI (appman), as well as for QML applications (appman-launcher-qml). The + plugins that should be loaded have to be specified in the (am-config.yaml) configuration file. + The following snippet shows how the application-manager can be configured to load and execute + the \c libappmanplugin.so in both the System-UI and applications and additionally the + \c libextplugin.so in the System-UI only: + + \badcode + # System-UI + plugins: + startup: [ "path/to/libappmanplugin.so", "path/to/libextplugin.so" ] + + # Applications + runtimes: + qml: + startup: "path/to/libappmanplugin.so" + \endcode + + The functions are called in the following order: + \list + \li \l{StartupInterface::initialize}{initialize} + \li afterRuntimeRegistration (optional) + \li beforeQmlEngineLoad + \li afterQmlEngineLoad + \li beforeWindowShow + \li afterWindowShow (optional) + \endlist +*/ + +/*! \fn void StartupInterface::initialize(const QVariantMap &systemProperties) + + This method is called right after the \l{system properties}{systemProperties} have been parsed. +*/ + +/*! \fn void StartupInterface::afterRuntimeRegistration() + + This method is called, right after the runtime has been registered. + \note It will only be called in the System-UI process. +*/ + +/*! \fn void StartupInterface::beforeQmlEngineLoad(QQmlEngine *engine) + + This method is called, before the QML \a engine is loaded. +*/ + +/*! \fn void StartupInterface::afterQmlEngineLoad(QQmlEngine *engine) + + This method is called, after the QML \a engine has been loaded. +*/ + +/*! \fn void StartupInterface::beforeWindowShow(QWindow *window) + + This method is called, after the main window has been instantiated, but before it is shown. The + \a window parameter holds a pointer to the main window. + \note The \a window is only valid, if the root object of your QML tree is a visible item (e.g. + a \l{Window} or \l{Item} derived class). It will be a \c nullptr, if it is a QtObject for + instance. +*/ + +/*! \fn void StartupInterface::afterWindowShow(QWindow *window) + + This method is called, right after the main window is shown. The \a window parameter holds a + pointer to the just shown main window. + \note This function will only be called, if the root object of your QML tree is a visible item + (e.g. a \l{Window} or \l{Item} derived class). It will not be called, if it is a QtObject for + instance. +*/ |