kabc Library API Documentation

KABC::Picture Class Reference

Collaboration diagram for KABC::Picture:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Picture ()
 Picture (const QString &url)
 Picture (const QImage &data)
 ~Picture ()
bool operator== (const Picture &) const
bool operator!= (const Picture &) const
void setUrl (const QString &url)
void setData (const QImage &data)
void setType (const QString &type)
bool isIntern () const
QString url () const
QImage data () const
QString type () const
QString asString () const

Friends

KABC_EXPORT QDataStreamoperator<< (QDataStream &, const Picture &)
KABC_EXPORT QDataStreamoperator>> (QDataStream &, Picture &)

Detailed Description

Definition at line 30 of file picture.h.


Constructor & Destructor Documentation

Picture::Picture  ) 
 

Consturctor.

Creates an empty object.

Definition at line 25 of file picture.cpp.

Picture::Picture const QString url  ) 
 

Consturctor.

Parameters:
url A URL that describes the position of the picture file.

Definition at line 30 of file picture.cpp.

Picture::Picture const QImage data  ) 
 

Consturctor.

Parameters:
data The raw data of the picture.

Definition at line 35 of file picture.cpp.

Picture::~Picture  ) 
 

Destructor.

Definition at line 40 of file picture.cpp.


Member Function Documentation

void Picture::setUrl const QString url  ) 
 

Sets a URL for the location of the picture file.

When using this function, isIntern() will return 'false' until you use setData().

Parameters:
url The location URL of the picture file.

Definition at line 64 of file picture.cpp.

Referenced by KABC::VCardFormatImpl::readPictureValue().

void Picture::setData const QImage data  ) 
 

Sets the raw data of the picture.

When using this function, isIntern() will return 'true' until you use setUrl().

Parameters:
data The raw data of the picture.

Definition at line 70 of file picture.cpp.

Referenced by KABC::VCardFormatImpl::readPictureValue().

void Picture::setType const QString type  ) 
 

Sets the type of the picture.

Definition at line 76 of file picture.cpp.

Referenced by KABC::VCardFormatImpl::readPictureValue().

bool Picture::isIntern  )  const
 

Returns whether the picture is described by a URL (extern) or by the raw data (intern).

When this method returns 'true' you can use data() to get the raw data. Otherwise you can request the URL of this picture by url() and load the raw data from that location.

Definition at line 81 of file picture.cpp.

Referenced by KABC::VCardFormatImpl::addPictureValue().

QString Picture::url  )  const
 

Returns the location URL of this picture.

Definition at line 86 of file picture.cpp.

Referenced by KABC::VCardFormatImpl::addPictureValue().

QImage Picture::data  )  const
 

Returns the raw data of this picture.

Definition at line 91 of file picture.cpp.

Referenced by KABC::VCardFormatImpl::addPictureValue().

QString Picture::type  )  const
 

Returns the type of this picture.

Definition at line 96 of file picture.cpp.

Referenced by KABC::VCardFormatImpl::addPictureValue().

QString Picture::asString  )  const
 

Returns string representation of the picture.

Definition at line 101 of file picture.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kabc Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 16 07:08:25 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003