diff --git a/CHANGES b/CHANGES index 3edfa0b69..c615f5829 100644 --- a/CHANGES +++ b/CHANGES @@ -18,7 +18,7 @@ This release contains contributions from (alphabetically by first name): `import` for Calamares parts looks like > ```import io.calamares.ui 1.0``` A complete list of objects available from Calamares van be found in the - documentation for the *QmlViewStep* base class. + documentation in `Qml.h`. - The sidebar (which shows overall progress in the installation) is now more configurable: the branding key *sidebar* controls it. The sidebar can be shown as a widget (default, as it has been), hidden, or use a diff --git a/src/libcalamaresui/utils/Qml.h b/src/libcalamaresui/utils/Qml.h index f4c722fba..b109d8381 100644 --- a/src/libcalamaresui/utils/Qml.h +++ b/src/libcalamaresui/utils/Qml.h @@ -32,6 +32,12 @@ namespace CalamaresUtils * * This needs to be called at least once to make the global Calamares * models (Branding, ViewManager, ...) available to QML. + * + * The following objects are made available globally: + * - `io.calamares.ui.Branding` (an object, see Branding.h) + * - `io.calamares.core.ViewManager` (a model, see ViewManager.h) + * Additionally, modules based on QmlViewStep have a context + * property `config` referring to that module's configuration (if any). */ UIDLLEXPORT void registerCalamaresModels(); diff --git a/src/libcalamaresui/viewpages/QmlViewStep.h b/src/libcalamaresui/viewpages/QmlViewStep.h index 5b89150fd..55380d94b 100644 --- a/src/libcalamaresui/viewpages/QmlViewStep.h +++ b/src/libcalamaresui/viewpages/QmlViewStep.h @@ -46,6 +46,8 @@ public: * This is set through common configuration key *qmlSearch*. * The filename used comes from the module identifier, or can be * set in the configuration file through *qmlFilename*. + * + * @see Qml.h for available Calamares internals. */ QmlViewStep( QObject* parent = nullptr ); virtual ~QmlViewStep() override; @@ -78,6 +80,8 @@ protected: * * Ownership of the config object remains with the ViewStep; it is possible * to return a pointer to a member variable. + * + * This object is made available as a context-property *config* in QML. */ virtual QObject* getConfig(); diff --git a/src/modules/notesqml/notesqml.qml b/src/modules/notesqml/notesqml.qml index bca7da408..374d9c399 100644 --- a/src/modules/notesqml/notesqml.qml +++ b/src/modules/notesqml/notesqml.qml @@ -22,7 +22,7 @@ * by Calamares). One of the internals that is exposed in the sub- * namespace io.calamares.ui is the Branding object, which can be used * to retrieve strings and paths and colors. For a full list, see - * the documentation of the QmlViewStep base-class. + * the documentation in `Qml.h`. */ import io.calamares.ui 1.0