KNewStuff

downloadlinkinfo.h
1/*
2 SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <admin@leinir.dk>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef DOWNLOADLINKINFO_H
8#define DOWNLOADLINKINFO_H
9
10#include "KNSCore/Entry"
11
12#include <QSharedData>
13
14class DownloadLinkInfoPrivate;
15/**
16 * @short One downloadable item as contained within one content item
17 *
18 * A simple data container which wraps a KNSCore::Entry::DownloadLinkInformation
19 * instance and provides property accessors for each of the pieces of information stored
20 * in it.
21 */
23{
24 Q_GADGET
25 Q_PROPERTY(QString name READ name CONSTANT)
26 Q_PROPERTY(QString priceAmount READ priceAmount CONSTANT)
27 Q_PROPERTY(QString distributionType READ distributionType CONSTANT)
28 Q_PROPERTY(QString descriptionLink READ descriptionLink CONSTANT)
29 Q_PROPERTY(int id READ id CONSTANT)
30 Q_PROPERTY(bool isDownloadtypeLink READ isDownloadtypeLink CONSTANT)
31 Q_PROPERTY(quint64 size READ size CONSTANT)
32 Q_PROPERTY(QString formattedSize READ formattedSize CONSTANT)
33 Q_PROPERTY(QString icon READ icon CONSTANT)
34
35public:
36 explicit DownloadLinkInfo(const KNSCore::Entry::DownloadLinkInformation &data);
38 DownloadLinkInfo &operator=(const DownloadLinkInfo &);
40
41 QString name() const;
42 QString priceAmount() const;
43 QString distributionType() const;
44 QString descriptionLink() const;
45 int id() const;
46 bool isDownloadtypeLink() const;
47 quint64 size() const;
48 QString formattedSize() const;
49 QString icon() const;
50
51private:
53};
54
55#endif // DOWNLOADLINKINFO_H
One downloadable item as contained within one content item.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Apr 27 2024 22:17:01 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.