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;
107 DataCurve(
Table *t,
const QString& xColName,
const QString& name,
int startRow = 0,
int endRow = -1);
108 DataCurve(
Table *xt,
const QString& xColName,
Table *yt,
const QString& name,
int startRow = 0,
int endRow = -1);
111 virtual QString saveToString();
112 void restoreLabels(
const QStringList& lst);
119 void setLabelsColumnName(
const QString& name);
122 void setLabelsAlignment(
int flags);
126 void setLabelsOffset(
int x,
int y);
129 void setLabelsRotation(
double angle);
132 void setLabelsFont(
const QFont& font);
135 void setLabelsColor(
const QColor& c);
138 void setLabelsWhiteOut(
bool whiteOut =
true);
142 void setDataSource(
Table *yt,
int ycol = 1,
Table *xt = NULL,
int xcol = 0);
146 void setRowRange(
int startRow,
int endRow);
151 virtual bool updateData(
Table *t,
const QString& colName);
152 virtual void loadData();
153 void enableSpeedMode();
156 int tableRow(
int point);
172 virtual QStringList plotAssociation();
173 virtual void updateColumnNames(
const QString& oldName,
const QString& newName,
bool updateTableName);
182 void clearErrorBars();
186 void setVisible(
bool on);
190 bool selectedLabels(
const QPoint& pos);
191 bool hasSelectedLabels();
192 void setLabelsSelected(
bool on =
true);
194 void moveLabels(
const QPoint& pos);
195 virtual void updateLabelsPosition();
198 virtual void drawCurve(QPainter *p,
int style,
const QwtScaleMap &xMap,
const QwtScaleMap &yMap,
int from,
int to)
const;
200 bool validCurveType();
201 virtual void loadLabels();
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
QString xColumnName()
Definition: PlotCurve.h:114
int labelsAlignment()
Definition: PlotCurve.h:121
int d_plot_style
Definition: PlotCurve.h:90
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
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 setAngle(double a)
Definition: PlotCurve.h:246
int d_type
Definition: PlotCurve.h:88
int d_index
Definition: PlotCurve.h:256
Definition: PlotCurve.h:101
double d_click_pos_y
Definition: PlotCurve.h:224
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
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
QFont d_labels_font
Definition: PlotCurve.h:227
void setVisibleLabels(bool on=true)
Definition: PlotCurve.h:188
QString saveCurveSymbolImage()
Definition: PlotCurve.cpp:99
QString d_labels_column
The name of the column used for text labels.
Definition: PlotCurve.h:219
PlotMarker * d_selected_label
Keeps track of the plot marker on which the user clicked when selecting the labels.
Definition: PlotCurve.h:233
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
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
bool hasLabels()
Definition: PlotCurve.h:117
Table * table()
Definition: PlotCurve.h:140
int labelsYOffset()
Definition: PlotCurve.h:125
int index()
Definition: PlotCurve.h:242
int plotStyle()
The plot style of the curve.
Definition: PlotCurve.h:54
Definition: PlotCurve.h:96
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
double d_angle
Definition: PlotCurve.h:257
void drawSticks(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
Definition: PlotCurve.cpp:290
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
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 setType(int t)
Definition: PlotCurve.h:49
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
bool labelsWhiteOut()
Definition: PlotCurve.h:137
QColor labelsColor()
Definition: PlotCurve.h:134
unsigned int from
Definition: PlotCurve.h:103