VectorCurve Class Reference

#include <VectorCurve.h>

Inheritance diagram for VectorCurve:

DataCurve PlotCurve

List of all members.


Detailed Description

Vector curve class.

Public Types

enum  Position { Tail, Middle, Head }
enum  VectorStyle { XYXY, XYAM }

Public Member Functions

QwtDoubleRect boundingRect () const
QColor color ()
void copy (const VectorCurve *vc)
void draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
void drawArrowHead (QPainter *p, int xs, int ys, int xe, int ye) const
void drawVector (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
void fillArrowHead (bool fill)
bool filledArrowHead ()
int headAngle ()
int headLength ()
void loadData ()
QString plotAssociation ()
 A list of data sources for this curve.
int position ()
void setColor (const QColor &c)
void setHeadAngle (int a)
void setHeadLength (int l)
void setPosition (int pos)
void setVectorEnd (const QwtArray< double > &x, const QwtArray< double > &y)
void setVectorEnd (const QString &xColName, const QString &yColName)
void setVectorStyle (int style)
void setWidth (double w)
double theta (int x0, int y0, int x1, int y1) const
void updateColumnNames (const QString &oldName, const QString &newName, bool updateTableName)
bool updateData (Table *t, const QString &colName)
 VectorCurve (VectorStyle style, Table *t, const QString &xColName, const char *name, const QString &endCol1, const QString &endCol2, int startRow, int endRow)
QString vectorEndXAColName ()
QString vectorEndYMColName ()
int vectorStyle ()
double width ()
 ~VectorCurve ()

Protected Attributes

QString d_end_x_a
QString d_end_y_m
int d_headAngle
int d_headLength
int d_position
int d_style
bool filledArrow
QPen pen
QwtArrayData * vectorEnd

Member Enumeration Documentation

Enumerator:
Tail 
Middle 
Head 

Enumerator:
XYXY 
XYAM 


Constructor & Destructor Documentation

VectorCurve::VectorCurve ( VectorStyle  style,
Table t,
const QString &  xColName,
const char *  name,
const QString &  endCol1,
const QString &  endCol2,
int  startRow,
int  endRow 
)

VectorCurve::~VectorCurve (  ) 

References vectorEnd.


Member Function Documentation

QwtDoubleRect VectorCurve::boundingRect (  )  const

References d_position, d_style, Head, Middle, Tail, vectorEnd, and XYXY.

QColor VectorCurve::color (  ) 

void VectorCurve::copy ( const VectorCurve vc  ) 

void VectorCurve::draw ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
int  from,
int  to 
) const

References drawVector(), and pen.

void VectorCurve::drawArrowHead ( QPainter *  p,
int  xs,
int  ys,
int  xe,
int  ye 
) const

References d_headAngle, d_headLength, filledArrow, pen, and theta().

Referenced by drawVector().

void VectorCurve::drawVector ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
int  from,
int  to 
) const

References d_position, d_style, drawArrowHead(), Head, Middle, Tail, vectorEnd, and XYAM.

Referenced by draw().

void VectorCurve::fillArrowHead ( bool  fill  ) 

References filledArrow.

Referenced by Graph::updateVectorsLayout().

bool VectorCurve::filledArrowHead (  )  [inline]

int VectorCurve::headAngle (  )  [inline]

int VectorCurve::headLength (  )  [inline]

void VectorCurve::loadData (  )  [virtual]

QString VectorCurve::plotAssociation (  )  [virtual]

A list of data sources for this curve.

Elements must be in either of the following forms:

  • <id of X column> "(X)," <id of Y column> "(Y)" [ "," <id of error column> ("(xErr)" | "(yErr)") ]
  • <id of Xstart column> "(X)," <id of Ystart column>"(Y)," <id of Xend column> "(X)," <id of Yend column> "(Y)"
    (denoting start and end coordinates for the VectXYXY style)
  • <id of Xstart column> "(X)," <id of Ystart column> "(Y)," <id of angle column> "(A)," <id of magnitude column> "(M)"
    (denoting start coordinates, angle in radians and length for the VectXYAM style)

Column ids are of the form '<name of table> "_" <name of column>'.

Reimplemented from DataCurve.

References d_end_x_a, d_end_y_m, DataCurve::d_labels_column, d_style, DataCurve::d_x_column, and XYAM.

Referenced by Graph::saveCurveLayout().

int VectorCurve::position (  )  [inline]

void VectorCurve::setColor ( const QColor &  c  ) 

References pen.

Referenced by Graph::updateVectorsLayout().

void VectorCurve::setHeadAngle ( int  a  ) 

References d_headAngle.

Referenced by Graph::updateVectorsLayout().

void VectorCurve::setHeadLength ( int  l  ) 

References d_headLength.

Referenced by Graph::updateVectorsLayout().

void VectorCurve::setPosition ( int  pos  )  [inline]

References d_position.

Referenced by Graph::updateVectorsLayout().

void VectorCurve::setVectorEnd ( const QwtArray< double > &  x,
const QwtArray< double > &  y 
)

References vectorEnd.

void VectorCurve::setVectorEnd ( const QString &  xColName,
const QString &  yColName 
)

void VectorCurve::setVectorStyle ( int  style  )  [inline]

References d_style.

Referenced by PlotDialog::changePlotType().

void VectorCurve::setWidth ( double  w  ) 

References pen.

Referenced by Graph::updateVectorsLayout().

double VectorCurve::theta ( int  x0,
int  y0,
int  x1,
int  y1 
) const

Referenced by drawArrowHead().

void VectorCurve::updateColumnNames ( const QString &  oldName,
const QString &  newName,
bool  updateTableName 
) [virtual]

Reimplemented from DataCurve.

References d_end_x_a, d_end_y_m, and DataCurve::d_x_column.

bool VectorCurve::updateData ( Table t,
const QString &  colName 
) [virtual]

QString VectorCurve::vectorEndXAColName (  )  [inline]

QString VectorCurve::vectorEndYMColName (  )  [inline]

int VectorCurve::vectorStyle (  )  [inline]

References d_style.

double VectorCurve::width (  ) 


Member Data Documentation

QString VectorCurve::d_end_x_a [protected]

QString VectorCurve::d_end_y_m [protected]

int VectorCurve::d_headAngle [protected]

int VectorCurve::d_headLength [protected]

int VectorCurve::d_position [protected]

int VectorCurve::d_style [protected]

bool VectorCurve::filledArrow [protected]

QPen VectorCurve::pen [protected]

QwtArrayData* VectorCurve::vectorEnd [protected]


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

Generated on Fri Nov 7 03:36:57 2008 for QtiPlot by  doxygen 1.5.6