File indexing completed on 2023-09-24 07:57:26

0001 /*
0002     This file is part of KDE.
0003 
0004     SPDX-FileCopyrightText: 2010 Intel Corporation
0005     SPDX-FileContributor: Mateu Batle Sastre <mbatle@collabora.co.uk>
0006 
0007     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0008 */
0009 
0010 #include "icon.h"
0011 
0012 using namespace Attica;
0013 
0014 class Q_DECL_HIDDEN Icon::Private : public QSharedData
0015 {
0016 public:
0017     QUrl url;
0018     uint width;
0019     uint height;
0020 
0021     Private()
0022         : width(0)
0023         , height(0)
0024     {
0025     }
0026 };
0027 
0028 Icon::Icon()
0029     : d(new Private)
0030 {
0031 }
0032 
0033 Icon::Icon(const Attica::Icon &other)
0034     : d(other.d)
0035 {
0036 }
0037 
0038 Icon &Icon::operator=(const Attica::Icon &other)
0039 {
0040     d = other.d;
0041     return *this;
0042 }
0043 
0044 Icon::~Icon()
0045 {
0046 }
0047 
0048 QUrl Icon::url() const
0049 {
0050     return d->url;
0051 }
0052 
0053 void Icon::setUrl(const QUrl &url)
0054 {
0055     d->url = url;
0056 }
0057 
0058 uint Icon::width() const
0059 {
0060     return d->width;
0061 }
0062 
0063 void Icon::setWidth(uint width)
0064 {
0065     d->width = width;
0066 }
0067 
0068 uint Icon::height() const
0069 {
0070     return d->height;
0071 }
0072 
0073 void Icon::setHeight(uint height)
0074 {
0075     d->height = height;
0076 }