lib Library API Documentation

KoPictureKey Class Reference

KoPictureKey is the structure describing an image in a unique way. Structure describing an image on disk. More...

#include <koPictureKey.h>

List of all members.

Public Member Functions

 KoPictureKey ()
 KoPictureKey (const QString &fn, const QDateTime &mod)
 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)

Protected Attributes

QString m_filename
QDateTime m_lastModified


Detailed Description

KoPictureKey is the structure describing an image in a unique way. Structure describing an image on disk.

It currently includes the original path to the image and the modification date.

Definition at line 55 of file koPictureKey.h.


Constructor & Destructor Documentation

KoPictureKey::KoPictureKey  ) 
 

Default constructor.

Creates a null key

Definition at line 49 of file koPictureKey.cc.

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.

Definition at line 54 of file koPictureKey.cc.

KoPictureKey::KoPictureKey const QString fn  ) 
 

Constructs a key, from a filename (without modification date).

Definition at line 64 of file koPictureKey.cc.

KoPictureKey::KoPictureKey const KoPictureKey key  ) 
 

Copy constructor.

Definition at line 70 of file koPictureKey.cc.


Member Function Documentation

KoPictureKey & KoPictureKey::operator= const KoPictureKey key  ) 
 

Assignment operator.

Definition at line 75 of file koPictureKey.cc.

References m_filename, m_lastModified, and operator=().

Referenced by operator=().

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

Comparison operator.

Definition at line 82 of file koPictureKey.cc.

References m_filename, m_lastModified, and operator==().

Referenced by operator==().

bool KoPictureKey::operator< const KoPictureKey key  )  const
 

Comparison operator - used for sorting in the collection's map.

Definition at line 88 of file koPictureKey.cc.

References operator<(), and toString().

Referenced by operator<().

QString KoPictureKey::toString  )  const
 

Convert this key into a string representation of it.

Definition at line 150 of file koPictureKey.cc.

Referenced by KoPictureCollection::findPicture(), KoPictureCollection::insertPicture(), loadAttributes(), and operator<().

void KoPictureKey::saveAttributes QDomElement elem  )  const
 

Save this key in XML.

Definition at line 93 of file koPictureKey.cc.

References saveAttributes().

Referenced by saveAttributes().

void KoPictureKey::loadAttributes const QDomElement elem  ) 
 

Load this key from XML.

Definition at line 107 of file koPictureKey.cc.

References loadAttributes(), and toString().

Referenced by loadAttributes(), and KoPictureCollection::readXML().

QString KoPictureKey::filename  )  const [inline]
 

First part of the key: the filename.

Definition at line 114 of file koPictureKey.h.

QDateTime KoPictureKey::lastModified  )  const [inline]
 

Second part of the key: the modification date.

Definition at line 119 of file koPictureKey.h.

void KoPictureKey::setKeyFromFile const QString filename  ) 
 

Sets the key according to filename modification time.

Definition at line 158 of file koPictureKey.cc.

References setKeyFromFile().

Referenced by KoPictureCollection::loadPicture(), KoPicture::setKeyAndDownloadPicture(), and setKeyFromFile().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Nov 17 06:54:22 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003