added support of disable ooption to dataengine

This commit is contained in:
arcan1s
2014-05-27 16:15:49 +04:00
parent 3d8f88d935
commit e7b6e4a3bf
10 changed files with 37 additions and 22 deletions

View File

@ -45,6 +45,8 @@ QString ExtendedSysMon::getAllHdd()
QString dev;
command.start("find /dev -name [hms]d[a-z]");
command.waitForFinished(-1);
#include <QDebug>
qDebug() << command.readAllStandardError();
qoutput = QTextCodec::codecForMib(106)->toUnicode(command.readAllStandardOutput());
for (int i=0; i<qoutput.split(QChar('\n'), QString::SkipEmptyParts).count(); i++) {
dev = qoutput.split(QChar('\n'), QString::SkipEmptyParts)[i];
@ -57,7 +59,7 @@ QString ExtendedSysMon::getAllHdd()
QString ExtendedSysMon::getAutoGpu()
{
QProcess command;
QString gpu = QString("unknown");
QString gpu = QString("disable");
QString qoutput = QString("");
command.start("lspci");
command.waitForFinished(-1);

View File

@ -167,7 +167,7 @@ class ConfigDefinition:
self.configpage.ui.listWidget_mount.clear()
for item in str(settings.get('mount', '/')).split('@@'):
self.configpage.ui.listWidget_mount.addItem(item)
commandOut = commands.getoutput("find /dev -name '[hs]d[a-z]'")
commandOut = commands.getoutput("find /dev -name '[hms]d[a-z]'")
for item in commandOut.split("\n"):
try:
self.configpage.ui.comboBox_hddDevice.addItem(item)
@ -217,7 +217,8 @@ class ConfigDefinition:
index = self.configpage.ui.comboBox_gpudev.findText(deSettings['GPUDEV'])
self.configpage.ui.comboBox_gpudev.setCurrentIndex(index)
self.configpage.ui.comboBox_hdddev.addItem("all")
commandOut = commands.getoutput("find /dev -name '[hs]d[a-z]'")
self.configpage.ui.comboBox_hdddev.addItem("disable")
commandOut = commands.getoutput("find /dev -name '[hms]d[a-z]'")
for item in commandOut.split("\n"):
try:
self.configpage.ui.comboBox_hdddev.addItem(item)

View File

@ -35,7 +35,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>4</number>
</property>
<widget class="QWidget" name="settings">
<attribute name="title">
@ -1194,8 +1194,8 @@ $ps - list of running processes comma separated</string>
<property name="geometry">
<rect>
<x>0</x>
<y>-183</y>
<width>526</width>
<y>0</y>
<width>328</width>
<height>723</height>
</rect>
</property>
@ -2523,6 +2523,11 @@ del - remove item</string>
<string notr="true">auto</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">disable</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">nvidia</string>

View File

@ -154,11 +154,11 @@
<p><strong>GPU device</strong></p>
<p>Select one of supported GPU devices. <code>auto</code> will enable auto selection. Default is <code>auto</code>.</p>
<p>Select one of supported GPU devices. <code>auto</code> will enable auto selection, <code>disable</code> will disable definition of GPU states. Default is <code>auto</code>.</p>
<p><strong>HDD</strong></p>
<p>Select one of HDDs for HDD temperature monitor. <code>all</code> will enable monitor for all devices. Default is <code>all</code>.</p>
<p>Select one of HDDs for HDD temperature monitor. <code>all</code> will enable monitor for all devices, <code>disable</code> will disable definition of HDD temperature. Default is <code>all</code>.</p>
<p><strong>hddtemp cmd</strong></p>

View File

@ -151,11 +151,11 @@
<p><strong>Устройство GPU</strong></p>
<p>Выберете одно из поддерживаемых устройств GPU. <code>auto</code> включит автоматическое определение. По умолчанию <code>auto</code>.</p>
<p>Выберете одно из поддерживаемых устройств GPU. <code>auto</code> включит автоматическое определение, <code>disable</code> отключит все мониторы GPU. По умолчанию <code>auto</code>.</p>
<p><strong>HDD</strong></p>
<p>Выберете один из HDD для монитора его температуры. <code>all</code> включит монитор для всех доступных устройств. По умолчанию <code>all</code>.</p>
<p>Выберете один из HDD для монитора его температуры. <code>all</code> включит монитор для всех доступных устройств, <code>disable</code> отключит определение температуры HDD. По умолчанию <code>all</code>.</p>
<p><strong>Команда hddtemp</strong></p>