diff --git a/editprofile.cpp b/editprofile.cpp index 513be71..7e8b0db 100644 --- a/editprofile.cpp +++ b/editprofile.cpp @@ -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() diff --git a/mainwindow.cpp b/mainwindow.cpp index 0eed08f..2642c7f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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 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 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) +{ + +} diff --git a/mainwindow.h b/mainwindow.h index 7db23c4..25190c3 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -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 diff --git a/mainwindow.ui b/mainwindow.ui index 1acd2b9..603b384 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 384 - 590 + 440 + 670 @@ -22,37 +22,23 @@ - + Fan Speed (%) - - - - Qt::Horizontal - - - - + Voltage (mV) - - - - Qt::Horizontal - - - @@ -63,13 +49,6 @@ - - - - Qt::Horizontal - - - @@ -80,13 +59,6 @@ - - - - Qt::Horizontal - - - @@ -97,6 +69,35 @@ + + + + + + + Fan mode: + + + + + + + + Driver defined + + + + + Static + + + + + Custom + + + + @@ -104,26 +105,51 @@ - - - - + Apply changes - + ... - + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + @@ -131,7 +157,7 @@ 0 0 - 384 + 440 28