7#include "appletquickitem.h"
9#include "appletcontext_p.h"
10#include "configview.h"
11#include "containment.h"
13#include "plasma_version.h"
14#include "plasmoid/containmentitem.h"
15#include "plasmoid/plasmoiditem.h"
16#include "plasmoid/wallpaperitem.h"
17#include "private/appletquickitem_p.h"
18#include "private/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>
40AppletQuickItemPrivate::PreloadPolicy AppletQuickItemPrivate::s_preloadPolicy = AppletQuickItemPrivate::Uninitialized;
42AppletQuickItemPrivate::AppletQuickItemPrivate(AppletQuickItem *item)
47 , compactRepresentationCheckGuard(false)
49 if (s_preloadPolicy == Uninitialized) {
51 s_preloadPolicy = Adaptive;
53 if (qEnvironmentVariableIsSet(
"PLASMA_PRELOAD_POLICY")) {
56 s_preloadPolicy = Aggressive;
58 s_preloadPolicy =
None;
62 qCInfo(LOG_PLASMAQUICK) <<
"Applet preload policy set to" << s_preloadPolicy;
66int AppletQuickItemPrivate::preloadWeight()
const
73 defaultWeight = DefaultLauncherPreloadWeight;
75 defaultWeight = DefaultPreloadWeight;
79 applet->config().readEntry(QStringLiteral(
"PreloadWeight"),
80 qMax(defaultWeight, applet->pluginMetaData().value(QStringLiteral(
"X-Plasma-PreloadWeight"), 0))),
84QObject *AppletQuickItemPrivate::searchLayoutAttached(
QObject *parent)
89 const auto lstChildren = parent->
children();
90 for (
QObject *child : lstChildren) {
93 if (child->property(
"minimumWidth").isValid()
94 && child->property(
"minimumHeight").isValid()
95 && child->property(
"preferredWidth").isValid()
96 && child->property(
"preferredHeight").isValid()
97 && child->property(
"maximumWidth").isValid()
98 && child->property(
"maximumHeight").isValid()
99 && child->property(
"fillWidth").isValid()
100 && child->property(
"fillHeight").isValid()) {
108void AppletQuickItemPrivate::connectLayoutAttached(
QObject *item)
115 QObject *layout = searchLayoutAttached(item);
121 ownLayout->setProperty(
"minimumWidth", 0);
122 ownLayout->setProperty(
"minimumHeight", 0);
123 ownLayout->setProperty(
"preferredWidth", -1);
124 ownLayout->setProperty(
"preferredHeight", -1);
125 ownLayout->setProperty(
"maximumWidth", std::numeric_limits<qreal>::infinity());
126 ownLayout->setProperty(
"maximumHeight", std::numeric_limits<qreal>::infinity());
127 ownLayout->setProperty(
"fillWidth",
false);
128 ownLayout->setProperty(
"fillHeight",
false);
134 propagateSizeHint(
"minimumWidth");
135 propagateSizeHint(
"minimumHeight");
136 propagateSizeHint(
"preferredWidth");
137 propagateSizeHint(
"preferredHeight");
138 propagateSizeHint(
"maximumWidth");
139 propagateSizeHint(
"maximumHeight");
140 propagateSizeHint(
"fillWidth");
141 propagateSizeHint(
"fillHeight");
143 QObject *newOwnLayout = searchLayoutAttached(q);
151 if (representationLayout == layout) {
155 if (representationLayout) {
160 QObject::connect(layout, SIGNAL(minimumWidthChanged()), q, SLOT(minimumWidthChanged()));
161 QObject::connect(layout, SIGNAL(minimumHeightChanged()), q, SLOT(minimumHeightChanged()));
163 QObject::connect(layout, SIGNAL(preferredWidthChanged()), q, SLOT(preferredWidthChanged()));
164 QObject::connect(layout, SIGNAL(preferredHeightChanged()), q, SLOT(preferredHeightChanged()));
166 QObject::connect(layout, SIGNAL(maximumWidthChanged()), q, SLOT(maximumWidthChanged()));
167 QObject::connect(layout, SIGNAL(maximumHeightChanged()), q, SLOT(maximumHeightChanged()));
169 QObject::connect(layout, SIGNAL(fillWidthChanged()), q, SLOT(fillWidthChanged()));
170 QObject::connect(layout, SIGNAL(fillHeightChanged()), q, SLOT(fillHeightChanged()));
172 representationLayout = layout;
173 ownLayout = newOwnLayout;
175 propagateSizeHint(
"minimumWidth");
176 propagateSizeHint(
"minimumHeight");
177 propagateSizeHint(
"preferredWidth");
178 propagateSizeHint(
"preferredHeight");
179 propagateSizeHint(
"maximumWidth");
180 propagateSizeHint(
"maximumHeight");
181 propagateSizeHint(
"fillWidth");
182 propagateSizeHint(
"fillHeight");
185void AppletQuickItemPrivate::propagateSizeHint(
const QByteArray &layoutProperty)
187 if (ownLayout && representationLayout) {
188 ownLayout->setProperty(layoutProperty.
constData(), representationLayout->property(layoutProperty.
constData()));
192QQuickItem *AppletQuickItemPrivate::createCompactRepresentationItem()
194 if (!compactRepresentation) {
198 if (compactRepresentationItem) {
199 return compactRepresentationItem;
202 QVariantHash initialProperties;
206 compactRepresentationItem = qobject_cast<QQuickItem *>(qmlObject->createObjectFromComponent(compactRepresentation, qmlContext(q), initialProperties));
208 Q_EMIT q->compactRepresentationItemChanged(compactRepresentationItem);
210 return compactRepresentationItem;
213QQuickItem *AppletQuickItemPrivate::createFullRepresentationItem()
215 if (fullRepresentationItem) {
216 return fullRepresentationItem;
219 if (fullRepresentation && fullRepresentation != qmlObject->mainComponent()) {
220 QVariantHash initialProperties;
221 initialProperties[QStringLiteral(
"parent")] =
QVariant();
222 fullRepresentationItem = qobject_cast<QQuickItem *>(qmlObject->createObjectFromComponent(fullRepresentation, qmlContext(q), initialProperties));
225 if (!fullRepresentationItem) {
229 Q_EMIT q->fullRepresentationItemChanged(fullRepresentationItem);
231 return fullRepresentationItem;
234QQuickItem *AppletQuickItemPrivate::createCompactRepresentationExpanderItem()
236 if (!compactRepresentationExpander) {
240 if (compactRepresentationExpanderItem) {
241 return compactRepresentationExpanderItem;
244 compactRepresentationExpanderItem = qobject_cast<QQuickItem *>(qmlObject->createObjectFromComponent(compactRepresentationExpander, qmlContext(q)));
246 if (!compactRepresentationExpanderItem) {
250 compactRepresentationExpanderItem->setProperty(
"compactRepresentation", QVariant::fromValue<QObject *>(createCompactRepresentationItem()));
253 return compactRepresentationExpanderItem;
256bool AppletQuickItemPrivate::appletShouldBeExpanded()
const
258 if (applet->isContainment()) {
262 if (!fullRepresentation) {
267 if (switchWidth > 0 && switchHeight > 0) {
268 return q->width() > switchWidth && q->height() > switchHeight;
273 if (preferredRepresentation) {
274 return preferredRepresentation == fullRepresentation;
283void AppletQuickItemPrivate::preloadForExpansion()
290 if (!createFullRepresentationItem()) {
295 if (!appletShouldBeExpanded() && !applet->isContainment() && (!preferredRepresentation || preferredRepresentation != fullRepresentation)) {
296 createCompactRepresentationExpanderItem();
299 if (!appletShouldBeExpanded() && compactRepresentationExpanderItem) {
300 compactRepresentationExpanderItem->setProperty(
"fullRepresentation", QVariant::fromValue<QObject *>(createFullRepresentationItem()));
301 }
else if (fullRepresentationItem) {
302 fullRepresentationItem->setProperty(
"parent", QVariant::fromValue<QObject *>(q));
306 if (fullRepresentationItem && fullRepresentationItem->window()) {
307 fullRepresentationItem->window()->create();
319 QQmlProperty::write(item, QStringLiteral(
"anchors.fill"), QVariant::fromValue<QObject *>(parent));
322void AppletQuickItemPrivate::compactRepresentationCheck()
329 if (q->width() <= 0 || q->height() <= 0) {
334 if (compactRepresentationCheckGuard) {
338 bool full = appletShouldBeExpanded();
340 if ((full && fullRepresentationItem && fullRepresentationItem == currentRepresentationItem)
341 || (!full && compactRepresentationItem && compactRepresentationItem == currentRepresentationItem)) {
345 compactRepresentationCheckGuard =
true;
349 QQuickItem *item = createFullRepresentationItem();
353 if (compactRepresentationExpanderItem) {
354 compactRepresentationExpanderItem->setProperty(
"fullRepresentation",
QVariant());
355 compactRepresentationExpanderItem->setProperty(
"compactRepresentation",
QVariant());
356 compactRepresentationExpanderItem->setVisible(
false);
363 anchorsFillParent(item, q);
366 if (compactRepresentationItem) {
367 compactRepresentationItem->setVisible(
false);
370 currentRepresentationItem = item;
371 connectLayoutAttached(item);
374 Q_EMIT q->expandedChanged(
true);
379 QQuickItem *compactItem = createCompactRepresentationItem();
380 QQuickItem *compactExpanderItem = createCompactRepresentationExpanderItem();
382 if (compactItem && compactExpanderItem) {
387 anchorsFillParent(compactExpanderItem, q);
389 if (fullRepresentationItem) {
390 fullRepresentationItem->setProperty(
"parent",
QVariant());
393 compactExpanderItem->
setProperty(
"compactRepresentation", QVariant::fromValue<QObject *>(compactItem));
397 currentRepresentationItem = compactItem;
398 connectLayoutAttached(compactItem);
401 Q_EMIT q->expandedChanged(
false);
405 compactRepresentationCheckGuard =
false;
408void AppletQuickItemPrivate::minimumWidthChanged()
410 propagateSizeHint(
"minimumWidth");
413void AppletQuickItemPrivate::minimumHeightChanged()
415 propagateSizeHint(
"minimumHeight");
418void AppletQuickItemPrivate::preferredWidthChanged()
420 propagateSizeHint(
"preferredWidth");
423void AppletQuickItemPrivate::preferredHeightChanged()
425 propagateSizeHint(
"preferredHeight");
428void AppletQuickItemPrivate::maximumWidthChanged()
430 propagateSizeHint(
"maximumWidth");
433void AppletQuickItemPrivate::maximumHeightChanged()
435 propagateSizeHint(
"maximumHeight");
438void AppletQuickItemPrivate::fillWidthChanged()
440 propagateSizeHint(
"fillWidth");
443void AppletQuickItemPrivate::fillHeightChanged()
445 propagateSizeHint(
"fillHeight");
448AppletQuickItem::AppletQuickItem(
QQuickItem *parent)
450 , d(new AppletQuickItemPrivate(this))
454AppletQuickItem::~AppletQuickItem()
456 AppletQuickItemPrivate::s_itemsForApplet.
remove(d->applet);
458 if (d->s_preloadPolicy >= AppletQuickItemPrivate::Adaptive) {
459 d->applet->config().writeEntry(QStringLiteral(
"PreloadWeight"), qMax(0, d->preloadWeight() - AppletQuickItemPrivate::PreloadWeightDecrement));
463 delete d->compactRepresentationItem;
464 delete d->fullRepresentationItem;
465 delete d->compactRepresentationExpanderItem;
471 return AppletQuickItemPrivate::s_itemsForApplet.
contains(applet);
474AppletQuickItem *AppletQuickItem::itemForApplet(
Plasma::Applet *applet)
481 if (AppletQuickItemPrivate::s_itemsForApplet.isEmpty()) {
482 const char *uri =
"org.kde.plasma.plasmoid";
483 qmlRegisterExtendedType<Plasma::Applet, PlasmoidAttached>(uri, 2, 0,
"Plasmoid");
484 qmlRegisterExtendedType<Plasma::Containment, ContainmentAttached>(uri, 2, 0,
"Containment");
486 qmlRegisterType<PlasmoidItem>(uri, 2, 0,
"PlasmoidItem");
487 qmlRegisterType<ContainmentItem>(uri, 2, 0,
"ContainmentItem");
488 qmlRegisterType<WallpaperItem>(uri, 2, 0,
"WallpaperItem");
489 qmlRegisterAnonymousType<Plasma::Corona>(
"org.kde.plasma.plasmoid", 1);
491 auto it = AppletQuickItemPrivate::s_itemsForApplet.
constFind(applet);
492 if (it != AppletQuickItemPrivate::s_itemsForApplet.constEnd()) {
497 if (qApp->closingDown() || applet->
destroyed()) {
503 qmlObject->engine()->setProperty(
"_kirigamiTheme", QStringLiteral(
"KirigamiPlasmaStyle"));
504 qmlObject->setInitializationDelayed(
true);
507 AppletQuickItem *item =
nullptr;
508 qmlObject->setSource(applet->mainScript());
510 item = qobject_cast<ContainmentItem *>(qmlObject->rootObject());
511 if (!item && qmlObject->mainComponent() && !qmlObject->mainComponent()->isError()) {
515 item = qobject_cast<PlasmoidItem *>(qmlObject->rootObject());
516 if (!item && qmlObject->mainComponent() && !qmlObject->mainComponent()->isError()) {
521 if (!item || !qmlObject->mainComponent() || qmlObject->mainComponent()->isError() || applet->
failedToLaunch()) {
525 errorData[QStringLiteral(
"appletName")] =
i18n(
"Unknown Applet");
526 errorData[QStringLiteral(
"isDebugMode")] = qEnvironmentVariableIntValue(
"PLASMA_ENABLE_QML_DEBUG") != 0;
534 bool versionMismatch =
false;
535 const int plasma_version_major = 6;
538 "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 "
539 "an updated version.",
540 plasma_version_major);
541 compactReason =
i18n(
"%1 is not compatible with Plasma %2", applet->
pluginMetaData().
name(), plasma_version_major);
542 versionMismatch =
true;
543 }
else if (
version.majorVersion() < plasma_version_major) {
545 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.",
547 plasma_version_major);
548 compactReason =
i18n(
"%1 is not compatible with Plasma %2", applet->
pluginMetaData().
name(), plasma_version_major);
549 versionMismatch =
true;
550 }
else if (
version.majorVersion() > plasma_version_major ||
version.minorVersion() > PLASMA_VERSION_MINOR) {
551 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.",
553 plasma_version_major);
554 compactReason =
i18n(
"%1 is not compatible with Plasma %2", applet->
pluginMetaData().
name(), plasma_version_major);
555 versionMismatch =
true;
558 compactReason = reason;
563 if (compactReason !=
QString()) {
564 errorData[QStringLiteral(
"compactError")] = compactReason;
566 if (applet->sourceValid()) {
567 if (!versionMismatch) {
568 const auto errors = qmlObject->mainComponent()->errors();
577 reason +=
i18n(
"Error loading QML file: %1 %2", qmlObject->mainComponent()->url().toString(), reason);
585 << errorData[QStringLiteral(
"errors")].toVariant().toStringList();
591 if (qmlObject->mainComponent()->isError()) {
595 item = qobject_cast<PlasmoidItem *>(qmlObject->rootObject());
599 item->setProperty(
"errorInformation", errorData);
602 qCWarning(LOG_PLASMAQUICK) <<
"Applet Error message is not of type PlasmoidItem"
608 AppletQuickItemPrivate::s_itemsForApplet[applet] = item;
609 qmlObject->setInitializationDelayed(
false);
610 qmlObject->completeInitialization();
619 item->d->applet = applet;
620 item->d->qmlObject = qmlObject;
622 if (!qEnvironmentVariableIntValue(
"PLASMA_NO_CONTEXTPROPERTIES")) {
623 qmlObject->rootContext()->setContextProperty(QStringLiteral(
"plasmoid"), applet);
627 delete AppletQuickItemPrivate::s_itemsForApplet[applet];
628 AppletQuickItemPrivate::s_itemsForApplet.
remove(applet);
640void AppletQuickItem::init()
647 if (d->applet->containment()) {
648 if (d->applet->containment()->corona()) {
654 QQmlEngine *engine = d->qmlObject->engine().get();
659 if (!d->compactRepresentation && d->fullRepresentation) {
661 d->compactRepresentation->loadUrl(d->coronaPackage.fileUrl(
"defaultcompactrepresentation"));
662 Q_EMIT compactRepresentationChanged(d->compactRepresentation);
666 if (!d->compactRepresentationExpander && d->fullRepresentation) {
667 d->compactRepresentationExpander =
new QQmlComponent(engine,
this);
668 QUrl compactExpanderUrl = d->applet->containment()->compactApplet();
669 if (compactExpanderUrl.
isEmpty()) {
670 compactExpanderUrl = d->coronaPackage.fileUrl(
"compactapplet");
673 d->compactRepresentationExpander->loadUrl(compactExpanderUrl);
676 d->initComplete =
true;
677 d->compactRepresentationCheck();
678 qmlObject()->engine()->rootContext()->setBaseUrl(qmlObject()->source());
682 if (d->applet->isContainment() || d->expanded || d->preferredRepresentation == d->fullRepresentation) {
686 if (!d->applet->isContainment() && d->applet->containment()) {
688 if (uiReady && d->s_preloadPolicy >= AppletQuickItemPrivate::Adaptive) {
689 const int preloadWeight = d->preloadWeight();
690 qCDebug(LOG_PLASMAQUICK) <<
"New Applet " << d->applet->title() <<
"with a weight of" << preloadWeight;
693 if (d->s_preloadPolicy >= AppletQuickItemPrivate::Aggressive || preloadWeight >= AppletQuickItemPrivate::DelayedPreloadWeight) {
698 const int min = (100 - preloadWeight) * 20;
699 const int max = (100 - preloadWeight) * 100;
700 const int delay = QRandomGenerator::global()->bounded((max + 1) - min) + min;
701 QTimer::singleShot(delay, this, [this, delay]() {
702 qCDebug(LOG_PLASMAQUICK) <<
"Delayed preload of " << d->applet->title() <<
"after" << (qreal)delay / 1000 <<
"seconds";
703 d->preloadForExpansion();
711void AppletQuickItem::classBegin()
716 qCWarning(LOG_PLASMAQUICK) <<
"Detected a PlasmoidItem which is not the root QML item: this is not supported.";
719 d->applet = ac->applet();
720 d->qmlObject = ac->sharedQmlEngine();
723int AppletQuickItem::switchWidth()
const
725 return d->switchWidth;
728void AppletQuickItem::setSwitchWidth(
int width)
730 if (d->switchWidth == width) {
734 d->switchWidth = width;
735 d->compactRepresentationCheck();
736 Q_EMIT switchWidthChanged(width);
739int AppletQuickItem::switchHeight()
const
741 return d->switchHeight;
744void AppletQuickItem::setSwitchHeight(
int height)
746 if (d->switchHeight == height) {
750 d->switchHeight = height;
751 d->compactRepresentationCheck();
752 Q_EMIT switchHeightChanged(height);
757 return d->compactRepresentation;
760void AppletQuickItem::setCompactRepresentation(
QQmlComponent *component)
762 if (d->compactRepresentation == component) {
766 d->compactRepresentation = component;
767 Q_EMIT compactRepresentationChanged(component);
772 return d->fullRepresentation;
775void AppletQuickItem::setFullRepresentation(
QQmlComponent *component)
777 if (d->fullRepresentation == component) {
781 d->fullRepresentation = component;
782 Q_EMIT fullRepresentationChanged(component);
787 return d->preferredRepresentation;
790void AppletQuickItem::setPreferredRepresentation(
QQmlComponent *component)
792 if (d->preferredRepresentation == component) {
796 d->preferredRepresentation = component;
797 Q_EMIT preferredRepresentationChanged(component);
798 d->compactRepresentationCheck();
801bool AppletQuickItem::isExpanded()
const
803 return d->applet->isContainment() || !d->fullRepresentation || d->expanded;
806void AppletQuickItem::setExpanded(
bool expanded)
808 if (d->expanded == expanded) {
813 d->preloadForExpansion();
815 if (d->s_preloadPolicy >= AppletQuickItemPrivate::Adaptive && !d->applet->isContainment()) {
816 const int newWeight = qMin(d->preloadWeight() + AppletQuickItemPrivate::PreloadWeightIncrement, 100);
817 d->applet->config().writeEntry(QStringLiteral(
"PreloadWeight"), newWeight);
818 qCDebug(LOG_PLASMAQUICK) <<
"Increasing score for" << d->applet->title() <<
"to" << newWeight;
822 d->expanded = expanded;
824 Q_EMIT expandedChanged(expanded);
827bool AppletQuickItem::isActivationTogglesExpanded()
const
829 return d->activationTogglesExpanded;
832void AppletQuickItem::setActivationTogglesExpanded(
bool activationTogglesExpanded)
834 if (d->activationTogglesExpanded == activationTogglesExpanded) {
837 d->activationTogglesExpanded = activationTogglesExpanded;
838 Q_EMIT activationTogglesExpandedChanged(activationTogglesExpanded);
841bool AppletQuickItem::hideOnWindowDeactivate()
const
843 return d->hideOnWindowDeactivate;
846void AppletQuickItem::setHideOnWindowDeactivate(
bool hide)
848 if (d->hideOnWindowDeactivate == hide) {
851 d->hideOnWindowDeactivate = hide;
852 Q_EMIT hideOnWindowDeactivateChanged(hide);
855bool AppletQuickItem::preloadFullRepresentation()
const
857 return d->preloadFullRepresentation;
860void AppletQuickItem::setPreloadFullRepresentation(
bool preload)
862 if (d->preloadFullRepresentation == preload) {
866 d->preloadFullRepresentation = preload;
867 d->createFullRepresentationItem();
869 Q_EMIT preloadFullRepresentationChanged(preload);
879QQuickItem *AppletQuickItem::compactRepresentationItem()
881 return d->compactRepresentationItem;
884QQuickItem *AppletQuickItem::fullRepresentationItem()
886 return d->fullRepresentationItem;
889void AppletQuickItem::childEvent(
QChildEvent *event)
892 if (
event->added() && !d->ownLayout && d->currentRepresentationItem) {
896 d->connectLayoutAttached(d->currentRepresentationItem);
904void AppletQuickItem::geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry)
907 d->compactRepresentationCheck();
910void AppletQuickItem::itemChange(ItemChange change,
const ItemChangeData &value)
916 if (value.window && !d->initComplete) {
925#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 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 T & value() const const
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)
bool setProperty(const char *name, QVariant &&value)
QQmlContext * contextForObject(const QObject *object)
bool write(QObject *object, const QString &name, const QVariant &value)
virtual void classBegin() override
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
virtual void itemChange(ItemChange change, const ItemChangeData &value)
QQuickItem * parentItem() const const
QString fromUtf8(QByteArrayView str)
bool isEmpty() const const
QString toLower() 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)
QVersionNumber fromString(QAnyStringView string, qsizetype *suffixIndex)