File indexing completed on 2024-12-01 03:37:33

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 "buildservice.h"
0010 
0011 using namespace Attica;
0012 
0013 class Q_DECL_HIDDEN BuildService::Private : public QSharedData
0014 {
0015 public:
0016     QString id;
0017     QString name;
0018     QString url;
0019     // QStringList targets;
0020     QList<Target> targets;
0021 
0022     Private()
0023     {
0024     }
0025 };
0026 
0027 BuildService::BuildService()
0028     : d(new Private)
0029 {
0030 }
0031 
0032 BuildService::BuildService(const BuildService &other)
0033     : d(other.d)
0034 {
0035 }
0036 
0037 BuildService &BuildService::operator=(const Attica::BuildService &other)
0038 {
0039     d = other.d;
0040     return *this;
0041 }
0042 
0043 BuildService::~BuildService()
0044 {
0045 }
0046 
0047 void BuildService::setId(const QString &u)
0048 {
0049     d->id = u;
0050 }
0051 
0052 QString BuildService::id() const
0053 {
0054     return d->id;
0055 }
0056 
0057 void BuildService::setName(const QString &u)
0058 {
0059     d->name = u;
0060 }
0061 
0062 QString BuildService::name() const
0063 {
0064     return d->name;
0065 }
0066 
0067 void BuildService::addTarget(const Target &t)
0068 {
0069     d->targets << t;
0070 }
0071 
0072 QList<Target> BuildService::targets() const
0073 {
0074     return d->targets;
0075 }
0076 
0077 void BuildService::setUrl(const QString &u)
0078 {
0079     d->url = u;
0080 }
0081 
0082 QString BuildService::url() const
0083 {
0084     return d->url;
0085 }
0086 
0087 bool BuildService::isValid() const
0088 {
0089     return !(d->id.isEmpty());
0090 }