Plasma::Corona
Properties | |
bool | editMode |
bool | isStartupCompleted |
KPackage::Package | kPackage |
Properties inherited from QObject | |
objectName | |
Signals | |
void | availableScreenRectChanged (int id) |
void | availableScreenRegionChanged (int id) |
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 | 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) | |
Q_INVOKABLE QAction * | action (const QString &name) const |
QList< QAction * > | actions () const |
virtual QRect | availableScreenRect (int id) const |
virtual QRegion | availableScreenRegion (int id) const |
KSharedConfig::Ptr | config () const |
Containment * | containmentForScreen (int screen, const QString &activity, const QString &defaultPluginIfNonExistent, const QVariantList &defaultArgs=QVariantList()) |
QList< Containment * > | containments () const |
QList< Containment * > | containmentsForActivity (const QString &activity) |
QList< Containment * > | containmentsForScreen (int screen) |
Containment * | createContainment (const QString &name, const QVariantList &args=QVariantList()) |
void | exportLayout (KConfigGroup &config, QList< Containment * > containments) |
QList< Plasma::Types::Location > | freeEdges (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 |
void | removeAction (const QString &name) |
virtual int | screenForContainment (const Containment *containment) const |
virtual QRect | screenGeometry (int id) const =0 |
void | setAction (const QString &name, QAction *action) |
void | setEditMode (bool edit) |
void | setKPackage (const KPackage::Package &package) |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QBindable< QString > | bindableObjectName () |
bool | blockSignals (bool block) |
const QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | 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 QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () 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 | |
T | qobject_cast (const QObject *object) |
T | 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) |
QThread * | thread () const const |
Protected Member Functions | |
Containment * | createContainmentDelayed (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 |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Public Types inherited from QObject | |
typedef | QObjectList |
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
Property Documentation
◆ editMode
◆ isStartupCompleted
◆ kPackage
|
read |
Constructor & Destructor Documentation
◆ Corona()
|
explicit |
Definition at line 35 of file corona.cpp.
◆ ~Corona()
|
override |
Definition at line 42 of file corona.cpp.
Member Function Documentation
◆ action()
- Returns
- The action with the given name, if any
Definition at line 397 of file corona.cpp.
◆ actions()
- Returns
- all the actions supported by the corona
Definition at line 427 of file corona.cpp.
◆ availableScreenRect()
|
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 272 of file corona.cpp.
◆ availableScreenRectChanged
|
signal |
This signal indicates that a change in available screen geometry occurred.
◆ availableScreenRegion()
|
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 267 of file corona.cpp.
◆ availableScreenRegionChanged
|
signal |
This signal indicates that a change in available screen geometry occurred.
◆ config()
KSharedConfigPtr Plasma::Corona::config | ( | ) | const |
Returns the config file used to store the configuration for this Corona.
Definition at line 230 of file corona.cpp.
◆ configSynced
|
signal |
This signal indicates that the configuration file was flushed to disk.
◆ containmentAdded
|
signal |
This signal indicates a new containment has been added to the Corona: it may occur after creation or restore from config.
◆ containmentCreated
|
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
◆ containmentForScreen()
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
-
screen number of the physical screen to locate activity the activity id of the containment we want, and empty string if the activity is not important defaultPluginIfNonExistent the plugin to load by default; "null" won't create it and "default" creates the default plugin defaultArgs optional arguments to pass in when creating a Containment if needed
- Since
- 5.45
Definition at line 157 of file corona.cpp.
◆ containments()
QList< Containment * > Plasma::Corona::containments | ( | ) | const |
- Returns
- all containments on this Corona
Definition at line 220 of file corona.cpp.
◆ containmentsForActivity()
QList< Containment * > Plasma::Corona::containmentsForActivity | ( | const QString & | activity | ) |
Returns all containments which match a particular activity, for any screen.
- Parameters
-
activity the 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 187 of file corona.cpp.
◆ containmentsForScreen()
QList< Containment * > Plasma::Corona::containmentsForScreen | ( | int | screen | ) |
Returns all containments which match a particular screen, for any activity.
- Parameters
-
screen the screen number we want
- Returns
- the list of matching containments if any, empty if screen is < 0
- Since
- 5.45
Definition at line 203 of file corona.cpp.
◆ createContainment()
Containment * Plasma::Corona::createContainment | ( | const QString & | name, |
const QVariantList & | args = QVariantList() ) |
Adds a Containment to the Corona.
- Parameters
-
name the 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. args argument 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 239 of file corona.cpp.
◆ createContainmentDelayed()
|
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
-
name the 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. args argument 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 248 of file corona.cpp.
◆ editModeChanged
|
signal |
◆ exportLayout()
void Plasma::Corona::exportLayout | ( | KConfigGroup & | config, |
QList< Containment * > | containments ) |
Exports a set of containments to a config file.
- Parameters
-
config the config group to save to containments the list of containments to save
- Since
- 4.6
Definition at line 74 of file corona.cpp.
◆ freeEdges()
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
-
screen the id of the screen to look for free edges.
- Returns
- a list of free edges not filled with panel type containments.
Definition at line 377 of file corona.cpp.
◆ immutability()
Types::ImmutabilityType Plasma::Corona::immutability | ( | ) | const |
- Returns
- The type of immutability of this Corona
Definition at line 282 of file corona.cpp.
◆ immutabilityChanged
|
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.
◆ importLayout()
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
-
config the 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 152 of file corona.cpp.
◆ isEditMode()
bool Plasma::Corona::isEditMode | ( | ) | const |
◆ isStartupCompleted()
bool Plasma::Corona::isStartupCompleted | ( | ) | const |
- Returns
- true when the startup is over, and all the ui graphics has been instantiated
Definition at line 225 of file corona.cpp.
◆ kPackage()
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 general all the furniture specific of a particular device form factor.
- Returns
- the Package object, or an invalid one if none
- Since
- 5.5
Definition at line 50 of file corona.cpp.
◆ kPackageChanged
|
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
-
package the new package that defines the Corona furniture and behavior
◆ loadDefaultLayout()
|
protectedvirtual |
Loads the default (system wide) layout for this user.
Definition at line 277 of file corona.cpp.
◆ loadLayout
Load applet layout from a config file.
The results will be added to the current set of Containments.
- Parameters
-
config the name of the config file to load from, or the default config file if QString()
Definition at line 132 of file corona.cpp.
◆ numScreens()
|
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 262 of file corona.cpp.
◆ removeAction()
void Plasma::Corona::removeAction | ( | const QString & | name | ) |
Remove the action with the given name, if exists.
Definition at line 418 of file corona.cpp.
◆ requestConfigSync
|
slot |
Schedules a flush-to-disk synchronization of the configuration state at the next convenient moment.
Definition at line 109 of file corona.cpp.
◆ 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 127 of file corona.cpp.
◆ saveLayout
Save applets layout to file.
- Parameters
-
config the file to save to, or the default config file if QString()
Definition at line 61 of file corona.cpp.
◆ screenAdded
|
signal |
This signal indicates a new screen with the specified id was added.
- Since
- 5.40
◆ screenForContainment()
|
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 257 of file corona.cpp.
◆ screenGeometry()
|
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.
◆ screenGeometryChanged
|
signal |
This signal indicates that a change in geometry for the screen occurred.
◆ screenOwnerChanged
|
signal |
This signal indicates that a containment has been newly associated (or dissociated) with a physical screen.
- Parameters
-
isScreen the screen it is now associated with
◆ screenRemoved
|
signal |
This signal indicates the screen with the specified id was removed.
- Since
- 5.40
◆ setAction()
Defines a new action with the given name in the internal collection.
Definition at line 402 of file corona.cpp.
◆ setEditMode()
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 349 of file corona.cpp.
◆ setImmutability
|
slot |
Sets the immutability type for this Corona (not immutable, user immutable or system immutable)
- Parameters
-
immutable the new immutability type of this applet
Definition at line 287 of file corona.cpp.
◆ setKPackage()
void Plasma::Corona::setKPackage | ( | const KPackage::Package & | package | ) |
◆ startupCompleted
|
signal |
Emitted when the startup phase has been completed.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:54:24 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.