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

Txq2dLineArray Class Reference

This is an optimized class for drawing line segments using the Qt QPointArray class. More...

#include <Txq2dLineArray.h>

Inheritance diagram for Txq2dLineArray::

Txq2dDrawable TxqDrawable List of all members.

Public Methods

 Txq2dLineArray (const vector< double > &x, const vector< double > &y, QColor color, int np=2)
 This constructor draws np line segments before lifting the pen. More...

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

void paint (QPainter *g)
 Paints the line array. More...


Protected Methods

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


Private Attributes

QColor color
 The color vector. More...

vector<double> x
 The X location vector. More...

vector<double> y
 The Y location vector. More...

int npoints
 The number of points in a line segment. More...


Detailed Description

This is an optimized class for drawing line segments using the Qt QPointArray class.

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
Txq2dLineArray.h,v 1.3 2001/10/10 22:41:05 kgl Exp

Definition at line 37 of file Txq2dLineArray.h.


Constructor & Destructor Documentation

Txq2dLineArray::Txq2dLineArray ( const vector< double > & x,
const vector< double > & y,
QColor color,
int np = 2 )
 

This constructor draws np line segments before lifting the pen.

Parameters:
x   the x location points
y   the y location points
color   the color of the line segments
np   the number of points in a ling segment

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

The destructor.

Definition at line 56 of file Txq2dLineArray.h.


Member Function Documentation

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

Dump the object contents to the text stream ts.

Parameters:
ts   the text stream to dump contents

Reimplemented from TxqDrawable.

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

Paints the line array.

Parameters:
g   the paint device.

Reimplemented from Txq2dDrawable.


Member Data Documentation

QColor Txq2dLineArray::color [private]
 

The color vector.

Reimplemented from TxqDrawable.

Definition at line 79 of file Txq2dLineArray.h.

int Txq2dLineArray::npoints [private]
 

The number of points in a line segment.

Definition at line 94 of file Txq2dLineArray.h.

vector< double > Txq2dLineArray::x [private]
 

The X location vector.

Definition at line 84 of file Txq2dLineArray.h.

vector< double > Txq2dLineArray::y [private]
 

The Y location vector.

Definition at line 89 of file Txq2dLineArray.h.


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