ContainmentItem

Search for usage in LXR

#include <containmentitem.h>

Inheritance diagram for ContainmentItem:

Properties

bool loading
 
WallpaperItemwallpaper
 
- Properties inherited from PlasmoidItem
QRect availableScreenRect
 
QVariantList availableScreenRegion
 
bool hideOnWindowDeactivate
 
int screen
 
QRect screenGeometry
 
QQuickItemtoolTipItem
 
QString toolTipMainText
 
QString toolTipSubText
 
int toolTipTextFormat
 

Signals

void actionsChanged ()
 
void appletsChanged ()
 
void drawWallpaperChanged ()
 
void editModeChanged ()
 
void isLoadingChanged ()
 
void wallpaperItemChanged ()
 
- Signals inherited from PlasmoidItem
void availableScreenRectChanged ()
 
void availableScreenRegionChanged ()
 
void contextualActionsAboutToShow ()
 
void contextualActionsChanged ()
 
void externalData (const QString &mimetype, const QVariant &data)
 
void hideOnWindowDeactivateChanged ()
 
void screenChanged ()
 
void screenGeometryChanged ()
 
void toolTipItemChanged ()
 
void toolTipMainTextChanged ()
 
void toolTipSubTextChanged ()
 
void toolTipTextFormatChanged ()
 

Public Member Functions

 ContainmentItem (QQuickItem *parent=nullptr)
 
Q_INVOKABLE QPointF adjustToAvailableScreenRegion (int x, int y, int w, int h) const
 
void classBegin () override
 
Plasma::Containmentcontainment () const
 
Q_INVOKABLE QObjectcontainmentItemAt (int x, int y)
 
Q_INVOKABLE AppletQuickItem * itemFor (Plasma::Applet *applet) const
 
Q_INVOKABLE QPointF mapFromApplet (Plasma::Applet *applet, int x, int y)
 
Q_INVOKABLE QPointF mapToApplet (Plasma::Applet *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)
 
WallpaperItemwallpaperItem () const
 
- Public Member Functions inherited from PlasmoidItem
 PlasmoidItem (QQuickItem *parent=nullptr)
 
QRect availableScreenRect () const
 
QVariantList availableScreenRegion () const
 
bool hideOnWindowDeactivate () const
 
QString pluginName () const
 
Q_INVOKABLE void prepareContextualActions ()
 
int screen () const
 
QRect screenGeometry () const
 
void setHideOnWindowDeactivate (bool hide)
 
void setToolTipItem (QQuickItem *toolTipItem)
 
void setToolTipMainText (const QString &text)
 
void setToolTipSubText (const QString &text)
 
void setToolTipTextFormat (int format)
 
QQuickItemtoolTipItem () const
 
QString toolTipMainText () const
 
QString toolTipSubText () const
 
int toolTipTextFormat () const
 

Protected Member Functions

void addAppletActions (QMenu *desktopMenu, Plasma::Applet *applet, QEvent *event)
 
void addContainmentActions (QMenu *desktopMenu, QEvent *event)
 
void init () override
 
bool isLoading () const
 
void itemChange (ItemChange change, const ItemChangeData &value) override
 
void keyPressEvent (QKeyEvent *event) override
 
void loadWallpaper ()
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
void wheelEvent (QWheelEvent *event) override
 
- Protected Member Functions inherited from PlasmoidItem
bool event (QEvent *event) override
 
bool eventFilter (QObject *watched, QEvent *event) override
 
void init () override
 

Detailed Description

This class is exposed to containments QML as the attached property Plasmoid.

Import Statement

import org.kde.plasma.plasmoid
Version
2.0

Definition at line 35 of file containmentitem.h.

Property Documentation

◆ loading

bool ContainmentItem::loading
read

True if the UI is still loading, for instance a desktop which doesn't have its wallpaper yet.

Definition at line 44 of file containmentitem.h.

◆ wallpaper

WallpaperItem * ContainmentItem::wallpaper
read

Definition at line 39 of file containmentitem.h.

Constructor & Destructor Documentation

◆ ContainmentItem()

