File indexing completed on 2024-11-10 04:57:01
0001 /* 0002 SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include <KPackage/PackageStructure> 0008 0009 class SwitcherPackage : 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/tabbox/")); 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("ui/main.qml")); 0026 package->setRequired("mainscript", true); 0027 0028 package->setMimeTypes("windowswitcher", QStringList(QStringLiteral("text/plain"))); 0029 } 0030 }; 0031 0032 K_PLUGIN_CLASS_WITH_JSON(SwitcherPackage, "windowswitcher.json") 0033 0034 #include "windowswitcher.moc"