Plasma::Containment

Search for usage in LXR

#include <Plasma/Containment>

Inheritance diagram for Plasma::Containment:

Public Types

enum  Type {
  NoContainment = -1 , Desktop = 0 , Panel , Custom = 127 ,
  CustomPanel = 128 , CustomEmbedded = 129
}
 
- Public Types inherited from Plasma::Applet
enum  Constraint {
  NoConstraint = 0 , FormFactorConstraint = 1 , LocationConstraint = 2 , ScreenConstraint = 4 ,
  ImmutableConstraint = 8 , StartupCompletedConstraint = 16 , UiReadyConstraint = 32 , AllConstraints = FormFactorConstraint | LocationConstraint | ScreenConstraint | ImmutableConstraint
}
 
enum  ConstraintHint { NoHint = 0 , CanFillArea = 1 , MarginAreasSeparator = CanFillArea | 2 }
 
typedef QFlags< ConstraintHintConstraintHints
 
typedef QFlags< ConstraintConstraints
 
- Public Types inherited from QObject
typedef  QObjectList
 

Properties

QString activity
 
QString activityName
 
QList< Plasma::Applet * > applets
 
QRectF availableScreenRect
 
QList< QRectFavailableScreenRegion
 
Plasma::Types::ContainmentDisplayHints containmentDisplayHints
 
Plasma::Containment::Type containmentType
 
Plasma::Coronacorona
 
bool isUiReady
 
int screen
 
QRectF screenGeometry
 
QObjectwallpaperGraphicsObject
 
QString wallpaperPlugin
 
- Properties inherited from Plasma::Applet
Plasma::Types::BackgroundHints backgroundHints
 
bool busy
 
KConfigPropertyMapconfiguration
 
bool configurationRequired
 
Applet::ConstraintHints constraintHints
 
Plasma::Containmentcontainment
 
Plasma::Types::ContainmentDisplayHints containmentDisplayHints
 
QQmlListProperty< QActioncontextualActions
 
Plasma::Types::BackgroundHints effectiveBackgroundHints
 
Plasma::Types::FormFactor formFactor
 
QKeySequence globalShortcut
 
bool hasConfigurationInterface
 
QString icon
 
uint id
 
Plasma::Types::ImmutabilityType immutability
 
bool immutable
 
bool isContainment
 
Plasma::Types::Location location
 
KPluginMetaData metaData
 
QString pluginName
 
Plasma::Types::ItemStatus status
 
QString title
 
Plasma::Types::BackgroundHints userBackgroundHints
 
bool userConfiguring
 
- Properties inherited from QObject
 objectName
 

Signals

void activityChanged (const QString &activity)
 
void activityNameChanged (const QString &name)
 
void appletAboutToBeAdded (Plasma::Applet *applet, const QRectF &geometryHint)
 
void appletAboutToBeRemoved (Plasma::Applet *applet)
 
void appletAdded (Plasma::Applet *applet, const QRectF &geometryHint)
 
void appletAlternativesRequested (Plasma::Applet *applet)
 
void appletCreated (Plasma::Applet *applet, const QRectF &geometryHint)
 
void appletRemoved (Plasma::Applet *applet)
 
void appletsChanged ()
 
void availableRelativeScreenRectChanged (const QRectF &rect)
 
void availableRelativeScreenRegionChanged (const QList< QRectF > &region)
 
void configureRequested (Plasma::Applet *applet)
 
void containmentDisplayHintsChanged (Plasma::Types::ContainmentDisplayHints hints)
 
void containmentTypeChanged ()
 
void formFactorChanged (Plasma::Types::FormFactor formFactor)
 
void locationChanged (Plasma::Types::Location location)
 
void screenChanged (int newScreen)
 
void screenGeometryChanged (const QRectF &rect)
 
void showAddWidgetsInterface (const QPointF &pos)
 
void uiReadyChanged (bool uiReady)
 
void wallpaperGraphicsObjectChanged ()
 
void wallpaperPluginChanged ()
 
- Signals inherited from Plasma::Applet
void activated ()
 
void appletDeleted (Plasma::Applet *applet)
 
void backgroundHintsChanged ()
 
void busyChanged (bool busy)
 
