Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qxbmhandler.cpp File Reference

(498f3452285aa44580e1d03baeec126d475f8401)

#include <qplatformdefs.h>
#include "private/qxbmhandler_p.h"
#include <qimage.h>
#include <qiodevice.h>
#include <qloggingcategory.h>
#include <qvariant.h>
#include <private/qtools_p.h>
#include <stdio.h>
+ Include dependency graph for qxbmhandler.cpp:

Go to the source code of this file.

Functions

static int hex2byte (char *p)
 
static bool read_xbm_header (QIODevice *device, int &w, int &h)
 
static bool read_xbm_body (QIODevice *device, int w, int h, QImage *outImage)
 
static bool read_xbm_image (QIODevice *device, QImage *outImage)
 
static bool write_xbm_image (const QImage &sourceImage, QIODevice *device, const QString &fileName)
 

Function Documentation

◆ hex2byte()

static int hex2byte ( char * p)
inlinestatic

Definition at line 27 of file qxbmhandler.cpp.

References QtMiscUtils::fromHex().

Referenced by read_xbm_body().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_xbm_body()

static bool read_xbm_body ( QIODevice * device,
int w,
int h,
QImage * outImage )
static

Definition at line 96 of file qxbmhandler.cpp.

References QImageIOHandler::allocateImage(), Qt::color0, device, QImage::Format_MonoLSB, hex2byte(), and qRgb().

Referenced by QXbmHandler::read(), and read_xbm_image().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_xbm_header()

static bool read_xbm_header ( QIODevice * device,
int & w,
int & h )
static

Definition at line 32 of file qxbmhandler.cpp.

References ch, device, QtMiscUtils::isAsciiLetterOrNumber(), and QByteArray().

Referenced by read_xbm_image().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_xbm_image()

static bool read_xbm_image ( QIODevice * device,
QImage * outImage )
static

Definition at line 152 of file qxbmhandler.cpp.

References device, read_xbm_body(), and read_xbm_header().

Referenced by QXbmHandler::canRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write_xbm_image()

static bool write_xbm_image ( const QImage & sourceImage,
QIODevice * device,
const QString & fileName )
static

Definition at line 160 of file qxbmhandler.cpp.

References device, fileName, QImage::Format_MonoLSB, i, qGray(), qsnprintf(), qstrlen(), and QString::size().

Referenced by QXbmHandler::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: