change quotes output format

integrate aggregators to the plugin
This commit is contained in:
arcan1s
2015-09-13 00:13:49 +03:00
parent 0ba74b3130
commit f08600db61
6 changed files with 145 additions and 402 deletions

View File

@ -87,6 +87,11 @@ QString AWKeysAggregator::formater(const QVariant data, const QString key) const
else
output = m_translate ? i18n("KB/s") : QString("KB/s");
break;
case Quotes:
// first cast
output = QString("%1").arg(data.toDouble(), 0, 'f');
output = output.leftJustified(8, QLatin1Char(' '), true);
break;
case Temperature:
output = QString("%1").arg(temperature(data.toFloat()), 5, 'f', 1);
break;
@ -433,7 +438,7 @@ QStringList AWKeysAggregator::registerSource(const QString source, const QString
QString key = source;
key.remove(QString("quotes/"));
m_map[source] = key;
m_formater[key] = NoFormat;
m_formater[key] = Quotes;
} else if (source == QString("mem/swap/free")) {
// free swap
// mb