Search for usage in LXR

#include <containmentinterface.h>

Inheritance diagram for ContainmentInterface:


QList< QObject * > actions
QString activity
QString activityName
QList< QObject * > applets
Plasma::Types::ContainmentDisplayHints containmentDisplayHints
Plasma::Types::ContainmentType containmentType
bool editMode
WallpaperInterface wallpaper
- Properties inherited from AppletInterface
int apiVersion
QString associatedApplication
QList< QUrlassociatedApplicationUrls
QRect availableScreenRect
QVariantList availableScreenRegion
Plasma::Types::BackgroundHints backgroundHints
bool busy
QObject configuration
bool configurationRequired
QString configurationRequiredReason
Plasma::Types::ConstraintHints constraintHints
Plasma::Types::ContainmentDisplayHints containmentDisplayHints
QList< QObject * > contextualActions
QString currentActivity
bool editMode
Plasma::Types::BackgroundHints effectiveBackgroundHints
Plasma::Types::FormFactor formFactor
QKeySequence globalShortcut
bool hideOnWindowDeactivate
QString icon
uint id
Plasma::Types::ImmutabilityType immutability
bool immutable
bool loading
Plasma::Types::Location location
KPluginMetaData metaData
QObject nativeInterface
QString pluginName
int screen
QRect screenGeometry
AppletInterface self
Plasma::Types::ItemStatus status
QString title
QQuickItem toolTipItem
QString toolTipMainText
QString toolTipSubText
int toolTipTextFormat
Plasma::Types::BackgroundHints userBackgroundHints
bool userConfiguring


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 ()
- Signals inherited from AppletInterface
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::Containmentcontainment () const
Q_INVOKABLE QObjectcontainmentAt (int x, int y)
Plasma::Types::ContainmentType containmentType () const
Q_INVOKABLE QActionglobalAction (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)
WallpaperInterfacewallpaperInterface () const
- Public Member Functions inherited from AppletInterface
 AppletInterface (DeclarativeAppletScript *script, const QVariantList &args=QVariantList(), QQuickItem *parent=nullptr)
Q_INVOKABLE QActionaction (QString name) const
int apiVersion () const
DeclarativeAppletScript * appletScript () const
QString associatedApplication () const
QList< QUrlassociatedApplicationUrls () const
QRect availableScreenRect () const
QVariantList availableScreenRegion () const
Plasma::Types::BackgroundHints backgroundHints () const
Q_INVOKABLE void clearActions ()
QObjectconfiguration () 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
QObjectnativeInterface ()
QString pluginName () const
Q_INVOKABLE void prepareContextualActions ()
 Q_ENUM (ActionPriority)
Q_INVOKABLE void removeAction (const QString &name)
int screen () const
QRect screenGeometry () const
AppletInterfaceself ()
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
QQuickItemtoolTipItem () const
QString toolTipMainText () const
QString toolTipSubText () const
int toolTipTextFormat () const
Plasma::Types::BackgroundHints userBackgroundHints () const
bool userConfiguring () const

Static Public Member Functions

static ContainmentInterfaceqmlAttachedProperties (QObject *object)
- Static Public Member Functions inherited from AppletInterface
static AppletInterfaceqmlAttachedProperties (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)
- Protected Slots inherited from AppletInterface
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
- Protected Member Functions inherited from AppletInterface
bool event (QEvent *event) override
bool eventFilter (QObject *watched, QEvent *event) override
void updateUiReadyConstraint ()

Additional Inherited Members

- Public Types inherited from AppletInterface
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

QList< QObject * > ContainmentInterface::actions

Actions associated to this containment or corona.

Definition at line 67 of file containmentinterface.h.

◆ activity

QString ContainmentInterface::activity

Activity name of this containment.

Definition at line 57 of file containmentinterface.h.

◆ activityName

QString ContainmentInterface::activityName

Activity name of this containment.

Definition at line 62 of file containmentinterface.h.

◆ applets

QList< QObject * > ContainmentInterface::applets

List of applets this containment has: the containments KF6: this should be AppletQuickItem *.

Definition at line 47 of file containmentinterface.h.

◆ containmentType

Plasma::Types::ContainmentType ContainmentInterface::containmentType

Type of this containment TODO: notify.

Definition at line 52 of file containmentinterface.h.

◆ editMode

bool ContainmentInterface::editMode

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.

the toLeft point of the rectangle

Definition at line 270 of file containmentinterface.cpp.

◆ appletAdded

void ContainmentInterface::appletAdded ( QObject applet,
int  x,
int  y 

Emitted when an applet is added.

appletthe applet object: it's a qml graphical object and an instance of AppletInterface
xcoordinate containment relative
ycoordinate containment relative

◆ appletRemoved

void ContainmentInterface::appletRemoved ( QObject applet)

Emitted when an applet is removed.

appletthe 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()

QAction * ContainmentInterface::globalAction ( QString  name) const
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.

globalPosmenu position in the global coordinate system

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:
This file is part of the KDE documentation.
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.