Plasma
applet.cpp
Go to the documentation of this file.
201 d(new AppletPrivate(KService::Ptr(new KService(packagePath + "/metadata.desktop")), 0, appletId, this))
293 m << t.m11() << t.m12() << t.m13() << t.m21() << t.m22() << t.m23() << t.m31() << t.m32() << t.m33();
532 //kDebug() << "???????????????? DESTROYING APPLET" << q->name() << q->scene() << " ???????????????????????????";
900 //Returning the more strict immutability between the applet immutability, Containment and Corona
968 //if the background has an "overlay" element decide a random position for it and then save it so it's consistent across plasma starts
974 d->background->d->overlayPos.rx() = - (overlaySize.width() /2) + (overlaySize.width() /4) * (qrand() % (4 + 1));
975 d->background->d->overlayPos.ry() = (- (overlaySize.height() /2) + (overlaySize.height() /4) * (qrand() % (4 + 1)))/2;
1046 if (!qobject_cast<Plasma::PopupApplet *>(this) && (formFactor() == Plasma::Horizontal || formFactor() == Plasma::Vertical)) {
1062 void Applet::showMessage(const QIcon &icon, const QString &message, const MessageButtons buttons)
1127 connect(d->messageCancelButton.data(), SIGNAL(clicked()), this, SLOT(destroyMessageOverlay()));
1133 connect(d->messageCloseAction.data(), SIGNAL(triggered()), this, SLOT(destroyMessageOverlay()));
1156 connect(d->messageDialog.data(), SIGNAL(destroyed(QObject*)), mainWidget, SLOT(deleteLater()));
1214 //kDebug() << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!";
1225 connect(closeApplet, SIGNAL(triggered(bool)), this, SLOT(selectItemToDestroy()), Qt::UniqueConnection);
1231 connect(configAction, SIGNAL(triggered(bool)), this, SLOT(requestConfiguration()), Qt::UniqueConnection);
1233 connect(configAction, SIGNAL(triggered(bool)), this, SLOT(showConfigurationInterface()), Qt::UniqueConnection);
1245 connect(runAssociatedApplication, SIGNAL(triggered(bool)), this, SLOT(runAssociatedApplication()), Qt::UniqueConnection);
1251 connect(corona, SIGNAL(shortcutsChanged()), this, SLOT(updateShortcuts()), Qt::UniqueConnection);
1331 ((c & Plasma::StartupCompletedConstraint) || (c & Plasma::SizeConstraint && !(c & Plasma::FormFactorConstraint)))) {
1338 //save the old size policy. since ignored doesn't (yet) have a valid use case in containments, use it as special unset value
1346 } else if (d->preferredSizePolicy != QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored)) {
1470 void Applet::paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, const QRect &contentsRect)
1507 if (pa || (parentApplet->size().height() < layout()->effectiveSizeHint(Qt::MinimumSize).height())) {
1509 } else if (pa || (parentApplet->size().width() < layout()->effectiveSizeHint(Qt::MinimumSize).width())) {
1574 //kDebug() << "before" << shortcut.primary() << d->activationAction->globalShortcut().primary();
1591 //kDebug() << "after" << shortcut.primary() << d->activationAction->globalShortcut().primary();
1864 if (immutability() == Mutable && formFactor() == Plasma::Planar && (flags() & ItemIsMovable)) {
1904 if (immutability() != Mutable && !KAuthorized::authorize("plasma/allow_configure_when_locked")) {
1923 const QStringList kcmPlugins = df.desktopGroup().readEntry("X-Plasma-ConfigPlugins", QStringList());
2015 QMetaObject::invokeMethod(containment()->corona()->dialogManager(), "showDialog", Q_ARG(QWidget *, widget), Q_ARG(Plasma::Applet *, this));
2089 QObject::connect(shortcutEditor.data(), SIGNAL(keySequenceChanged(QKeySequence)), dialog, SLOT(settingsModified()));
2097 QObject::connect(dialog, SIGNAL(applyClicked()), q, SLOT(configDialogFinished()), Qt::UniqueConnection);
2098 QObject::connect(dialog, SIGNAL(okClicked()), q, SLOT(configDialogFinished()), Qt::UniqueConnection);
2127 i18nc("%1 is the name of a plasmoid, %2 the name of the machine that plasmoid is published on",
2169 actions->takeAction(a); //FIXME this is stupid, KActionCollection needs a takeAction(QString) method
2305 return QString("((not exist [X-KDE-ParentApp] or [X-KDE-ParentApp] == '') or [X-KDE-ParentApp] == '%1')")
2535 } else if (ff == Vertical && (which == Qt::MaximumSize || size().width() <= KIconLoader::SizeLarge)) {
2635 //currently it's only called before ctmt/applet init, with (true,true), and I'm going to assume it stays that way.
2654 AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int uniqueID, Applet *applet)
2924 KConfigGroup defaultConfig(KSharedConfig::openConfig(defaultConfigFile)->group("Configuration"));
virtual void updateGeometry()
QObject * child(const char *objName, const char *inheritsClass, bool recursiveSearch) const
bool hasValidAssociatedApplication() const
Definition: applet.cpp:2264
virtual void destroy()
Destroys the applet; it will be removed nicely and deleted.
Definition: applet.cpp:479
void setText(const QString &text)
void setPatternSyntax(PatternSyntax syntax)
QGraphicsWidget * parentWidget() const
void addAction(QString name, QAction *action)
Adds the action to our collection under the given name.
Definition: applet.cpp:1395
The applet is constrained horizontally, but can expand vertically.
Definition: plasma.h:77
QGraphicsItem * topLevelItem() const
const Package * package() const
Accessor for the associated Package object if any.
Definition: applet.cpp:691
void activate()
Emitted when activation is requested due to, for example, a global keyboard shortcut.
void setAssociatedApplication(const QString &string)
Sets an application associated to this applet, that will be regarded as a full view of what is repres...
Definition: applet.cpp:2221
A KConfigSkeleton that populates itself based on KConfigXT XML.
QString & append(QChar ch)
Type type() const
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom)
static PluginLoader * pluginLoader()
Return the active plugin loader.
Definition: pluginloader.cpp:67
virtual void showConfigurationInterface()
Lets the user interact with the plasmoid options.
Definition: applet.cpp:1898
int width() const
QRect toRect() const
void flushPendingConstraintsEvents()
Sends all pending contraints updates to the applet.
Definition: applet.cpp:1204
ImmutabilityType
Defines the immutability of items like applets, corona and containments they can be free to modify...
Definition: plasma.h:197
Definition: applet.h:549
virtual void initExtenderItem(ExtenderItem *item)
Gets called when an extender item has to be initialized after a plasma restart.
Definition: applet.cpp:769
void setRenderHint(RenderHint hint, bool on)
virtual int count() const
void setMinimumSize(const QSizeF &size)
void destroy()
Destroys this containment and all its applets (after a confirmation dialog); it will be removed nicel...
Definition: containment.cpp:2053
QRectF mapFromView(const QGraphicsView *view, const QRect &rect) const
Maps a QRect from a view's coordinates to local coordinates.
Definition: applet.cpp:725
void setFlag(GraphicsItemFlag flag, bool enabled)
KConfigGroup config() const
fetch the configuration of this widget.
Definition: extenderitem.cpp:240
virtual void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const
virtual QGraphicsLayoutItem * itemAt(int i) const =0
Definition: framesvg.h:93
void addAction(QAction *action)
QRectF geometry() const
ConfigLoader * configScheme() const
Returns the config skeleton object from this applet's package, if any.
Definition: applet.cpp:675
void setRowStretchFactor(int row, int stretch)
bool hasAuthorization(const QString &constraint) const
Returns true if the applet is allowed to perform functions covered by the given constraint eg...
Definition: applet.cpp:2215
virtual void restore(KConfigGroup &group)
Restores state information about this applet saved previously in save(KConfigGroup&).
Definition: applet.cpp:310
the item is locked down by the system, the user can't unlock it
Definition: plasma.h:201
virtual Location location() const
Returns the location of the scene which is displaying applet.
Definition: applet.cpp:1618
void addItem(QGraphicsLayoutItem *item, int row, int column, int rowSpan, int columnSpan, QFlags< Qt::AlignmentFlag > alignment)
void newStatus(Plasma::ItemStatus status)
Emitted when the applet status changes.
virtual FormFactor formFactor() const
Returns the current form factor the applet is being displayed in.
Definition: applet.cpp:1479
The applet is no wider (in horizontal formfactors) or no higher (in vertical ones) than a square...
Definition: plasma.h:215
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
QPointF mapToScene(const QPoint &point) const
Applet(QGraphicsItem *parent=0, const QString &serviceId=QString(), uint appletId=0)
Definition: applet.cpp:136
void setVisible(bool)
const T & at(int i) const
virtual void constraintsEvent(Plasma::Constraints constraints)
Definition: applet.cpp:755
const QObjectList & children() const
void publish(Plasma::AnnouncementMethods methods, const QString &resourceName)
Publishes and optionally announces this applet on the network for remote access.
Definition: applet.cpp:1680
bool contains(const QString &str, Qt::CaseSensitivity cs) const
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Reimplemented from QGraphicsLayoutItem.
Definition: applet.cpp:2548
void geometryChanged()
Emitted whenever the applet makes a geometry change, so that views can coordinate themselves with the...
QRectF sceneBoundingRect() const
QPoint mapToGlobal(const QPoint &pos) const
void save()
On the planar desktop layer, extending across the full screen from edge to edge.
Definition: plasma.h:111
T value() const
sceneRect
static QStringList listCategories(const QString &parentApp=QString(), bool visibleOnly=true)
Returns a list of all the categories used by installed applets.
Definition: applet.cpp:2351
Definition: context.h:33
bool isScaling() const
the immutability (locked) nature of the applet changed
Definition: plasma.h:50
QList< QGraphicsItem * > childItems() const
void setCustomCategories(const QStringList &categories)
Sets the list of custom categories that are used in addition to the default set of categories known t...
Definition: applet.cpp:2394
virtual void saveState(KConfigGroup &config) const
When called, the Applet should write any information needed as part of the Applet's running state to ...
Definition: applet.cpp:426
bool exists() const
QString & remove(int position, int n)
KPluginInfo::List listAppletInfo(const QString &category, const QString &parentApp=QString())
Returns a list of all known applets.
Definition: pluginloader.cpp:247
virtual bool event(QEvent *event)
void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Reimplemented from QGraphicsLayoutItem.
Definition: applet.cpp:2543
KUrl::List associatedApplicationUrls() const
Definition: applet.cpp:2252
QGraphicsScene * scene() const
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
Not drawing a background under the applet, the applet has its own implementation. ...
Definition: applet.h:104
QString toString(QFlags< QUrl::FormattingOption > options) const
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Reimplemented from QGraphicsItem.
Definition: applet.cpp:2436
AppletScript * loadScriptEngine(const QString &language, Applet *applet)
Loads an Applet script engine for the given language.
Definition: scriptengine.cpp:206
void update(const QRectF &rect)
The applet is constrained vertically, but can expand horizontally.
Definition: plasma.h:75
void setHasConfigurationInterface(bool hasInterface)
Sets whether or not this applet provides a user interface for configuring the applet.
Definition: applet.cpp:1724
static AuthorizationManager * self()
Singleton pattern accessor.
Definition: authorizationmanager.cpp:64
int x() const
int y() const
bool configurationRequired() const
virtual void paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, const QRect &contentsRect)
This method is called when the interface should be painted.
Definition: applet.cpp:1470
int size() const
void setOrientation(Qt::Orientation orientation)
Definition: tooltipcontent.h:47
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
virtual void configChanged()
Called when applet configuration values have changed.
Definition: applet.cpp:2198
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom)
ImmutabilityType immutability() const
void clear()
void resize(const QSizeF &size)
QList< QAction * > actions() const
QPointF pos() const
The standard background from the theme is drawn.
Definition: applet.h:106
QTransform transform() const
qreal zValue() const
QPointF pos() const
QGraphicsItemGroup * group() const
QString associatedApplication() const
Definition: applet.cpp:2247
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QFont font()
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
void setGlobalShortcut(const KShortcut &shortcut)
Sets the global shorcut to associate with this widget.
Definition: applet.cpp:1556
int count(const T &value) const
KSharedConfig::Ptr config() const
Returns the config file used to store the configuration for this Corona.
Definition: corona.cpp:340
bool shouldConserveResources() const
Whether the applet should conserve resources.
bool isEmpty() const
virtual void createConfigurationInterface(KConfigDialog *parent)
Reimplement this method so provide a configuration interface, parented to the supplied widget...
Definition: applet.cpp:2208
static PackageStructure::Ptr packageStructure()
Definition: applet.cpp:234
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event)
Definition: applet.cpp:1779
void setAccepted(bool accepted)
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
QPainterPath roundedRectangle(const QRectF &rect, qreal radius)
Returns a nicely rounded rectanglular path for painting.
Definition: paintutils.cpp:159
void registerAsDragHandle(QGraphicsItem *item)
Register the widgets that manage mouse clicks but you still want to be able to drag the applet around...
Definition: applet.cpp:1647
virtual int count() const =0
void removeItem(QGraphicsItem *item)
Location
The Location enumeration describes where on screen an element, such as an Applet or its managing cont...
Definition: plasma.h:108
void unregisterAsDragHandle(QGraphicsItem *item)
Unregister a widget registered with registerAsDragHandle.
Definition: applet.cpp:1657
static KPluginInfo::List listAppletInfo(const QString &category=QString(), const QString &parentApp=QString())
Returns a list of all known applets.
Definition: applet.cpp:2312
void fillPath(const QPainterPath &path, const QBrush &brush)
bool isBusy() const
void setWidth(qreal width)
static KPluginInfo::List listAppletInfoForMimetype(const QString &mimetype)
Returns a list of all known applets associated with a certain mimetype.
Definition: applet.cpp:2317
bool sendEvent(QGraphicsItem *item, QEvent *event)
qreal m31() const
qreal m32() const
qreal m33() const
qreal m11() const
qreal m12() const
qreal m13() const
qreal m21() const
qreal m22() const
qreal m23() const
Allows applets to automatically 'collapse' into an icon when put in an panel, and is a convenient bas...
Definition: popupapplet.h:52
QPointF topLeft() const
bool isEmpty() const
Definition: animator.h:67
QPointF mapFromScene(const QPointF &point) const
QSizeF effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint) const
QGraphicsItem * focusItem() const
QTransform & rotateRadians(qreal angle, Qt::Axis axis)
void paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition: applet.cpp:994
void setDescription(const QString &)
Set the description used to provide some general information what the package is about.
Definition: packagemetadata.cpp:269
QPoint mapFromScene(const QPointF &point) const
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event)
void registerWidget(QGraphicsWidget *widget)
Registers a widget with the tooltip manager.
Definition: tooltipmanager.cpp:200
void setIcon(const QIcon &icon)
Sets the graphical icon for this Plasma::IconWidget.
Definition: iconwidget.cpp:1324
virtual bool eventFilter(QObject *watched, QEvent *event)
void setImmutability(const ImmutabilityType immutable)
Sets the immutability type for this applet (not immutable, user immutable or system immutable) ...
Definition: applet.cpp:919
FormFactor
The FormFactor enumeration describes how a Plasma::Applet should arrange itself.
Definition: plasma.h:64
void removeSceneEventFilter(QGraphicsItem *filterItem)
void deleteLater()
void runAssociatedApplication()
Open the application associated to this applet, if it's not set but some urls are, open those urls with the proper application for their mimetype.
Definition: applet.cpp:2257
void setImage(const QString &path)
Sets the path to an image to display.
Definition: pushbutton.cpp:234
virtual void removeAssociatedWidget(QWidget *widget)
un-associate actions from this widget, including ones added after this call.
Definition: applet.cpp:1613
GraphicsItemFlags flags() const
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
Reimplemented from QGraphicsLayoutItem.
Definition: applet.cpp:2509
isActiveWindow
Q_INVOKABLE DataEngine * dataEngine(const QString &name) const
Loads the given DataEngine.
Definition: applet.cpp:680
virtual void updateGeometry()
Direction locationToDirection(Location location)
Converts a location to a direction.
Definition: plasma.cpp:51
void geometryChanged()
void prepareGeometryChange()
void setSizePolicy(const QSizePolicy &policy)
void hide(QGraphicsWidget *widget)
Hides the tooltip for a widget immediately.
Definition: tooltipmanager.cpp:188
virtual QPainterPath shape() const
QSize toSize() const
QString toLower() const
Applet * loadApplet(const QString &name, uint appletId=0, const QVariantList &args=QVariantList())
Load an Applet plugin.
Definition: pluginloader.cpp:79
static QScriptValue toString(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:57
Plasma::AspectRatioMode aspectRatioMode() const
Definition: applet.cpp:1631
Direction locationToInverseDirection(Location location)
Converts a location to the direction facing it.
Definition: plasma.cpp:72
static KPluginInfo::List listAppletInfoForUrl(const QUrl &url)
Returns a list of all known applets associated with a certain URL.
Definition: applet.cpp:2327
void setParent(QObject *parent)
static Applet * loadPlasmoid(const QString &path, uint appletId=0, const QVariantList &args=QVariantList())
Attempts to load an applet from a package.
Definition: applet.cpp:2404
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
bool contains(const T &value) const
void setRenderHints(QFlags< QPainter::RenderHint > hints, bool on)
void restore()
void resizeEvent(QGraphicsSceneResizeEvent *event)
Reimplemented from QGraphicsItem.
Definition: applet.cpp:1879
QList< QGraphicsItem * > children() const
void setText(const QString &text)
Sets the display text for this PushButton.
Definition: pushbutton.cpp:223
void setColumnStretchFactor(int column, int stretch)
void setConfigurationRequired(bool needsConfiguring, const QString &reason=QString())
When the applet needs to be configured before being usable, this method can be called to show a stand...
Definition: applet.cpp:1010
void addStretch(int stretch)
void setMaximumSize(const QSizeF &size)
QString & replace(int position, int n, QChar after)
specify that this rule is valid for all users
Definition: authorizationrule.h:86
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
QVariant data(int key) const
The applet lives in a plane and has two degrees of freedom to grow.
Definition: plasma.h:65
QGraphicsView * view() const
Returns the view this widget is visible on, or 0 if none can be found.
Definition: applet.cpp:696
QRect mapToView(const QGraphicsView *view, const QRectF &rect) const
Maps a QRectF from local coordinates to a view's coordinates.
Definition: applet.cpp:731
QPointF mapToScene(const QPointF &point) const
void addItem(QGraphicsLayoutItem *item)
bool isRegisteredAsDragHandle(QGraphicsItem *item)
Definition: applet.cpp:1670
parent
QPoint toPoint() const
void extenderItemRestored(Plasma::ExtenderItem *item)
Emitted when an ExtenderItem in a scripting applet needs to be initialized.
access for messages matching this rule is allowed.
Definition: authorizationrule.h:75
void addStretch(int stretch)
QString category() const
Returns the category the applet is in, as specified in the .desktop file.
QPoint popupPosition(const QSize &s) const
Reccomended position for a popup window like a menu or a tooltip given its size.
Definition: applet.cpp:737
QTransform transform() const
KConfigGroup globalConfig() const
Returns a KConfigGroup object to be shared by all applets of this type.
Definition: applet.cpp:463
void setBackgroundHints(const BackgroundHints hints)
Sets the BackgroundHints for this applet.
Definition: applet.cpp:938
void updateConstraints(Plasma::Constraints constraints=Plasma::AllConstraints)
Called when any of the geometry constraints have been updated.
Definition: applet.cpp:750
QString name() const
Returns the user-visible name for the applet, as specified in the .desktop file.
void setAssociatedApplicationUrls(const KUrl::List &urls)
Sets a list of urls associated to this application, they will be used as parameters for the associate...
Definition: applet.cpp:2234
uint id() const
void setTransform(const QTransform &matrix, bool combine)
QRectF rect() const
static Plasma::Animation * create(Animator::Animation type, QObject *parent=0)
Factory to build new animation objects.
Definition: animator.cpp:61
int height() const
QSet< T > fromList(const QList< T > &list)
virtual void focusInEvent(QFocusEvent *event)
qreal & rx()
qreal & ry()
Definition: iconwidget.h:56
void showMessage(const QIcon &icon, const QString &message, const Plasma::MessageButtons buttons)
Shows a message as an overlay of the applet: the message has an icon, text and (optional) buttons...
Definition: applet.cpp:1062
QWidget * load(QIODevice *device, QWidget *parentWidget)
virtual void save(KConfigGroup &group) const
Saves state information about this applet that will be accessed when next instantiated in the restore...
Definition: applet.cpp:260
int timerId() const
QGraphicsWidget(QGraphicsItem *parent, QFlags< Qt::WindowType > wFlags)
void immutabilityChanged(Plasma::ImmutabilityType immutable)
Emitted when the immutability changes.
QString localHostName()
void installSceneEventFilter(QGraphicsItem *filterItem)
virtual void addAssociatedWidget(QWidget *widget)
associate actions with this widget, including ones added after this call.
Definition: applet.cpp:1608
void setContent(QGraphicsWidget *widget, const ToolTipContent &data)
Sets the content for the tooltip associated with a widget.
Definition: tooltipmanager.cpp:229
void setAlphaF(qreal alpha)
bool isValid() const
void sort()
QRectF adjusted(qreal dx1, qreal dy1, qreal dx2, qreal dy2) const
QSizePolicy sizePolicy() const
QGraphicsItem * parentItem() const
BackgroundHints backgroundHints() const
bool contains(const QPointF &point) const
void show()
void setAspectRatioMode(Plasma::AspectRatioMode)
Sets the preferred aspect ratio mode for placement and resizing.
Definition: applet.cpp:1636
bool hasFailedToLaunch() const
If for some reason, the applet fails to get up on its feet (the library couldn't be loaded...
Q_INVOKABLE QColor color(ColorRole role) const
Returns the text color to be used by items resting on the background.
Definition: theme.cpp:918
QRectF contentsRect() const
void setLayout(QGraphicsLayout *layout)
bool hasConfigurationInterface() const
void appletDestroyed(Plasma::Applet *applet)
Emitted when the applet is deleted.
The base class for plugins that provide backgrounds and applet grouping containers.
Definition: containment.h:72
void start(QAbstractAnimation::DeletionPolicy policy)
void configNeedsSaving()
Emitted when an applet has changed values in its configuration and wishes for them to be saved at the...
QPointF pos() const
qreal height() const
void addOffscreenWidget(QGraphicsWidget *widget)
Adds a widget in the topleft quadrant in the scene.
Definition: corona.cpp:377
An alternate version of the background is drawn, usually more translucent.
Definition: applet.h:107
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Q_INVOKABLE QAction * action(QString name) const
Returns the QAction with the given name from our collection.
Definition: applet.cpp:1390
QObject * parent() const
Default settings: both standard background.
Definition: applet.h:109
virtual void init()
This method is called once the applet is loaded and added to a Corona.
Definition: applet.cpp:243
Definition: configloader.h:75
void setHeight(qreal height)
virtual void resizeEvent(QGraphicsSceneResizeEvent *event)
PackageStructure::Ptr packageStructure(const QString &language, ComponentType type)
Loads an appropriate PackageStructure for the given language and type.
Definition: scriptengine.cpp:274
Context * context() const
Returns the workspace context which the applet is operating in.
Definition: applet.cpp:1624
bool exactMatch(const QString &str) const
void setAlignment(QGraphicsLayoutItem *item, QFlags< Qt::AlignmentFlag > alignment)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QString toString() const
void setZValue(qreal z)
void setName(const QString &)
Set the name of the package used to displayed a short describing name.
Definition: packagemetadata.cpp:264
QRect screenRect() const
This method returns screen coordinates for the widget; this method can be somewhat expensive and shou...
Definition: applet.cpp:2598
virtual void setGeometry(const QRectF &rect)
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: applet.cpp:1862
virtual QRectF boundingRect() const
void releaseVisualFocus()
This signal indicates that an application launch, window creation or window focus event was triggered...
No constraint; never passed in to Applet::constraintsEvent on its own.
Definition: plasma.h:45
void setWordWrap(bool on)
virtual QList< QAction * > contextualActions()
Returns a list of context-related QAction instances.
Definition: applet.cpp:1384
QPointF scenePos() const
qreal width() const
void setEnabled(bool)
virtual void removeAt(int index)=0
void setIcon(const QString &icon)
Set the icon name to be used with this package.
Definition: packagemetadata.cpp:189
void setTargetWidget(QGraphicsWidget *widget)
Set the widget on which the animation is to be performed.
Definition: animation.cpp:62
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.