diff --git a/mainwindow.cpp b/mainwindow.cpp index 98ce049..28987a1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -83,8 +83,8 @@ void MainWindow::onPrevButtonClicked() void MainWindow::updateNavigationButtons(int currentIndex) { - prevButton->setVisible(currentIndex > 0); - nextButton->setVisible(currentIndex < buttonGroup->buttons().size() - 1); + prevButton->setEnabled(currentIndex > 0); // We can use setVisible if we want to mimic CrystalDiskInfo + nextButton->setEnabled(currentIndex < buttonGroup->buttons().size() - 1); } void MainWindow::scanDevices() @@ -667,3 +667,9 @@ QString MainWindow::toTitleCase(const QString& sentence) { return result; } + +void MainWindow::on_actionExit_triggered() +{ + qApp->quit(); +} + diff --git a/mainwindow.h b/mainwindow.h index 3c312af..f73a71d 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -30,6 +30,9 @@ public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); +private slots: + void on_actionExit_triggered(); + private: Ui::MainWindow *ui; QButtonGroup *buttonGroup; diff --git a/mainwindow.ui b/mainwindow.ui index 6beb178..0262c3e 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -320,6 +320,117 @@ + + + + 0 + 0 + 800 + 30 + + + + + File + + + + + + + Function + + + + + + + + + + &Help + + + + + + + + + + + + + + + &Save JSON + + + Ctrl+S + + + + + + + + &Exit + + + Alt+F4 + + + QAction::MenuRole::QuitRole + + + + + + + + &Rescan and Refresh + + + + + &GitHub + + + + + + + + &About + + + QAction::MenuRole::AboutRole + + + + + true + + + &Ignore C4 (Reallocated Event Count) + + + + + true + + + Decimal Raw Values + + + + + true + + + Use Fahrenheit + +