File indexing completed on 2024-05-05 17:33:20

0001 /*
0002  *   SPDX-FileCopyrightText: 2012 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
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 "discovercommon_export.h"
0010 #include <QString>
0011 
0012 /**
0013  * The @class PackageState will be used to expose resources related to an @class AbstractResource.
0014  *
0015  * @see ApplicationAddonsModel
0016  */
0017 class DISCOVERCOMMON_EXPORT PackageState
0018 {
0019 public:
0020     PackageState(QString packageName, QString name, QString description, bool installed);
0021     PackageState(const QString &name, const QString &description, bool installed);
0022     PackageState(const PackageState &ps);
0023     PackageState &operator=(const PackageState &other);
0024 
0025     QString packageName() const;
0026     QString name() const;
0027     QString description() const;
0028     bool isInstalled() const;
0029     void setInstalled(bool installed);
0030 
0031 private:
0032     const QString m_packageName;
0033     const QString m_name;
0034     const QString m_description;
0035     bool m_installed;
0036 };
0037 
0038 DISCOVERCOMMON_EXPORT QDebug operator<<(QDebug dbg, const PackageState &state);