update
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <QByteArray>
|
||||
#include <QJsonArray>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
#include <QPointF>
|
||||
#include <QImage>
|
||||
#include <QPainterPath>
|
||||
@@ -85,6 +86,12 @@ public:
|
||||
|
||||
void selectEntityById(const QString& id);
|
||||
void clearEntitySelection();
|
||||
void selectBlackholeByEntityId(const QString& entityId);
|
||||
void clearBlackholeSelection();
|
||||
bool startBlackholeCopyResolve(const QString& entityId);
|
||||
void cancelBlackholeCopyResolve();
|
||||
/// 背景图片文件内容被外部写盘更新(路径未变)时,强制重新加载缓存
|
||||
void notifyBackgroundContentChanged();
|
||||
|
||||
// 与动画求值一致的原点/缩放(用于 K 帧与自动关键帧)
|
||||
QPointF selectedAnimatedOriginWorld() const;
|
||||
@@ -115,6 +122,7 @@ signals:
|
||||
void requestFinalizePendingEntity(const QVector<QPointF>& polyWorld);
|
||||
void requestMoveEntity(const QString& id, const QPointF& delta);
|
||||
void requestMoveTool(const QString& id, const QPointF& delta);
|
||||
void requestResolveBlackholeCopy(const QString& entityId, const QPoint& sourceOffsetPx);
|
||||
void entityDragActiveChanged(bool on);
|
||||
void selectedEntityPreviewChanged(const QString& id, int depth, const QPointF& originWorld);
|
||||
/// 预览模式下点击实体:anchorView 为实体质心在视图中的位置,用于摆放介绍浮层
|
||||
@@ -171,6 +179,7 @@ private:
|
||||
QPointF animatedOriginWorld;
|
||||
double animatedDepthScale01 = 0.5;
|
||||
double opacity = 1.0; // 0..1(由可见性轨道求值)
|
||||
bool blackholeVisible = true;
|
||||
};
|
||||
int hitTestEntity(const QPointF& worldPos) const;
|
||||
|
||||
@@ -186,7 +195,7 @@ private:
|
||||
mutable QPixmap m_bgPixmap;
|
||||
mutable bool m_pixmapDirty = true;
|
||||
mutable QImage m_bgImage; // 原背景(用于抠图/填充)
|
||||
mutable QImage m_bgImageCutout; // 抠图后的背景(实体区域填黑)
|
||||
mutable QImage m_bgImageCutout; // 抠图后的背景(黑洞区域填黑)
|
||||
mutable bool m_bgImageDirty = true;
|
||||
mutable bool m_bgCutoutDirty = true;
|
||||
|
||||
@@ -229,6 +238,13 @@ private:
|
||||
qint64 m_lastPreviewEmitMs = 0;
|
||||
qint64 m_lastDepthScaleRecalcMs = 0;
|
||||
int m_selectedEntity = -1;
|
||||
QString m_selectedBlackholeEntityId;
|
||||
bool m_blackholeCopyResolveActive = false;
|
||||
QString m_blackholeCopyEntityId;
|
||||
QRectF m_blackholeCopyHoleRect;
|
||||
QRectF m_blackholeCopySourceRect;
|
||||
bool m_blackholeCopyDragging = false;
|
||||
QPointF m_blackholeCopyDragOffset;
|
||||
int m_selectedTool = -1;
|
||||
bool m_draggingTool = false;
|
||||
QPointF m_toolDragOffsetOriginWorld;
|
||||
|
||||
Reference in New Issue
Block a user