#include <PlotCurve.h>
Public Member Functions | |
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. | |
void | clearLabels () |
Clears the list of attached text labels. | |
void | clone (DataCurve *c) |
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 | hasLabels () |
bool | hasSelectedLabels () |
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 QString | plotAssociation () |
A list of data sources for this curve. | |
void | remove () |
void | removeErrorBars (DataCurve *c) |
Remove a single error bars curve from the list of attached error bars. | |
QString | saveToString () |
bool | selectedLabels (const QPoint &pos) |
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 | 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. | |
virtual void | updateColumnNames (const QString &oldName, const QString &newName, bool updateTableName) |
virtual bool | updateData (Table *t, const QString &colName) |
void | updateLabelsPosition () |
QString | xColumnName () |
Protected Member Functions | |
void | loadLabels () |
bool | validCurveType () |
Protected Attributes | |
double | d_click_pos_x |
Keep track of the coordinates of the point where the user clicked when selecting the labels. | |
double | d_click_pos_y |
int | d_end_row |
QList< DataCurve * > | d_error_bars |
List of the error bar curves associated to this curve. | |
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. | |
QFont | d_labels_font |
QList< PlotMarker * > | d_labels_list |
List of the text labels associated to this curve. | |
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. | |
int | d_start_row |
Table * | d_table |
The data source table. | |
bool | d_white_out_labels |
QString | d_x_column |
The name of the column used for abscissae values. |
DataCurve::DataCurve | ( | Table * | t, | |
const QString & | xColName, | |||
const QString & | name, | |||
int | startRow = 0 , |
|||
int | endRow = -1 | |||
) |
References d_end_row, and Table::numRows().
void DataCurve::addErrorBars | ( | DataCurve * | c | ) | [inline] |
Adds a single error bars curve to the list of attached error bars.
References d_error_bars.
Referenced by QwtErrorPlotCurve::setMasterCurve().
void DataCurve::clearErrorBars | ( | ) |
void DataCurve::clearLabels | ( | ) |
Clears the list of attached text labels.
References d_labels_list, and validCurveType().
Referenced by 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_white_out_labels, labelsAlignment(), labelsColor(), labelsColumnName(), labelsFont(), labelsRotation(), labelsWhiteOut(), labelsXOffset(), labelsYOffset(), setLabelsColumnName(), and validCurveType().
int DataCurve::endRow | ( | ) | [inline] |
QList<DataCurve *> DataCurve::errorBarsList | ( | ) | [inline] |
The list of attached error bars.
References d_error_bars.
Referenced by ApplicationWindow::showCurveContextMenu().
bool DataCurve::hasLabels | ( | ) | [inline] |
bool DataCurve::hasSelectedLabels | ( | ) |
bool DataCurve::isFullRange | ( | ) |
References d_end_row, d_start_row, d_table, and Table::numRows().
Referenced by ApplicationWindow::showCurveContextMenu().
int DataCurve::labelsAlignment | ( | ) | [inline] |
QColor DataCurve::labelsColor | ( | ) | [inline] |
QString DataCurve::labelsColumnName | ( | ) | [inline] |
QFont DataCurve::labelsFont | ( | ) | [inline] |
double DataCurve::labelsRotation | ( | ) | [inline] |
bool DataCurve::labelsWhiteOut | ( | ) | [inline] |
int DataCurve::labelsXOffset | ( | ) | [inline] |
int DataCurve::labelsYOffset | ( | ) | [inline] |
void DataCurve::loadData | ( | ) | [virtual] |
Reimplemented in BoxCurve, QwtErrorPlotCurve, QwtHistogram, QwtPieCurve, and VectorCurve.
References Table::colIndex(), Table::columnFormat(), Table::columnType(), d_end_row, d_error_bars, d_labels_list, d_start_row, d_table, PlotCurve::d_type, d_x_column, Table::Date, Graph::HorizontalBars, loadLabels(), ScaleDraw::setDateTimeOrigin(), Graph::setLabelsTextFormat(), ScaleDraw::Text, Table::Text, Table::text(), and Table::Time.
Referenced by AssociationsDialog::changePlotAssociation(), setFullRange(), setRowRange(), and updateData().
void DataCurve::loadLabels | ( | ) | [protected] |
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_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 | ) |
References d_click_pos_x, d_click_pos_y, d_labels_list, d_labels_x_offset, d_labels_y_offset, d_selected_label, updateLabelsPosition(), and validCurveType().
Referenced by CanvasPicker::eventFilter().
QString DataCurve::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 in QwtErrorPlotCurve, 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 | ( | DataCurve * | c | ) |
Remove a single error bars curve from the list of attached error bars.
References d_error_bars.
Referenced by QwtErrorPlotCurve::detachFromMasterCurve().
QString DataCurve::saveToString | ( | ) |
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, d_white_out_labels, Graph::Function, PlotCurve::type(), and validCurveType().
Referenced by Graph::saveCurves().
bool DataCurve::selectedLabels | ( | const QPoint & | pos | ) |
References d_click_pos_x, d_click_pos_y, d_labels_list, d_selected_label, setLabelsSelected(), and validCurveType().
void DataCurve::setFullRange | ( | ) |
References d_end_row, d_error_bars, d_start_row, d_table, 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::acceptParams(), and Graph::restoreCurveLabels().
void DataCurve::setLabelsColor | ( | const QColor & | c | ) |
References d_labels_color, d_labels_list, and validCurveType().
Referenced by PlotDialog::acceptParams(), and Graph::restoreCurveLabels().
void DataCurve::setLabelsColumnName | ( | const QString & | name | ) |
References d_labels_column, d_labels_list, loadLabels(), and validCurveType().
Referenced by PlotDialog::acceptParams(), Graph::addCurves(), clone(), ImportOPJ::importGraphs(), and Graph::restoreCurveLabels().
void DataCurve::setLabelsFont | ( | const QFont & | font | ) |
References d_labels_font, d_labels_list, updateLabelsPosition(), and validCurveType().
Referenced by PlotDialog::chooseLabelsFont(), and Graph::restoreCurveLabels().
void DataCurve::setLabelsOffset | ( | int | x, | |
int | y | |||
) |
References d_labels_x_offset, d_labels_y_offset, updateLabelsPosition(), and validCurveType().
Referenced by PlotDialog::acceptParams(), and Graph::restoreCurveLabels().
void DataCurve::setLabelsRotation | ( | double | angle | ) |
References d_labels_angle, d_labels_list, PlotMarker::setAngle(), and validCurveType().
Referenced by PlotDialog::acceptParams(), and Graph::restoreCurveLabels().
void DataCurve::setLabelsSelected | ( | bool | on = true |
) |
References d_labels_font, d_labels_list, Graph::deselectMarker(), Graph::notifyFontChange(), Graph::selectTitle(), and validCurveType().
Referenced by selectedLabels().
void DataCurve::setLabelsWhiteOut | ( | bool | whiteOut = true |
) |
References d_labels_list, d_white_out_labels, and validCurveType().
Referenced by PlotDialog::acceptParams(), and Graph::restoreCurveLabels().
void DataCurve::setRowRange | ( | int | startRow, | |
int | endRow | |||
) |
References d_end_row, d_error_bars, d_start_row, and loadData().
Referenced by CurveRangeDialog::accept().
void DataCurve::setVisible | ( | bool | on | ) |
References d_error_bars, and setVisible().
Referenced by Graph::plotPie(), Graph::restoreHistogram(), and setVisible().
void DataCurve::setXColumnName | ( | const QString & | name | ) | [inline] |
int DataCurve::startRow | ( | ) | [inline] |
Table* DataCurve::table | ( | ) | [inline] |
References d_table.
Referenced by Graph::copy(), QwtErrorPlotCurve::loadData(), TranslateCurveTool::selectCurvePoint(), PlotDialog::setActiveCurve(), and CurveRangeDialog::setCurveToModify().
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, Table::text(), and Table::Time.
Referenced by TranslateCurveTool::selectDestination().
void DataCurve::updateColumnNames | ( | const QString & | oldName, | |
const QString & | newName, | |||
bool | updateTableName | |||
) | [virtual] |
bool DataCurve::updateData | ( | Table * | t, | |
const QString & | colName | |||
) | [virtual] |
Reimplemented in QwtErrorPlotCurve, and VectorCurve.
References d_labels_column, d_table, d_x_column, and loadData().
void DataCurve::updateLabelsPosition | ( | ) |
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().
bool DataCurve::validCurveType | ( | ) | [protected] |
References Graph::Box, Graph::ColorMap, Graph::Contour, Graph::ErrorBars, 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().
QString DataCurve::xColumnName | ( | ) | [inline] |
double DataCurve::d_click_pos_x [protected] |
Keep track of the coordinates of the point where the user clicked when selecting the labels.
Referenced by moveLabels(), and selectedLabels().
double DataCurve::d_click_pos_y [protected] |
Referenced by moveLabels(), and selectedLabels().
int DataCurve::d_end_row [protected] |
Referenced by DataCurve(), endRow(), QwtPieCurve::initLabels(), isFullRange(), VectorCurve::loadData(), QwtPieCurve::loadData(), QwtHistogram::loadData(), QwtErrorPlotCurve::loadData(), loadData(), BoxCurve::loadData(), loadLabels(), setFullRange(), QwtErrorPlotCurve::setMasterCurve(), setRowRange(), and tableRow().
QList<DataCurve *> DataCurve::d_error_bars [protected] |
List of the error bar curves associated to this curve.
Referenced by addErrorBars(), clearErrorBars(), errorBarsList(), VectorCurve::loadData(), loadData(), removeErrorBars(), setFullRange(), setRowRange(), and setVisible().
int DataCurve::d_labels_align [protected] |
Referenced by clone(), labelsAlignment(), loadLabels(), saveToString(), setLabelsAlignment(), and updateLabelsPosition().
double DataCurve::d_labels_angle [protected] |
Referenced by clone(), labelsRotation(), loadLabels(), saveToString(), and setLabelsRotation().
QColor DataCurve::d_labels_color [protected] |
Referenced by clone(), labelsColor(), loadLabels(), saveToString(), and setLabelsColor().
QString DataCurve::d_labels_column [protected] |
The name of the column used for text labels.
Referenced by labelsColumnName(), loadLabels(), VectorCurve::plotAssociation(), plotAssociation(), saveToString(), setLabelsColumnName(), and updateData().
QFont DataCurve::d_labels_font [protected] |
Referenced by clone(), labelsFont(), loadLabels(), saveToString(), setLabelsFont(), and setLabelsSelected().
QList<PlotMarker *> DataCurve::d_labels_list [protected] |
List of the text labels associated to this curve.
Referenced by clearLabels(), hasLabels(), hasSelectedLabels(), loadData(), loadLabels(), moveLabels(), saveToString(), selectedLabels(), setLabelsColor(), setLabelsColumnName(), setLabelsFont(), setLabelsRotation(), setLabelsSelected(), setLabelsWhiteOut(), and updateLabelsPosition().
int DataCurve::d_labels_x_offset [protected] |
Referenced by clone(), labelsXOffset(), loadLabels(), moveLabels(), saveToString(), setLabelsOffset(), and updateLabelsPosition().
int DataCurve::d_labels_y_offset [protected] |
Referenced by clone(), labelsYOffset(), loadLabels(), moveLabels(), saveToString(), setLabelsOffset(), and updateLabelsPosition().
PlotMarker* DataCurve::d_selected_label [protected] |
Keeps track of the plot marker on which the user clicked when selecting the labels.
Referenced by moveLabels(), and selectedLabels().
int DataCurve::d_start_row [protected] |
Referenced by QwtPieCurve::initLabels(), isFullRange(), VectorCurve::loadData(), QwtPieCurve::loadData(), QwtHistogram::loadData(), QwtErrorPlotCurve::loadData(), loadData(), BoxCurve::loadData(), loadLabels(), setFullRange(), QwtErrorPlotCurve::setMasterCurve(), setRowRange(), startRow(), and tableRow().
Table* DataCurve::d_table [protected] |
The data source table.
Referenced by isFullRange(), VectorCurve::loadData(), QwtPieCurve::loadData(), QwtHistogram::loadData(), QwtErrorPlotCurve::loadData(), loadData(), BoxCurve::loadData(), loadLabels(), setFullRange(), table(), tableRow(), VectorCurve::updateData(), QwtErrorPlotCurve::updateData(), and updateData().
bool DataCurve::d_white_out_labels [protected] |
Referenced by clone(), labelsWhiteOut(), loadLabels(), saveToString(), and setLabelsWhiteOut().
QString DataCurve::d_x_column [protected] |
The name of the column used for abscissae values.
Referenced by VectorCurve::loadData(), loadData(), loadLabels(), VectorCurve::plotAssociation(), plotAssociation(), setXColumnName(), tableRow(), VectorCurve::updateColumnNames(), updateColumnNames(), VectorCurve::updateData(), updateData(), and xColumnName().