MCPcopy Create free account
hub / github.com/actuallyaridan/linux-devmgmt / DevicePropertiesDialog

Method DevicePropertiesDialog

src/ui/DevicePropertiesDialog.cpp:96–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94} // namespace
95
96DevicePropertiesDialog::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
121void DevicePropertiesDialog::showEvent(QShowEvent *e)
122{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected