add ship stats panel to ship layout dialog

This commit is contained in:
2026-06-06 21:21:48 +02:00
parent 8dad554800
commit 37a70ea321
9 changed files with 562 additions and 24 deletions

View File

@@ -13,6 +13,7 @@
#include "ShipLayoutBlueprint.h"
class QPushButton;
class ShipStatsPanel;
class ShipLayoutDialog : public QDialog
{
@@ -49,6 +50,7 @@ private:
void rebuildOccupancy();
void updateGridWidget();
void updateStats();
bool canPlaceModule(const ModuleDef& def, QPoint position, Rotation rotation) const;
std::vector<std::string> rotatedMask(const ModuleDef& def, Rotation rotation) const;
void loadLayoutBlueprint(const std::vector<PlacedModule>& modules);
@@ -68,6 +70,7 @@ private:
std::vector<QPushButton*> m_moduleButtons;
QPushButton* m_removeButton;
QWidget* m_gridWidget;
ShipStatsPanel* m_statsPanel;
std::optional<ShipLayoutConfig> m_result;
};