QGIS API Documentation 4.3.0-Master (d57cc4a041c)
Loading...
Searching...
No Matches
QgsAcademicReference Class Reference

Encapsulates an academic reference and formats it according to style guidelines. More...

#include <qgsacademicreference.h>

Public Member Functions

 QgsAcademicReference ()=default
 Constructor for an invalid QgsAcademicReference.
QString asHtml () const
 Returns a HTML formatted representation of the reference (in APA style).
QString asPlainText () const
 Returns a plain text representation of the reference (in APA style).
QStringList authors () const
 Returns the authors of the reference.
QString issue () const
 Returns the issue number.
bool isValid () const
 Returns false if this is a default constructed, invalid reference.
QString journal () const
 Returns the journal title.
QString pages () const
 Returns the page numbers.
QString publisher () const
 Returns the publisher name.
void setAuthors (const QStringList &authors)
 Sets the authors of the reference.
void setIssue (const QString &issue)
 Sets the issue number.
void setJournal (const QString &journal)
 Sets the journal title.
void setPages (const QString &pages)
 Sets the page numbers.
void setPublisher (const QString &publisher)
 Sets the publisher name.
void setTitle (const QString &title)
 Sets the title of the work.
void setType (Qgis::AcademicReferenceType type)
 Sets the reference type.
void setUrl (const QString &url)
 Sets the url.
void setVolume (const QString &volume)
 Sets the volume identifier.
void setYear (int year)
 Sets the publication year.
QString title () const
 Returns the title of the work.
Qgis::AcademicReferenceType type () const
 Returns the reference type.
QString url () const
 Returns the URL.
QString volume () const
 Returns the volume identifier.
int year () const
 Returns the publication year.

Static Public Member Functions

static QgsAcademicReference createBook (const QStringList &authors, int year, const QString &title, const QString &publisher)
 Creates a book reference.
static QgsAcademicReference createJournalArticle (const QStringList &authors, int year, const QString &title, const QString &journal, const QString &volume=QString(), const QString &issue=QString(), const QString &pages=QString())
 Creates a journal article reference.
static QgsAcademicReference createPreprint (const QStringList &authors, int year, const QString &title, const QString &repository, const QString &url)
 Creates a preprint reference.
static QgsAcademicReference createPresentation (const QStringList &authors, int year, const QString &title, const QString &meeting, const QString &publisher=QString(), const QString &pages=QString())
 Creates a conference paper or presentation reference.
static QgsAcademicReference createWebPage (const QStringList &authors, int year, const QString &title, const QString &url)
 Creates a web page or online resource reference.

Detailed Description

Encapsulates an academic reference and formats it according to style guidelines.

Since
QGIS 4.4

Definition at line 30 of file qgsacademicreference.h.

Constructor & Destructor Documentation

◆ QgsAcademicReference()

QgsAcademicReference::QgsAcademicReference ( )
default

Constructor for an invalid QgsAcademicReference.

Member Function Documentation

◆ asHtml()

QString QgsAcademicReference::asHtml ( ) const

Returns a HTML formatted representation of the reference (in APA style).

Definition at line 192 of file qgsacademicreference.cpp.

◆ asPlainText()

QString QgsAcademicReference::asPlainText ( ) const

Returns a plain text representation of the reference (in APA style).

Definition at line 187 of file qgsacademicreference.cpp.

◆ authors()

QStringList QgsAcademicReference::authors ( ) const

Returns the authors of the reference.

See also
setAuthors()

Definition at line 97 of file qgsacademicreference.cpp.

◆ createBook()

QgsAcademicReference QgsAcademicReference::createBook ( const QStringList & authors,
int year,
const QString & title,
const QString & publisher )
static

Creates a book reference.

Parameters
authorslist of authors
yearpublication year
titlebook title
publisherpublisher name

Definition at line 24 of file qgsacademicreference.cpp.

◆ createJournalArticle()

QgsAcademicReference QgsAcademicReference::createJournalArticle ( const QStringList & authors,
int year,
const QString & title,
const QString & journal,
const QString & volume = QString(),
const QString & issue = QString(),
const QString & pages = QString() )
static

Creates a journal article reference.

Parameters
authorslist of authors
yearpublication year
titlearticle title
journaljournal name
volumevolume identifier
issueissue identifier
pagespage range or number

Definition at line 35 of file qgsacademicreference.cpp.

◆ createPreprint()

QgsAcademicReference QgsAcademicReference::createPreprint ( const QStringList & authors,
int year,
const QString & title,
const QString & repository,
const QString & url )
static

Creates a preprint reference.

Parameters
authorslist of authors
yearpublication year
titlepaper title
repositoryrepository or archive name
urlrepository target address

