#pragma once #include #include #include #include #include "ShipLayout.h" #include "ShipStatsCalculator.h" struct GameConfig; class QLabel; class ShipStatsPanel : public QWidget { Q_OBJECT public: explicit ShipStatsPanel(const GameConfig* config, QWidget* parent = nullptr); void refresh(const std::string& shipId, int level, const std::vector& modules, const std::map& moduleLevelOverrides = {}); void refreshFromLive(const ShipStats& stats, float currentHp); void setThreatCost(double cost); void setDebugDrawEnabled(bool enabled); private: void applyStats(const ShipStats& stats, const QString& hpText); const GameConfig* m_config; bool m_debugDraw = false; QLabel* m_hpLabel; QLabel* m_speedLabel; QLabel* m_sensorRangeLabel; QLabel* m_mainAccelLabel; QLabel* m_maneuveringAccelLabel; QLabel* m_angularAccelLabel; QLabel* m_maxRotSpeedLabel; QWidget* m_weaponSection; QLabel* m_weaponDpsLabel; QLabel* m_weaponRangeLabel; QWidget* m_salvageSection; QLabel* m_salvageRateLabel; QLabel* m_salvageRangeLabel; QWidget* m_repairSection; QLabel* m_repairRateLabel; QLabel* m_repairRangeLabel; QLabel* m_threatCostLabel; };