Attica

cloud.cpp
1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2012 Laszlo Papp <lpapp@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "cloud.h"
10
11using namespace Attica;
12
13class Q_DECL_HIDDEN Cloud::Private : public QSharedData
14{
15public:
16 QString m_name;
17 QString m_url;
18 QUrl m_icon;
19 qulonglong m_quota;
20 qulonglong m_free;
21 qulonglong m_used;
22 float m_relative;
23 QString m_key;
24};
25
27 : d(new Private)
28{
29}
30
32 : d(other.d)
33{
34}
35
37{
38 d = other.d;
39 return *this;
40}
41
43{
44}
45
46void Cloud::setName(const QString &name)
47{
48 d->m_name = name;
49}
50
52{
53 return d->m_name;
54}
55
56void Cloud::setUrl(const QString &url)
57{
58 d->m_url = url;
59}
60
62{
63 return d->m_url;
64}
65
66void Cloud::setIcon(const QUrl &icon)
67{
68 d->m_icon = icon;
69}
70
72{
73 return d->m_icon;
74}
75
76void Cloud::setQuota(qulonglong quota)
77{
78 d->m_quota = quota;
79}
80
81qulonglong Cloud::quota() const
82{
83 return d->m_quota;
84}
85
86void Cloud::setFree(qulonglong free)
87{
88 d->m_free = free;
89}
90
91qulonglong Cloud::free() const
92{
93 return d->m_free;
94}
95
96void Cloud::setUsed(qulonglong used)
97{
98 d->m_used = used;
99}
100
101qulonglong Cloud::used() const
102{
103 return d->m_used;
104}
105
106void Cloud::setRelative(float relative)
107{
108 d->m_relative = relative;
109}
110
111float Cloud::relative() const
112{
113 return d->m_relative;
114}
115
116void Cloud::setKey(const QString &key)
117{
118 d->m_key = key;
119}
120
122{
123 return d->m_key;
124}
Represents a cloud service.
Definition cloud.h:27
void setUrl(const QString &url)
Sets the url of the Cloud service.
Definition cloud.cpp:56
QString url() const
Gets the url of the Cloud service.
Definition cloud.cpp:61
void setQuota(qulonglong quota)
Sets the quota of the Cloud service.
Definition cloud.cpp:76
void setRelative(float relative)
Sets the relative of the Cloud service.
Definition cloud.cpp:106
void setUsed(qulonglong used)
Sets the used amount of the Cloud service.
Definition cloud.cpp:96
QUrl icon() const
Gets the icon of the Cloud service.
Definition cloud.cpp:71
QString name() const
Gets the name of the Cloud service.
Definition cloud.cpp:51
Cloud & operator=(const Cloud &other)
Assignment operator.
Definition cloud.cpp:36
qulonglong quota() const
Gets the quota of the Cloud service.
Definition cloud.cpp:81
void setKey(const QString &privateKey)
Sets the private key of the Cloud service.
Definition cloud.cpp:116
void setName(const QString &name)
Sets the name of the Cloud service.
Definition cloud.cpp:46
void setFree(qulonglong free)
Sets the free amount of the Cloud service.
Definition cloud.cpp:86
qulonglong free() const
Gets the free amount of the Cloud service.
Definition cloud.cpp:91
~Cloud()
Destructor.
Definition cloud.cpp:42
float relative() const
Gets the relative of the Cloud service.
Definition cloud.cpp:111
QString key() const
Gets the private key of the Cloud service.
Definition cloud.cpp:121
void setIcon(const QUrl &icon)
Sets the icon of the Cloud service.
Definition cloud.cpp:66
Cloud()
Creates an empty Cloud.
Definition cloud.cpp:26
qulonglong used() const
Gets the used amount of the Cloud service.
Definition cloud.cpp:101
The Attica namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.