QtiPlot
0.9.8.2
|
#include <PlotCurve.h>
Classes | |
struct | DataRange |
Public Member Functions | |
void | addErrorBars (ErrorBarsCurve *c) |
Adds a single error bars curve to the list of attached error bars. More... | |
void | clearErrorBars () |
Clears the list of attached error bars. More... | |
void | clearLabels () |
Clears the list of attached text labels. More... | |
void | clone (DataCurve *c) |
DataCurve (Table *t, const QString &xColName, const QString &name, int startRow=0, int endRow=-1) | |
DataCurve (Table *xt, const QString &xColName, Table *yt, const QString &name, int startRow=0, int endRow=-1) | |
void | enableSpeedMode () |
int | endRow () |
QList< ErrorBarsCurve * > | errorBarsList () |
The list of attached error bars. More... | |
bool | hasLabels () |
bool | hasSelectedLabels () |
bool | hasVisibleLabels () |
bool | isFullRange () |
int | labelsAlignment () |
QColor | labelsColor () |
QString | labelsColumnName () |
QFont | labelsFont () |
double | labelsRotation () |
bool | labelsWhiteOut () |
int | labelsXOffset () |
int | labelsYOffset () |
virtual void | loadData () |
void | moveLabels (const QPoint &pos) |
virtual QStringList | plotAssociation () |
A list of data sources for this curve. More... | |
void | remove () |
void | removeErrorBars (ErrorBarsCurve *c) |
Remove a single error bars curve from the list of attached error bars. More... | |
void | restoreLabels (const QStringList &lst) |
virtual QString | saveToString () |
bool | selectedLabels (const QPoint &pos) |
void | setDataSource (Table *yt, int ycol=1, Table *xt=NULL, int xcol=0) |
void | setFullRange () |
void | setLabelsAlignment (int flags) |
void | setLabelsColor (const QColor &c) |
void | setLabelsColumnName (const QString &name) |
void | setLabelsFont (const QFont &font) |
void | setLabelsOffset (int x, int y) |
void | setLabelsRotation (double angle) |
void | setLabelsSelected (bool on=true) |
void | setLabelsWhiteOut (bool whiteOut=true) |
void | setRowRange (int startRow, int endRow) |
void | setVisible (bool on) |
void | setVisibleLabels (bool on=true) |
void | setXColumnName (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. More... | |
virtual void | updateColumnNames (const QString &oldName, const QString &newName, bool updateTableName) |
virtual bool | updateData (Table *t, const QString &colName) |
virtual void | updateLabelsPosition () |
QString | xColumnName () |
Table * | xTable () |
![]() | |
void | enableSideLines (bool on) |
PlotCurve (const QString &name=QString()) | |
int | plotStyle () |
The plot style of the curve. More... | |
void | restoreCurveLayout (const QStringList &lst) |
QString | saveCurveLayout () |
QString | saveCurveSymbolImage () |
void | setPlotStyle (int s) |
void | setSkipSymbolsCount (int count) |
Set the number of symbols not to be drawn: usefull for large data sets. More... | |
void | setType (int t) |
void | setXOffset (double dx) |
void | setYOffset (double dy) |
bool | sideLinesEnabled () |
int | skipSymbolsCount () |
Returns the number of symbols not to be drawn. More... | |
int | type () |
Sort of rtti() More... | |
double | xOffset () |
double | yOffset () |
Protected Member Functions | |
virtual void | drawCurve (QPainter *p, int style, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const |
virtual void | loadLabels () |
bool | validCurveType () |
![]() | |
QwtDoubleRect | boundingRect () const |
void | drawSideLines (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const |
void | drawSticks (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const |
virtual void | drawSymbols (QPainter *p, const QwtSymbol &, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const |
Draw symbols. More... | |
Protected Attributes | |
double | d_click_pos_x |
Keep track of the coordinates of the point where the user clicked when selecting the labels. More... | |
double | d_click_pos_y |
std::vector< DataRange > | d_data_ranges |
int | d_end_row |
QList< ErrorBarsCurve * > | d_error_bars |
List of the error bar curves associated to this curve. More... | |
int | d_labels_align |
double | d_labels_angle |
QColor | d_labels_color |
QString | d_labels_column |
The name of the column used for text labels. More... | |
QFont | d_labels_font |
QList< PlotMarker * > | d_labels_list |
List of the text labels associated to this curve. More... | |
int | d_labels_x_offset |
int | d_labels_y_offset |
PlotMarker * | d_selected_label |
Keeps track of the plot marker on which the user clicked when selecting the labels. More... | |
bool | d_show_labels |
int | d_start_row |
Table * | d_table |
The data source table. More... | |
bool | d_white_out_labels |
QString | d_x_column |
The name of the column used for abscissae values. More... | |
Table * | d_x_table |
The data source table in case X and Y datasets are from different tables. More... | |
![]() | |
int | d_plot_style |
bool | d_side_lines |
int | d_skip_symbols |
int | d_type |
double | d_x_offset |
double | d_y_offset |
DataCurve::DataCurve | ( | Table * | t, |
const QString & | xColName, | ||
const QString & | name, | ||
int | startRow = 0 , |
||
int | endRow = -1 |
||
) |
References d_end_row, and Table::numRows().
DataCurve::DataCurve | ( | Table * | xt, |
const QString & | xColName, | ||
Table * | yt, | ||
const QString & | name, | ||
int | startRow = 0 , |
||
int | endRow = -1 |
||
) |
References d_end_row, and Table::numRows().
|
inline |
Adds a single error bars curve to the list of attached error bars.
Referenced by ErrorBarsCurve::setMasterCurve().
void DataCurve::clearErrorBars | ( | ) |
Clears the list of attached error bars.
References d_error_bars, and remove().
void DataCurve::clearLabels | ( | ) |
Clears the list of attached text labels.
References d_labels_list, d_show_labels, and validCurveType().
Referenced by PlotDialog::acceptParams(), QwtHistogram::loadLabels(), BoxCurve::loadLabels(), and loadLabels().
void DataCurve::clone | ( | DataCurve * | c | ) |
References d_labels_align, d_labels_angle, d_labels_color, d_labels_font, d_labels_x_offset, d_labels_y_offset, d_show_labels, PlotCurve::d_skip_symbols, d_white_out_labels, hasVisibleLabels(), labelsAlignment(), labelsColor(), labelsColumnName(), labelsFont(), labelsRotation(), labelsWhiteOut(), labelsXOffset(), labelsYOffset(), setLabelsColumnName(), PlotCurve::skipSymbolsCount(), and validCurveType().
Referenced by BoxCurve::copy().
|
protectedvirtual |
Reimplemented from PlotCurve.
References d_data_ranges, PlotCurve::d_side_lines, PlotCurve::drawCurve(), PlotCurve::drawSideLines(), and Graph::isMissingDataGapEnabled().
void DataCurve::enableSpeedMode | ( | ) |
References Graph::getDouglasPeukerTolerance(), and Graph::speedModeMaxPoints().
Referenced by Graph::insertCurve(), and loadData().
|
inline |
Referenced by ErrDialog::add(), Graph::analysableCurvesList(), Graph::copyCurves(), Graph::curveRange(), SubtractLineTool::finalize(), SubtractDataDialog::interpolate(), ErrorBarsCurve::loadData(), Graph::masterCurve(), Graph::saveCurves(), Graph::savePieCurveLayout(), CurveRangeDialog::setCurvesToModify(), ErrorBarsCurve::setMasterCurve(), setRowRange(), CurvesDialog::showCurveRange(), and BaselineDialog::subtractBaseline().
|
inline |
The list of attached error bars.
Referenced by Fit::setWeightingData().
|
inline |
Referenced by Graph::closestCurve().
bool DataCurve::hasSelectedLabels | ( | ) |
References d_labels_list, and validCurveType().
Referenced by PlotDialog::insertTabs().
|
inline |
References PlotCurve::drawCurve().
Referenced by clone(), and PlotDialog::setActiveCurve().
bool DataCurve::isFullRange | ( | ) |
References d_end_row, d_start_row, d_table, and Table::numRows().
|
inline |
Referenced by clone(), and PlotDialog::setActiveCurve().
|
inline |
Referenced by clone(), and PlotDialog::setActiveCurve().
|
inline |
Referenced by clone(), and PlotDialog::setActiveCurve().
|
inline |
Referenced by clone().
|
inline |
Referenced by clone(), and PlotDialog::setActiveCurve().
|
inline |
Referenced by clone(), and PlotDialog::setActiveCurve().
|
inline |
Referenced by clone(), and PlotDialog::setActiveCurve().
|
inline |
Referenced by clone(), and PlotDialog::setActiveCurve().
|
virtual |
Reimplemented in BoxCurve, ErrorBarsCurve, PieCurve, VectorCurve, and QwtHistogram.
References Table::colIndex(), Table::columnFormat(), Table::columnType(), Graph::curveCount(), Graph::curveIndex(), d_data_ranges, d_end_row, d_error_bars, d_labels_list, d_start_row, d_table, PlotCurve::d_type, d_x_column, PlotCurve::d_x_offset, d_x_table, PlotCurve::d_y_offset, Graph::dataCurve(), Table::Date, enableSpeedMode(), DataCurve::DataRange::from, Table::fromDateTime(), Table::fromTime(), Graph::grid(), Graph::HorizontalBars, Graph::isCurveAntialiasingEnabled(), Graph::isWaterfallPlot(), loadLabels(), Graph::setLabelsTextFormat(), ScaleDraw::Text, Table::Text, Table::text(), Table::Time, DataCurve::DataRange::to, Graph::waterfallXOffset(), and Graph::waterfallYOffset().
Referenced by CurvesDialog::addCurveFromTable(), AssociationsDialog::changePlotAssociation(), Graph::insertCurve(), setDataSource(), setFullRange(), setRowRange(), updateData(), and Graph::updateDataCurves().
|
protectedvirtual |
Reimplemented in BoxCurve, and QwtHistogram.
References clearLabels(), Table::colIndex(), d_end_row, d_labels_align, d_labels_angle, d_labels_color, d_labels_column, d_labels_font, d_labels_list, d_labels_x_offset, d_labels_y_offset, d_show_labels, d_start_row, d_table, d_white_out_labels, d_x_column, Table::numCols(), Table::text(), and validCurveType().
Referenced by loadData(), and setLabelsColumnName().
void DataCurve::moveLabels | ( | const QPoint & | pos | ) |
|
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 in ErrorBarsCurve, and VectorCurve.
References d_labels_column, and d_x_column.
Referenced by AssociationsDialog::changePlotAssociation(), Graph::masterCurve(), and Graph::updateCurveNames().
void DataCurve::remove | ( | ) |
References Graph::removeCurve().
Referenced by AssociationsDialog::changePlotAssociation(), and clearErrorBars().
void DataCurve::removeErrorBars | ( | ErrorBarsCurve * | c | ) |
Remove a single error bars curve from the list of attached error bars.
References d_error_bars.
Referenced by ErrorBarsCurve::detachFromMasterCurve().
void DataCurve::restoreLabels | ( | const QStringList & | lst | ) |
References setLabelsAlignment(), setLabelsColor(), setLabelsColumnName(), setLabelsFont(), setLabelsOffset(), setLabelsRotation(), and setLabelsWhiteOut().
Referenced by Graph::restoreCurveLabels().
|
virtual |
Reimplemented in QwtBarCurve.
References Graph::Box, d_labels_align, d_labels_angle, d_labels_color, d_labels_column, d_labels_font, d_labels_list, d_labels_x_offset, d_labels_y_offset, PlotCurve::d_skip_symbols, d_white_out_labels, Graph::Function, PlotCurve::saveCurveSymbolImage(), PlotCurve::type(), and validCurveType().
Referenced by Graph::saveCurves(), QwtBarCurve::saveToString(), and PieLabel::setPieCurve().
bool DataCurve::selectedLabels | ( | const QPoint & | pos | ) |
References d_click_pos_x, d_click_pos_y, d_labels_angle, d_labels_list, d_selected_label, setLabelsSelected(), and validCurveType().
Referenced by Graph::closestCurve().
References Table::colName(), d_table, d_x_column, d_x_table, and loadData().
void DataCurve::setFullRange | ( | ) |
References d_end_row, d_error_bars, d_start_row, d_table, ErrorBarsCurve::loadData(), loadData(), and Table::numRows().
Referenced by DrawPointTool::appendPoint(), and Graph::setCurveFullRange().
void DataCurve::setLabelsAlignment | ( | int | flags | ) |
References d_labels_align, updateLabelsPosition(), and validCurveType().
Referenced by PlotDialog::applyLabelsFormatToItem(), and restoreLabels().
void DataCurve::setLabelsColor | ( | const QColor & | c | ) |
References d_labels_color, d_labels_list, and validCurveType().
Referenced by PlotDialog::applyLabelsFormatToItem(), and restoreLabels().
void DataCurve::setLabelsColumnName | ( | const QString & | name | ) |
References d_labels_column, d_labels_list, loadLabels(), and validCurveType().
Referenced by PlotDialog::acceptParams(), Graph::addCurves(), clone(), and restoreLabels().
void DataCurve::setLabelsFont | ( | const QFont & | font | ) |
References d_labels_font, d_labels_list, updateLabelsPosition(), and validCurveType().
Referenced by restoreLabels().
void DataCurve::setLabelsOffset | ( | int | x, |
int | y | ||
) |
References d_labels_x_offset, d_labels_y_offset, updateLabelsPosition(), and validCurveType().
Referenced by PlotDialog::applyLabelsFormatToItem(), and restoreLabels().
void DataCurve::setLabelsRotation | ( | double | angle | ) |
References d_labels_angle, d_labels_list, PlotMarker::setAngle(), and validCurveType().
Referenced by PlotDialog::applyLabelsFormatToItem(), and restoreLabels().
void DataCurve::setLabelsSelected | ( | bool | on = true | ) |
References d_labels_color, d_labels_font, d_labels_list, Graph::deselectMarker(), Graph::notifyColorChange(), Graph::notifyFontChange(), Graph::selectTitle(), and validCurveType().
Referenced by PlotDialog::insertTabs(), and selectedLabels().
void DataCurve::setLabelsWhiteOut | ( | bool | whiteOut = true | ) |
References d_labels_list, d_white_out_labels, and validCurveType().
Referenced by PlotDialog::applyLabelsFormatToItem(), and restoreLabels().
void DataCurve::setRowRange | ( | int | startRow, |
int | endRow | ||
) |
References d_end_row, d_error_bars, d_start_row, endRow(), ErrorBarsCurve::loadData(), loadData(), and startRow().
Referenced by CurveRangeDialog::accept().
void DataCurve::setVisible | ( | bool | on | ) |
References d_error_bars, d_labels_list, and setVisible().
Referenced by Graph::plotPie(), Graph::restoreHistogram(), and setVisible().
|
inline |
|
inline |
Referenced by AssociationsDialog::changePlotAssociation().
|
inline |
Referenced by ErrDialog::add(), Graph::analysableCurvesList(), Graph::copyCurves(), Graph::curveRange(), SubtractLineTool::finalize(), SubtractDataDialog::interpolate(), ErrorBarsCurve::loadData(), Graph::masterCurve(), Graph::saveCurves(), Graph::savePieCurveLayout(), CurveRangeDialog::setCurvesToModify(), ErrorBarsCurve::setMasterCurve(), setRowRange(), CurvesDialog::showCurveRange(), and BaselineDialog::subtractBaseline().
|
inline |
Referenced by PlotDialog::acceptParams(), Graph::copyCurves(), RangeSelectorTool::emitStatusText(), SubtractLineTool::finalize(), SubtractDataDialog::interpolate(), ErrorBarsCurve::loadData(), Graph::parseAxisTitle(), TranslateCurveTool::selectCurvePoint(), DataPickerTool::selectTableRow(), PlotDialog::setActiveCurve(), CurveRangeDialog::setCurvesToModify(), DataPickerTool::setSelection(), and BaselineDialog::subtractBaseline().
int DataCurve::tableRow | ( | int | point | ) |
Returns the row index in the data source table corresponding to the data point index.
References Table::cell(), Table::colIndex(), Table::columnFormat(), Table::columnType(), d_end_row, d_start_row, d_table, PlotCurve::d_type, d_x_column, Table::Date, Graph::HorizontalBars, Graph::Pie, Table::Text, Table::text(), and Table::Time.
Referenced by RangeSelectorTool::emitStatusText(), TranslateCurveTool::selectDestination(), DataPickerTool::selectTableRow(), and DataPickerTool::setSelection().
|
virtual |
|
virtual |
Reimplemented in ErrorBarsCurve, and VectorCurve.
References d_labels_column, d_table, d_x_column, and loadData().
|
virtual |
Reimplemented in BoxCurve.
References d_labels_align, d_labels_list, d_labels_x_offset, d_labels_y_offset, PlotMarker::index(), and validCurveType().
Referenced by moveLabels(), setLabelsAlignment(), setLabelsFont(), and setLabelsOffset().
|
protected |
References Graph::ColorMap, Graph::Contour, Graph::Function, Graph::GrayScale, Graph::ImagePlot, Graph::Pie, and PlotCurve::type().
Referenced by clearLabels(), clone(), hasSelectedLabels(), loadLabels(), moveLabels(), saveToString(), selectedLabels(), setLabelsAlignment(), setLabelsColor(), setLabelsColumnName(), setLabelsFont(), setLabelsOffset(), setLabelsRotation(), setLabelsSelected(), setLabelsWhiteOut(), and updateLabelsPosition().
|
inline |
Referenced by ErrDialog::add(), Graph::copyCurves(), RangeSelectorTool::emitStatusText(), SubtractDataDialog::interpolate(), ErrorBarsCurve::loadData(), Graph::parseAxisTitle(), ErrorBarsCurve::plotAssociation(), Graph::saveCurves(), TranslateCurveTool::selectCurvePoint(), TranslateCurveTool::selectDestination(), DataPickerTool::setSelection(), and BaselineDialog::subtractBaseline().
|
inline |
Referenced by Graph::copyCurves(), RangeSelectorTool::emitStatusText(), and DataPickerTool::setSelection().
|
protected |
Keep track of the coordinates of the point where the user clicked when selecting the labels.
Referenced by moveLabels(), and selectedLabels().
|
protected |
Referenced by moveLabels(), and selectedLabels().
|
protected |
Referenced by drawCurve(), and loadData().
|
protected |
|
protected |
List of the error bar curves associated to this curve.
Referenced by clearErrorBars(), VectorCurve::loadData(), loadData(), removeErrorBars(), setFullRange(), setRowRange(), and setVisible().
|
protected |
|
protected |
Referenced by clone(), BoxCurve::createLabel(), QwtHistogram::loadLabels(), loadLabels(), saveToString(), selectedLabels(), and setLabelsRotation().
|
protected |
Referenced by clone(), BoxCurve::createLabel(), QwtHistogram::loadLabels(), loadLabels(), saveToString(), setLabelsColor(), and setLabelsSelected().
|
protected |
The name of the column used for text labels.
Referenced by loadLabels(), VectorCurve::plotAssociation(), plotAssociation(), saveToString(), setLabelsColumnName(), and updateData().
|
protected |
Referenced by clone(), BoxCurve::createLabel(), QwtHistogram::loadLabels(), loadLabels(), saveToString(), setLabelsFont(), and setLabelsSelected().
|
protected |
List of the text labels associated to this curve.
Referenced by clearLabels(), BoxCurve::createLabel(), hasSelectedLabels(), loadData(), QwtHistogram::loadLabels(), loadLabels(), moveLabels(), saveToString(), selectedLabels(), setLabelsColor(), setLabelsColumnName(), setLabelsFont(), setLabelsRotation(), setLabelsSelected(), setLabelsWhiteOut(), setVisible(), BoxCurve::updateLabels(), and updateLabelsPosition().
|
protected |
|
protected |
|
protected |
Keeps track of the plot marker on which the user clicked when selecting the labels.
Referenced by moveLabels(), and selectedLabels().
|
protected |
|
protected |
|
protected |
The data source table.
Referenced by PieCurve::initLabels(), isFullRange(), QwtHistogram::loadData(), VectorCurve::loadData(), ErrorBarsCurve::loadData(), PieCurve::loadData(), BoxCurve::loadData(), loadData(), loadLabels(), setDataSource(), setFullRange(), tableRow(), VectorCurve::updateData(), ErrorBarsCurve::updateData(), and updateData().
|
protected |
Referenced by clone(), BoxCurve::createLabel(), QwtHistogram::loadLabels(), loadLabels(), saveToString(), and setLabelsWhiteOut().
|
protected |
The name of the column used for abscissae values.
Referenced by VectorCurve::loadData(), loadData(), loadLabels(), VectorCurve::plotAssociation(), plotAssociation(), setDataSource(), tableRow(), VectorCurve::updateColumnNames(), updateColumnNames(), VectorCurve::updateData(), and updateData().
|
protected |
The data source table in case X and Y datasets are from different tables.
Referenced by loadData(), and setDataSource().