Containment QML Type
The base class for plugins that provide backgrounds and applet grouping containers. More...
| Import Statement: | import org.kde.plasma.plasmoid |
Attached Properties
- Type : enumeration
- activity : string
- activityName : string
- applets : list<Plasmoid>
- availableScreenRect : rect
- availableScreenRegion : list<rect>
- containmentDisplayHints : Plasma.Types.ContainmentDisplayHints
- containmentType : Containment.Type
- corona : Plasma::Corona
- isUiReady : bool
- screen : int
- screenGeometry : rect
- wallpaperGraphicsObject : QObject
- wallpaperPlugin : string
Methods
- void addApplet(Plasma::Applet applet, rect geometryHint)
Detailed Description
Containment objects provide the means to group applets into functional sets. They also provide the following:
- creation of focusing event
- drawing of the background image (which can be interactive)
- form factors (e.g. panel, desktop, full screen, etc)
- applet layout management
Since Containment is itself a Plasmoid (native C++ class Plasma::Applet), all the techniques used for writing the visual presentation of Plasmoids is applicable to Containments. Containments are differentiated from Plasmoids by being marked with the ServiceType of Plasma/Containment. Plugins registered with both the Applet and the Containment ServiceTypes can be loaded for use in either situation.
Attached Property Documentation
Containment.Type : enumeration |
The type of the Containment.
This value is specified in the "X-Plasma-ContainmentType" JSON-metadata value of containments.
| Constant | Description |
|---|---|
NoContainment | |
Desktop | Main containments that will own a screen in a mutually exclusive fashion. |
Panel | A desktop panel. Multiple can be present per screen. |
Custom | A containment that is neither a desktop nor a panel but something application specific. |
CustomPanel | A customized desktop panel. "CustomPanel" in metadata. |
CustomEmbedded | A customized containment embedded into another applet. |
Containment.activity : string |
Activity UID of this containment.
Containment.activityName : string |
Activity name of this containment.
Containment.applets : list<Plasmoid> |
List of plasmoids in this containment.
Containment.availableScreenRect : rect |
Screen area used by the Containment by itself (free of enveloping panels).
The coordinates are relative to the containment (that is, x:0 and y:0 match the Containment's upper left corner), and independent from the screen position.
For more precise available geometry use availableScreenRegion().
Containment.availableScreenRegion : list<rect> |
A list of rectangles matching the available region of this screen, panels excluded.
Containment.containmentDisplayHints : Plasma.Types.ContainmentDisplayHints |
Containment.containmentType : Containment.Type |
Type of this containment.
Containment.corona : Plasma::Corona |
The corona for this contaiment.
Containment.isUiReady : bool |
Containment.screen : int |
The screen number this containment is serving as the desktop for, or -1 if none
Containment.screenGeometry : rect |
Provides access to the geometry of the screen the plasmoid is in.
Can be useful to figure out what's the absolute position of the plasmoid.
Containment.wallpaperGraphicsObject : QObject |
Containment.wallpaperPlugin : string |
Method Documentation
void addApplet(Plasma::Applet applet, rect geometryHint = rect) |
Adds an existing applet (plasmoid) to this Containment with the given geometryHint.
The hint determines the preferred location and size for the newly created plasmoid. The hint will not be respected if it's not possible to position it in the preferred location.