File indexing completed on 2024-05-12 05:29:03

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 
0024     QString packageName() const;
0025     QString name() const;
0026     QString description() const;
0027     bool isInstalled() const;
0028     void setInstalled(bool installed);
0029 
0030 private:
0031     QString m_packageName;
0032     QString m_name;
0033     QString m_description;
0034     bool m_installed;
0035 };
0036 
0037 DISCOVERCOMMON_EXPORT QDebug operator<<(QDebug dbg, const PackageState &state);