mirror of
https://github.com/Lurkki14/tuxclocker.git
synced 2024-11-24 09:10:16 -06:00
cleanup
This commit is contained in:
parent
68072b25d4
commit
df6dd60db4
@ -52,7 +52,6 @@ editProfile::editProfile(QWidget *parent) :
|
||||
}
|
||||
ui->curvePlot->graph(0)->setData(qv_x, qv_y);
|
||||
drawFillerLines();
|
||||
|
||||
}
|
||||
|
||||
editProfile::~editProfile()
|
||||
@ -273,12 +272,9 @@ void editProfile::drawCoordtext()
|
||||
QString xString = QString::number(qv_x[index_x]);
|
||||
QString yString = QString::number(qv_y[index_y]);
|
||||
coordText->setText(xString + ", " + yString);
|
||||
}
|
||||
|
||||
if (!draggingPoint) {
|
||||
ui->curvePlot->clearItems();
|
||||
coordText->position->setCoords(100, 100);
|
||||
coordText->setText("");
|
||||
} else {
|
||||
ui->curvePlot->removeItem(coordText);
|
||||
}
|
||||
}
|
||||
|
||||
@ -309,7 +305,7 @@ bool editProfile::detectRelease(QMouseEvent *event)
|
||||
resetMouseDragging();
|
||||
draggedIndicesUnset();
|
||||
draggingPointUnset();
|
||||
//drawCoordtext(index_x, index_y);
|
||||
drawCoordtext();
|
||||
return mousePressed;
|
||||
}
|
||||
|
||||
@ -357,8 +353,8 @@ double editProfile::getPixelLength(QMouseEvent *event)
|
||||
|
||||
void editProfile::on_pushButton_clicked()
|
||||
{
|
||||
ui->curvePlot->clearItems();
|
||||
qDebug() << index_x << index_y;
|
||||
qDebug() << draggingPoint;
|
||||
drawCoordtext();
|
||||
}
|
||||
|
||||
void editProfile::on_saveButton_clicked()
|
||||
|
@ -73,7 +73,8 @@ void MainWindow::on_pushButton_clicked()
|
||||
//loadProfileSettings();
|
||||
// checkForProfiles();
|
||||
//getGPUDriver();
|
||||
checkForRoot();
|
||||
//checkForRoot();
|
||||
qDebug() << minMemClkOfsInt << maxMemClkOfsInt;
|
||||
}
|
||||
|
||||
void MainWindow::checkForRoot()
|
||||
@ -155,7 +156,6 @@ void MainWindow::fanSpeedUpdater()
|
||||
fanSpeed = process.readLine().toInt();
|
||||
ui->fanSlider->setValue(fanSpeed);
|
||||
ui->fanSpinBox->setValue(fanSpeed);
|
||||
|
||||
}
|
||||
void MainWindow::tempUpdater()
|
||||
{
|
||||
@ -216,14 +216,13 @@ void MainWindow::queryGPUSettings()
|
||||
maxVoltOfsInt = process.readLine().toInt()/1000;
|
||||
}
|
||||
}
|
||||
qDebug() << "maxvolt on" << maxVoltOfsInt;
|
||||
|
||||
QString coreFreqOfs;
|
||||
process.start(nvCoreClkOfsQ);
|
||||
process.waitForFinished(-1);
|
||||
coreFreqOfs = process.readLine();
|
||||
coreFreqOfs.chop(1);
|
||||
coreFreqOfsInt = coreFreqOfs.toInt();
|
||||
//coreFreqOfs = process.readLine();
|
||||
//coreFreqOfs.chop(1);
|
||||
coreFreqOfsInt = process.readLine().toInt();
|
||||
latestClkOfs = coreFreqOfsInt;
|
||||
|
||||
process.start(nvCurMaxClkQ);
|
||||
@ -246,26 +245,27 @@ void MainWindow::queryGPUSettings()
|
||||
|
||||
process.start(nvClockLimQ);
|
||||
process.waitForFinished(-1);
|
||||
for (int i=0; i<2; i++) {
|
||||
for (int i=0; i<process.size(); i++) {
|
||||
QString line = process.readLine();
|
||||
if (line.contains("-")) {
|
||||
minCoreClkOfsInt = line.toInt();
|
||||
} else {
|
||||
maxCoreClkOfsInt = line.toInt();
|
||||
if (line.toInt()/2 > maxCoreClkOfsInt) {
|
||||
maxCoreClkOfsInt = line.toInt()/2;
|
||||
}
|
||||
if (line.toInt()/2 <= minCoreClkOfsInt) {
|
||||
minCoreClkOfsInt = line.toInt()/2;
|
||||
}
|
||||
}
|
||||
qDebug() << minCoreClkOfsInt << maxCoreClkOfsInt;
|
||||
|
||||
// This gets the transfer rate, the clock speed is rate/2
|
||||
process.start(nvMemClkLimQ);
|
||||
process.waitForFinished(-1);
|
||||
for (int i=0; i<2; i++) {
|
||||
for (int i=0; i<process.size(); i++) {
|
||||
QString line = process.readLine();
|
||||
if (line.contains("-")) {
|
||||
minMemClkOfsInt = line.toInt()/2;
|
||||
} else {
|
||||
if (line.toInt()/2 > maxMemClkOfsInt) {
|
||||
maxMemClkOfsInt = line.toInt()/2;
|
||||
}
|
||||
if (line.toInt()/2 <= minMemClkOfsInt) {
|
||||
minMemClkOfsInt = line.toInt()/2;
|
||||
}
|
||||
}
|
||||
|
||||
process.start(nvCurMaxMemClkQ);
|
||||
@ -489,3 +489,8 @@ void MainWindow::on_applyButton_clicked()
|
||||
{
|
||||
applyGPUSettings();
|
||||
}
|
||||
|
||||
void MainWindow::on_fanModeComboBox_currentTextChanged(const QString &arg1)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -59,8 +59,8 @@ public:
|
||||
int minCoreClkOfsInt;
|
||||
int maxCoreClkOfsInt;
|
||||
int curMaxClkInt;
|
||||
int minMemClkOfsInt;
|
||||
int maxMemClkOfsInt;
|
||||
int minMemClkOfsInt = 0;
|
||||
int maxMemClkOfsInt = 0;
|
||||
int minVoltOfsInt = 0;
|
||||
int maxVoltOfsInt = 0;
|
||||
int curMaxMemClkInt;
|
||||
@ -124,6 +124,8 @@ private slots:
|
||||
void enableFanControl();
|
||||
void resetChanges();
|
||||
void resetTimer();
|
||||
void on_fanModeComboBox_currentTextChanged(const QString &arg1);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
bool noProfiles = true;
|
||||
@ -131,5 +133,4 @@ private:
|
||||
|
||||
QTimer *resettimer = new QTimer(this);
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
104
mainwindow.ui
104
mainwindow.ui
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>384</width>
|
||||
<height>590</height>
|
||||
<width>440</width>
|
||||
<height>670</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -22,37 +22,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Fan Speed (%)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QSlider" name="fanSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QSpinBox" name="fanSpinBox"/>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="voltgeLabel">
|
||||
<property name="text">
|
||||
<string>Voltage (mV)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QSlider" name="voltageSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QSpinBox" name="voltageSpinBox"/>
|
||||
</item>
|
||||
@ -63,13 +49,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="3">
|
||||
<widget class="QSlider" name="memClkSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QSpinBox" name="memClkSpinBox"/>
|
||||
</item>
|
||||
@ -80,13 +59,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="3">
|
||||
<widget class="QSlider" name="powerLimSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
<widget class="QSpinBox" name="powerLimSpinBox"/>
|
||||
</item>
|
||||
@ -97,6 +69,35 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="3">
|
||||
<widget class="QSpinBox" name="frequencySpinBox"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="fanModeLabel">
|
||||
<property name="text">
|
||||
<string>Fan mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="fanModeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Driver defined</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Static</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Custom</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="3">
|
||||
<widget class="QSlider" name="frequencySlider">
|
||||
<property name="orientation">
|
||||
@ -104,26 +105,51 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="3">
|
||||
<widget class="QSpinBox" name="frequencySpinBox"/>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<item row="11" column="0">
|
||||
<widget class="QPushButton" name="applyButton">
|
||||
<property name="text">
|
||||
<string>Apply changes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<item row="11" column="1">
|
||||
<widget class="QPushButton" name="newProfile">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="3">
|
||||
<item row="11" column="2">
|
||||
<widget class="QComboBox" name="profileComboBox"/>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QSlider" name="voltageSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QSlider" name="fanSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="3">
|
||||
<widget class="QSlider" name="memClkSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="3">
|
||||
<widget class="QSlider" name="powerLimSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
@ -131,7 +157,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>384</width>
|
||||
<width>440</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user