Okular::DocumentInfo
#include <document.h>
Public Types | |
enum | Key { Title, Subject, Description, Author, Creator, Producer, Copyright, Pages, CreationDate, ModificationDate, MimeType, Category, Keywords, FilePath, DocumentSize, PagesSize, CustomKeys, Invalid } |
Public Member Functions | |
DocumentInfo () | |
DocumentInfo (const DocumentInfo &info) | |
QString | get (const QString &key) const |
QString | get (Key key) const |
QString | getKeyTitle (const QString &key) const |
QStringList | keys () const |
DocumentInfo & | operator= (const DocumentInfo &) |
void | set (const QString &key, const QString &value, const QString &title=QString()) |
void | set (Key key, const QString &value) |
Static Public Member Functions | |
static Key | getKeyFromString (const QString &key) |
static QString | getKeyString (Key key) |
static QString | getKeyTitle (Key key) |
Detailed Description
The DocumentInfo structure can be filled in by generators to display metadata about the currently opened file.
Definition at line 74 of file document.h.
Member Enumeration Documentation
◆ Key
The list of predefined keys.
Enumerator | |
---|---|
Title | The title of the document. |
Subject | The subject of the document. |
Description | The description of the document. |
Author | The author of the document. |
Creator | The creator of the document (this can be different from the author) |
Producer | The producer of the document (e.g. some software) |
Copyright | The copyright of the document. |
Pages | The number of pages of the document. |
CreationDate | The date of creation of the document. |
ModificationDate | The date of last modification of the document. |
MimeType | The mime type of the document. |
Category | The category of the document. |
Keywords | The keywords which describe the content of the document. |
FilePath | The path of the file.
|
DocumentSize | The size of the document.
|
PagesSize | The size of the pages (if all pages have the same size)
|
CustomKeys | All the custom keys the generator supports.
|
Invalid | An invalid key.
|
Definition at line 82 of file document.h.
Constructor & Destructor Documentation
◆ DocumentInfo()
DocumentInfo::DocumentInfo | ( | ) |
Member Function Documentation
◆ get() [1/2]
Returns the value for a given key or an null string when the key doesn't exist.
Definition at line 5732 of file document.cpp.
◆ get() [2/2]
Returns the value for a given key or an null string when the key doesn't exist.
Definition at line 5727 of file document.cpp.
◆ getKeyFromString()
|
static |
◆ getKeyString()
Returns the internal string for the given key.
- Since
- 0.10 (KDE 4.4)
Definition at line 5737 of file document.cpp.
◆ getKeyTitle() [1/2]
Returns the user visible string for the given key Takes into account keys added by the set() that takes a QString.
- Since
- 0.21
Definition at line 5891 of file document.cpp.
◆ getKeyTitle() [2/2]
Returns the user visible string for the given key.
- Since
- 0.10 (KDE 4.4)
Definition at line 5834 of file document.cpp.
◆ keys()
QStringList DocumentInfo::keys | ( | ) | const |
Returns all the keys present in this DocumentInfo.
- Since
- 0.21
Definition at line 5722 of file document.cpp.
◆ set() [1/2]
void DocumentInfo::set | ( | const QString & | key, |
const QString & | value, | ||
const QString & | title = QString() |
||
) |
Sets a value for a custom key.
The title should be an i18n'ed string, since it's used in the document information dialog.
Definition at line 5711 of file document.cpp.
◆ set() [2/2]
Sets a value for a special key.
The title should be an i18n'ed string, since it's used in the document information dialog.
Definition at line 5717 of file document.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:08:33 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.