• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • Corona
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
Plasma::Corona Class Reference

#include <Plasma/Corona>

Inheritance diagram for Plasma::Corona:
Inheritance graph
[legend]

Public Slots

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

Signals

void availableScreenRegionChanged ()
 
void configSynced ()
 
void containmentAdded (Plasma::Containment *containment)
 
void immutabilityChanged (Plasma::ImmutabilityType immutability)
 
void releaseVisualFocus ()
 
void screenOwnerChanged (int wasScreen, int isScreen, Plasma::Containment *containment)
 
void shortcutsChanged ()
 

Public Member Functions

 Corona (QObject *parent=0)
 
 ~Corona ()
 
QAction * action (QString name) const
 
QList< QAction * > actions () const
 
void addAction (QString name, QAction *action)
 
KAction * addAction (QString name)
 
Containment * addContainment (const QString &name, const QVariantList &args=QVariantList())
 
Containment * addContainmentDelayed (const QString &name, const QVariantList &args=QVariantList())
 
void addOffscreenWidget (QGraphicsWidget *widget)
 
void addShortcuts (KActionCollection *newShortcuts)
 
QString appletMimeType ()
 
virtual QRegion availableScreenRegion (int id) const
 
void clearContainments ()
 
KSharedConfig::Ptr config () const
 
ContainmentActionsPluginsConfig containmentActionsDefaults (Containment::Type containmentType)
 
Containment * containmentForScreen (int screen, int desktop=-1) const
 
Containment * containmentForScreen (int screen, int desktop, const QString &defaultPluginIfNonExistent, const QVariantList &defaultArgs=QVariantList())
 
QList< Containment * > containments () const
 
QString defaultContainmentPlugin () const
 
AbstractDialogManager * dialogManager ()
 
void enableAction (const QString &name, bool enable)
 
void exportLayout (KConfigGroup &config, QList< Containment * > containments)
 
QList< Plasma::Location > freeEdges (int screen) const
 
QList< Plasma::Containment * > importLayout (const KConfigBase &config)
 
QList< Plasma::Containment * > importLayout (const KConfigGroup &config)
 
virtual int numScreens () const
 
QList< QGraphicsWidget * > offscreenWidgets () const
 
QPoint popupPosition (const QGraphicsItem *item, const QSize &size)
 
QPoint popupPosition (const QGraphicsItem *item, const QSize &size, Qt::AlignmentFlag alignment)
 
QString preferredToolBoxPlugin (const Containment::Type type) const
 
void removeOffscreenWidget (QGraphicsWidget *widget)
 
virtual QRect screenGeometry (int id) const
 
void setAppletMimeType (const QString &mimetype)
 
void setContainmentActionsDefaults (Containment::Type containmentType, const ContainmentActionsPluginsConfig &config)
 
void setDialogManager (AbstractDialogManager *manager)
 
void updateShortcuts ()
 
- Public Member Functions inherited from QGraphicsScene
 QGraphicsScene (QObject *parent)
 
 QGraphicsScene (const QRectF &sceneRect, QObject *parent)
 
 QGraphicsScene (qreal x, qreal y, qreal width, qreal height, QObject *parent)
 
virtual  ~QGraphicsScene ()
 
QGraphicsItem * activePanel () const
 
QGraphicsWidget * activeWindow () const
 
QGraphicsEllipseItem * addEllipse (const QRectF &rect, const QPen &pen, const QBrush &brush)
 
QGraphicsEllipseItem * addEllipse (qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush)
 
void addItem (QGraphicsItem *item)
 
QGraphicsLineItem * addLine (const QLineF &line, const QPen &pen)
 
QGraphicsLineItem * addLine (qreal x1, qreal y1, qreal x2, qreal y2, const QPen &pen)
 
QGraphicsPathItem * addPath (const QPainterPath &path, const QPen &pen, const QBrush &brush)
 
QGraphicsPixmapItem * addPixmap (const QPixmap &pixmap)
 
