mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-15 06:45:48 +00:00
possible fix #75
I've added 'optimize' option (by default true). If it options is set then sources will be checked if they are required (with dependencies if any). And if they are not required they will be dropped by using common mechanism. Please note that if this option enabled the following features (at the moment) will be unavailable: * key request from context menu (from configuration interface it still works) * notifications event if sources on which notification is not connected I suppose this commit will increase performance in about 4-5 times.
This commit is contained in:
@ -67,7 +67,6 @@ public:
|
||||
// get methods
|
||||
QString formater(const QVariant &data, const QString &key) const;
|
||||
QStringList keysFromSource(const QString &source) const;
|
||||
QStringList requiredByKeysFromSource(const QString &source) const;
|
||||
// set methods
|
||||
void setAcOffline(const QString inactive);
|
||||
void setAcOnline(const QString active);
|
||||
@ -78,7 +77,8 @@ public:
|
||||
void setTranslate(const bool translate);
|
||||
|
||||
public slots:
|
||||
QStringList registerSource(const QString &source, const QString &units);
|
||||
QStringList registerSource(const QString &source, const QString &units,
|
||||
const QStringList &keys = QStringList());
|
||||
|
||||
private:
|
||||
float temperature(const float temp) const;
|
||||
@ -91,7 +91,6 @@ private:
|
||||
QHash<QString, QStringList> m_devices;
|
||||
QHash<QString, FormaterType> m_formater;
|
||||
QHash<QString, QString> m_map;
|
||||
QHash<QString, QString> m_requiredByMap;
|
||||
QString m_tempUnits;
|
||||
bool m_translate = false;
|
||||
};
|
||||
|
Reference in New Issue
Block a user