A wrapper for QPixmap. More...
Public Member Functions | |
Boolean | load (String aFileName) |
Load a pixmap from a file. More... | |
Boolean | loadFromData (ByteArray aData) |
Load a pixmap from memory data. More... | |
Pixmap () | |
Default constructor: creates an empty pixmap. | |
Pixmap (String aFileName) | |
Initializing constructor. More... | |
Boolean | save (const QString &aFileName) |
Save pixmap to a file. More... | |
ByteArray | saveToData (const QString &aFormat) |
Save pixmap to in memory data in a file format. More... | |
String | toString () const |
Properties | |
Number | depth |
The depth in bits. More... | |
Number | height |
The height in pixels. More... | |
Boolean | isNull |
True if the pixmap is empty. More... | |
Number | width |
The width in pixels. More... | |
A wrapper for QPixmap.
All Qt image files are supported.
Example use within a report:
bps::Pixmap::Pixmap | ( | String | aFileName | ) |
Initializing constructor.
aFileName | The picture file to load. |
Boolean bps::Pixmap::load | ( | String | aFileName | ) |
Load a pixmap from a file.
The image type is detected automatically by the file contents.
aFileName | The name of the file to load. |
Boolean bps::Pixmap::loadFromData | ( | ByteArray | aData | ) |
Load a pixmap from memory data.
The image type is detected automatic by the data. This loader function will typically be used to load pictures stored in a database BLOB.
aData | The data with the picture file contents to load. |
Boolean bps::Pixmap::save | ( | const QString & | aFileName | ) |
Save pixmap to a file.
aFileName | The file name to store the pixmap. The extension of the filename is used to determine the type (png, jpg, bmp, ...) |
ByteArray bps::Pixmap::saveToData | ( | const QString & | aFormat | ) |
Save pixmap to in memory data in a file format.
aFormat | The file format (png, jpg, bmp, ...) |
String bps::Pixmap::toString | ( | ) | const |
|
read |
The depth in bits.
|
read |
The height in pixels.
|
read |
True if the pixmap is empty.
|
read |
The width in pixels.