• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

kabc

KABC::Picture

KABC::Picture Class Reference

A class to store a picture of an addressee. More...

#include <picture.h>

List of all members.


Public Member Functions

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

Friends

QDataStream & operator<< (QDataStream &, const Picture &)
QDataStream & operator>> (QDataStream &, Picture &)

Detailed Description

A class to store a picture of an addressee.

It can store the data directly or an url reference to a picture.

Definition at line 37 of file picture.h.


Constructor & Destructor Documentation

Picture::Picture (  ) 

Creates an empty picture.

Definition at line 52 of file picture.cpp.

Picture::Picture ( const QString &  url  ) 

Creates a picture which points to the given url.

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

Definition at line 57 of file picture.cpp.

Picture::Picture ( const QImage &  data  ) 

Creates a picture with the given data.

Parameters:
data The raw data of the picture.

Definition at line 63 of file picture.cpp.

Picture::Picture ( const Picture &  picture  ) 

Copy constructor.

Fast operation, Picture's data is implicitly shared.

Parameters:
picture The Picture instance to copy from

Definition at line 70 of file picture.cpp.

Picture::~Picture (  ) 

Destructor.

Definition at line 75 of file picture.cpp.


Member Function Documentation

QImage Picture::data (  )  const

Returns the raw data of this picture.

Definition at line 146 of file picture.cpp.

bool Picture::isEmpty (  )  const

Returns true, if the picture is empty.

Definition at line 112 of file picture.cpp.

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 136 of file picture.cpp.

bool Picture::operator!= ( const Picture &  p  )  const

Not-Equal operator.

Definition at line 107 of file picture.cpp.

Picture & Picture::operator= ( const Picture &  other  ) 

Assignment operator.

Fast operation, Picture's data is implicitly shared.

Parameters:
other The Picture instance to assign to this

Definition at line 79 of file picture.cpp.

bool Picture::operator== ( const Picture &  p  )  const

Equality operator.

Definition at line 88 of file picture.cpp.

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 125 of file picture.cpp.

void Picture::setType ( const QString &  type  ) 

Sets the type of the picture.

Definition at line 131 of file picture.cpp.

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 119 of file picture.cpp.

QString Picture::toString (  )  const

Returns string representation of the picture.

Definition at line 156 of file picture.cpp.

QString Picture::type (  )  const

Returns the type of this picture.

Definition at line 151 of file picture.cpp.

QString Picture::url (  )  const

Returns the location URL of this picture.

Definition at line 141 of file picture.cpp.


Friends And Related Function Documentation

QDataStream& operator<< ( QDataStream &  ,
const Picture &   
) [friend]

Serializes the picture object into the stream.

QDataStream& operator>> ( QDataStream &  ,
Picture &   
) [friend]

Initializes the picture object from the stream.


The documentation for this class was generated from the following files:
  • picture.h
  • picture.cpp

kabc

Skip menu "kabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal