mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
some map replacing
This commit is contained in:
parent
7405b2ba1d
commit
1cddf6f14d
@ -93,6 +93,7 @@ Item {
|
|||||||
|
|
||||||
onNewData: {
|
onNewData: {
|
||||||
if (debug) console.log("[main::onNewData] : Update source " + sourceName)
|
if (debug) console.log("[main::onNewData] : Update source " + sourceName)
|
||||||
|
systemmonitorDE.interval = plasmoid.configuration.interval
|
||||||
|
|
||||||
awKeys.setDataBySource(sourceName, data, settings)
|
awKeys.setDataBySource(sourceName, data, settings)
|
||||||
}
|
}
|
||||||
@ -112,6 +113,7 @@ Item {
|
|||||||
|
|
||||||
onNewData: {
|
onNewData: {
|
||||||
if (debug) console.log("[main::onNewData] : Update source " + sourceName)
|
if (debug) console.log("[main::onNewData] : Update source " + sourceName)
|
||||||
|
extsysmonDE.interval = plasmoid.configuration.interval
|
||||||
|
|
||||||
awKeys.setDataBySource(sourceName, data, settings)
|
awKeys.setDataBySource(sourceName, data, settings)
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#ifndef AWACTIONS_H
|
#ifndef AWACTIONS_H
|
||||||
#define AWACTIONS_H
|
#define AWACTIONS_H
|
||||||
|
|
||||||
#include <QMap>
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
|
@ -346,7 +346,6 @@ void AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
if (sourceName == QString("update")) return emit(needToBeUpdated());
|
if (sourceName == QString("update")) return emit(needToBeUpdated());
|
||||||
|
|
||||||
// checking
|
// checking
|
||||||
// if (!checkKeys(data)) return;
|
|
||||||
if (keys.isEmpty()) return;
|
if (keys.isEmpty()) return;
|
||||||
|
|
||||||
// regular expressions
|
// 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
|
QString AWKeys::htmlValue(QString key) const
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef AWKEYS_H
|
#ifndef AWKEYS_H
|
||||||
#define AWKEYS_H
|
#define AWKEYS_H
|
||||||
|
|
||||||
#include <QMap>
|
#include <QHash>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
@ -75,7 +75,6 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
// methods
|
// methods
|
||||||
void addKeyToCache(const QString type, const QString key = QString(""));
|
void addKeyToCache(const QString type, const QString key = QString(""));
|
||||||
bool checkKeys(const QVariantMap data) const;
|
|
||||||
QString htmlValue(QString key) const;
|
QString htmlValue(QString key) const;
|
||||||
int numberCpus() const;
|
int numberCpus() const;
|
||||||
float temperature(const float temp, const QString units) const;
|
float temperature(const float temp, const QString units) const;
|
||||||
@ -96,7 +95,7 @@ private:
|
|||||||
ExtItemAggregator<ExtWeather> *extWeather;
|
ExtItemAggregator<ExtWeather> *extWeather;
|
||||||
QString pattern;
|
QString pattern;
|
||||||
QStringList foundBars, foundKeys, keys;
|
QStringList foundBars, foundKeys, keys;
|
||||||
QMap<QString, QString> values;
|
QHash<QString, QString> values;
|
||||||
QStringList diskDevices, hddDevices, mountDevices, networkDevices, tempDevices;
|
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("upTooltip")].toBool()) requiredKeys.append(QString("upTooltip"));
|
||||||
if (configuration[QString("batTooltip")].toBool()) requiredKeys.append(QString("batTooltip"));
|
if (configuration[QString("batTooltip")].toBool()) requiredKeys.append(QString("batTooltip"));
|
||||||
|
|
||||||
connect(this, SIGNAL(updateData(QMap<QString, QString>)),
|
connect(this, SIGNAL(updateData(QHash<QString, QString>)),
|
||||||
this, SLOT(dataUpdate(QMap<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;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QMap>
|
#include <QHash>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
@ -39,11 +39,11 @@ public:
|
|||||||
QPixmap image();
|
QPixmap image();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void updateData(QMap<QString, QString> values);
|
void updateData(QHash<QString, QString> values);
|
||||||
void toolTipPainted(QString image);
|
void toolTipPainted(QString image);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void dataUpdate(QMap<QString, QString> values);
|
void dataUpdate(QHash<QString, QString> values);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// ui
|
// ui
|
||||||
@ -55,8 +55,8 @@ private:
|
|||||||
bool debug = false;
|
bool debug = false;
|
||||||
int counts = 0;
|
int counts = 0;
|
||||||
QVariantMap configuration;
|
QVariantMap configuration;
|
||||||
QMap<QString, float> boundaries;
|
QHash<QString, float> boundaries;
|
||||||
QMap<QString, QList<float>> data;
|
QHash<QString, QList<float>> data;
|
||||||
QStringList requiredKeys;
|
QStringList requiredKeys;
|
||||||
QSize size;
|
QSize size;
|
||||||
};
|
};
|
||||||
|
@ -11,7 +11,8 @@ include_directories(
|
|||||||
${Kf5_INCLUDE}
|
${Kf5_INCLUDE}
|
||||||
)
|
)
|
||||||
|
|
||||||
file(GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp)
|
file(GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp
|
||||||
|
${PROJECT_TRDPARTY_DIR}/pdebug/*.cpp)
|
||||||
file(GLOB SUBPROJECT_NOTIFY *.notifyrc)
|
file(GLOB SUBPROJECT_NOTIFY *.notifyrc)
|
||||||
|
|
||||||
add_library(${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE})
|
add_library(${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE})
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <fontdialog/fontdialog.h>
|
#include <fontdialog/fontdialog.h>
|
||||||
#include <pdebug/pdebug.h>
|
#include <pdebug/pdebug.h>
|
||||||
|
#include <pdebug/pdebug-time.h>
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
@ -42,6 +43,8 @@
|
|||||||
DPAdds::DPAdds(QObject *parent)
|
DPAdds::DPAdds(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{
|
||||||
|
qInstallMessageHandler(debugString);
|
||||||
|
|
||||||
// debug
|
// debug
|
||||||
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
|
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
|
||||||
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
|
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
|
||||||
|
Loading…
Reference in New Issue
Block a user