Jump to: navigation, search

There will be two shell packages (with the same PackageStructure) loaded on the shell: a "global" one that will provide fallback files, while another package will be loaded specific of the device form factor. Files will be searched for in the formfactor package, then if not found will be searched for in the "global" package.


Package filesystem

Package Type in desktop file: Plasma/Shell

contents/layout.js -> file
contents/defaults ->file


Shell UI components - named files AppletError.qml CompactApplet.qml Configuration.qml WidgetExplorer.qml

TODO: this folder goes away, every named file gets its own directory Current files:

  • "appleterror", "components/AppletError.qml": Error message shown when an applet fails loading
  • "compactapplet", "components/CompactApplet.qml": QML component that shows an applet in a popup
  • "configurationui", "components/Configuration.qml": QML component for the configuratuion dialog
  • "defaultcompactrepresentation", "components/DefaultCompactRepresentation.qml": Compact representation of an applet when collapsed in a popup, for instance as an icon. applets can override this component.
  • "widgetexplorer", "explorer/WidgetExplorer.qml": Widgets explorer UI
  • "panelconfigurationui", "components/PanelConfiguration.qml": Panel configuration UI


Each view (panel view or desktop view) will load a qml file that will "contain the containment", it will have the form <containment type>.qml Where <containment type> is allowed to be Desktop or Panel


The default layout JavaScript file supports a similar API to Plasma1 desktop scripting. The manipulation of Applet geometry will change a bit, see Applet geometry manipulation from scripts


Default settings ContainmentActions Default containment for each type Default toolbox

Example defaults config file



Layout package details In metadata.desktop: X-Plasma-ContainmentCategories=<containment type>

Applet geometry setting Containment geometry strategies: * None * Indexed * Grid * Free * Grouped


  • defaults for kwin configuration
  • default plugins for loaded kwin effects

Applet geometry manipulation from scripts

QML part

Item {
    property int appletPlacementStrategy: “indexed”
    Connections {
  	    target: parent
           onIndexedPlacementRequest: {
               parameters: applet, index
           onGridPlacementRequest: {
               parameters: applet, x, y
           onFreePlacementRequest: {
               parameters: applet, point

C++ part in ScriptEngine

PlacementStrategy ContainmentInterface::placementStrategy() const
     // look up the appletPlacementStrategy property and return it
void ContainmentInterface::requestIndexedPlacement(Applet *applet, int index)
       if (placementStrategy() == IndexedStrategy) {
           emit indexedPlacementRequest(applet, index);

This page was last modified on 19 April 2013, at 11:43. This page has been accessed 1,075 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal