新增根据帧数控制可见性

This commit is contained in:
2026-04-09 17:30:55 +08:00
parent e116a9ec79
commit d67d7dc0c5
29 changed files with 4387 additions and 408 deletions

View File

@@ -0,0 +1,50 @@
#pragma once
#include "props/PropertySectionWidget.h"
#include <QString>
class QComboBox;
class QLineEdit;
class QSlider;
class QSpinBox;
class QCheckBox;
namespace gui {
struct ToolPropertyUiState {
QString displayName;
QString text;
int pointerTThousandths = 500; // bubblePointerT01 * 10000=左 1000=右
int fontPx = 18;
int alignIndex = 1; // 0=left,1=center,2=right
bool visible = true;
};
class ToolPropertySection final : public PropertySectionWidget {
Q_OBJECT
public:
explicit ToolPropertySection(QWidget* parent = nullptr);
void clearDisconnected();
void applyState(const ToolPropertyUiState& s);
void setEditingEnabled(bool on);
signals:
void textCommitted(const QString& text);
void pointerTChanged(int thousandths);
void fontPxChanged(int px);
void alignChanged(int alignIndex);
// 可见性(动画通道):在当前帧写关键帧
void visibleToggled(bool on);
private:
QLineEdit* m_text = nullptr;
QSlider* m_pointerT = nullptr;
QSpinBox* m_fontPx = nullptr;
QComboBox* m_align = nullptr;
QCheckBox* m_visible = nullptr;
};
} // namespace gui