Plasma
Go to the documentation of this file.
22 #ifndef PLASMA_CONTAINMENT_H
23 #define PLASMA_CONTAINMENT_H
25 #include <QtGui/QGraphicsItem>
26 #include <QtGui/QWidget>
27 #include <QtGui/QStyleOptionGraphicsItem>
29 #include <kplugininfo.h>
30 #include <ksharedconfig.h>
31 #include <kgenericfactory.h>
40 class AccessAppletJob;
47 class ContainmentActions;
48 class ContainmentPrivate;
49 class AbstractToolBox;
85 Type = SO_CustomBase + 1
88 Version = QStyleOptionGraphicsItem::Version + 1
100 NoContainmentType = -1,
101 DesktopContainment = 0,
103 CustomContainment = 127,
105 CustomPanelContainment = 128
116 const QString &serviceId = QString(),
117 uint containmentId = 0);
141 Type containmentType()
const;
164 static KPluginInfo::List listContainments(
const QString &category = QString(),
165 const QString &parentApp = QString());
186 static KPluginInfo::List listContainmentsOfType(
const QString &
type,
187 const QString &category = QString(),
188 const QString &parentApp = QString());
193 static QStringList listContainmentTypes();
200 static KPluginInfo::List listContainmentsForMimetype(
const QString &mimetype);
213 Applet *addApplet(
const QString &name,
const QVariantList &args = QVariantList(),
214 const QRectF &geometry = QRectF(-1, -1, -1, -1));
227 void addApplet(
Applet *applet,
const QPointF &pos = QPointF(-1, -1),
bool dontInit =
true);
246 void setScreen(
int screen,
int desktop = -1);
259 int lastScreen()
const;
271 int lastDesktop()
const;
277 void save(KConfigGroup &group)
const;
283 void restore(KConfigGroup &group);
291 void enableAction(
const QString &name,
bool enable);
296 void addToolBoxAction(QAction *action);
301 void removeToolBoxAction(QAction *action);
308 void setToolBoxOpen(
bool open);
314 bool isToolBoxOpen()
const;
330 void addAssociatedWidget(
QWidget *widget);
336 void removeAssociatedWidget(
QWidget *widget);
341 bool drawWallpaper();
351 void setWallpaper(
const QString &pluginName,
const QString &mode = QString());
363 void setActivity(
const QString &activity);
368 QString activity()
const;
380 void showContextMenu(
const QPointF &containmentPos,
const QPoint &screenPos);
390 virtual void showDropZone(
const QPoint pos);
399 void setContainmentActions(
const QString &trigger,
const QString &pluginName);
405 QStringList containmentActionsTriggers();
411 QString containmentActions(
const QString &trigger);
417 KConfigGroup containmentActionsConfig();
502 void addSiblingContainment();
507 void focusNextApplet();
512 void focusPreviousApplet();
528 void destroy(
bool confirm);
534 void showConfigurationInterface();
541 void configChanged();
553 void setDrawWallpaper(
bool drawWallpaper);
561 virtual void saveContents(KConfigGroup &group)
const;
569 virtual void restoreContents(KConfigGroup &group);
571 void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
572 void mousePressEvent(QGraphicsSceneMouseEvent *event);
573 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
574 void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
575 void keyPressEvent(QKeyEvent *event);
576 void wheelEvent(QGraphicsSceneWheelEvent *event);
577 bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
578 QVariant itemChange(GraphicsItemChange change,
const QVariant &value);
584 void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
590 void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
596 void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
602 void dropEvent(QGraphicsSceneDragDropEvent *event);
608 void resizeEvent(QGraphicsSceneResizeEvent *event);
613 #ifndef KDE_NO_DEPRECATED
614 KDE_DEPRECATED
const QGraphicsItem *toolBoxItem()
const;
642 Containment(
const QString &packagePath, uint appletId,
const QVariantList &args);
645 Q_PRIVATE_SLOT(d,
void appletAppearAnimationComplete())
646 Q_PRIVATE_SLOT(d,
void triggerShowAddWidgets())
647 Q_PRIVATE_SLOT(d,
void positionToolBox())
648 Q_PRIVATE_SLOT(d,
void requestConfiguration())
649 Q_PRIVATE_SLOT(d,
void updateToolBoxVisibility())
650 Q_PRIVATE_SLOT(d,
void showDropZoneDelayed())
653 Q_PRIVATE_SLOT(d,
void onContextChanged(
Plasma::
Context *con))
657 Q_PRIVATE_SLOT(d,
void mimeTypeRetrieved(KIO::Job *, const QString &))
658 Q_PRIVATE_SLOT(d,
void dropJobResult(
KJob *))
661 friend class AppletPrivate;
663 friend class CoronaPrivate;
664 friend class ContainmentPrivate;
668 ContainmentPrivate *const d;
673 #endif // multiple inclusion guard
void addSiblingContainment(Plasma::Containment *)
Emitted when the containment wants a new containment to be created.
Namespace for everything in libplasma.
The base Wallpaper class.
@ PanelContainment
A desktop panel.
This class is used for asynchronously accessing an applet published on a remote system.
void appletAdded(Plasma::Applet *applet, const QPointF &pos)
This signal is emitted when a new applet is created by the containment.
void appletRemoved(Plasma::Applet *applet)
This signal is emitted when an applet is destroyed.
The base ContainmentActions class.
void configureRequested(Plasma::Containment *containment)
Emitted when the user wants to configure/change containment.
Provides a restricted interface for scripted applets.
A QGraphicsScene for Plasma::Applets.
void toolBoxToggled()
Emitted when the user clicks on the toolbox.
Location
The Location enumeration describes where on screen an element, such as an Applet or its managing cont...
void toolBoxVisibilityChanged(bool)
Emitted when the toolbox is hidden or shown.
ZoomDirection
The direction of a zoom action.
FormFactor
The FormFactor enumeration describes how a Plasma::Applet should arrange itself.
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)
void screenChanged(int wasScreen, int isScreen, Plasma::Containment *containment)
This signal indicates that a containment has been newly associated (or dissociated) with a physical s...
A QGraphicsView for a single Containment.
Plasma::View * view
The View, if any, that this containment is currently being rendered into.
void showAddWidgetsInterface(const QPointF &pos)
Emitted when the containment requests an add widgets dialog is shown.
void contextChanged(Plasma::Context *context)
The context associated to this containment has changed.
void zoomRequested(Plasma::Containment *containment, Plasma::ZoomDirection direction)
Emitted when the containment requests zooming in or out one step.
The base class for plugins that provide backgrounds and applet grouping containers.
ItemStatus
Status of an applet.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by
doxygen 1.8.20 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.