mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-11 07:10:52 +03:00
Implement Disk menu
This commit is contained in:
@@ -276,16 +276,24 @@ void MainWindow::updateUI()
|
||||
button->setCheckable(true);
|
||||
button->setAutoExclusive(true);
|
||||
|
||||
connect(button, &QPushButton::clicked, this, [=]() {
|
||||
auto populateAndNavigate = [=]() {
|
||||
if (isNvme) {
|
||||
populateWindow(localObj, health, nvmeSmartOrdered);
|
||||
} else {
|
||||
populateWindow(localObj, health);
|
||||
}
|
||||
updateNavigationButtons(buttonGroup->buttons().indexOf(button));
|
||||
};
|
||||
|
||||
connect(button, &QPushButton::clicked, this, [=]() {
|
||||
populateAndNavigate();
|
||||
disksGroup->actions()[buttonGroup->buttons().indexOf(button)]->setChecked(true);
|
||||
});
|
||||
|
||||
connect(diskAction, &QAction::triggered, this, [=]() {
|
||||
populateAndNavigate();
|
||||
});
|
||||
|
||||
if (firstTime) {
|
||||
globalObj = localObj;
|
||||
globalHealth = health;
|
||||
|
||||
Reference in New Issue
Block a user