void configNeedsSaving ()
 
void configurationRequiredChanged (bool needsConfig, const QString &reason)
 
void constraintHintsChanged (Plasma::Applet::ConstraintHints constraintHints)
 
void containmentChanged (Plasma::Containment *containment)
 
void containmentDisplayHintsChanged (Plasma::Types::ContainmentDisplayHints hints)
 
void contextualActionsAboutToShow ()
 
void contextualActionsChanged (const QList< QAction * > &actions)
 
void destroyedChanged (bool destroyed)
 
void effectiveBackgroundHintsChanged ()
 
void formFactorChanged (Plasma::Types::FormFactor formFactor)
 
void globalShortcutChanged (const QKeySequence &sequence)
 
void hasConfigurationInterfaceChanged (bool hasConfiguration)
 
void iconChanged (const QString &icon)
 
void immutabilityChanged (Plasma::Types::ImmutabilityType immutable)
 
void internalActionsChanged (const QList< QAction * > &actions)
 
void locationChanged (Plasma::Types::Location location)
 
void secondaryActivated ()
 
void statusChanged (Plasma::Types::ItemStatus status)
 
void titleChanged (const QString &title)
 
void userBackgroundHintsChanged ()
 
void userConfiguringChanged (bool configuring)
 

Public Slots

void reactToScreenChange ()
 
void setContainmentDisplayHints (Plasma::Types::ContainmentDisplayHints hints)
 
void setFormFactor (Plasma::Types::FormFactor formFactor)
 
void setLocation (Plasma::Types::Location location)
 
- Public Slots inherited from Plasma::Applet
virtual void configChanged ()
 
void destroy ()
 
void flushPendingConstraintsEvents ()
 
void setImmutability (const Types::ImmutabilityType immutable)
 
void setLaunchErrorMessage (const QString &reason=QString())
 
void setStatus (const Types::ItemStatus stat)
 

Public Member Functions

 Containment (QObject *parentObject, const KPluginMetaData &data, const QVariantList &args)
 
QString activity () const
 
QString activityName () const
 
Q_INVOKABLE void addApplet (Applet *applet, const QRectF &geometryHint=QRectF())
 
QList< Applet * > applets () const
 
QRectF availableRelativeScreenRect () const
 
QList< QRectFavailableRelativeScreenRegion () const
 
QHash< QString, ContainmentActions * > & containmentActions ()
 
Type containmentType () const
 
Coronacorona () const
 
AppletcreateApplet (const QString &name, const QVariantList &args=QVariantList(), const QRectF &geometryHint=QRectF(-1, -1, 0, 0))
 
void init () override
 
bool isUiReady () const
 
int lastScreen () const
 
void restore (KConfigGroup &group) override
 
void save (KConfigGroup &group) const override
 
int screen () const
 
QRectF screenGeometry () const
 
void setActivity (const QString &activityId)
 
void setContainmentActions (const QString &trigger, const QString &pluginName)
 
void setWallpaperPlugin (const QString &pluginName)
 
QString wallpaperPlugin () const
 
- Public Member Functions inherited from Plasma::Applet
 Applet (QObject *parentObject, const KPluginMetaData &data, const QVariantList &args)
 
Plasma::Types::BackgroundHints backgroundHints () const
 
KConfigGroup config () const
 
KConfigLoaderconfigScheme () const
 
KConfigPropertyMapconfiguration ()
 
bool configurationRequired () const
 
QString configurationRequiredReason () const
 
ConstraintHints constraintHints () const
 
Containmentcontainment () const
 
Types::ContainmentDisplayHints containmentDisplayHints () const
 
virtual QList< QAction * > contextualActions ()
 
bool destroyed () const
 
Plasma::Types::BackgroundHints effectiveBackgroundHints () const
 
bool failedToLaunch () const
 
Types::FormFactor formFactor () const
 
KConfigGroup globalConfig () const
 
QKeySequence globalShortcut () const
 
bool hasConfigurationInterface () const
 
QString icon () const
 
uint id () const
 
Types::ImmutabilityType immutability () const
 
bool immutable () const
 
Q_INVOKABLE QActioninternalAction (const QString &name) const
 
QList< QAction * > internalActions () const
 