QGraphicsPolygonItem * addPolygon (const QPolygonF &polygon, const QPen &pen, const QBrush &brush)
 
QGraphicsRectItem * addRect (const QRectF &rect, const QPen &pen, const QBrush &brush)
 
QGraphicsRectItem * addRect (qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush)
 
QGraphicsSimpleTextItem * addSimpleText (const QString &text, const QFont &font)
 
QGraphicsTextItem * addText (const QString &text, const QFont &font)
 
QGraphicsProxyWidget * addWidget (QWidget *widget, QFlags< Qt::WindowType > wFlags)
 
void advance ()
 
QBrush backgroundBrush () const
 
int bspTreeDepth () const
 
void changed (const QList< QRectF > &region)
 
void clear ()
 
void clearFocus ()
 
void clearSelection ()
 
QList< QGraphicsItem * > collidingItems (const QGraphicsItem *item, Qt::ItemSelectionMode mode) const
 
QGraphicsItemGroup * createItemGroup (const QList< QGraphicsItem * > &items)
 
void destroyItemGroup (QGraphicsItemGroup *group)
 
QGraphicsItem * focusItem () const
 
QFont font () const
 
QBrush foregroundBrush () const
 
bool hasFocus () const
 
qreal height () const
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const
 
void invalidate (qreal x, qreal y, qreal w, qreal h, QFlags< QGraphicsScene::SceneLayer > layers)
 
void invalidate (const QRectF &rect, QFlags< QGraphicsScene::SceneLayer > layers)
 
bool isActive () const
 
bool isSortCacheEnabled () const
 
QGraphicsItem * itemAt (qreal x, qreal y) const
 
QGraphicsItem * itemAt (qreal x, qreal y, const QTransform &deviceTransform) const
 
QGraphicsItem * itemAt (const QPointF &position) const
 
QGraphicsItem * itemAt (const QPointF &position, const QTransform &deviceTransform) const
 
ItemIndexMethod itemIndexMethod () const
 
QList< QGraphicsItem * > items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
 
QList< QGraphicsItem * > items () const
 
QList< QGraphicsItem * > items (Qt::SortOrder order) const
 
