UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
ZqbBarDraw Class Reference

#include <zqb_bar_draw.hpp>

Inheritance diagram for ZqbBarDraw:
ZqbBarBuffer ZqbBarBuffer

Public Member Functions

 ZqbBarDraw (QPainter &paint, const QRect &clip, bool bHardcopy)
 
virtual ~ZqbBarDraw ()
 
virtual void flip (bool new_flag)
 
virtual bool isFlipped () const
 
virtual bool clipAndFlip (QPointArray &dest, int pos, int start, int end)
 
virtual void setPalette (const ZqbPalette &zpal)
 
virtual void drawBar (int pos, int start, int end, int ci)
 
virtual void drawBar (int pos, int start, int end, const QColor &c)
 
virtual void drawBar (int pos, int start, int end)
 
virtual void setColor (int ci)
 
virtual void flush ()
 
 ZqbBarDraw (QPainter &paint, const QRect &clip)
 
virtual ~ZqbBarDraw ()
 
virtual void flip (bool new_flag)
 
virtual bool isFlipped () const
 
virtual bool clipAndFlip (QLine &dest, int pos, int start, int end)
 
virtual void setPalette (const ZqbPalette &zpal)
 
virtual void drawBar (int pos, int start, int end, int ci)
 
virtual void drawBar (int pos, int start, int end, const QColor &c)
 
virtual void drawBar (int pos, int start, int end)
 
virtual void setColor (int ci)
 
virtual void flush ()
 

Protected Attributes

bool m_bFlip
 
bool m_bHardcopy
 
QPainter & m_qPaint
 
QRect m_qClipRect
 
ZqbPalette m_zPal
 
int m_iColor
 
QPointArray m_Buffer
 
QVector< QLine > m_Buffer
 

Detailed Description

Draw color bars (sticks) with simple color bufferization.

Constructor & Destructor Documentation

ZqbBarDraw::ZqbBarDraw ( QPainter &  paint,
const QRect &  clip,
bool  bHardcopy 
)

Create bar drawing engine with simple one-black-color palette will be created. Set initially painting device, clipping rectangle and drawing algorithm.

virtual ZqbBarDraw::~ZqbBarDraw ( )
virtual

Dummy destructor to make compiler happy.

ZqbBarDraw::ZqbBarDraw ( QPainter &  paint,
const QRect &  clip 
)

Create bar drawing engine with simple one-black-color palette will be created. Set initially painting device and clipping rectangle.

virtual ZqbBarDraw::~ZqbBarDraw ( )
virtual

Dummy destructor to make compiler happy.

Member Function Documentation

virtual bool ZqbBarDraw::clipAndFlip ( QLine &  dest,
int  pos,
int  start,
int  end 
)
virtual

Clip pointed bar and flip it if needed, then put into the end of given point array.

virtual bool ZqbBarDraw::clipAndFlip ( QPointArray &  dest,
int  pos,
int  start,
int  end 
)
virtual

Clip pointed bar and flip it if needed, then put into the end of given point array.

virtual void ZqbBarDraw::drawBar ( int  pos,
int  start,
int  end,
int  ci 
)
virtual

Draw one bar in pointed position from start to end with given color index in attached palette. Drawing is performed into the buffer.

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::drawBar ( int  pos,
int  start,
int  end,
const QColor &  c 
)
virtual

Draw one bar in pointed position from start to end with given color which is added to attached palette if it is not found in the palette. Drawing is performed into the buffer.

virtual void ZqbBarDraw::drawBar ( int  pos,
int  start,
int  end,
int  ci 
)
virtual

Draw one bar in pointed position from start to end with given color index in attached palette. Drawing is performed into the buffer.

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::drawBar ( int  pos,
int  start,
int  end 
)
virtual

Draw one bar in pointed position from start to end with undefined color. It will be known after setColor(). Drawing is performed into the buffer.

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::drawBar ( int  pos,
int  start,
int  end,
const QColor &  c 
)
virtual

Draw one bar in pointed position from start to end with given color which is added to attached palette if it is not found in the palette. Drawing is performed into the buffer.

virtual void ZqbBarDraw::drawBar ( int  pos,
int  start,
int  end 
)
virtual

Draw one bar in pointed position from start to end with undefined color. It will be known after setColor(). Drawing is performed into the buffer.

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::flip ( bool  new_flag)
inlinevirtual

Interpret position as x-coord (vertical bars – flip false) or as y-coord (horizontal bars – flip true)

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::flip ( bool  new_flag)
inlinevirtual

Interpret position as x-coord (vertical bars – flip false) or as y-coord (horizontal bars – flip true)

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::flush ( )
virtual

Send all accumulated segments (bars) to the graphics device.

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::flush ( )
virtual

Send all accumulated segments (bars) to the graphics device.

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual bool ZqbBarDraw::isFlipped ( ) const
inlinevirtual

Return value of flip flag.

virtual bool ZqbBarDraw::isFlipped ( ) const
inlinevirtual

Return value of flip flag.

virtual void ZqbBarDraw::setColor ( int  ci)
virtual

Assign color index to all previously "drawn" bars.

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::setColor ( int  ci)
virtual

Assign color index to all previously "drawn" bars.

Reimplemented in ZqbBarBuffer, and ZqbBarBuffer.

virtual void ZqbBarDraw::setPalette ( const ZqbPalette zpal)
virtual

Set palette with colors.

virtual void ZqbBarDraw::setPalette ( const ZqbPalette zpal)
virtual

Set palette with colors.

Member Data Documentation

bool ZqbBarDraw::m_bFlip
protected

Flip flag. true means bars are vertical and position is X; false means bars are horizontal and position is Y.

bool ZqbBarDraw::m_bHardcopy
protected

Flag specifies which drawing algorithm will be used (true for on-screen output; false for other devices e.g. file or printer).

QVector<QLine> ZqbBarDraw::m_Buffer
protected

Buffer to store unicolor bars before drawing.

QPointArray ZqbBarDraw::m_Buffer
protected

Buffer to store unicolor bars before drawing.

int ZqbBarDraw::m_iColor
protected

Color index of bars in the buffer. -1 means color is undefined.

QRect ZqbBarDraw::m_qClipRect
protected

Clipping rectangle.

QPainter & ZqbBarDraw::m_qPaint
protected

Painting device.

ZqbPalette ZqbBarDraw::m_zPal
protected

Attached palette.


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