File indexing completed on 2024-05-05 17:33:23
0001 /* 0002 * SPDX-FileCopyrightText: 2012 Jonathan Thomas <echidnaman@kubuntu.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 <QStringList> 0010 #include <QVector> 0011 0012 #include "discovercommon_export.h" 0013 0014 class DISCOVERCOMMON_EXPORT AddonList 0015 { 0016 public: 0017 enum State { 0018 None, 0019 ToInstall, 0020 ToRemove, 0021 }; 0022 AddonList(); 0023 AddonList(const AddonList &other) = default; 0024 0025 bool isEmpty() const; 0026 QStringList addonsToInstall() const; 0027 QStringList addonsToRemove() const; 0028 State addonState(const QString &addonName) const; 0029 0030 void addAddon(const QString &addon, bool toInstall); 0031 void resetAddon(const QString &addon); 0032 void clear(); 0033 0034 private: 0035 QStringList m_toInstall; 0036 QStringList m_toRemove; 0037 }; 0038 0039 DISCOVERCOMMON_EXPORT QDebug operator<<(QDebug dbg, const AddonList &addons);