ContainmentInterface
#include <containmentinterface.h>

Signals | |
void | actionsChanged () |
void | activityChanged () |
void | activityNameChanged () |
void | appletAdded (QObject *applet, int x, int y) |
void | appletRemoved (QObject *applet) |
void | appletsChanged () |
void | containmentTypeChanged () |
void | drawWallpaperChanged () |
void | editModeChanged () |
void | wallpaperInterfaceChanged () |
![]() | |
void | activated () |
void | associatedApplicationChanged () |
void | associatedApplicationUrlsChanged () |
void | availableScreenRectChanged () |
void | availableScreenRegionChanged () |
void | backgroundHintsChanged () |
void | busyChanged () |
void | configNeedsSaving () |
void | configurationRequiredChanged () |
void | configurationRequiredReasonChanged () |
void | constraintHintsChanged () |
void | containmentDisplayHintsChanged () |
void | contextChanged () |
void | contextualActionsAboutToShow () |
void | contextualActionsChanged () |
void | editModeChanged () |
void | effectiveBackgroundHintsChanged () |
void | externalData (const QString &mimetype, const QVariant &data) |
void | formFactorChanged () |
void | globalShortcutChanged () |
void | hideOnWindowDeactivateChanged () |
void | iconChanged () |
void | immutabilityChanged () |
void | isLoadingChanged () |
void | locationChanged () |
void | screenChanged () |
void | screenGeometryChanged () |
void | statusChanged () |
void | titleChanged () |
void | toolTipItemChanged () |
void | toolTipMainTextChanged () |
void | toolTipSubTextChanged () |
void | toolTipTextFormatChanged () |
void | userBackgroundHintsChanged () |
void | userConfiguringChanged () |
Public Member Functions | |
ContainmentInterface (DeclarativeAppletScript *parent, const QVariantList &args=QVariantList()) | |
QList< QObject * > | actions () const |
QString | activity () const |
QString | activityName () const |
Q_INVOKABLE void | addApplet (AppletInterface *applet, int x, int y) |
Q_INVOKABLE QPointF | adjustToAvailableScreenRegion (int x, int y, int w, int h) const |
QList< QObject * > | applets () |
Plasma::Containment * | containment () const |
Q_INVOKABLE QObject * | containmentAt (int x, int y) |
Plasma::Types::ContainmentType | containmentType () const |
Q_INVOKABLE QAction * | globalAction (QString name) const |
bool | isEditMode () const |
Q_INVOKABLE QPointF | mapFromApplet (AppletInterface *applet, int x, int y) |
Q_INVOKABLE QPointF | mapToApplet (AppletInterface *applet, int x, int y) |
Q_INVOKABLE void | openContextMenu (const QPointF &globalPos) |
Q_INVOKABLE void | processMimeData (QMimeData *data, int x, int y, KIO::DropJob *dropJob=nullptr) |
Q_INVOKABLE void | processMimeData (QObject *data, int x, int y, KIO::DropJob *dropJob=nullptr) |
void | setContainmentDisplayHints (Plasma::Types::ContainmentDisplayHints hints) |
void | setContainmentType (Plasma::Types::ContainmentType type) |
void | setEditMode (bool edit) |
WallpaperInterface * | wallpaperInterface () const |
![]() | |
AppletInterface (DeclarativeAppletScript *script, const QVariantList &args=QVariantList(), QQuickItem *parent=nullptr) | |
Q_INVOKABLE QAction * | action (QString name) const |
int | apiVersion () const |
DeclarativeAppletScript * | appletScript () const |
QString | associatedApplication () const |
QList< QUrl > | associatedApplicationUrls () const |
QRect | availableScreenRect () const |
QVariantList | availableScreenRegion () const |
Plasma::Types::BackgroundHints | backgroundHints () const |
Q_INVOKABLE void | clearActions () |
QObject * | configuration () const |
bool | configurationRequired () const |
QString | configurationRequiredReason () const |
Plasma::Types::ConstraintHints | constraintHints () const |
Plasma::Types::ContainmentDisplayHints | containmentDisplayHints () const |
QList< QAction * > | contextualActions () const |
QList< QObject * > | contextualActionsObjects () const |
QString | currentActivity () const |
Q_INVOKABLE QStringList | downloadedFiles () const |
Q_INVOKABLE QString | downloadPath () const |
Q_INVOKABLE PLASMA_DEPRECATED QString | downloadPath (const QString &file) |
Plasma::Types::BackgroundHints | effectiveBackgroundHints () const |
void | executeAction (const QString &name) |
Q_INVOKABLE QString | file (const QString &fileName) |
Q_INVOKABLE QString | file (const QString &fileType, const QString &filePath) |
Plasma::Types::FormFactor | formFactor () const |
QKeySequence | globalShortcut () const |
bool | hideOnWindowDeactivate () const |
QString | icon () const |
uint | id () const |
Plasma::Types::ImmutabilityType | immutability () const |
bool | immutable () const |
bool | isBusy () const |
bool | isEditMode () const |
Plasma::Types::Location | location () const |
KPluginMetaData | metaData () const |
QObject * | nativeInterface () |
QString | pluginName () const |
Q_INVOKABLE void | prepareContextualActions () |
Q_ENUM (ActionPriority) | |
Q_INVOKABLE void | removeAction (const QString &name) |
int | screen () const |
QRect | screenGeometry () const |
AppletInterface * | self () |
Q_INVOKABLE void | setAction (const QString &name, const QString &text, const QString &icon=QString(), const QString &shortcut=QString()) |
Q_INVOKABLE void | setActionGroup (const QString &action, const QString &group) |
Q_INVOKABLE void | setActionSeparator (const QString &name) |
void | setAssociatedApplication (const QString &string) |
void | setAssociatedApplicationUrls (const QList< QUrl > &urls) |
void | setBackgroundHints (Plasma::Types::BackgroundHints hint) |
void | setBusy (bool busy) |
Q_INVOKABLE void | setConfigurationRequired (bool needsConfiguring, const QString &reason=QString()) |
void | setConfigurationRequiredProperty (bool required) |
void | setConfigurationRequiredReason (const QString &reason) |
void | setConstraintHints (Plasma::Types::ConstraintHints constraintHints) |
void | setGlobalShortcut (const QKeySequence &keySequence=QKeySequence()) |
void | setHideOnWindowDeactivate (bool hide) |
void | setIcon (const QString &icon) |
void | setStatus (const Plasma::Types::ItemStatus &status) |
void | setTitle (const QString &title) |
void | setToolTipItem (QQuickItem *toolTipItem) |
void | setToolTipMainText (const QString &text) |
void | setToolTipSubText (const QString &text) |
void | setToolTipTextFormat (int format) |
void | setUserBackgroundHints (Plasma::Types::BackgroundHints hint) |
Plasma::Types::ItemStatus | status () const |
QString | title () const |
QQuickItem * | toolTipItem () const |
QString | toolTipMainText () const |
QString | toolTipSubText () const |
int | toolTipTextFormat () const |
Plasma::Types::BackgroundHints | userBackgroundHints () const |
bool | userConfiguring () const |
Static Public Member Functions | |
static ContainmentInterface * | qmlAttachedProperties (QObject *object) |
![]() | |
static AppletInterface * | qmlAttachedProperties (QObject *object) |
Protected Slots | |
void | appletAddedForward (Plasma::Applet *applet) |
void | appletRemovedForward (Plasma::Applet *applet) |
void | dropJobResult (KJob *job) |
void | loadWallpaper () |
void | mimeTypeRetrieved (KIO::Job *job, const QString &mimetype) |
![]() | |
void | init () override |
Protected Member Functions | |
void | addAppletActions (QMenu *desktopMenu, Plasma::Applet *applet, QEvent *event) |
void | addContainmentActions (QMenu *desktopMenu, QEvent *event) |
void | init () override |
virtual bool | isLoading () const override |
void | itemChange (ItemChange change, const ItemChangeData &value) override |
void | keyPressEvent (QKeyEvent *event) override |
void | mousePressEvent (QMouseEvent *event) override |
void | mouseReleaseEvent (QMouseEvent *event) override |
void | wheelEvent (QWheelEvent *event) override |
![]() | |
bool | event (QEvent *event) override |
bool | eventFilter (QObject *watched, QEvent *event) override |
void | updateUiReadyConstraint () |
Additional Inherited Members | |
![]() | |
enum | ActionPriority { LowPriorityAction = QAction::LowPriority, NormalPriorityAction = QAction::NormalPriority, HighPriorityAction = QAction::HighPriority } |
Detailed Description
This class is exposed to containments QML as the attached property Plasmoid.
Definition at line 39 of file containmentinterface.h.
Property Documentation
◆ actions
Actions associated to this containment or corona.
Definition at line 67 of file containmentinterface.h.
◆ activity
|
read |
Activity name of this containment.
Definition at line 57 of file containmentinterface.h.
◆ activityName
|
read |
Activity name of this containment.
Definition at line 62 of file containmentinterface.h.
◆ applets
List of applets this containment has: the containments KF6: this should be AppletQuickItem *.
Definition at line 47 of file containmentinterface.h.
◆ containmentType
|
readwrite |
Type of this containment TODO: notify.
Definition at line 52 of file containmentinterface.h.
◆ editMode
|
readwrite |
True when the Plasma Shell is in an edit mode that allows to move things around: it's different from userConfiguring as it's about editing plasmoids inside the containment, rather than the containment settings dialog itself.
This is global for the whole Plasma process, all containments will have the same value for editMode
Definition at line 76 of file containmentinterface.h.
Member Function Documentation
◆ addApplet()
void ContainmentInterface::addApplet | ( | AppletInterface * | applet, |
int | x, | ||
int | y | ||
) |
Add an existing applet to this containment.
The coordinates are passed as local coordinates of this containment
Definition at line 230 of file containmentinterface.cpp.
◆ adjustToAvailableScreenRegion()
QPointF ContainmentInterface::adjustToAvailableScreenRegion | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) | const |
Given a geometry, it adjusts it moving it completely inside of the boundaries of availableScreenRegion.
- Returns
- the toLeft point of the rectangle
Definition at line 270 of file containmentinterface.cpp.
◆ appletAdded
|
signal |
Emitted when an applet is added.
- Parameters
-
applet the applet object: it's a qml graphical object and an instance of AppletInterface x coordinate containment relative y coordinate containment relative
◆ appletRemoved
|
signal |
Emitted when an applet is removed.
- Parameters
-
applet the applet object: it's a qml graphical object and an instance of AppletInterface. It's still valid, even if it will be deleted shortly
◆ containmentAt()
QObject * ContainmentInterface::containmentAt | ( | int | x, |
int | y | ||
) |
Search for a containment at those coordinates.
the coordinates are passed as local coordinates of this containment
Definition at line 206 of file containmentinterface.cpp.
◆ globalAction()
- Returns
- a named action from global Corona's actions
Definition at line 381 of file containmentinterface.cpp.
◆ mapFromApplet()
QPointF ContainmentInterface::mapFromApplet | ( | AppletInterface * | applet, |
int | x, | ||
int | y | ||
) |
Map coordinates from relative to the given applet to relative to this containment.
Definition at line 242 of file containmentinterface.cpp.
◆ mapToApplet()
QPointF ContainmentInterface::mapToApplet | ( | AppletInterface * | applet, |
int | x, | ||
int | y | ||
) |
Map coordinates from relative to this containment to relative to the given applet.
Definition at line 255 of file containmentinterface.cpp.
◆ openContextMenu()
void ContainmentInterface::openContextMenu | ( | const QPointF & | globalPos | ) |
Opens the context menu of the Corona.
- Parameters
-
globalPos menu position in the global coordinate system
- Since
- 5.102
Definition at line 386 of file containmentinterface.cpp.
◆ processMimeData() [1/2]
void ContainmentInterface::processMimeData | ( | QMimeData * | data, |
int | x, | ||
int | y, | ||
KIO::DropJob * | dropJob = nullptr |
||
) |
Process the mime data arrived to a particular coordinate, either with a drag and drop or paste with middle mouse button.
Definition at line 416 of file containmentinterface.cpp.
◆ processMimeData() [2/2]
void ContainmentInterface::processMimeData | ( | QObject * | data, |
int | x, | ||
int | y, | ||
KIO::DropJob * | dropJob = nullptr |
||
) |
Process the mime data arrived to a particular coordinate, either with a drag and drop or paste with middle mouse button.
Definition at line 406 of file containmentinterface.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:05:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.