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 DecorationPackage : public KPackage::PackageStructure 0010 { 0011 Q_OBJECT 0012 public: 0013 using KPackage::PackageStructure::PackageStructure; 0014 void initPackage(KPackage::Package *package) override 0015 { 0016 package->setDefaultPackageRoot(QStringLiteral("kwin/decorations/")); 0017 0018 package->addDirectoryDefinition("config", QStringLiteral("config")); 0019 package->setMimeTypes("config", QStringList{QStringLiteral("text/xml")}); 0020 0021 package->addDirectoryDefinition("ui", QStringLiteral("ui")); 0022 0023 package->addDirectoryDefinition("code", QStringLiteral("code")); 0024 0025 package->addFileDefinition("mainscript", QStringLiteral("code/main.qml")); 0026 package->setRequired("mainscript", true); 0027 0028 package->setMimeTypes("decoration", QStringList{QStringLiteral("text/plain")}); 0029 } 0030 }; 0031 0032 K_PLUGIN_CLASS_WITH_JSON(DecorationPackage, "decoration.json") 0033 0034 #include "decoration.moc"