File indexing completed on 2024-12-08 03:37:11

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 #ifndef ATTICA_ICON_H
0011 #define ATTICA_ICON_H
0012 
0013 #include <QSharedDataPointer>
0014 #include <QUrl>
0015 
0016 #include "attica_export.h"
0017 
0018 namespace Attica
0019 {
0020 /**
0021     @class Icon icon.h <Attica/Icon>
0022 
0023     The Icon class contains information about an icon.
0024     It consists of a Url and icon size information.
0025  */
0026 class ATTICA_EXPORT Icon
0027 {
0028 public:
0029     typedef QList<Icon> List;
0030 
0031     /**
0032      * Creates an empty Icon
0033      */
0034     Icon();
0035 
0036     /**
0037      * Copy constructor.
0038      * @param other the Icon to copy from
0039      */
0040     Icon(const Icon &other);
0041 
0042     /**
0043      * Assignment operator.
0044      * @param other the Icon to assign from
0045      * @return pointer to this Icon
0046      */
0047     Icon &operator=(const Icon &other);
0048 
0049     /**
0050      * Destructor.
0051      */
0052     ~Icon();
0053 
0054     QUrl url() const;
0055     void setUrl(const QUrl &url);
0056 
0057     uint width() const;
0058     void setWidth(uint width);
0059 
0060     uint height() const;
0061     void setHeight(uint height);
0062 
0063 private:
0064     class Private;
0065     QSharedDataPointer<Private> d;
0066 };
0067 
0068 }
0069 
0070 #endif