QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
QgsHistoryEntryGroup Class Reference

Base class for history entry "group" nodes, which contain children of their own. More...

#include <qgshistoryentrynode.h>

Inheritance diagram for QgsHistoryEntryGroup:
Inheritance graph
[legend]

Public Member Functions

 QgsHistoryEntryGroup ()=default
 
 QgsHistoryEntryGroup (const QgsHistoryEntryGroup &other)=delete
 
 ~QgsHistoryEntryGroup () override
 
void addChild (QgsHistoryEntryNode *child)
 Adds a child node to this node.
 
QgsHistoryEntryNodechildAt (int index)
 Returns the child at the specified index.
 
int childCount () const FINAL
 Returns the number of child nodes owned by this node.
 
void clear ()
 Clears the group, removing all its children.
 
int indexOf (QgsHistoryEntryNode *child) const
 Returns the index of the specified child node.
 
void insertChild (int index, QgsHistoryEntryNode *child)
 Inserts a child node at the specified index.
 
QgsHistoryEntryGroupoperator= (const QgsHistoryEntryGroup &other)=delete
 
void removeChildAt (int index)
 Removes the child at the specified index.
 
- Public Member Functions inherited from QgsHistoryEntryNode
 QgsHistoryEntryNode ()=default
 
 QgsHistoryEntryNode (const QgsHistoryEntryNode &other)=delete
 
virtual ~QgsHistoryEntryNode ()
 
virtual QWidget * createWidget (const QgsHistoryWidgetContext &context)
 Returns a new widget which should be shown to users when selecting the node.
 
virtual QVariant data (int role=Qt::DisplayRole) const =0
 Returns the node's data for the specified model role.
 
virtual bool doubleClicked (const QgsHistoryWidgetContext &context)
 Called when the node is double-clicked.
 
virtual QString html (const QgsHistoryWidgetContext &context) const
 Returns a HTML formatted text string which should be shown to a user when selecting the node.
 
virtual bool matchesString (const QString &searchString) const
 Returns true if the node matches the specified searchString, and should be shown in filtered results with that search string.
 
QgsHistoryEntryNodeoperator= (const QgsHistoryEntryNode &other)=delete
 
QgsHistoryEntryGroupparent ()
 Returns the node's parent node.
 
virtual void populateContextMenu (QMenu *menu, const QgsHistoryWidgetContext &context)
 Allows the node to populate a context menu before display to the user.
 

Protected Attributes

std::deque< std::unique_ptr< QgsHistoryEntryNode > > mChildren
 

Detailed Description

Base class for history entry "group" nodes, which contain children of their own.

Since
QGIS 3.32

Definition at line 126 of file qgshistoryentrynode.h.

Constructor & Destructor Documentation

◆ QgsHistoryEntryGroup() [1/2]

QgsHistoryEntryGroup::QgsHistoryEntryGroup ( )
default

◆ ~QgsHistoryEntryGroup()

QgsHistoryEntryGroup::~QgsHistoryEntryGroup ( )
overridedefault

◆ QgsHistoryEntryGroup() [2/2]

QgsHistoryEntryGroup::QgsHistoryEntryGroup ( const QgsHistoryEntryGroup other)
delete

Member Function Documentation

◆ addChild()

void QgsHistoryEntryGroup::addChild ( QgsHistoryEntryNode child)

Adds a child node to this node.

Ownership is transferred to the group.

Definition at line 63 of file qgshistoryentrynode.cpp.

◆ childAt()

QgsHistoryEntryNode * QgsHistoryEntryGroup::childAt ( int  index)

Returns the child at the specified index.

Definition at line 98 of file qgshistoryentrynode.cpp.

◆ childCount()

int QgsHistoryEntryGroup::childCount ( ) const
virtual

Returns the number of child nodes owned by this node.

Reimplemented from QgsHistoryEntryNode.

Definition at line 119 of file qgshistoryentrynode.cpp.

◆ clear()

void QgsHistoryEntryGroup::clear ( )

Clears the group, removing all its children.

Definition at line 114 of file qgshistoryentrynode.cpp.

◆ indexOf()

int QgsHistoryEntryGroup::indexOf ( QgsHistoryEntryNode child) const

Returns the index of the specified child node.

Warning
child must be a valid child of this node.

Definition at line 85 of file qgshistoryentrynode.cpp.

◆ insertChild()

void QgsHistoryEntryGroup::insertChild ( int  index,
QgsHistoryEntryNode child 
)

Inserts a child node at the specified index.

Ownership is transferred to the group.

Definition at line 74 of file qgshistoryentrynode.cpp.

◆ operator=()

QgsHistoryEntryGroup & QgsHistoryEntryGroup::operator= ( const QgsHistoryEntryGroup other)
delete

◆ removeChildAt()

void QgsHistoryEntryGroup::removeChildAt ( int  index)

Removes the child at the specified index.

Definition at line 106 of file qgshistoryentrynode.cpp.

Member Data Documentation

◆ mChildren

std::deque<std::unique_ptr<QgsHistoryEntryNode> > QgsHistoryEntryGroup::mChildren
protected

Definition at line 174 of file qgshistoryentrynode.h.


The documentation for this class was generated from the following files: