File indexing completed on 2024-05-19 05:29:58
0001 /* 0002 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0003 SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org> 0004 SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org> 0005 */ 0006 0007 #include <KPluginFactory> 0008 #include <KQuickConfigModule> 0009 #include <QLibraryInfo> 0010 0011 #include "CommandOutputContext.h" 0012 0013 class KCMKWinSupportInfo : public KQuickConfigModule 0014 { 0015 Q_OBJECT 0016 Q_PROPERTY(CommandOutputContext *infoOutputContext READ outputContext CONSTANT FINAL) 0017 public: 0018 explicit KCMKWinSupportInfo(QObject *parent, const KPluginMetaData &data) 0019 : KQuickConfigModule(parent, data) 0020 { 0021 m_outputContext = new CommandOutputContext(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"), 0022 {QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("supportInformation")}, 0023 parent); 0024 } 0025 CommandOutputContext *outputContext() const 0026 { 0027 return m_outputContext; 0028 } 0029 0030 private: 0031 CommandOutputContext *m_outputContext; 0032 }; 0033 0034 K_PLUGIN_CLASS_WITH_JSON(KCMKWinSupportInfo, "kcm_kwinsupportinfo.json") 0035 0036 #include "main.moc"