File: AppPackageKitResource.h

package info (click to toggle)
plasma-discover 6.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,288 kB
  • sloc: cpp: 30,576; xml: 2,710; python: 311; sh: 5; makefile: 5
file content (58 lines) | stat: -rw-r--r-- 1,915 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 *   SPDX-FileCopyrightText: 2013 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
 *
 *   SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
 */

#pragma once

#include "PackageKitBackend.h"
#include "PackageKitResource.h"
#include <QIcon>

class AppPackageKitResource : public PackageKitResource
{
    Q_OBJECT
public:
    explicit AppPackageKitResource(const AppStream::Component &data, const QString &packageName, PackageKitBackend *parent);

    QString appstreamId() const override;

    AbstractResource::Type type() const override;
    QString name() const override;
    QVariant icon() const override;
    QStringList mimetypes() const override;
    bool hasCategory(const QString &category) const override;
    QString longDescription() override;
    QUrl url() const override;
    QUrl homepage() override;
    QUrl helpURL() override;
    QUrl bugURL() override;
    QUrl donationURL() override;
    QUrl contributeURL() override;
    QString comment() override;
    QJsonArray licenses() override;
    QStringList allPackageNames() const override;
    QList<PackageState> addonsInformation() override;
    QStringList extends() const override;
    void fetchScreenshots() override;
    void invokeApplication() const override;
    bool canExecute() const override;
    QDate releaseDate() const override;
    QString changelog() const override;
    QString author() const override;
    QString versionString() override;
    void fetchChangelog() override;
    QSet<QString> alternativeAppstreamIds() const override;
    bool isCritical() const override;

    QString contentRatingDescription() const override;
    uint contentRatingMinimumAge() const override;
    [[nodiscard]] bool hasResolvedIcon() const override;
    void resolveIcon() override;

private:
    const AppStream::Component m_appdata;
    mutable QString m_name;
    std::optional<QIcon> m_icon;
};