aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/projecttree.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-03-10 10:20:53 +0100
committerTobias Hunger <tobias.hunger@qt.io>2017-03-10 16:44:07 +0000
commitc63805668fa92db4062b5d5f92c033151c3699e3 (patch)
tree3c2006c7a7f8f9a5cc5bccd3d09dc6e96b16dff3 /src/plugins/projectexplorer/projecttree.h
parent393cb16a207533c9fb5492bf22a30932cd850cfa (diff)
ProjectTree: Add a way to register managers for subtrees
Change-Id: I4694bb7dbe75b67946cdb5d8ca8b5a3ff1e40659 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/projecttree.h')
-rw-r--r--src/plugins/projectexplorer/projecttree.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/projecttree.h b/src/plugins/projectexplorer/projecttree.h
index 0985540cc4..74f0c53a2c 100644
--- a/src/plugins/projectexplorer/projecttree.h
+++ b/src/plugins/projectexplorer/projecttree.h
@@ -29,6 +29,8 @@
#include <coreplugin/icontext.h>
+#include <functional>
+
namespace ProjectExplorer {
class FileNode;
class FolderNode;
@@ -62,6 +64,10 @@ public:
static void highlightProject(Project *project, const QString &message);
+ using TreeManagerFunction = std::function<void(FolderNode *)>;
+ static void registerTreeManager(const TreeManagerFunction &treeChange);
+ static void applyTreeManager(FolderNode *folder);
+
void collapseAll();
signals:
@@ -92,11 +98,11 @@ private:
void updateExternalFileWarning();
static bool hasFocus(Internal::ProjectTreeWidget *widget);
void hideContextMenu();
- bool isInNodeHierarchy(Node *n);
private:
static ProjectTree *s_instance;
QList<QPointer<Internal::ProjectTreeWidget>> m_projectTreeWidgets;
+ QVector<TreeManagerFunction> m_treeManagers;
QPointer<Node> m_currentNode;
Project *m_currentProject = nullptr;
Internal::ProjectTreeWidget *m_focusForContextMenu = nullptr;