bool isBusy () const
 
bool isContainment () const
 
bool isUserConfiguring () const
 
QString launchErrorMessage () const
 
Types::Location location () const
 
KPluginMetaData pluginMetaData () const
 
QString pluginName () const
 
QML_LIST_PROPERTY_ASSIGN_BEHAVIOR_REPLACE QQmlListProperty< QActionqmlContextualActions ()
 
Q_INVOKABLE void removeInternalAction (const QString &name)
 
void setBackgroundHints (Plasma::Types::BackgroundHints hint)
 
void setBusy (bool busy)
 
void setConfigurationRequired (bool needsConfiguring, const QString &reason=QString())
 
void setConstraintHints (ConstraintHints constraintHints)
 
void setGlobalShortcut (const QKeySequence &shortcut=QKeySequence())
 
void setHasConfigurationInterface (bool hasInterface)
 
void setIcon (const QString &icon)
 
Q_INVOKABLE void setInternalAction (const QString &name, QAction *action)
 
void setTitle (const QString &title)
 
void setUserBackgroundHints (Plasma::Types::BackgroundHints hint)
 
void setUserConfiguring (bool configuring)
 
QVariantList startupArguments () const
 
Types::ItemStatus status () const
 
QString title () const
 
QString translationDomain () const
 
void updateConstraints (Constraints constraints=AllConstraints)
 
Plasma::Types::BackgroundHints userBackgroundHints () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Protected Member Functions

virtual void restoreContents (KConfigGroup &group)
 
virtual void saveContents (KConfigGroup &group) const
 
- Protected Member Functions inherited from Plasma::Applet
virtual void constraintsEvent (Constraints constraints)
 
virtual void saveState (KConfigGroup &config) const
 
void timerEvent (QTimerEvent *event) override
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
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)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 

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 focusing 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 46 of file containment.h.

Member Enumeration Documentation

◆ Type

This enumeration describes the type of the Containment.

DesktopContainments represent main containments that will own a screen in a mutually exclusive fashion, while PanelContainments are accessories which can be present multiple per screen.

This value is specified in the "X-Plasma-ContainmentType" JSON-metadata value of containments.

Enumerator
NoContainment 
Desktop 

A desktop containment.

Panel 

A desktop panel.

Custom 

A containment that is neither a desktop nor a panel but something application specific.

CustomPanel 

A customized desktop panel.

"CustomPanel" in metadata

CustomEmbedded 

A customized containment embedded in another applet.

Definition at line 134 of file containment.h.

Property Documentation

◆ activity

QString Plasma::Containment::activity
read

Activity UID of this containment.

Definition at line 69 of file containment.h.

◆ activityName

QString Plasma::Containment::activityName
read

Activity name of this containment.

Definition at line 74 of file containment.h.

◆ applets

QList<Plasma::Applet *> Plasma::Containment::applets
read

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

Definition at line 54 of file containment.h.

◆ availableScreenRect

QRectF Plasma::Containment::availableScreenRect
read

screen area free of panels: the coordinates are relative to the containment, it's independent from the screen position For more precise available geometry use availableScreenRegion()

Definition at line 94 of file containment.h.

◆ availableScreenRegion

QList<QRectF> Plasma::Containment::availableScreenRegion
read

The available region of this screen, panels excluded.

It's a list of rectangles

Definition at line 99 of file containment.h.

◆ containmentDisplayHints

Plasma::Types::ContainmentDisplayHints Plasma::Containment::containmentDisplayHints
readwrite

Definition at line 76 of file containment.h.

◆ containmentType

Plasma::Containment::Type Plasma::Containment::containmentType
read

Type of this containment.

Definition at line 64 of file containment.h.

◆ corona

Plasma::Corona * Plasma::Containment::corona
read

The corona for this contaiment.

Definition at line 59 of file containment.h.

◆ isUiReady

bool Plasma::Containment::isUiReady
read

Definition at line 82 of file containment.h.

◆ screen

int Plasma::Containment::screen
read

The screen number this containment is serving as the desktop for, or -1 if none.

Definition at line 87 of file containment.h.

◆ screenGeometry

QRectF Plasma::Containment::screenGeometry
read

Provides access to the geometry of the applet is in.

