mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-08-31 04:39:56 +00:00
refactor: split formatters and matchers into separated singleton classes (#166)
* split formatter into separated singleton classes * split data engine matchers to classes * nodiscard attribute for formatter methods * small refactoring in matchers * fix codefactor warnings * fix test building
This commit is contained in:
@ -29,14 +29,15 @@ class SystemInfoSource : public AbstractExtSysMonSource
|
||||
public:
|
||||
explicit SystemInfoSource(QObject *_parent);
|
||||
~SystemInfoSource() override = default;
|
||||
QVariant data(const QString &_source) override;
|
||||
[[nodiscard]] QVariant data(const QString &_source) override;
|
||||
[[nodiscard]] QHash<QString, KSysGuard::SensorInfo *> sources() const override;
|
||||
|
||||
private:
|
||||
// configuration and values
|
||||
static QVariant fromDBusVariant(const QVariant &_value);
|
||||
static double getCurrentBrightness();
|
||||
static double getCurrentVolume();
|
||||
static QVariant sendDBusRequest(const QString &_destination, const QString &_path, const QString &_interface,
|
||||
const QString &_method, const QVariantList &_args = {});
|
||||
[[nodiscard]] static QVariant fromDBusVariant(const QVariant &_value);
|
||||
[[nodiscard]] static double getCurrentBrightness();
|
||||
[[nodiscard]] static double getCurrentVolume();
|
||||
[[nodiscard]] static QVariant sendDBusRequest(const QString &_destination, const QString &_path,
|
||||
const QString &_interface, const QString &_method,
|
||||
const QVariantList &_args = {});
|
||||
};
|
||||
|
Reference in New Issue
Block a user