Plasma::Corona

Search for usage in LXR

Inheritance diagram for Plasma::Corona:

Properties

bool editMode
 
bool isStartupCompleted
 
KPackage::Package kPackage
 
Package package
 
- Properties inherited from QObject
 objectName
 

Signals

void availableScreenRectChanged ()
 
void availableScreenRegionChanged ()
 
void configSynced ()
 
void containmentAdded (Plasma::Containment *containment)
 
void containmentCreated (Plasma::Containment *containment)
 
void editModeChanged (bool edit)
 
void immutabilityChanged (Plasma::Types::ImmutabilityType immutability)
 
void kPackageChanged (const KPackage::Package &package)
 
void packageChanged (const Plasma::Package &package)
 
void screenAdded (int id)
 
void screenGeometryChanged (int id)
 
void screenOwnerChanged (int isScreen)
 
void screenRemoved (int id)
 
void startupCompleted ()
 

Public Slots

void loadLayout (const QString &config=QString())
 
void requestConfigSync ()
 
void requireConfigSync ()
 
void saveLayout (const QString &config=QString()) const
 
void setImmutability (const Types::ImmutabilityType immutable)
 

Public Member Functions

 Corona (QObject *parent=nullptr)
 
KActionCollectionactions () const
 
virtual QRect availableScreenRect (int id) const
 
virtual QRegion availableScreenRegion (int id) const
 
KSharedConfig::Ptr config () const
 
ContainmentcontainmentForScreen (int screen, const QString &activity, const QString &defaultPluginIfNonExistent, const QVariantList &defaultArgs=QVariantList())
 
ContainmentcontainmentForScreen (int screen) const
 
ContainmentcontainmentForScreen (int screen, const QString &defaultPluginIfNonExistent, const QVariantList &defaultArgs=QVariantList())
 
QList< Containment * > containments () const
 
QList< Containment * > containmentsForActivity (const QString &activity)
 
QList< Containment * > containmentsForScreen (int screen)
 
ContainmentcreateContainment (const QString &name, const QVariantList &args=QVariantList())
 
void exportLayout (KConfigGroup &config, QList< Containment * > containments)
 
QList< Plasma::Types::LocationfreeEdges (int screen) const
 
Types::ImmutabilityType immutability () const
 
QList< Plasma::Containment * > importLayout (const KConfigGroup &config)
 
bool isEditMode () const
 
bool isStartupCompleted () const
 
KPackage::Package kPackage () const
 
virtual int numScreens () const
 
Plasma::Package package () const
 
virtual int screenForContainment (const Containment *containment) const
 
virtual QRect screenGeometry (int id) const =0
 
void setEditMode (bool edit)
 
void setKPackage (const KPackage::Package &package)
 
void setPackage (const Plasma::Package &package)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
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 ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
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 QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
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_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 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
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Protected Member Functions

ContainmentcreateContainmentDelayed (const QString &name, const QVariantList &args=QVariantList())
 
virtual void loadDefaultLayout ()
 
- 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
 
virtual void timerEvent (QTimerEvent *event)
 

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

Detailed Description

A bookkeeping Scene for Plasma::Applets.

Definition at line 27 of file corona.h.

Member Function Documentation

KActionCollection * Plasma::Corona::actions ( ) const

The actions associated with this Corona.

Definition at line 436 of file corona.cpp.

QRect Plasma::Corona::availableScreenRect ( int  id) const
virtual

Returns the available rect for a given screen.

