QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
QwtPainterCommand Class Reference

Represents the attributes of a paint operation between QPainter and QPaintDevice. More...

#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

 QwtPainterCommand ()
 Construct an invalid command.
 
 QwtPainterCommand (const QwtPainterCommand &)
 Copy constructor.
 
 QwtPainterCommand (QwtPainterCommand &&) noexcept
 Move constructor.
 
 QwtPainterCommand (const QPainterPath &)
 Construct a path command.
 
 QwtPainterCommand (const QRectF &rect, const QPixmap &, const QRectF &subRect)
 Constructor for Pixmap paint operation.
 
 QwtPainterCommand (const QRectF &rect, const QImage &, const QRectF &subRect, Qt::ImageConversionFlags)
 Constructor for Image paint operation.
 
 QwtPainterCommand (const QPaintEngineState &)
 Constructor for State paint operation.
 
 ~QwtPainterCommand ()
 Destructor.
 
QwtPainterCommandoperator= (const QwtPainterCommand &)
 Assignment operator.
 
QwtPainterCommandoperator= (QwtPainterCommand &&) noexcept
 Move assignment operator.
 
Type type () const
 
QPainterPath * path ()
 
const QPainterPath * path () const
 
PixmapDatapixmapData ()
 
const PixmapDatapixmapData () const
 
ImageDataimageData ()
 
const ImageDataimageData () const
 
StateDatastateData ()
 
const StateDatastateData () const
 

Detailed Description

Represents the attributes of a paint operation between QPainter and QPaintDevice.

QwtPainterCommand encapsulates different types of paint operations including drawing paths, pixmaps, images, and state changes. It is used by QwtGraphic to record and replay paint operations.

See also
QwtGraphic::commands()

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.

Constructor & Destructor Documentation

◆ QwtPainterCommand() [1/6]

QwtPainterCommand::QwtPainterCommand ( const QwtPainterCommand other)

Copy constructor.

Parameters
[in]otherCommand to be copied

◆ QwtPainterCommand() [2/6]

QwtPainterCommand::QwtPainterCommand ( QwtPainterCommand &&  other)
noexcept

Move constructor.

Parameters
[in]otherCommand to be moved from

◆ QwtPainterCommand() [3/6]

QwtPainterCommand::QwtPainterCommand ( const QPainterPath &  path)
explicit

Construct a path command.

Parameters
[in]pathQPainterPath to be painted

◆ QwtPainterCommand() [4/6]

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

Constructor for Pixmap paint operation.

Parameters
[in]rectTarget rectangle
[in]pixmapPixmap to draw
[in]subRectRectangle inside the pixmap
See also
QPainter::drawPixmap()

◆ QwtPainterCommand() [5/6]

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

Constructor for Image paint operation.

Parameters
[in]rectTarget rectangle
[in]imageImage to draw
[in]subRectRectangle inside the image
[in]flagsConversion flags
See also
QPainter::drawImage()

◆ QwtPainterCommand() [6/6]

QwtPainterCommand::QwtPainterCommand ( const QPaintEngineState &  state)
explicit

Constructor for State paint operation.

Parameters
[in]statePaint engine state

Member Function Documentation

◆ imageData() [1/2]

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

◆ imageData() [2/2]

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

◆ operator=() [1/2]

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

Assignment operator.

Parameters
[in]otherCommand to be copied
Returns
Modified command

◆ operator=() [2/2]

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

Move assignment operator.

Parameters
[in]otherCommand to be moved from
Returns
Reference to this command

◆ path() [1/2]

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

◆ path() [2/2]

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

◆ pixmapData() [1/2]

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

◆ pixmapData() [2/2]

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

◆ stateData() [1/2]

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

◆ stateData() [2/2]

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

◆ type()

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

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