• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

Plasma::Corona

Plasma::Corona Class Reference

#include <corona.h>

Inheritance diagram for Plasma::Corona:

Inheritance graph
[legend]

List of all members.


Detailed Description

A QGraphicsScene for Plasma::Applets.

Definition at line 39 of file corona.h.


Public Slots

ImmutabilityType immutability () const
void initializeLayout (const QString &config=QString())
void loadLayout (const QString &config=QString())
void requestConfigSync ()
void saveLayout (const QString &config=QString()) const
void setImmutability (const ImmutabilityType immutable)

Signals

void configSynced ()
void containmentAdded (Plasma::Containment *containment)
void releaseVisualFocus ()
void screenOwnerChanged (int wasScreen, int isScreen, Plasma::Containment *containment)

Public Member Functions

Containment * addContainment (const QString &name, const QVariantList &args=QVariantList())
QString appletMimeType ()
void clearContainments ()
KSharedConfig::Ptr config () const
Containment * containmentForScreen (int screen) const
QList< Containment * > containments () const
 Corona (QObject *parent=0)
void setAppletMimeType (const QString &mimetype)
 ~Corona ()

Protected Member Functions

Containment * addContainmentDelayed (const QString &name, const QVariantList &args=QVariantList())
void dragEnterEvent (QGraphicsSceneDragDropEvent *event)
void dragLeaveEvent (QGraphicsSceneDragDropEvent *event)
void dragMoveEvent (QGraphicsSceneDragDropEvent *event)
virtual void loadDefaultLayout ()

Constructor & Destructor Documentation

Plasma::Corona::Corona ( QObject *  parent = 0  )  [explicit]

Definition at line 176 of file corona.cpp.

Plasma::Corona::~Corona (  ) 

Definition at line 184 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 331 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 336 of file corona.cpp.

QString Plasma::Corona::appletMimeType (  ) 

The current mime type of Drag/Drop items.

Definition at line 199 of file corona.cpp.

void Plasma::Corona::clearContainments (  ) 

Clear the Corona from all applets.

Definition at line 315 of file corona.cpp.

KSharedConfigPtr Plasma::Corona::config (  )  const

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

Definition at line 322 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  )  const

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

Parameters:
screen number of the physical screen to locate

Definition at line 297 of file corona.cpp.

QList< Containment * > Plasma::Corona::containments (  )  const

Returns:
all containments on this Corona

Definition at line 310 of file corona.cpp.

void Plasma::Corona::dragEnterEvent ( QGraphicsSceneDragDropEvent *  event  )  [protected]

Reimplemented from QGraphicsScene.

Definition at line 345 of file corona.cpp.

void Plasma::Corona::dragLeaveEvent ( QGraphicsSceneDragDropEvent *  event  )  [protected]

Reimplemented from QGraphicsScene.

Definition at line 350 of file corona.cpp.

void Plasma::Corona::dragMoveEvent ( QGraphicsSceneDragDropEvent *  event  )  [protected]

Reimplemented from QGraphicsScene.

Definition at line 355 of file corona.cpp.

ImmutabilityType Plasma::Corona::immutability (  )  const [slot]

Returns:
The type of immutability of this Corona

Definition at line 360 of file corona.cpp.

void Plasma::Corona::initializeLayout ( const QString &  config = QString()  )  [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 231 of file corona.cpp.

void Plasma::Corona::loadDefaultLayout (  )  [protected, virtual]

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

Definition at line 341 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:
config the name of the config file to load from, or the default config file if QString()

Definition at line 251 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::requestConfigSync (  )  [slot]

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

Definition at line 217 of file corona.cpp.

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

Save applets layout to file.

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

Definition at line 204 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 194 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 365 of file corona.cpp.


The documentation for this class was generated from the following files:
  • corona.h
  • corona.cpp

libplasma

Skip menu "libplasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal