Add model coordinates settings

Add the federation/model settings dialog and related interface wiring for model coordinate configuration.

Generated with the assistance of an AI coding tool.
This commit is contained in:
Dion Moult
2026-05-09 22:00:19 +10:00
parent 7f153375b2
commit d0c8c84e7b
15 changed files with 1454 additions and 9 deletions
+9 -7
View File
@@ -38,7 +38,10 @@ namespace {
class DockTitleBar : public QWidget {
public:
explicit DockTitleBar(const QString& title, bool has_settings = false, QWidget* parent = nullptr)
explicit DockTitleBar(const QString& title,
bool has_settings = false,
std::function<void()> on_settings = {},
QWidget* parent = nullptr)
: QWidget(parent)
{
auto* layout = new QHBoxLayout(this);
@@ -58,11 +61,8 @@ public:
settings->setFixedSize(18, 18);
settings->setObjectName("panelTitleButton");
settings->setToolTip(QString("%1 settings").arg(title));
connect(settings, &QToolButton::clicked, this, [this, title]() {
auto* anchor = parentWidget();
QMenu menu(anchor);
menu.addAction(QString("%1 settings coming soon").arg(title));
menu.exec(QCursor::pos());
connect(settings, &QToolButton::clicked, this, [on_settings = std::move(on_settings)]() {
if (on_settings) on_settings();
});
layout->addWidget(settings);
}
@@ -118,7 +118,9 @@ Panel::Panel(const QString& title, QWidget* content, QWidget* parent, bool has_s
setFeatures(QDockWidget::DockWidgetMovable |
QDockWidget::DockWidgetFloatable |
QDockWidget::DockWidgetClosable);
setTitleBarWidget(new DockTitleBar(title, has_settings, this));
setTitleBarWidget(new DockTitleBar(title, has_settings, [this]() {
emit settingsRequested();
}, this));
setWidget(outer);
}