mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-08-31 04:39:56 +00:00
refactor: simplify sources processing
Also fix desktop source
This commit is contained in:
@ -30,13 +30,11 @@ class BatterySource : public AbstractExtSysMonSource
|
||||
public:
|
||||
const int TREND_LIMIT = 20;
|
||||
|
||||
explicit BatterySource(QObject *_parent, const QStringList &_args);
|
||||
~BatterySource() override;
|
||||
QStringList getSources();
|
||||
explicit BatterySource(QObject *_parent, QString _acpiPath);
|
||||
~BatterySource() override = default;
|
||||
QVariant data(const QString &_source) override;
|
||||
[[nodiscard]] KSysGuard::SensorInfo *initialData(const QString &_source) const override;
|
||||
void run() override;
|
||||
[[nodiscard]] QStringList sources() const override;
|
||||
void run();
|
||||
[[nodiscard]] QHash<QString, KSysGuard::SensorInfo *> sources() const override;
|
||||
|
||||
private:
|
||||
static double approximate(const QList<int> &_trend);
|
||||
|
Reference in New Issue
Block a user