File indexing completed on 2024-05-19 16:31:58
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Kai Uwe Broulik <kde@privat.broulik.de> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KCM_ENERGYINFO_H 0008 #define KCM_ENERGYINFO_H 0009 0010 #include <KQuickAddons/ConfigModule> 0011 class BatteryModel; 0012 0013 class KCMEnergyInfo : public KQuickAddons::ConfigModule 0014 { 0015 Q_OBJECT 0016 0017 Q_PROPERTY(BatteryModel *batteries READ batteries CONSTANT) 0018 0019 public: 0020 explicit KCMEnergyInfo(QObject *parent, const KPluginMetaData &data, const QVariantList &args); 0021 ~KCMEnergyInfo() override = default; 0022 0023 BatteryModel *batteries() const 0024 { 0025 return m_batteries; 0026 } 0027 0028 private: 0029 BatteryModel *m_batteries = nullptr; 0030 0031 }; 0032 0033 Q_DECLARE_METATYPE(QList<QPointF>) 0034 0035 #endif // KCM_ENERGYINFO_H