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 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 
29  : d(new Private)
30 {
31 }
32 
33 Icon::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 
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 }
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-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:05:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.