Attica

icon.cpp
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2010 Intel Corporation
5  SPDX-FileContributor: Mateu Batle Sastre <[email protected]>
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 Icon::Private : public QSharedData
15 {
16 public:
17  QUrl url;
18  uint width;
19  uint height;
20 
21  Private() : width(0), height(0)
22  {}
23 };
24 
26  : d(new Private)
27 {
28 }
29 
30 Icon::Icon(const Attica::Icon &other)
31  : d(other.d)
32 {
33 }
34 
36 {
37  d = other.d;
38  return *this;
39 }
40 
42 {}
43 
44 QUrl Icon::url() const
45 {
46  return d->url;
47 }
48 
49 void Icon::setUrl(const QUrl &url)
50 {
51  d->url = url;
52 }
53 
54 uint Icon::width() const
55 {
56  return d->width;
57 }
58 
59 void Icon::setWidth(uint width)
60 {
61  d->width = width;
62 }
63 
64 uint Icon::height() const
65 {
66  return d->height;
67 }
68 
69 void Icon::setHeight(uint height)
70 {
71  d->height = height;
72 }
~Icon()
Destructor.
Definition: icon.cpp:41
Icon()
Creates an empty Icon.
Definition: icon.cpp:25
Icon & operator=(const Icon &other)
Assignment operator.
Definition: icon.cpp:35
The Icon class contains information about an icon.
Definition: icon.h:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.