File indexing completed on 2024-09-08 12:12:28
0001 /* 0002 This file is part of KDE. 0003 0004 SPDX-FileCopyrightText: 2010 Sebastian Kügler <sebas@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #include "project.h" 0010 0011 using namespace Attica; 0012 0013 class Q_DECL_HIDDEN Project::Private : public QSharedData 0014 { 0015 public: 0016 QString m_id; 0017 QString m_name; 0018 QString m_version; 0019 QString m_license; 0020 QString m_url; 0021 QString m_summary; 0022 QString m_description; 0023 QStringList m_developers; 0024 QString m_requirements; 0025 QString m_specFile; 0026 0027 QMap<QString, QString> m_extendedAttributes; 0028 0029 Private() 0030 { 0031 } 0032 }; 0033 0034 Project::Project() 0035 : d(new Private) 0036 { 0037 } 0038 0039 Project::Project(const Project &other) 0040 : d(other.d) 0041 { 0042 } 0043 0044 Project &Project::operator=(const Attica::Project &other) 0045 { 0046 d = other.d; 0047 return *this; 0048 } 0049 0050 Project::~Project() 0051 { 0052 } 0053 0054 void Project::setId(const QString &u) 0055 { 0056 d->m_id = u; 0057 } 0058 0059 QString Project::id() const 0060 { 0061 return d->m_id; 0062 } 0063 0064 void Project::setName(const QString &name) 0065 { 0066 d->m_name = name; 0067 } 0068 0069 QString Project::name() const 0070 { 0071 return d->m_name; 0072 } 0073 0074 void Project::setVersion(const QString &name) 0075 { 0076 d->m_version = name; 0077 } 0078 0079 QString Project::version() const 0080 { 0081 return d->m_version; 0082 } 0083 0084 void Project::setLicense(const QString &name) 0085 { 0086 d->m_license = name; 0087 } 0088 0089 QString Project::license() const 0090 { 0091 return d->m_license; 0092 } 0093 0094 void Project::setUrl(const QString &name) 0095 { 0096 d->m_url = name; 0097 } 0098 0099 QString Project::url() const 0100 { 0101 return d->m_url; 0102 } 0103 0104 void Project::setSummary(const QString &name) 0105 { 0106 d->m_summary = name; 0107 } 0108 0109 QString Project::summary() const 0110 { 0111 return d->m_summary; 0112 } 0113 0114 void Project::setDescription(const QString &name) 0115 { 0116 d->m_description = name; 0117 } 0118 0119 QString Project::description() const 0120 { 0121 return d->m_description; 0122 } 0123 0124 void Project::setDevelopers(const QStringList &name) 0125 { 0126 d->m_developers = name; 0127 } 0128 0129 QStringList Project::developers() const 0130 { 0131 return d->m_developers; 0132 } 0133 0134 void Project::setRequirements(const QString &name) 0135 { 0136 d->m_requirements = name; 0137 } 0138 0139 QString Project::requirements() const 0140 { 0141 return d->m_requirements; 0142 } 0143 0144 void Project::setSpecFile(const QString &name) 0145 { 0146 d->m_specFile = name; 0147 } 0148 0149 QString Project::specFile() const 0150 { 0151 return d->m_specFile; 0152 } 0153 0154 void Project::addExtendedAttribute(const QString &key, const QString &value) 0155 { 0156 d->m_extendedAttributes.insert(key, value); 0157 } 0158 0159 QString Project::extendedAttribute(const QString &key) const 0160 { 0161 return d->m_extendedAttributes.value(key); 0162 } 0163 0164 QMap<QString, QString> Project::extendedAttributes() const 0165 { 0166 return d->m_extendedAttributes; 0167 } 0168 0169 bool Project::isValid() const 0170 { 0171 return !(d->m_id.isEmpty()); 0172 }