Plasma Namespace Reference
from PyKDE4.plasma.Plasma import *
Detailed Description
@headerfile plasma/windoweffect.h <Plasma/WindowEffect>
Class Index
Enumerations | |
AnnouncementMethod | { NoAnnouncement, ZeroconfAnnouncement } |
AspectRatioMode | { InvalidAspectRatioMode, IgnoreAspectRatio, KeepAspectRatio, Square, ConstrainedSquare, FixedSize } |
ComponentType | { AppletComponent, DataEngineComponent, RunnerComponent, AnimatorComponent, ContainmentComponent, WallpaperComponent } |
Constraint | { NoConstraint, FormFactorConstraint, LocationConstraint, ScreenConstraint, SizeConstraint, ImmutableConstraint, StartupCompletedConstraint, ContextConstraint, PopupConstraint, AllConstraints } |
Direction | { Down, Up, Left, Right } |
FlipDirection | { NoFlip, HorizontalFlip, VerticalFlip } |
FormFactor | { Planar, MediaCenter, Horizontal, Vertical } |
ImmutabilityType | { Mutable, UserImmutable, SystemImmutable } |
IntervalAlignment | { NoAlignment, AlignToMinute, AlignToHour } |
ItemStatus | { UnknownStatus, PassiveStatus, ActiveStatus, NeedsAttentionStatus, AcceptingInputStatus } |
ItemTypes | { AppletType, LineEditType } |
Location | { Floating, Desktop, FullScreen, TopEdge, BottomEdge, LeftEdge, RightEdge } |
MarginEdge | { TopMargin, BottomMargin, LeftMargin, RightMargin } |
MessageButton | { ButtonNone, ButtonOk, ButtonYes, ButtonNo, ButtonCancel } |
PopupPlacement | { FloatingPopup, TopPosedLeftAlignedPopup, TopPosedRightAlignedPopup, LeftPosedTopAlignedPopup, LeftPosedBottomAlignedPopup, BottomPosedLeftAlignedPopup, BottomPosedRightAlignedPopup, RightPosedTopAlignedPopup, RightPosedBottomAlignedPopup } |
Position | { LeftPositioned, RightPositioned, TopPositioned, BottomPositioned, CenterPositioned } |
TrustLevel | { InvalidCredentials, UnknownCredentials, ValidCredentials, TrustedCredentials, UltimateCredentials } |
ZoomDirection | { ZoomIn, ZoomOut } |
ZoomLevel | { DesktopZoom, GroupZoom, OverviewZoom } |
Functions | |
[QAction] | actionsFromMenu (QMenu menu, QString prefix=QString(), QObject parent=0) |
bool | isPluginVersionCompatible (long version) |
QStringList | knownLanguages (Plasma.ComponentTypes types) |
Plasma.AppletScript | loadScriptEngine (QString language, Plasma.Applet applet) |
Plasma.DataEngineScript | loadScriptEngine (QString language, Plasma.DataEngine dataEngine) |
Plasma.RunnerScript | loadScriptEngine (QString language, Plasma.AbstractRunner runner) |
Plasma.WallpaperScript | loadScriptEngine (QString language, Plasma.Wallpaper wallpaper) |
Plasma.Direction | locationToDirection (Plasma.Location location) |
Plasma.Direction | locationToInverseDirection (Plasma.Location location) |
KSharedPtr | packageStructure (QString language, Plasma.ComponentType type) |
float | scalingFactor (Plasma.ZoomLevel level) |
long | version () |
long | versionMajor () |
long | versionMinor () |
long | versionRelease () |
QString | versionString () |
QGraphicsView | viewFor (QGraphicsItem item) |
Enumeration Documentation
AnnouncementMethod |
- Enumerator:
-
NoAnnouncement = 0 ZeroconfAnnouncement = 1
AspectRatioMode |
Defines the aspect ratio used when scaling an applet
- Enumerator:
-
InvalidAspectRatioMode = -1 IgnoreAspectRatio = 0 KeepAspectRatio = 1 Square = 2 ConstrainedSquare = 3 FixedSize = 4
ComponentType |
The ComonentType enumeration refers to the various types of components, or plugins, supported by plasma.
- Enumerator:
-
AppletComponent = 1 DataEngineComponent = 2 RunnerComponent = 4 AnimatorComponent = 8 ContainmentComponent = 16 WallpaperComponent = 32
Constraint |
The Constraint enumeration lists the various constraints that Plasma objects have managed for them and which they may wish to react to, for instance in Applet.constraintsUpdated
- Enumerator:
-
NoConstraint = 0 FormFactorConstraint = 1 LocationConstraint = 2 ScreenConstraint = 4 SizeConstraint = 8 ImmutableConstraint = 16 StartupCompletedConstraint = 32 ContextConstraint = 64 PopupConstraint = 128 AllConstraints = FormFactorConstraint|LocationConstraint|ScreenConstraint|SizeConstraint|ImmutableConstraint|ContextConstraint|PopupConstraint
Direction |
The Direction enumeration describes in which direction, relative to the Applet (and its managing container), popup menus, expanders, balloons, message boxes, arrows and other such visually associated widgets should appear in. This is usually the oposite of the Location.
- Enumerator:
-
Down = 0 Up Left Right
FlipDirection |
Flip enumeration
- Enumerator:
-
NoFlip = 0 HorizontalFlip = 1 VerticalFlip = 2
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).
- Enumerator:
-
Planar = 0 MediaCenter Horizontal Vertical
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).
- Enumerator:
-
Mutable = 1 UserImmutable = 2 SystemImmutable = 4
IntervalAlignment |
Possible timing alignments
- Enumerator:
-
NoAlignment = 0 AlignToMinute AlignToHour
ItemStatus |
Status of an applet
- Since:
- 4.3
- Enumerator:
-
UnknownStatus = 0 PassiveStatus = 1 ActiveStatus = 2 NeedsAttentionStatus = 3 AcceptingInputStatus = 4
ItemTypes |
- Enumerator:
-
AppletType = QGraphicsItem::UserType+1 LineEditType = QGraphicsItem::UserType+2
Location |
The Location enumeration describes where on screen an element, such as an Applet or its managing container, is positioned on the screen.
- Enumerator:
-
Floating = 0 Desktop FullScreen TopEdge BottomEdge LeftEdge RightEdge
MarginEdge |
- Enumerator:
-
TopMargin = 0 BottomMargin LeftMargin RightMargin
MessageButton |
- Enumerator:
-
ButtonNone = 0 ButtonOk = 1 ButtonYes = 2 ButtonNo = 4 ButtonCancel = 8
PopupPlacement |
The popup position enumeration relatively to his attached widget
- Enumerator:
-
FloatingPopup = 0 TopPosedLeftAlignedPopup TopPosedRightAlignedPopup LeftPosedTopAlignedPopup LeftPosedBottomAlignedPopup BottomPosedLeftAlignedPopup BottomPosedRightAlignedPopup RightPosedTopAlignedPopup RightPosedBottomAlignedPopup
Position |
The position enumeration
- Enumerator:
-
LeftPositioned RightPositioned TopPositioned BottomPositioned CenterPositioned
TrustLevel |
- Enumerator:
-
InvalidCredentials = 0 UnknownCredentials = 1 ValidCredentials = 2 TrustedCredentials = 3 UltimateCredentials = 4
ZoomDirection |
The direction of a zoom action.
- Enumerator:
-
ZoomIn = 0 ZoomOut = 1
ZoomLevel |
Zoom levels that Plasma is aware of...
- Enumerator:
-
DesktopZoom = 0 GroupZoom OverviewZoom
Function Documentation
[QAction] actionsFromMenu | ( | QMenu | menu, | |
QString | prefix=QString(), | |||
QObject | parent=0 | |||
) |
Returns a list of all actions in the given QMenu This method flattens the hierarchy of the menu by prefixing the text of all actions in a submenu with the submenu title.
- Parameters:
-
menu the QMenu storing the actions prefix text to display before the text of all actions in the menu parent QObject to be passed as parent of all the actions in the list
- Since:
- 4.4
bool isPluginVersionCompatible | ( | long | version | |
) |
Verifies that a plugin is compatible with plasma
QStringList knownLanguages | ( | Plasma.ComponentTypes | types | |
) |
- Parameters:
-
types a set of ComponentTypes flags for which to look up the language support for
- Returns:
- a list of all supported languages for the given type(s).
Plasma.AppletScript loadScriptEngine | ( | QString | language, | |
Plasma.Applet | applet | |||
) |
Loads an Wallpaper script engine for the given language.
- Parameters:
-
language the language to load for runner the Plasma.Wallpaper for this script
- Returns:
- pointer to the RunnerScript or 0 on failure; the caller is responsible for the return object which will be parented to the Wallpaper
Plasma.DataEngineScript loadScriptEngine | ( | QString | language, | |
Plasma.DataEngine | dataEngine | |||
) |
Loads an Wallpaper script engine for the given language.
- Parameters:
-
language the language to load for runner the Plasma.Wallpaper for this script
- Returns:
- pointer to the RunnerScript or 0 on failure; the caller is responsible for the return object which will be parented to the Wallpaper
Plasma.RunnerScript loadScriptEngine | ( | QString | language, | |
Plasma.AbstractRunner | runner | |||
) |
Loads an Wallpaper script engine for the given language.
- Parameters:
-
language the language to load for runner the Plasma.Wallpaper for this script
- Returns:
- pointer to the RunnerScript or 0 on failure; the caller is responsible for the return object which will be parented to the Wallpaper
Plasma.WallpaperScript loadScriptEngine | ( | QString | language, | |
Plasma.Wallpaper | wallpaper | |||
) |
Loads an Wallpaper script engine for the given language.
- Parameters:
-
language the language to load for runner the Plasma.Wallpaper for this script
- Returns:
- pointer to the RunnerScript or 0 on failure; the caller is responsible for the return object which will be parented to the Wallpaper
Plasma.Direction locationToDirection | ( | Plasma.Location | location | |
) |
Converts a location to a direction. Handy for figuring out which way to send a popup based on location or to point arrows and other directional items.
- Parameters:
-
location the location of the container the element will appear in
- Returns:
- the visual direction the element should be oriented in
Plasma.Direction locationToInverseDirection | ( | Plasma.Location | location | |
) |
Converts a location to the direction facing it. Handy for figuring out which way to collapse a popup or to point arrows at the item itself.
- Parameters:
-
location the location of the container the element will appear in
- Returns:
- the visual direction the element should be oriented in
KSharedPtr |
( | QString | language, | |
Plasma.ComponentType | type | |||
) |
Loads an appropriate PackageStructure for the given language and type
- Parameters:
-
language the language to load the PackageStructure for type the component type
- Returns:
- a guarded PackageStructure pointer
float scalingFactor | ( | Plasma.ZoomLevel | level | |
) |
- Returns:
- the scaling factor (0..1) for a ZoomLevel
long version | ( | ) |
The runtime version of libplasma
long versionMajor | ( | ) |
The runtime major version of libplasma
long versionMinor | ( | ) |
The runtime major version of libplasma
long versionRelease | ( | ) |
The runtime major version of libplasma
QString versionString | ( | ) |
The runtime version string of libplasma
QGraphicsView viewFor | ( | QGraphicsItem | item | |
) |
Returns the most appropriate QGraphicsView for the item.
- Parameters:
-
item the QGraphicsItem to locate a view for
- Returns:
- pointer to a view, or 0 if none was found