QtiPlot
0.9.8.2
|
Vector curve class. More...
#include <VectorCurve.h>
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 | fillArrowHead (bool fill) |
bool | filledArrowHead () |
int | headAngle () |
int | headLength () |
void | loadData () |
QStringList | 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 QString &xColName, const QString &yColName) |
void | setVectorPen (const QPen &pen) |
void | setVectorStyle (int style) |
void | setWidth (double w) |
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 () |
QPen | vectorPen () |
int | vectorStyle () |
double | width () |
~VectorCurve () | |
Protected Attributes | |
QString | d_end_x_a |
QString | d_end_y_m |
int | d_headAngle |
int | d_headLength |
QPen | d_pen |
int | d_position |
int | d_style |
bool | filledArrow |
QwtArrayData * | vectorEnd |
Private Member Functions | |
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 | setVectorEnd (const QwtArray< double > &x, const QwtArray< double > &y) |
double | theta (int x0, int y0, int x1, int y1) const |
Vector curve class.
VectorCurve::VectorCurve | ( | VectorStyle | style, |
Table * | t, | ||
const QString & | xColName, | ||
const char * | name, | ||
const QString & | endCol1, | ||
const QString & | endCol2, | ||
int | startRow, | ||
int | endRow | ||
) |
References d_pen, PlotCurve::setPlotStyle(), PlotCurve::setType(), Graph::VectXYAM, Graph::VectXYXY, XYAM, and XYXY.
References vectorEnd.
QwtDoubleRect VectorCurve::boundingRect | ( | ) | const |
QColor VectorCurve::color | ( | ) |
References d_pen.
Referenced by LegendWidget::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
void VectorCurve::copy | ( | const VectorCurve * | vc | ) |
References d_headAngle, d_headLength, d_pen, d_position, d_style, filledArrow, and vectorEnd.
void VectorCurve::draw | ( | QPainter * | painter, |
const QwtScaleMap & | xMap, | ||
const QwtScaleMap & | yMap, | ||
int | from, | ||
int | to | ||
) | const [private] |
References d_pen, and drawVector().
void VectorCurve::drawArrowHead | ( | QPainter * | p, |
int | xs, | ||
int | ys, | ||
int | xe, | ||
int | ye | ||
) | const [private] |
References d_headAngle, d_headLength, d_pen, filledArrow, headLength(), and theta().
Referenced by drawVector().
void VectorCurve::drawVector | ( | QPainter * | painter, |
const QwtScaleMap & | xMap, | ||
const QwtScaleMap & | yMap, | ||
int | from, | ||
int | to | ||
) | const [private] |
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] |
References filledArrow.
Referenced by LegendWidget::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
int VectorCurve::headAngle | ( | ) | [inline] |
References d_headAngle.
Referenced by LegendWidget::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
int VectorCurve::headLength | ( | ) | [inline] |
References d_headLength.
Referenced by drawArrowHead(), LegendWidget::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
void VectorCurve::loadData | ( | ) | [virtual] |
Reimplemented from DataCurve.
References Table::colIndex(), DataCurve::d_end_row, d_end_x_a, d_end_y_m, DataCurve::d_error_bars, DataCurve::d_start_row, DataCurve::d_table, DataCurve::d_x_column, setVectorEnd(), and Table::text().
Referenced by AssociationsDialog::changePlotAssociation(), Graph::plotVectors(), setVectorEnd(), and updateData().
QStringList VectorCurve::plotAssociation | ( | ) | [virtual] |
A list of data sources for this curve.
Elements must be in either of the following forms:
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 PlotDialog::acceptParams(), and Graph::saveCurveLayout().
int VectorCurve::position | ( | ) | [inline] |
References d_position.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
void VectorCurve::setColor | ( | const QColor & | c | ) |
References d_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 QString & | xColName, |
const QString & | yColName | ||
) |
References d_end_x_a, d_end_y_m, and loadData().
Referenced by AssociationsDialog::changePlotAssociation(), loadData(), and Graph::updateVectorsLayout().
void VectorCurve::setVectorEnd | ( | const QwtArray< double > & | x, |
const QwtArray< double > & | y | ||
) | [private] |
References vectorEnd.
void VectorCurve::setVectorPen | ( | const QPen & | pen | ) | [inline] |
References d_pen.
Referenced by Graph::print().
void VectorCurve::setVectorStyle | ( | int | style | ) | [inline] |
References d_style.
Referenced by PlotDialog::changePlotType().
void VectorCurve::setWidth | ( | double | w | ) |
References d_pen.
Referenced by Graph::updateVectorsLayout().
double VectorCurve::theta | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1 | ||
) | const [private] |
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] |
Reimplemented from DataCurve.
References d_end_x_a, d_end_y_m, DataCurve::d_table, DataCurve::d_x_column, and loadData().
QString VectorCurve::vectorEndXAColName | ( | ) | [inline] |
References d_end_x_a.
Referenced by AssociationsDialog::changePlotAssociation().
QString VectorCurve::vectorEndYMColName | ( | ) | [inline] |
References d_end_y_m.
Referenced by AssociationsDialog::changePlotAssociation().
QPen VectorCurve::vectorPen | ( | ) | [inline] |
References d_pen.
Referenced by LegendWidget::drawVector(), and Graph::print().
int VectorCurve::vectorStyle | ( | ) | [inline] |
References d_style.
double VectorCurve::width | ( | ) |
References d_pen.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
QString VectorCurve::d_end_x_a [protected] |
Referenced by loadData(), plotAssociation(), setVectorEnd(), updateColumnNames(), updateData(), and vectorEndXAColName().
QString VectorCurve::d_end_y_m [protected] |
Referenced by loadData(), plotAssociation(), setVectorEnd(), updateColumnNames(), updateData(), and vectorEndYMColName().
int VectorCurve::d_headAngle [protected] |
Referenced by copy(), drawArrowHead(), headAngle(), and setHeadAngle().
int VectorCurve::d_headLength [protected] |
Referenced by copy(), drawArrowHead(), headLength(), and setHeadLength().
QPen VectorCurve::d_pen [protected] |
Referenced by color(), copy(), draw(), drawArrowHead(), setColor(), setVectorPen(), setWidth(), VectorCurve(), vectorPen(), and width().
int VectorCurve::d_position [protected] |
Referenced by boundingRect(), copy(), drawVector(), position(), and setPosition().
int VectorCurve::d_style [protected] |
Referenced by boundingRect(), copy(), drawVector(), plotAssociation(), setVectorStyle(), and vectorStyle().
bool VectorCurve::filledArrow [protected] |
Referenced by copy(), drawArrowHead(), fillArrowHead(), and filledArrowHead().
QwtArrayData* VectorCurve::vectorEnd [protected] |
Referenced by boundingRect(), copy(), drawVector(), setVectorEnd(), and ~VectorCurve().