mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 16:07:19 +00:00
small fix
This commit is contained in:
parent
744f3bc04b
commit
a6ddd53308
@ -147,51 +147,9 @@ void ExtendedSysMon::readConfiguration()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExtendedSysMon::setProcesses()
|
|
||||||
{
|
|
||||||
if (debug) qDebug() << "[DE]" << "[setProcesses]";
|
|
||||||
// custom
|
|
||||||
for (int i=0; i<configuration[QString("CUSTOM")].split(QString("@@"), QString::SkipEmptyParts).count(); i++) {
|
|
||||||
processes[QString("custom")].append(new QProcess);
|
|
||||||
connect(processes[QString("custom")][i], SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
||||||
this, SLOT(setCustomCmd(int, QProcess::ExitStatus)));
|
|
||||||
}
|
|
||||||
// gpu
|
|
||||||
processes[QString("gpu")].append(new QProcess);
|
|
||||||
connect(processes[QString("gpu")][0], SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
||||||
this, SLOT(setGpu(int, QProcess::ExitStatus)));
|
|
||||||
// gputemp
|
|
||||||
processes[QString("gputemp")].append(new QProcess);
|
|
||||||
connect(processes[QString("gputemp")][0], SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
||||||
this, SLOT(setGpuTemp(int, QProcess::ExitStatus)));
|
|
||||||
// hddtemp
|
|
||||||
for (int i=0; i<configuration[QString("HDDDEV")].split(QChar(','), QString::SkipEmptyParts).count(); i++) {
|
|
||||||
processes[QString("hddtemp")].append(new QProcess);
|
|
||||||
connect(processes[QString("hddtemp")][i], SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
||||||
this, SLOT(setHddTemp(int, QProcess::ExitStatus)));
|
|
||||||
}
|
|
||||||
// pkg
|
|
||||||
for (int i=0; i<configuration[QString("PKGCMD")].split(QString(","), QString::SkipEmptyParts).count(); i++) {
|
|
||||||
processes[QString("pkg")].append(new QProcess);
|
|
||||||
connect(processes[QString("pkg")][i], SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
||||||
this, SLOT(setUpgradeInfo(int, QProcess::ExitStatus)));
|
|
||||||
}
|
|
||||||
// player
|
|
||||||
processes[QString("player")].append(new QProcess);
|
|
||||||
connect(processes[QString("player")][0], SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
||||||
this, SLOT(setPlayer(int, QProcess::ExitStatus)));
|
|
||||||
// ps
|
|
||||||
// pscount && ps
|
|
||||||
processes[QString("ps")].append(new QProcess);
|
|
||||||
// pstotal
|
|
||||||
processes[QString("ps")].append(new QProcess);
|
|
||||||
connect(processes[QString("ps")][1], SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
||||||
this, SLOT(setPs(int, QProcess::ExitStatus)));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ExtendedSysMon::setKeys()
|
void ExtendedSysMon::setKeys()
|
||||||
{
|
{
|
||||||
|
if (debug) qDebug() << "[DE]" << "[setKeys]";
|
||||||
QString key, source;
|
QString key, source;
|
||||||
// custom
|
// custom
|
||||||
source = QString("custom");
|
source = QString("custom");
|
||||||
@ -242,6 +200,49 @@ void ExtendedSysMon::setKeys()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ExtendedSysMon::setProcesses()
|
||||||
|
{
|
||||||
|
if (debug) qDebug() << "[DE]" << "[setProcesses]";
|
||||||
|
// custom
|
||||||
|
for (int i=0; i<configuration[QString("CUSTOM")].split(QString("@@"), QString::SkipEmptyParts).count(); i++) {
|
||||||
|
processes[QString("custom")].append(new QProcess);
|
||||||
|
connect(processes[QString("custom")][i], SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||||
|
this, SLOT(setCustomCmd(int, QProcess::ExitStatus)));
|
||||||
|
}
|
||||||
|
// gpu
|
||||||
|
processes[QString("gpu")].append(new QProcess);
|
||||||
|
connect(processes[QString("gpu")][0], SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||||
|
this, SLOT(setGpu(int, QProcess::ExitStatus)));
|
||||||
|
// gputemp
|
||||||
|
processes[QString("gputemp")].append(new QProcess);
|
||||||
|
connect(processes[QString("gputemp")][0], SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||||
|
this, SLOT(setGpuTemp(int, QProcess::ExitStatus)));
|
||||||
|
// hddtemp
|
||||||
|
for (int i=0; i<configuration[QString("HDDDEV")].split(QChar(','), QString::SkipEmptyParts).count(); i++) {
|
||||||
|
processes[QString("hddtemp")].append(new QProcess);
|
||||||
|
connect(processes[QString("hddtemp")][i], SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||||
|
this, SLOT(setHddTemp(int, QProcess::ExitStatus)));
|
||||||
|
}
|
||||||
|
// pkg
|
||||||
|
for (int i=0; i<configuration[QString("PKGCMD")].split(QString(","), QString::SkipEmptyParts).count(); i++) {
|
||||||
|
processes[QString("pkg")].append(new QProcess);
|
||||||
|
connect(processes[QString("pkg")][i], SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||||
|
this, SLOT(setUpgradeInfo(int, QProcess::ExitStatus)));
|
||||||
|
}
|
||||||
|
// player
|
||||||
|
processes[QString("player")].append(new QProcess);
|
||||||
|
connect(processes[QString("player")][0], SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||||
|
this, SLOT(setPlayer(int, QProcess::ExitStatus)));
|
||||||
|
// ps
|
||||||
|
// pscount && ps
|
||||||
|
processes[QString("ps")].append(new QProcess);
|
||||||
|
// pstotal
|
||||||
|
processes[QString("ps")].append(new QProcess);
|
||||||
|
connect(processes[QString("ps")][1], SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||||
|
this, SLOT(setPs(int, QProcess::ExitStatus)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QMap<QString, QString> ExtendedSysMon::updateConfiguration(const QMap<QString, QString> rawConfig)
|
QMap<QString, QString> ExtendedSysMon::updateConfiguration(const QMap<QString, QString> rawConfig)
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << "[DE]" << "[updateConfiguration]";
|
if (debug) qDebug() << "[DE]" << "[updateConfiguration]";
|
||||||
|
Loading…
Reference in New Issue
Block a user