Definition at line 75 of file qgsacademicreference.cpp.

◆ createPresentation()

QgsAcademicReference QgsAcademicReference::createPresentation ( const QStringList & authors,
int year,
const QString & title,
const QString & meeting,
const QString & publisher = QString(),
const QString & pages = QString() )
static

Creates a conference paper or presentation reference.

Parameters
authorslist of authors
yearpresentation year
titlepaper title
meetingconference or meeting title
publisherpublisher name
pagespage range or number

Definition at line 51 of file qgsacademicreference.cpp.

◆ createWebPage()

QgsAcademicReference QgsAcademicReference::createWebPage ( const QStringList & authors,
int year,
const QString & title,
const QString & url )
static

Creates a web page or online resource reference.

Parameters
authorslist of authors
yearpublication or access year
titleweb page title
urltarget address

Definition at line 64 of file qgsacademicreference.cpp.

◆ issue()

QString QgsAcademicReference::issue ( ) const

Returns the issue number.

See also
setIssue()

Definition at line 147 of file qgsacademicreference.cpp.

◆ isValid()

bool QgsAcademicReference::isValid ( ) const
inline

Returns false if this is a default constructed, invalid reference.

Definition at line 41 of file qgsacademicreference.h.

◆ journal()

QString QgsAcademicReference::journal ( ) const

Returns the journal title.

See also
setJournal()

Definition at line 127 of file qgsacademicreference.cpp.

◆ pages()

QString QgsAcademicReference::pages ( ) const

Returns the page numbers.

See also
setPages()

Definition at line 157 of file qgsacademicreference.cpp.

◆ publisher()

QString QgsAcademicReference::publisher ( ) const

Returns the publisher name.

See also
setPublisher()

Definition at line 167 of file qgsacademicreference.cpp.

◆ setAuthors()

void QgsAcademicReference::setAuthors ( const QStringList & authors)

Sets the authors of the reference.

Individual authors should be formatted using surname first, followed by a comma and the author's initials. E.g. "Smith, J. P.".

See also
authors()

Definition at line 102 of file qgsacademicreference.cpp.

◆ setIssue()

void QgsAcademicReference::setIssue ( const QString & issue)

Sets the issue number.

See also
issue()

Definition at line 152 of file qgsacademicreference.cpp.

◆ setJournal()

void QgsAcademicReference::setJournal ( const QString & journal)

Sets the journal title.

See also
journal()

Definition at line 132 of file qgsacademicreference.cpp.

◆ setPages()

void QgsAcademicReference::setPages ( const QString & pages)

Sets the page numbers.

See also
pages()

Definition at line 162 of file qgsacademicreference.cpp.

◆ setPublisher()

void QgsAcademicReference::setPublisher ( const QString & publisher)

Sets the publisher name.

See also
publisher()

Definition at line 172 of file qgsacademicreference.cpp.

◆ setTitle()

void QgsAcademicReference::setTitle ( const QString & title)

Sets the title of the work.

See also
title()

Definition at line 122 of file qgsacademicreference.cpp.

◆ setType()

void QgsAcademicReference::setType ( Qgis::AcademicReferenceType type)

Sets the reference type.

See also
type()

Definition at line 92 of file qgsacademicreference.cpp.

◆ setUrl()

void QgsAcademicReference::setUrl ( const QString & url)

Sets the url.

See also
url()

Definition at line 182 of file qgsacademicreference.cpp.

◆ setVolume()

void QgsAcademicReference::setVolume ( const QString & volume)

Sets the volume identifier.

See also
volume()

Definition at line 142 of file qgsacademicreference.cpp.

◆ setYear()

void QgsAcademicReference::setYear ( int year)

Sets the publication year.

See also
year()

Definition at line 112 of file qgsacademicreference.cpp.

◆ title()

QString QgsAcademicReference::title ( ) const

Returns the title of the work.

See also
setTitle()

Definition at line 117 of file qgsacademicreference.cpp.

◆ type()

Qgis::AcademicReferenceType QgsAcademicReference::type ( ) const

Returns the reference type.

See also
setType()

Definition at line 87 of file qgsacademicreference.cpp.

◆ url()

QString QgsAcademicReference::url ( ) const

Returns the URL.

See also
setUrl()

Definition at line 177 of file qgsacademicreference.cpp.

◆ volume()

QString QgsAcademicReference::volume ( ) const

Returns the volume identifier.

See also
setVolume()

Definition at line 137 of file qgsacademicreference.cpp.

◆ year()

int QgsAcademicReference::year ( ) const

Returns the publication year.

See also
setYear()

Definition at line 107 of file qgsacademicreference.cpp.


The documentation for this class was generated from the following files: