mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-12-17 02:13:41 +00:00
split formatter into separated singleton classes
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
#include <QMultiHash>
|
||||
#include <QObject>
|
||||
|
||||
#include "awkeysaggregator.h"
|
||||
#include "formatters/awpluginformatter.h"
|
||||
|
||||
|
||||
class AWFormatterHelper;
|
||||
@ -35,7 +35,7 @@ public:
|
||||
explicit AWDataEngineMapper(QObject *_parent = nullptr, AWFormatterHelper *_custom = nullptr);
|
||||
~AWDataEngineMapper() override = default;
|
||||
// get methods
|
||||
[[nodiscard]] AWKeysAggregator::FormatterType formatter(const QString &_key) const;
|
||||
[[nodiscard]] AWPluginFormaterInterface *formatter(const QString &_key) const;
|
||||
[[nodiscard]] QStringList keysFromSource(const QString &_source) const;
|
||||
// set methods
|
||||
QStringList registerSource(const QString &_source, KSysGuard::Unit _units, const QStringList &_keys);
|
||||
@ -45,6 +45,6 @@ private:
|
||||
AWFormatterHelper *m_customFormatters = nullptr;
|
||||
// variables
|
||||
QHash<QString, QStringList> m_devices;
|
||||
QHash<QString, AWKeysAggregator::FormatterType> m_formatter;
|
||||
QHash<QString, AWPluginFormaterInterface *> m_formatter;
|
||||
QMultiHash<QString, QString> m_map;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user