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

#include <zqb_bar_buffer.hpp>

Inheritance diagram for ZqbBarBuffer:
ZqbBarDraw ZqbBarDraw

Public Member Functions

 ZqbBarBuffer (QPainter &paint, const QRect &clip, bool bHardcopy)
 
virtual ~ZqbBarBuffer ()
 
virtual void flip (bool new_flag)
 
virtual void drawBar (int pos, int start, int end, int ci)
 
virtual void drawBar (int pos, int start, int end)
 
virtual void setColor (int ci)
 
virtual void flush ()
 
 ZqbBarBuffer (QPainter &paint, const QRect &clip)
 
virtual ~ZqbBarBuffer ()
 
virtual void flip (bool new_flag)
 
virtual void drawBar (int pos, int start, int end, int ci)
 
virtual void drawBar (int pos, int start, int end)
 
virtual void setColor (int ci)
 
virtual void flush ()
 
- Public Member Functions inherited from ZqbBarDraw
 ZqbBarDraw (QPainter &paint, const QRect &clip, bool bHardcopy)
 
virtual ~ZqbBarDraw ()
 
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, const QColor &c)
 
 ZqbBarDraw (QPainter &paint, const QRect &clip)
 
virtual ~ZqbBarDraw ()
 
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, const QColor &c)
 

Protected Types

enum  SpecType {
  NoStick = 0, ColorWillBeLater, StickIsHere, NoStick = 0,
  ColorWillBeLater, StickIsHere
}
 
enum  SpecType {
  NoStick = 0, ColorWillBeLater, StickIsHere, NoStick = 0,
  ColorWillBeLater, StickIsHere
}
 

Protected Member Functions

bool merge_2_bars (int &pos, int &start, int &end)
 
bool merge_2_bars (int &pos, int &start, int &end)
 

Protected Attributes

int prev_nocolor_bar
 
int limit
 
int * start_vect
 
int * end_vect
 
int * color_vect
 
enum ZqbBarBuffer::SpecType * spec_vect
 
- Protected Attributes inherited from ZqbBarDraw
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 smart bufferization by merging two overlapped sticks of the same color into one stick.

Constructor & Destructor Documentation

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

Create drawing buffer with given painting device, clip rectangle and drawing algorithm.

virtual ZqbBarBuffer::~ZqbBarBuffer ( )
virtual

Free resources.

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

Create drawing buffer with given painting device and clip rectangle.

virtual ZqbBarBuffer::~ZqbBarBuffer ( )
virtual

Free resources.

Member Function Documentation

virtual void ZqbBarBuffer::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 from ZqbBarDraw.

virtual void ZqbBarBuffer::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 from ZqbBarDraw.

virtual void ZqbBarBuffer::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 from ZqbBarDraw.

virtual void ZqbBarBuffer::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 from ZqbBarDraw.

virtual void ZqbBarBuffer::flip ( bool  new_flag)
virtual

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

Reimplemented from ZqbBarDraw.

virtual void ZqbBarBuffer::flip ( bool  new_flag)
virtual

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

Reimplemented from ZqbBarDraw.

virtual void ZqbBarBuffer::flush ( )
virtual

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

Reimplemented from ZqbBarDraw.

virtual void ZqbBarBuffer::flush ( )
virtual

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

Reimplemented from ZqbBarDraw.

bool ZqbBarBuffer::merge_2_bars ( int &  pos,
int &  start,
int &  end 
)
protected

Merges two bars and returns true if it's needed flush bar with returned coords.

bool ZqbBarBuffer::merge_2_bars ( int &  pos,
int &  start,
int &  end 
)
protected

Merges two bars and returns true if it's needed flush bar with returned coords.

virtual void ZqbBarBuffer::setColor ( int  ci)
virtual

Assign color index to all previously "drawn" bars.

Reimplemented from ZqbBarDraw.

virtual void ZqbBarBuffer::setColor ( int  ci)
virtual

Assign color index to all previously "drawn" bars.

Reimplemented from ZqbBarDraw.

Member Data Documentation

int * ZqbBarBuffer::color_vect
protected

line of color indeces

int * ZqbBarBuffer::end_vect
protected

line of sticks' ends

int ZqbBarBuffer::limit
protected

number of items in arrays

enum ZqbBarBuffer::SpecType * ZqbBarBuffer::spec_vect
protected

species

int * ZqbBarBuffer::start_vect
protected

line of sticks' starts


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