QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgshistoryprovider.h
Go to the documentation of this file.
1/***************************************************************************
2 qgshistoryprovider.h
3 --------------------------
4 begin : April 2019
5 copyright : (C) 2019 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSHISTORYPROVIDER_H
17#define QGSHISTORYPROVIDER_H
18
19#include "qgis_gui.h"
20#include "qgis_sip.h"
21
22#include <QString>
23#include <QVariantMap>
24
26class QgsHistoryEntry;
28
37class GUI_EXPORT QgsAbstractHistoryProvider : public QObject
38{
39 Q_OBJECT
40
41 public:
42#ifdef SIP_RUN
44 if ( qobject_cast<QgsProcessingHistoryProvider *>( sipCpp ) )
45 sipType = sipType_QgsProcessingHistoryProvider;
46 else
47 sipType = nullptr;
49#endif
50
52
56 virtual QString id() const = 0;
57
64
70 virtual void updateNodeForEntry( QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context );
71};
72
73#endif //QGSHISTORYPROVIDER_H
Abstract base class for objects which track user history (i.e.
virtual QString id() const =0
Returns the provider's unique id, which is used to associate existing history entries with the provid...
~QgsAbstractHistoryProvider() override
virtual void updateNodeForEntry(QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context)
Updates an existing history node for the given entry.
virtual QgsHistoryEntryNode * createNodeForEntry(const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context)
Creates a new history node for the given entry.
Base class for nodes representing a QgsHistoryEntry.
Encapsulates a history entry.
Contains settings which reflect the context in which a history widget is shown, e....
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:199
#define SIP_FACTORY
Definition qgis_sip.h:84
#define SIP_END
Definition qgis_sip.h:216