Development/Tutorials/Plasma4/QML/ActiveSettings: Difference between revisions

From KDE TechBase
(a bit of structure to fill)
Line 1: Line 1:
This tutorial teaches you how you can load Active settings modules into your app, and create your own modules.
This tutorial teaches you how you can load Active settings modules into your app, and create your own modules.


= Architecture =
= Introduction =
Active Settings is an app, much like Plasma Desktop's kcmshell that shows and loads configuration modules. These configuration modules are plugins providing a QML package and an optional C++-plugin which exports custom-written configuration objects as QObject to the declarative environment.
Active Settings is an app, much like Plasma Desktop's kcmshell that shows and loads configuration modules. These configuration modules are plugins providing a QML package and an optional C++-plugin which exports custom-written configuration objects as QObject to the declarative environment.


Line 18: Line 18:
</pre>
</pre>
will open the active-settings app and load the "Time and Date" module on startup.
will open the active-settings app and load the "Time and Date" module on startup.
= Architecture =
The Active Settings app consists of a number of parts, an Active App, which loads a QML package providing the chrome for active-settings, a set of Declarative components which encapsulate loading settings modules and a set of settings modules, which provide the UI and backend code for a specific settings domain (i.e. Time and Date, Browser settings, etc.).
= Integrating a Settings Module into an App =
= Creating Your Own Settings Module =
== Simple, QML-only Module ==
== Extending your Settings Module with with C++ ==

Revision as of 16:53, 30 December 2011

This tutorial teaches you how you can load Active settings modules into your app, and create your own modules.

Introduction

Active Settings is an app, much like Plasma Desktop's kcmshell that shows and loads configuration modules. These configuration modules are plugins providing a QML package and an optional C++-plugin which exports custom-written configuration objects as QObject to the declarative environment.

You can query available modules using the --list argument to active-settings:

$ active-settings --list
org.kde.active.settings.web             Settings for history, caching, etc.
org.kde.active.settings.configtest      Test Module for the Config Bindings
org.kde.active.settings.time            Settings for timezone and date display

You can load an individual module by supplying its plugin name as argument to active-settings:

active-settings org.kde.active.settings.time

will open the active-settings app and load the "Time and Date" module on startup.

Architecture

The Active Settings app consists of a number of parts, an Active App, which loads a QML package providing the chrome for active-settings, a set of Declarative components which encapsulate loading settings modules and a set of settings modules, which provide the UI and backend code for a specific settings domain (i.e. Time and Date, Browser settings, etc.).


Integrating a Settings Module into an App

Creating Your Own Settings Module

Simple, QML-only Module

Extending your Settings Module with with C++