Qt 4.8
Public Types | Public Functions | Static Public Functions | Private Functions | Properties | List of all members
QColormap Class Reference

#include <qcolormap.h>

Public Types

enum  Mode { Direct, Indexed, Gray }
 

Public Functions

const QColor colorAt (uint pixel) const
 
const QVector< QColorcolormap () const
 
int depth () const
 
Mode mode () const
 
QColormapoperator= (const QColormap &colormap)
 
uint pixel (const QColor &color) const
 
 QColormap (const QColormap &colormap)
 
int size () const
 
 ~QColormap ()
 

Static Public Functions

static void cleanup ()
 
static HPALETTE hPal ()
 
static void initialize ()
 
static QColormap instance (int screen=-1)
 

Private Functions

 QColormap ()
 Constructs a new colormap. More...
 

Properties

QColormapPrivated
 

Detailed Description

Definition at line 59 of file qcolormap.h.

Enumerations

◆ Mode

Enumerator
Direct 
Indexed 
Gray 

Definition at line 62 of file qcolormap.h.

Constructors and Destructors

◆ QColormap() [1/2]

QColormap::QColormap ( const QColormap colormap)

Definition at line 77 of file qcolormap_mac.cpp.

77  :d (colormap.d)
78 { d->ref.ref(); }
bool ref()
Atomically increments the value of this QAtomicInt.
QColormapPrivate * d
Definition: qcolormap.h:90

◆ ~QColormap()

QColormap::~QColormap ( )

Definition at line 80 of file qcolormap_mac.cpp.

81 {
82  if (!d->ref.deref())
83  delete d;
84 }
bool deref()
Atomically decrements the value of this QAtomicInt.
QColormapPrivate * d
Definition: qcolormap.h:90

◆ QColormap() [2/2]

QColormap::QColormap ( )
private

Constructs a new colormap.

Warning
This function is not part of the public interface.

Definition at line 74 of file qcolormap_mac.cpp.

74  : d(new QColormapPrivate)
75 {}
QColormapPrivate * d
Definition: qcolormap.h:90

Functions

◆ cleanup()

void QColormap::cleanup ( )
static

Definition at line 63 of file qcolormap_mac.cpp.

Referenced by qt_cleanup().

64 {
65  delete qt_mac_global_map;
67 }
static QColormap * qt_mac_global_map

◆ colorAt()

const QColor QColormap::colorAt ( uint  pixel) const

Definition at line 102 of file qcolormap_mac.cpp.

Referenced by qt_conv16ToRgb(), and QApplicationPrivate::setSystemPalette().

103 { return QColor(pixel); }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
uint pixel(const QColor &color) const

◆ colormap()

const QVector< QColor > QColormap::colormap ( ) const

Definition at line 105 of file qcolormap_mac.cpp.

Referenced by hPal(), and qt_conv16ToRgb().

◆ depth()

int QColormap::depth ( ) const

Definition at line 89 of file qcolormap_mac.cpp.

Referenced by QPixmap::defaultDepth().

90 {
91  return 32;
92 }

◆ hPal()

HPALETTE QColormap::hPal ( )
static

Definition at line 190 of file qcolormap_win.cpp.

Referenced by QGLContext::choosePixelFormat(), OLEColorToQColor(), QPixmapToIPicture(), and QtWndProc().

191 { return screenMap ? screenMap->hpal : 0; }
static QColormapPrivate * screenMap

◆ initialize()

void QColormap::initialize ( )
static

Definition at line 58 of file qcolormap_mac.cpp.

Referenced by init_display(), and qt_init().

59 {
61 }
static QColormap * qt_mac_global_map
QColormap()
Constructs a new colormap.

◆ instance()

QColormap QColormap::instance ( int  screen = -1)
static

◆ mode()

QColormap::Mode QColormap::mode ( ) const

Definition at line 86 of file qcolormap_mac.cpp.

◆ operator=()

QColormap & QColormap::operator= ( const QColormap colormap)

Definition at line 108 of file qcolormap_mac.cpp.

Referenced by hPal(), and qt_conv16ToRgb().

109 { qAtomicAssign(d, colormap.d); return *this; }
QColormapPrivate * d
Definition: qcolormap.h:90
void qAtomicAssign(T *&d, T *x)
This is a helper for the assignment operators of implicitly shared classes.
Definition: qatomic.h:195

◆ pixel()

uint QColormap::pixel ( const QColor color) const

◆ size()

int QColormap::size ( ) const

Definition at line 94 of file qcolormap_mac.cpp.

95 {
96  return -1;
97 }

Properties

◆ d

QColormapPrivate* QColormap::d
private

Definition at line 90 of file qcolormap.h.

Referenced by hPal(), operator=(), QColormap(), qt_conv16ToRgb(), and ~QColormap().


The documentation for this class was generated from the following files: