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 | |
12 | using namespace Attica; |
13 | |
14 | class Q_DECL_HIDDEN Icon::Private : public QSharedData |
15 | { |
16 | public: |
17 | QUrl url; |
18 | uint width; |
19 | uint height; |
20 | |
21 | Private() |
22 | : width(0) |
23 | , height(0) |
24 | { |
25 | } |
26 | }; |
27 | |
28 | Icon::Icon() |
29 | : d(new Private) |
30 | { |
31 | } |
32 | |
33 | Icon::Icon(const Attica::Icon &other) |
34 | : d(other.d) |
35 | { |
36 | } |
37 | |
38 | Icon &Icon::operator=(const Attica::Icon &other) |
39 | { |
40 | d = other.d; |
41 | return *this; |
42 | } |
43 | |
44 | Icon::~Icon() |
45 | { |
46 | } |
47 | |
48 | QUrl Icon::url() const |
49 | { |
50 | return d->url; |
51 | } |
52 | |
53 | void Icon::setUrl(const QUrl &url) |
54 | { |
55 | d->url = url; |
56 | } |
57 | |
58 | uint Icon::width() const |
59 | { |
60 | return d->width; |
61 | } |
62 | |
63 | void Icon::setWidth(uint width) |
64 | { |
65 | d->width = width; |
66 | } |
67 | |
68 | uint Icon::height() const |
69 | { |
70 | return d->height; |
71 | } |
72 | |
73 | void Icon::setHeight(uint height) |
74 | { |
75 | d->height = height; |
76 | } |
77 | |