The difference between this and availableScreenRegion() is that this method returns only a rectangular available space (it doesn't care if your panel is not 100% width). The available rect excludes panels and similar windows. Valid screen ids are 0 to numScreens()-1. By default this method returns a rectangular region equal to screenGeometry(id); subclasses that need another behavior should override this method.

Definition at line 315 of file corona.cpp.

void Plasma::Corona::availableScreenRectChanged ( )
signal

This signal indicates that a change in available screen geometry occurred.

QRegion Plasma::Corona::availableScreenRegion ( int  id) const
virtual

Returns the available region for a given screen.

The available region excludes panels and similar windows. Valid screen ids are 0 to numScreens()-1. By default this method returns a rectangular region equal to screenGeometry(id); subclasses that need another behavior should override this method.

Definition at line 310 of file corona.cpp.

void Plasma::Corona::availableScreenRegionChanged ( )
signal

This signal indicates that a change in available screen geometry occurred.

KSharedConfigPtr Plasma::Corona::config ( ) const

Returns the config file used to store the configuration for this Corona.

Definition at line 273 of file corona.cpp.

void Plasma::Corona::configSynced ( )
signal

This signal indicates that the configuration file was flushed to disk.

void Plasma::Corona::containmentAdded ( Plasma::Containment containment)
signal

This signal indicates a new containment has been added to the Corona: it may occur after creation or restore from config.

void Plasma::Corona::containmentCreated ( Plasma::Containment containment)
signal

This signal indicates a new containment has been created in the Corona.

Compared to containmentAdded it can only happen after the creation of a new containment.

See also
containmentAdded
Since
5.16
Containment * Plasma::Corona::containmentForScreen ( int  screen,
const QString activity,
const QString defaultPluginIfNonExistent,
const QVariantList &  defaultArgs = QVariantList() 
)

Returns the Containment for a given physical screen and desktop, creating one if none exists.

Parameters
screennumber of the physical screen to locate
activitythe activity id of the containment we want, and empty string if the activity is not important
defaultPluginIfNonExistentthe plugin to load by default; "null" won't create it and "default" creates the default plugin
defaultArgsoptional arguments to pass in when creating a Containment if needed
Since
5.45

Definition at line 198 of file corona.cpp.

Containment * Plasma::Corona::containmentForScreen ( int  screen) const

Returns the Containment, if any, for a given physical screen.

Parameters
screennumber of the physical screen to locate
Deprecated:
Since 5.46, use containmentForScreen(int, const QString &, const QString &, const QVariantList &)

Definition at line 180 of file corona.cpp.

Containment * Plasma::Corona::containmentForScreen ( int  screen,
const QString defaultPluginIfNonExistent,
const QVariantList &  defaultArgs = QVariantList() 
)

Returns the Containment for a given physical screen and desktop, creating one if none exists.

Parameters
screennumber of the physical screen to locate
defaultPluginIfNonExistentthe plugin to load by default; "null" is an empty Containment and "default" creates the default plugin
defaultArgsoptional arguments to pass in when creating a Containment if needed
Deprecated:
Since 5.46, use containmentForScreen(int, const QString &, const QString &, const QVariantList &)

Definition at line 193 of file corona.cpp.

QList< Containment * > Plasma::Corona::containments ( ) const
Returns
all containments on this Corona

Definition at line 263 of file corona.cpp.

QList< Containment * > Plasma::Corona::containmentsForActivity ( const QString activity)

Returns all containments which match a particular activity, for any screen.

Parameters
activitythe activity id we want
Returns
the list of matching containments if any, empty if activity is an empty string
Since
5.45

Definition at line 229 of file corona.cpp.

QList< Containment * > Plasma::Corona::containmentsForScreen ( int  screen)

Returns all containments which match a particular screen, for any activity.

Parameters
screenthe screen number we want
Returns
the list of matching containments if any, empty if screen is < 0
Since
5.45

Definition at line 246 of file corona.cpp.

Containment * Plasma::Corona::createContainment ( const QString name,
const QVariantList &  args = QVariantList() 
)

Adds a Containment to the Corona.

Parameters
namethe plugin name for the containment, as given by KPluginInfo::pluginName(). If an empty string is passed in, the default containment plugin will be used (usually DesktopContainment). If the string literal "null" is passed in, then no plugin will be loaded and a simple Containment object will be created instead.
argsargument list to pass to the containment
Returns
a pointer to the containment on success, or 0 on failure. Failure can be caused by too restrictive of an Immutability type, as containments cannot be added when widgets are locked. If the requested containment plugin can not be located or successfully loaded, the Containment will have an invalid pluginInfo().

Definition at line 282 of file corona.cpp.

Containment * Plasma::Corona::createContainmentDelayed ( const QString name,
const QVariantList &  args = QVariantList() 
)
protected

Loads a containment with delayed initialization, primarily useful for implementations of loadDefaultLayout.

The caller is responsible for all initialization, saving and notification of a new containment.

Parameters
namethe plugin name for the containment, as given by KPluginInfo::pluginName(). If an empty string is passed in, the default containment plugin will be used (usually DesktopContainment). If the string literal "null" is passed in, then no plugin will be loaded and a simple Containment object will be created instead.
argsargument list to pass to the containment
Returns
a pointer to the containment on success, or 0 on failure. Failure can be caused by the Immutability type being too restrictive, as containments can't be added when widgets are locked, or if the requested containment plugin can not be located or successfully loaded.
See also
addContainment

Definition at line 291 of file corona.cpp.

void Plasma::Corona::editModeChanged ( bool  edit)
signal

emitted when the editMode state changes

See also
isEditMode()
Since
5.63
void Plasma::Corona::exportLayout ( KConfigGroup config,
QList< Containment * >  containments 
)

Exports a set of containments to a config file.

Parameters
configthe config group to save to
containmentsthe list of containments to save
Since
4.6

Definition at line 97 of file corona.cpp.

QList< Plasma::Types::Location > Plasma::Corona::freeEdges ( int  screen) const

This method is useful in order to retrieve the list of available screen edges for panel type containments.

Parameters
screenthe id of the screen to look for free edges.
Returns
a list of free edges not filled with panel type containments.

Definition at line 416 of file corona.cpp.

Types::ImmutabilityType Plasma::Corona::immutability ( ) const
Returns
The type of immutability of this Corona

Definition at line 325 of file corona.cpp.

void Plasma::Corona::immutabilityChanged ( Plasma::Types::ImmutabilityType  immutability)
signal

emitted when immutability changes.

this is for use by things that don't get constraints events, like plasmaapp. it's NOT for containments or applets or any of the other stuff on the scene. if your code's not in shells/ it probably shouldn't be using it.

QList< Plasma::Containment * > Plasma::Corona::importLayout ( const KConfigGroup config)

Imports an applet layout from a config file.

The results will be added to the current set of Containments.

Parameters
configthe name of the config file to load from, or the default config file if QString()
Returns
the list of containments that were loaded
Since
4.6

Definition at line 175 of file corona.cpp.

bool Plasma::Corona::isEditMode ( ) const
Returns
true if the corona is in edit mode
Since
5.63

Definition at line 411 of file corona.cpp.

bool Plasma::Corona::isStartupCompleted ( ) const
Returns
true when the startup is over, and all the ui graphics has been instantiated
KPackage::Package Plasma::Corona::kPackage ( ) const

Accessor for the associated Package object if any.

A Corona package defines how Containments are laid out in a View, ToolBoxes, default layout, error messages and in genelal all the furniture specific of a particular device form factor.

Returns
the Package object, or an invalid one if none
Since
5.5
void Plasma::Corona::kPackageChanged ( const KPackage::Package package)
signal

Emitted when the package for this corona has been changed.

Shells must support changing the shell package on the fly (for instance due to device form factor changing)

Parameters
packagethe new package that defines the Corona furniture and behavior
void Plasma::Corona::loadDefaultLayout ( )
protectedvirtual

Loads the default (system wide) layout for this user.

Definition at line 320 of file corona.cpp.

void Plasma::Corona::loadLayout ( const QString config = QString())
slot

Load applet layout from a config file.

The results will be added to the current set of Containments.

Parameters
configthe name of the config file to load from, or the default config file if QString()

Definition at line 155 of file corona.cpp.

int Plasma::Corona::numScreens ( ) const
virtual

Returns the number of screens available to plasma.

Subclasses should override this method as the default implementation returns a meaningless value.

Definition at line 305 of file corona.cpp.

Plasma::Package Plasma::Corona::package ( ) const

Accessor for the associated Package object if any.

A Corona package defines how Containments are laid out in a View, ToolBoxes, default layout, error messages and in general all the furniture specific of a particular device form factor.

Returns
the Package object, or an invalid one if none
Since
5.0
Deprecated:
Since 5.6, use kPackage instead
void Plasma::Corona::packageChanged ( const Plasma::Package package)
signal

Emitted when the package for this corona has been changed.

Shells must support changing the shell package on the fly (for instance due to device form factor changing)

Parameters
packagethe new package that defines the Corona furniture and behavior
Deprecated:
Since 5.6, use kPackageChanged instead
void Plasma::Corona::requestConfigSync ( )
slot

Schedules a flush-to-disk synchronization of the configuration state at the next convenient moment.

Definition at line 132 of file corona.cpp.

void Plasma::Corona::requireConfigSync ( )
slot

Schedules a time sensitive flush-to-disk synchronization of the configuration state.

Since this method does not provide any sort of event compression, it should only be used when an immediate disk sync is absolutely required. Otherwise, use

See also
requestConfigSync() which does do event compression.

Definition at line 150 of file corona.cpp.

void Plasma::Corona::saveLayout ( const QString config = QString()) const
slot

Save applets layout to file.

Parameters
configthe file to save to, or the default config file if QString()

Definition at line 84 of file corona.cpp.

void Plasma::Corona::screenAdded ( int  id)
signal

This signal indicates a new screen with the specified id was added.

Since
5.40
int Plasma::Corona::screenForContainment ( const Containment containment) const
virtual
Returns
the id of the screen which is showing containment -1 is returned if the containment is not associated with a screen.

Definition at line 300 of file corona.cpp.

virtual QRect Plasma::Corona::screenGeometry ( int  id) const
pure virtual

Returns the geometry of a given screen.

Valid screen ids are 0 to numScreen()-1, or -1 for the full desktop geometry. Subclasses should override this method as the default implementation returns a meaningless value.

void Plasma::Corona::screenGeometryChanged ( int  id)
signal

This signal indicates that a change in geometry for the screen occurred.

void Plasma::Corona::screenOwnerChanged ( int  isScreen)
signal

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

Parameters
isScreenthe screen it is now associated with
void Plasma::Corona::screenRemoved ( int  id)
signal

This signal indicates the screen with the specified id was removed.

Since
5.40
void Plasma::Corona::setEditMode ( bool  edit)

Set the Corona globally into "edit mode" Only when the corona is of mutable type can be set of edit mode.

This indicates the UI to make easy for the user to manipulate applets.

Parameters
edit
Since
5.63

Definition at line 392 of file corona.cpp.

void Plasma::Corona::setImmutability ( const Types::ImmutabilityType  immutable)
slot

Sets the immutability type for this Corona (not immutable, user immutable or system immutable)

Parameters
immutablethe new immutability type of this applet

Definition at line 330 of file corona.cpp.

void Plasma::Corona::setKPackage ( const KPackage::Package package)

Setting the package for the corona.

Since
5.5

Definition at line 78 of file corona.cpp.

void Plasma::Corona::setPackage ( const Plasma::Package package)

Setting the package name.

Deprecated:
Since 5.6, use setKPackage instead

Definition at line 67 of file corona.cpp.

void Plasma::Corona::startupCompleted ( )
signal

Emitted when the startup phase has been completed.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed May 12 2021 22:41:03 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.