mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-15 06:45:48 +00:00
more correct logging, use qt logging for qml as well
This commit is contained in:
@ -42,15 +42,7 @@
|
||||
AWActions::AWActions(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
// debug
|
||||
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
|
||||
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
|
||||
bool debug = (debugEnv == QString("yes"));
|
||||
|
||||
// logging
|
||||
const_cast<QLoggingCategory &>(LOG_AW()).setEnabled(QtMsgType::QtDebugMsg, debug);
|
||||
qSetMessagePattern(LOG_FORMAT);
|
||||
qCInfo(LOG_AW) << "simple test" << QT_VERSION_CHECK(5, 5, 0) << QT_VERSION;
|
||||
qCDebug(LOG_AW);
|
||||
}
|
||||
|
||||
|
||||
@ -158,6 +150,7 @@ QString AWActions::getAboutText(const QString type) const
|
||||
QVariantMap AWActions::getFont(const QVariantMap defaultFont) const
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Default font is" << defaultFont;
|
||||
|
||||
QVariantMap fontMap;
|
||||
CFont defaultCFont = CFont(defaultFont[QString("family")].toString(),
|
||||
@ -178,7 +171,7 @@ QVariantMap AWActions::readDataEngineConfiguration() const
|
||||
qCDebug(LOG_AW);
|
||||
|
||||
QString fileName = QStandardPaths::locate(QStandardPaths::ConfigLocation, QString("plasma-dataengine-extsysmon.conf"));
|
||||
qCDebug(LOG_AW) << "Configuration file" << fileName;
|
||||
qCInfo(LOG_AW) << "Configuration file" << fileName;
|
||||
QSettings settings(fileName, QSettings::IniFormat);
|
||||
QVariantMap configuration;
|
||||
|
||||
@ -203,7 +196,7 @@ void AWActions::writeDataEngineConfiguration(const QVariantMap configuration) co
|
||||
|
||||
QString fileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QString("/plasma-dataengine-extsysmon.conf");
|
||||
QSettings settings(fileName, QSettings::IniFormat);
|
||||
qCDebug(LOG_AW) << "Configuration file" << settings.fileName();
|
||||
qCInfo(LOG_AW) << "Configuration file" << settings.fileName();
|
||||
|
||||
settings.beginGroup(QString("Configuration"));
|
||||
settings.setValue(QString("ACPIPATH"), configuration[QString("ACPIPATH")]);
|
||||
@ -271,6 +264,7 @@ void AWActions::versionReplyRecieved(QNetworkReply *reply) const
|
||||
QVariantMap firstRelease = jsonDoc.toVariant().toList().first().toMap();
|
||||
QString version = firstRelease[QString("tag_name")].toString();
|
||||
version.remove(QString("V."));
|
||||
qCInfo(LOG_AW) << "Found version" << version;
|
||||
|
||||
int old_major = QString(VERSION).split(QChar('.')).at(0).toInt();
|
||||
int old_minor = QString(VERSION).split(QChar('.')).at(1).toInt();
|
||||
|
@ -30,8 +30,8 @@ class AWActions : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AWActions(QObject *parent = nullptr);
|
||||
~AWActions();
|
||||
explicit AWActions(QObject *parent = nullptr);
|
||||
virtual ~AWActions();
|
||||
|
||||
Q_INVOKABLE void checkUpdates();
|
||||
Q_INVOKABLE bool dropCache() const;
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <QInputDialog>
|
||||
#include <QLocale>
|
||||
#include <QNetworkInterface>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QRegExp>
|
||||
#include <QScriptEngine>
|
||||
#include <QSettings>
|
||||
@ -44,21 +43,21 @@
|
||||
AWKeys::AWKeys(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
// debug
|
||||
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
|
||||
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
|
||||
bool debug = (debugEnv == QString("yes"));
|
||||
qCDebug(LOG_AW);
|
||||
|
||||
// logging
|
||||
const_cast<QLoggingCategory &>(LOG_AW()).setEnabled(QtMsgType::QtDebugMsg, debug);
|
||||
// disable info because QtMsgType has invalid enum order
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
||||
const_cast<QLoggingCategory &>(LOG_AW()).setEnabled(QtMsgType::QtInfoMsg, false);
|
||||
#endif /* QT_VERSION */
|
||||
qSetMessagePattern(LOG_FORMAT);
|
||||
|
||||
// backend
|
||||
graphicalItems = new ExtItemAggregator<GraphicalItem>(nullptr, QString("desktops"), debug);
|
||||
extQuotes = new ExtItemAggregator<ExtQuotes>(nullptr, QString("quotes"), debug);
|
||||
extScripts = new ExtItemAggregator<ExtScript>(nullptr, QString("scripts"), debug);
|
||||
extUpgrade = new ExtItemAggregator<ExtUpgrade>(nullptr, QString("upgrade"), debug);
|
||||
extWeather = new ExtItemAggregator<ExtWeather>(nullptr, QString("weather"), debug);
|
||||
graphicalItems = new ExtItemAggregator<GraphicalItem>(nullptr, QString("desktops"));
|
||||
extQuotes = new ExtItemAggregator<ExtQuotes>(nullptr, QString("quotes"));
|
||||
extScripts = new ExtItemAggregator<ExtScript>(nullptr, QString("scripts"));
|
||||
extUpgrade = new ExtItemAggregator<ExtUpgrade>(nullptr, QString("upgrade"));
|
||||
extWeather = new ExtItemAggregator<ExtWeather>(nullptr, QString("weather"));
|
||||
connect(this, SIGNAL(needToBeUpdated()), this, SLOT(dataUpdate()));
|
||||
}
|
||||
|
||||
@ -80,6 +79,7 @@ AWKeys::~AWKeys()
|
||||
void AWKeys::initKeys(const QString currentPattern)
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Pattern" << currentPattern;
|
||||
|
||||
// init
|
||||
pattern = currentPattern;
|
||||
@ -94,6 +94,7 @@ void AWKeys::initKeys(const QString currentPattern)
|
||||
void AWKeys::initTooltip(const QVariantMap tooltipParams)
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Tooltip parameters" << tooltipParams;
|
||||
|
||||
if (toolTip != nullptr) {
|
||||
disconnect(toolTip, SIGNAL(toolTipPainted(QString)), this, SIGNAL(needToolTipToBeUpdated(QString)));
|
||||
@ -109,6 +110,7 @@ void AWKeys::initTooltip(const QVariantMap tooltipParams)
|
||||
void AWKeys::setPopupEnabled(const bool popup)
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Is popup enabled" << popup;
|
||||
|
||||
enablePopup = popup;
|
||||
}
|
||||
@ -117,6 +119,7 @@ void AWKeys::setPopupEnabled(const bool popup)
|
||||
void AWKeys::setTranslateStrings(const bool translate)
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Is translation enabled" << translate;
|
||||
|
||||
translateStrings = translate;
|
||||
}
|
||||
@ -125,6 +128,7 @@ void AWKeys::setTranslateStrings(const bool translate)
|
||||
void AWKeys::setWrapNewLines(const bool wrap)
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Is wrapping enabled" << wrap;
|
||||
|
||||
wrapNewLines = wrap;
|
||||
}
|
||||
@ -698,15 +702,14 @@ QString AWKeys::valueByKey(QString key) const
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Requested key" << key;
|
||||
|
||||
key.remove(QRegExp(QString("^bar[0-9]{1,}")));
|
||||
|
||||
return values[key];
|
||||
return values[key.remove(QRegExp(QString("^bar[0-9]{1,}")))];
|
||||
}
|
||||
|
||||
|
||||
void AWKeys::editItem(const QString type)
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Item type" << type;
|
||||
|
||||
if (type == QString("graphicalitem")) {
|
||||
graphicalItems->setConfigArgs(dictKeys(true, QString("^(cpu(?!cl).*|gpu$|mem$|swap$|hdd[0-9].*|bat.*)")));
|
||||
@ -738,7 +741,7 @@ void AWKeys::loadKeysFromCache()
|
||||
|
||||
QString fileName = QString("%1/awesomewidgets.ndx")
|
||||
.arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation));
|
||||
qCDebug(LOG_AW) << "Cache file" << fileName;
|
||||
qCInfo(LOG_AW) << "Cache file" << fileName;
|
||||
QSettings cache(fileName, QSettings::IniFormat);
|
||||
|
||||
cache.beginGroup(QString("Disk"));
|
||||
@ -777,9 +780,57 @@ void AWKeys::reinitKeys()
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
|
||||
foundBars = findGraphicalItems();
|
||||
foundKeys = findKeys();
|
||||
foundLambdas = findLambdas();
|
||||
// init
|
||||
QStringList allKeys = dictKeys();
|
||||
|
||||
// append lists
|
||||
// bars
|
||||
foundBars = [allKeys](QString pattern) {
|
||||
QStringList selectedKeys;
|
||||
foreach(QString key, allKeys)
|
||||
if ((key.startsWith(QString("bar"))) &&
|
||||
(pattern.contains(QString("$%1").arg(key)))) {
|
||||
qCInfo(LOG_AW) << "Found bar" << key;
|
||||
selectedKeys.append(key);
|
||||
}
|
||||
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No bars found";
|
||||
return selectedKeys;
|
||||
}(pattern);
|
||||
|
||||
// main key list
|
||||
foundKeys = [allKeys](QString pattern) {
|
||||
QStringList selectedKeys;
|
||||
foreach(QString key, allKeys)
|
||||
if ((!key.startsWith(QString("bar"))) &&
|
||||
(pattern.contains(QString("$%1").arg(key)))) {
|
||||
qCInfo(LOG_AW) << "Found key" << key;
|
||||
selectedKeys.append(key);
|
||||
}
|
||||
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No keys found";
|
||||
return selectedKeys;
|
||||
}(pattern);
|
||||
|
||||
// lambdas
|
||||
foundLambdas = [](QString pattern) {
|
||||
QStringList selectedKeys;
|
||||
// substring inside ${{ }} (with brackets) which should not contain ${{
|
||||
QRegularExpression lambdaRegexp(QString("\\$\\{\\{((?!\\$\\{\\{).)*?\\}\\}"));
|
||||
lambdaRegexp.setPatternOptions(QRegularExpression::DotMatchesEverythingOption);
|
||||
|
||||
QRegularExpressionMatchIterator it = lambdaRegexp.globalMatch(pattern);
|
||||
while (it.hasNext()) {
|
||||
QRegularExpressionMatch match = it.next();
|
||||
QString lambda = match.captured();
|
||||
// drop brakets
|
||||
lambda.remove(QRegExp(QString("^\\$\\{\\{")));
|
||||
lambda.remove(QRegExp(QString("\\}\\}$")));
|
||||
// append
|
||||
qCInfo(LOG_AW) << "Found lambda" << lambda;
|
||||
selectedKeys.append(lambda);
|
||||
}
|
||||
if (selectedKeys.isEmpty()) qCWarning(LOG_AW) << "No lambdas found";
|
||||
return selectedKeys;
|
||||
}(pattern);
|
||||
}
|
||||
|
||||
|
||||
@ -790,7 +841,7 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
|
||||
qCDebug(LOG_AW) << "Key" << key;
|
||||
|
||||
QString fileName = QString("%1/awesomewidgets.ndx").arg(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation));
|
||||
qCDebug(LOG_AW) << "Cache file" << fileName;
|
||||
qCInfo(LOG_AW) << "Cache file" << fileName;
|
||||
QSettings cache(fileName, QSettings::IniFormat);
|
||||
|
||||
cache.beginGroup(type);
|
||||
@ -804,7 +855,7 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
|
||||
foreach(QString dev, devices) {
|
||||
QString device = QString("/dev/%1").arg(dev);
|
||||
if (cachedValues.contains(device)) continue;
|
||||
qCDebug(LOG_AW) << "Found new key" << device << "for type" << type;
|
||||
qCInfo(LOG_AW) << "Found new key" << device << "for type" << type;
|
||||
cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), device);
|
||||
}
|
||||
} else if (type == QString("Network")) {
|
||||
@ -812,12 +863,12 @@ void AWKeys::addKeyToCache(const QString type, const QString key)
|
||||
foreach(QNetworkInterface interface, rawInterfaceList) {
|
||||
QString device = interface.name();
|
||||
if (cachedValues.contains(device)) continue;
|
||||
qCDebug(LOG_AW) << "Found new key" << device << "for type" << type;
|
||||
qCInfo(LOG_AW) << "Found new key" << device << "for type" << type;
|
||||
cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), device);
|
||||
}
|
||||
} else {
|
||||
if (cachedValues.contains(key)) return;
|
||||
qCDebug(LOG_AW) << "Found new key" << key << "for type" << type;
|
||||
qCInfo(LOG_AW) << "Found new key" << key << "for type" << type;
|
||||
cache.setValue(QString("%1").arg(cache.allKeys().count(), 3, 10, QChar('0')), key);
|
||||
}
|
||||
cache.endGroup();
|
||||
@ -834,12 +885,14 @@ QString AWKeys::parsePattern() const
|
||||
|
||||
QString parsed = pattern;
|
||||
parsed.replace(QString("$$"), QString("$\\$\\"));
|
||||
|
||||
// lambdas
|
||||
foreach(QString key, foundLambdas)
|
||||
parsed.replace(QString("${{%1}}").arg(key), [this](QString key) {
|
||||
QScriptEngine engine;
|
||||
foreach(QString lambdaKey, foundKeys)
|
||||
key.replace(QString("$%1").arg(lambdaKey), values[lambdaKey]);
|
||||
qCDebug(LOG_AW) << "Expression" << key;
|
||||
qCInfo(LOG_AW) << "Expression" << key;
|
||||
QScriptValue result = engine.evaluate(key);
|
||||
if (engine.hasUncaughtException()) {
|
||||
int line = engine.uncaughtExceptionLineNumber();
|
||||
@ -848,17 +901,22 @@ QString AWKeys::parsePattern() const
|
||||
} else
|
||||
return result.toString();
|
||||
}(key));
|
||||
|
||||
// main keys
|
||||
foreach(QString key, foundKeys)
|
||||
parsed.replace(QString("$%1").arg(key), [](QString key, QString value) {
|
||||
if (!key.startsWith(QString("custom")))
|
||||
value.replace(QString(" "), QString(" "));
|
||||
return value;
|
||||
}(key, values[key]));
|
||||
|
||||
// bars
|
||||
foreach(QString bar, foundBars)
|
||||
parsed.replace(QString("$%1").arg(bar),
|
||||
graphicalItems->itemByTag(bar)->image(valueByKey(bar).toFloat()));
|
||||
|
||||
// prepare strings
|
||||
parsed.replace(QString("$\\$\\"), QString("$$"));
|
||||
// wrap new lines if required
|
||||
if (wrapNewLines) parsed.replace(QString("\n"), QString("<br>"));
|
||||
|
||||
return parsed;
|
||||
@ -868,6 +926,8 @@ QString AWKeys::parsePattern() const
|
||||
float AWKeys::temperature(const float temp, const QString units) const
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Temperature value" << temp;
|
||||
qCDebug(LOG_AW) << "Temperature units" << units;
|
||||
|
||||
float converted = temp;
|
||||
if (units == QString("Celsius"))
|
||||
@ -887,65 +947,3 @@ float AWKeys::temperature(const float temp, const QString units) const
|
||||
|
||||
return converted;
|
||||
}
|
||||
|
||||
|
||||
QStringList AWKeys::findGraphicalItems() const
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
|
||||
QStringList orderedKeys;
|
||||
foreach(GraphicalItem *item, graphicalItems->items())
|
||||
orderedKeys.append(item->tag());
|
||||
orderedKeys.sort();
|
||||
|
||||
QStringList selectedKeys;
|
||||
for (int i=orderedKeys.count()-1; i>=0; i--)
|
||||
if (pattern.contains(QString("$%1").arg(orderedKeys.at(i)))) {
|
||||
qCDebug(LOG_AW) << "Found bar" << orderedKeys.at(i);
|
||||
selectedKeys.append(orderedKeys.at(i));
|
||||
}
|
||||
|
||||
return selectedKeys;
|
||||
}
|
||||
|
||||
|
||||
QStringList AWKeys::findKeys() const
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
|
||||
QStringList selectedKeys;
|
||||
foreach(QString key, dictKeys()) {
|
||||
if (key.startsWith(QString("bar"))) continue;
|
||||
if (pattern.contains(QString("$%1").arg(key))) {
|
||||
qCDebug(LOG_AW) << "Found key" << key;
|
||||
selectedKeys.append(key);
|
||||
}
|
||||
}
|
||||
|
||||
return selectedKeys;
|
||||
}
|
||||
|
||||
|
||||
QStringList AWKeys::findLambdas() const
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
|
||||
QStringList selectedKeys;
|
||||
// substring inside ${{ }} (with brackets) which should not contain ${{
|
||||
QRegularExpression lambdaRegexp(QString("\\$\\{\\{((?!\\$\\{\\{).)*?\\}\\}"));
|
||||
lambdaRegexp.setPatternOptions(QRegularExpression::DotMatchesEverythingOption);
|
||||
|
||||
QRegularExpressionMatchIterator it = lambdaRegexp.globalMatch(pattern);
|
||||
while (it.hasNext()) {
|
||||
QRegularExpressionMatch match = it.next();
|
||||
QString lambda = match.captured();
|
||||
// drop brakets
|
||||
lambda.remove(QRegExp(QString("^\\$\\{\\{")));
|
||||
lambda.remove(QRegExp(QString("\\}\\}$")));
|
||||
// append
|
||||
qCDebug(LOG_AW) << "Found lambda" << lambda;
|
||||
selectedKeys.append(lambda);
|
||||
}
|
||||
|
||||
return selectedKeys;
|
||||
}
|
||||
|
@ -40,8 +40,8 @@ class AWKeys : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AWKeys(QObject *parent = nullptr);
|
||||
~AWKeys();
|
||||
explicit AWKeys(QObject *parent = nullptr);
|
||||
virtual ~AWKeys();
|
||||
|
||||
Q_INVOKABLE void initKeys(const QString currentPattern);
|
||||
Q_INVOKABLE void initTooltip(const QVariantMap tooltipParams);
|
||||
@ -79,10 +79,6 @@ private:
|
||||
void addKeyToCache(const QString type, const QString key = QString(""));
|
||||
QString parsePattern() const;
|
||||
float temperature(const float temp, const QString units) const;
|
||||
// find methods
|
||||
QStringList findGraphicalItems() const;
|
||||
QStringList findKeys() const;
|
||||
QStringList findLambdas() const;
|
||||
// get methods
|
||||
AWToolTip *toolTip = nullptr;
|
||||
bool enablePopup = false;
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "awtooltip.h"
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QProcessEnvironment>
|
||||
#include <math.h>
|
||||
|
||||
#include "awdebug.h"
|
||||
@ -28,14 +27,7 @@ AWToolTip::AWToolTip(QObject *parent, QVariantMap settings)
|
||||
: QObject(parent),
|
||||
configuration(qvariant_cast<QVariantHash>(settings))
|
||||
{
|
||||
// debug
|
||||
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
|
||||
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
|
||||
bool debug = (debugEnv == QString("yes"));
|
||||
|
||||
// logging
|
||||
const_cast<QLoggingCategory &>(LOG_AW()).setEnabled(QtMsgType::QtDebugMsg, debug);
|
||||
qSetMessagePattern(LOG_FORMAT);
|
||||
qCDebug(LOG_AW);
|
||||
|
||||
toolTipScene = new QGraphicsScene(nullptr);
|
||||
toolTipView = new QGraphicsView(toolTipScene);
|
||||
@ -145,6 +137,7 @@ QPixmap AWToolTip::image()
|
||||
float shift = i * 100.0;
|
||||
if (down) shift -= 100.0;
|
||||
for (int j=0; j<data[requiredKeys.at(i)].count()-1; j++) {
|
||||
// some magic here
|
||||
float x1 = j * normX + shift;
|
||||
float y1 = - fabs(data[requiredKeys.at(i)].at(j)) * normY + 5.0;
|
||||
float x2 = (j + 1) * normX + shift;
|
||||
@ -164,9 +157,12 @@ QPixmap AWToolTip::image()
|
||||
}
|
||||
|
||||
|
||||
void AWToolTip::setData(const QString source, float value, const bool ac)
|
||||
void AWToolTip::setData(const QString source, float value, const bool dontInvert)
|
||||
{
|
||||
qCDebug(LOG_AW);
|
||||
qCDebug(LOG_AW) << "Source" << source;
|
||||
qCDebug(LOG_AW) << "Value" << value;
|
||||
qCDebug(LOG_AW) << "Do not invert value" << dontInvert;
|
||||
|
||||
if (data[source].count() == 0)
|
||||
data[source].append(0.0);
|
||||
@ -174,19 +170,12 @@ void AWToolTip::setData(const QString source, float value, const bool ac)
|
||||
data[source].takeFirst();
|
||||
if (isnan(value)) value = 0.0;
|
||||
|
||||
if (ac)
|
||||
data[source].append(value);
|
||||
else
|
||||
data[source].append(-value);
|
||||
// invert values for different battery colours
|
||||
data[source].append(dontInvert ? value : -value);
|
||||
|
||||
if ((source == QString("downTooltip")) || (source == QString("upTooltip"))) {
|
||||
foreach(float val, data[QString("downTooltip")])
|
||||
if (boundaries[QString("downTooltip")] < val)
|
||||
boundaries[QString("downTooltip")] = val;
|
||||
foreach(float val, data[QString("upTooltip")])
|
||||
if (boundaries[QString("downTooltip")] < val)
|
||||
boundaries[QString("downTooltip")] = val;
|
||||
boundaries[QString("downTooltip")] *= 1.2;
|
||||
if (source == QString("downTooltip")) {
|
||||
QList<float> netValues = data[QString("downTooltip")] + data[QString("upTooltip")];
|
||||
boundaries[QString("downTooltip")] = 1.2 * *std::max_element(netValues.cbegin(), netValues.cend());
|
||||
boundaries[QString("upTooltip")] = boundaries[QString("downTooltip")];
|
||||
}
|
||||
}
|
||||
|
@ -32,8 +32,8 @@ class AWToolTip : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AWToolTip(QObject *parent = nullptr, QVariantMap settings = QVariantMap());
|
||||
~AWToolTip();
|
||||
explicit AWToolTip(QObject *parent = nullptr, QVariantMap settings = QVariantMap());
|
||||
virtual ~AWToolTip();
|
||||
QSize getSize() const;
|
||||
QString htmlImage();
|
||||
QPixmap image();
|
||||
@ -50,7 +50,7 @@ private:
|
||||
QGraphicsScene *toolTipScene = nullptr;
|
||||
QGraphicsView *toolTipView = nullptr;
|
||||
void setData(const QString source, float value,
|
||||
const bool ac = true);
|
||||
const bool dontInvert = true);
|
||||
// variables
|
||||
int counts = 0;
|
||||
QVariantHash configuration;
|
||||
|
Reference in New Issue
Block a user