QGIS API Documentation 3.41.0-Master (af5edcb665c)
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#ifdef SIP_RUN
43 if ( qobject_cast<QgsProcessingHistoryProvider *>( sipCpp ) )
44 sipType = sipType_QgsProcessingHistoryProvider;
45 else
46 sipType = nullptr;
48#endif
49
51
55 virtual QString id() const = 0;
56
62 virtual QgsHistoryEntryNode *createNodeForEntry( const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context ) SIP_FACTORY;
63
69 virtual void updateNodeForEntry( QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context );
70};
71
72#endif //QGSHISTORYPROVIDER_H
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