7#include "appletquickitem.h"
9#include "appletcontext_p.h"
10#include "appletquickitem_p.h"
11#include "configview.h"
12#include "containment.h"
14#include "plasma_version.h"
15#include "plasmoid/containmentitem.h"
16#include "plasmoid/plasmoiditem.h"
17#include "plasmoid/wallpaperitem.h"
18#include "plasmoidattached_p.h"
19#include "sharedqmlengine.h"
23#include <QQmlExpression>
24#include <QQmlProperty>
25#include <QQuickWindow>
26#include <QRandomGenerator>
30#include <KLocalizedString>
32#include <Plasma/Applet>
33#include <Plasma/Containment>
34#include <Plasma/Corona>
35#include <qquickitem.h>
41AppletQuickItemPrivate::PreloadPolicy AppletQuickItemPrivate::s_preloadPolicy = AppletQuickItemPrivate::Uninitialized;
43AppletQuickItemPrivate::AppletQuickItemPrivate(AppletQuickItem *item)
48 , compactRepresentationCheckGuard(false)
50 if (s_preloadPolicy == Uninitialized) {
52 s_preloadPolicy = Adaptive;
54 if (qEnvironmentVariableIsSet(
"PLASMA_PRELOAD_POLICY")) {
55 const QString policy = qEnvironmentVariable(
"PLASMA_PRELOAD_POLICY");
57 s_preloadPolicy = Aggressive;
59 s_preloadPolicy =
None;
63 qCInfo(LOG_PLASMAQUICK) <<
"Applet preload policy set to" << s_preloadPolicy;
67int AppletQuickItemPrivate::preloadWeight()
const
74 defaultWeight = DefaultLauncherPreloadWeight;
76 defaultWeight = DefaultPreloadWeight;
81 applet->config().readEntry(QStringLiteral(
"PreloadWeight"), qMax(defaultWeight, applet->pluginMetaData().value(u
"X-Plasma-PreloadWeight", 0))),
85QObject *AppletQuickItemPrivate::searchLayoutAttached(
QObject *parent)
const
90 const auto lstChildren = parent->
children();
91 for (
QObject *child : lstChildren) {
94 if (child->property(
"minimumWidth").isValid()
95 && child->property(
"minimumHeight").isValid()
96 && child->property(
"preferredWidth").isValid()
97 && child->property(
"preferredHeight").isValid()
98 && child->property(
"maximumWidth").isValid()
99 && child->property(
"maximumHeight").isValid()
100 && child->property(
"fillWidth").isValid()
101 && child->property(
"fillHeight").isValid()) {
109void AppletQuickItemPrivate::connectLayoutAttached(
QObject *item)
116 QObject *layout = searchLayoutAttached(item);
122 ownLayout->setProperty(
"minimumWidth", 0);
123 ownLayout->setProperty(
"minimumHeight", 0);
124 ownLayout->setProperty(
"preferredWidth", -1);
125 ownLayout->setProperty(
"preferredHeight", -1);
126 ownLayout->setProperty(
"maximumWidth", std::numeric_limits<qreal>::infinity());
127 ownLayout->setProperty(
"maximumHeight", std::numeric_limits<qreal>::infinity());
128 ownLayout->setProperty(
"fillWidth",
false);
129 ownLayout->setProperty(
"fillHeight",
false);
135 propagateSizeHint(
"minimumWidth");
136 propagateSizeHint(
"minimumHeight");
137 propagateSizeHint(
"preferredWidth");
138 propagateSizeHint(
"preferredHeight");
139 propagateSizeHint(
"maximumWidth");
140 propagateSizeHint(
"maximumHeight");
141 propagateSizeHint(
"fillWidth");
142 propagateSizeHint(
"fillHeight");
144 QObject *newOwnLayout = searchLayoutAttached(q);
152 if (representationLayout == layout) {
156 if (representationLayout) {
161 QObject::connect(layout, SIGNAL(minimumWidthChanged()), q, SLOT(minimumWidthChanged()));
162 QObject::connect(layout, SIGNAL(minimumHeightChanged()), q, SLOT(minimumHeightChanged()));
164 QObject::connect(layout, SIGNAL(preferredWidthChanged()), q, SLOT(preferredWidthChanged()));
165 QObject::connect(layout, SIGNAL(preferredHeightChanged()), q, SLOT(preferredHeightChanged()));
167 QObject::connect(layout, SIGNAL(maximumWidthChanged()), q, SLOT(maximumWidthChanged()));
168 QObject::connect(layout, SIGNAL(maximumHeightChanged()), q, SLOT(maximumHeightChanged()));
170 QObject::connect(layout, SIGNAL(fillWidthChanged()), q, SLOT(fillWidthChanged()));
171 QObject::connect(layout, SIGNAL(fillHeightChanged()), q, SLOT(fillHeightChanged()));
173 representationLayout = layout;
174 ownLayout = newOwnLayout;
176 propagateSizeHint(
"minimumWidth");
177 propagateSizeHint(
"minimumHeight");
178 propagateSizeHint(
"preferredWidth");
179 propagateSizeHint(
"preferredHeight");
180 propagateSizeHint(
"maximumWidth");
181 propagateSizeHint(
"maximumHeight");
182 propagateSizeHint(
"fillWidth");
183 propagateSizeHint(
"fillHeight");
186void AppletQuickItemPrivate::propagateSizeHint(
const QByteArray &layoutProperty)
188 if (ownLayout && representationLayout) {
189 ownLayout->setProperty(layoutProperty.
constData(), representationLayout->property(layoutProperty.
constData()).toReal());
193QQuickItem *AppletQuickItemPrivate::createCompactRepresentationItem()
195 if (!compactRepresentation) {
199 if (compactRepresentationItem) {
200 return compactRepresentationItem;
203 QVariantHash initialProperties;
207 compactRepresentationItem = qobject_cast<QQuickItem *>(qmlObject->createObjectFromComponent(compactRepresentation, qmlContext(q), initialProperties));
209 Q_EMIT q->compactRepresentationItemChanged(compactRepresentationItem);
211 return compactRepresentationItem;
214QQuickItem *AppletQuickItemPrivate::createFullRepresentationItem()
216 if (fullRepresentationItem) {
217 return fullRepresentationItem;
220 if (fullRepresentation && fullRepresentation != qmlObject->mainComponent()) {
221 QVariantHash initialProperties;
222 initialProperties[QStringLiteral(
"parent")] =
QVariant();
223 fullRepresentationItem = qobject_cast<QQuickItem *>(qmlObject->createObjectFromComponent(fullRepresentation, qmlContext(q), initialProperties));
226 if (!fullRepresentationItem) {
230 Q_EMIT q->fullRepresentationItemChanged(fullRepresentationItem);
232 return fullRepresentationItem;
235QQuickItem *AppletQuickItemPrivate::createCompactRepresentationExpanderItem()
237 if (!compactRepresentationExpander) {
241 if (compactRepresentationExpanderItem) {
242 return compactRepresentationExpanderItem;
245 compactRepresentationExpanderItem = qobject_cast<QQuickItem *>(qmlObject->createObjectFromComponent(compactRepresentationExpander, qmlContext(q)));
247 if (!compactRepresentationExpanderItem) {
254 return compactRepresentationExpanderItem;
257bool AppletQuickItemPrivate::appletShouldBeExpanded()
const
259 if (applet->isContainment()) {
263 if (!fullRepresentation) {
268 if (switchWidth > 0 && switchHeight > 0) {
276 if (compactRepresentationItem && fullRepresentationItem) {
277 QObject *compactLayout = searchLayoutAttached(compactRepresentationItem);
278 QObject *fullLayout = searchLayoutAttached(fullRepresentationItem);
279 if (compactLayout && fullLayout) {
283 if ((compactPreferred.
width() > fullPreferred.
width() && compactPreferred.
width() > switchWidth) ||
284 (compactPreferred.
height() > fullPreferred.
height() && compactPreferred.
height() > switchHeight)) {
289 return q->width() > switchWidth && q->height() > switchHeight;
294 if (preferredRepresentation) {
295 return preferredRepresentation == fullRepresentation;
304void AppletQuickItemPrivate::preloadForExpansion()
311 if (!createFullRepresentationItem()) {
316 if (!appletShouldBeExpanded() && !applet->isContainment() && (!preferredRepresentation || preferredRepresentation != fullRepresentation)) {
317 createCompactRepresentationExpanderItem();
320 if (!appletShouldBeExpanded() && compactRepresentationExpanderItem) {
322 }
else if (fullRepresentationItem) {
327 if (fullRepresentationItem && fullRepresentationItem->window()) {
328 fullRepresentationItem->window()->create();
343void AppletQuickItemPrivate::compactRepresentationCheck()
350 if (q->width() <= 0 || q->height() <= 0) {
355 if (compactRepresentationCheckGuard) {
359 bool full = appletShouldBeExpanded();
361 if ((full && fullRepresentationItem && fullRepresentationItem == currentRepresentationItem)
362 || (!full && compactRepresentationItem && compactRepresentationItem == currentRepresentationItem)) {
366 compactRepresentationCheckGuard =
true;
370 QQuickItem *item = createFullRepresentationItem();
374 if (compactRepresentationExpanderItem) {
375 compactRepresentationExpanderItem->setProperty(
"fullRepresentation",
QVariant());
376 compactRepresentationExpanderItem->setProperty(
"compactRepresentation",
QVariant());
377 compactRepresentationExpanderItem->setVisible(
false);
380 const bool fullRepresentationWasVisible = fullRepresentationItem->parentItem() == q;
386 anchorsFillParent(item, q);
389 if (compactRepresentationItem) {
390 compactRepresentationItem->setVisible(
false);
393 currentRepresentationItem = item;
394 connectLayoutAttached(item);
396 if (!expanded && !fullRepresentationWasVisible) {
398 Q_EMIT q->expandedChanged(
true);
404 QQuickItem *compactItem = createCompactRepresentationItem();
405 QQuickItem *compactExpanderItem = createCompactRepresentationExpanderItem();
407 if (compactItem && compactExpanderItem) {
412 anchorsFillParent(compactExpanderItem, q);
416 const bool fullRepresentationWasVisible = fullRepresentationItem && fullRepresentationItem->parentItem() == q;
417 if (fullRepresentationItem && fullRepresentationWasVisible) {
418 fullRepresentationItem->setProperty(
"parent",
QVariant());
425 currentRepresentationItem = compactItem;
426 connectLayoutAttached(compactItem);
430 if (expanded && fullRepresentationWasVisible) {
432 Q_EMIT q->expandedChanged(
false);
437 compactRepresentationCheckGuard =
false;
440void AppletQuickItemPrivate::minimumWidthChanged()
442 propagateSizeHint(
"minimumWidth");
445void AppletQuickItemPrivate::minimumHeightChanged()
447 propagateSizeHint(
"minimumHeight");
450void AppletQuickItemPrivate::preferredWidthChanged()
452 propagateSizeHint(
"preferredWidth");
455void AppletQuickItemPrivate::preferredHeightChanged()
457 propagateSizeHint(
"preferredHeight");
460void AppletQuickItemPrivate::maximumWidthChanged()
462 propagateSizeHint(
"maximumWidth");
465void AppletQuickItemPrivate::maximumHeightChanged()
467 propagateSizeHint(
"maximumHeight");
470void AppletQuickItemPrivate::fillWidthChanged()
472 propagateSizeHint(
"fillWidth");
475void AppletQuickItemPrivate::fillHeightChanged()
477 propagateSizeHint(
"fillHeight");
480AppletQuickItem::AppletQuickItem(
QQuickItem *parent)
482 , d(new AppletQuickItemPrivate(this))
486AppletQuickItem::~AppletQuickItem()
488 AppletQuickItemPrivate::s_itemsForApplet.
remove(d->applet);
490 if (d->s_preloadPolicy >= AppletQuickItemPrivate::Adaptive) {
491 d->applet->config().writeEntry(QStringLiteral(
"PreloadWeight"), qMax(0, d->preloadWeight() - AppletQuickItemPrivate::PreloadWeightDecrement));
495 delete d->compactRepresentationItem;
496 delete d->fullRepresentationItem;
497 delete d->compactRepresentationExpanderItem;
503 return AppletQuickItemPrivate::s_itemsForApplet.
contains(applet);
506AppletQuickItem *AppletQuickItem::itemForApplet(
Plasma::Applet *applet)
513 if (AppletQuickItemPrivate::s_itemsForApplet.isEmpty()) {
514 const char *uri =
"org.kde.plasma.plasmoid";
515 qmlRegisterExtendedType<Plasma::Applet, PlasmoidAttached>(uri, 2, 0,
"Plasmoid");
516 qmlRegisterExtendedType<Plasma::Containment, ContainmentAttached>(uri, 2, 0,
"Containment");
518 qmlRegisterType<PlasmoidItem>(uri, 2, 0,
"PlasmoidItem");
519 qmlRegisterType<ContainmentItem>(uri, 2, 0,
"ContainmentItem");
520 qmlRegisterType<WallpaperItem>(uri, 2, 0,
"WallpaperItem");
521 qmlRegisterAnonymousType<Plasma::Corona>(
"org.kde.plasma.plasmoid", 1);
523 auto it = AppletQuickItemPrivate::s_itemsForApplet.
constFind(applet);
524 if (it != AppletQuickItemPrivate::s_itemsForApplet.constEnd()) {
529 if (qApp->closingDown() || applet->
destroyed()) {
535 qmlObject->engine()->setProperty(
"_kirigamiTheme", QStringLiteral(
"KirigamiPlasmaStyle"));
536 qmlObject->setInitializationDelayed(
true);
539 AppletQuickItem *item =
nullptr;
540 qmlObject->setSource(applet->mainScript());
542 item = qobject_cast<ContainmentItem *>(qmlObject->rootObject());
543 if (!item && qmlObject->mainComponent() && !qmlObject->mainComponent()->isError()) {
547 item = qobject_cast<PlasmoidItem *>(qmlObject->rootObject());
548 if (!item && qmlObject->mainComponent() && !qmlObject->mainComponent()->isError()) {
553 if (!item || !qmlObject->mainComponent() || qmlObject->mainComponent()->isError() || applet->
failedToLaunch()) {
557 errorData[QStringLiteral(
"appletName")] =
i18n(
"Unknown Applet");
558 errorData[QStringLiteral(
"isDebugMode")] = qEnvironmentVariableIntValue(
"PLASMA_ENABLE_QML_DEBUG") != 0;
560 if (applet->sourceValid()) {
567 bool versionMismatch =
false;
568 const int plasma_version_major = 6;
571 "This Widget was written for an unknown older version of Plasma and is not compatible with Plasma %1. Please contact the widget's author for "
572 "an updated version.",
573 plasma_version_major);
574 compactReason =
i18n(
"%1 is not compatible with Plasma %2", applet->
pluginMetaData().
name(), plasma_version_major);
575 versionMismatch =
true;
576 }
else if (
version.majorVersion() < plasma_version_major) {
578 i18n(
"This Widget was written for Plasma %1 and is not compatible with Plasma %2. Please contact the widget's author for an updated version.",
580 plasma_version_major);
581 compactReason =
i18n(
"%1 is not compatible with Plasma %2", applet->
pluginMetaData().
name(), plasma_version_major);
582 versionMismatch =
true;
583 }
else if (
version.majorVersion() > plasma_version_major ||
version.minorVersion() > PLASMA_VERSION_MINOR) {
584 reason =
i18n(
"This Widget was written for Plasma %1 and is not compatible with Plasma %2. Please update Plasma in order to use the widget.",
586 plasma_version_major);
587 compactReason =
i18n(
"%1 is not compatible with Plasma %2", applet->
pluginMetaData().
name(), plasma_version_major);
588 versionMismatch =
true;
591 compactReason = reason;
596 if (compactReason !=
QString()) {
597 errorData[QStringLiteral(
"compactError")] = compactReason;
600 if (!versionMismatch) {
601 const auto errors = qmlObject->mainComponent()->errors();
610 reason +=
i18n(
"Error loading QML file: %1 %2", qmlObject->mainComponent()->url().toString(), reason);
613 reason =
i18n(
"Error loading Applet: package %1 does not exist.", pluginId);
615 compactReason =
i18n(
"Sorry! There was an error loading %1.", pluginId);
616 errorData[QStringLiteral(
"compactError")] = compactReason;
620 << errorData[QStringLiteral(
"errors")].toVariant().toStringList();
626 if (qmlObject->mainComponent()->isError()) {
630 item = qobject_cast<PlasmoidItem *>(qmlObject->rootObject());
634 item->setProperty(
"errorInformation", errorData);
637 qCWarning(LOG_PLASMAQUICK) <<
"Applet Error message is not of type PlasmoidItem"
643 AppletQuickItemPrivate::s_itemsForApplet[applet] = item;
644 qmlObject->setInitializationDelayed(
false);
645 qmlObject->completeInitialization();
654 item->d->applet = applet;
655 item->d->qmlObject = qmlObject;
657 if (!qEnvironmentVariableIntValue(
"PLASMA_NO_CONTEXTPROPERTIES")) {
658 qmlObject->rootContext()->setContextProperty(QStringLiteral(
"plasmoid"), applet);
665 if (qmlObject->parent() == applet) {
668 AppletQuickItemPrivate::s_itemsForApplet.
remove(applet);
681void AppletQuickItem::init()
687 if (d->initComplete) {
691 if (d->applet->containment()) {
692 if (d->applet->containment()->corona()) {
693 d->coronaPackage = d->applet->containment()->corona()->kPackage();
698 QQmlEngine *engine = d->qmlObject->engine().get();
703 if (!d->compactRepresentation && d->fullRepresentation) {
705 d->compactRepresentation->loadUrl(d->coronaPackage.fileUrl(
"defaultcompactrepresentation"));
706 Q_EMIT compactRepresentationChanged(d->compactRepresentation);
710 if (!d->compactRepresentationExpander && d->fullRepresentation) {
711 d->compactRepresentationExpander =
new QQmlComponent(engine,
this);
712 QUrl compactExpanderUrl = d->applet->containment()->compactApplet();
713 if (compactExpanderUrl.
isEmpty()) {
714 compactExpanderUrl = d->coronaPackage.fileUrl(
"compactapplet");
717 d->compactRepresentationExpander->loadUrl(compactExpanderUrl);
720 d->initComplete =
true;
721 d->compactRepresentationCheck();
726 if (d->applet->isContainment() || d->expanded || d->preferredRepresentation == d->fullRepresentation) {
730 if (!d->applet->isContainment() && d->applet->containment()) {
732 if (uiReady && d->s_preloadPolicy >= AppletQuickItemPrivate::Adaptive) {
733 const int preloadWeight = d->preloadWeight();
734 qCDebug(LOG_PLASMAQUICK) <<
"New Applet " << d->applet->title() <<
"with a weight of" << preloadWeight;
737 if (d->s_preloadPolicy >= AppletQuickItemPrivate::Aggressive || preloadWeight >= AppletQuickItemPrivate::DelayedPreloadWeight) {
742 const int min = (100 - preloadWeight) * 20;
743 const int max = (100 - preloadWeight) * 100;
744 const int delay = QRandomGenerator::global()->bounded((max + 1) - min) + min;
745 QTimer::singleShot(delay, this, [this, delay]() {
746 qCDebug(LOG_PLASMAQUICK) <<
"Delayed preload of " << d->applet->title() <<
"after" << (qreal)delay / 1000 <<
"seconds";
747 d->preloadForExpansion();
755void AppletQuickItem::classBegin()
760 qCWarning(LOG_PLASMAQUICK) <<
"Detected a PlasmoidItem which is not the root QML item: this is not supported.";
763 d->applet = ac->applet();
764 d->qmlObject = ac->sharedQmlEngine();
767void AppletQuickItem::componentComplete()
773int AppletQuickItem::switchWidth()
const
775 return d->switchWidth;
778void AppletQuickItem::setSwitchWidth(
int width)
780 if (d->switchWidth == width) {
784 d->switchWidth = width;
785 d->compactRepresentationCheck();
786 Q_EMIT switchWidthChanged(width);
789int AppletQuickItem::switchHeight()
const
791 return d->switchHeight;
794void AppletQuickItem::setSwitchHeight(
int height)
796 if (d->switchHeight == height) {
800 d->switchHeight = height;
801 d->compactRepresentationCheck();
802 Q_EMIT switchHeightChanged(height);
807 return d->compactRepresentation;
810void AppletQuickItem::setCompactRepresentation(
QQmlComponent *component)
812 if (d->compactRepresentation == component) {
816 d->compactRepresentation = component;
817 Q_EMIT compactRepresentationChanged(component);
822 return d->fullRepresentation;
825void AppletQuickItem::setFullRepresentation(
QQmlComponent *component)
827 if (d->fullRepresentation == component) {
831 d->fullRepresentation = component;
832 Q_EMIT fullRepresentationChanged(component);
837 return d->preferredRepresentation;
840void AppletQuickItem::setPreferredRepresentation(
QQmlComponent *component)
842 if (d->preferredRepresentation == component) {
846 d->preferredRepresentation = component;
847 Q_EMIT preferredRepresentationChanged(component);
848 d->compactRepresentationCheck();
851bool AppletQuickItem::isExpanded()
const
853 return d->applet->isContainment() || !d->fullRepresentation || d->expanded;
856void AppletQuickItem::setExpanded(
bool expanded)
858 if (d->expanded == expanded) {
863 d->preloadForExpansion();
865 if (d->s_preloadPolicy >= AppletQuickItemPrivate::Adaptive && !d->applet->isContainment()) {
866 const int newWeight = qMin(d->preloadWeight() + AppletQuickItemPrivate::PreloadWeightIncrement, 100);
867 d->applet->config().writeEntry(QStringLiteral(
"PreloadWeight"), newWeight);
868 qCDebug(LOG_PLASMAQUICK) <<
"Increasing score for" << d->applet->title() <<
"to" << newWeight;
872 d->expanded = expanded;
874 Q_EMIT expandedChanged(expanded);
877bool AppletQuickItem::isActivationTogglesExpanded()
const
879 return d->activationTogglesExpanded;
882void AppletQuickItem::setActivationTogglesExpanded(
bool activationTogglesExpanded)
884 if (d->activationTogglesExpanded == activationTogglesExpanded) {
887 d->activationTogglesExpanded = activationTogglesExpanded;
888 Q_EMIT activationTogglesExpandedChanged(activationTogglesExpanded);
891bool AppletQuickItem::hideOnWindowDeactivate()
const
893 return d->hideOnWindowDeactivate;
896void AppletQuickItem::setHideOnWindowDeactivate(
bool hide)
898 if (d->hideOnWindowDeactivate == hide) {
901 d->hideOnWindowDeactivate = hide;
902 Q_EMIT hideOnWindowDeactivateChanged(hide);
905bool AppletQuickItem::preloadFullRepresentation()
const
907 return d->preloadFullRepresentation;
910void AppletQuickItem::setPreloadFullRepresentation(
bool preload)
912 if (d->preloadFullRepresentation == preload) {
916 d->preloadFullRepresentation = preload;
917 d->createFullRepresentationItem();
919 Q_EMIT preloadFullRepresentationChanged(preload);
929QQuickItem *AppletQuickItem::compactRepresentationItem()
931 return d->compactRepresentationItem;
934QQuickItem *AppletQuickItem::fullRepresentationItem()
936 return d->fullRepresentationItem;
939void AppletQuickItem::childEvent(
QChildEvent *event)
942 if (
event->added() && !d->ownLayout && d->currentRepresentationItem) {
946 d->connectLayoutAttached(d->currentRepresentationItem);
954void AppletQuickItem::geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry)
957 d->compactRepresentationCheck();
961#include "moc_appletquickitem.cpp"
QUrl fileUrl(const QByteArray &key, const QString &filename=QString()) const
An object that instantiates an entire QML context, with its own declarative engine.
void updateConstraints(Constraints constraints=AllConstraints)
Called when any of the geometry constraints have been updated.
void setHasConfigurationInterface(bool hasInterface)
Sets whether or not this applet provides a user interface for configuring the applet.
bool failedToLaunch() const
If for some reason, the applet fails to get up on its feet (the library couldn't be loaded,...
@ UiReadyConstraint
The ui has been completely loaded.
bool isContainment
True if this applet is a Containment and is acting as one, such as a desktop or a panel.
QString translationDomain() const
The translation domain for this applet.
void appletDeleted(Plasma::Applet *applet)
Emitted when the applet is deleted.
void setLaunchErrorMessage(const QString &reason=QString())
Call this method when the applet fails to launch properly.
Plasma::Containment * containment
The Containment managing this applet.
void flushPendingConstraintsEvents()
Sends all pending constraints updates to the applet.
KPluginMetaData pluginMetaData() const
QString launchErrorMessage() const
If for some reason, the applet fails to get up on its feet (the library couldn't be loaded,...
The base class for plugins that provide backgrounds and applet grouping containers.
void uiReadyChanged(bool uiReady)
Emitted when the ui has been fully loaded and is fully working.
Plasma::Corona * corona
The corona for this contaiment.
@ Vertical
The applet is constrained horizontally, but can expand vertically.
@ Horizontal
The applet is constrained vertically, but can expand horizontally.
QString i18n(const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
KCOREADDONS_EXPORT QString versionString()
KDB_EXPORT KDbVersionInfo version()
void init(KXmlGuiWindow *window, KGameDifficulty *difficulty=nullptr)
void errorList(QWidget *parent, const QString &text, const QStringList &strlist, const QString &title=QString(), Options options=Notify)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
The EdgeEventForwarder class This class forwards edge events to be replayed within the given margin T...
const char * constData() const const
qint64 currentMSecsSinceEpoch()
const_iterator constFind(const Key &key) const const
bool contains(const Key &key) const const
bool remove(const Key &key)
QJsonArray fromStringList(const QStringList &list)
T value(qsizetype i) const const
QLoggingCategory * defaultCategory()
virtual void childEvent(QChildEvent *event)
const QObjectList & children() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
QVariant property(const char *name) const const
bool setProperty(const char *name, QVariant &&value)
void setBaseUrl(const QUrl &baseUrl)
QQmlContext * contextForObject(const QObject *object)
QQmlContext * rootContext() const const
bool write(QObject *object, const QString &name, const QVariant &value)
virtual void classBegin() override
virtual void componentComplete() override
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
QQuickItem * parentItem() const const
qreal height() const const
qreal width() const const
int compare(QLatin1StringView s1, const QString &s2, Qt::CaseSensitivity cs)
bool isEmpty() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
bool isEmpty() const const
QString toString(FormattingOptions options) const const
QVariant fromValue(T &&value)
qreal toReal(bool *ok) const const
QVersionNumber fromString(QAnyStringView string, qsizetype *suffixIndex)