SciDAVis
1.D4
|
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 | 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 () |
virtual bool | 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 QString &xColName, const QString &yColName) |
void | setVectorEnd (const QwtArray< double > &x, const QwtArray< double > &y) |
void | setWidth (int 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 | width () |
~VectorCurve () | |
Public Member Functions inherited from DataCurve | |
void | addErrorBars (DataCurve *c) |
Adds a single error bars curve to the list of attached error bars. | |
void | clearErrorBars () |
Clears the list of attached error bars. | |
QList< QVector< double > > | convertData (const QList< Column * > &cols, const QList< int > &axes) const |
DataCurve (Table *t, const QString &xColName, const QString &name, int startRow=0, int endRow=-1) | |
int | endRow () |
QList< DataCurve * > | errorBarsList () |
The list of attached error bars. | |
bool | hasSelectedLabels () |
bool | isFullRange () |
void | remove () |
void | removeErrorBars (DataCurve *c) |
Remove a single error bars curve from the list of attached error bars. | |
void | setFullRange () |
void | setLabelsSelected (bool on=true) |
void | setRowRange (int startRow, int endRow) |
void | setVisible (bool on) |
void | setXColumnName (const QString &name) |
void | setYColumnName (const QString &name) |
int | startRow () |
Table * | table () |
int | tableRow (int point) |
Returns the row index in the data source table corresponding to the data point index. | |
QString | xColumnName () |
QString | yColumnName () |
Public Member Functions inherited from PlotCurve | |
PlotCurve (const QString &name=QString::null) | |
void | setType (int t) |
int | type () const |
Protected Attributes | |
QString | d_end_x_a |
QString | d_end_y_m |
int | d_headAngle |
int | d_headLength |
int | d_position |
bool | filledArrow |
QPen | pen |
QwtArrayData * | vectorEnd |
Protected Attributes inherited from DataCurve | |
int | d_end_row |
Last row of #d_tabel to be plotted, provided all relevant columns have valid entries. | |
QList< DataCurve * > | d_error_bars |
List of the error bar curves associated to this curve. | |
int | d_start_row |
First row of #d_tabel to be plotted, provided all relevant columns have valid entries. | |
Table * | d_table |
The data source table. | |
QString | d_x_column |
The name of the column used for abscissae values. | |
Protected Attributes inherited from PlotCurve | |
int | d_type |
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_end_x_a, d_end_y_m, d_headAngle, d_headLength, d_position, PlotCurve::d_type, filledArrow, pen, Tail, Graph::VectXYAM, Graph::VectXYXY, XYAM, and XYXY.
VectorCurve::~VectorCurve | ( | ) |
References vectorEnd.
QwtDoubleRect VectorCurve::boundingRect | ( | ) | const |
Reimplemented from PlotCurve.
References DataCurve::d_end_row, d_position, DataCurve::d_start_row, PlotCurve::d_type, Head, Middle, Tail, vectorEnd, and Graph::VectXYXY.
QColor VectorCurve::color | ( | ) |
References pen.
Referenced by Legend::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
void VectorCurve::copy | ( | const VectorCurve * | vc | ) |
References d_headAngle, d_headLength, d_position, PlotCurve::d_type, filledArrow, pen, PlotCurve::type(), and vectorEnd.
Referenced by Graph::copy().
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, PlotCurve::d_type, drawArrowHead(), Head, Middle, Tail, vectorEnd, and Graph::VectXYAM.
Referenced by draw().
void VectorCurve::fillArrowHead | ( | bool | fill | ) |
References filledArrow.
Referenced by Graph::updateVectorsLayout().
|
inline |
References filledArrow.
Referenced by Legend::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References d_headAngle.
Referenced by Legend::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References d_headLength.
Referenced by Legend::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
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::plotVectorCurve(), setVectorEnd(), and updateData().
|
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, PlotCurve::d_type, DataCurve::d_x_column, and Graph::VectXYAM.
Referenced by Graph::saveCurveLayout().
|
inline |
References d_position.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
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().
|
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 | ||
) |
References vectorEnd.
void VectorCurve::setWidth | ( | int | w | ) |
References pen.
Referenced by Graph::updateVectorsLayout().
double VectorCurve::theta | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1 | ||
) | const |
Referenced by drawArrowHead().
|
virtual |
Reimplemented from DataCurve.
References d_end_x_a, d_end_y_m, and DataCurve::d_x_column.
|
virtual |
Reimplemented from DataCurve.
References d_end_x_a, d_end_y_m, DataCurve::d_table, DataCurve::d_x_column, and loadData().
|
inline |
References d_end_x_a.
Referenced by AssociationsDialog::changePlotAssociation().
|
inline |
References d_end_y_m.
Referenced by AssociationsDialog::changePlotAssociation().
int VectorCurve::width | ( | ) |
References pen.
Referenced by Legend::drawVector(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
protected |
Referenced by loadData(), plotAssociation(), setVectorEnd(), updateColumnNames(), updateData(), VectorCurve(), and vectorEndXAColName().
|
protected |
Referenced by loadData(), plotAssociation(), setVectorEnd(), updateColumnNames(), updateData(), VectorCurve(), and vectorEndYMColName().
|
protected |
Referenced by copy(), drawArrowHead(), headAngle(), setHeadAngle(), and VectorCurve().
|
protected |
Referenced by copy(), drawArrowHead(), headLength(), setHeadLength(), and VectorCurve().
|
protected |
Referenced by boundingRect(), copy(), drawVector(), position(), setPosition(), and VectorCurve().
|
protected |
Referenced by copy(), drawArrowHead(), fillArrowHead(), filledArrowHead(), and VectorCurve().
|
protected |
Referenced by color(), copy(), draw(), drawArrowHead(), setColor(), setWidth(), VectorCurve(), and width().
|
protected |
Referenced by boundingRect(), copy(), drawVector(), setVectorEnd(), and ~VectorCurve().