Plasma
#include <Plasma/Containment>
Classes | |
class | StyleOption |
Public Types | |
enum | Type { NoContainmentType = -1, DesktopContainment = 0, PanelContainment, CustomContainment = 127, CustomPanelContainment = 128 } |
Public Types inherited from Plasma::Applet | |
enum | { Type = Plasma::AppletType } |
enum | BackgroundHint { NoBackground = 0, StandardBackground = 1, TranslucentBackground = 2, DefaultBackground = StandardBackground } |
typedef QHash< QString, Applet * > | Dict |
typedef QList< Applet * > | List |
Public Slots | |
void | addSiblingContainment () |
void | configChanged () |
void | destroy () |
void | destroy (bool confirm) |
void | focusNextApplet () |
void | focusPreviousApplet () |
void | setFormFactor (Plasma::FormFactor formFactor) |
void | setLocation (Plasma::Location location) |
void | showConfigurationInterface () |
Public Slots inherited from Plasma::Applet | |
virtual void | configChanged () |
virtual void | destroy () |
void | flushPendingConstraintsEvents () |
bool | isPublished () const |
bool | isUserConfiguring () const |
void | lower () |
void | publish (Plasma::AnnouncementMethods methods, const QString &resourceName) |
void | raise () |
void | runAssociatedApplication () |
void | setBusy (bool busy) |
void | setImmutability (const ImmutabilityType immutable) |
void | setStatus (const ItemStatus stat) |
virtual void | showConfigurationInterface () |
void | showConfigurationInterface (QWidget *widget) |
QVariantList | startupArguments () const |
ItemStatus | status () const |
void | unpublish () |
Public Member Functions | |
Containment (QGraphicsItem *parent=0, const QString &serviceId=QString(), uint containmentId=0) | |
Containment (QObject *parent, const QVariantList &args) | |
~Containment () | |
QString | activity () const |
Applet * | addApplet (const QString &name, const QVariantList &args=QVariantList(), const QRectF &geometry=QRectF(-1,-1,-1,-1)) |
void | addApplet (Applet *applet, const QPointF &pos=QPointF(-1,-1), bool dontInit=true) |
void | addAssociatedWidget (QWidget *widget) |
void | addToolBoxAction (QAction *action) |
Applet::List | applets () const |
void | clearApplets () |
void | closeToolBox () |
QString | containmentActions (const QString &trigger) |
KConfigGroup | containmentActionsConfig () |
QStringList | containmentActionsTriggers () |
Type | containmentType () const |
Context * | context () const |
Corona * | corona () const |
int | desktop () const |
bool | drawWallpaper () |
void | enableAction (const QString &name, bool enable) |
void | init () |
bool | isToolBoxOpen () const |
int | lastDesktop () const |
int | lastScreen () const |
void | openToolBox () |
void | removeAssociatedWidget (QWidget *widget) |
void | removeToolBoxAction (QAction *action) |
void | restore (KConfigGroup &group) |
void | save (KConfigGroup &group) const |
int | screen () const |
void | setActivity (const QString &activity) |
void | setContainmentActions (const QString &trigger, const QString &pluginName) |
void | setScreen (int screen, int desktop=-1) |
void | setToolBoxOpen (bool open) |
void | setWallpaper (const QString &pluginName, const QString &mode=QString()) |
void | showContextMenu (const QPointF &containmentPos, const QPoint &screenPos) |
virtual void | showDropZone (const QPoint pos) |
Plasma::Wallpaper * | wallpaper () const |
Public Member Functions inherited from Plasma::Applet | |
Applet (QGraphicsItem *parent=0, const QString &serviceId=QString(), uint appletId=0) | |
Applet (const KPluginInfo &info, QGraphicsItem *parent=0, uint appletId=0) | |
Applet (QGraphicsItem *parent, const QString &serviceId, uint appletId, const QVariantList &args) | |
~Applet () | |
Q_INVOKABLE QAction * | action (QString name) const |
void | addAction (QString name, QAction *action) |
Plasma::AspectRatioMode | aspectRatioMode () const |
QString | associatedApplication () const |
KUrl::List | associatedApplicationUrls () const |
BackgroundHints | backgroundHints () const |
QString | category () const |
KConfigGroup | config () const |
KConfigGroup | config (const QString &group) const |
ConfigLoader * | configScheme () const |
bool | configurationRequired () const |
Containment * | containment () const |
Context * | context () const |
virtual QList< QAction * > | contextualActions () |
virtual void | createConfigurationInterface (KConfigDialog *parent) |
QStringList | customCategories () |
Q_INVOKABLE DataEngine * | dataEngine (const QString &name) const |
bool | destroyed () const |
QFont | font () const |
virtual FormFactor | formFactor () const |
KConfigGroup | globalConfig () const |
KShortcut | globalShortcut () const |
bool | hasAuthorization (const QString &constraint) const |
bool | hasConfigurationInterface () const |
bool | hasFailedToLaunch () const |
bool | hasValidAssociatedApplication () const |
QString | icon () const |
uint | id () const |
ImmutabilityType | immutability () const |
virtual void | initExtenderItem (ExtenderItem *item) |
bool | isBusy () const |
bool | isContainment () const |
virtual bool | isPopupShowing () const |
virtual Location | location () const |
QRectF | mapFromView (const QGraphicsView *view, const QRect &rect) const |
QRect | mapToView (const QGraphicsView *view, const QRectF &rect) const |
QString | name () const |
const Package * | package () const |
virtual void | paintInterface (QPainter *painter, const QStyleOptionGraphicsItem *option, const QRect &contentsRect) |
void | paintWindowFrame (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
QString | pluginName () const |
QPoint | popupPosition (const QSize &s) const |
QPoint | popupPosition (const QSize &s, Qt::AlignmentFlag alignment) const |
QRect | screenRect () const |
void | setAspectRatioMode (Plasma::AspectRatioMode) |
void | setAssociatedApplication (const QString &string) |
void | setAssociatedApplicationUrls (const KUrl::List &urls) |
void | setBackgroundHints (const BackgroundHints hints) |
void | setCustomCategories (const QStringList &categories) |
void | setGlobalShortcut (const KShortcut &shortcut) |
bool | shouldConserveResources () const |
int | type () const |
void | updateConstraints (Plasma::Constraints constraints=Plasma::AllConstraints) |
QGraphicsView * | view () const |
Public Member Functions inherited from QGraphicsWidget | |
QGraphicsWidget (QGraphicsItem *parent, QFlags< Qt::WindowType > wFlags) | |
~QGraphicsWidget () | |
QList< QAction * > | actions () const |
void | addAction (QAction *action) |
void | addActions (QList< QAction * > actions) |
void | adjustSize () |
bool | autoFillBackground () const |
virtual QRectF | boundingRect () const |
bool | close () |
Qt::FocusPolicy | focusPolicy () const |
QGraphicsWidget * | focusWidget () const |
QFont | font () const |
void | geometryChanged () |
virtual void | getContentsMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const |
void | getWindowFrameMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const |
int | grabShortcut (const QKeySequence &sequence, Qt::ShortcutContext context) |
void | insertAction (QAction *before, QAction *action) |
void | insertActions (QAction *before, QList< QAction * > actions) |
bool | isActiveWindow () const |
QGraphicsLayout * | layout () const |
Qt::LayoutDirection | layoutDirection () const |
QPalette | palette () const |
QRectF | rect () const |
void | releaseShortcut (int id) |
void | removeAction (QAction *action) |
void | resize (const QSizeF &size) |
void | resize (qreal w, qreal h) |
void | setAttribute (Qt::WidgetAttribute attribute, bool on) |
void | setAutoFillBackground (bool enabled) |
void | setContentsMargins (qreal left, qreal top, qreal right, qreal bottom) |
void | setFocusPolicy (Qt::FocusPolicy policy) |
void | setFont (const QFont &font) |
virtual void | setGeometry (const QRectF &rect) |
void | setGeometry (qreal x, qreal y, qreal w, qreal h) |
void | setLayout (QGraphicsLayout *layout) |
void | setLayoutDirection (Qt::LayoutDirection direction) |
void | setPalette (const QPalette &palette) |
void | setShortcutAutoRepeat (int id, bool enabled) |
void | setShortcutEnabled (int id, bool enabled) |
void | setStyle (QStyle *style) |
void | setWindowFlags (QFlags< Qt::WindowType > wFlags) |
void | setWindowFrameMargins (qreal left, qreal top, qreal right, qreal bottom) |
void | setWindowTitle (const QString &title) |
QSizeF | size () const |
QStyle * | style () const |
bool | testAttribute (Qt::WidgetAttribute attribute) const |
void | unsetLayoutDirection () |
void | unsetWindowFrameMargins () |
Qt::WindowFlags | windowFlags () const |
QRectF | windowFrameGeometry () const |
QRectF | windowFrameRect () const |
QString | windowTitle () const |
Qt::WindowType | windowType () const |
Public Member Functions inherited from QGraphicsObject | |
QGraphicsObject (QGraphicsItem *parent) | |
void | enabledChanged () |
void | grabGesture (Qt::GestureType gesture, QFlags< Qt::GestureFlag > flags) |
void | opacityChanged () |
void | parentChanged () |
void | rotationChanged () |
void | scaleChanged () |
void | ungrabGesture (Qt::GestureType gesture) |
void | visibleChanged () |
void | xChanged () |
void | yChanged () |
void | zChanged () |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Public Member Functions inherited from QGraphicsItem | |
QGraphicsItem (QGraphicsItem *parent) | |
virtual | ~QGraphicsItem () |
bool | acceptDrops () const |
Qt::MouseButtons | acceptedMouseButtons () const |
bool | acceptHoverEvents () const |
bool | acceptsHoverEvents () const |
bool | acceptTouchEvents () const |
virtual void | advance (int phase) |
virtual QRectF | boundingRect () const =0 |
QRegion | boundingRegion (const QTransform &itemToDeviceTransform) const |
qreal | boundingRegionGranularity () const |
CacheMode | cacheMode () const |
QList< QGraphicsItem * > | childItems () const |
QList< QGraphicsItem * > | children () const |
QRectF | childrenBoundingRect () const |
void | clearFocus () |
QPainterPath | clipPath () const |
virtual bool | collidesWithItem (const QGraphicsItem *other, Qt::ItemSelectionMode mode) const |
virtual bool | collidesWithPath (const QPainterPath &path, Qt::ItemSelectionMode mode) const |
QList< QGraphicsItem * > | collidingItems (Qt::ItemSelectionMode mode) const |
QGraphicsItem * | commonAncestorItem (const QGraphicsItem *other) const |
virtual bool | contains (const QPointF &point) const |
QCursor | cursor () const |
QVariant | data (int key) const |
QTransform | deviceTransform (const QTransform &viewportTransform) const |
qreal | effectiveOpacity () const |
void | ensureVisible (const QRectF &rect, int xmargin, int ymargin) |
void | ensureVisible (qreal x, qreal y, qreal w, qreal h, int xmargin, int ymargin) |
bool | filtersChildEvents () const |
GraphicsItemFlags | flags () const |
QGraphicsItem * | focusItem () const |
QGraphicsItem * | focusProxy () const |
void | grabKeyboard () |
void | grabMouse () |
QGraphicsEffect * | graphicsEffect () const |
QGraphicsItemGroup * | group () const |
bool | handlesChildEvents () const |
bool | hasCursor () const |
bool | hasFocus () const |
void | hide () |
Qt::InputMethodHints | inputMethodHints () const |
void | installSceneEventFilter (QGraphicsItem *filterItem) |
bool | isActive () const |
bool | isAncestorOf (const QGraphicsItem *child) const |
bool | isBlockedByModalPanel (QGraphicsItem **blockingPanel) const |
bool | isClipped () const |
bool | isEnabled () const |
bool | isObscured () const |
bool | isObscured (const QRectF &rect) const |
bool | isObscured (qreal x, qreal y, qreal w, qreal h) const |
virtual bool | isObscuredBy (const QGraphicsItem *item) const |
bool | isPanel () const |
bool | isSelected () const |
bool | isUnderMouse () const |
bool | isVisible () const |
bool | isVisibleTo (const QGraphicsItem *parent) const |
bool | isWidget () const |
bool | isWindow () const |
QTransform | itemTransform (const QGraphicsItem *other, bool *ok) const |
QPointF | mapFromItem (const QGraphicsItem *item, const QPointF &point) const |
QPolygonF | mapFromItem (const QGraphicsItem *item, const QRectF &rect) const |
QPolygonF | mapFromItem (const QGraphicsItem *item, const QPolygonF &polygon) const |
QPainterPath | mapFromItem (const QGraphicsItem *item, const QPainterPath &path) const |
QPointF | mapFromItem (const QGraphicsItem *item, qreal x, qreal y) const |
QPolygonF | mapFromItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const |
QPointF | mapFromParent (const QPointF &point) const |
QPolygonF | mapFromParent (const QRectF &rect) const |
QPolygonF | mapFromParent (const QPolygonF &polygon) const |
QPainterPath | mapFromParent (const QPainterPath &path) const |
QPointF | mapFromParent (qreal x, qreal y) const |
QPolygonF | mapFromParent (qreal x, qreal y, qreal w, qreal h) const |
QPolygonF | mapFromScene (const QPolygonF &polygon) const |
QPointF | mapFromScene (const QPointF &point) const |
QPolygonF | mapFromScene (const QRectF &rect) const |
QPainterPath | mapFromScene (const QPainterPath &path) const |
QPointF | mapFromScene (qreal x, qreal y) const |
QPolygonF | mapFromScene (qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectFromItem (const QGraphicsItem *item, const QRectF &rect) const |
QRectF | mapRectFromItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectFromParent (const QRectF &rect) const |
QRectF | mapRectFromParent (qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectFromScene (qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectFromScene (const QRectF &rect) const |
QRectF | mapRectToItem (const QGraphicsItem *item, const QRectF &rect) const |
QRectF | mapRectToItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectToParent (const QRectF &rect) const |
QRectF | mapRectToParent (qreal x, qreal y, qreal w, qreal h) const |
QRectF | mapRectToScene (const QRectF &rect) const |
QRectF | mapRectToScene (qreal x, qreal y, qreal w, qreal h) const |
QPointF | mapToItem (const QGraphicsItem *item, const QPointF &point) const |
QPolygonF | mapToItem (const QGraphicsItem *item, const QRectF &rect) const |
QPolygonF | mapToItem (const QGraphicsItem *item, const QPolygonF &polygon) const |
QPainterPath | mapToItem (const QGraphicsItem *item, const QPainterPath &path) const |
QPointF | mapToItem (const QGraphicsItem *item, qreal x, qreal y) const |
QPolygonF | mapToItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const |
QPointF | mapToParent (const QPointF &point) const |
QPolygonF | mapToParent (const QRectF &rect) const |
QPainterPath | mapToParent (const QPainterPath &path) const |
QPointF | mapToParent (qreal x, qreal y) const |
QPolygonF | mapToParent (qreal x, qreal y, qreal w, qreal h) const |
QPolygonF | mapToParent (const QPolygonF &polygon) const |
QPolygonF | mapToScene (const QRectF &rect) const |
QPainterPath | mapToScene (const QPainterPath &path) const |
QPointF | mapToScene (qreal x, qreal y) const |
QPolygonF | mapToScene (qreal x, qreal y, qreal w, qreal h) const |
QPolygonF | mapToScene (const QPolygonF &polygon) const |
QPointF | mapToScene (const QPointF &point) const |
QMatrix | matrix () const |
void | moveBy (qreal dx, qreal dy) |
qreal | opacity () const |
virtual QPainterPath | opaqueArea () const |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)=0 |
QGraphicsItem * | panel () const |
PanelModality | panelModality () const |
QGraphicsItem * | parentItem () const |
QGraphicsObject * | parentObject () const |
QGraphicsWidget * | parentWidget () const |
QPointF | pos () const |
void | removeSceneEventFilter (QGraphicsItem *filterItem) |
void | resetMatrix () |
void | resetTransform () |
void | rotate (qreal angle) |
qreal | rotation () const |
void | scale (qreal sx, qreal sy) |
qreal | scale () const |
QGraphicsScene * | scene () const |
QRectF | sceneBoundingRect () const |
QMatrix | sceneMatrix () const |
QPointF | scenePos () const |
QTransform | sceneTransform () const |
void | scroll (qreal dx, qreal dy, const QRectF &rect) |
void | setAcceptDrops (bool on) |
void | setAcceptedMouseButtons (QFlags< Qt::MouseButton > buttons) |
void | setAcceptHoverEvents (bool enabled) |
void | setAcceptsHoverEvents (bool enabled) |
void | setAcceptTouchEvents (bool enabled) |
void | setActive (bool active) |
void | setBoundingRegionGranularity (qreal granularity) |
void | setCacheMode (CacheMode mode, const QSize &logicalCacheSize) |
void | setCursor (const QCursor &cursor) |
void | setData (int key, const QVariant &value) |
void | setEnabled (bool enabled) |
void | setFiltersChildEvents (bool enabled) |
void | setFlag (GraphicsItemFlag flag, bool enabled) |
void | setFlags (QFlags< QGraphicsItem::GraphicsItemFlag > flags) |
void | setFocus (Qt::FocusReason focusReason) |
void | setFocusProxy (QGraphicsItem *item) |
void | setGraphicsEffect (QGraphicsEffect *effect) |
void | setGroup (QGraphicsItemGroup *group) |
void | setHandlesChildEvents (bool enabled) |
void | setInputMethodHints (QFlags< Qt::InputMethodHint > hints) |
void | setMatrix (const QMatrix &matrix, bool combine) |
void | setOpacity (qreal opacity) |
void | setPanelModality (PanelModality panelModality) |
void | setParentItem (QGraphicsItem *newParent) |
void | setPos (const QPointF &pos) |
void | setPos (qreal x, qreal y) |
void | setRotation (qreal angle) |
void | setScale (qreal factor) |
void | setSelected (bool selected) |
void | setToolTip (const QString &toolTip) |
void | setTransform (const QTransform &matrix, bool combine) |
void | setTransformations (const QList< QGraphicsTransform * > &transformations) |
void | setTransformOriginPoint (qreal x, qreal y) |
void | setTransformOriginPoint (const QPointF &origin) |
void | setVisible (bool visible) |
void | setX (qreal x) |
void | setY (qreal y) |
void | setZValue (qreal z) |
void | shear (qreal sh, qreal sv) |
void | show () |
void | stackBefore (const QGraphicsItem *sibling) |
QGraphicsObject * | toGraphicsObject () |
const QGraphicsObject * | toGraphicsObject () const |
QString | toolTip () const |
QGraphicsItem * | topLevelItem () const |
QGraphicsWidget * | topLevelWidget () const |
QTransform | transform () const |
QList< QGraphicsTransform * > | transformations () const |
QPointF | transformOriginPoint () const |
void | translate (qreal dx, qreal dy) |
void | ungrabKeyboard () |
void | ungrabMouse () |
void | unsetCursor () |
void | update (qreal x, qreal y, qreal width, qreal height) |
void | update (const QRectF &rect) |
QGraphicsWidget * | window () const |
qreal | x () const |
qreal | y () const |
qreal | zValue () const |
Public Member Functions inherited from QGraphicsLayoutItem | |
QGraphicsLayoutItem (QGraphicsLayoutItem *parent, bool isLayout) | |
virtual | ~QGraphicsLayoutItem () |
QRectF | contentsRect () const |
QSizeF | effectiveSizeHint (Qt::SizeHint which, const QSizeF &constraint) const |
QRectF | geometry () const |
QGraphicsItem * | graphicsItem () const |
bool | isLayout () const |
qreal | maximumHeight () const |
QSizeF | maximumSize () const |
qreal | maximumWidth () const |
qreal | minimumHeight () const |
QSizeF | minimumSize () const |
qreal | minimumWidth () const |
bool | ownedByLayout () const |
QGraphicsLayoutItem * | parentLayoutItem () const |
qreal | preferredHeight () const |
QSizeF | preferredSize () const |
qreal | preferredWidth () const |
void | setMaximumHeight (qreal height) |
void | setMaximumSize (const QSizeF &size) |
void | setMaximumSize (qreal w, qreal h) |
void | setMaximumWidth (qreal width) |
void | setMinimumHeight (qreal height) |
void | setMinimumSize (const QSizeF &size) |
void | setMinimumSize (qreal w, qreal h) |
void | setMinimumWidth (qreal width) |
void | setParentLayoutItem (QGraphicsLayoutItem *parent) |
void | setPreferredHeight (qreal height) |
void | setPreferredSize (const QSizeF &size) |
void | setPreferredSize (qreal w, qreal h) |
void | setPreferredWidth (qreal width) |
void | setSizePolicy (const QSizePolicy &policy) |
void | setSizePolicy (QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType) |
QSizePolicy | sizePolicy () const |
Static Public Member Functions | |
static KPluginInfo::List | listContainments (const QString &category=QString(), const QString &parentApp=QString()) |
static KPluginInfo::List | listContainmentsForMimetype (const QString &mimetype) |
static KPluginInfo::List | listContainmentsOfType (const QString &type, const QString &category=QString(), const QString &parentApp=QString()) |
static QStringList | listContainmentTypes () |
Static Public Member Functions inherited from Plasma::Applet | |
static QString | category (const KPluginInfo &applet) |
static QString | category (const QString &appletName) |
static KPluginInfo::List | listAppletInfo (const QString &category=QString(), const QString &parentApp=QString()) |
static KPluginInfo::List | listAppletInfoForMimetype (const QString &mimetype) |
static KPluginInfo::List | listAppletInfoForUrl (const QUrl &url) |
static QStringList | listCategories (const QString &parentApp=QString(), bool visibleOnly=true) |
static Applet * | load (const QString &name, uint appletId=0, const QVariantList &args=QVariantList()) |
static Applet * | load (const KPluginInfo &info, uint appletId=0, const QVariantList &args=QVariantList()) |
static Applet * | loadPlasmoid (const QString &path, uint appletId=0, const QVariantList &args=QVariantList()) |
static PackageStructure::Ptr | packageStructure () |
Static Public Member Functions inherited from QGraphicsWidget | |
void | setTabOrder (QGraphicsWidget *first, QGraphicsWidget *second) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
Public Attributes inherited from QGraphicsItem | |
typedef | GraphicsItemFlags |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from Plasma::Applet | |
BackgroundHints | backgroundHints |
bool | busy |
QString | category |
bool | configurationRequired |
QRectF | geometry |
bool | hasConfigurationInterface |
bool | hasFailedToLaunch |
uint | id |
ImmutabilityType | immutability |
bool | isBusy |
QString | name |
QString | pluginName |
bool | shouldConserveResources |
bool | userConfiguring |
Properties inherited from QGraphicsWidget | |
autoFillBackground | |
focusPolicy | |
font | |
geometry | |
layout | |
layoutDirection | |
maximumSize | |
minimumSize | |
palette | |
preferredSize | |
size | |
sizePolicy | |
windowFlags | |
windowTitle | |
Properties inherited from QGraphicsObject | |
effect | |
enabled | |
opacity | |
parent | |
pos | |
rotation | |
scale | |
transformOriginPoint | |
visible | |
x | |
y | |
z | |
Properties inherited from QObject | |
objectName | |
Detailed Description
The base class for plugins that provide backgrounds and applet grouping containers.
Containment objects provide the means to group applets into functional sets. They also provide the following:
creation of focussing 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 actually just a Plasma::Applet, all the techniques used for writing the visual presentation of Applets is applicable to Containtments. Containments are differentiated from Applets by being marked with the ServiceType of Plasma/Containment. Plugins registered with both the Applet and the Containment ServiceTypes can be loaded for us in either situation.
See techbase.kde.org for a tutorial on writing Containments using this class.
Definition at line 72 of file containment.h.
Member Enumeration Documentation
Definition at line 99 of file containment.h.
Constructor & Destructor Documentation
|
explicit |
- Parameters
-
parent the QGraphicsItem this applet is parented to serviceId the name of the .desktop file containing the information about the widget containmentId a unique id used to differentiate between multiple instances of the same Applet type
Definition at line 110 of file containment.cpp.
Plasma::Containment::Containment | ( | QObject * | parent, |
const QVariantList & | args | ||
) |
This constructor is to be used with the plugin loading systems found in KPluginInfo and KService.
The argument list is expected to have two elements: the KService service ID for the desktop entry and an applet ID which must be a base 10 number.
- Parameters
-
parent a QObject parent; you probably want to pass in 0 args a list of strings containing two entries: the service id and the applet id
Definition at line 123 of file containment.cpp.
Plasma::Containment::~Containment | ( | ) |
Definition at line 143 of file containment.cpp.
Member Function Documentation
QString Plasma::Containment::activity | ( | ) | const |
- Returns
- the current activity name associated with this containment
Definition at line 1973 of file containment.cpp.
Applet * Plasma::Containment::addApplet | ( | const QString & | name, |
const QVariantList & | args = QVariantList() , |
||
const QRectF & | geometry = QRectF(-1, -1, -1, -1) |
||
) |
Adds an applet to this Containment.
- Parameters
-
name the plugin name for the applet, as given by KPluginInfo::pluginName() args argument list to pass to the plasmoid geometry where to place the applet, or to auto-place it if an invalid is provided
- Returns
- a pointer to the applet on success, or 0 on failure
Definition at line 851 of file containment.cpp.
void Plasma::Containment::addApplet | ( | Applet * | applet, |
const QPointF & | pos = QPointF(-1, -1) , |
||
bool | dontInit = true |
||
) |
Add an existing applet to this Containment.
If dontInit is true, the pending constraints are not flushed either. So it is your responsibility to call both init() and flushPendingConstraints() on the applet.
- Parameters
-
applet the applet that should be added pos the containment-relative position dontInit if true, init() will not be called on the applet
Definition at line 857 of file containment.cpp.
|
virtual |
associate actions with this widget, including ones added after this call.
needed to make keyboard shortcuts work.
Reimplemented from Plasma::Applet.
Definition at line 1768 of file containment.cpp.
|
signal |
Emitted when the containment wants a new containment to be created.
Usually only used for desktop containments.
|
slot |
Tells the corona to create a new desktop containment.
Definition at line 837 of file containment.cpp.
void Plasma::Containment::addToolBoxAction | ( | QAction * | action | ) |
Add an action to the toolbox.
Definition at line 1723 of file containment.cpp.
|
signal |
This signal is emitted when a new applet is created by the containment.
|
signal |
This signal is emitted when an applet is destroyed.
Applet::List Plasma::Containment::applets | ( | ) | const |
- Returns
- the applets currently in this Containment
Definition at line 950 of file containment.cpp.
void Plasma::Containment::clearApplets | ( | ) |
Removes all applets from this Containment.
Definition at line 842 of file containment.cpp.
void Plasma::Containment::closeToolBox | ( | ) |
Closes Containment's toolbox.
Definition at line 1760 of file containment.cpp.
|
slot |
Called when applet configuration values have changed.
- Reimplemented from superclass.
- See also
- Applet::configChanged()
Definition at line 2063 of file containment.cpp.
|
signal |
Emitted when the user wants to configure/change containment.
- Returns
- the plugin name for the given trigger
- Since
- 4.4
Definition at line 1932 of file containment.cpp.
KConfigGroup Plasma::Containment::containmentActionsConfig | ( | ) |
- Returns
- the config group that containmentactions plugins go in
- Since
- 4.6
Definition at line 2433 of file containment.cpp.
QStringList Plasma::Containment::containmentActionsTriggers | ( | ) |
- Returns
- a list of all triggers that have a containmentactions plugin associated
- Since
- 4.4
Definition at line 1927 of file containment.cpp.
Containment::Type Plasma::Containment::containmentType | ( | ) | const |
Returns the type of containment.
Definition at line 501 of file containment.cpp.
Context * Plasma::Containment::context | ( | ) | const |
|
signal |
The context associated to this containment has changed.
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 620 of file containment.cpp.
Corona * Plasma::Containment::corona | ( | ) | const |
Returns the Corona (if any) that this Containment is hosted by.
Definition at line 525 of file containment.cpp.
int Plasma::Containment::desktop | ( | ) | const |
- Returns
- the viewport (e.g. virtual desktop) this Containment is associated with.
Definition at line 1072 of file containment.cpp.
|
slot |
Destroys this containment and all its applets (after a confirmation dialog); it will be removed nicely and deleted.
Its configuration will also be deleted.
Definition at line 2053 of file containment.cpp.
|
slot |
Destroys this containment and all its applets (after a confirmation dialog); it will be removed nicely and deleted.
Its configuration will also be deleted.
- Parameters
-
confirm whether or not confirmation from the user should be requested
Definition at line 2103 of file containment.cpp.
|
protectedvirtual |
- Reimplemented from superclass.
- See also
- QGraphicsItem::dragEnterEvent()
Reimplemented from QGraphicsItem.
Definition at line 1148 of file containment.cpp.
|
protectedvirtual |
- Reimplemented from superclass.
- See also
- QGraphicsItem::dragLeaveEvent()
Reimplemented from QGraphicsItem.
Definition at line 1195 of file containment.cpp.
|
protectedvirtual |
- Reimplemented from superclass.
- See also
- QGraphicsItem::dragMoveEvent()
Reimplemented from QGraphicsItem.
Definition at line 1215 of file containment.cpp.
bool Plasma::Containment::drawWallpaper | ( | ) |
Return whether wallpaper is painted or not.
Definition at line 1810 of file containment.cpp.
|
protectedvirtual |
- Reimplemented from superclass.
- See also
- QGraphicsItem::dropEvent()
Reimplemented from QGraphicsItem.
Definition at line 1228 of file containment.cpp.
void Plasma::Containment::enableAction | ( | const QString & | name, |
bool | enable | ||
) |
convenience function - enables or disables an action by name
- Parameters
-
name the name of the action in our collection enable true to enable, false to disable
Definition at line 1714 of file containment.cpp.
|
slot |
switch keyboard focus to the next of our applets
Definition at line 2027 of file containment.cpp.
|
slot |
switch keyboard focus to the previous one of our applets
Definition at line 2040 of file containment.cpp.
|
virtual |
Reimplemented from Applet.
Reimplemented from Plasma::Applet.
Definition at line 151 of file containment.cpp.
bool Plasma::Containment::isToolBoxOpen | ( | ) | const |
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Reimplemented from Plasma::Applet.
Definition at line 1691 of file containment.cpp.
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 1644 of file containment.cpp.
int Plasma::Containment::lastDesktop | ( | ) | const |
- Returns
- the viewport (e.g. virtual desktop) this Containment was associated with last time it had a screen
- Since
- 4.5
Definition at line 1077 of file containment.cpp.
int Plasma::Containment::lastScreen | ( | ) | const |
- Returns
- the last screen number this containment had only returns -1 if it's never ever been on a screen
- Since
- 4.5
Definition at line 1067 of file containment.cpp.
|
static |
Returns a list of all known containments.
- Parameters
-
category Only containments matching this category will be returned. Useful in conjunction with knownCategories. If "Miscellaneous" is passed in, then applets without a Categories= entry are also returned. If an empty string is passed in, all applets are returned. parentApp the application to filter applets on. Uses the X-KDE-ParentApp entry (if any) in the plugin info. The default value of QString() will result in a list containing only applets not specifically registered to an application.
- Returns
- list of applets
Definition at line 1082 of file containment.cpp.
|
static |
Returns a list of all known applets associated with a certain mimetype.
- Returns
- list of applets
Definition at line 1125 of file containment.cpp.
|
static |
Returns a list of all known Containments that match the parameters.
- Parameters
-
type Only Containments with this string in X-Plasma-ContainmentCategories in their .desktop files will be returned. Common values are panel and desktop category Only applets matchin this category will be returned. Useful in conjunction with knownCategories. If "Miscellaneous" is passed in, then applets without a Categories= entry are also returned. If an empty string is passed in, all applets are returned. parentApp the application to filter applets on. Uses the X-KDE-ParentApp entry (if any) in the plugin info. The default value of QString() will result in a list containing only applets not specifically registered to an application.
- Returns
- list of applets
Definition at line 1089 of file containment.cpp.
|
static |
- Returns
- a list of all known types of Containments on this system
Definition at line 1133 of file containment.cpp.
|
protectedvirtual |
manage the mouse movement to drag the applet around
Reimplemented from Plasma::Applet.
Definition at line 530 of file containment.cpp.
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 546 of file containment.cpp.
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 578 of file containment.cpp.
void Plasma::Containment::openToolBox | ( | ) |
Open the Containment's toolbox.
Definition at line 1752 of file containment.cpp.
|
virtual |
un-associate actions from this widget, including ones added after this call.
needed to make keyboard shortcuts work.
Reimplemented from Plasma::Applet.
Definition at line 1782 of file containment.cpp.
void Plasma::Containment::removeToolBoxAction | ( | QAction * | action | ) |
Remove an action from the toolbox.
Definition at line 1731 of file containment.cpp.
|
protectedvirtual |
- Reimplemented from superclass.
- See also
- QGraphicsItem::resizeEvent()
Reimplemented from Plasma::Applet.
Definition at line 1627 of file containment.cpp.
|
virtual |
- Reimplemented from superclass.
- See also
- Applet::restore(KConfigGroup &)
Reimplemented from Plasma::Applet.
Definition at line 293 of file containment.cpp.
|
protectedvirtual |
Called when the contents of the containment should be loaded.
By default this loads all previously saved Applets
- Parameters
-
group the KConfigGroup to save settings under
Definition at line 473 of file containment.cpp.
|
virtual |
- Reimplemented from superclass.
- See also
- Applet::save(KConfigGroup &)
Reimplemented from Plasma::Applet.
Definition at line 402 of file containment.cpp.
|
protectedvirtual |
Called when the contents of the containment should be saved.
By default this saves all loaded Applets
- Parameters
-
group the KConfigGroup to save settings under
Definition at line 447 of file containment.cpp.
|
protectedvirtual |
scene event filter; used to manage applet dragging
Reimplemented from Plasma::Applet.
Definition at line 1686 of file containment.cpp.
int Plasma::Containment::screen | ( | ) | const |
- Returns
- the screen number this containment is serving as the desktop for or -1 if none
Definition at line 1062 of file containment.cpp.
|
signal |
This signal indicates that a containment has been newly associated (or dissociated) with a physical screen.
- Parameters
-
wasScreen the screen it was associated with isScreen the screen it is now associated with containment the containment switching screens
void Plasma::Containment::setActivity | ( | const QString & | activity | ) |
Sets the current activity by name.
- Parameters
-
activity the name of the activity
Definition at line 1938 of file containment.cpp.
void Plasma::Containment::setContainmentActions | ( | const QString & | trigger, |
const QString & | pluginName | ||
) |
Sets a containmentactions plugin.
- Parameters
-
trigger the mouse button (and optional modifier) to associate the plugin with pluginName the name of the plugin to attempt to load. blank = set no plugin.
- Since
- 4.4
Definition at line 1882 of file containment.cpp.
|
protected |
Sets the type of this containment.
Definition at line 506 of file containment.cpp.
|
protected |
Sets whether wallpaper is painted or not.
Definition at line 1796 of file containment.cpp.
|
slot |
Sets the form factor for this Containment.
This may cause changes in both the arrangement of Applets as well as the display choices of individual Applets.
Definition at line 776 of file containment.cpp.
|
slot |
Informs the Corona as to what position it is in.
This is informational only, as the Corona doesn't change its actual location. This is, however, passed on to Applets that may be managed by this Corona.
- Parameters
-
location the new location of this Corona
Definition at line 800 of file containment.cpp.
void Plasma::Containment::setScreen | ( | int | screen, |
int | desktop = -1 |
||
) |
Sets the physical screen this Containment is associated with.
- Parameters
-
screen the screen number this containment is the desktop for, or -1 if it is not serving as the desktop for any screen desktop the virtual desktop to also associate this this screen with
Definition at line 955 of file containment.cpp.
|
protected |
Sets a custom ToolBox if there was an old one it will be deleted and the new one won't have any actions in it.
- Parameters
-
item the new toolbox item
- Since
- 4.4
Definition at line 1614 of file containment.cpp.
void Plasma::Containment::setToolBoxOpen | ( | bool | open | ) |
Sets the open or closed state of the Containment's toolbox.
- Parameters
-
open true to open the ToolBox, false to close it
Definition at line 1738 of file containment.cpp.
void Plasma::Containment::setWallpaper | ( | const QString & | pluginName, |
const QString & | mode = QString() |
||
) |
Sets wallpaper plugin.
- Parameters
-
pluginName the name of the wallpaper to attempt to load mode optional mode or the wallpaper plugin (e.g. "Slideshow"). These values are pugin specific and enumerated in the plugin's .desktop file.
Definition at line 1815 of file containment.cpp.
|
signal |
Emitted when the containment requests an add widgets dialog is shown.
Usually only used for desktop containments.
- Parameters
-
pos where in the containment this request was made from, or an invalid position (QPointF()) is not location specific
|
slot |
- Reimplemented from superclass.
Definition at line 2058 of file containment.cpp.
void Plasma::Containment::showContextMenu | ( | const QPointF & | containmentPos, |
const QPoint & | screenPos | ||
) |
Shows the context menu for the containment directly, bypassing Applets altogether.
Definition at line 608 of file containment.cpp.
|
virtual |
Shows a visual clue for drag and drop The default implementation does nothing, reimplement in containments that need it.
- Parameters
-
pos point where to show the drop target; if an invalid point is passed in the drop zone should not be shown
Definition at line 602 of file containment.cpp.
|
protected |
|
protected |
- Returns
- the toolbox associated with this containment, or a null pointer if none
Definition at line 1608 of file containment.cpp.
|
signal |
Emitted when the user clicks on the toolbox.
|
signal |
Emitted when the toolbox is hidden or shown.
- Since
- 4.3
Plasma::Wallpaper * Plasma::Containment::wallpaper | ( | ) | const |
Return wallpaper plugin.
Definition at line 1877 of file containment.cpp.
|
protectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 1656 of file containment.cpp.
|
signal |
Emitted when the containment requests zooming in or out one step.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.