mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
implement \r to default json of ExtScripts
some refactoring bump ApiVer of ExtQuotes update changelog
This commit is contained in:
parent
f534a6854a
commit
f96b3fcb07
@ -1,8 +1,10 @@
|
|||||||
+ implement fitlers support to ExtScripts (ApiVer = 3) (#53)
|
+ implement fitlers support to ExtScripts (ApiVer = 3) (#53)
|
||||||
+ implement ability to wrap `\n` as new lines (#53)
|
+ implement ability to wrap `\n` as new lines (#53)
|
||||||
+ implement key sorting in comboboxes
|
+ implement key sorting in comboboxes
|
||||||
+ implement (perc)(bid|ask|price)chg tag support
|
+ implement (perc)(bid|ask|price)chg tag support (ApiVer = 2)
|
||||||
|
+ implement timeouts to quotes (#54)
|
||||||
- fix bug with invalid html parsing
|
- fix bug with invalid html parsing
|
||||||
|
* move from XML to JSON in ExtQuotes (ApiVer = 2)
|
||||||
* more pretty configuration UI
|
* more pretty configuration UI
|
||||||
* some part of refactoring
|
* some part of refactoring
|
||||||
|
|
||||||
|
@ -369,6 +369,7 @@ bool AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
if (sourceName == QString("update")) return true;
|
if (sourceName == QString("update")) return true;
|
||||||
|
|
||||||
// checking
|
// checking
|
||||||
|
if (toolTip == nullptr) return false;
|
||||||
if (!checkKeys(data)) return false;
|
if (!checkKeys(data)) return false;
|
||||||
if (keys.isEmpty()) return false;
|
if (keys.isEmpty()) return false;
|
||||||
|
|
||||||
@ -403,9 +404,8 @@ bool AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
values[QString("ac")] = params[QString("acOffline")].toString();
|
values[QString("ac")] = params[QString("acOffline")].toString();
|
||||||
} else {
|
} else {
|
||||||
values[data.keys()[i]] = QString("%1").arg(data[data.keys()[i]].toFloat(), 3, 'f', 0);
|
values[data.keys()[i]] = QString("%1").arg(data[data.keys()[i]].toFloat(), 3, 'f', 0);
|
||||||
if (toolTip != nullptr) toolTip->setData(QString("batTooltip"),
|
toolTip->setData(QString("batTooltip"), data[data.keys()[i]].toFloat(),
|
||||||
data[data.keys()[i]].toFloat(),
|
data[QString("ac")].toBool());
|
||||||
data[QString("ac")].toBool());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (sourceName == QString("cpu/system/TotalLoad")) {
|
} else if (sourceName == QString("cpu/system/TotalLoad")) {
|
||||||
@ -415,8 +415,7 @@ bool AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
AWActions::sendNotification(QString("event"), i18n("High CPU load"), enablePopup);
|
AWActions::sendNotification(QString("event"), i18n("High CPU load"), enablePopup);
|
||||||
// value
|
// value
|
||||||
values[QString("cpu")] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
|
values[QString("cpu")] = QString("%1").arg(data[QString("value")].toFloat(), 5, 'f', 1);
|
||||||
if (toolTip != nullptr) toolTip->setData(QString("cpuTooltip"),
|
toolTip->setData(QString("cpuTooltip"), data[QString("value")].toFloat());
|
||||||
data[QString("value")].toFloat());
|
|
||||||
} else if (sourceName.contains(cpuRegExp)) {
|
} else if (sourceName.contains(cpuRegExp)) {
|
||||||
// cpus
|
// cpus
|
||||||
QString number = sourceName;
|
QString number = sourceName;
|
||||||
@ -425,8 +424,7 @@ bool AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
} else if (sourceName == QString("cpu/system/AverageClock")) {
|
} else if (sourceName == QString("cpu/system/AverageClock")) {
|
||||||
// cpucl
|
// cpucl
|
||||||
values[QString("cpucl")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
|
values[QString("cpucl")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
|
||||||
if (toolTip != nullptr) toolTip->setData(QString("cpuclTooltip"),
|
toolTip->setData(QString("cpuclTooltip"), data[QString("value")].toFloat());
|
||||||
data[QString("value")].toFloat());
|
|
||||||
} else if (sourceName.contains(cpuclRegExp)) {
|
} else if (sourceName.contains(cpuclRegExp)) {
|
||||||
// cpucls
|
// cpucls
|
||||||
QString number = sourceName;
|
QString number = sourceName;
|
||||||
@ -545,8 +543,7 @@ bool AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
AWActions::sendNotification(QString("event"), i18n("High memory usage"), enablePopup);
|
AWActions::sendNotification(QString("event"), i18n("High memory usage"), enablePopup);
|
||||||
// value
|
// value
|
||||||
values[QString("mem")] = QString("%1").arg(value, 5, 'f', 1);
|
values[QString("mem")] = QString("%1").arg(value, 5, 'f', 1);
|
||||||
if (toolTip != nullptr) toolTip->setData(QString("memTooltip"),
|
toolTip->setData(QString("memTooltip"), values[QString("mem")].toFloat());
|
||||||
values[QString("mem")].toFloat());
|
|
||||||
} else if (sourceName == QString("netdev")) {
|
} else if (sourceName == QString("netdev")) {
|
||||||
// network device
|
// network device
|
||||||
// notification
|
// notification
|
||||||
@ -568,8 +565,7 @@ bool AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
}
|
}
|
||||||
if (device == values[QString("netdev")]) {
|
if (device == values[QString("netdev")]) {
|
||||||
values[QString("down")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
|
values[QString("down")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
|
||||||
if (toolTip != nullptr) toolTip->setData(QString("downTooltip"),
|
toolTip->setData(QString("downTooltip"), data[QString("value")].toFloat());
|
||||||
data[QString("value")].toFloat());
|
|
||||||
}
|
}
|
||||||
} else if (sourceName.contains(netTransRegExp)) {
|
} else if (sourceName.contains(netTransRegExp)) {
|
||||||
// upload speed
|
// upload speed
|
||||||
@ -583,8 +579,7 @@ bool AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
}
|
}
|
||||||
if (device == values[QString("netdev")]) {
|
if (device == values[QString("netdev")]) {
|
||||||
values[QString("up")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
|
values[QString("up")] = QString("%1").arg(data[QString("value")].toFloat(), 4, 'f', 0);
|
||||||
if (toolTip != nullptr) toolTip->setData(QString("upTooltip"),
|
toolTip->setData(QString("upTooltip"), data[QString("value")].toFloat());
|
||||||
data[QString("value")].toFloat());
|
|
||||||
}
|
}
|
||||||
} else if (sourceName == QString("pkg")) {
|
} else if (sourceName == QString("pkg")) {
|
||||||
// package manager
|
// package manager
|
||||||
@ -626,8 +621,7 @@ bool AWKeys::setDataBySource(const QString sourceName, const QVariantMap data,
|
|||||||
AWActions::sendNotification(QString("event"), i18n("Swap is used"), enablePopup);
|
AWActions::sendNotification(QString("event"), i18n("Swap is used"), enablePopup);
|
||||||
// value
|
// value
|
||||||
values[QString("swap")] = QString("%1").arg(value, 5, 'f', 1);
|
values[QString("swap")] = QString("%1").arg(value, 5, 'f', 1);
|
||||||
if (toolTip != nullptr) toolTip->setData(QString("swapTooltip"),
|
toolTip->setData(QString("swapTooltip"), values[QString("swap")].toFloat());
|
||||||
values[QString("swap")].toFloat());
|
|
||||||
} else if (sourceName.contains(tempRegExp)) {
|
} else if (sourceName.contains(tempRegExp)) {
|
||||||
// temperature devices
|
// temperature devices
|
||||||
if (data[QString("units")].toString() == QString("rpm")) {
|
if (data[QString("units")].toString() == QString("rpm")) {
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
QTimer::singleShot(timeout, this, SLOT(timeout()));
|
QTimer::singleShot(timeout, this, SLOT(timeout()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
void timeout()
|
void timeout()
|
||||||
{
|
{
|
||||||
QNetworkReply *reply = static_cast<QNetworkReply *>(parent());
|
QNetworkReply *reply = static_cast<QNetworkReply *>(parent());
|
||||||
|
@ -4,6 +4,6 @@ Name=AAPL.NASDAQ
|
|||||||
Comment=Apple Inc
|
Comment=Apple Inc
|
||||||
X-AW-Ticker="AAPL"
|
X-AW-Ticker="AAPL"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=0
|
X-AW-Number=0
|
||||||
|
@ -4,6 +4,6 @@ Name=EUR/RUB
|
|||||||
Comment=EUR/RUB
|
Comment=EUR/RUB
|
||||||
X-AW-Ticker="EURRUB=X"
|
X-AW-Ticker="EURRUB=X"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=1
|
X-AW-Number=1
|
||||||
|
@ -4,6 +4,6 @@ Name=EUR/USD
|
|||||||
Comment=EUR/USD
|
Comment=EUR/USD
|
||||||
X-AW-Ticker="EURUSD=X"
|
X-AW-Ticker="EURUSD=X"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=2
|
X-AW-Number=2
|
||||||
|
@ -4,6 +4,6 @@ Name=GOOG.NASDAQ
|
|||||||
Comment=Google Inc
|
Comment=Google Inc
|
||||||
X-AW-Ticker="GOOG"
|
X-AW-Ticker="GOOG"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=3
|
X-AW-Number=3
|
||||||
|
@ -4,6 +4,6 @@ Name=MSFT.NASDAQ
|
|||||||
Comment=Microsoft Corp
|
Comment=Microsoft Corp
|
||||||
X-AW-Ticker="MSFT"
|
X-AW-Ticker="MSFT"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=4
|
X-AW-Number=4
|
||||||
|
@ -4,6 +4,6 @@ Name=RTS
|
|||||||
Comment=RTS Index
|
Comment=RTS Index
|
||||||
X-AW-Ticker="RTS.RS"
|
X-AW-Ticker="RTS.RS"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=5
|
X-AW-Number=5
|
||||||
|
@ -4,6 +4,6 @@ Name=S&P
|
|||||||
Comment=S&P 500 Index
|
Comment=S&P 500 Index
|
||||||
X-AW-Ticker="^GSPC"
|
X-AW-Ticker="^GSPC"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=6
|
X-AW-Number=6
|
||||||
|
@ -4,6 +4,6 @@ Name=USD/RUB
|
|||||||
Comment=USD/RUB
|
Comment=USD/RUB
|
||||||
X-AW-Ticker="USDRUB=X"
|
X-AW-Ticker="USDRUB=X"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=8
|
X-AW-Number=8
|
||||||
|
@ -4,6 +4,6 @@ Name=VIX
|
|||||||
Comment=Volatility S&P 500
|
Comment=Volatility S&P 500
|
||||||
X-AW-Ticker="^VIX"
|
X-AW-Ticker="^VIX"
|
||||||
X-AW-Active=false
|
X-AW-Active=false
|
||||||
X-AW-ApiVersion=1
|
X-AW-ApiVersion=2
|
||||||
X-AW-Interval=60
|
X-AW-Interval=60
|
||||||
X-AW-Number=7
|
X-AW-Number=7
|
||||||
|
@ -20,7 +20,9 @@
|
|||||||
},
|
},
|
||||||
"newline": {
|
"newline": {
|
||||||
"\n": "<br>",
|
"\n": "<br>",
|
||||||
"\t": "	"
|
"\n\r": "<br>",
|
||||||
|
"\t": "	",
|
||||||
|
"\v": ""
|
||||||
},
|
},
|
||||||
"space": {
|
"space": {
|
||||||
" ": " "
|
" ": " "
|
||||||
|
Loading…
Reference in New Issue
Block a user