Interface mockup 9

This commit is contained in:
Dion Moult
2026-05-07 12:21:55 +10:00
parent 016c278748
commit 359693c562
26 changed files with 1031 additions and 199 deletions
+16 -5
View File
@@ -95,15 +95,22 @@ Panel::Panel(const QString& title, QWidget* content, QWidget* parent, bool has_s
auto* scroll_body = new QWidget(scroll);
scroll_body->setObjectName("panelScrollBody");
auto* scroll_body_layout = new QVBoxLayout(scroll_body);
scroll_body_layout->setContentsMargins(0, 0, 0, 0);
scroll_body_layout->setSpacing(0);
scroll_body_layout->addWidget(content);
body_layout_ = new QVBoxLayout(scroll_body);
body_layout_->setContentsMargins(0, 0, 0, 0);
body_layout_->setSpacing(0);
scroll->setWidget(scroll_body);
frame_layout->addWidget(scroll);
} else {
frame_layout->addWidget(content);
auto* body = new QWidget(frame);
body_layout_ = new QVBoxLayout(body);
body_layout_->setContentsMargins(0, 0, 0, 0);
body_layout_->setSpacing(0);
frame_layout->addWidget(body);
}
if (content) {
body_layout_->addWidget(content);
}
outer_layout->addWidget(frame);
@@ -115,4 +122,8 @@ Panel::Panel(const QString& title, QWidget* content, QWidget* parent, bool has_s
setWidget(outer);
}
void Panel::addBodyWidget(QWidget* widget) {
body_layout_->addWidget(widget);
}
} // namespace ifcinterface::components