QList< QGraphicsItem * > items (const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
 
QList< QGraphicsItem * > items (const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
 
QList< QGraphicsItem * > items (const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
 
QList< QGraphicsItem * > items (const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
 
QList< QGraphicsItem * > items (const QPointF &pos) const
 
QList< QGraphicsItem * > items (const QRectF &rectangle, Qt::ItemSelectionMode mode) const
 
QList< QGraphicsItem * > items (const QPolygonF &polygon, Qt::ItemSelectionMode mode) const
 
QList< QGraphicsItem * > items (const QPainterPath &path, Qt::ItemSelectionMode mode) const
 
QList< QGraphicsItem * > items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const
 
QRectF itemsBoundingRect () const
 
QGraphicsItem * mouseGrabberItem () const
 
QPalette palette () const
 
void removeItem (QGraphicsItem *item)
 
void render (QPainter *painter, const QRectF &target, const QRectF &source, Qt::AspectRatioMode aspectRatioMode)
 
QRectF sceneRect () const
 
void sceneRectChanged (const QRectF &rect)
 
QList< QGraphicsItem * > selectedItems () const
 
QPainterPath selectionArea () const
 
void selectionChanged ()
 
bool sendEvent (QGraphicsItem *item, QEvent *event)
 
void setActivePanel (QGraphicsItem *item)
 
void setActiveWindow (QGraphicsWidget *widget)
 
void setBackgroundBrush (const QBrush &brush)
 
void setBspTreeDepth (int depth)
 
void setFocus (Qt::FocusReason focusReason)
 
void setFocusItem (QGraphicsItem *item, Qt::FocusReason focusReason)
 
void setFont (const QFont &font)
 
void setForegroundBrush (const QBrush &brush)
 
void setItemIndexMethod (ItemIndexMethod method)
 
void setPalette (const QPalette &palette)
 
void setSceneRect (qreal x, qreal y, qreal w, qreal h)
 
void setSceneRect (const QRectF &rect)
 
void setSelectionArea (const QPainterPath &path, const QTransform &deviceTransform)
 
void setSelectionArea (const QPainterPath &path)
 
void setSelectionArea (const QPainterPath &path, Qt::ItemSelectionMode mode, const QTransform &deviceTransform)
 
void setSelectionArea (const QPainterPath &path, Qt::ItemSelectionMode mode)
 
void setSortCacheEnabled (bool enabled)
 
void setStickyFocus (bool enabled)
 
void setStyle (QStyle *style)
 
bool stickyFocus () const
 
QStyle * style () const
 
void update (const QRectF &rect)
 
void update (qreal x, qreal y, qreal w, qreal h)
 
QList< QGraphicsView * > views () const
 
qreal width () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Protected Member Functions

void dragEnterEvent (QGraphicsSceneDragDropEvent *event)
 
void dragLeaveEvent (QGraphicsSceneDragDropEvent *event)
 
void dragMoveEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void loadDefaultLayout ()
 
void mapAnimation (Animator::Animation from, Animator::Animation to)
 
void mapAnimation (Animator::Animation from, const QString &to)
 
void setDefaultContainmentPlugin (const QString &name)
 
void setPreferredToolBoxPlugin (const Containment::Type type, const QString &plugin)
 
- Protected Member Functions inherited from QGraphicsScene
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *contextMenuEvent)
 
virtual void drawBackground (QPainter *painter, const QRectF &rect)
 
virtual void drawForeground (QPainter *painter, const QRectF &rect)
 
virtual void drawItems (QPainter *painter, int numItems, QGraphicsItem *[] items, const QStyleOptionGraphicsItem[] options, QWidget *widget)
 
virtual void dropEvent (QGraphicsSceneDragDropEvent *event)
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual void focusInEvent (QFocusEvent *focusEvent)
 
bool focusNextPrevChild (bool next)
 
virtual void focusOutEvent (QFocusEvent *focusEvent)
 
virtual void helpEvent (QGraphicsSceneHelpEvent *helpEvent)
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
virtual void keyPressEvent (QKeyEvent *keyEvent)
 
virtual void keyReleaseEvent (QKeyEvent *keyEvent)
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
virtual void wheelEvent (QGraphicsSceneWheelEvent *wheelEvent)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
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)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QGraphicsScene
typedef SceneLayers
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QGraphicsScene
 backgroundBrush
 
 bspTreeDepth
 
 font
 
 foregroundBrush
 
 itemIndexMethod
 
 palette
 
 sceneRect
 
 sortCacheEnabled
 
 stickyFocus
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A QGraphicsScene for Plasma::Applets.

Definition at line 48 of file corona.h.

Constructor & Destructor Documentation

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

Definition at line 64 of file corona.cpp.

Plasma::Corona::~Corona ( )

Definition at line 74 of file corona.cpp.

Member Function Documentation

QAction * Plasma::Corona::action ( QString  name) const

Returns the QAction with the given name from our collection.

Definition at line 716 of file corona.cpp.

QList< QAction * > Plasma::Corona::actions ( ) const

Returns all the actions in our collection.

Definition at line 731 of file corona.cpp.

void Plasma::Corona::addAction ( QString  name,
QAction *  action 
)

Adds the action to our collection under the given name.

Definition at line 721 of file corona.cpp.

KAction * Plasma::Corona::addAction ( QString  name)
Since
4.3 Creates an action in our collection under the given name
Returns
the new action FIXME I'm wrapping so much of kactioncollection API now, maybe I should just expose the collection itself :P

Definition at line 726 of file corona.cpp.

Containment * Plasma::Corona::addContainment ( 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, or if the requested containment plugin can not be located or successfully loaded.

Definition at line 349 of file corona.cpp.

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

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
namethe 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.
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 358 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
widgetthe widget to add.

Definition at line 377 of file corona.cpp.

void Plasma::Corona::addShortcuts ( KActionCollection *  newShortcuts)
Since
4.3 Adds a set of actions to the shortcut config dialog. don't use this on actions in the corona's own actioncollection, those are handled automatically. this is for stuff outside of that.

Definition at line 764 of file corona.cpp.

QString Plasma::Corona::appletMimeType ( )

The current mime type of Drag/Drop items.

Definition at line 91 of file corona.cpp.

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 454 of file corona.cpp.

void Plasma::Corona::availableScreenRegionChanged ( )
signal

This signal inicates that a change in available screen goemetry occurred.

void Plasma::Corona::clearContainments ( )

Clear the Corona from all applets.

Definition at line 333 of file corona.cpp.

KSharedConfigPtr Plasma::Corona::config ( ) const

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

Definition at line 340 of file corona.cpp.

void Plasma::Corona::configSynced ( )
signal

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

ContainmentActionsPluginsConfig Plasma::Corona::containmentActionsDefaults ( Containment::Type  containmentType)
Since
4.4 Returns the default containmentactions plugins for the given containment type

Definition at line 777 of file corona.cpp.

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 and desktop.

Parameters
screennumber of the physical screen to locate
desktopthe virtual desktop) to locate; if < 0 then it will simply return the first Containment associated with screen

Definition at line 296 of file corona.cpp.

Containment * Plasma::Corona::containmentForScreen ( int  screen,
int  desktop,
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
desktopthe virtual desktop) to locate; if < 0 then it will simply return the first Containment associated with screen
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
Since
4.6

Definition at line 310 of file corona.cpp.

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

Definition at line 328 of file corona.cpp.

QString Plasma::Corona::defaultContainmentPlugin ( ) const
Returns
the default containment plugin type
Since
4.7

Definition at line 105 of file corona.cpp.

AbstractDialogManager * Plasma::Corona::dialogManager ( )
Returns
the AbstractDialogManager that will show dialogs used by applets, like configuration dialogs
Since
4.5

Definition at line 787 of file corona.cpp.

void Plasma::Corona::dragEnterEvent ( QGraphicsSceneDragDropEvent *  event)
protectedvirtual

Reimplemented from QGraphicsScene.

Definition at line 643 of file corona.cpp.

void Plasma::Corona::dragLeaveEvent ( QGraphicsSceneDragDropEvent *  event)
protectedvirtual

Reimplemented from QGraphicsScene.

Definition at line 648 of file corona.cpp.

void Plasma::Corona::dragMoveEvent ( QGraphicsSceneDragDropEvent *  event)
protectedvirtual

Reimplemented from QGraphicsScene.

Definition at line 653 of file corona.cpp.

void Plasma::Corona::enableAction ( const QString &  name,
bool  enable 
)

convenience function - enables or disables an action by name

Parameters
namethe name of the action in our collection
enabletrue to enable, false to disable

Definition at line 736 of file corona.cpp.

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 123 of file corona.cpp.

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
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 700 of file corona.cpp.

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

Definition at line 658 of file corona.cpp.

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

emitted when immutability changes.

this is for use by things that don't get contraints 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 KConfigBase &  config)

Imports an applet layout from a config file.

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

Deprecated:
Use the 4.6 version that takes a KConfigGroup
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.5

Definition at line 290 of file corona.cpp.

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 284 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
configthe name of the config file to load from, or the default config file if QString()

Definition at line 179 of file corona.cpp.

void Plasma::Corona::layoutContainments ( )
slot
Since
4.5 Layout the containments on this corona. The default implementation organizes them in a grid-like view, but subclasses can reimplement this slot to provide their own layout.

Definition at line 206 of file corona.cpp.

void Plasma::Corona::loadDefaultLayout ( )
protectedvirtual

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

Definition at line 628 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 272 of file corona.cpp.

void Plasma::Corona::mapAnimation ( Animator::Animation  from,
Animator::Animation  to 
)
protected

Maps a stock animation to one of the semantic animations.

Used to control things such as what animation is used to make a Plasma::Appear appear in a containment.

Parameters
fromthe animation to map a new value to
tothe animation value to map to from
Since
4.5

Definition at line 367 of file corona.cpp.

void Plasma::Corona::mapAnimation ( Animator::Animation  from,
const QString &  to 
)
protected

Maps a loadable animation to one of the semantic animations.

Used to control things such as what animation is used to make a Plasma::Appear appear in a containment.

Parameters
fromthe animation to map a new value to
tothe animation value to map to from; this must map to a Javascript animation
Since
4.5

Definition at line 372 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 436 of file corona.cpp.

QList< QGraphicsWidget * > Plasma::Corona::offscreenWidgets ( ) const
Returns
the list of all offscreen widgets
Since
4.3

Definition at line 422 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
itemthe item that the popup should appear adjacent to (an applet, say)
sizesize of the popup
Returns
reccomended position

Definition at line 459 of file corona.cpp.

QPoint Plasma::Corona::popupPosition ( const QGraphicsItem *  item,
const QSize &  size,
Qt::AlignmentFlag  alignment 
)
Since
4.4 Recommended position for a popup window like a menu or a tooltip given its size
Parameters
itemthe item that the popup should appear adjacent to (an applet, say)
sizesize of the popup
alignmentalignment of the popup, valid flags are Qt::AlignLeft, Qt::AlignRight and Qt::AlignCenter
Returns
reccomended position

Definition at line 464 of file corona.cpp.

QString Plasma::Corona::preferredToolBoxPlugin ( const Containment::Type  type) const

Returns the name of the preferred plugin to be used as containment toolboxes.

CustomContainments and CustomPanelContainments can still override it as their liking. It's also not guaranteed that the plugin will actually exist.

Parameters
typethe containment type of which we want to know the associated toolbox plugin
Since
4.6

Definition at line 638 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
widgetthe widget to remove.

Definition at line 410 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 156 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 174 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 110 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 441 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
wasScreenthe screen it was associated with
isScreenthe screen it is now associated with
containmentthe 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 86 of file corona.cpp.

void Plasma::Corona::setContainmentActionsDefaults ( Containment::Type  containmentType,
const ContainmentActionsPluginsConfig &  config 
)
Since
4.4 Sets the default containmentactions plugins for the given containment type

Definition at line 772 of file corona.cpp.

void Plasma::Corona::setDefaultContainmentPlugin ( const QString &  name)
protected

Sets the default containment plugin to try and load.

Since
4.7

Definition at line 96 of file corona.cpp.

void Plasma::Corona::setDialogManager ( AbstractDialogManager *  manager)
Parameters
theAbstractDialogManager implementaion
Since
4.5

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

Parameters
immutablethe new immutability type of this applet

Definition at line 663 of file corona.cpp.

void Plasma::Corona::setPreferredToolBoxPlugin ( const Containment::Type  type,
const QString &  plugin 
)
protected
Returns
The preferred toolbox plugin name for a given containment type.
Parameters
typethe containment type of which we want to know the preferred toolbox plugin.
pluginthe toolbox plugin name
Since
4.6

Definition at line 632 of file corona.cpp.

void Plasma::Corona::shortcutsChanged ( )
signal
Since
4.3 emitted when the user changes keyboard shortcut settings connect to this if you've put some extra shortcuts in your app that are NOT in corona's actioncollection. if your code's not in shells/ it probably shouldn't be using this function.
See also
addShortcuts
void Plasma::Corona::updateShortcuts ( )
Since
4.3 Updates keyboard shortcuts for all the corona's actions. If you've added actions to the corona you'll need to call this for them to be configurable.

Definition at line 745 of file corona.cpp.


The documentation for this class was generated from the following files:
  • corona.h
  • corona.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal