mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
udev rule checks for recovery devices
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#include "diagnosedialog.h"
|
||||
#include <QApplication>
|
||||
|
||||
DiagnoseDialog::DiagnoseDialog(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
setupUI();
|
||||
|
||||
setWindowTitle("System Dependencies");
|
||||
setModal(true);
|
||||
resize(500, 400);
|
||||
|
||||
// Set clean close behavior
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
}
|
||||
|
||||
void DiagnoseDialog::setupUI()
|
||||
{
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
QScrollArea *scrollArea = new QScrollArea(this);
|
||||
scrollArea->setWidgetResizable(true);
|
||||
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
mainLayout->setContentsMargins(10, 10, 10, 10);
|
||||
|
||||
// Add the main diagnose widget
|
||||
m_diagnoseWidget = new DiagnoseWidget();
|
||||
scrollArea->setWidget(m_diagnoseWidget);
|
||||
|
||||
// Close button
|
||||
QHBoxLayout *buttonLayout = new QHBoxLayout();
|
||||
buttonLayout->addStretch();
|
||||
|
||||
m_closeButton = new QPushButton("Close");
|
||||
m_closeButton->setMinimumWidth(80);
|
||||
connect(m_closeButton, &QPushButton::clicked, this,
|
||||
&DiagnoseDialog::onCloseClicked);
|
||||
|
||||
buttonLayout->addWidget(m_closeButton);
|
||||
|
||||
// Layout assembly
|
||||
mainLayout->addWidget(scrollArea);
|
||||
mainLayout->addLayout(buttonLayout);
|
||||
}
|
||||
|
||||
void DiagnoseDialog::onCloseClicked() { accept(); }
|
||||
Reference in New Issue
Block a user