switched many QLists for QVectors
Minor optimization
This commit is contained in:
@@ -58,22 +58,22 @@ public:
|
||||
void SelectAll();
|
||||
void DeselectAll();
|
||||
|
||||
void Select(const QList<Node*>& nodes);
|
||||
void SelectWithDependencies(QList<Node *> nodes);
|
||||
void Select(const QVector<Node*>& nodes);
|
||||
void SelectWithDependencies(QVector<Node *> nodes);
|
||||
|
||||
void CopySelected(bool cut);
|
||||
void Paste();
|
||||
|
||||
void Duplicate();
|
||||
|
||||
void SelectBlocks(const QList<Block*>& blocks);
|
||||
void SelectBlocks(const QVector<Block*>& blocks);
|
||||
|
||||
void DeselectBlocks(const QList<Block*>& blocks);
|
||||
void DeselectBlocks(const QVector<Block*>& blocks);
|
||||
|
||||
signals:
|
||||
void NodesSelected(const QList<Node*>& nodes);
|
||||
void NodesSelected(const QVector<Node*>& nodes);
|
||||
|
||||
void NodesDeselected(const QList<Node*>& nodes);
|
||||
void NodesDeselected(const QVector<Node*>& nodes);
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *event) override;
|
||||
@@ -85,9 +85,9 @@ protected:
|
||||
virtual void wheelEvent(QWheelEvent* event) override;
|
||||
|
||||
private:
|
||||
void AttachNodesToCursor(const QList<Node*>& nodes);
|
||||
void AttachNodesToCursor(const QVector<Node *> &nodes);
|
||||
|
||||
void AttachItemsToCursor(const QList<NodeViewItem*>& items);
|
||||
void AttachItemsToCursor(const QVector<NodeViewItem *> &items);
|
||||
|
||||
void DetachItemsFromCursor();
|
||||
|
||||
@@ -121,13 +121,13 @@ private:
|
||||
|
||||
NodeViewScene scene_;
|
||||
|
||||
QList<Node*> selected_nodes_;
|
||||
QVector<Node*> selected_nodes_;
|
||||
|
||||
QList<Block*> selected_blocks_;
|
||||
QVector<Block*> selected_blocks_;
|
||||
|
||||
QHash<Node*, QList<Block*> > association_map_;
|
||||
QHash<Node*, QVector<Block*> > association_map_;
|
||||
|
||||
QHash<Block*, QList<Node*> > temporary_association_map_;
|
||||
QHash<Block*, QVector<Node*> > temporary_association_map_;
|
||||
|
||||
enum FilterMode {
|
||||
kFilterShowAll,
|
||||
|
||||
Reference in New Issue
Block a user