mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-26 20:19:55 +00:00
initial plasma6 support
This commit is contained in:
@ -18,6 +18,9 @@
|
||||
|
||||
#include "loadsource.h"
|
||||
|
||||
#include <ksysguard/formatter/Unit.h>
|
||||
#include <ksysguard/systemstats/SensorInfo.h>
|
||||
|
||||
#include <QRandomGenerator>
|
||||
|
||||
#include "awdebug.h"
|
||||
@ -45,17 +48,17 @@ QVariant LoadSource::data(const QString &_source)
|
||||
}
|
||||
|
||||
|
||||
QVariantMap LoadSource::initialData(const QString &_source) const
|
||||
KSysGuard::SensorInfo *LoadSource::initialData(const QString &_source) const
|
||||
{
|
||||
qCDebug(LOG_ESS) << "Source" << _source;
|
||||
|
||||
QVariantMap data;
|
||||
if (_source.startsWith("load/load")) {
|
||||
data["min"] = 0;
|
||||
data["max"] = 0;
|
||||
data["name"] = "Simple sources for load tests";
|
||||
data["type"] = "int";
|
||||
data["units"] = "";
|
||||
auto data = new KSysGuard::SensorInfo();
|
||||
if (_source.startsWith("load")) {
|
||||
data->min = 0;
|
||||
data->max = 0;
|
||||
data->name = "Simple sources for load tests";
|
||||
data->variantType = QVariant::Int;
|
||||
data->unit = KSysGuard::UnitNone;
|
||||
}
|
||||
|
||||
return data;
|
||||
@ -66,7 +69,7 @@ QStringList LoadSource::sources() const
|
||||
{
|
||||
QStringList sources;
|
||||
for (int i = 0; i < 1000; i++)
|
||||
sources.append(QString("load/load%1").arg(i));
|
||||
sources.append(QString("load%1").arg(i));
|
||||
|
||||
return sources;
|
||||
}
|
||||
|
Reference in New Issue
Block a user