QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
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#include <QString>
22#include <QVariantMap>
23
25class QgsHistoryEntry;
27
36class GUI_EXPORT QgsAbstractHistoryProvider : public QObject
37{
38 Q_OBJECT
39
40 public:
41
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
63 virtual QgsHistoryEntryNode *createNodeForEntry( const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context ) SIP_FACTORY;
64
70 virtual void updateNodeForEntry( QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context );
71
72};
73
74#endif //QGSHISTORYPROVIDER_H
75
76
77
Abstract base class for objects which track user history (i.e.
virtual ~QgsAbstractHistoryProvider()
virtual QString id() const =0
Returns the provider's unique id, which is used to associate existing history entries with the provid...
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:191
#define SIP_FACTORY
Definition qgis_sip.h:76
#define SIP_END
Definition qgis_sip.h:208