Can be useful to figure out what's the absolute position of the applet.

Definition at line 105 of file containment.h.

◆ wallpaperGraphicsObject

QObject * Plasma::Containment::wallpaperGraphicsObject
readwrite

Definition at line 80 of file containment.h.

◆ wallpaperPlugin

QString Plasma::Containment::wallpaperPlugin
readwrite

Definition at line 79 of file containment.h.

Constructor & Destructor Documentation

◆ Containment()

Plasma::Containment::Containment ( QObject * parentObject,
const KPluginMetaData & data,
const QVariantList & args )
explicit

This constructor can be used with the KCoreAddons plugin loading system.

The argument list is expected to have contain the KPackage of the applet, the meta data file path (for compatibility) and an applet ID which must be a base 10 number.

Parameters
parenta QObject parent; you probably want to pass in 0
data,KPluginMetaDataused to create this plugin
argsa list of strings containing the applet id
Since
5.86

Definition at line 43 of file containment.cpp.

◆ ~Containment()

Plasma::Containment::~Containment ( )
override

Definition at line 61 of file containment.cpp.

Member Function Documentation

◆ activity()

QString Plasma::Containment::activity ( ) const
Returns
the current activity id associated with this containment TODO KF6: this should be available to Appelt as well as a property... virtual?

Definition at line 651 of file containment.cpp.

◆ activityChanged

void Plasma::Containment::activityChanged ( const QString & activity)
signal

Emitted when the activity id has changed.

◆ activityName()

QString Plasma::Containment::activityName ( ) const
Returns
Activity name corresponding to the activity UID
See also
activity

Definition at line 656 of file containment.cpp.

◆ activityNameChanged

void Plasma::Containment::activityNameChanged ( const QString & name)
signal

Emitted when the activity name has changed.

◆ addApplet()

void Plasma::Containment::addApplet ( Applet * applet,
const QRectF & geometryHint = QRectF() )

Add an existing applet to this Containment.

Parameters
appletthe applet that should be added
geometryHintan hint to pass to the GUI on the location and size we prefer for the newly created applet; the gui might choose whether to respect or not this hint

Definition at line 362 of file containment.cpp.

◆ appletAboutToBeAdded

void Plasma::Containment::appletAboutToBeAdded ( Plasma::Applet * applet,
const QRectF & geometryHint )
signal

This signal is emitted right before appletAdded, it can be used to do a preliminary setup on the applet before the handlers of appletAdded are executed.

Useful for instance to prepare the GUI for the applet

Parameters
appletthe applet that is about to be added
geometryHintan hint to pass to the GUI on the location and size we prefer for the newly created applet; the gui might choose whether to respect or not this hint

◆ appletAboutToBeRemoved

void Plasma::Containment::appletAboutToBeRemoved ( Plasma::Applet * applet)
signal

This signal is emitted right before appletRemoved, it can be used to do a preliminary setup on the applet before the handlers of appletRemoved are executed.

Useful for instance to prepare or teardown the GUI for the applet

◆ appletAdded

void Plasma::Containment::appletAdded ( Plasma::Applet * applet,
const QRectF & geometryHint )
signal

This signal is emitted when a new applet is added in the containment It may happen in the following situations:

  • The user created the applet
  • The applet was moved in from another containment
  • The applet got restored at startup
    Parameters
    appletthe applet that has been added
    geometryHintan hint to pass to the GUI on the location and size we prefer for the newly created applet; the gui might choose whether to respect or not this hint

◆ appletAlternativesRequested

void Plasma::Containment::appletAlternativesRequested ( Plasma::Applet * applet)
signal

Emitted when the user wants to chose an alternative for this applet or containment.

◆ appletCreated

void Plasma::Containment::appletCreated ( Plasma::Applet * applet,
const QRectF & geometryHint )
signal

This signal is emitted when a new applet is created by the containment.

Compared to appletAdded, this gets emitted only when the user explicitly creates a new applet, either via the widget explorer or the scripting environment.

See also
appletAdded
Since
5.16

◆ appletRemoved

void Plasma::Containment::appletRemoved ( Plasma::Applet * applet)
signal

This signal is emitted when an applet is destroyed.

◆ applets()

