QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
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
 Constructor for QgsHistoryEntryGroup. More...
 
 QgsHistoryEntryGroup (const QgsHistoryEntryGroup &other)=delete
 QgsHistoryEntryGroup cannot be copied. More...
 
 ~QgsHistoryEntryGroup () override
 
void addChild (QgsHistoryEntryNode *child)
 Adds a child node to this node. More...
 
QgsHistoryEntryNodechildAt (int index)
 Returns the child at the specified index. More...
 
int childCount () const FINAL
 Returns the number of child nodes owned by this node. More...
 
void clear ()
 Clears the group, removing all its children. More...
 
int indexOf (QgsHistoryEntryNode *child) const
 Returns the index of the specified child node. More...
 
void insertChild (int index, QgsHistoryEntryNode *child)
 Inserts a child node at the specified index. More...
 
QgsHistoryEntryGroupoperator= (const QgsHistoryEntryGroup &other)=delete
 QgsHistoryEntryGroup cannot be copied. More...
 
void removeChildAt (int index)
 Removes the child at the specified index. More...
 
- Public Member Functions inherited from QgsHistoryEntryNode
 QgsHistoryEntryNode ()=default
 Constructor for QgsHistoryEntryNode. More...
 
 QgsHistoryEntryNode (const QgsHistoryEntryNode &other)=delete
 QgsHistoryEntryNode cannot be copied. More...
 
virtual ~QgsHistoryEntryNode ()
 
virtual int childCount () const
 Returns the number of child nodes owned by this node. More...
 
virtual QWidget * createWidget (const QgsHistoryWidgetContext &context)
 Returns a new widget which should be shown to users when selecting the node. More...
 
virtual QVariant data (int role=Qt::DisplayRole) const =0
 Returns the node's data for the specified model role. More...
 
virtual bool doubleClicked (const QgsHistoryWidgetContext &context)
 Called when the node is double-clicked. More...
 
virtual QString html (const QgsHistoryWidgetContext &context) const
 Returns a HTML formatted text string which should be shown to a user when selecting the node. More...
 
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. More...
 
QgsHistoryEntryNodeoperator= (const QgsHistoryEntryNode &other)=delete
 QgsHistoryEntryNode cannot be copied. More...
 
QgsHistoryEntryGroupparent ()
 Returns the node's parent node. More...
 
virtual void populateContextMenu (QMenu *menu, const QgsHistoryWidgetContext &context)
 Allows the node to populate a context menu before display to the user. More...
 

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 133 of file qgshistoryentrynode.h.

Constructor & Destructor Documentation

◆ QgsHistoryEntryGroup() [1/2]

QgsHistoryEntryGroup::QgsHistoryEntryGroup ( )
default

Constructor for QgsHistoryEntryGroup.

◆ ~QgsHistoryEntryGroup()

QgsHistoryEntryGroup::~QgsHistoryEntryGroup ( )
overridedefault

◆ QgsHistoryEntryGroup() [2/2]

QgsHistoryEntryGroup::QgsHistoryEntryGroup ( const QgsHistoryEntryGroup other)
delete

QgsHistoryEntryGroup cannot be copied.

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 64 of file qgshistoryentrynode.cpp.

◆ childAt()

QgsHistoryEntryNode * QgsHistoryEntryGroup::childAt ( int  index)

Returns the child at the specified index.

Definition at line 100 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 122 of file qgshistoryentrynode.cpp.

◆ clear()

void QgsHistoryEntryGroup::clear ( )

Clears the group, removing all its children.

Definition at line 117 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 86 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 75 of file qgshistoryentrynode.cpp.

◆ operator=()

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

QgsHistoryEntryGroup cannot be copied.

◆ removeChildAt()

void QgsHistoryEntryGroup::removeChildAt ( int  index)

Removes the child at the specified index.

Definition at line 109 of file qgshistoryentrynode.cpp.

Member Data Documentation

◆ mChildren

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

Definition at line 185 of file qgshistoryentrynode.h.


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