Plasma
corona.cpp
Go to the documentation of this file.
100 // Containment::listContainments(QString(), KGlobal::mainComponent().componentName()).contains(name)
387 //x QWIDGETSIZE_MAX, so we're guaranteed to never have to move widgets once they're placed here.
464 QPoint Corona::popupPosition(const QGraphicsItem *item, const QSize &s, Qt::AlignmentFlag alignment)
466 // TODO: merge both methods (also these in Applet) into one (with optional alignment) when we can break compatibility
529 //kDebug() << "==> position is" << actualItem->scenePos() << v->mapFromScene(actualItem->scenePos()) << pos;
635 //TODO: react to plugin changes on the fly? still don't see the use case (maybe for laptops that become tablets?)
772 void Corona::setContainmentActionsDefaults(Containment::Type containmentType, const ContainmentActionsPluginsConfig &config)
777 ContainmentActionsPluginsConfig Corona::containmentActionsDefaults(Containment::Type containmentType)
843 KActionCollection *containmentActions = AppletPrivate::defaultActions(q); //containment has to start with applet stuff
927 Containment *CoronaPrivate::addContainment(const QString &name, const QVariantList &args, uint id, bool delayedInit)
1013 QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigBase &conf, bool mergeConfig)
1052 //kDebug() << "got a containment in the config, trying to make a" << containmentConfig.readEntry("plugin", QString()) << "from" << group;
1053 kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Adding Containment" << containmentConfig.readEntry("plugin", QString());
1054 Containment *c = addContainment(containmentConfig.readEntry("plugin", QString()), QVariantList(), cid, true);
1063 kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Init Containment" << c->pluginName();
1065 kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Restored Containment" << c->pluginName();
1072 kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Containment" << containment->name();
void setText(const QString &text)
bool hasNext() const
QGraphicsWidget * parentWidget() const
QList< Plasma::Location > freeEdges(int screen) const
This method is useful in order to retrieve the list of available screen edges for panel type containm...
Definition: corona.cpp:700
void immutabilityChanged(Plasma::ImmutabilityType immutability)
emitted when immutability changes.
bool isRightToLeft()
int & rx()
int & ry()
void loadLayout(const QString &config=QString())
Load applet layout from a config file.
Definition: corona.cpp:272
int width() const
void exportLayout(KConfigGroup &config, QList< Containment * > containments)
Exports a set of containments to a config file.
Definition: corona.cpp:123
virtual QRect screenGeometry(int id) const
Returns the geometry of a given screen.
Definition: corona.cpp:441
QRect toRect() const
void flushPendingConstraintsEvents()
Sends all pending contraints updates to the applet.
Definition: applet.cpp:1204
virtual int numScreens() const
Returns the number of screens available to plasma.
Definition: corona.cpp:436
ImmutabilityType
Defines the immutability of items like applets, corona and containments they can be free to modify...
Definition: plasma.h:197
QList< QGraphicsWidget * > offscreenWidgets() const
Definition: corona.cpp:422
void destroy()
Destroys this containment and all its applets (after a confirmation dialog); it will be removed nicel...
Definition: containment.cpp:2053
void setParentItem(QGraphicsItem *newParent)
void addAction(QString name, QAction *action)
Adds the action to our collection under the given name.
Definition: corona.cpp:721
void setDrawWallpaper(bool drawWallpaper)
Sets whether wallpaper is painted or not.
Definition: containment.cpp:1796
void setFormFactor(Plasma::FormFactor formFactor)
Sets the form factor for this Containment.
Definition: containment.cpp:776
the item is locked down by the system, the user can't unlock it
Definition: plasma.h:201
QList< Plasma::Containment * > importLayout(const KConfigBase &config)
Imports an applet layout from a config file.
Definition: corona.cpp:290
virtual Location location() const
Returns the location of the scene which is displaying applet.
Definition: applet.cpp:1618
void setContainmentActionsDefaults(Containment::Type containmentType, const ContainmentActionsPluginsConfig &config)
Definition: corona.cpp:772
void setImmutability(const ImmutabilityType immutable)
Sets the immutability type for this Corona (not immutable, user immutable or system immutable) ...
Definition: corona.cpp:663
QTransform sceneTransform() const
T & value()
void requireConfigSync()
Schedules a time sensitive flush-to-disk synchronization of the configuration state.
Definition: corona.cpp:174
void setIcon(const QIcon &icon)
QSizeF size() const
void setVisible(bool)
virtual QRegion availableScreenRegion(int id) const
Returns the available region for a given screen.
Definition: corona.cpp:454
void enableAction(const QString &name, bool enable)
convenience function - enables or disables an action by name
Definition: corona.cpp:736
ContainmentActionsPluginsConfig containmentActionsDefaults(Containment::Type containmentType)
Definition: corona.cpp:777
bool isVisible() const
QRectF sceneBoundingRect() const
QPoint mapToGlobal(const QPoint &pos) const
QRectF sceneRect() const
QString preferredToolBoxPlugin(const Containment::Type type) const
Returns the name of the preferred plugin to be used as containment toolboxes.
Definition: corona.cpp:638
int msecsTo(const QTime &t) const
int height() const
int x() const
int y() const
the immutability (locked) nature of the applet changed
Definition: plasma.h:50
void addShortcuts(KActionCollection *newShortcuts)
Definition: corona.cpp:764
void setPreferredToolBoxPlugin(const Containment::Type type, const QString &plugin)
Definition: corona.cpp:632
const_iterator insert(const T &value)
qreal height() const
QGraphicsScene * scene() const
void clearFocus()
int screenNumber(const QWidget *widget) const
int x() const
int y() const
geometry
A containment that is neither a desktop nor a panel but something application specific.
Definition: containment.h:103
virtual void loadDefaultLayout()
Loads the default (system wide) layout for this user.
Definition: corona.cpp:628
void moveTo(int x, int y)
const char * name() const
void initializeLayout(const QString &config=QString())
Initializes the layout from a config file.
Definition: corona.cpp:179
QString number(int n, int base)
QPoint popupPosition(const QGraphicsItem *item, const QSize &size)
Recommended position for a popup window like a menu or a tooltip given its size.
Definition: corona.cpp:459
KSharedConfig::Ptr config() const
Returns the config file used to store the configuration for this Corona.
Definition: corona.cpp:340
qreal x() const
qreal y() const
void append(const T &value)
void setScreen(int screen, int desktop=-1)
Sets the physical screen this Containment is associated with.
Definition: containment.cpp:955
Location
The Location enumeration describes where on screen an element, such as an Applet or its managing cont...
Definition: plasma.h:108
int top() const
void requestConfigSync()
Schedules a flush-to-disk synchronization of the configuration state at the next convenient moment...
Definition: corona.cpp:156
void setDialogManager(AbstractDialogManager *manager)
Definition: corona.cpp:782
void toFront()
void setPos(const QPointF &pos)
QList< QGraphicsView * > views() const
qreal m11() const
void mapAnimation(Animator::Animation from, Animator::Animation to)
Maps a stock animation to one of the semantic animations.
Definition: corona.cpp:367
bool isEmpty() const
bool isEmpty() const
int removeAll(const T &value)
virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event)
Item next()
The user has requested a lock down, and can undo the lock down at any time.
Definition: plasma.h:199
QAction * action(QString name) const
Returns the QAction with the given name from our collection.
Definition: corona.cpp:716
QList< QAction * > actions() const
Returns all the actions in our collection.
Definition: corona.cpp:731
QPoint mapFromScene(const QPointF &point) const
QPointF center() const
void remove()
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
Definition: corona.cpp:648
QString defaultContainmentPlugin() const
Definition: corona.cpp:105
iterator end()
void remove()
void setParent(QObject *parent)
bool containmentSortByPosition(const Containment *c1, const Containment *c2)
Definition: corona.cpp:201
bool contains(const T &value) const
bool hasNext() const
bool contains(const T &value) const
QTime currentTime()
bool isRotating() const
KConfigGroup config() const
Returns the KConfigGroup to access the applets configuration.
Definition: applet.cpp:450
void setFailedToLaunch(bool failed, const QString &reason=QString())
Call this method when the applet fails to launch properly.
Definition: applet.cpp:366
A customized desktop panel.
Definition: containment.h:105
The applet lives in a plane and has two degrees of freedom to grow.
Definition: plasma.h:65
int width() const
qreal width() const
parent
void setDefaultContainmentPlugin(const QString &name)
Sets the default containment plugin to try and load.
Definition: corona.cpp:96
Containment * addContainmentDelayed(const QString &name, const QVariantList &args=QVariantList())
Loads a containment with delayed initialization, primarily useful for implementations of loadDefaultL...
Definition: corona.cpp:358
QDesktopWidget * desktop()
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:63
virtual QRectF boundingRect() const =0
T & next()
void updateConstraints(Plasma::Constraints constraints=Plasma::AllConstraints)
Called when any of the geometry constraints have been updated.
Definition: applet.cpp:750
int height() const
The AbstractDialogManager class shows the dialogs shown by applets and the rest of the shell...
Definition: abstractdialogmanager.h:43
void setX(int x)
void setY(int y)
Containment * addContainment(const QString &name, const QVariantList &args=QVariantList())
Adds a Containment to the Corona.
Definition: corona.cpp:349
Containment * containmentForScreen(int screen, int desktop=-1) const
Returns the Containment, if any, for a given physical screen and desktop.
Definition: corona.cpp:296
qreal height() const
QGraphicsItem * parentItem() const
The base class for plugins that provide backgrounds and applet grouping containers.
Definition: containment.h:72
void setAppletMimeType(const QString &mimetype)
Sets the mimetype of Drag/Drop items.
Definition: corona.cpp:86
virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
void addItem(QGraphicsItem *item)
qreal height() const
void addOffscreenWidget(QGraphicsWidget *widget)
Adds a widget in the topleft quadrant in the scene.
Definition: corona.cpp:377
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual void init()
This method is called once the applet is loaded and added to a Corona.
Definition: applet.cpp:243
void dragMoveEvent(QGraphicsSceneDragDropEvent *event)
Definition: corona.cpp:653
void dragEnterEvent(QGraphicsSceneDragDropEvent *event)
Definition: corona.cpp:643
void removeOffscreenWidget(QGraphicsWidget *widget)
Removes a widget from the topleft quadrant in the scene.
Definition: corona.cpp:410
A class that holds a map of triggers to plugin names.
Definition: containmentactionspluginsconfig.h:41
virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event)
iterator begin()
QPointF scenePos() const
void destroyed(QObject *obj)
void setEnabled(bool)
void saveLayout(const QString &config=QString()) const
Save applets layout to file.
Definition: corona.cpp:110
QGraphicsView * viewFor(const QGraphicsItem *item)
Returns the most appropriate QGraphicsView for the item.
Definition: plasma.cpp:93
uint toUInt(bool *ok, int base) const
static Applet * load(const QString &name, uint appletId=0, const QVariantList &args=QVariantList())
Attempts to load an applet.
Definition: applet.cpp:2422
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.