QList< Applet * > Plasma::Containment::applets ( ) const
Returns
the applets currently in this Containment

Definition at line 465 of file containment.cpp.

◆ appletsChanged

void Plasma::Containment::appletsChanged ( )
signal

Emitted when the list of applets has changed, either added or removed.

◆ availableRelativeScreenRect()

QRectF Plasma::Containment::availableRelativeScreenRect ( ) const
Returns
The available screen rect (excluding panels) for the screen this containment is associated to, empty rectangle if the containment is not active in a screen

Definition at line 485 of file containment.cpp.

◆ availableRelativeScreenRectChanged

void Plasma::Containment::availableRelativeScreenRectChanged ( const QRectF & rect)
signal

Emitted when the available screen rectangle has changed.

◆ availableRelativeScreenRegion()

QList< QRectF > Plasma::Containment::availableRelativeScreenRegion ( ) const
Returns
The available region of this screen, panels excluded. It's a list of rectangles

Definition at line 513 of file containment.cpp.

◆ availableRelativeScreenRegionChanged

void Plasma::Containment::availableRelativeScreenRegionChanged ( const QList< QRectF > & region)
signal

Emitted when the available screen rectangle has changed.

◆ configureRequested

void Plasma::Containment::configureRequested ( Plasma::Applet * applet)
signal

Emitted when the user wants to configure/change the containment, or an applet inside it.

◆ containmentActions()

QHash< QString, ContainmentActions * > & Plasma::Containment::containmentActions ( )
Returns
All the loaded containment action plugins, indexed by trigger name
Since
5.0

Definition at line 627 of file containment.cpp.

◆ containmentDisplayHintsChanged

void Plasma::Containment::containmentDisplayHintsChanged ( Plasma::Types::ContainmentDisplayHints hints)
signal

Emitted when the containment disaplay hints change.

◆ containmentType()

Plasma::Containment::Type Plasma::Containment::containmentType ( ) const

Returns the type of containment.

Definition at line 284 of file containment.cpp.

◆ containmentTypeChanged

void Plasma::Containment::containmentTypeChanged ( )
signal

emitted when the containment type changed

◆ corona()

Corona * Plasma::Containment::corona ( ) const

Returns the Corona (if any) that this Containment is hosted by.

Definition at line 289 of file containment.cpp.

◆ createApplet()

Applet * Plasma::Containment::createApplet ( const QString & name,
const QVariantList & args = QVariantList(),
const QRectF & geometryHint = QRectF(-1, -1, 0, 0) )

Adds an applet to this Containment.

Parameters
namethe plugin name for the applet, as given by KPluginInfo::pluginName()
argsargument list to pass to the plasmoid
geometryHintan hint to pass to the GUI on the location and size we prefer for the newly created applet; the gui might choose whether to respect or not this hint. The default position is (-1, -1) and the default size is (0, 0).
Returns
a pointer to the applet on success, or 0 on failure

Definition at line 353 of file containment.cpp.

◆ formFactorChanged

void Plasma::Containment::formFactorChanged ( Plasma::Types::FormFactor formFactor)
signal

Emitted when the formFactor has changed.

Since
5.0

◆ init()

void Plasma::Containment::init ( )
overridevirtual

Reimplemented from Applet.

Reimplemented from Plasma::Applet.

Definition at line 68 of file containment.cpp.

◆ isUiReady()

bool Plasma::Containment::isUiReady ( ) const
Returns
true when the ui of this containment is fully loaded, as well the ui of every applet in it

Definition at line 632 of file containment.cpp.

◆ lastScreen()

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 480 of file containment.cpp.

◆ locationChanged

void Plasma::Containment::locationChanged ( Plasma::Types::Location location)
signal

Emitted when the location has changed.

Since
5.0

◆ reactToScreenChange

void Plasma::Containment::reactToScreenChange ( )
slot

Definition at line 664 of file containment.cpp.

◆ restore()

void Plasma::Containment::restore ( KConfigGroup & group)
overridevirtual
Reimplemented from superclass.
See also
Applet::restore(KConfigGroup &)

Reimplemented from Plasma::Applet.

Definition at line 142 of file containment.cpp.

◆ restoreContents()

