QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
Base class for nodes representing a QgsHistoryEntry. More...
#include <qgshistoryentrynode.h>
Public Member Functions | |
QgsHistoryEntryNode ()=default | |
QgsHistoryEntryNode (const QgsHistoryEntryNode &other)=delete | |
virtual | ~QgsHistoryEntryNode () |
virtual int | childCount () const |
Returns the number of child nodes owned by this node. | |
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. | |
QgsHistoryEntryNode & | operator= (const QgsHistoryEntryNode &other)=delete |
QgsHistoryEntryGroup * | parent () |
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. | |
Friends | |
class | QgsHistoryEntryGroup |
Base class for nodes representing a QgsHistoryEntry.
Definition at line 39 of file qgshistoryentrynode.h.
|
default |
|
virtualdefault |
|
delete |
|
virtual |
Returns the number of child nodes owned by this node.
Reimplemented in QgsHistoryEntryGroup.
Definition at line 24 of file qgshistoryentrynode.cpp.
|
virtual |
Returns a new widget which should be shown to users when selecting the node.
If a nullptr
is returned, the node's html() method will be called instead to create the node's content.
Definition at line 34 of file qgshistoryentrynode.cpp.
|
pure virtual |
Returns the node's data for the specified model role.
|
virtual |
Called when the node is double-clicked.
The default implementation does nothing.
Returns true
if the node handled the double-click event and it should not be further processed.
Definition at line 39 of file qgshistoryentrynode.cpp.
|
virtual |
Returns a HTML formatted text string which should be shown to a user when selecting the node.
Subclasses should implement this method or createWidget(), but not both.
Definition at line 29 of file qgshistoryentrynode.cpp.
|
virtual |
Returns true if the node matches the specified searchString, and should be shown in filtered results with that search string.
The default implementation returns true
if the string is contained within the node's DisplayRole.
Definition at line 49 of file qgshistoryentrynode.cpp.
|
delete |
|
inline |
Returns the node's parent node.
If parent is nullptr
, the node is a root node.
Definition at line 54 of file qgshistoryentrynode.h.
|
virtual |
Allows the node to populate a context menu before display to the user.
Actions should be parented to the specified menu.
Definition at line 44 of file qgshistoryentrynode.cpp.
|
friend |
Definition at line 117 of file qgshistoryentrynode.h.