erlu/src/items/DiagramScene.h

123 lines
3.9 KiB
C
Raw Normal View History

#pragma once
#include <QGraphicsScene>
#include <QPointer>
#include <optional>
#include <QVariantMap>
#include "BlockItem.h"
class ArrowItem;
class JunctionItem;
class HeaderFooterItem;
class DiagramScene final : public QGraphicsScene {
Q_OBJECT
public:
explicit DiagramScene(QObject* parent = nullptr);
BlockItem* createBlockAt(const QPointF& scenePos);
BlockItem* createBlockWithId(const QPointF& scenePos, int id, const QString& title);
void requestSnapshot();
void applyMeta(const QVariantMap& meta);
void updateMeta(const QVariantMap& patch);
QVariantMap meta() const { return m_meta; }
QRectF contentRect() const { return m_contentRect; }
QString currentNodeLabel() const;
QString currentDiagramTitle() const;
удалено: build/.qt/QtDeploySupport.cmake удалено: build/.qt/QtDeployTargets.cmake удалено: build/CMakeCache.txt удалено: build/CMakeFiles/4.1.2/CMakeCXXCompiler.cmake удалено: build/CMakeFiles/4.1.2/CMakeDetermineCompilerABI_CXX.bin удалено: build/CMakeFiles/4.1.2/CMakeSystem.cmake удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/CMakeCXXCompilerId.cpp удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/a.out удалено: build/CMakeFiles/CMakeConfigureLog.yaml удалено: build/CMakeFiles/CMakeDirectoryInformation.cmake удалено: build/CMakeFiles/CMakeRuleHashes.txt удалено: build/CMakeFiles/InstallScripts.json удалено: build/CMakeFiles/Makefile.cmake удалено: build/CMakeFiles/Makefile2 удалено: build/CMakeFiles/TargetDirectories.txt удалено: build/CMakeFiles/cmake.check_cache удалено: build/CMakeFiles/idef0_editor.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor.dir/build.make удалено: build/CMakeFiles/idef0_editor.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor.dir/depend.make удалено: build/CMakeFiles/idef0_editor.dir/flags.make удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/link.d удалено: build/CMakeFiles/idef0_editor.dir/link.txt удалено: build/CMakeFiles/idef0_editor.dir/progress.make удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o.d удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenInfo.json удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenUsed.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/ParseCache.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen.dir/progress.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/progress.make удалено: build/CMakeFiles/progress.marks удалено: build/Makefile удалено: build/cmake_install.cmake удалено: build/idef0_editor удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp.d удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp.d удалено: build/idef0_editor_autogen/deps удалено: build/idef0_editor_autogen/moc_predefs.h удалено: build/idef0_editor_autogen/mocs_compilation.cpp удалено: build/idef0_editor_autogen/timestamp удалено: codex изменено: src/items/ArrowItem.cpp изменено: src/items/ArrowItem.h изменено: src/items/BlockItem.h изменено: src/items/DiagramScene.cpp изменено: src/items/DiagramScene.h
2026-02-23 00:23:03 +03:00
bool goDownIntoSelected();
bool goDownIntoBlock(BlockItem* b);
bool goUp();
void propagateLabelFrom(ArrowItem* root);
QVariantMap exportToVariant();
bool importFromVariant(const QVariantMap& map);
signals:
void changed();
void metaChanged(const QVariantMap& meta);
protected:
void mousePressEvent(QGraphicsSceneMouseEvent* e) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent* e) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent* e) override;
void keyPressEvent(QKeyEvent* e) override;
private:
struct Snapshot {
struct Endpoint {
enum class Kind { None, Block, Junction, Scene } kind = Kind::None;
int id = -1;
BlockItem::Port port = BlockItem::Port::Input;
std::optional<QPointF> localPos;
std::optional<QPointF> scenePos;
};
struct Block { int id; QString title; QPointF pos; bool hasDecomp = false; QString number; std::optional<qreal> price; };
struct Junction { int id; QPointF pos; };
struct Arrow {
Endpoint from;
Endpoint to;
qreal bend = 0.0;
qreal top = 0.0;
qreal bottom = 0.0;
QString label;
QPointF labelOffset;
bool labelHidden = false;
bool labelInherited = false;
bool isInterface = false;
bool isInterfaceStub = false;
bool labelLocked = false;
Endpoint interfaceEdge;
};
QVector<Block> blocks;
QVector<Junction> junctions;
QVector<Arrow> arrows;
};
struct HierNode { int blockId; Snapshot snapshot; QString prefix; };
удалено: build/.qt/QtDeploySupport.cmake удалено: build/.qt/QtDeployTargets.cmake удалено: build/CMakeCache.txt удалено: build/CMakeFiles/4.1.2/CMakeCXXCompiler.cmake удалено: build/CMakeFiles/4.1.2/CMakeDetermineCompilerABI_CXX.bin удалено: build/CMakeFiles/4.1.2/CMakeSystem.cmake удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/CMakeCXXCompilerId.cpp удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/a.out удалено: build/CMakeFiles/CMakeConfigureLog.yaml удалено: build/CMakeFiles/CMakeDirectoryInformation.cmake удалено: build/CMakeFiles/CMakeRuleHashes.txt удалено: build/CMakeFiles/InstallScripts.json удалено: build/CMakeFiles/Makefile.cmake удалено: build/CMakeFiles/Makefile2 удалено: build/CMakeFiles/TargetDirectories.txt удалено: build/CMakeFiles/cmake.check_cache удалено: build/CMakeFiles/idef0_editor.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor.dir/build.make удалено: build/CMakeFiles/idef0_editor.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor.dir/depend.make удалено: build/CMakeFiles/idef0_editor.dir/flags.make удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/link.d удалено: build/CMakeFiles/idef0_editor.dir/link.txt удалено: build/CMakeFiles/idef0_editor.dir/progress.make удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o.d удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenInfo.json удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenUsed.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/ParseCache.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen.dir/progress.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/progress.make удалено: build/CMakeFiles/progress.marks удалено: build/Makefile удалено: build/cmake_install.cmake удалено: build/idef0_editor удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp.d удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp.d удалено: build/idef0_editor_autogen/deps удалено: build/idef0_editor_autogen/moc_predefs.h удалено: build/idef0_editor_autogen/mocs_compilation.cpp удалено: build/idef0_editor_autogen/timestamp удалено: codex изменено: src/items/ArrowItem.cpp изменено: src/items/ArrowItem.h изменено: src/items/BlockItem.h изменено: src/items/DiagramScene.cpp изменено: src/items/DiagramScene.h
2026-02-23 00:23:03 +03:00
ArrowItem* m_dragArrow = nullptr;
QPointer<BlockItem> m_dragFromBlock;
QPointer<JunctionItem> m_dragFromJunction;
BlockItem::Port m_dragFromPort = BlockItem::Port::Output;
int m_nextBlockId = 1;
int m_nextJunctionId = 1;
QString m_currentPrefix = QStringLiteral("A");
удалено: build/.qt/QtDeploySupport.cmake удалено: build/.qt/QtDeployTargets.cmake удалено: build/CMakeCache.txt удалено: build/CMakeFiles/4.1.2/CMakeCXXCompiler.cmake удалено: build/CMakeFiles/4.1.2/CMakeDetermineCompilerABI_CXX.bin удалено: build/CMakeFiles/4.1.2/CMakeSystem.cmake удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/CMakeCXXCompilerId.cpp удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/a.out удалено: build/CMakeFiles/CMakeConfigureLog.yaml удалено: build/CMakeFiles/CMakeDirectoryInformation.cmake удалено: build/CMakeFiles/CMakeRuleHashes.txt удалено: build/CMakeFiles/InstallScripts.json удалено: build/CMakeFiles/Makefile.cmake удалено: build/CMakeFiles/Makefile2 удалено: build/CMakeFiles/TargetDirectories.txt удалено: build/CMakeFiles/cmake.check_cache удалено: build/CMakeFiles/idef0_editor.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor.dir/build.make удалено: build/CMakeFiles/idef0_editor.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor.dir/depend.make удалено: build/CMakeFiles/idef0_editor.dir/flags.make удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/link.d удалено: build/CMakeFiles/idef0_editor.dir/link.txt удалено: build/CMakeFiles/idef0_editor.dir/progress.make удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o.d удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenInfo.json удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenUsed.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/ParseCache.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen.dir/progress.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/progress.make удалено: build/CMakeFiles/progress.marks удалено: build/Makefile удалено: build/cmake_install.cmake удалено: build/idef0_editor удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp.d удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp.d удалено: build/idef0_editor_autogen/deps удалено: build/idef0_editor_autogen/moc_predefs.h удалено: build/idef0_editor_autogen/mocs_compilation.cpp удалено: build/idef0_editor_autogen/timestamp удалено: codex изменено: src/items/ArrowItem.cpp изменено: src/items/ArrowItem.h изменено: src/items/BlockItem.h изменено: src/items/DiagramScene.cpp изменено: src/items/DiagramScene.h
2026-02-23 00:23:03 +03:00
bool m_snapshotScheduled = false;
bool m_restoringSnapshot = false;
bool m_itemDragActive = false;
QHash<QGraphicsItem*, QPointF> m_pressPositions;
int m_currentBlockId = -1;
QVector<HierNode> m_hierarchy;
QHash<QString, Snapshot> m_children; // hierarchical key ("1/2/3") -> saved child diagram
ArrowItem* m_dragInterfaceStub = nullptr;
QVariantMap m_meta;
HeaderFooterItem* m_headerFooter = nullptr;
QRectF m_contentRect;
удалено: build/.qt/QtDeploySupport.cmake удалено: build/.qt/QtDeployTargets.cmake удалено: build/CMakeCache.txt удалено: build/CMakeFiles/4.1.2/CMakeCXXCompiler.cmake удалено: build/CMakeFiles/4.1.2/CMakeDetermineCompilerABI_CXX.bin удалено: build/CMakeFiles/4.1.2/CMakeSystem.cmake удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/CMakeCXXCompilerId.cpp удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/a.out удалено: build/CMakeFiles/CMakeConfigureLog.yaml удалено: build/CMakeFiles/CMakeDirectoryInformation.cmake удалено: build/CMakeFiles/CMakeRuleHashes.txt удалено: build/CMakeFiles/InstallScripts.json удалено: build/CMakeFiles/Makefile.cmake удалено: build/CMakeFiles/Makefile2 удалено: build/CMakeFiles/TargetDirectories.txt удалено: build/CMakeFiles/cmake.check_cache удалено: build/CMakeFiles/idef0_editor.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor.dir/build.make удалено: build/CMakeFiles/idef0_editor.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor.dir/depend.make удалено: build/CMakeFiles/idef0_editor.dir/flags.make удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/link.d удалено: build/CMakeFiles/idef0_editor.dir/link.txt удалено: build/CMakeFiles/idef0_editor.dir/progress.make удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o.d удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenInfo.json удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenUsed.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/ParseCache.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen.dir/progress.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/progress.make удалено: build/CMakeFiles/progress.marks удалено: build/Makefile удалено: build/cmake_install.cmake удалено: build/idef0_editor удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp.d удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp.d удалено: build/idef0_editor_autogen/deps удалено: build/idef0_editor_autogen/moc_predefs.h удалено: build/idef0_editor_autogen/mocs_compilation.cpp удалено: build/idef0_editor_autogen/timestamp удалено: codex изменено: src/items/ArrowItem.cpp изменено: src/items/ArrowItem.h изменено: src/items/BlockItem.h изменено: src/items/DiagramScene.cpp изменено: src/items/DiagramScene.h
2026-02-23 00:23:03 +03:00
bool tryStartArrowDrag(const QPointF& scenePos, Qt::KeyboardModifiers mods);
удалено: build/.qt/QtDeploySupport.cmake удалено: build/.qt/QtDeployTargets.cmake удалено: build/CMakeCache.txt удалено: build/CMakeFiles/4.1.2/CMakeCXXCompiler.cmake удалено: build/CMakeFiles/4.1.2/CMakeDetermineCompilerABI_CXX.bin удалено: build/CMakeFiles/4.1.2/CMakeSystem.cmake удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/CMakeCXXCompilerId.cpp удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/a.out удалено: build/CMakeFiles/CMakeConfigureLog.yaml удалено: build/CMakeFiles/CMakeDirectoryInformation.cmake удалено: build/CMakeFiles/CMakeRuleHashes.txt удалено: build/CMakeFiles/InstallScripts.json удалено: build/CMakeFiles/Makefile.cmake удалено: build/CMakeFiles/Makefile2 удалено: build/CMakeFiles/TargetDirectories.txt удалено: build/CMakeFiles/cmake.check_cache удалено: build/CMakeFiles/idef0_editor.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor.dir/build.make удалено: build/CMakeFiles/idef0_editor.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor.dir/depend.make удалено: build/CMakeFiles/idef0_editor.dir/flags.make удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/link.d удалено: build/CMakeFiles/idef0_editor.dir/link.txt удалено: build/CMakeFiles/idef0_editor.dir/progress.make удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o.d удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenInfo.json удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenUsed.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/ParseCache.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen.dir/progress.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/progress.make удалено: build/CMakeFiles/progress.marks удалено: build/Makefile удалено: build/cmake_install.cmake удалено: build/idef0_editor удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp.d удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp.d удалено: build/idef0_editor_autogen/deps удалено: build/idef0_editor_autogen/moc_predefs.h удалено: build/idef0_editor_autogen/mocs_compilation.cpp удалено: build/idef0_editor_autogen/timestamp удалено: codex изменено: src/items/ArrowItem.cpp изменено: src/items/ArrowItem.h изменено: src/items/BlockItem.h изменено: src/items/DiagramScene.cpp изменено: src/items/DiagramScene.h
2026-02-23 00:23:03 +03:00
bool tryFinishArrowDrag(const QPointF& scenePos);
bool tryBranchAtArrow(const QPointF& scenePos);
void cancelCurrentDrag();
void deleteSelection();
QVector<Snapshot> m_history;
int m_historyIndex = -1;
Snapshot captureSnapshot() const;
void restoreSnapshot(const Snapshot& snap, bool resetHistoryState = true);
void pushSnapshot();
void scheduleSnapshot();
void undo();
void maybeSnapshotMovedItems();
удалено: build/.qt/QtDeploySupport.cmake удалено: build/.qt/QtDeployTargets.cmake удалено: build/CMakeCache.txt удалено: build/CMakeFiles/4.1.2/CMakeCXXCompiler.cmake удалено: build/CMakeFiles/4.1.2/CMakeDetermineCompilerABI_CXX.bin удалено: build/CMakeFiles/4.1.2/CMakeSystem.cmake удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/CMakeCXXCompilerId.cpp удалено: build/CMakeFiles/4.1.2/CompilerIdCXX/a.out удалено: build/CMakeFiles/CMakeConfigureLog.yaml удалено: build/CMakeFiles/CMakeDirectoryInformation.cmake удалено: build/CMakeFiles/CMakeRuleHashes.txt удалено: build/CMakeFiles/InstallScripts.json удалено: build/CMakeFiles/Makefile.cmake удалено: build/CMakeFiles/Makefile2 удалено: build/CMakeFiles/TargetDirectories.txt удалено: build/CMakeFiles/cmake.check_cache удалено: build/CMakeFiles/idef0_editor.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor.dir/build.make удалено: build/CMakeFiles/idef0_editor.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor.dir/depend.make удалено: build/CMakeFiles/idef0_editor.dir/flags.make удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/idef0_editor_autogen/mocs_compilation.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/link.d удалено: build/CMakeFiles/idef0_editor.dir/link.txt удалено: build/CMakeFiles/idef0_editor.dir/progress.make удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/MainWindow.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/ArrowItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/BlockItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/DiagramScene.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/items/JunctionItem.cpp.o.d удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o удалено: build/CMakeFiles/idef0_editor.dir/src/main.cpp.o.d удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenInfo.json удалено: build/CMakeFiles/idef0_editor_autogen.dir/AutogenUsed.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/ParseCache.txt удалено: build/CMakeFiles/idef0_editor_autogen.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.internal удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen.dir/progress.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/DependInfo.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/build.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/cmake_clean.cmake удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.make удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/compiler_depend.ts удалено: build/CMakeFiles/idef0_editor_autogen_timestamp_deps.dir/progress.make удалено: build/CMakeFiles/progress.marks удалено: build/Makefile удалено: build/cmake_install.cmake удалено: build/idef0_editor удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_BlockItem.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_DiagramScene.cpp.d удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp удалено: build/idef0_editor_autogen/DWIBBXP2LJ/moc_JunctionItem.cpp.d удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp удалено: build/idef0_editor_autogen/UVLADIE3JM/moc_MainWindow.cpp.d удалено: build/idef0_editor_autogen/deps удалено: build/idef0_editor_autogen/moc_predefs.h удалено: build/idef0_editor_autogen/mocs_compilation.cpp удалено: build/idef0_editor_autogen/timestamp удалено: codex изменено: src/items/ArrowItem.cpp изменено: src/items/ArrowItem.h изменено: src/items/BlockItem.h изменено: src/items/DiagramScene.cpp изменено: src/items/DiagramScene.h
2026-02-23 00:23:03 +03:00
void resetHistory(const Snapshot& base);
void ensureFrame();
void ensureHeaderFooter();
bool childHasContent(int blockId) const;
QString currentPathKey() const;
QString childKeyFor(int blockId) const;
QString assignNumber(BlockItem* b);
enum class Edge { None, Left, Right, Top, Bottom };
Edge hitTestEdge(const QPointF& scenePos, QPointF* outScenePoint = nullptr) const;
friend QJsonObject endpointToJson(const Snapshot::Endpoint& ep);
friend Snapshot::Endpoint endpointFromJson(const QJsonObject& o);
};