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

Txq2dLine Class Reference

Txq2dLine is a set of line segement with internal data of endpoints. More...

#include <Txq2dLine.h>

Inheritance diagram for Txq2dLine::

Txq2dLineSeg Txq2dSeg Txq2dDrawable TxqDrawable List of all members.

Public Methods

 Txq2dLine ()
 Creates a Txq2dLine with the default start and end points. More...

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

 Txq2dLine (const std::vector< int > &xpoints, const std::vector< int > &ypoints)
 Constructs the line segments points in the real-world coordinates. More...

 Txq2dLine (const std::vector< QPoint > &qpoints)
 Constructs the line segments points in the real-world coordinates. More...

 Txq2dLine (const std::vector< TxqDoublePoint > &txdouble)
 Constructs the line segments points in the real-world coordinates. More...

 Txq2dLine (const std::vector< double > &xpoints, const std::vector< double > &ypoints)
 Constructs the line segments points in the real-world coordinates. More...

 Txq2dLine (const std::vector< double > &xpoints, const std::vector< double > &ypoints, int numPoints)
 Constructs the line points in the real-world coordinates numPoints determines the number of points in a line xpoints.size()/numPoints will equal the total number of line segments. More...

void addPoint (TxqDoublePoint point)
 Add a point to the line segment vector. More...

void addPoint (int x, int y)
 Add a point to the line segment vector. More...

void addPoint (double x, double y)
 Add a point to the line segment vector. More...

void addPoint (QPoint point)
 Add a point to the line segment vector. More...

void makeLineSegments ()
 Make the line segments. More...

void setPoints (const std::vector< int > &xpoints, const std::vector< int > &ypoints)
 Set the line segments points in the real-world coordinates. More...

void setPoints (const std::vector< QPoint > &qpoints)
 Set the line segments points in the real-world coordinates. More...

void setPoints (const std::vector< TxqDoublePoint > &txdouble)
 Set the line segments points in the real-world coordinates. More...

void setPoints (const std::vector< double > &xpoints, const std::vector< double > &ypoints)
 Set the line segments points in the real-world coordinates. More...

void setPoints (const std::vector< double > &xpoints, const std::vector< double > &ypoints, int numPoints)
 Set the line segments points in the real-world coordinates. More...

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

void setColor (QColor c)
 Set the color. More...

void setPrintColor (QColor c)
 Set the print color. More...


Protected Methods

virtual void initialize ()
 Initialize the class data members. More...

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


Private Attributes

std::vector<Txq2dLineSeg*> line
 The vector of Txq2dLineSeg's making the line. More...

int lineSegPoints
 The length of the points vector. More...

int numLinePoints
 The number of points in a line. More...


Detailed Description

Txq2dLine is a set of line segement with internal data of endpoints.

The line is defined by specifying the two end points.

Definition at line 31 of file Txq2dLine.h.


Constructor & Destructor Documentation

Txq2dLine::Txq2dLine ( )
 

Creates a Txq2dLine with the default start and end points.

Txq2dLine::~Txq2dLine ( ) [virtual]
 

The destructor.

Txq2dLine::Txq2dLine ( const std::vector< int > & xpoints,
const std::vector< int > & ypoints )
 

Constructs the line segments points in the real-world coordinates.

Parameters:
xpoints   the vector of integer xpoints
ypoints   the vector of integer ypoints

Txq2dLine::Txq2dLine ( const std::vector< QPoint > & qpoints )
 

Constructs the line segments points in the real-world coordinates.

Parameters:
qpoints   the vector of QPoints

Txq2dLine::Txq2dLine ( const std::vector< TxqDoublePoint > & txdouble )
 

Constructs the line segments points in the real-world coordinates.

Parameters:
txdouble   the vector of points

Txq2dLine::Txq2dLine ( const std::vector< double > & xpoints,
const std::vector< double > & ypoints )
 

Constructs the line segments points in the real-world coordinates.

Parameters:
xpoints   the vector of double X points
ypoints   the vector of double Y points

Txq2dLine::Txq2dLine ( const std::vector< double > & xpoints,
const std::vector< double > & ypoints,
int numPoints )
 

Constructs the line points in the real-world coordinates numPoints determines the number of points in a line xpoints.size()/numPoints will equal the total number of line segments.

Parameters:
xpoints   the vector of double X points
ypoints   the vector of double Y points
numPoints   the number of points in each line segment before moving the pen.


Member Function Documentation

void Txq2dLine::addPoint ( QPoint point )
 

Add a point to the line segment vector.

Parameters:
point   the point to add

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

Add a point to the line segment vector.

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

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

Add a point to the line segment vector.

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

void Txq2dLine::addPoint ( TxqDoublePoint point )
 

Add a point to the line segment vector.

Parameters:
point   the point to add

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

Dump the objects contents to the text stream ts.

Parameters:
ts   the QTextStream to dump

Reimplemented from Txq2dLineSeg.

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

Initialize the class data members.

Reimplemented from Txq2dLineSeg.

void Txq2dLine::makeLineSegments ( )
 

Make the line segments.

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

Paints the line using the end points.

Reimplemented from Txq2dLineSeg.

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

Set the color.

Parameters:
c   the line color

Reimplemented from TxqDrawable.

void Txq2dLine::setPoints ( const std::vector< double > & xpoints,
const std::vector< double > & ypoints,
int numPoints )
 

Set the line segments points in the real-world coordinates.

Parameters:
xpoints   the vector of double points for x
ypoints   the vector of double points for y
numPoints   the number of points to use in the vector

void Txq2dLine::setPoints ( const std::vector< double > & xpoints,
const std::vector< double > & ypoints )
 

Set the line segments points in the real-world coordinates.

Parameters:
xpoints   the vector of double points for x
ypoints   the vector of double points for y

void Txq2dLine::setPoints ( const std::vector< TxqDoublePoint > & txdouble )
 

Set the line segments points in the real-world coordinates.

Parameters:
txdouble   the vector of points

void Txq2dLine::setPoints ( const std::vector< QPoint > & qpoints )
 

Set the line segments points in the real-world coordinates.

Parameters:
qpoints   the vector of QPoints

void Txq2dLine::setPoints ( const std::vector< int > & xpoints,
const std::vector< int > & ypoints )
 

Set the line segments points in the real-world coordinates.

Parameters:
xpoints   the vector of integer xpoints
ypoints   the vector of integer ypoints

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

Set the print color.

Parameters:
c   the line print color

Reimplemented from TxqDrawable.


Member Data Documentation

std::vector< Txq2dLineSeg *> Txq2dLine::line [private]
 

The vector of Txq2dLineSeg's making the line.

Definition at line 218 of file Txq2dLine.h.

int Txq2dLine::lineSegPoints [private]
 

The length of the points vector.

Definition at line 223 of file Txq2dLine.h.

int Txq2dLine::numLinePoints [private]
 

The number of points in a line.

Definition at line 228 of file Txq2dLine.h.


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