File indexing completed on 2024-04-28 05:26:30

0001 /*
0002  *   SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
0003  *
0004  *   SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #pragma once
0008 
0009 #include <KQuickManagedConfigModule>
0010 
0011 #include <KSharedConfig>
0012 #include <discoversettings.h>
0013 #include <updatessettings.h>
0014 
0015 class UpdatesData;
0016 class DiscoverData;
0017 
0018 class Updates : public KQuickManagedConfigModule
0019 {
0020     Q_OBJECT
0021     Q_PROPERTY(UpdatesSettings *updatesSettings READ updatesSettings CONSTANT)
0022     Q_PROPERTY(DiscoverSettings *discoverSettings READ discoverSettings CONSTANT)
0023     Q_PROPERTY(bool isRpmOstree READ isRpmOstree CONSTANT)
0024 
0025 public:
0026     explicit Updates(QObject *parent, const KPluginMetaData &data);
0027 
0028     UpdatesSettings *updatesSettings() const;
0029     DiscoverSettings *discoverSettings() const;
0030 
0031     /* Returns true if we're running on an rpm-ostree managed systems. Used to
0032      * show/hide PackageKit specific settings and show/hide rpm-ostree specific
0033      * settings only on systems where those are relevant.*/
0034     bool isRpmOstree() const;
0035 
0036 private:
0037     UpdatesData *const m_data;
0038     DiscoverData *const m_discoverData;
0039 };