43 #include <private/qpicture_p.h> 47 #include <private/qfactoryloader_p.h> 48 #include <private/qpaintengine_pic_p.h> 49 #include <private/qfont_p.h> 65 int tabstops,
int *,
int tabarraylen,
137 if (formatVersion == 0)
138 qWarning(
"QPicture: invalid format version 0");
141 if (formatVersion > 0 && formatVersion != (
int)
mfhdr_maj) {
142 d->formatMajor = formatVersion;
217 return d_func()->pictb.buffer().isNull();
222 return d_func()->pictb.buffer().size();
227 return d_func()->pictb.buffer();
237 return d_func()->ref == 1;
250 d_func()->pictb.setData(data, size);
251 d_func()->resetFormat();
270 return load(&f, format);
282 #ifndef QT_NO_PICTUREIO 284 bool result = io.
read();
293 qWarning(
"QPicture::load: No such picture format: %s", format);
301 d_func()->pictb.setData(a);
302 return d_func()->checkFormat();
318 qWarning(
"QPicture::save: still being painted on. " 319 "Call QPainter::end() first");
325 #ifndef QT_NO_PICTUREIO 327 bool result = io.
write();
335 qWarning(
"QPicture::save: No such picture format: %s", format);
343 return save(&f, format);
355 qWarning(
"QPicture::save: still being painted on. " 356 "Call QPainter::end() first");
361 #ifndef QT_NO_PICTUREIO 363 bool result = io.
write();
371 qWarning(
"QPicture::save: No such picture format: %s", format);
376 dev->
write(d_func()->pictb.buffer(), d_func()->pictb.buffer().size());
389 if (!
d->override_rect.isEmpty())
390 return d->override_rect;
405 d_func()->override_rect = r;
420 if (
d->pictb.size() == 0)
423 if (!
d->formatOk && !
d->checkFormat())
437 if (
d->formatMajor >= 4) {
439 s >> dummy >> dummy >> dummy >> dummy;
442 if (!
exec(painter, s, nrecords)) {
443 qWarning(
"QPicture::play: Format error");
493 #if defined(QT_DEBUG) 499 qint16 i_16, i1_16, i2_16;
525 while (nrecords-- && !s.
atEnd()) {
532 #if defined(QT_DEBUG) 539 if (
d->formatMajor <= 5) {
559 if (
d->formatMajor <= 5) {
568 if (
d->formatMajor <= 5) {
577 if (
d->formatMajor <= 5) {
578 s >> ir >> i1_16 >> i2_16;
581 s >> r >> i1_16 >> i2_16;
586 if (
d->formatMajor <= 5) {
595 if (
d->formatMajor <= 5) {
602 painter->
drawArc(r, i1_16, i2_16);
605 if (
d->formatMajor <= 5) {
612 painter->
drawPie(r, i1_16, i2_16);
615 if (
d->formatMajor <= 5) {
630 if (
d->formatMajor <= 5) {
641 if (
d->formatMajor <= 5) {
656 path.
cubicTo(ia.at(1), ia.at(2), ia.at(3));
666 s >> ir >> i_16 >> str1;
670 if (
d->formatMajor <= 5) {
685 s >> p >> str >> font >> ul;
691 if (
d->formatMajor >= 9) {
698 fnt =
QFont(font, &fake);
701 qreal justificationWidth;
702 s >> justificationWidth;
707 if (justificationWidth > 0) {
716 str, 0, 0, 0, 0, painter);
719 str, 0, 0, 0, 0, painter);
726 if (
d->formatMajor < 4) {
729 }
else if (
d->formatMajor <= 5) {
734 if (
d->in_memory_only) {
736 s >> r >> index >> sr;
737 Q_ASSERT(index < d->pixmap_list.size());
738 pixmap =
d->pixmap_list.at(index);
740 s >> r >> pixmap >> sr;
748 if (
d->in_memory_only) {
750 s >> r >> index >> p;
751 Q_ASSERT(index < d->pixmap_list.size());
752 pixmap =
d->pixmap_list.at(index);
754 s >> r >> pixmap >> p;
761 if (
d->formatMajor < 4) {
764 }
else if (
d->formatMajor <= 5){
766 painter->
drawImage(ir, image,
QRect(0, 0, ir.width(), ir.height()));
769 if (
d->in_memory_only) {
771 s >> r >> index >> sr >> ul;
772 Q_ASSERT(index < d->image_list.size());
773 image =
d->image_list.at(index);
775 s >> r >> image >> sr >> ul;
777 painter->
drawImage(r, image, sr, Qt::ImageConversionFlags(ul));
783 if (!
exec(painter, s, ul))
808 if (
d->formatMajor <= 5) {
821 if (
d->in_memory_only) {
824 Q_ASSERT(index < d->pen_list.size());
825 pen =
d->pen_list.at(index);
832 if (
d->in_memory_only) {
835 Q_ASSERT(index < d->brush_list.size());
836 brush =
d->brush_list.at(index);
867 if (
d->formatMajor <= 5) {
876 if (
d->formatMajor <= 5) {
889 if (
d->formatMajor >= 8) {
912 if (
d->formatMajor >= 9) {
945 qWarning(
"QPicture::play: Invalid command %d", c);
949 #if defined(QT_DEBUG) 1005 qWarning(
"QPicture::metric: Invalid metric command");
1036 Q_ASSERT_X(
false,
"QPicture::detach_helper()",
"Do not call this function");
1066 : in_memory_only(false)
1132 qWarning(
"QPicturePaintEngine::checkFormat: Incorrect header");
1137 int cs_start =
sizeof(
quint32);
1138 int data_start = cs_start +
sizeof(
quint16);
1145 qWarning(
"QPicturePaintEngine::checkFormat: Invalid checksum %x, %x expected",
1152 s >> major >> minor;
1154 qWarning(
"QPicturePaintEngine::checkFormat: Incompatible version %d.%d",
1164 if (!(major >= 1 && major <= 3)) {
1166 s >> l >> t >> w >> h;
1170 qWarning(
"QPicturePaintEngine::checkFormat: Format error");
1187 return d_func()->paintEngine.data();
1194 #ifndef QT_NO_DATASTREAM 1213 s.
writeRawData (r.d_func()->pictb.buffer(), r.d_func()->pictb.buffer().
size());
1242 r.d_func()->pictb.
setData(data);
1243 r.d_func()->resetFormat();
1246 #endif // QT_NO_DATASTREAM 1249 #ifndef QT_NO_PICTUREIO 1294 for (
int i = 0; i < arr.
count(); ++i)
1414 d->iodev = ioDevice;
1451 delete [] (
char*)
d->parameters;
1467 enum TMode { Untranslated=0, TranslateIn, TranslateInOut } text_mode;
1490 #ifndef QT_NO_LIBRARY 1496 void qt_init_picture_plugins()
1498 #ifndef QT_NO_LIBRARY 1500 QFactoryLoader *loader = factoryLoader();
1502 for (
int i = 0; i < keys.
count(); ++i)
1504 format->installIOHandler(keys.
at(i));
1511 if (
QPHList *list = pictureHandlers()) {
1528 qt_init_picture_plugins();
1529 if (
QPHList *list = pictureHandlers()) {
1530 for (
int i = 0; i < list->size(); ++i) {
1531 if (list->at(i)->format ==
format)
1585 if (
QPHList *list = pictureHandlers()) {
1692 d->iodev = ioDevice;
1741 return d->parameters;
1758 delete [] (
char*)
d->parameters;
1759 d->parameters =
qstrdup(parameters);
1798 d->descr = description;
1810 QFile file(fileName);
1814 format = pictureFormat(&file);
1838 const int buflen = 14;
1843 qt_init_picture_plugins();
1845 int rdlen = d->
read(buf, buflen);
1848 if (rdlen != buflen)
1851 memcpy(buf2, buf, buflen);
1853 for (
int n = 0; n < rdlen; n++)
1857 buf[rdlen - 1] =
'\0';
1859 if (
QPHList *list = pictureHandlers()) {
1860 for (
int i = 0; i < list->size(); ++i) {
1861 if (list->at(i)->header.indexIn(bufStr) != -1) {
1862 format = list->
at(i)->format;
1881 qt_init_picture_plugins();
1883 if (
QPHList *list = pictureHandlers()) {
1884 for (
int i = 0; i < list->size(); ++i) {
1902 qt_init_picture_plugins();
1905 if (
QPHList *list = pictureHandlers()) {
1906 for (
int i = 0; i < list->size(); ++i) {
1940 const char *picture_format;
1945 }
else if (!
d->fname.isEmpty()) {
1953 if (
d->frmt.isEmpty()) {
1955 picture_format = pictureFormat(
d->iodev);
1956 if (!picture_format) {
1964 picture_format =
d->frmt;
1969 #if !defined(Q_OS_UNIX) 1987 return d->iostat == 0;
2008 if (
d->frmt.isEmpty())
2012 qWarning(
"QPictureIO::write: No such picture format handler: %s",
2017 if (!
d->iodev && !
d->fname.isEmpty()) {
2021 if (!file.
open(fmode))
2031 return d->iostat == 0;
2033 #endif //QT_NO_PICTUREIO 2046 #endif // QT_NO_PICTURE
QScopedPointer< QPaintEngine > paintEngine
void setTransform(const QTransform &transform, bool combine=false)
Sets the world transformation matrix.
void setBackgroundMode(Qt::BGMode mode)
Sets the background mode of the painter to the given mode.
void drawChord(const QRectF &rect, int a, int alen)
Draws the chord defined by the given rectangle, startAngle and spanAngle.
The QPainter class performs low-level painting on widgets and other paint devices.
static QList< QByteArray > outputFormats()
Returns a list of picture formats that are supported for picture output.
QPaintDevice * device() const
Returns the paint device on which this painter is currently painting, or 0 if the painter is not acti...
The QColor class provides colors based on RGB, HSV or CMYK values.
void qt_init_picture_handlers()
bool read()
Reads an picture into memory and returns true if the picture was successfully read; otherwise returns...
void drawPath(const QPainterPath &path)
Draws the given painter path using the current pen for outline and the current brush for filling...
void drawPie(const QRectF &rect, int a, int alen)
Draws a pie defined by the given rectangle, startAngle and and spanAngle.
void drawArc(const QRectF &rect, int a, int alen)
Draws the arc defined by the given rectangle, startAngle and spanAngle.
The QFontMetrics class provides font metrics information.
bool play(QPainter *p)
Replays the picture using painter, and returns true if successful; otherwise returns false...
const QTransform & transform() const
Returns the world transformation matrix.
QPaintEngine * paintEngine() const
#define QT_END_NAMESPACE
This macro expands to.
bool save(QIODevice *dev, const char *format=0)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QMutex class provides access serialization between threads.
char * data()
Returns a pointer to the data stored in the byte array.
const QByteArray & data() const
Returns the data contained in the buffer.
CompositionMode
Defines the modes supported for digital image compositing.
The QRegExp class provides pattern matching using regular expressions.
void(* picture_io_handler)(QPictureIO *)
void setViewport(const QRect &viewport)
Sets the painter's viewport rectangle to the given rectangle, and enables view transformations.
The QMatrix class specifies 2D transformations of a coordinate system.
void setFormat(const char *)
Sets the picture format to format for the picture to be read or written.
void qAddPostRoutine(QtCleanUpFunction p)
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
bool open(OpenMode flags)
Opens the file using OpenMode mode, returning true if successful; otherwise false.
void setData(const QByteArray &data)
Sets the contents of the internal buffer to be data.
Q_GUI_EXPORT int qt_defaultDpiY()
static QList< QByteArray > outputFormats()
Returns a sorted list of picture formats that are supported for picture output.
bool open(OpenMode openMode)
Reimplemented Function
picture_io_handler write_picture
friend Q_GUI_EXPORT QDataStream & operator>>(QDataStream &s, QPicture &r)
bool atEnd() const
Returns true if the I/O device has reached the end position (end of the stream or file) or if there i...
The QByteArray class provides an array of bytes.
void close()
Reimplemented Function
Q_GUI_EXPORT int qt_defaultDpiX()
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, factoryLoader,(QPictureFormatInterface_iid, QLatin1String("/pictureformats"))) void qt_init_picture_plugins()
The QPointF class defines a point in the plane using floating point precision.
void setDescription(const QString &)
Sets the picture description string for picture handlers that support picture descriptions to descrip...
virtual qint64 pos() const
For random-access devices, this function returns the position that data is written to or read from...
void restore()
Restores the current painter state (pops a saved state off the stack).
void setMatrixEnabled(bool enabled)
Use setWorldMatrixEnabled() instead.
int width() const
Returns the width of the rectangle.
qint64 pos() const
Reimplemented Function
static LibLoadStatus status
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
qint64 size() const
Reimplemented Function
static const quint16 mfhdr_maj
long ASN1_INTEGER_get ASN1_INTEGER * a
bool isNull() const
Returns true if the picture contains no data; otherwise returns false.
int count(const T &t) const
Returns the number of occurrences of value in the list.
QExplicitlySharedDataPointer< QPicturePrivate > d_ptr
The QPolygon class provides a vector of points using integer precision.
void drawLine(const QLineF &line)
Draws a line defined by line.
int height() const
Returns the height of the rectangle.
The QString class provides a Unicode character string.
const QPicture & picture() const
Returns the picture currently set.
void setWidth(qreal w)
Sets the width to the given width.
void init()
Contains initialization common to all QPictureIO constructors.
#define Q_BASIC_ATOMIC_INITIALIZER(a)
The QPen class defines how a QPainter should draw lines and outlines of shapes.
void setBrushOrigin(int x, int y)
Sets the brush's origin to point (x, y).
The QSizeF class defines the size of a two-dimensional object using floating point precision...
void setStatus(int)
Sets the picture IO status to status.
void drawPoint(const QPointF &pt)
Draws a single point at the given position using the current pen's color.
void moveTo(const QPointF &p)
Moves the current point to the given point, implicitly starting a new subpath and closing the previou...
bool seek(qint64 off)
Reimplemented Function
void save()
Saves the current painter state (pushes the state onto a stack).
QPictureIO()
Constructs a QPictureIO object with all parameters set to zero.
bool paintingActive() const
qreal x() const
Returns the x-coordinate of this point.
void setVersion(int)
Sets the version number of the data serialization format to v.
bool write()
Writes an picture to an IO device and returns true if the picture was successfully written; otherwise...
uint size() const
Returns the size of the picture data.
void setIODevice(QIODevice *)
Sets the IO device to be used for reading or writing an picture.
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read...
int ascent() const
Returns the ascent of the font.
Q_CORE_EXPORT quint16 qChecksum(const char *s, uint len)
void drawText(const QPointF &p, const QString &s)
Draws the given text with the currently defined text direction, beginning at the given position...
void append(const T &t)
Inserts value at the end of the list.
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint...
bool testAndSetRelaxed(int expectedValue, int newValue)
const QPen & pen() const
Returns the painter's current pen.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void drawEllipse(const QRectF &r)
Draws the ellipse defined by the given rectangle.
The QRectF class defines a rectangle in the plane using floating point precision. ...
bool isOpen() const
Returns true if the device is open; otherwise returns false.
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
int readRawData(char *, int len)
Reads at most len bytes from the stream into s and returns the number of bytes read.
void drawLines(const QLineF *lines, int lineCount)
Draws the first lineCount lines in the array lines using the current pen.
QIODevice * ioDevice() const
Returns the IO device currently set.
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
enum QPictureHandler::TMode text_mode
QByteArray & buffer()
Returns a reference to the QBuffer's internal buffer.
QRect boundingRect() const
Returns the picture's bounding rectangle or an invalid rectangle if the picture contains no data...
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
const T & at(int i) const
Returns the item at index position i in the list.
The QStringList class provides a list of strings.
The QPolygonF class provides a vector of points using floating point precision.
picture_io_handler read_picture
QPicture(int formatVersion=-1)
Constructs an empty picture.
Q_CORE_EXPORT void qWarning(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
friend Q_GUI_EXPORT QDataStream & operator<<(QDataStream &s, const QPicture &r)
QString fileName() const
Returns the file name currently set.
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule=Qt::OddEvenFill)
Draws the polygon defined by the first pointCount points in the array points using the current pen an...
The QRegion class specifies a clip region for a painter.
QPaintEngine * paintEngine() const
QString description() const
Returns the picture description string.
bool load(QIODevice *dev, const char *format=0)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
void strokePath(const QPainterPath &path, const QPen &pen)
Draws the outline (strokes) the path path with the pen specified by pen.
void qSort(RandomAccessIterator start, RandomAccessIterator end)
~QPicture()
Destroys the picture.
void setWindow(const QRect &window)
Sets the painter's window to the given rectangle, and enables view transformations.
static QStringList outputFormatList()
Returns a list of picture formats that are supported for picture output.
int metric(PaintDeviceMetric m) const
void drawTiledPixmap(const QRectF &rect, const QPixmap &pm, const QPointF &offset=QPointF())
Draws a tiled pixmap, inside the given rectangle with its origin at the given position.
const char * constData() const
Returns a pointer to the data stored in the byte array.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
void setQuality(int)
Sets the quality of the written picture to q, related to the compression ratio.
const char * parameters() const
Returns the picture's parameters string.
void setGamma(float)
Sets the gamma value at which the picture will be viewed to gamma.
#define Q_ASSERT_X(cond, where, what)
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
QList< QPictureHandler * > QPHList
void setFileName(const QString &)
Sets the name of the file to read or write an picture from to fileName.
void setViewTransformEnabled(bool enable)
Enables view transformations if enable is true, or disables view transformations if enable is false...
void setClipRegion(const QRegion &, Qt::ClipOperation op=Qt::ReplaceClip)
Sets the clip region to the given region using the specified clip operation.
QIODevice * device() const
Returns the I/O device currently set, or 0 if no device is currently set.
void setCompositionMode(CompositionMode mode)
Sets the composition mode to the given mode.
The QFile class provides an interface for reading from and writing to files.
void setClipping(bool enable)
Enables clipping if enable is true, or disables clipping if enable is false.
The QFont class specifies a font used for drawing text.
static QList< QByteArray > inputFormats()
Returns a sorted list of picture formats that are supported for picture input.
Q_CORE_EXPORT char * qstrdup(const char *)
int metric(PaintDeviceMetric m) const
Internal implementation of the virtual QPaintDevice::metric() function.
OpenMode openMode() const
Returns the mode in which the device has been opened; i.e.
bool checkFormat()
Checks data integrity and format version number.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
int quality() const
Returns the quality of the written picture, related to the compression ratio.
QObject * instance(const QString &key) const
QPictureHandler(const char *f, const char *h, const QByteArray &fl, picture_io_handler r, picture_io_handler w)
const char * format() const
Returns the picture format string or 0 if no format has been explicitly set.
The QPoint class defines a point in the plane using integer precision.
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
bool exec(QPainter *p, QDataStream &ds, int i)
Iterates over the internal picture data and draws the picture using painter.
void resize(int size)
Sets the size of the byte array to size bytes.
static const quint16 mfhdr_min
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
void detach()
If the shared data object's reference count is greater than 1, this function creates a deep copy of t...
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
void setParameters(const char *)
Sets the picture's parameter string to parameters.
The QTextOption class provides a description of general rich text properties.
QByteArray readAll()
Reads all available data from the device, and returns it as a QByteArray.
const char * qt_mfhdr_tag
const char * data() const
Returns a pointer to the picture data.
float gamma() const
Returns the gamma value at which the picture will be viewed.
int size() const
Returns the number of bytes in this byte array.
virtual int metric(PaintDeviceMetric metric) const
void drawRect(const QRectF &rect)
Draws the current rectangle with the current pen and brush.
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
qreal y() const
Returns the y-coordinate of this point.
void cubicTo(const QPointF &ctrlPt1, const QPointF &ctrlPt2, const QPointF &endPt)
Adds a cubic Bezier curve between the current position and the given endPoint using the control point...
The QPixmap class is an off-screen image representation that can be used as a paint device...
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device...
~QPictureIO()
Destroys the object and all related data.
The QPictureIO class contains parameters for loading and saving pictures.
void setDevice(QIODevice *)
void QDataStream::setDevice(QIODevice *d)
void setFont(const QFont &f)
Sets the painter's font to the given font.
The QDataStream class provides serialization of binary data to a QIODevice.
void setClipPath(const QPainterPath &path, Qt::ClipOperation op=Qt::ReplaceClip)
Enables clipping, and sets the clip path for the painter to the given path, with the clip operation...
void setOpacity(qreal opacity)
Sets the opacity of the painter to opacity.
void setBoundingRect(const QRect &r)
Sets the picture's bounding rectangle to r.
static const char * pictureFormat(const QString &fileName)
Returns a string that specifies the picture format of the file fileName, or 0 if the file cannot be r...
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
QPicture & operator=(const QPicture &p)
Assigns picture p to this picture and returns a reference to this picture.
void qt_format_text(const QFont &fnt, const QRectF &_r, int tf, const QTextOption *opt, const QString &str, QRectF *brect, int tabstops, int *, int tabarraylen, QPainter *painter)
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode=Qt::AbsoluteSize)
Draws the given rectangle rect with rounded corners.
void setPicture(const QPicture &)
Sets the picture to picture.
char at(int i) const
Returns the character at index position i in the byte array.
virtual void setData(const char *data, uint size)
Sets the picture data directly from data and size.
The QIODevice class is the base interface class of all I/O devices in Qt.
static QByteArray pictureFormat(const QString &fileName)
Returns a string that specifies the picture format of the file fileName, or null if the file cannot b...
void detach()
Detaches from shared picture data and makes sure that this picture is the only one referring to the d...
virtual void close()
Calls QFile::flush() and closes the file.
The QPicture class is a paint device that records and replays QPainter commands.
void drawPolyline(const QPointF *points, int pointCount)
Draws the polyline defined by the first pointCount points in points using the current pen...
bool seek(qint64 offset)
For random-access devices, this function sets the current position to pos, returning true on success...
virtual bool seek(qint64 pos)
For random-access devices, this function sets the current position to pos, returning true on success...
int status() const
Returns the picture's IO status.
static QString fileName(const QString &fileUrl)
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
static QStringList inputFormatList()
Returns a list of picture formats that are supported for picture input.
int writeRawData(const char *, int len)
Writes len bytes from s to the stream.
Q_DECL_CONSTEXPR int qRound(qreal d)
void setBackground(const QBrush &bg)
Sets the background brush of the painter to the given brush.
void setFileName(const QString &name)
Sets the name of the file.
static QPictureHandler * get_picture_handler(const char *format)
static QStringList qToStringList(const QList< QByteArray > arr)
QBool contains(char c) const
Returns true if the byte array contains the character ch; otherwise returns false.
static void defineIOHandler(const char *format, const char *header, const char *flags, picture_io_handler read_picture, picture_io_handler write_picture)
Defines a picture I/O handler for the picture format called format, which is recognized using the reg...
static QList< QByteArray > inputFormats()
Returns a list of picture formats that are supported for picture input.