Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qxpmhandler.cpp File Reference

(5525779b2ea9e2805c5d4a1b6b070ca8b4838396)

#include "private/qxpmhandler_p.h"
#include <qbytearraymatcher.h>
#include <qdebug.h>
#include <qimage.h>
#include <qloggingcategory.h>
#include <qmap.h>
#include <qtextstream.h>
#include <qvariant.h>
#include <private/qcolor_p.h>
#include <private/qduplicatetracker_p.h>
#include <private/qtools_p.h>
#include <private/qimage_p.h>
#include <algorithm>
#include <array>
+ Include dependency graph for qxpmhandler.cpp:

Go to the source code of this file.

Classes

struct  XPMRGBData
 

Macros

#define QRGB(r, g, b)
 

Functions

static quint64 xpmHash (const QString &str)
 
static quint64 xpmHash (char *str)
 
bool operator< (const char *name, const XPMRGBData &data)
 
bool operator< (const XPMRGBData &data, const char *name)
 
static std::optional< QRgbqt_get_named_xpm_rgb (const char *name_no_space)
 
static QString fbname (const QString &fileName)
 
static bool read_xpm_string (QByteArray &buf, QIODevice *d, const char *const *source, int &index, QByteArray &state)
 
static bool is_xpm_color_spec_prefix (const QByteArray &prefix)
 
static bool read_xpm_header (QIODevice *device, const char *const *source, int &index, QByteArray &state, int *cpp, int *ncols, int *w, int *h)
 
static bool read_xpm_body (QIODevice *device, const char *const *source, int &index, QByteArray &state, int cpp, int ncols, int w, int h, QImage &image)
 
bool qt_read_xpm_image_or_array (QIODevice *device, const char *const *source, QImage &image)
 
static const char * xpm_color_name (int cpp, int index, CharBuffer< 5 > &&returnable={})
 
static bool write_xpm_image (const QImage &sourceImage, QIODevice *device, const QString &fileName)
 

Variables

static const int xpmRgbTblSize = 657
 
static const struct XPMRGBData xpmRgbTbl []
 

Macro Definition Documentation

◆ QRGB

#define QRGB ( r,
g,
b )
Value:
(r*65536 + g*256 + b)
GLboolean GLboolean GLboolean b
GLboolean r
[2]
GLboolean GLboolean g

Definition at line 51 of file qxpmhandler.cpp.

Function Documentation

◆ fbname()

static QString fbname ( const QString & fileName)
static

Definition at line 734 of file qxpmhandler.cpp.

◆ is_xpm_color_spec_prefix()

static bool is_xpm_color_spec_prefix ( const QByteArray & prefix)
static

Definition at line 802 of file qxpmhandler.cpp.

◆ operator<() [1/2]

bool operator< ( const char * name,
const XPMRGBData & data )
inline

Definition at line 718 of file qxpmhandler.cpp.

References XPMRGBData::name.

Referenced by qt_get_named_xpm_rgb().

+ Here is the caller graph for this function:

◆ operator<() [2/2]

bool operator< ( const XPMRGBData & data,
const char * name )
inline

Definition at line 720 of file qxpmhandler.cpp.

References XPMRGBData::name.

◆ qt_get_named_xpm_rgb()

static std::optional< QRgb > qt_get_named_xpm_rgb ( const char * name_no_space)
inlinestatic

Definition at line 723 of file qxpmhandler.cpp.

References operator<(), XPMRGBData::value, and xpmRgbTblSize.

+ Here is the call graph for this function:

◆ qt_read_xpm_image_or_array()

bool qt_read_xpm_image_or_array ( QIODevice * device,
const char *const * source,
QImage & image )

Definition at line 996 of file qxpmhandler.cpp.

◆ read_xpm_body()

static bool read_xpm_body ( QIODevice * device,
const char *const * source,
int & index,
QByteArray & state,
int cpp,
int ncols,
int w,
int h,
QImage & image )
static

Definition at line 837 of file qxpmhandler.cpp.

◆ read_xpm_header()

static bool read_xpm_header ( QIODevice * device,
const char *const * source,
int & index,
QByteArray & state,
int * cpp,
int * ncols,
int * w,
int * h )
static

Definition at line 813 of file qxpmhandler.cpp.

◆ read_xpm_string()

static bool read_xpm_string ( QByteArray & buf,
QIODevice * d,
const char *const * source,
int & index,
QByteArray & state )
static

Definition at line 765 of file qxpmhandler.cpp.

◆ write_xpm_image()

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

Definition at line 1070 of file qxpmhandler.cpp.

References QT_FORWARD_DECLARE_CLASS().

+ Here is the call graph for this function:

◆ xpm_color_name()

static const char * xpm_color_name ( int cpp,
int index,
CharBuffer< 5 > && returnable = {} )
static

Definition at line 1037 of file qxpmhandler.cpp.

◆ xpmHash() [1/2]

static quint64 xpmHash ( char * str)
static

Definition at line 37 of file qxpmhandler.cpp.

◆ xpmHash() [2/2]

static quint64 xpmHash ( const QString & str)
static

Definition at line 28 of file qxpmhandler.cpp.

Variable Documentation

◆ xpmRgbTbl

static const struct XPMRGBData xpmRgbTbl
static

◆ xpmRgbTblSize

static const int xpmRgbTblSize = 657
static

Definition at line 53 of file qxpmhandler.cpp.

Referenced by qt_get_named_xpm_rgb().