SourceType.h header
#include <ew/core/SourceType.h>
Namespace ew::core
Enumerations
enum class SourceType { Book, BookChapter, JournalArticle, MagazineArticle, NewspaperArticle, Website, Report, Thesis, ConferencePaper, Manuscript, Other }
The bibliographic kind of a Source – an axis on the Source content type that selects which fields are meaningful and how a citation is formatted (a book cites its publisher, a journal article its container and volume, a webpage its URL and access date). New kinds are additive. Serialized as a stable lowercase token; the tokens follow CSL (Citation Style Language) type names so import/export to CSL-JSON stays a straight mapping.
Functions
std::optional< SourceType > ew::core::sourceTypeFromToken(QStringView token)
Parses a source type from its serialization token; std::nullopt if unrecognized.
QString ew::core::sourceTypeLabel(SourceType type)
A human-readable label for type, for pickers and menus (e.g. "Journal Article").
QString ew::core::toToken(SourceType type)
Returns the stable serialization token for type (e.g. "article-journal").