File indexing completed on 2024-11-10 04:57:01
0001 /* 0002 SPDX-FileCopyrightText: 2017 Demitrius Belai <demitriusbelai@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include <KPackage/PackageStructure> 0008 0009 class AuroraePackage : public KPackage::PackageStructure 0010 { 0011 Q_OBJECT 0012 public: 0013 using KPackage::PackageStructure::PackageStructure; 0014 void initPackage(KPackage::Package *package) override 0015 { 0016 package->setContentsPrefixPaths(QStringList()); 0017 package->setDefaultPackageRoot(QStringLiteral("aurorae/themes/")); 0018 0019 package->addFileDefinition("decoration", QStringLiteral("decoration.svgz")); 0020 package->setRequired("decoration", true); 0021 0022 package->addFileDefinition("close", QStringLiteral("close.svgz")); 0023 package->addFileDefinition("minimize", QStringLiteral("minimize.svgz")); 0024 package->addFileDefinition("maximize", QStringLiteral("maximize.svgz")); 0025 package->addFileDefinition("restore", QStringLiteral("restore.svgz")); 0026 package->addFileDefinition("alldesktops", QStringLiteral("alldesktops.svgz")); 0027 package->addFileDefinition("keepabove", QStringLiteral("keepabove.svgz")); 0028 package->addFileDefinition("keepbelow", QStringLiteral("keepbelow.svgz")); 0029 package->addFileDefinition("shade", QStringLiteral("shade.svgz")); 0030 package->addFileDefinition("help", QStringLiteral("help.svgz")); 0031 package->addFileDefinition("configrc", QStringLiteral("configrc")); 0032 package->setDefaultMimeTypes(QStringList{QStringLiteral("image/svg+xml-compressed")}); 0033 } 0034 0035 void pathChanged(KPackage::Package *package) override 0036 { 0037 if (package->path().isEmpty()) { 0038 return; 0039 } 0040 0041 const QString configrc = package->metadata().pluginId() + "rc"; 0042 package->addFileDefinition("configrc", configrc); 0043 } 0044 }; 0045 0046 K_PLUGIN_CLASS_WITH_JSON(AuroraePackage, "aurorae.json") 0047 0048 #include "aurorae.moc"