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