KABC::Picture Class Reference
List of all members.Detailed Description
Definition at line 30 of file picture.h.
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 QDataStream & | operator<< (QDataStream &, const Picture &) |
KABC_EXPORT QDataStream & | operator>> (QDataStream &, Picture &) |
Constructor & Destructor Documentation
Picture::Picture | ( | ) |
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 | ( | ) |
Member Function Documentation
QString Picture::asString | ( | ) | const |
QImage Picture::data | ( | ) | const |
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.
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.
void Picture::setType | ( | const QString & | type | ) |
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.
QString Picture::type | ( | ) | const |
QString Picture::url | ( | ) | const |
The documentation for this class was generated from the following files: