1 | /* |
2 | SPDX-FileCopyrightText: 2008 Aaron Seigo <aseigo@kde.org> |
3 | SPDX-FileCopyrightText: 2012 Sebastian Kügler <sebas@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #ifndef PACKAGETOOL_H |
9 | #define PACKAGETOOL_H |
10 | |
11 | #include "package.h" |
12 | #include "packagejob.h" |
13 | #include <QCoreApplication> |
14 | |
15 | class QCommandLineParser; |
16 | class KJob; |
17 | |
18 | namespace KPackage |
19 | { |
20 | class PackageToolPrivate; |
21 | |
22 | class PackageTool : public QCoreApplication |
23 | { |
24 | Q_OBJECT |
25 | |
26 | public: |
27 | PackageTool(int &argc, char **argv, QCommandLineParser *parser); |
28 | ~PackageTool() override; |
29 | |
30 | void listPackages(const QString &kpackageType, const QString &path = QString()); |
31 | void showPackageInfo(const QString &pluginName); |
32 | void showAppstreamInfo(const QString &pluginName); |
33 | QString resolvePackageRootWithOptions(); |
34 | |
35 | private Q_SLOTS: |
36 | void runMain(); |
37 | void packageInstalled(KPackage::PackageJob *job); |
38 | void packageUninstalled(KPackage::PackageJob *job); |
39 | |
40 | private: |
41 | PackageToolPrivate *d; |
42 | }; |
43 | |
44 | } |
45 | |
46 | #endif |
47 | |