Plasma
appletinterface.h
56 * The QML root object defined in the applet main.qml will be direct child of an AppletInterface instance
78 Q_PROPERTY(QString toolTipMainText READ toolTipMainText WRITE setToolTipMainText NOTIFY toolTipMainTextChanged)
84 Q_PROPERTY(QString toolTipSubText READ toolTipSubText WRITE setToolTipSubText NOTIFY toolTipSubTextChanged)
94 Q_PROPERTY(int toolTipTextFormat READ toolTipTextFormat WRITE setToolTipTextFormat NOTIFY toolTipTextFormatChanged)
102 Q_PROPERTY(QQuickItem *toolTipItem READ toolTipItem WRITE setToolTipItem NOTIFY toolTipItemChanged)
123 Q_PROPERTY(Plasma::Types::ContainmentDisplayHints containmentDisplayHints READ containmentDisplayHints NOTIFY containmentDisplayHintsChanged)
136 * Configuration object: each config key will be a writable property of this object. property bindings work.
141 * When true the plasmoid is busy. The containment may graphically indicate that drawing for instance a spinner busy widget over it
146 * How the applet wants its background to be drawn. The containment may chose to ignore this hint.
148 Q_PROPERTY(Plasma::Types::BackgroundHints backgroundHints WRITE setBackgroundHints READ backgroundHints NOTIFY backgroundHintsChanged)
151 * The containment (and/or the user) may decide to use another kind of background instead (if supported by the applet)
153 Q_PROPERTY(Plasma::Types::BackgroundHints userBackgroundHints WRITE setUserBackgroundHints READ userBackgroundHints NOTIFY userBackgroundHintsChanged)
156 * The effective background hints the applet has, internally decided how to mix with userBackgroundHints
158 Q_PROPERTY(Plasma::Types::BackgroundHints effectiveBackgroundHints READ effectiveBackgroundHints NOTIFY effectiveBackgroundHintsChanged)
161 * Whether the Corona is immutable. The plasmoid implementation should avoid allowing "dangerous" modifications from the user when in an immutable mode
175 Q_PROPERTY(Plasma::Types::ImmutabilityType immutability READ immutability NOTIFY immutabilityChanged)
183 * Status of the plasmoid: useful to instruct the shell if this plasmoid is requesting attention, if is accepting input, or if is in an idle, inactive state
188 * Sets the associated application of this plasmoid, if the plasmoid is representing the "compact" view for some application or for some document type.
190 Q_PROPERTY(QString associatedApplication WRITE setAssociatedApplication READ associatedApplication NOTIFY associatedApplicationChanged)
193 * Sets the associated application of this plasmoid, if the plasmoid is representing the "compact" view for some application or for some document type.
195 Q_PROPERTY(QList<QUrl> associatedApplicationUrls WRITE setAssociatedApplicationUrls READ associatedApplicationUrls NOTIFY associatedApplicationUrlsChanged)
214 Q_PROPERTY(bool hideOnWindowDeactivate READ hideOnWindowDeactivate WRITE setHideOnWindowDeactivate NOTIFY hideOnWindowDeactivateChanged)
222 Q_PROPERTY(QKeySequence globalShortcut READ globalShortcut WRITE setGlobalShortcut RESET setGlobalShortcut NOTIFY globalShortcutChanged)
232 Q_PROPERTY(bool configurationRequired READ configurationRequired WRITE setConfigurationRequiredProperty NOTIFY configurationRequiredChanged)
238 QString configurationRequiredReason READ configurationRequiredReason WRITE setConfigurationRequiredReason NOTIFY configurationRequiredReasonChanged)
245 Q_PROPERTY(QRect availableScreenRect READ availableScreenRect NOTIFY availableScreenRectChanged)
250 Q_PROPERTY(QVariantList availableScreenRegion READ availableScreenRegion NOTIFY availableScreenRegionChanged)
258 Q_PROPERTY(Plasma::Types::ConstraintHints constraintHints READ constraintHints WRITE setConstraintHints NOTIFY constraintHintsChanged)
266 Q_PROPERTY(QList<QObject *> contextualActions READ contextualActionsObjects NOTIFY contextualActionsChanged)
268 // TODO: Remove in KF6, it is fixed in Qt 6 via QTBUG-97427. Not an #ifdef, because that would break QML code.
271 * Workaround QML limitation/bug that does not allow to use attached properties themselves as the value of an expression.
296 AppletInterface(DeclarativeAppletScript *script, const QVariantList &args = QVariantList(), QQuickItem *parent = nullptr);
313 * Set this to true if the plasmoid needs to be configured in order to work. The containment will display reason as a message to ask the user to configure.
317 Q_INVOKABLE void setConfigurationRequired(bool needsConfiguring, const QString &reason = QString());
324 * When the action is triggered a function called action_<name> will be called, if there is no function with that name actionTriggered(name) will be called
Q_OBJECTQ_OBJECT
QRect availableScreenRect
screen area free of panels: the coordinates are relative to the containment, it's independent from th...
Definition: appletinterface.h:245
Q_PROPERTY(...)
QVariantList availableScreenRegion
The available region of this screen, panels excluded.
Definition: appletinterface.h:250
ConstraintHints
This enumeration lists the various hints that an applet can pass to its constraint regarding the way ...
Definition: plasma.h:58
Plasma::Types::BackgroundHints userBackgroundHints
The containment (and/or the user) may decide to use another kind of background instead (if supported ...
Definition: appletinterface.h:153
Q_SLOTSQ_SLOTS
QObject configuration
Configuration object: each config key will be a writable property of this object.
Definition: appletinterface.h:138
QQuickItem toolTipItem
This allows to set fully custom QML item as the tooltip.
Definition: appletinterface.h:102
QList< QUrl > associatedApplicationUrls
Sets the associated application of this plasmoid, if the plasmoid is representing the "compact" view ...
Definition: appletinterface.h:195
Q_INVOKABLE QString file(const QString &fileName)
FIXME: remove? Retrieve the path of a file from the Plasmoid package.
Definition: appletinterface.cpp:408
bool editMode
True when the Corona is in an edit mode that allows to move things around.
Definition: appletinterface.h:281
Plasma::Types::BackgroundHints backgroundHints
How the applet wants its background to be drawn.
Definition: appletinterface.h:148
void contextualActionsAboutToShow()
Emitted just before the contextual actions are about to show For instance just before the context men...
Q_INVOKABLE QString downloadPath() const
Definition: appletinterface.cpp:697
FormFactor
The FormFactor enumeration describes how a Plasma::Applet should arrange itself.
Definition: plasma.h:72
QString title
User friendly title for the plasmoid: it's the localized applet name by default.
Definition: appletinterface.h:72
QRect screenGeometry
Provides access to the geometry of the applet is in.
Definition: appletinterface.h:207
void destroyed(QObject *obj)
QString toolTipSubText
Description for the plasmoid tooltip or other means of quick information: it comes from the pluginifo...
Definition: appletinterface.h:84
Plasma::Types::ItemStatus status
Status of the plasmoid: useful to instruct the shell if this plasmoid is requesting attention,...
Definition: appletinterface.h:185
This class is exposed to containments QML as the attached property Plasmoid.
Definition: containmentinterface.h:39
int toolTipTextFormat
how to handle the text format of the tooltip subtext:
Definition: appletinterface.h:94
Q_INVOKABLE void prepareContextualActions()
Should be called before retrieving any action to ensure contents are up to date.
Definition: appletinterface.cpp:854
parent
Plasma::Types::ConstraintHints constraintHints
The hints that the applet gives to its constraint, such as asking to fill all the available space ign...
Definition: appletinterface.h:258
bool hideOnWindowDeactivate
Whether the dialog should be hidden when the dialog loses focus.
Definition: appletinterface.h:214
Q_INVOKABLEQ_INVOKABLE
bool configurationRequired
If true the applet requires manual configuration from the user.
Definition: appletinterface.h:232
Plasma::Types::ImmutabilityType immutability
The immutability of the Corona.
Definition: appletinterface.h:175
ActionPriority
Expose the QAction::Priority values which cannot be directly accessed from plasmoids.
Definition: appletinterface.h:288
Q_SIGNALSQ_SIGNALS
Q_INVOKABLE void setAction(const QString &name, const QString &text, const QString &icon=QString(), const QString &shortcut=QString())
Add an action to the Plasmoid contextual menu.
Definition: appletinterface.cpp:488
Plasma::Types::BackgroundHints effectiveBackgroundHints
The effective background hints the applet has, internally decided how to mix with userBackgroundHints...
Definition: appletinterface.h:158
Q_INVOKABLE void setConfigurationRequired(bool needsConfiguring, const QString &reason=QString())
Set this to true if the plasmoid needs to be configured in order to work.
Definition: appletinterface.cpp:403
bool userConfiguring
True when the user is configuring, for instance when the configuration dialog is open.
Definition: appletinterface.h:180
uint id
Applet id: is unique in the whole Plasma session and will never change across restarts.
Definition: appletinterface.h:112
This class is exposed to applets in QML as the attached property Plasmoid.
Definition: appletinterface.h:51
QString associatedApplication
Sets the associated application of this plasmoid, if the plasmoid is representing the "compact" view ...
Definition: appletinterface.h:190
Location
The Location enumeration describes where on screen an element, such as an Applet or its managing cont...
Definition: plasma.h:158
QString toolTipMainText
Main title for the plasmoid tooltip or other means of quick information: it's the same as the title p...
Definition: appletinterface.h:78
ImmutabilityType
Defines the immutability of items like applets, corona and containments they can be free to modify,...
Definition: plasma.h:235
void externalData(const QString &mimetype, const QVariant &data)
somebody else, usually the containment sent some data to the applet
int apiVersion
The QML root object defined in the applet main.qml will be direct child of an AppletInterface instanc...
Definition: appletinterface.h:62
QString configurationRequiredReason
Reason why the manual user configuration is required.
Definition: appletinterface.h:238
Plasma::Types::ContainmentDisplayHints containmentDisplayHints
Type of the containment we're in.
Definition: appletinterface.h:123
QObject nativeInterface
An interface to the native C++ plasmoid, if implemented.
Definition: appletinterface.h:227
QKeySequence globalShortcut
The global shortcut to activate the plasmoid.
Definition: appletinterface.h:222
LowPriority
Q_INVOKABLE QStringList downloadedFiles() const
Definition: appletinterface.cpp:710
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:05:56 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:05:56 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.