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

#include <zq_surface.hpp>

Inheritance diagram for ZqSurface:
ZqView ZqView ZqbView ZqObject ZqbView ZqObject ZqbView ZqObject ZqbView ZqObject

Classes

struct  PixelItem
 

Public Types

enum  FillMode {
  ThinLines, FillPositive, FillNegative, FillBoth,
  ThinLines, FillPositive, FillNegative, FillBoth
}
 
enum  FillMode {
  ThinLines, FillPositive, FillNegative, FillBoth,
  ThinLines, FillPositive, FillNegative, FillBoth
}
 

Public Member Functions

 ZqSurface (ZqbNatGroup &rArgHor, ZqbNatGroup &rArgVer, const char *szName=NULL)
 
 ZqSurface (ZqbNatGroup &rArgHor, ZqbNatGroup &rArgVer, ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual bool compatibleDoc (const ZdDocument *pDoc) const
 
virtual void attachData (ZdFunction3D *pData, ZdFunc3DArgDir eArgDir=Z_F3D_XHOR_YVER)
 
virtual void detachDoc ()
 
virtual ZdFunction3Ddata ()
 
virtual ZdFunc3DArgDir argDir () const
 
virtual void setFillMode (FillMode eFillMode)
 
virtual FillMode getFillMode () const
 
virtual void setPalette (const ZqbScaledPalette &scpal)
 
virtual void attachPalette (ZqScaledPalette *zscpal)
 
virtual const ZqbScaledPalettegetPalette () const
 
virtual void redraw (QPainter &paint)
 
 ZqSurface (ZqbNatGroup &rArgHor, ZqbNatGroup &rArgVer, const char *szName=NULL)
 
 ZqSurface (ZqbNatGroup &rArgHor, ZqbNatGroup &rArgVer, ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual bool compatibleDoc (const ZdDocument *pDoc) const
 
virtual void attachData (ZdFunction3D *pData, ZdFunc3DArgDir eArgDir=Z_F3D_XHOR_YVER)
 
virtual void detachDoc ()
 
virtual ZdFunction3Ddata ()
 
virtual ZdFunc3DArgDir argDir () const
 
virtual void setFillMode (FillMode eFillMode)
 
virtual FillMode getFillMode () const
 
virtual void setPalette (const ZqbScaledPalette &scpal)
 
virtual void attachPalette (ZqScaledPalette *zscpal)
 
virtual const ZqbScaledPalettegetPalette () const
 
virtual void redraw (QPainter &paint)
 
- Public Member Functions inherited from ZqView
 ZqView (const char *szName=NULL)
 
 ZqView (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual void updateView ()
 
virtual void attachDoc (ZdDocument *pData)
 
 ZqView (const char *szName=NULL)
 
 ZqView (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual void updateView ()
 
virtual void attachDoc (ZdDocument *pData)
 
- Public Member Functions inherited from ZqObject
 ZqObject (const char *szName=NULL)
 
 ZqObject (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual ~ZqObject ()
 
virtual void debugState ()
 
virtual void clearPlace ()
 
virtual ZqbPlaceholderVector * placeholders ()
 
virtual ZqbEventHint input (QEvent &event)
 
virtual void updateLimits (QPainter *paint=NULL)
 
virtual void updateGeometry ()
 
virtual QPainter * getScreenPainter () const
 
virtual void setScreenPainter (QPainter *pPainter)
 
virtual QzqAreagetArea () const
 
virtual QWidget * getAreaWidget () const
 
virtual void setAreaWidget (QWidget *pWidget)
 
virtual bool isHardcopy () const
 
bool isPlaced () const
 
ZqbPlaceholdergetPlace () const
 
ZqbPixGrpMemberpx () const
 
ZqbPixGrpMemberpy () const
 
bool getRect (QRect &rect) const
 
virtual bool attachToPlace (ZqbPlaceholder *pPh)
 
virtual bool detachFromPlace ()
 
virtual void setDirty ()
 
virtual void resetDirty ()
 
virtual bool isDirty () const
 
void setInteractive (bool bInteractive)
 
bool isInteractive () const
 
virtual void fullRedraw (bool bForce=false)
 
virtual void interactiveRedraw ()
 
 ZqObject (const char *szName=NULL)
 
 ZqObject (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual ~ZqObject ()
 
virtual void debugState ()
 
virtual void clearPlace ()
 
virtual ZqbPlaceholderVector * placeholders ()
 
virtual ZqbEventHint input (QEvent &event)
 
virtual void updateLimits (QPainter *paint=NULL)
 
virtual void updateGeometry ()
 
virtual QPainter * getScreenPainter () const
 
virtual void setScreenPainter (QPainter *pPainter)
 
virtual QzqAreagetArea () const
 
virtual QWidget * getAreaWidget () const
 
virtual void setAreaWidget (QWidget *pWidget)
 
virtual bool isHardcopy () const
 
bool isPlaced () const
 
ZqbPlaceholdergetPlace () const
 
ZqbPixGrpMemberpx () const
 
ZqbPixGrpMemberpy () const
 
bool getRect (QRect &rect) const
 
virtual bool attachToPlace (ZqbPlaceholder *pPh)
 
virtual bool detachFromPlace ()
 
virtual void setDirty ()
 
virtual void resetDirty ()
 
virtual bool isDirty () const
 
void setInteractive (bool bInteractive)
 
bool isInteractive () const
 
virtual void fullRedraw (bool bForce=false)
 
virtual void interactiveRedraw ()
 
- Public Member Functions inherited from ZqbAutoName
 ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL)
 
virtual ~ZqbAutoName ()
 
 ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL)
 
virtual ~ZqbAutoName ()
 
- Public Member Functions inherited from ZqbName
 ZqbName (const char *szRoot, const char *szCustomName=NULL)
 
 ZqbName (const ZqbName &name)
 
virtual ~ZqbName ()
 
ZqbNameoperator= (const ZqbName &name)
 
virtual const char * getName () const
 
virtual const char * getType () const
 
bool hasName (const char *szString) const
 
 ZqbName (const char *szRoot, const char *szCustomName=NULL)
 
 ZqbName (const ZqbName &name)
 
virtual ~ZqbName ()
 
ZqbNameoperator= (const ZqbName &name)
 
virtual const char * getName () const
 
virtual const char * getType () const
 
bool hasName (const char *szString) const
 
- Public Member Functions inherited from ZqbVisible
 ZqbVisible (bool bDrawable=false, bool bInputable=false, bool bTipable=false)
 
virtual ~ZqbVisible ()
 
virtual bool isDrawable () const
 
virtual void setDrawable (bool bFlag)
 
virtual void redraw ()
 
virtual void setTipable (bool bFlag)
 
virtual bool isTipable () const
 
virtual bool tip (const QPoint &p, QString &qsShort, QString &qsLong)
 
virtual bool isInputable () const
 
virtual void setInputable (bool bFlag)
 
virtual bool getRect (QRect &)
 
virtual bool setRect (const QRect &)
 
 ZqbVisible (bool bDrawable=false, bool bInputable=false, bool bTipable=false)
 
virtual ~ZqbVisible ()
 
virtual bool isDrawable () const
 
virtual void setDrawable (bool bFlag)
 
virtual void redraw ()
 
virtual void setTipable (bool bFlag)
 
virtual bool isTipable () const
 
virtual bool tip (const QPoint &p, QString &qsShort, QString &qsLong)
 
virtual bool isInputable () const
 
virtual void setInputable (bool bFlag)
 
virtual bool getRect (QRect &)
 
virtual bool setRect (const QRect &)
 
- Public Member Functions inherited from ZqbView
 ZqbView (const char *szName=NULL)
 
virtual ~ZqbView ()
 
virtual ZdDocumentdoc ()
 
virtual void updateDoc ()
 
 ZqbView (const char *szName=NULL)
 
virtual ~ZqbView ()
 
virtual ZdDocumentdoc ()
 
virtual void updateDoc ()
 

Public Attributes

ZqbNatGrpMember m_ArgHor
 
ZqbNatGrpMember m_ArgVer
 

Protected Types

typedef std::vector< PixelItemPixelItems
 
typedef std::vector< PixelItemPixelItems
 

Protected Member Functions

void drawPixel (ZqbBarDraw &fdm, PixelItem &xpit, PixelItem &ypit)
 
void preparePixelList (const ZqbNatGrpMember &ngm, const ZqbPixGrpMember &pgm, std::vector< double > &car, PixelItems &piar)
 
void drawPixel (ZqbBarDraw &fdm, PixelItem &xpit, PixelItem &ypit)
 
void preparePixelList (const ZqbNatGrpMember &ngm, const ZqbPixGrpMember &pgm, std::vector< double > &car, PixelItems &piar)
 

Static Protected Member Functions

static bool inRange (bool bAscent, double c1, double c, double c2)
 
static double restrictRange (bool bAscent, double c1, double c, double c2)
 
static bool inRange (bool bAscent, double c1, double c, double c2)
 
static double restrictRange (bool bAscent, double c1, double c, double c2)
 

Protected Attributes

ZdFunc3DArgDir m_eArgDir
 
FillMode m_eFillMode
 
ZqbScaledPalette m_ScPal
 
ZqScaledPalettem_zqScPal
 
PixelItems m_xPiar
 
PixelItems m_yPiar
 
- Protected Attributes inherited from ZqObject
ZqbPlaceholderm_pPh
 
ZqbPixGrpMemberm_pPx
 
ZqbPixGrpMemberm_pPy
 
bool m_bInteractive
 
- Protected Attributes inherited from ZqbName
char * m_szName
 
char * m_szRoot
 

Additional Inherited Members

- Static Public Member Functions inherited from ZqbView
static bool findTypeAmong (const ZdDocument *pDoc, const char *szExpectedType1,...)
 
static bool findTypeAmong (const ZdDocument *pDoc, const char *szExpectedType1,...)
 

Detailed Description

Object for drawing muticolor isolines (thin or filled) of attached 3D function z=f(x,y).

By default surface does not have attached data, so one need to attachData() to see some drawings.

test_zq_surface_1.png

Member Typedef Documentation

typedef std::vector<PixelItem> ZqSurface::PixelItems
protected

Vector of the pixel items.

typedef std::vector<PixelItem> ZqSurface::PixelItems
protected

Vector of the pixel items.

Member Enumeration Documentation

Mode of surface isolines drawing.

Mode of surface isolines drawing.

Constructor & Destructor Documentation

ZqSurface::ZqSurface ( ZqbNatGroup rArgHor,
ZqbNatGroup rArgVer,
const char *  szName = NULL 
)

Create surface object without placeholder. Natural coordinates for horizontal and vertical argument axis are provided.

ZqSurface::ZqSurface ( ZqbNatGroup rArgHor,
ZqbNatGroup rArgVer,
ZqbPlaceholder pPh,
const char *  szName = NULL 
)

Create surface object at given place. Natural coordinates for horizontal and vertical argument axis are provided.

ZqSurface::ZqSurface ( ZqbNatGroup rArgHor,
ZqbNatGroup rArgVer,
const char *  szName = NULL 
)

Create surface object without placeholder. Natural coordinates for horizontal and vertical argument axis are provided.

ZqSurface::ZqSurface ( ZqbNatGroup rArgHor,
ZqbNatGroup rArgVer,
ZqbPlaceholder pPh,
const char *  szName = NULL 
)

Create surface object at given place. Natural coordinates for horizontal and vertical argument axis are provided.

Member Function Documentation

virtual ZdFunc3DArgDir ZqSurface::argDir ( ) const
virtual

Return direction of 3D function's X and Y argument axis. Value is not defined in case of detached state of object.

INLINE ZdFunc3DArgDir ZqSurface::argDir ( ) const
virtual

Return direction of 3D function's X and Y argument axis. Value is not defined in case of detached state of object.

virtual void ZqSurface::attachData ( ZdFunction3D pData,
ZdFunc3DArgDir  eArgDir = Z_F3D_XHOR_YVER 
)
virtual

Attach given 3D function container. Publishes to group information about ranges for X and Y arguments (in terms of ZdFunction3D addressing). Attaching NULL means detach operation.

virtual void ZqSurface::attachData ( ZdFunction3D pData,
ZdFunc3DArgDir  eArgDir = Z_F3D_XHOR_YVER 
)
virtual

Attach given 3D function container. Publishes to group information about ranges for X and Y arguments (in terms of ZdFunction3D addressing). Attaching NULL means detach operation.

virtual void ZqSurface::attachPalette ( ZqScaledPalette zscpal)
virtual

Attach permanent object with scaled palette to draw/fill isolines. If NULL palette is attached then usual setPalette() is used.

INLINE void ZqSurface::attachPalette ( ZqScaledPalette zscpal)
virtual

Attach permanent object with scaled palette to draw/fill isolines. If NULL palette is attached then usual setPalette() is used.

virtual bool ZqSurface::compatibleDoc ( const ZdDocument pDoc) const
virtual

Return true if passed object is in list of compatible documents for this view. ZdFunction3D and subclasses are welcome.

Implements ZqbView.

INLINE bool ZqSurface::compatibleDoc ( const ZdDocument pDoc) const
virtual

Return true if passed object is in list of compatible documents for this view. ZdFunction3D and subclasses are welcome.

Implements ZqbView.

virtual ZdFunction3D* ZqSurface::data ( )
virtual

Return pointer to attached data container or NULL if no data were attached.

INLINE ZdFunction3D * ZqSurface::data ( )
virtual

Return pointer to attached data container or NULL if no data were attached.

virtual void ZqSurface::detachDoc ( )
virtual

Detach 3D function. Withdraws information about ranges for argument and value of function.

Reimplemented from ZqView.

virtual void ZqSurface::detachDoc ( )
virtual

Detach 3D function. Withdraws information about ranges for argument and value of function.

Reimplemented from ZqView.

void ZqSurface::drawPixel ( ZqbBarDraw fdm,
PixelItem xpit,
PixelItem ypit 
)
protected

Draw one pointed pixel from pixel array using given bar draw method.

void ZqSurface::drawPixel ( ZqbBarDraw fdm,
PixelItem xpit,
PixelItem ypit 
)
protected

Draw one pointed pixel from pixel array using given bar draw method.

virtual FillMode ZqSurface::getFillMode ( ) const
virtual

Get current fill mode.

INLINE ZqSurface::FillMode ZqSurface::getFillMode ( ) const
virtual

Get current fill mode.

virtual const ZqbScaledPalette& ZqSurface::getPalette ( ) const
virtual

Get scaled palette used to draw/fill isolines. Returns attached or set palette.

INLINE const ZqbScaledPalette & ZqSurface::getPalette ( ) const
virtual

Get scaled palette used to draw/fill isolines. Returns attached or set palette.

static bool ZqSurface::inRange ( bool  bAscent,
double  c1,
double  c,
double  c2 
)
staticprotected

Return true if c is in range [c1,c2].

static bool ZqSurface::inRange ( bool  bAscent,
double  c1,
double  c,
double  c2 
)
staticprotected

Return true if c is in range [c1,c2].

void ZqSurface::preparePixelList ( const ZqbNatGrpMember ngm,
const ZqbPixGrpMember pgm,
std::vector< double > &  car,
PixelItems piar 
)
protected

Prepare list of pixels without duplicates and holes which elapses the whole dimension of pixel group and each pixel will have exact natural cell where it resides.

void ZqSurface::preparePixelList ( const ZqbNatGrpMember ngm,
const ZqbPixGrpMember pgm,
std::vector< double > &  car,
PixelItems piar 
)
protected

Prepare list of pixels without duplicates and holes which elapses the whole dimension of pixel group and each pixel will have exact natural cell where it resides.

virtual void ZqSurface::redraw ( QPainter &  paint)
virtual

Draw curve if some data container is attached.

Reimplemented from ZqObject.

virtual void ZqSurface::redraw ( QPainter &  paint)
virtual

Draw curve if some data container is attached.

Reimplemented from ZqObject.

static double ZqSurface::restrictRange ( bool  bAscent,
double  c1,
double  c,
double  c2 
)
staticprotected

Return coordinate restricted to the current cell.

static double ZqSurface::restrictRange ( bool  bAscent,
double  c1,
double  c,
double  c2 
)
staticprotected

Return coordinate restricted to the current cell.

virtual void ZqSurface::setFillMode ( FillMode  eFillMode)
virtual

Setup fill mode.

INLINE void ZqSurface::setFillMode ( ZqSurface::FillMode  eFillMode)
virtual

Setup fill mode.

virtual void ZqSurface::setPalette ( const ZqbScaledPalette scpal)
virtual

Set scaled palette to draw/fill isolines.

INLINE void ZqSurface::setPalette ( const ZqbScaledPalette scpal)
virtual

Set scaled palette to draw/fill isolines.

Member Data Documentation

ZqbNatGrpMember ZqSurface::m_ArgHor

Bounds for horizontal axis argument values and access to natural group.

ZqbNatGrpMember ZqSurface::m_ArgVer

Bounds for vertical axis argument values and access to natural group.

ZdFunc3DArgDir ZqSurface::m_eArgDir
protected

Direction of 3D function's X and Y argument axis. This value specifies mapping to natural and pixel horizontal and vertical directions.

FillMode ZqSurface::m_eFillMode
protected

Fill mode of the isolines.

ZqbScaledPalette ZqSurface::m_ScPal
protected

Palette to colorize the surface (controlled by setPalette()).

PixelItems ZqSurface::m_xPiar
protected

Pixels array along X axis.

PixelItems ZqSurface::m_yPiar
protected

Pixels array along Y axis.

ZqScaledPalette * ZqSurface::m_zqScPal
protected

Pointer to the palette to colorize the surface (controlled by attachPalette()).


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