Référence de la classe KoPictureKey

Structure describing a picture on disk. Plus de détails...

#include <KoPictureKey.h>

Liste de tous les membres

Fonctions membres publiques

 KoPictureKey ()
 KoPictureKey (const QString &fn, const QDateTime &mod)
 Constructs a key, from a filename and a modification date.
 KoPictureKey (const QString &fn)
 KoPictureKey (const KoPictureKey &key)
KoPictureKeyoperator= (const KoPictureKey &key)
bool operator== (const KoPictureKey &key) const
bool operator< (const KoPictureKey &key) const
QString toString () const
void saveAttributes (QDomElement &elem) const
void loadAttributes (const QDomElement &elem)
QString filename () const
QDateTime lastModified () const
void setKeyFromFile (const QString &filename)

Attributs protégés

QString m_filename
QDateTime m_lastModified


Description détaillée

Structure describing a picture on disk.

KoPictureKey is the structure describing a picture in a unique way. It currently includes the original path to the picture and the modification date.

Note:
We use the *nix epoch (1970-01-01) as a time base because it is a valid date. That way we do not depend on a behaviour of the current QDateTime that might change in future versions of Qt and we are also nice to non-Qt programs wanting to read KOffice's files.

This behaviour is also needed for re-saving KWord files having <FORMAT id="2">. When saving again, these files get a <KEY> element as child of <PIXMAPS> but not one as child of <FORMAT> and <IMAGE>. Therefore we need to be careful that the key remains compatible to default values (another good reason for the *NIX epoch)

In case of a remote path, the "original path" is the name of the temporary file that was used to download the file.

Définition à la ligne 75 du fichier KoPictureKey.h.


Documentation des contructeurs et destructeur

KoPictureKey::KoPictureKey (  ) 

Default constructor. Creates a null key

Définition à la ligne 38 du fichier KoPictureKey.cpp.

Références m_lastModified, et resetDateTimeToEpoch().

Voici le graphe d'appel pour cette fonction :

KoPictureKey::KoPictureKey ( const QString &  fn,
const QDateTime &  mod 
)

Constructs a key, from a filename and a modification date.

Storing the modification date as part of the key allows the user to update the file and import it into the application again, without the application reusing the old copy from the collection.

Définition à la ligne 43 du fichier KoPictureKey.cpp.

Références m_lastModified, et resetDateTimeToEpoch().

Voici le graphe d'appel pour cette fonction :

KoPictureKey::KoPictureKey ( const QString &  fn  ) 

Constructs a key from a filename

Note:
The modification date is set to 1970-01-01

Définition à la ligne 53 du fichier KoPictureKey.cpp.

Références m_lastModified, et resetDateTimeToEpoch().

Voici le graphe d'appel pour cette fonction :

KoPictureKey::KoPictureKey ( const KoPictureKey key  ) 

Copy constructor

Définition à la ligne 59 du fichier KoPictureKey.cpp.


Documentation des fonctions membres

KoPictureKey & KoPictureKey::operator= ( const KoPictureKey key  ) 

Assignment operator

Définition à la ligne 64 du fichier KoPictureKey.cpp.

Références m_filename, et m_lastModified.

bool KoPictureKey::operator== ( const KoPictureKey key  )  const

Comparison operator

Définition à la ligne 71 du fichier KoPictureKey.cpp.

Références m_filename, et m_lastModified.

bool KoPictureKey::operator< ( const KoPictureKey key  )  const

Comparison operator

Note:
Used for sorting in the collection's map

Définition à la ligne 77 du fichier KoPictureKey.cpp.

Références toString().

Voici le graphe d'appel pour cette fonction :

QString KoPictureKey::toString (  )  const

Convert this key into a string representation of it

Définition à la ligne 139 du fichier KoPictureKey.cpp.

Références m_filename, et m_lastModified.

Référencé par KoPictureCollection::findPicture(), KoPictureCollection::getOasisFileName(), KoPictureCollection::insertPicture(), loadAttributes(), et operator<().

Voici le graphe d'appel pour cette fonction :

void KoPictureKey::saveAttributes ( QDomElement &  elem  )  const

Save this key in XML (as KOffice 1.3)

Définition à la ligne 82 du fichier KoPictureKey.cpp.

Références m_filename, et m_lastModified.

void KoPictureKey::loadAttributes ( const QDomElement &  elem  ) 

Load this key from XML (as KOffice 1.3)

Définition à la ligne 96 du fichier KoPictureKey.cpp.

Références m_filename, m_lastModified, resetDateTimeToEpoch(), et toString().

Voici le graphe d'appel pour cette fonction :

QString KoPictureKey::filename (  )  const [inline]

First part of the key: the filename

Définition à la ligne 137 du fichier KoPictureKey.h.

QDateTime KoPictureKey::lastModified (  )  const [inline]

Second part of the key: the modification date

Définition à la ligne 142 du fichier KoPictureKey.h.

void KoPictureKey::setKeyFromFile ( const QString &  filename  ) 

Sets the key according to filename, including modification time

Définition à la ligne 146 du fichier KoPictureKey.cpp.

Références m_filename, et m_lastModified.

Référencé par KoPictureCollection::loadPicture(), et KoPicture::setKeyAndDownloadPicture().

Voici le graphe d'appel pour cette fonction :


Documentation des données membres

QString KoPictureKey::m_filename [protected]

Définition à la ligne 150 du fichier KoPictureKey.h.

Référencé par loadAttributes(), operator=(), operator==(), saveAttributes(), setKeyFromFile(), et toString().

QDateTime KoPictureKey::m_lastModified [protected]

Définition à la ligne 151 du fichier KoPictureKey.h.

Référencé par KoPictureKey(), loadAttributes(), operator=(), operator==(), saveAttributes(), setKeyFromFile(), et toString().


La documentation de cette classe a été générée à partir des fichiers suivants :
Généré le Wed Nov 22 23:48:15 2006 pour KPlato par  doxygen 1.5.1-p1