Plasma
Plasma::Corona Class Reference
A QGraphicsScene for Plasma::Applets. More...
#include <Plasma/Corona>

Detailed Description
A QGraphicsScene for Plasma::Applets.Definition at line 43 of file corona.h.
Constructor & Destructor Documentation
Plasma::Corona::Corona | ( | QObject * | parent = 0 |
) | [explicit] |
Definition at line 196 of file corona.cpp.
Plasma::Corona::~Corona | ( | ) |
Definition at line 205 of file corona.cpp.
Member Function Documentation
Containment * Plasma::Corona::addContainment | ( | 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 defalt 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
Definition at line 359 of file corona.cpp.
Containment * Plasma::Corona::addContainmentDelayed | ( | 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 initializating, 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 defalt 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
Definition at line 364 of file corona.cpp.
void Plasma::Corona::addOffscreenWidget | ( | QGraphicsWidget * | widget | ) |
Adds a widget in the topleft quadrant in the scene.
Widgets in the topleft quadrant are normally never shown unless you specifically aim a view at it, which makes it ideal for toplevel views etc.
- Parameters:
-
widget the widget to add.
Definition at line 369 of file corona.cpp.
QString Plasma::Corona::appletMimeType | ( | ) |
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 431 of file corona.cpp.
void Plasma::Corona::availableScreenRegionChanged | ( | ) | [signal] |
This signal inicates that a change in available screen goemetry occurred.
void Plasma::Corona::clearContainments | ( | ) |
KSharedConfigPtr Plasma::Corona::config | ( | ) | const |
Returns the config file used to store the configuration for this Corona.
Definition at line 350 of file corona.cpp.
void Plasma::Corona::configSynced | ( | ) | [signal] |
This signal indicates that the configuration file was flushed to disc.
void Plasma::Corona::containmentAdded | ( | Plasma::Containment * | containment | ) | [signal] |
This signal indicates a new containment has been added to the Corona.
Containment * Plasma::Corona::containmentForScreen | ( | int | screen, | |
int | desktop = -1 | |||
) | const |
Returns the Containment, if any, for a given physical screen.
- Parameters:
-
screen number of the physical screen to locate desktop the virtual desktop) to locate; if < 0 then it will simply return the first Containment associated with screen
Definition at line 324 of file corona.cpp.
QList< Containment * > Plasma::Corona::containments | ( | ) | const |
void Plasma::Corona::dragEnterEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | [protected] |
void Plasma::Corona::dragLeaveEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | [protected] |
void Plasma::Corona::dragMoveEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | [protected] |
QList< Plasma::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 553 of file corona.cpp.
ImmutabilityType Plasma::Corona::immutability | ( | ) | const [slot] |
Initializes the layout from a config file.
This will first clear any existing Containments, load a layout from the requested configuration file, request the default layout if needed and update immutability.
- Parameters:
-
config the name of the config file to load from, or the default config file if QString()
Definition at line 256 of file corona.cpp.
void Plasma::Corona::loadDefaultLayout | ( | ) | [protected, virtual] |
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 276 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 413 of file corona.cpp.
QPoint Plasma::Corona::popupPosition | ( | const QGraphicsItem * | item, | |
const QSize & | size | |||
) |
Recommended position for a popup window like a menu or a tooltip given its size.
- Parameters:
-
item the item that the popup should appear adjacent to (an applet, say) size size of the popup
- Returns:
- reccomended position
Definition at line 436 of file corona.cpp.
void Plasma::Corona::releaseVisualFocus | ( | ) | [signal] |
This signal indicates that an application launch, window creation or window focus event was triggered.
This is used, for instance, to ensure that the Dashboard view in Plasma hides when such an event is triggered by an item it is displaying.
void Plasma::Corona::removeOffscreenWidget | ( | QGraphicsWidget * | widget | ) |
Removes a widget from the topleft quadrant in the scene.
- Parameters:
-
widget the widget to remove.
Definition at line 392 of file corona.cpp.
void Plasma::Corona::requestConfigSync | ( | ) | [slot] |
Schedules a flush-to-disk synchronization of the configuration state at the next convenient moment.
Definition at line 237 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 251 of file corona.cpp.
Save applets layout to file.
- config the file to save to, or the default config file if QString()
Definition at line 224 of file corona.cpp.
QRect Plasma::Corona::screenGeometry | ( | int | id | ) | const [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.
Definition at line 418 of file corona.cpp.
void Plasma::Corona::screenOwnerChanged | ( | int | wasScreen, | |
int | isScreen, | |||
Plasma::Containment * | containment | |||
) | [signal] |
This signal indicates that a containment has been newly associated (or dissociated) with a physical screen.
- Parameters:
-
wasScreen the screen it was associated with isScreen the screen it is now associated with containment the containment switching screens
void Plasma::Corona::setAppletMimeType | ( | const QString & | mimetype | ) |
Sets the mimetype of Drag/Drop items.
Default is text/x-plasmoidservicename
Definition at line 214 of file corona.cpp.
void Plasma::Corona::setImmutability | ( | const ImmutabilityType | immutable | ) | [slot] |
Sets the immutability type for this Corona (not immutable, user immutable or system immutable).
- immutable the new immutability type of this applet
Definition at line 534 of file corona.cpp.
The documentation for this class was generated from the following files: