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

46
src/ui/ShipStatsPanel.h Normal file
View File

@@ -0,0 +1,46 @@
#pragma once
#include <string>
#include <vector>
#include <QWidget>
#include "ShipLayout.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<PlacedModule>& modules);
private:
const GameConfig* m_config;
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;
};