File indexing completed on 2024-07-14 14:25:35

0001 /*
0002     This file is part of KDE.
0003 
0004     SPDX-FileCopyrightText: 2012 Laszlo Papp <lpapp@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 "cloud.h"
0010 
0011 using namespace Attica;
0012 
0013 class Q_DECL_HIDDEN Cloud::Private : public QSharedData
0014 {
0015 public:
0016     QString m_name;
0017     QString m_url;
0018     QUrl m_icon;
0019     qulonglong m_quota;
0020     qulonglong m_free;
0021     qulonglong m_used;
0022     float m_relative;
0023     QString m_key;
0024 };
0025 
0026 Cloud::Cloud()
0027     : d(new Private)
0028 {
0029 }
0030 
0031 Cloud::Cloud(const Attica::Cloud &other)
0032     : d(other.d)
0033 {
0034 }
0035 
0036 Cloud &Cloud::operator=(const Attica::Cloud &other)
0037 {
0038     d = other.d;
0039     return *this;
0040 }
0041 
0042 Cloud::~Cloud()
0043 {
0044 }
0045 
0046 void Cloud::setName(const QString &name)
0047 {
0048     d->m_name = name;
0049 }
0050 
0051 QString Cloud::name() const
0052 {
0053     return d->m_name;
0054 }
0055 
0056 void Cloud::setUrl(const QString &url)
0057 {
0058     d->m_url = url;
0059 }
0060 
0061 QString Cloud::url() const
0062 {
0063     return d->m_url;
0064 }
0065 
0066 void Cloud::setIcon(const QUrl &icon)
0067 {
0068     d->m_icon = icon;
0069 }
0070 
0071 QUrl Cloud::icon() const
0072 {
0073     return d->m_icon;
0074 }
0075 
0076 void Cloud::setQuota(qulonglong quota)
0077 {
0078     d->m_quota = quota;
0079 }
0080 
0081 qulonglong Cloud::quota() const
0082 {
0083     return d->m_quota;
0084 }
0085 
0086 void Cloud::setFree(qulonglong free)
0087 {
0088     d->m_free = free;
0089 }
0090 
0091 qulonglong Cloud::free() const
0092 {
0093     return d->m_free;
0094 }
0095 
0096 void Cloud::setUsed(qulonglong used)
0097 {
0098     d->m_used = used;
0099 }
0100 
0101 qulonglong Cloud::used() const
0102 {
0103     return d->m_used;
0104 }
0105 
0106 void Cloud::setRelative(float relative)
0107 {
0108     d->m_relative = relative;
0109 }
0110 
0111 float Cloud::relative() const
0112 {
0113     return d->m_relative;
0114 }
0115 
0116 void Cloud::setKey(const QString &key)
0117 {
0118     d->m_key = key;
0119 }
0120 
0121 QString Cloud::key() const
0122 {
0123     return d->m_key;
0124 }