#pragma once #include "props/PropertySectionWidget.h" #include #include class QCheckBox; class QDoubleSpinBox; class QLineEdit; namespace gui { class Vec2ParamControl; } namespace gui { struct CameraPropertyUiState { QString displayName; QPointF centerWorld; double viewScale = 1.0; bool isActivePreviewCamera = false; }; class CameraPropertySection final : public PropertySectionWidget { Q_OBJECT public: explicit CameraPropertySection(QWidget* parent = nullptr); void clearDisconnected(); void applyState(const CameraPropertyUiState& s); void setEditingEnabled(bool on); signals: void displayNameCommitted(const QString& text); void centerEdited(double x, double y); void viewScaleEdited(double viewScale); void activePreviewToggled(bool on); private: QLineEdit* m_name = nullptr; Vec2ParamControl* m_center = nullptr; QDoubleSpinBox* m_viewScale = nullptr; QCheckBox* m_activePreview = nullptr; }; } // namespace gui