ContainmentItem::ContainmentItem ( QQuickItem * parent = nullptr)

Definition at line 46 of file containmentitem.cpp.

Member Function Documentation

◆ addAppletActions()

void ContainmentItem::addAppletActions ( QMenu * desktopMenu,
Plasma::Applet * applet,
QEvent * event )
protected

Definition at line 973 of file containmentitem.cpp.

◆ addContainmentActions()

void ContainmentItem::addContainmentActions ( QMenu * desktopMenu,
QEvent * event )
protected

Definition at line 1018 of file containmentitem.cpp.

◆ adjustToAvailableScreenRegion()

QPointF ContainmentItem::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 219 of file containmentitem.cpp.

◆ classBegin()

void ContainmentItem::classBegin ( )
overridevirtual

Reimplemented from QQuickItem.

Definition at line 54 of file containmentitem.cpp.

◆ containment()

Plasma::Containment * ContainmentItem::containment ( ) const
inline

Definition at line 52 of file containmentitem.h.

◆ containmentItemAt()

QObject * ContainmentItem::containmentItemAt ( int x,
int y )

Search for a containment at those coordinates.

the coordinates are passed as local coordinates of this containment

Definition at line 165 of file containmentitem.cpp.

◆ init()

void ContainmentItem::init ( )
overrideprotected

Definition at line 69 of file containmentitem.cpp.

◆ isLoading()

bool ContainmentItem::isLoading ( ) const
protected

Definition at line 1062 of file containmentitem.cpp.

◆ itemChange()

void ContainmentItem::itemChange ( ItemChange change,
const ItemChangeData & value )
overrideprotectedvirtual

Reimplemented from QQuickItem.

Definition at line 1067 of file containmentitem.cpp.

◆ itemFor()

PlasmaQuick::AppletQuickItem * ContainmentItem::itemFor ( Plasma::Applet * applet) const

Returns the corresponding PlasmoidItem of one of its applets.

Definition at line 135 of file containmentitem.cpp.

◆ keyPressEvent()

void ContainmentItem::keyPressEvent ( QKeyEvent * event)
overrideprotectedvirtual

Reimplemented from QQuickItem.

Definition at line 953 of file containmentitem.cpp.

◆ loadWallpaper()

void ContainmentItem::loadWallpaper ( )
protected

Definition at line 727 of file containmentitem.cpp.

◆ mapFromApplet()

QPointF ContainmentItem::mapFromApplet ( Plasma::Applet * applet,
int x,
int y )

Map coordinates from relative to the given applet to relative to this containment.

Definition at line 189 of file containmentitem.cpp.

◆ mapToApplet()

QPointF ContainmentItem::mapToApplet ( Plasma::Applet * applet,
int x,
int y )

Map coordinates from relative to this containment to relative to the given applet.

Definition at line 203 of file containmentitem.cpp.

◆ mousePressEvent()

void ContainmentItem::mousePressEvent ( QMouseEvent * event)
overrideprotectedvirtual

Reimplemented from QQuickItem.

Definition at line 784 of file containmentitem.cpp.

◆ mouseReleaseEvent()

void ContainmentItem::mouseReleaseEvent ( QMouseEvent * event)
overrideprotectedvirtual

Reimplemented from QQuickItem.

Definition at line 779 of file containmentitem.cpp.

◆ openContextMenu()

void ContainmentItem::openContextMenu ( const QPointF & globalPos)

Opens the context menu of the Corona.

Parameters
globalPosmenu position in the global coordinate system
Since
5.102

Definition at line 331 of file containmentitem.cpp.

◆ processMimeData() [1/2]

void ContainmentItem::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 351 of file containmentitem.cpp.

◆ processMimeData() [2/2]

void ContainmentItem::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 341 of file containmentitem.cpp.

◆ wallpaperItem()

WallpaperItem * ContainmentItem::wallpaperItem ( ) const
inline

Definition at line 57 of file containmentitem.h.

◆ wheelEvent()

void ContainmentItem::wheelEvent ( QWheelEvent * event)
overrideprotectedvirtual

Reimplemented from QQuickItem.

Definition at line 925 of file containmentitem.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.