Device specific workspaces

The Plasma Device shell that is used in the Plasma Active tablet shell is a generic user interface loader that doesn't provide any UI by itself.

The device shell will load:

A set of QML files that will define the behavior of the workspace for this form factor, in the form of a Plasma::Package file structure

That package may eventually load other packages via QML

The plasma containments will be loaded and put into the scene

Every activity corresponds to 1 containment

there may be containments not linked to activities (e.g. panels)

the containment are placed in the screen by logic written in JavaScript inside the main homescreen QML package

Structure of the homescreen QML package

[TODO]

API of the homescreen root QML item

The root QML item should expose some properties and signals, that the Plasma shell will use to interact with it.

Properties

Mandatory properties: the root object must offet those:

QGraphicsWidget activeContainment: It's a pointer to the containment that owns the screen and is set by the plasma shell (the qml part must not write it). The qml part should make sure activeContainment is disaplayed in a prominent place, e.g. filling the whole screen.

Option al properties: (they are now named objects, TODO: must become properties).

Item availableScreenRect: an item as big as the usable area of the main containment, make it smaller to prevent the containment to lay out items out of the availableScreenRect geometry. The item can offer four additional properties:

int leftReserved: space reserved at the left edge of the screen. a maximized window will not go over this area of the screen.

int topReserved: space reserved at the top edge of the screen. a maximized window will not go over this area of the screen.

int rightReserved: space reserved at the right edge of the screen.

int bottomReserved: space reserved at the bottom edge of the screen.

Methods

void addPanel(Containment panel, Plasma::FormFactor formFactor, Plasma::Location location): Position a new panel in this home screen. The final position can depend from the panel formfactor and/or location. The homescreen must implement this method in order to be able to use panels.

Signals

newActivityRequested(): Asks the shell to show the user interface to create a new activity: call this signal from qml if you want to provide a control for a new activity creation. The shell may decide wether to honor this request or not.

focusActivityView(): Ask the shell to show the main activity screen, even if it was covered by some application, by raising and focusing its window. The shell may decide wether to honor this request or not.

QML types available to the Home screen QML

This is an additional type that can be created in the homescreen QML and only there.

DevicePanel

DevicePanel is available by importing org.kde.plasma.deviceshell and offers the following properties: