diff options
Diffstat (limited to 'superkaramba/src/karamba.cpp')
-rw-r--r-- | superkaramba/src/karamba.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/superkaramba/src/karamba.cpp b/superkaramba/src/karamba.cpp index d4a74f7..d828411 100644 --- a/superkaramba/src/karamba.cpp +++ b/superkaramba/src/karamba.cpp @@ -988,6 +988,26 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter) } + if (sens == "GPU") + { + TQString gpuId = lineParser.getString("GPU"); + TQString gpuDriver = lineParser.getString("DRIVER"); + TQString sensorId = TQString("GPU_%1_%2").arg(gpuDriver, gpuId); + sensor = sensorMap[sensorId]; + if (sensor == 0) + { + int interval = lineParser.getInt("INTERVAL"); + interval = (interval == 0) ? 1000 : interval; + sensor = (sensorMap[sensorId] = new GPUSensor(gpuDriver, gpuId, interval)); + sensorList->append(sensor); + } + + SensorParams *sp = new SensorParams(meter); + sp->addParam("FORMAT", m_theme.locale()->translate(lineParser.getString("FORMAT").ascii())); + sensor->addMeter(sp); + sensor->setMaxValue(sp); + } + if( sens == "MEMORY" ) { sensor = sensorMap["MEMORY"]; |