Okular::DocumentInfo

Search for usage in LXR

#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
 
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 75 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.

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 83 of file document.h.

Constructor & Destructor Documentation

◆ DocumentInfo() [1/2]

DocumentInfo::DocumentInfo ( )

Creates a new document info.

DocumentInfo.

Definition at line 5905 of file document.cpp.

◆ DocumentInfo() [2/2]

DocumentInfo::DocumentInfo ( const DocumentInfo & info)

Definition at line 5910 of file document.cpp.

◆ ~DocumentInfo()

DocumentInfo::~DocumentInfo ( )

Definition at line 5925 of file document.cpp.

Member Function Documentation

◆ get() [1/2]

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

◆ get() [2/2]

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

◆ getKeyFromString()

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

Returns the Key from a string key.

Since
0.21

Definition at line 6014 of file document.cpp.

◆ getKeyString()

QString DocumentInfo::getKeyString ( Key key)
static

Returns the internal string for the given key.

Since
0.10 (KDE 4.4)

Definition at line 5956 of file document.cpp.

◆ getKeyTitle() [1/2]

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

◆ getKeyTitle() [2/2]

QString DocumentInfo::getKeyTitle ( Key key)
static

Returns the user visible string for the given key.

Since
0.10 (KDE 4.4)

Definition at line 6053 of file document.cpp.

◆ keys()

QStringList DocumentInfo::keys ( ) const

Returns all the keys present in this DocumentInfo.

Since
0.21

Definition at line 5941 of file document.cpp.

◆ operator=()

DocumentInfo & DocumentInfo::operator= ( const DocumentInfo & info)

Definition at line 5916 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 5930 of file document.cpp.

◆ set() [2/2]

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 5936 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-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:08:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.