Qt 4.8
Public Functions | Public Variables | List of all members
QTexturedBrushData Struct Reference
Inheritance diagram for QTexturedBrushData:
QBrushData

Public Functions

QImageimage ()
 
QPixmappixmap ()
 
 QTexturedBrushData ()
 
void setImage (const QImage &image)
 
void setPixmap (const QPixmap &pm)
 
 ~QTexturedBrushData ()
 

Public Variables

bool m_has_pixmap_texture
 
QImage m_image
 
QPixmapm_pixmap
 
- Public Variables inherited from QBrushData
QColor color
 
QAtomicInt ref
 
Qt::BrushStyle style
 
QTransform transform
 

Detailed Description

Definition at line 172 of file qbrush.cpp.

Constructors and Destructors

◆ QTexturedBrushData()

QTexturedBrushData::QTexturedBrushData ( )
inline

Definition at line 174 of file qbrush.cpp.

174  {
175  m_has_pixmap_texture = false;
176  m_pixmap = 0;
177  }
QPixmap * m_pixmap
Definition: qbrush.cpp:216
bool m_has_pixmap_texture
Definition: qbrush.cpp:218

◆ ~QTexturedBrushData()

QTexturedBrushData::~QTexturedBrushData ( )
inline

Definition at line 178 of file qbrush.cpp.

178  {
179  delete m_pixmap;
180  }
QPixmap * m_pixmap
Definition: qbrush.cpp:216

Functions

◆ image()

QImage& QTexturedBrushData::image ( )
inline

Definition at line 210 of file qbrush.cpp.

Referenced by QBrush::detach().

210  {
211  if (m_image.isNull() && m_pixmap)
212  m_image = m_pixmap->toImage();
213  return m_image;
214  }
QImage toImage() const
Converts the pixmap to a QImage.
Definition: qpixmap.cpp:542
bool isNull() const
Returns true if it is a null image, otherwise returns false.
Definition: qimage.cpp:1542
QPixmap * m_pixmap
Definition: qbrush.cpp:216

◆ pixmap()

QPixmap& QTexturedBrushData::pixmap ( )
inline

Definition at line 203 of file qbrush.cpp.

Referenced by QBrush::detach(), and QBrush::setColor().

203  {
204  if (!m_pixmap) {
206  }
207  return *m_pixmap;
208  }
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
Definition: qpixmap.cpp:2197
QPixmap * m_pixmap
Definition: qbrush.cpp:216
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71

◆ setImage()

void QTexturedBrushData::setImage ( const QImage image)
inline

Definition at line 196 of file qbrush.cpp.

Referenced by QBrush::detach(), and QBrush::setTextureImage().

196  {
197  m_image = image;
198  delete m_pixmap;
199  m_pixmap = 0;
200  m_has_pixmap_texture = false;
201  }
QImage & image()
Definition: qbrush.cpp:210
QPixmap * m_pixmap
Definition: qbrush.cpp:216
bool m_has_pixmap_texture
Definition: qbrush.cpp:218

◆ setPixmap()

void QTexturedBrushData::setPixmap ( const QPixmap pm)
inline

Definition at line 182 of file qbrush.cpp.

Referenced by QBrush::detach(), and QBrush::setTexture().

182  {
183  delete m_pixmap;
184 
185  if (pm.isNull()) {
186  m_pixmap = 0;
187  m_has_pixmap_texture = false;
188  } else {
189  m_pixmap = new QPixmap(pm);
190  m_has_pixmap_texture = true;
191  }
192 
193  m_image = QImage();
194  }
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
QPixmap * m_pixmap
Definition: qbrush.cpp:216
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
bool m_has_pixmap_texture
Definition: qbrush.cpp:218
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
Definition: qpixmap.cpp:615

Properties

◆ m_has_pixmap_texture

bool QTexturedBrushData::m_has_pixmap_texture

Definition at line 218 of file qbrush.cpp.

Referenced by QBrush::detach(), and qHasPixmapTexture().

◆ m_image

QImage QTexturedBrushData::m_image

Definition at line 217 of file qbrush.cpp.

◆ m_pixmap

QPixmap* QTexturedBrushData::m_pixmap

Definition at line 216 of file qbrush.cpp.


The documentation for this struct was generated from the following file: