22 #include <QMap> |
22 #include <QMap> |
23 #include <QVector> |
23 #include <QVector> |
24 |
24 |
25 class MagicWandMode : public AbstractSelectMode |
25 class MagicWandMode : public AbstractSelectMode |
26 { |
26 { |
27 QMap<Vertex, QVector<LDObject*>> m_vertices; |
27 QMap<Vertex, QSet<LDObject*>> m_vertices; |
28 QVector<LDObject*> m_selection; |
28 QVector<LDObject*> m_selection; |
29 |
29 |
30 DEFINE_CLASS (MagicWandMode, AbstractSelectMode) |
30 DEFINE_CLASS (MagicWandMode, AbstractSelectMode) |
31 |
31 |
32 public: |
32 public: |
43 void doMagic (LDObject* obj, MagicType type); |
43 void doMagic (LDObject* obj, MagicType type); |
44 virtual EditModeType type() const override; |
44 virtual EditModeType type() const override; |
45 virtual bool mouseReleased (MouseEventData const& data) override; |
45 virtual bool mouseReleased (MouseEventData const& data) override; |
46 |
46 |
47 private: |
47 private: |
48 void fillBoundaries (LDObject* obj, QVector<BoundaryType>& boundaries, QVector<LDObject*>& candidates); |
48 void fillBoundaries (LDObject* obj, QVector<BoundaryType>& boundaries, QSet<LDObject *> &candidates); |
49 }; |
49 }; |