增加摄像机
This commit is contained in:
47
client/gui/props/CameraPropertySection.h
Normal file
47
client/gui/props/CameraPropertySection.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include "props/PropertySectionWidget.h"
|
||||
|
||||
#include <QPointF>
|
||||
#include <QString>
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user