mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-10 04:15:51 +00:00
* fix bug in ui
* drop QUEUE_LIMIT build option (moved to runtime cfg) * apply concurrent updates for slots
This commit is contained in:
@ -19,18 +19,21 @@
|
||||
#ifndef AWTOOLTIP_H
|
||||
#define AWTOOLTIP_H
|
||||
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsView>
|
||||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
class QGraphicsScene;
|
||||
class QGraphicsView;
|
||||
class QPixmap;
|
||||
class QThreadPool;
|
||||
|
||||
class AWDataAggregator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AWDataAggregator(QObject *parent = nullptr);
|
||||
explicit AWDataAggregator(QObject *parent = nullptr, QThreadPool *pThreadPool = nullptr);
|
||||
virtual ~AWDataAggregator();
|
||||
QList<float> getData(const QString key) const;
|
||||
QString htmlImage(const QPixmap source) const;
|
||||
@ -41,7 +44,7 @@ signals:
|
||||
void updateData(const QHash<QString, QString> values);
|
||||
void toolTipPainted(const QString image) const;
|
||||
|
||||
private slots:
|
||||
public slots:
|
||||
void dataUpdate(const QHash<QString, QString> values);
|
||||
|
||||
private:
|
||||
@ -53,6 +56,8 @@ private:
|
||||
void initScene();
|
||||
QString notificationText(const QString source, const float value) const;
|
||||
QString notificationText(const QString source, const QString value) const;
|
||||
// main method
|
||||
void setData(const QHash<QString, QString> values);
|
||||
void setData(const QString source, float value, const float extremum = -1.0);
|
||||
// different signature for battery device
|
||||
void setData(const bool dontInvert, const QString source, float value);
|
||||
@ -65,6 +70,7 @@ private:
|
||||
QHash<QString, QList<float>> data;
|
||||
bool m_enablePopup = false;
|
||||
QStringList requiredKeys;
|
||||
QThreadPool *threadPool = nullptr;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user