mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-06 10:25:52 +00:00
Some more changes
* new tag - $tstime * add summand parameter to float formatter * drop version.h includes since it has been moved to awdebug.h (e.g. to introduce BUILD_FUTURE guards easy in the future)
This commit is contained in:
@ -139,6 +139,10 @@ QString AWKeysAggregator::formatter(const QVariant &data,
|
||||
case FormatterType::TimeShort:
|
||||
output = loc.toString(data.toDateTime(), QLocale::ShortFormat);
|
||||
break;
|
||||
case FormatterType::Timestamp:
|
||||
output = QString("%1").arg(
|
||||
data.toDateTime().toMSecsSinceEpoch() / 1000.0, 10, 'f', 0);
|
||||
break;
|
||||
case FormatterType::Uptime:
|
||||
case FormatterType::UptimeCustom:
|
||||
output =
|
||||
@ -537,6 +541,9 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
|
||||
// short time
|
||||
m_map.insertMulti(source, QString("shorttime"));
|
||||
m_formatter[QString("shorttime")] = FormatterType::TimeShort;
|
||||
// timestamp
|
||||
m_map.insertMulti(source, QString("tstime"));
|
||||
m_formatter[QString("tstime")] = FormatterType::Timestamp;
|
||||
} else if (source == QString("system/uptime")) {
|
||||
// uptime
|
||||
m_map[source] = QString("uptime");
|
||||
|
Reference in New Issue
Block a user