SettingsOpener

Opens the settings page of a schema for an activity that cannot link libconfigui (config-ui §CFGC-8).

Inherits QObject

In the namespace nodesettings. Declared in src/libs/libnodesettings/nodesettings/SettingsOpener.hpp.

Detailed description

An activity of libwidgets, libswarmui or libtrove may not depend on libconfigui. It asks its context for the facility named facilityName() and calls open() through the meta-object system, with no include:

if (auto opener = context()->facility(QStringLiteral("config.window"))) {
        QMetaObject::invokeMethod(opener.data(), "open",
                Q_ARG(QString, QStringLiteral("trove")),
                Q_ARG(QString, QString()),
                Q_ARG(QVariantMap, QVariantMap{{QStringLiteral("project"), id}}));
}

The app adds one function per schema it shows. A function knows its model and its parent window, and reads what varies from the context map, for example the project of the trove schema.

In this section