Plasma Namespace Reference
from PyKDE4.plasma.Plasma import *
Detailed Description
Class Index
Enumerations | |
| AspectRatioMode | { InvalidAspectRatioMode, IgnoreAspectRatio, KeepAspectRatio, Square, ConstrainedSquare, FixedSize } |
| ComponentType | { AppletComponent, DataEngineComponent, RunnerComponent, AnimatorComponent, ContainmentComponent } |
| Constraint | { NoConstraint, FormFactorConstraint, LocationConstraint, ScreenConstraint, SizeConstraint, ImmutableConstraint, StartupCompletedConstraint, ContextConstraint, AllConstraints } |
| Direction | { Down, Up, Left, Right } |
| FlipDirection | { NoFlip, HorizontalFlip, VerticalFlip } |
| FormFactor | { Planar, MediaCenter, Horizontal, Vertical } |
| ImmutabilityType | { Mutable, UserImmutable, SystemImmutable } |
| IntervalAlignment | { NoAlignment, AlignToMinute, AlignToHour } |
| 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 } |
| ZoomDirection | { ZoomIn, ZoomOut } |
| ZoomLevel | { DesktopZoom, GroupZoom, OverviewZoom } |
Functions | |
| 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.Direction | locationToDirection (Plasma.Location location) |
| Plasma.Direction | locationToInverseDirection (Plasma.Location location) |
| Plasma.PackageStructure.Ptr | 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
| 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
| 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 AllConstraints = FormFactorConstraint|LocationConstraint|ScreenConstraint|SizeConstraint|ImmutableConstraint|ContextConstraint
| 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
| ItemTypes |
Possible timing alignments
- 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
| 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
| bool isPluginVersionCompatible | ( | long | version | |
| ) |
Verifies that a plugin is compatible with plasma
| QStringList knownLanguages | ( | Plasma.ComponentTypes | types | |
| ) |
| Plasma.AppletScript loadScriptEngine | ( | QString | language, | |
| Plasma.Applet | applet | |||
| ) |
Loads an Applet script engine for the given language.
- Parameters:
-
language the language to load for applet the Plasma.Applet for this script
- Returns:
- pointer to the AppletScript or 0 on failure; the caller is responsible for the return object which will be parented to the Applet
| Plasma.DataEngineScript loadScriptEngine | ( | QString | language, | |
| Plasma.DataEngine | dataEngine | |||
| ) |
Loads an DataEngine script engine for the given language.
- Parameters:
-
language the language to load for dataEngine the Plasma.DataEngine for this script;
- Returns:
- pointer to the DataEngineScript or 0 on failure; the caller is responsible for the return object which will be parented to the DataEngine
| Plasma.RunnerScript loadScriptEngine | ( | QString | language, | |
| Plasma.AbstractRunner | runner | |||
| ) |
Loads an Applet script engine for the given language.
- Parameters:
-
language the language to load for runner the Plasma.AbstractRunner 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 AbstractRunner
| 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
| Plasma.PackageStructure.Ptr packageStructure | ( | 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 | ( | self ) |
The runtime version of libplasma
| long versionMajor | ( | self ) |
The runtime major version of libplasma
| long versionMinor | ( | self ) |
The runtime major version of libplasma
| long versionRelease | ( | self ) |
The runtime major version of libplasma
| QString versionString | ( | self ) |
The runtime version string of libplasma
| QGraphicsView viewFor | ( | QGraphicsItem | item | |
| ) |
Returns the most appropriate QGraphicsView for the item.
@arg item the QGraphicsItem to locate a view for
- Returns:
- pointer to a view, or 0 if none was found
KDE 4.3 PyKDE API Reference