Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
QwtPainterCommand Class Reference

#include <qwt_painter_command.h>

Classes

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

Public Types

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

Public Member Functions

ImageDataimageData ()
 
const ImageDataimageData () const
 
QwtPainterCommandoperator= (const QwtPainterCommand &)
 
QPainterPath * path ()
 
const QPainterPath * path () const
 
PixmapDatapixmapData ()
 
const PixmapDatapixmapData () const
 
 QwtPainterCommand ()
 Construct an invalid command. More...
 
 QwtPainterCommand (const QPaintEngineState &)
 
 QwtPainterCommand (const QPainterPath &)
 Copy constructor. More...
 
 QwtPainterCommand (const QRectF &rect, const QImage &, const QRectF &subRect, Qt::ImageConversionFlags)
 
 QwtPainterCommand (const QRectF &rect, const QPixmap &, const QRectF &subRect)
 
 QwtPainterCommand (const QwtPainterCommand &)
 
StateDatastateData ()
 
const StateDatastateData () const
 
Type type () const
 
 ~QwtPainterCommand ()
 Destructor. More...
 

Private Member Functions

void copy (const QwtPainterCommand &)
 
void reset ()
 

Private Attributes

union {
   ImageData *   m_imageData
 
   QPainterPath *   m_path
 
   PixmapData *   m_pixmapData
 
   StateData *   m_stateData
 
}; 
 
Type m_type
 

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

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/6]

QwtPainterCommand::QwtPainterCommand ( )

Construct an invalid command.

Definition at line 13 of file qwt_painter_command.cpp.

◆ QwtPainterCommand() [2/6]

QwtPainterCommand::QwtPainterCommand ( const QwtPainterCommand other)

Copy constructor

Parameters
otherCommand to be copied

Definition at line 128 of file qwt_painter_command.cpp.

◆ QwtPainterCommand() [3/6]

QwtPainterCommand::QwtPainterCommand ( const QPainterPath &  path)
explicit

Copy constructor.

Definition at line 19 of file qwt_painter_command.cpp.

◆ QwtPainterCommand() [4/6]

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

Constructor for Pixmap paint operation

Parameters
rectTarget rectangle
pixmapPixmap
subRectRectangle inside the pixmap
See also
QPainter::drawPixmap()

Definition at line 34 of file qwt_painter_command.cpp.

◆ QwtPainterCommand() [5/6]

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

Constructor for Image paint operation

Parameters
rectTarget rectangle
imageImage
subRectRectangle inside the image
flagsConversion flags
See also
QPainter::drawImage()

Definition at line 54 of file qwt_painter_command.cpp.

◆ QwtPainterCommand() [6/6]

QwtPainterCommand::QwtPainterCommand ( const QPaintEngineState &  state)
explicit

Constructor for State paint operation

Parameters
statePaint engine state

Definition at line 70 of file qwt_painter_command.cpp.

◆ ~QwtPainterCommand()

QwtPainterCommand::~QwtPainterCommand ( )

Destructor.

Definition at line 134 of file qwt_painter_command.cpp.

Member Function Documentation

◆ copy()

void QwtPainterCommand::copy ( const QwtPainterCommand other)
private

Definition at line 153 of file qwt_painter_command.cpp.

◆ imageData() [1/2]

const QwtPainterCommand::ImageData * QwtPainterCommand::imageData ( )
inline
Returns
Attributes how to paint a QImage

Definition at line 228 of file qwt_painter_command.cpp.

◆ imageData() [2/2]

const ImageData* QwtPainterCommand::imageData ( ) const

◆ operator=()

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

Assignment operator

Parameters
otherCommand to be copied
Returns
Modified command

Definition at line 145 of file qwt_painter_command.cpp.

◆ path() [1/2]

const QPainterPath * QwtPainterCommand::path ( )
inline
Returns
Painter path to be painted

Definition at line 216 of file qwt_painter_command.cpp.

◆ path() [2/2]

const QPainterPath* QwtPainterCommand::path ( ) const

◆ pixmapData() [1/2]

const QwtPainterCommand::PixmapData * QwtPainterCommand::pixmapData ( )
inline
Returns
Attributes how to paint a QPixmap

Definition at line 222 of file qwt_painter_command.cpp.

◆ pixmapData() [2/2]

const PixmapData* QwtPainterCommand::pixmapData ( ) const

◆ reset()

void QwtPainterCommand::reset ( )
private

Definition at line 184 of file qwt_painter_command.cpp.

◆ stateData() [1/2]

const QwtPainterCommand::StateData * QwtPainterCommand::stateData ( )
inline
Returns
Attributes of a state change

Definition at line 234 of file qwt_painter_command.cpp.

◆ stateData() [2/2]

const StateData* QwtPainterCommand::stateData ( ) const

◆ type()

QwtPainterCommand::Type QwtPainterCommand::type ( ) const
inline
Returns
Type of the command

Definition at line 142 of file qwt_painter_command.h.

Member Data Documentation

◆ @26

union { ... }

◆ m_imageData

ImageData* QwtPainterCommand::m_imageData

Definition at line 136 of file qwt_painter_command.h.

◆ m_path

QPainterPath* QwtPainterCommand::m_path

Definition at line 134 of file qwt_painter_command.h.

◆ m_pixmapData

PixmapData* QwtPainterCommand::m_pixmapData

Definition at line 135 of file qwt_painter_command.h.

◆ m_stateData

StateData* QwtPainterCommand::m_stateData

Definition at line 137 of file qwt_painter_command.h.

◆ m_type

Type QwtPainterCommand::m_type
private

Definition at line 130 of file qwt_painter_command.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:29