1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2010 Intel Corporation
5 SPDX-FileContributor: Mateu Batle Sastre <mbatle@collabora.co.uk>
6
7 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
8*/
9
10#include "icon.h"
11
12using namespace Attica;
13
14class Q_DECL_HIDDEN Icon::Private : public QSharedData
15{
16public:
17 QUrl url;
18 uint width;
19 uint height;
20
21 Private()
22 : width(0)
23 , height(0)
24 {
25 }
26};
27
28Icon::Icon()
29 : d(new Private)
30{
31}
32
33Icon::Icon(const Attica::Icon &other)
34 : d(other.d)
35{
36}
37
38Icon &Icon::operator=(const Attica::Icon &other)
39{
40 d = other.d;
41 return *this;
42}
43
44Icon::~Icon()
45{
46}
47
48QUrl Icon::url() const
49{
50 return d->url;
51}
52
53void Icon::setUrl(const QUrl &url)
54{
55 d->url = url;
56}
57
58uint Icon::width() const
59{
60 return d->width;
61}
62
63void Icon::setWidth(uint width)
64{
65 d->width = width;
66}
67
68uint Icon::height() const
69{
70 return d->height;
71}
72
73void Icon::setHeight(uint height)
74{
75 d->height = height;
76}
77

source code of attica/src/icon.cpp