mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-10 04:15:51 +00:00
some map replacing
This commit is contained in:
@ -19,7 +19,6 @@
|
||||
#ifndef AWACTIONS_H
|
||||
#define AWACTIONS_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
|
||||
|
@ -346,7 +346,6 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
||||
if (sourceName == QString("update")) return emit(needToBeUpdated());
|
||||
|
||||
// checking
|
||||
// if (!checkKeys(data)) return;
|
||||
if (keys.isEmpty()) return;
|
||||
|
||||
// regular expressions
|
||||
@ -866,15 +865,6 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
|
||||
}
|
||||
|
||||
|
||||
bool AWKeys::checkKeys(const QVariantMap data) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Data" << data;
|
||||
|
||||
return (data.count() != 0);
|
||||
}
|
||||
|
||||
|
||||
QString AWKeys::htmlValue(QString key) const
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef AWKEYS_H
|
||||
#define AWKEYS_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
#include <QVariant>
|
||||
@ -75,7 +75,6 @@ private slots:
|
||||
private:
|
||||
// methods
|
||||
void addKeyToCache(const QString type, const QString key = QString(""));
|
||||
bool checkKeys(const QVariantMap data) const;
|
||||
QString htmlValue(QString key) const;
|
||||
int numberCpus() const;
|
||||
float temperature(const float temp, const QString units) const;
|
||||
@ -96,7 +95,7 @@ private:
|
||||
ExtItemAggregator<ExtWeather> *extWeather;
|
||||
QString pattern;
|
||||
QStringList foundBars, foundKeys, keys;
|
||||
QMap<QString, QString> values;
|
||||
QHash<QString, QString> values;
|
||||
QStringList diskDevices, hddDevices, mountDevices, networkDevices, tempDevices;
|
||||
};
|
||||
|
||||
|
@ -67,8 +67,8 @@ AWToolTip::AWToolTip(QObject *parent, QVariantMap settings)
|
||||
if (configuration[QString("upTooltip")].toBool()) requiredKeys.append(QString("upTooltip"));
|
||||
if (configuration[QString("batTooltip")].toBool()) requiredKeys.append(QString("batTooltip"));
|
||||
|
||||
connect(this, SIGNAL(updateData(QMap<QString, QString>)),
|
||||
this, SLOT(dataUpdate(QMap<QString, QString>)));
|
||||
connect(this, SIGNAL(updateData(QHash<QString, QString>)),
|
||||
this, SLOT(dataUpdate(QHash<QString, QString>)));
|
||||
}
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ AWToolTip::~AWToolTip()
|
||||
}
|
||||
|
||||
|
||||
void AWToolTip::dataUpdate(QMap<QString, QString> values)
|
||||
void AWToolTip::dataUpdate(QHash<QString, QString> values)
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsView>
|
||||
#include <QMap>
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <QVariant>
|
||||
@ -39,11 +39,11 @@ public:
|
||||
QPixmap image();
|
||||
|
||||
signals:
|
||||
void updateData(QMap<QString, QString> values);
|
||||
void updateData(QHash<QString, QString> values);
|
||||
void toolTipPainted(QString image);
|
||||
|
||||
private slots:
|
||||
void dataUpdate(QMap<QString, QString> values);
|
||||
void dataUpdate(QHash<QString, QString> values);
|
||||
|
||||
private:
|
||||
// ui
|
||||
@ -55,8 +55,8 @@ private:
|
||||
bool debug = false;
|
||||
int counts = 0;
|
||||
QVariantMap configuration;
|
||||
QMap<QString, float> boundaries;
|
||||
QMap<QString, QList<float>> data;
|
||||
QHash<QString, float> boundaries;
|
||||
QHash<QString, QList<float>> data;
|
||||
QStringList requiredKeys;
|
||||
QSize size;
|
||||
};
|
||||
|
Reference in New Issue
Block a user