Libksysguard

sensorfacepackage.cpp
1/*
2 SPDX-FileCopyrightText: 2007-2009 Aaron Seigo <aseigo@kde.org>
3 SPDX-FileCopyrightText: 2020 Marco Martin <mart@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#include <KLocalizedString>
9#include <kpackage/package.h>
10#include <kpackage/packagestructure.h>
11
12class SensorFacePackage : public KPackage::PackageStructure
13{
15public:
16 using KPackage::PackageStructure::PackageStructure;
17
18 void initPackage(KPackage::Package *package) override
19 {
20 package->setDefaultPackageRoot(QStringLiteral("ksysguard/sensorfaces"));
21
22 package->addDirectoryDefinition("ui", QStringLiteral("ui"));
23
24 package->addFileDefinition("CompactRepresentation", QStringLiteral("ui/CompactRepresentation.qml"));
25 package->setRequired("CompactRepresentation", true);
26
27 package->addFileDefinition("FullRepresentation", QStringLiteral("ui/FullRepresentation.qml"));
28 package->setRequired("FullRepresentation", true);
29
30 package->addFileDefinition("ConfigUI", QStringLiteral("ui/Config.qml"));
31
32 package->addDirectoryDefinition("config", QStringLiteral("config"));
33 package->addFileDefinition("mainconfigxml", QStringLiteral("config/main.xml"));
34
35 package->addFileDefinition("FaceProperties", QStringLiteral("faceproperties"));
36 package->setRequired("FaceProperties", true);
37 }
38};
39
40K_PLUGIN_CLASS_WITH_JSON(SensorFacePackage, "sensorface-packagestructure.json")
41
42#include "sensorfacepackage.moc"
void setRequired(const QByteArray &key, bool required)
void addDirectoryDefinition(const QByteArray &key, const QString &path)
void addFileDefinition(const QByteArray &key, const QString &path)
void setDefaultPackageRoot(const QString &packageRoot)
#define K_PLUGIN_CLASS_WITH_JSON(classname, jsonFile)
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.