| 94 | } // namespace |
| 95 | |
| 96 | DevicePropertiesDialog::DevicePropertiesDialog(const DeviceInfo &info, |
| 97 | QWidget *parent) |
| 98 | : QDialog(parent), m_info(info) { |
| 99 | setWindowTitle(info.name + " Properties"); |
| 100 | setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); |
| 101 | setFixedWidth(420); |
| 102 | resize(420, 450); |
| 103 | |
| 104 | auto *layout = new QVBoxLayout(this); |
| 105 | layout->setContentsMargins(8, 8, 8, 8); |
| 106 | |
| 107 | auto *tabs = new QTabWidget(this); |
| 108 | tabs->addTab(buildGeneralTab(), "General"); |
| 109 | tabs->addTab(buildDriverTab(), "Driver"); |
| 110 | tabs->addTab(buildDetailsTab(), "Details"); |
| 111 | tabs->addTab(buildResourcesTab(), "Resources"); |
| 112 | layout->addWidget(tabs); |
| 113 | |
| 114 | auto *buttons = new QDialogButtonBox( |
| 115 | QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); |
| 116 | connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); |
| 117 | connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); |
| 118 | layout->addWidget(buttons); |
| 119 | } |
| 120 | |
| 121 | void DevicePropertiesDialog::showEvent(QShowEvent *e) |
| 122 | { |
nothing calls this directly
no outgoing calls
no test coverage detected