Plasma::Types Class

Enums and constants used in Plasma. More...

Header: #include <Plasma/Plasma>
CMake: find_package(Plasma REQUIRED)
target_link_libraries(mytarget PRIVATE Plasma::Plasma)
Inherits: QObject

Public Types

flags BackgroundFlags
enum BackgroundHints { NoBackground, StandardBackground, TranslucentBackground, ShadowBackground, ConfigurableBackground, DefaultBackground }
(since 5.77) enum ContainmentDisplayHint { NoContainmentDisplayHint, ContainmentDrawsPlasmoidHeading, ContainmentForcesSquarePlasmoids, ContainmentPrefersOpaqueBackground, ContainmentPrefersFloatingApplets }
flags ContainmentDisplayHints
enum FormFactor { Planar, MediaCenter, Horizontal, Vertical, Application }
enum ImmutabilityType { Mutable, UserImmutable, SystemImmutable }
(since 4.3) enum ItemStatus { UnknownStatus, PassiveStatus, ActiveStatus, NeedsAttentionStatus, RequiresAttentionStatus, …, HiddenStatus }
enum Location { Floating, Desktop, FullScreen, TopEdge, BottomEdge, …, RightEdge }

Detailed Description

Member Type Documentation

enum Types::BackgroundHints
flags Types::BackgroundFlags

Description on how draw a background for the applet

ConstantValueDescription
Plasma::Types::NoBackground0Not drawing a background under the applet, the applet has its own implementation
Plasma::Types::StandardBackground1The standard background from the theme is drawn
Plasma::Types::TranslucentBackground2An alternate version of the background is drawn, usually more translucent
Plasma::Types::ShadowBackground4The applet won't have a svg background but a drop shadow of its content done via a shader
Plasma::Types::ConfigurableBackground8If the hint has this flag, the user is able to configure this background
Plasma::Types::DefaultBackgroundStandardBackgroundDefault settings: both standard background

The BackgroundFlags type is a typedef for QFlags<BackgroundHints>. It stores an OR combination of BackgroundHints values.

[since 5.77] enum Types::ContainmentDisplayHint
flags Types::ContainmentDisplayHints

Display hints that come from the containment that suggest the applet how to look and behave.

ConstantValueDescription
Plasma::Types::NoContainmentDisplayHint0 
Plasma::Types::ContainmentDrawsPlasmoidHeading1The containment will draw an titlebar-looking header for the applets, so the applets shouldn't attempt to paint a similar thing
Plasma::Types::ContainmentForcesSquarePlasmoids2The containment will force every plasmoid to be constrained in a square icon (An example is the System Tray)
Plasma::Types::ContainmentPrefersOpaqueBackground4The containment prefers the style of the applets to be opaque, where applicable
Plasma::Types::ContainmentPrefersFloatingApplets8The containment prefers applet's dialogs to be floating, where applicable

This enum was introduced in 5.77.

The ContainmentDisplayHints type is a typedef for QFlags<ContainmentDisplayHint>. It stores an OR combination of ContainmentDisplayHint values.

enum Types::FormFactor

The FormFactor enumeration describes how a Plasma::Applet should arrange itself. The value is derived from the container managing the Applet (e.g. in Plasma, a Corona on the desktop or on a panel).

ConstantValueDescription
Plasma::Types::Planar0The applet lives in a plane and has two degrees of freedom to grow. Optimize for desktop, laptop or tablet usage: a high resolution screen 1-3 feet distant from the viewer.
Plasma::Types::MediaCenter1As with Planar, the applet lives in a plane but the interface should be optimized for medium-to-high resolution screens that are 5-15 feet distant from the viewer. Sometimes referred to as a "ten foot interface".
Plasma::Types::Horizontal2The applet is constrained vertically, but can expand horizontally.
Plasma::Types::Vertical3The applet is constrained horizontally, but can expand vertically.
Plasma::Types::Application4The Applet lives in a plane and should be optimized to look as a full application, for the desktop or the particular device.

enum Types::ImmutabilityType

Defines the immutability of items like applets, corona and containments they can be free to modify, locked down by the user or locked down by the system (e.g. kiosk setups).

ConstantValueDescription
Plasma::Types::Mutable1The item can be modified in any way
Plasma::Types::UserImmutable2The user has requested a lock down, and can undo the lock down at any time
Plasma::Types::SystemImmutable4The item is locked down by the system, the user can't unlock it

[since 4.3] enum Types::ItemStatus

Status of an applet

ConstantValueDescription
Plasma::Types::UnknownStatus0The status is unknown
Plasma::Types::PassiveStatus1The item is passive
Plasma::Types::ActiveStatus2The item is active
Plasma::Types::NeedsAttentionStatus3The item needs attention
Plasma::Types::RequiresAttentionStatus4The item needs persistent attention
Plasma::Types::AcceptingInputStatus5The item is accepting input
Plasma::Types::HiddenStatus6The item will be hidden totally

This enum was introduced in 4.3.

enum Types::Location

The Location enumeration describes where on screen an element, such as an Applet or its managing container, is positioned on the screen.

ConstantValueDescription
Plasma::Types::Floating0Free floating. Neither geometry or z-ordering is described precisely by this value.
Plasma::Types::Desktop1On the planar desktop layer, extending across the full screen from edge to edge.
Plasma::Types::FullScreen2Full screen
Plasma::Types::TopEdge3Along the top of the screen
Plasma::Types::BottomEdge4Along the bottom of the screen
Plasma::Types::LeftEdge5Along the left side of the screen
Plasma::Types::RightEdge6Along the right side of the screen