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 (Key key) const
 
QString get (const QString &key) const
 
QString getKeyTitle (const QString &key) const
 
QStringList keys () const
 
DocumentInfooperator= (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

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.

Since
0.10 (KDE 4.4)
DocumentSize 

The size of the document.

Since
0.10 (KDE 4.4)
PagesSize 

The size of the pages (if all pages have the same size)

Since
0.10 (KDE 4.4)
CustomKeys 

All the custom keys the generator supports.

Since
0.21
Invalid 

An invalid key.

Since
0.21. It will always be the last element in the enum

Definition at line 82 of file document.h.

Constructor & Destructor Documentation

DocumentInfo::DocumentInfo ( )

Creates a new document info.

DocumentInfo.

Definition at line 5728 of file document.cpp.

Member Function Documentation

QString DocumentInfo::get ( Key  key) const

Returns the value for a given key or an null string when the key doesn't exist.

Definition at line 5767 of file document.cpp.

QString DocumentInfo::get ( const QString key) const

Returns the value for a given key or an null string when the key doesn't exist.

Definition at line 5772 of file document.cpp.

DocumentInfo::Key DocumentInfo::getKeyFromString ( const QString key)
static

Returns the Key from a string key.

Since
0.21

Definition at line 5835 of file document.cpp.

QString DocumentInfo::getKeyString ( Key  key)
static

Returns the internal string for the given key.

Since
0.10 (KDE 4.4)

Definition at line 5777 of file document.cpp.

QString DocumentInfo::getKeyTitle ( const QString key) const

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 5913 of file document.cpp.

QString DocumentInfo::getKeyTitle ( Key  key)
static

Returns the user visible string for the given key.

Since
0.10 (KDE 4.4)

Definition at line 5856 of file document.cpp.

QStringList DocumentInfo::keys ( ) const

Returns all the keys present in this DocumentInfo.

Since
0.21

Definition at line 5762 of file document.cpp.

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 5751 of file document.cpp.

void DocumentInfo::set ( Key  key,
const QString value 
)

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 5757 of file document.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue May 26 2020 22:49:04 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.