File indexing completed on 2024-05-12 17:08:29

0001 /*
0002  * SPDX-FileCopyrightText: 2020 David Redondo <kde@david-redondo.de>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 #pragma once
0008 
0009 #include <QObject>
0010 
0011 class FaceLoader;
0012 class KConfigGroup;
0013 
0014 class WidgetExporter : public QObject
0015 {
0016     Q_OBJECT
0017     Q_PROPERTY(bool plasmashellAvailable MEMBER m_plasmashellAvailable NOTIFY plasmashellAvailableChanged)
0018 public:
0019     explicit WidgetExporter(QObject *parent = nullptr);
0020 
0021     Q_INVOKABLE void exportAsWidget(FaceLoader *loader) const;
0022 Q_SIGNALS:
0023     void plasmashellAvailableChanged();
0024 
0025 private:
0026     bool m_plasmashellAvailable;
0027     QString configEntriesScript(const KConfigGroup &group, const QStringList &path = {}) const;
0028 };