Attica

icon.cpp
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
39{
40 d = other.d;
41 return *this;
42}
43
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}
The Icon class contains information about an icon.
Definition icon.h:27
Icon()
Creates an empty Icon.
Definition icon.cpp:28
Icon & operator=(const Icon &other)
Assignment operator.
Definition icon.cpp:38
~Icon()
Destructor.
Definition icon.cpp:44
The Attica namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.