File indexing completed on 2024-05-12 17:00:15
0001 /* 0002 * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #pragma once 0008 0009 #include "systemstats/SensorObject.h" 0010 0011 class GpuDevice : public KSysGuard::SensorObject 0012 { 0013 Q_OBJECT 0014 0015 public: 0016 GpuDevice(const QString &id, const QString &name); 0017 ~GpuDevice() override = default; 0018 0019 virtual void initialize(); 0020 virtual void update(); 0021 0022 protected: 0023 virtual void makeSensors(); 0024 0025 KSysGuard::SensorProperty *m_nameProperty = nullptr; 0026 KSysGuard::SensorProperty *m_usageProperty = nullptr; 0027 KSysGuard::SensorProperty *m_totalVramProperty = nullptr; 0028 KSysGuard::SensorProperty *m_usedVramProperty = nullptr; 0029 KSysGuard::SensorProperty *m_temperatureProperty = nullptr; 0030 KSysGuard::SensorProperty *m_coreFrequencyProperty = nullptr; 0031 KSysGuard::SensorProperty *m_memoryFrequencyProperty = nullptr; 0032 KSysGuard::SensorProperty *m_powerProperty = nullptr; 0033 };