32 #include <qwt_plot_curve.h>
33 #include <qwt_plot_marker.h>
45 PlotCurve(
const QString& name = QString());
76 virtual void drawCurve(QPainter *p,
int style,
const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
int from,
int to)
const;
77 void drawSideLines(QPainter *p,
const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
int from,
int to)
const;
79 virtual void drawSymbols(QPainter *p,
const QwtSymbol &,
80 const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
int from,
int to)
const;
83 const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
int from,
int to)
const;
173 virtual void updateColumnNames(
const QString& oldName,
const QString& newName,
bool updateTableName);
198 virtual void drawCurve(QPainter *p,
int style,
const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
int from,
int to)
const;
254 void draw(QPainter *p,
const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
const QRect &r)
const;
QString saveCurveLayout()
Definition: PlotCurve.cpp:121
std::vector< DataRange > d_data_ranges
Definition: PlotCurve.h:234
void setLabelsSelected(bool on=true)
Definition: PlotCurve.cpp:1146
QString xColumnName()
Definition: PlotCurve.h:114
PlotMarker(int index, double angle)
Definition: PlotCurve.cpp:1208
int labelsAlignment()
Definition: PlotCurve.h:121
int d_plot_style
Definition: PlotCurve.h:90
DataCurve(Table *t, const QString &xColName, const QString &name, int startRow=0, int endRow=-1)
Definition: PlotCurve.cpp:385
int tableRow(int point)
Returns the row index in the data source table corresponding to the data point index.
Definition: PlotCurve.cpp:718
void setLabelsColor(const QColor &c)
Definition: PlotCurve.cpp:890
virtual void updateLabelsPosition()
Definition: PlotCurve.cpp:919
int d_labels_x_offset
Definition: PlotCurve.h:231
bool hasSelectedLabels()
Definition: PlotCurve.cpp:1131
QFont labelsFont()
Definition: PlotCurve.h:131
double d_x_offset
Definition: PlotCurve.h:91
PlotCurve(const QString &name=QString())
Definition: PlotCurve.cpp:51
virtual void drawCurve(QPainter *p, int style, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
Definition: PlotCurve.cpp:272
QColor d_labels_color
Definition: PlotCurve.h:226
void setXOffset(double dx)
Definition: PlotCurve.h:58
int d_start_row
Definition: PlotCurve.h:215
void setDataSource(Table *yt, int ycol=1, Table *xt=NULL, int xcol=0)
Definition: PlotCurve.cpp:510
QList< PlotMarker * > d_labels_list
List of the text labels associated to this curve.
Definition: PlotCurve.h:222
Error bars curve.
Definition: ErrorBarsCurve.h:36
void clearLabels()
Clears the list of attached text labels.
Definition: PlotCurve.cpp:858
void setAngle(double a)
Definition: PlotCurve.h:246
int d_type
Definition: PlotCurve.h:88
bool validCurveType()
Definition: PlotCurve.cpp:1172
int d_index
Definition: PlotCurve.h:256
Definition: PlotCurve.h:101
double d_click_pos_y
Definition: PlotCurve.h:224
void setLabelsRotation(double angle)
Definition: PlotCurve.cpp:965
double d_label_y_offset
y coordinate offset
Definition: PlotCurve.h:261
bool d_side_lines
Definition: PlotCurve.h:92
Table * d_table
The data source table.
Definition: PlotCurve.h:206
void setLabelOffset(double xOffset, double yOffset)
Definition: PlotCurve.h:250
double labelsRotation()
Definition: PlotCurve.h:128
void setLabelsColumnName(const QString &name)
Definition: PlotCurve.cpp:781
virtual QString saveToString()
Definition: PlotCurve.cpp:1019
int endRow()
Definition: PlotCurve.h:145
void drawSideLines(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
Definition: PlotCurve.cpp:358
void clearErrorBars()
Clears the list of attached error bars.
Definition: PlotCurve.cpp:691
QFont d_labels_font
Definition: PlotCurve.h:227
void setVisibleLabels(bool on=true)
Definition: PlotCurve.h:188
virtual void updateColumnNames(const QString &oldName, const QString &newName, bool updateTableName)
Definition: PlotCurve.cpp:474
QString saveCurveSymbolImage()
Definition: PlotCurve.cpp:99
QString d_labels_column
The name of the column used for text labels.
Definition: PlotCurve.h:219
bool isFullRange()
Definition: PlotCurve.cpp:454
PlotMarker * d_selected_label
Keeps track of the plot marker on which the user clicked when selecting the labels.
Definition: PlotCurve.h:233
virtual void loadLabels()
Definition: PlotCurve.cpp:793
bool d_white_out_labels
Definition: PlotCurve.h:229
QString d_x_column
The name of the column used for abscissae values.
Definition: PlotCurve.h:213
void setVisible(bool on)
Definition: PlotCurve.cpp:709
void restoreLabels(const QStringList &lst)
Definition: PlotCurve.cpp:1053
virtual void drawSymbols(QPainter *p, const QwtSymbol &, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
Draw symbols.
Definition: PlotCurve.cpp:332
void setIndex(int i)
Definition: PlotCurve.h:243
bool sideLinesEnabled()
Definition: PlotCurve.h:63
bool d_show_labels
Definition: PlotCurve.h:230
bool hasVisibleLabels()
Definition: PlotCurve.h:189
Table * xTable()
Definition: PlotCurve.h:141
void setFullRange()
Definition: PlotCurve.cpp:443
bool hasLabels()
Definition: PlotCurve.h:117
Table * table()
Definition: PlotCurve.h:140
virtual void drawCurve(QPainter *p, int style, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
Definition: PlotCurve.cpp:537
int labelsYOffset()
Definition: PlotCurve.h:125
int index()
Definition: PlotCurve.h:242
double d_click_pos_x
Keep track of the coordinates of the point where the user clicked when selecting the labels...
Definition: PlotCurve.h:224
int plotStyle()
The plot style of the curve.
Definition: PlotCurve.h:54
void setRowRange(int startRow, int endRow)
Definition: PlotCurve.cpp:429
int d_labels_align
Definition: PlotCurve.h:231
Definition: PlotCurve.h:96
void setLabelsAlignment(int flags)
Definition: PlotCurve.cpp:907
double yOffset()
Definition: PlotCurve.h:60
int d_skip_symbols
Definition: PlotCurve.h:93
void setXColumnName(const QString &name)
Definition: PlotCurve.h:115
void addErrorBars(ErrorBarsCurve *c)
Adds a single error bars curve to the list of attached error bars.
Definition: PlotCurve.h:178
Definition: PlotCurve.h:237
void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &r) const
Does the actual drawing; see QwtPlotItem::draw.
Definition: PlotCurve.cpp:1215
double d_angle
Definition: PlotCurve.h:257
bool selectedLabels(const QPoint &pos)
Definition: PlotCurve.cpp:1102
void drawSticks(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
Definition: PlotCurve.cpp:290
void setLabelsFont(const QFont &font)
Definition: PlotCurve.cpp:872
int labelsXOffset()
Definition: PlotCurve.h:124
double xLabelOffset()
Definition: PlotCurve.h:248
int startRow()
Definition: PlotCurve.h:144
QList< ErrorBarsCurve * > errorBarsList()
The list of attached error bars.
Definition: PlotCurve.h:176
void enableSideLines(bool on)
Definition: PlotCurve.h:64
void removeErrorBars(ErrorBarsCurve *c)
Remove a single error bars curve from the list of attached error bars.
Definition: PlotCurve.cpp:681
double yLabelOffset()
Definition: PlotCurve.h:249
double angle()
Definition: PlotCurve.h:245
Table * d_x_table
The data source table in case X and Y datasets are from different tables.
Definition: PlotCurve.h:208
void enableSpeedMode()
Definition: PlotCurve.cpp:523
void setType(int t)
Definition: PlotCurve.h:49
void setLabelsOffset(int x, int y)
Definition: PlotCurve.cpp:952
void setPlotStyle(int s)
Definition: PlotCurve.h:55
Abstract 2D plot curve class.
Definition: PlotCurve.h:41
void setYOffset(double dy)
Definition: PlotCurve.h:61
int d_end_row
Definition: PlotCurve.h:216
int skipSymbolsCount()
Returns the number of symbols not to be drawn.
Definition: PlotCurve.h:73
int d_labels_y_offset
Definition: PlotCurve.h:231
void setSkipSymbolsCount(int count)
Set the number of symbols not to be drawn: usefull for large data sets.
Definition: PlotCurve.cpp:313
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
double d_labels_angle
Definition: PlotCurve.h:228
void restoreCurveLayout(const QStringList &lst)
Definition: PlotCurve.cpp:183
double d_label_x_offset
x coordinate offset
Definition: PlotCurve.h:259
QwtDoubleRect boundingRect() const
Definition: PlotCurve.cpp:64
double xOffset()
Definition: PlotCurve.h:57
int type()
Sort of rtti()
Definition: PlotCurve.h:48
double d_y_offset
Definition: PlotCurve.h:91
QString labelsColumnName()
Definition: PlotCurve.h:118
QList< ErrorBarsCurve * > d_error_bars
List of the error bar curves associated to this curve.
Definition: PlotCurve.h:204
unsigned int to
Definition: PlotCurve.h:104
void clone(DataCurve *c)
Definition: PlotCurve.cpp:999
void setLabelsWhiteOut(bool whiteOut=true)
Definition: PlotCurve.cpp:979
void moveLabels(const QPoint &pos)
Definition: PlotCurve.cpp:1182
bool labelsWhiteOut()
Definition: PlotCurve.h:137
QColor labelsColor()
Definition: PlotCurve.h:134
virtual void loadData()
Definition: PlotCurve.cpp:553
unsigned int from
Definition: PlotCurve.h:103
virtual bool updateData(Table *t, const QString &colName)
Definition: PlotCurve.cpp:498
virtual QStringList plotAssociation()
A list of data sources for this curve.
Definition: PlotCurve.cpp:462