QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
qgsacademicreference.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsacademicreference.h
3
-----------------
4
begin : August 2026
5
copyright : (C) 2026 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSACADEMICREFERENCE_H
19
#define QGSACADEMICREFERENCE_H
20
21
#include "
qgis.h
"
22
#include "qgis_core.h"
23
30
class
CORE_EXPORT
QgsAcademicReference
31
{
32
public
:
36
QgsAcademicReference
() =
default
;
37
41
bool
isValid
()
const
{
return
mType !=
Qgis::AcademicReferenceType::Unknown
; }
42
51
static
QgsAcademicReference
createBook(
const
QStringList &authors,
int
year,
const
QString &title,
const
QString &publisher );
52
64
static
QgsAcademicReference
createJournalArticle(
65
const
QStringList &authors,
int
year,
const
QString &title,
const
QString &journal,
const
QString &volume = QString(),
const
QString &issue = QString(),
const
QString &pages = QString()
66
);
67
78
static
QgsAcademicReference
createPresentation(
79
const
QStringList &authors,
int
year,
const
QString &title,
const
QString &meeting,
const
QString &publisher = QString(),
const
QString &pages = QString()
80
);
81
90
static
QgsAcademicReference
createWebPage(
const
QStringList &authors,
int
year,
const
QString &title,
const
QString &url );
91
101
static
QgsAcademicReference
createPreprint(
const
QStringList &authors,
int
year,
const
QString &title,
const
QString &repository,
const
QString &url );
102
108
Qgis::AcademicReferenceType
type()
const
;
109
115
void
setType(
Qgis::AcademicReferenceType
type );
116
122
QStringList authors()
const
;
123
131
void
setAuthors(
const
QStringList &authors );
132
138
int
year()
const
;
139
145
void
setYear(
int
year );
146
152
QString title()
const
;
153
159
void
setTitle(
const
QString &title );
160
166
QString journal()
const
;
167
173
void
setJournal(
const
QString &journal );
174
180
QString volume()
const
;
181
187
void
setVolume(
const
QString &volume );
188
194
QString issue()
const
;
195
201
void
setIssue(
const
QString &issue );
202
208
QString pages()
const
;
209
215
void
setPages(
const
QString &pages );
216
222
QString publisher()
const
;
223
229
void
setPublisher(
const
QString &publisher );
230
236
QString url()
const
;
237
243
void
setUrl(
const
QString &url );
244
248
QString asPlainText()
const
;
249
253
QString asHtml()
const
;
254
255
private
:
256
QString formatted(
bool
asHtml )
const
;
257
258
Qgis::AcademicReferenceType
mType =
Qgis::AcademicReferenceType::Unknown
;
259
QStringList mAuthors;
260
int
mYear = 0;
261
QString mTitle;
262
QString mJournal;
263
QString mVolume;
264
QString mIssue;
265
QString mPages;
266
QString mPublisher;
267
QString mUrl;
268
};
269
270
#endif
//QGSACADEMICREFERENCE_H
Qgis::AcademicReferenceType
AcademicReferenceType
Type of academic reference.
Definition
qgis.h:5246
Qgis::AcademicReferenceType::Unknown
@ Unknown
Unknown or generic reference.
Definition
qgis.h:5247
QgsAcademicReference
Encapsulates an academic reference and formats it according to style guidelines.
Definition
qgsacademicreference.h:31
QgsAcademicReference::QgsAcademicReference
QgsAcademicReference()=default
Constructor for an invalid QgsAcademicReference.
QgsAcademicReference::isValid
bool isValid() const
Returns false if this is a default constructed, invalid reference.
Definition
qgsacademicreference.h:41
qgis.h
Generated on
for QGIS API Documentation by
1.17.0