QGIS API Documentation
3.99.0-Master (d270888f95f)
Loading...
Searching...
No Matches
src
gui
history
qgshistoryentry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgshistoryentry.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 QGSHISTORYENTRY_H
17
#define QGSHISTORYENTRY_H
18
19
#include "
qgis.h
"
20
#include "qgis_gui.h"
21
#include "
qgis_sip.h
"
22
23
#include <QDateTime>
24
#include <QMap>
25
#include <QString>
26
#include <QVariant>
27
28
using namespace
Qt::StringLiterals;
29
36
class
GUI_EXPORT
QgsHistoryEntry
37
{
38
public
:
42
QgsHistoryEntry
() =
default
;
43
47
explicit
QgsHistoryEntry
(
const
QString &
providerId
,
const
QDateTime &
timestamp
,
const
QVariantMap &
entry
);
48
54
explicit
QgsHistoryEntry
(
const
QVariantMap &
entry
);
55
61
bool
isValid
()
const
;
62
68
long
long
id
= 0;
69
71
QDateTime
timestamp
;
72
74
QString
providerId
;
75
82
QVariantMap
entry
;
83
84
#ifdef SIP_RUN
85
SIP_PYOBJECT __repr__();
86
//%MethodCode
87
const
QString str = u
"<QgsHistoryEntry: %1 %2>"
_s.arg( sipCpp->providerId, sipCpp->timestamp.toString( Qt::ISODate ) );
88
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
89
//%End
90
#endif
91
};
92
93
Q_DECLARE_METATYPE
(
QgsHistoryEntry
);
94
95
#endif
// QGSHISTORYENTRY
QgsHistoryEntry
Encapsulates a history entry.
Definition
qgshistoryentry.h:37
QgsHistoryEntry::isValid
bool isValid() const
Returns true if the entry is valid.
Definition
qgshistoryentry.cpp:32
QgsHistoryEntry::QgsHistoryEntry
QgsHistoryEntry()=default
Constructor for an invalid entry.
QgsHistoryEntry::timestamp
QDateTime timestamp
Entry timestamp.
Definition
qgshistoryentry.h:71
QgsHistoryEntry::providerId
QString providerId
Associated history provider ID.
Definition
qgshistoryentry.h:74
QgsHistoryEntry::entry
QVariantMap entry
Entry details.
Definition
qgshistoryentry.h:82
qgis.h
qgis_sip.h
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsHistoryEntry)
Generated on
for QGIS API Documentation by
1.15.0