void Plasma::Containment::restoreContents ( KConfigGroup & group)
protectedvirtual

Called when the contents of the containment should be loaded.

By default this loads all previously saved Applets

Parameters
groupthe KConfigGroup to save settings under

Definition at line 237 of file containment.cpp.

◆ save()

void Plasma::Containment::save ( KConfigGroup & group) const
overridevirtual
Reimplemented from superclass.
See also
Applet::save(KConfigGroup &)

Reimplemented from Plasma::Applet.

Definition at line 203 of file containment.cpp.

◆ saveContents()

void Plasma::Containment::saveContents ( KConfigGroup & group) const
protectedvirtual

Called when the contents of the containment should be saved.

By default this saves all loaded Applets

Parameters
groupthe KConfigGroup to save settings under

Definition at line 228 of file containment.cpp.

◆ screen()

int Plasma::Containment::screen ( ) const
Returns
the screen number this containment is serving as the desktop for or -1 if none TODO KF6 virtual? this shouldbe available to applet as well

Definition at line 470 of file containment.cpp.

◆ screenChanged

void Plasma::Containment::screenChanged ( int newScreen)
signal

This signal indicates that a containment has been associated (or dissociated) with a physical screen.

Parameters
newScreenthe screen it is now associated with

◆ screenGeometry()

QRectF Plasma::Containment::screenGeometry ( ) const
Returns
The geometry of the screen this containment is associated to

Definition at line 540 of file containment.cpp.

◆ screenGeometryChanged

void Plasma::Containment::screenGeometryChanged ( const QRectF & rect)
signal

Emitted when the screen geometry has changed.

◆ setActivity()

void Plasma::Containment::setActivity ( const QString & activityId)

Sets the current activity by id.

Parameters
activitythe id of the activity

Definition at line 637 of file containment.cpp.

◆ setContainmentActions()

void Plasma::Containment::setContainmentActions ( const QString & trigger,
const QString & pluginName )

Sets a containmentactions plugin.

Parameters
triggerthe mouse button (and optional modifier) to associate the plugin with
pluginNamethe name of the plugin to attempt to load. blank = set no plugin.
Since
4.4

Definition at line 588 of file containment.cpp.

◆ setContainmentDisplayHints

void Plasma::Containment::setContainmentDisplayHints ( Plasma::Types::ContainmentDisplayHints hints)
slot

Set Display hints that come from the containment that suggest the applet how to look and behave.

Parameters
hintsthe new hints, as bitwise OR
Since
5.77

Definition at line 323 of file containment.cpp.

◆ setFormFactor

void Plasma::Containment::setFormFactor ( Plasma::Types::FormFactor formFactor)
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 306 of file containment.cpp.

◆ setLocation

void Plasma::Containment::setLocation ( Plasma::Types::Location location)
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
locationthe new location of this Corona

Definition at line 333 of file containment.cpp.

◆ setWallpaperPlugin()

void Plasma::Containment::setWallpaperPlugin ( const QString & pluginName)

Sets wallpaper plugin.

Parameters
pluginNamethe name of the wallpaper to attempt to load

Definition at line 549 of file containment.cpp.

◆ showAddWidgetsInterface

void Plasma::Containment::showAddWidgetsInterface ( const QPointF & pos)
signal

Emitted when the containment requests an add widgets dialog is shown.

Usually only used for desktop containments.

Parameters
poswhere in the containment this request was made from, or an invalid position (QPointF()) is not location specific

◆ uiReadyChanged

void Plasma::Containment::uiReadyChanged ( bool uiReady)
signal

Emitted when the ui has been fully loaded and is fully working.

Parameters
uiReadytrue when the ui of the containment is ready, as well the ui of each applet in it

◆ wallpaperGraphicsObjectChanged

void Plasma::Containment::wallpaperGraphicsObjectChanged ( )
signal

Emitted when the root wallpaper item has changed.

◆ wallpaperPlugin()

QString Plasma::Containment::wallpaperPlugin ( ) const

Return wallpaper plugin.

Definition at line 561 of file containment.cpp.

◆ wallpaperPluginChanged

void Plasma::Containment::wallpaperPluginChanged ( )
signal

Emitted when the wallpaper plugin is changed.


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:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.