Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Txq2dPointArray Class Reference

Txq2dPointArray is a set of Txq2dPoint's drawn on a Txq2dCanvas in a real-world coordinate system. More...

#include <Txq2dPointArray.h>

Inheritance diagram for Txq2dPointArray::

Txq2dPoint Txq2dDrawable TxqDrawable List of all members.

Public Methods

 Txq2dPointArray ()
 This constructor is default. More...

 Txq2dPointArray (const std::vector< TxqDoublePoint > &p)
 Construct with points in the real-world coordinate system. More...

 Txq2dPointArray (const std::vector< double > &x, const std::vector< double > &y)
 Construct with points in the real-world coordinate system. More...

 Txq2dPointArray (const std::vector< int > &x, const std::vector< int > &y)
 Construct with points in the real-world coordinate system. More...

 Txq2dPointArray (const std::vector< QPoint > &p)
 Construct with points in the real-world coordinate system. More...

virtual ~Txq2dPointArray ()
 The destructor. More...

void addPoint (TxqDoublePoint point)
 add a point to the point vector. More...

void addPoint (int x, int y)
 add a point to the point vector. More...

void addPoint (double x, double y)
 add a point to the point vector. More...

void erasePoints ()
 Erase the vector of points. More...

void setPoints (const std::vector< TxqDoublePoint > &p)
 Set the points in the real-world coordinate system. More...

void setPoints (const std::vector< double > &x, const std::vector< double > &y)
 Set the point in the real-world coordinate system. More...

void setPoints (const std::vector< int > &x, const std::vector< int > &y)
 Set the point in the real-world coordinate system. More...

void setPoints (const std::vector< QPoint > &p)
 Set the point in the real-world coordinate system. More...

std::vector<TxqDoublePointgetPoints ()
 Returns the point in the real-world coordinate system. More...

void setLocation (int x, int y)
 Overrided to make sure the point is translated with moves to new locations. More...

void paint (QPainter *g)
 Paints the point. More...


Protected Methods

void initialize ()
 Initialize the class variables. More...

void dump (QTextStream *ts)
 dump the obect contents to the text stream ts. More...


Private Attributes

std::vector<QColorcolors
 the color vector. More...

std::vector<int> colors_index
 the color index vector. More...


Detailed Description

Txq2dPointArray is a set of Txq2dPoint's drawn on a Txq2dCanvas in a real-world coordinate system.

This class is optimized for speed.

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
Txq2dPointArray.h,v 1.5 2002/01/17 19:29:21 kgl Exp

Definition at line 36 of file Txq2dPointArray.h.


Constructor & Destructor Documentation

Txq2dPointArray::Txq2dPointArray ( )
 

This constructor is default.

Txq2dPointArray::Txq2dPointArray ( const std::vector< TxqDoublePoint > & p )
 

Construct with points in the real-world coordinate system.

Parameters:
p   the vector of TxqDoublePoint locations to draw

Txq2dPointArray::Txq2dPointArray ( const std::vector< double > & x,
const std::vector< double > & y )
 

Construct with points in the real-world coordinate system.

Parameters:
x   the vector of x locations to draw
y   the vector of y locations to draw

Txq2dPointArray::Txq2dPointArray ( const std::vector< int > & x,
const std::vector< int > & y )
 

Construct with points in the real-world coordinate system.

Parameters:
x   the vector x locations to draw
y   the vector y locations to draw

Txq2dPointArray::Txq2dPointArray ( const std::vector< QPoint > & p )
 

Construct with points in the real-world coordinate system.

Parameters:
p   the vector of QPoint locations to draw

Txq2dPointArray::~Txq2dPointArray ( ) [inline, virtual]
 

The destructor.

Definition at line 74 of file Txq2dPointArray.h.


Member Function Documentation

void Txq2dPointArray::addPoint ( double x,
double y )
 

add a point to the point vector.

Parameters:
x   the x point to add
y   the y point to add

void Txq2dPointArray::addPoint ( int x,
int y )
 

add a point to the point vector.

Parameters:
x   the x point to add
y   the y point to add

void Txq2dPointArray::addPoint ( TxqDoublePoint point )
 

add a point to the point vector.

Parameters:
point   the point to add

void Txq2dPointArray::dump ( QTextStream * ts ) [protected, virtual]
 

dump the obect contents to the text stream ts.

Reimplemented from Txq2dPoint.

void Txq2dPointArray::erasePoints ( )
 

Erase the vector of points.

std::vector< TxqDoublePoint > Txq2dPointArray::getPoints ( )
 

Returns the point in the real-world coordinate system.

Returns:
the point location as a TxqDoublePoint.

void Txq2dPointArray::initialize ( ) [protected, virtual]
 

Initialize the class variables.

Reimplemented from Txq2dPoint.

void Txq2dPointArray::paint ( QPainter * g ) [virtual]
 

Paints the point.

Reimplemented from Txq2dPoint.

void Txq2dPointArray::setLocation ( int x,
int y ) [virtual]
 

Overrided to make sure the point is translated with moves to new locations.

Reimplemented from Txq2dPoint.

void Txq2dPointArray::setPoints ( const std::vector< QPoint > & p )
 

Set the point in the real-world coordinate system.

Parameters:
p   the vector of QPoint locations to draw

void Txq2dPointArray::setPoints ( const std::vector< int > & x,
const std::vector< int > & y )
 

Set the point in the real-world coordinate system.

Parameters:
x   the vector x locations to draw
y   the vector y locations to draw

void Txq2dPointArray::setPoints ( const std::vector< double > & x,
const std::vector< double > & y )
 

Set the point in the real-world coordinate system.

Parameters:
x   the vector of x locations to draw
y   the vector of y locations to draw

void Txq2dPointArray::setPoints ( const std::vector< TxqDoublePoint > & p )
 

Set the points in the real-world coordinate system.

Parameters:
p   the vector of TxqDoublePoint locations to draw


Member Data Documentation

std::vector< QColor > Txq2dPointArray::colors [private]
 

the color vector.

Definition at line 163 of file Txq2dPointArray.h.

std::vector< int > Txq2dPointArray::colors_index [private]
 

the color index vector.

Definition at line 168 of file Txq2dPointArray.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.