File indexing completed on 2024-04-28 09:40:58
0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0002 // SPDX-FileCopyrightText: 2010-2020 Harald Sitter <sitter@kde.org> 0003 0004 #pragma once 0005 0006 #include <AppStreamQt/pool.h> 0007 #include <PackageKit/Daemon> 0008 #include <QJsonObject> 0009 #include <QVector> 0010 0011 class DebugRepoEnabler : public QObject 0012 { 0013 Q_OBJECT 0014 Q_PROPERTY(bool busy MEMBER m_busy NOTIFY changed) 0015 Q_PROPERTY(bool found MEMBER m_found NOTIFY changed) 0016 Q_PROPERTY(bool installed MEMBER m_installed NOTIFY changed) 0017 Q_PROPERTY(QString error MEMBER m_error NOTIFY changed) 0018 Q_PROPERTY(QVector<QJsonObject> components MEMBER m_components NOTIFY changed) 0019 public: 0020 using QObject::QObject; 0021 0022 Q_INVOKABLE void run(); 0023 Q_INVOKABLE void install(); 0024 0025 Q_SIGNALS: 0026 void changed(); 0027 0028 private: 0029 bool m_busy = true; 0030 bool m_found = false; 0031 bool m_installed = false; 0032 QString m_error; 0033 QStringList m_packageIDs; // list so we can feed it to packagekit for install easily 0034 QVector<QJsonObject> m_components; // QVector for qml 0035 };