kdevelop/kdevplatform/language/classmodel
classmodelnode.cpp
Go to the documentation of this file.
42 IdentifierNode::IdentifierNode(KDevelop::Declaration* a_decl,
45 : DynamicNode(a_displayName.isEmpty() ? a_decl->identifier().toString() : a_displayName, a_model)
150 template <> inline bool qMapLessThanKey(const IndexedIdentifier& key1, const IndexedIdentifier& key2)
299 ClassMemberNode::ClassMemberNode(KDevelop::ClassMemberDeclaration* a_decl, NodesModelInterface* a_model)
329 DynamicFolderNode::DynamicFolderNode(const QString& a_displayName, NodesModelInterface* a_model)
366 auto* klass = dynamic_cast<ClassDeclaration*>(static_cast<ClassNode*>(parent())->declaration());
397 auto* klass = dynamic_cast<ClassDeclaration*>(static_cast<ClassNode*>(parent())->declaration());
Provides a folder node with a dynamic list of nodes.
Definition: classmodelnode.h:297
void clear()
Provides a display for a single class function.
Definition: classmodelnode.h:249
bool hasChildren() const override
Return true if the node contains sub-nodes.
Definition: classmodelnode.cpp:564
void populateNode() override
Called by the framework when the node is about to be expanded it should be populated with sub-nodes i...
Definition: classmodelnode.cpp:104
void push_back(const T &value)
virtual Features features() const =0
bool getIcon(QIcon &a_resultIcon) override
fill a_resultIcon with a display icon for the node.
Definition: classmodelnode.cpp:60
void removeAt(int i)
bool getIcon(QIcon &a_resultIcon) override
fill a_resultIcon with a display icon for the node.
Definition: classmodelnode.cpp:82
void performPopulateNode(bool a_forceRepopulate=false)
Populate the node and mark the flag - called from expand or can be used internally.
Definition: classmodelnode.cpp:546
static ClassModelNodesController & self()
Definition: classmodelnodescontroller.cpp:46
void clear()
FunctionNode(KDevelop::Declaration *a_decl, NodesModelInterface *a_model)
Definition: classmodelnode.cpp:277
int size() const
int indexOf(const T &value, int from) const
Base node class - provides basic functionality.
Definition: classmodelnode.h:45
DynamicFolderNode(const QString &a_displayName, NodesModelInterface *a_model)
Definition: classmodelnode.cpp:329
Special folder - the parent is assumed to be a ClassNode.
Definition: classmodelnode.h:313
void populateNode() override
Called by the framework when the node is about to be expanded it should be populated with sub-nodes i...
Definition: classmodelnode.cpp:134
bool empty() const
bool getIcon(QIcon &a_resultIcon) override
fill a_resultIcon with a display icon for the node.
Definition: classmodelnode.cpp:304
virtual void populateNode()
Called by the framework when the node is about to be expanded it should be populated with sub-nodes i...
Definition: classmodelnode.h:144
DynamicNode(const QString &a_displayName, NodesModelInterface *a_model)
Definition: classmodelnode.cpp:507
void unregisterForChanges(const KDevelop::IndexedString &a_file, ClassModelNodeDocumentChangedInterface *a_node)
Unregister the given class node from further notifications.
Definition: classmodelnodescontroller.cpp:58
bool isEmpty() const
BaseClassesFolderNode(NodesModelInterface *a_model)
Definition: classmodelnode.cpp:357
EnumNode(KDevelop::Declaration *a_decl, NodesModelInterface *a_model)
Definition: classmodelnode.cpp:74
void populateNode() override
Called by the framework when the node is about to be expanded it should be populated with sub-nodes i...
Definition: classmodelnode.cpp:393
Base class for nodes that generate and populate their child nodes dynamically.
Definition: classmodelnode.h:124
FolderNode(const QString &a_displayName, NodesModelInterface *a_model)
Definition: classmodelnode.cpp:343
bool qMapLessThanKey(const IndexedIdentifier &key1, const IndexedIdentifier &key2)
Definition: classmodelnode.cpp:150
virtual QString sortableString() const
We use this string when sorting items.
Definition: classmodelnode.h:98
void recursiveSort()
Called once the node has been populated to sort the entire tree / branch.
Definition: classmodelnode.cpp:476
void populateNode() override
Called by the framework when the node is about to be expanded it should be populated with sub-nodes i...
Definition: classmodelnode.cpp:362
void documentChanged(const KDevelop::IndexedString &a_file) override
Called when the registered document is changed.
Definition: classmodelnode.cpp:247
Base class for nodes associated with a KDevelop::QualifiedIdentifier.
Definition: classmodelnode.h:161
iterator end()
void expand() override
Called by the model to expand the node and populate it with sub-nodes if needed.
Definition: classmodelnode.cpp:518
void nodeCleared() override
Called after the nodes have been removed.
Definition: classmodelnode.cpp:237
ClassMemberNode(KDevelop::ClassMemberDeclaration *a_decl, NodesModelInterface *a_model)
Definition: classmodelnode.cpp:299
DerivedClassesFolderNode(NodesModelInterface *a_model)
Definition: classmodelnode.cpp:388
bool getIcon(QIcon &a_resultIcon) override
fill a_resultIcon with a display icon for the node.
Definition: classmodelnode.cpp:334
void registerForChanges(const KDevelop::IndexedString &a_file, ClassModelNodeDocumentChangedInterface *a_node)
Register the given class node to receive notifications about its top context changes.
Definition: classmodelnodescontroller.cpp:52
bool getIcon(QIcon &a_resultIcon) override
fill a_resultIcon with a display icon for the node.
Definition: classmodelnode.cpp:348
virtual KDevelop::Declaration * declaration()
Return the associated declaration.
Definition: classmodelnode.cpp:52
ClassNode(KDevelop::Declaration *a_decl, NodesModelInterface *a_model)
Definition: classmodelnode.cpp:121
bool isNull() const
virtual void nodesLayoutAboutToBeChanged(ClassModelNodes::Node *a_parent)=0
void collapse() override
Called by the model to collapse the node and remove sub-items if needed.
Definition: classmodelnode.cpp:513
virtual void nodesRemoved(ClassModelNodes::Node *a_parent)=0
virtual void nodeCleared()
Called after the nodes have been removed.
Definition: classmodelnode.h:148
QIcon fromTheme(const QString &name, const QIcon &fallback)
virtual void nodesLayoutChanged(ClassModelNodes::Node *a_parent)=0
iterator insert(const Key &key, const T &value)
virtual void nodesAboutToBeRemoved(ClassModelNodes::Node *a_parent, int a_first, int a_last)=0
Provides display for a single class variable.
Definition: classmodelnode.h:267
ClassNode * findSubClass(const KDevelop::IndexedQualifiedIdentifier &a_id)
Lookup a contained class and return the related node.
Definition: classmodelnode.cpp:255
iterator find(const Key &key)
iterator begin()
void removeNode(Node *a_child)
Remove child node from the list and delete it.
Definition: classmodelnode.cpp:444
Node(const QString &a_displayName, NodesModelInterface *a_model)
Definition: classmodelnode.cpp:411
Special folder - the parent is assumed to be a ClassNode.
Definition: classmodelnode.h:328
int remove(const Key &key)
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Dec 9 2019 02:47:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Dec 9 2019 02:47:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.