File indexing completed on 2024-05-12 17:00:15
0001 /* 0002 SPDX-FileCopyrightText: 2020 David Redondo <kde@david-redondo.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef MEMORY_H 0008 #define MEMORY_H 0009 0010 #include <systemstats/SensorPlugin.h> 0011 0012 #include <QObject> 0013 0014 #include <memory> 0015 0016 class MemoryBackend; 0017 0018 class MemoryPlugin : public KSysGuard::SensorPlugin 0019 { 0020 Q_OBJECT 0021 public: 0022 MemoryPlugin(QObject *parent, const QVariantList &args); 0023 ~MemoryPlugin(); 0024 0025 QString providerName() const override 0026 { 0027 return QStringLiteral("memory"); 0028 } 0029 void update() override; 0030 private: 0031 std::unique_ptr<MemoryBackend> m_backend; 0032 }; 0033 0034 #endif