bump default gi configuration

Bump API version and add new parameters. Also:

1. Fix function combobox in configuration UI.
2. Drop datasource from time engine as well.
3. Small edit abstractdesources class
This commit is contained in:
Evgenii Alekseev 2016-03-03 19:57:31 +03:00
parent 89d573450a
commit 071d7fdb78
8 changed files with 24 additions and 11 deletions

View File

@ -262,8 +262,8 @@ Item {
if (debug) console.debug()
if (model[currentIndex]["regexp"] == "functions")
tags.model = ["{{\n\n}}", "template{{\n\n}}",
"aw_all<>()", "aw_count<>()", "aw_keys<>()",
"aw_names<>()"]
"aw_all<>{{}}", "aw_count<>{{}}", "aw_keys<>{{}}",
"aw_names<>{{}}"]
else
tags.model = awKeys.dictKeys(true, model[currentIndex]["regexp"])
if (debug) console.info("Init model", tags.model, "for", model[currentIndex]["label"])

View File

@ -86,6 +86,7 @@ void AWDataEngineAggregator::dropSource(const QString source)
// connected we will try to disconnect it from systemmonitor and extsysmon
m_dataEngines[QString("systemmonitor")]->disconnectSource(source, parent());
m_dataEngines[QString("extsysmon")]->disconnectSource(source, parent());
m_dataEngines[QString("time")]->disconnectSource(source, parent());
}

View File

@ -3,11 +3,14 @@ Encoding=UTF-8
Name=bar3
Comment=Simple bat bar
X-AW-Value=bat
X-AW-Custom=false
X-AW-Max=100.0
X-AW-Min=0.0
X-AW-ActiveColor="0,0,0,255"
X-AW-InactiveColor="255,255,255,255"
X-AW-Type=Horizontal
X-AW-Direction=LeftToRight
X-AW-Height=25
X-AW-Width=100
X-AW-ApiVersion=3
X-AW-ApiVersion=4
X-AW-Number=3

View File

@ -3,11 +3,14 @@ Encoding=UTF-8
Name=bar0
Comment=Simple cpu bar
X-AW-Value=cpu
X-AW-Custom=false
X-AW-Max=100.0
X-AW-Min=0.0
X-AW-ActiveColor="0,0,0,255"
X-AW-InactiveColor="255,255,255,255"
X-AW-Type=Horizontal
X-AW-Direction=LeftToRight
X-AW-Height=25
X-AW-Width=100
X-AW-ApiVersion=3
X-AW-ApiVersion=4
X-AW-Number=0

View File

@ -3,11 +3,14 @@ Encoding=UTF-8
Name=bar1
Comment=Simple mem bar
X-AW-Value=mem
X-AW-Custom=false
X-AW-Max=100.0
X-AW-Min=0.0
X-AW-ActiveColor="0,0,0,255"
X-AW-InactiveColor="255,255,255,255"
X-AW-Type=Horizontal
X-AW-Direction=LeftToRight
X-AW-Height=25
X-AW-Width=100
X-AW-ApiVersion=3
X-AW-ApiVersion=4
X-AW-Number=1

View File

@ -3,11 +3,14 @@ Encoding=UTF-8
Name=bar2
Comment=Simple swap bar
X-AW-Value=swap
X-AW-Custom=false
X-AW-Max=100.0
X-AW-Min=0.0
X-AW-ActiveColor="0,0,0,255"
X-AW-InactiveColor="255,255,255,255"
X-AW-Type=Horizontal
X-AW-Direction=LeftToRight
X-AW-Height=25
X-AW-Width=100
X-AW-ApiVersion=3
X-AW-ApiVersion=4
X-AW-Number=2

View File

@ -57,12 +57,14 @@ QVariant ExtSysMonAggregator::data(const QString source) const
{
qCDebug(LOG_ESM) << "Source" << source;
return hasSource(source) ? m_map[source]->data(source) : QVariant();
return m_map[source]->data(source);
}
bool ExtSysMonAggregator::hasSource(const QString source) const
{
qCDebug(LOG_ESM) << "Source" << source;
return m_map.contains(source);
}
@ -78,9 +80,7 @@ QVariantMap ExtSysMonAggregator::initialData(const QString source) const
QStringList ExtSysMonAggregator::sources() const
{
QStringList sorted = m_map.keys();
sorted.sort();
return sorted;
return m_map.keys();
}

View File

@ -88,7 +88,7 @@ void BatterySource::run()
= (QString(acFile.readLine()).trimmed().toInt() == 1);
acFile.close();
// batterites
// batteries
float currentLevel = 0.0;
float fullLevel = 0.0;
for (int i = 0; i < m_batteriesCount; i++) {