QwtPainterCommand Class Reference

`#include <qwt_painter_command.h>`

## Classes

struct | ImageData
| Attributes how to paint a QImage.
struct | PixmapData
| Attributes how to paint a QPixmap.
struct | StateData
| Attributes of a state change.

## Public Types

enum | Type { Invalid = -1 , Path , Pixmap , Image , State }
| Type of the paint command. More...

## Public Member Functions

| QwtPainterCommand ()
| Construct an invalid command.
| QwtPainterCommand (const QwtPainterCommand &)
| QwtPainterCommand (const QPainterPath &)
| Copy constructor.
| QwtPainterCommand (const QRectF &rect, const QPixmap &, const QRectF &subRect)
| QwtPainterCommand (const QRectF &rect, const QImage &, const QRectF &subRect, Qt::ImageConversionFlags)
| QwtPainterCommand (const QPaintEngineState &)
| ~QwtPainterCommand ()
| Destructor.
QwtPainterCommand & | operator= (const QwtPainterCommand &)
Type | type () const
QPainterPath * | path ()
const QPainterPath * | path () const
PixmapData * | pixmapData ()
const PixmapData * | pixmapData () const
ImageData * | imageData ()
const ImageData * | imageData () const
StateData * | stateData ()
const StateData * | stateData () const

## Detailed Description

QwtPainterCommand represents the attributes of a paint operation how it is used between QPainter and QPaintDevice

It is used by QwtGraphic to record and replay paint operations

See also
  QwtGraphic::commands()

Definition at line 32 of file qwt_painter_command.h.

## Member Enumeration Documentation

## Type

enum QwtPainterCommand::Type

Type of the paint command.

Enumerator
Invalid | Invalid command.
Path | Draw a QPainterPath.
Pixmap | Draw a QPixmap.
Image | Draw a QImage.
State | QPainter state change.

Definition at line 36 of file qwt_painter_command.h.

## Constructor & Destructor Documentation

## QwtPainterCommand() [1/4]

QwtPainterCommand::QwtPainterCommand | ( | const QwtPainterCommand & | other | ) |

Copy constructor

Parameters

  other | Command to be copied

Definition at line 128 of file qwt_painter_command.cpp.

## QwtPainterCommand() [2/4]

QwtPainterCommand::QwtPainterCommand | ( | const QRectF & | rect,
|  | const QPixmap & | pixmap,
|  | const QRectF & | subRect
| ) |  |

Constructor for Pixmap paint operation

Parameters

  rect | Target rectangle
  pixmap | Pixmap
  subRect | Rectangle inside the pixmap

See also
  QPainter::drawPixmap()

Definition at line 34 of file qwt_painter_command.cpp.

## QwtPainterCommand() [3/4]

QwtPainterCommand::QwtPainterCommand | ( | const QRectF & | rect,
|  | const QImage & | image,
|  | const QRectF & | subRect,
|  | Qt::ImageConversionFlags | flags
| ) |  |

Constructor for Image paint operation

Parameters

  rect | Target rectangle
  image | Image
  subRect | Rectangle inside the image
  flags | Conversion flags

See also
  QPainter::drawImage()

Definition at line 54 of file qwt_painter_command.cpp.

## QwtPainterCommand() [4/4]

QwtPainterCommand::QwtPainterCommand | ( | const QPaintEngineState & | state | ) |

explicit

Constructor for State paint operation

Parameters

  state | Paint engine state

Definition at line 70 of file qwt_painter_command.cpp.

## Member Function Documentation

## imageData() [1/2]

QwtPainterCommand::ImageData * QwtPainterCommand::imageData | ( |  | ) |

Returns
  Attributes how to paint a QImage

Definition at line 228 of file qwt_painter_command.cpp.

## imageData() [2/2]

const QwtPainterCommand::ImageData * QwtPainterCommand::imageData | ( |  | ) | const

inline

Returns
  Attributes how to paint a QImage

Definition at line 162 of file qwt_painter_command.h.

## operator=()

QwtPainterCommand & QwtPainterCommand::operator= | ( | const QwtPainterCommand & | other | ) |

Assignment operator

Parameters

  other | Command to be copied

Returns
  Modified command

Definition at line 145 of file qwt_painter_command.cpp.

## path() [1/2]

QPainterPath * QwtPainterCommand::path | ( |  | ) |

Returns
  Painter path to be painted

Definition at line 216 of file qwt_painter_command.cpp.

## path() [2/2]

const QPainterPath * QwtPainterCommand::path | ( |  | ) | const

inline

Returns
  Painter path to be painted

Definition at line 148 of file qwt_painter_command.h.

## pixmapData() [1/2]

QwtPainterCommand::PixmapData * QwtPainterCommand::pixmapData | ( |  | ) |

Returns
  Attributes how to paint a QPixmap

Definition at line 222 of file qwt_painter_command.cpp.

## pixmapData() [2/2]

const QwtPainterCommand::PixmapData * QwtPainterCommand::pixmapData | ( |  | ) | const

inline

Returns
  Attributes how to paint a QPixmap

Definition at line 155 of file qwt_painter_command.h.

## stateData() [1/2]

QwtPainterCommand::StateData * QwtPainterCommand::stateData | ( |  | ) |

Returns
  Attributes of a state change

Definition at line 234 of file qwt_painter_command.cpp.

## stateData() [2/2]

const QwtPainterCommand::StateData * QwtPainterCommand::stateData | ( |  | ) | const

inline

Returns
  Attributes of a state change

Definition at line 169 of file qwt_painter_command.h.

## type()

QwtPainterCommand::Type QwtPainterCommand::type | ( |  | ) | const

inline

Returns
  Type of the command

Definition at line 142 of file qwt_painter_command.h.