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

Txq2dPoints Class Reference

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

#include <Txq2dPoints.h>

Inheritance diagram for Txq2dPoints::

Txq2dPoint Txq2dDrawable TxqDrawable List of all members.

Public Methods

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

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

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

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

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

virtual ~Txq2dPoints ()
 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)
 Overloaded to make sure the point is translated with moves to new locations. More...

void setColor (QColor c, bool add)
 Set the color of all the points. More...

void setColor (QColor c)
 Overloaded to set the color of all the points. More...

void setPrintColor (QColor c)
 Overloaded to set the print color of all the points. More...

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


Protected Methods

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

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


Private Attributes

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


Detailed Description

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

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

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

Definition at line 34 of file Txq2dPoints.h.


Constructor & Destructor Documentation

Txq2dPoints::Txq2dPoints ( )
 

This constructor is default.

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

Construct with points in the real-world coordinate system.

Parameters:
p   the vector of TxqDoublePoint locations to draw

Txq2dPoints::Txq2dPoints ( 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

Txq2dPoints::Txq2dPoints ( 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

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

Construct with points in the real-world coordinate system.

Parameters:
p   the vector of QPoint locations to draw

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

The destructor.

Definition at line 72 of file Txq2dPoints.h.


Member Function Documentation

void Txq2dPoints::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 Txq2dPoints::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 Txq2dPoints::addPoint ( TxqDoublePoint point )
 

add a point to the point vector.

Parameters:
point   the point to add

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

Dump the object contents to the text stream ts.

Parameters:
ts   the text stream to dump contents.

Reimplemented from Txq2dPoint.

void Txq2dPoints::erasePoints ( )
 

erase the vector of points.

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

Returns the point in the real-world coordinate system.

Returns:
the point location as a TxqDoublePoint.

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

Initialize the class variables.

Reimplemented from Txq2dPoint.

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

Paints the points.

Parameters:
g   the paint device

Reimplemented from Txq2dPoint.

void Txq2dPoints::setColor ( QColor c ) [virtual]
 

Overloaded to set the color of all the points.

Parameters:
c   the color value

Reimplemented from TxqDrawable.

void Txq2dPoints::setColor ( QColor c,
bool add )
 

Set the color of all the points.

Parameters:
c   the color to set
add   the color to the vector of colors if true

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

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

Parameters:
x   the x location
y   the y location

Reimplemented from Txq2dPoint.

void Txq2dPoints::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 Txq2dPoints::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 Txq2dPoints::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 Txq2dPoints::setPoints ( const std::vector< TxqDoublePoint > & p )
 

Set the points in the real-world coordinate system.

Parameters:
p   the vector of TxqDoublePoint locations to draw

void Txq2dPoints::setPrintColor ( QColor c ) [virtual]
 

Overloaded to set the print color of all the points.

Parameters:
c   the prrint color value

Reimplemented from TxqDrawable.


Member Data Documentation

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

Tthe color vector.

Definition at line 185 of file Txq2dPoints.h.


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