1
/***************************************************************************
4
--------------------------------------------------------------------
5
Copyright : (C) 2006 by Ion Vasilief, Tilman Benkert
6
Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net
7
Description : Graph widget
9
***************************************************************************/
11
/***************************************************************************
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
18
* This program is distributed in the hope that it will be useful, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
28
***************************************************************************/
40
#include <qwt_plot_marker.h>
41
#include <qwt_plot_curve.h>
45
#include "AxesDialog.h"
46
#include "PlotToolInterface.h"
47
#include "core/column/Column.h"
59
class ApplicationWindow;
61
class SelectionMoveResizer;
62
class RangeSelectorTool;
65
class QwtErrorPlotCurve;
67
//! Structure containing curve layout parameters
69
int lCol; //!< line color
70
int lWidth; //!< line width
71
int lStyle; //!< line style
72
int filledArea; //!< flag: toggles area filling under curve
73
int aCol; //!< curve area color
74
int aStyle; //!< area filling style
75
int symCol; //!< symbol outline color
76
int fillCol; //!< symbol fill color
77
int penWidth; //!< symbol outline width
78
int sSize; //!< symbol size
79
int sType; //!< symbol type (shape)
80
int connectType; //!< symbol connection type
84
* \brief A 2D-plotting widget.
86
* Graphs are managed by a MultiLayer, where they are sometimes referred to as "graphs" and sometimes as "layers".
87
* Other parts of the code also call them "plots", regardless of the fact that there's also a class Plot.
88
* Within the user interface, they are quite consistently called "layers".
90
* Each graph owns a Plot called #d_plot, which handles parts of the curve, axis and marker management (similarly to QwtPlot),
91
* as well as the pickers #d_zoomer (a QwtPlotZoomer), #titlePicker (a TitlePicker), #scalePicker (a ScalePicker) and #cp (a CanvasPicker),
92
* which handle various parts of the user interaction.
94
* Graph contains support for various curve types (see #CurveType),
95
* some of them relying on SciDAVis-specific QwtPlotCurve subclasses for parts of the functionality.
97
* %Note that some of Graph's methods are implemented in analysis.cpp.
99
* \section future_plans Future Plans
100
* Merge with Plot and CanvasPicker.
101
* Think about merging in TitlePicker and ScalePicker.
102
* On the other hand, things like range selection, peak selection or (re)moving data points could be split out into tool classes
103
* like QwtPlotZoomer or SelectionMoveResizer.
105
* What definitely should be split out are plot types like histograms and pie charts (TODO: which others?).
106
* We need a generic framework for this in any case so that new plot types can be implemented in plugins,
107
* and Graph could do with a little diet. Especially after merging in Plot and CanvasPicker.
108
* [ Framework needs to support plug-ins; assigned to knut ]
110
* Add support for floating-point line widths of curves and axes (request 2300).
111
* [ assigned to thzs ]
114
class Graph: public QWidget
119
Graph (QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
122
enum AxisType{Numeric = 0, Txt = 1, Day = 2, Month = 3, Time = 4, Date = 5, ColHeader = 6, DateTime = 22};
123
enum MarkerType{None = -1, Text = 0, Arrow = 1, Image = 2};
124
enum CurveType{Line, Scatter, LineSymbols, VerticalBars, Area, Pie, VerticalDropLines,
125
Spline, HorizontalSteps, Histogram, HorizontalBars, VectXYXY, ErrorBars,
126
Box, VectXYAM, VerticalSteps, ColorMap, GrayMap, ContourMap, Function};
129
QwtPlotZoomer *d_zoomer[2];
130
TitlePicker *titlePicker;
131
ScalePicker *scalePicker;
134
static int mapToQwtAxis(int axis);
136
//! Returns the name of the parent MultiLayer object.
137
QString parentPlotName();
139
//! Change the active tool, deleting the old one if it exists.
140
void setActiveTool(PlotToolInterface *tool);
141
//! Return the active tool, or NULL if none is active.
142
PlotToolInterface* activeTool() const { return d_active_tool; }
144
Grid *grid(){return d_plot->grid();};
147
//! Accessor method for #d_plot.
148
Plot* plotWidget(){return d_plot;};
149
void copy(ApplicationWindow *parent, Graph* g);
153
//! Returns true if this Graph is a pie plot, false otherwise.
154
bool isPiePlot(){return (c_type.count() == 1 && c_type[0] == Pie);};
155
void plotPie(Table* w,const QString& name, int startRow = 0, int endRow = -1);
156
//! Used when restoring a pie plot from a project file
157
void plotPie(Table* w,const QString& name, const QPen& pen, int brush, int size, int firstColor, int startRow = 0, int endRow = -1, bool visible = true);
159
QString pieLegendText();
160
QString savePieCurveLayout();
163
bool insertCurvesList(Table* w, const QStringList& names, int style, int lWidth, int sSize, int startRow = 0, int endRow = -1);
164
bool insertCurve(Table* w, const QString& name, int style, int startRow = 0, int endRow = -1);
165
bool insertCurve(Table* w, int xcol, const QString& name, int style);
166
bool insertCurve(Table* w, const QString& xColName, const QString& yColName, int style, int startRow = 0, int endRow = -1);
167
void insertPlotItem(QwtPlotItem *i, int type);
169
//! Shows/Hides a curve defined by its index.
170
void showCurve(int index, bool visible = true);
173
//! Removes a curve defined by its index.
174
void removeCurve(int index);
176
* \brief Removes a curve defined by its title string s.
178
void removeCurve(const QString& s);
180
* \brief Removes all curves defined by the title/plot association string s.
182
void removeCurves(const QString& s);
184
void updateCurvesData(Table* w, const QString& yColName);
186
int curves(){return n_curves;};
187
bool validCurvesDataSize();
188
double selectedXStartValue();
189
double selectedXEndValue();
191
long curveKey(int curve){return c_keys[curve];}
192
int curveIndex(long key){return c_keys.indexOf(key);};
193
//! Map curve pointer to index.
194
int curveIndex(QwtPlotCurve *c) const;
195
//! map curve title to index
196
int curveIndex(const QString &title){return plotItemsList().indexOf(title);}
197
//! get curve by index
198
QwtPlotCurve* curve(int index);
199
//! get curve by name
200
QwtPlotCurve* curve(const QString &title){return curve(curveIndex(title));}
202
//! Returns the names of all the curves suitable for data analysis, as a string list. The list excludes error bars and spectrograms.
203
QStringList analysableCurvesList();
204
//! Returns the names of all the QwtPlotCurve items on the plot, as a string list
205
QStringList curvesList();
206
//! Returns the names of all plot items, including spectrograms, as a string list
207
QStringList plotItemsList();
208
//! get plotted item by index
209
QwtPlotItem* plotItem(int index);
210
//! get plot item by index
211
int plotItemIndex(QwtPlotItem *it) const;
213
void updateCurveNames(const QString& oldName, const QString& newName, bool updateTableName = true);
215
int curveType(int curveIndex);
216
//! Test whether curve can be converted to type using setCurveType().
217
static bool canConvertTo(QwtPlotCurve *curve, CurveType type);
218
//! Change the type of the given curve.
220
* The option to disable updating is provided so as not to break the project opening code
221
* (ApplicationWindow::openGraph()).
223
void setCurveType(int curve, CurveType type, bool update=true);
224
void setCurveFullRange(int curveIndex);
226
//! \name Output: Copy/Export/Print
229
void setScaleOnPrint(bool on){d_scale_on_print = on;};
230
void printCropmarks(bool on){d_print_cropmarks = on;};
233
QPixmap graphPixmap();
234
//! Provided for convenience in scripts
235
void exportToFile(const QString& fileName);
236
void exportSVG(const QString& fname);
237
void exportVector(const QString& fileName, int res = 0, bool color = true,
238
bool keepAspect = true, QPrinter::PageSize pageSize = QPrinter::Custom,
239
QPrinter::Orientation orientation = QPrinter::Portrait);
240
void exportImage(const QString& fileName, int quality = 100, bool transparent = false);
243
void replot(){d_plot->replot();};
248
bool addErrorBars(const QString& xColName, const QString& yColName, Table *errTable,
249
const QString& errColName, int type = 1, int width = 1, int cap = 8, const QColor& color = QColor(Qt::black),
250
bool through = true, bool minus = true, bool plus = true);
252
bool addErrorBars(const QString& yColName, Table *errTable, const QString& errColName,
253
int type = 1, int width = 1, int cap = 8, const QColor& color = QColor(Qt::black),
254
bool through = true, bool minus = true, bool plus = true);
256
void updateErrorBars(QwtErrorPlotCurve *er, bool xErr,int width, int cap, const QColor& c, bool plus, bool minus, bool through);
258
//! Returns a valid master curve for the error bars curve.
259
DataCurve* masterCurve(QwtErrorPlotCurve *er);
260
//! Returns a valid master curve for a plot association.
261
DataCurve* masterCurve(const QString& xColName, const QString& yColName);
264
//! \name Event Handlers
266
void contextMenuEvent(QContextMenuEvent *);
267
void closeEvent(QCloseEvent *e);
268
bool focusNextPrevChild ( bool next );
272
void setScale(int axis, double start, double end, double step = 0.0,
273
int majorTicks = 5, int minorTicks = 5, int type = 0, bool inverted = false);
274
double axisStep(int axis){return d_user_step[axis];};
276
//! \name Curves Layout
278
CurveLayout initCurveLayout(int style, int curves = 0);
279
static CurveLayout initCurveLayout();
280
//! Set layout parameters of the curve given by index.
281
void updateCurveLayout(int index,const CurveLayout *cL);
282
//! Tries to guess not already used curve color and symbol style
283
void guessUniqueCurveLayout(int& colorIndex, int& symbolIndex);
288
void zoomed (const QwtDoubleRect &);
297
//! \name Saving to File
299
QString saveToString(bool saveAsTemplate = false);
301
QString saveScaleTitles();
303
QString saveMarkers();
304
QString saveCurveLayout(int index);
305
QString saveAxesTitleColors();
306
QString saveAxesColors();
307
QString saveEnabledAxes();
308
QString saveCanvas();
310
QString saveAxesTitleAlignement();
311
QString saveEnabledTickLabels();
312
QString saveTicksType();
313
QString saveCurves();
314
QString saveLabelsFormat();
315
QString saveLabelsRotation();
316
QString saveAxesLabelsType();
317
QString saveAxesBaseline();
318
QString saveAxesFormulas();
321
//! \name Text Markers
323
void drawText(bool on);
324
bool drawTextActive(){return drawTextOn;};
325
long insertTextMarker(Legend* mrk);
327
//! Used when opening a project file
328
long insertTextMarker(const QStringList& list, int fileVersion);
329
void updateTextMarker(const QString& text,int angle, int bkg,const QFont& fnt,
330
const QColor& textColor, const QColor& backgroundColor);
332
QFont defaultTextMarkerFont(){return defaultMarkerFont;};
333
QColor textMarkerDefaultColor(){return defaultTextMarkerColor;};
334
QColor textMarkerDefaultBackground(){return defaultTextMarkerBackground;};
335
int textMarkerDefaultFrame(){return defaultMarkerFrame;};
336
void setTextMarkerDefaults(int f, const QFont &font, const QColor& textCol, const QColor& backgroundCol);
338
void setCopiedMarkerType(Graph::MarkerType type){selectedMarkerType=type;};
339
void setCopiedMarkerEnds(const QPoint& start, const QPoint& end);
340
void setCopiedTextOptions(int bkg, const QString& text, const QFont& font,
341
const QColor& color, const QColor& bkgColor);
342
void setCopiedArrowOptions(int width, Qt::PenStyle style, const QColor& color,
343
bool start, bool end, int headLength, int headAngle, bool filledHead);
344
void setCopiedImageName(const QString& fn){auxMrkFileName=fn;};
345
QRect copiedMarkerRect(){return QRect(auxMrkStart, auxMrkEnd);};
346
QVector<int> textMarkerKeys(){return d_texts;};
347
Legend* textMarker(long id);
352
void removeLegendItem(int index);
353
void addLegendItem(const QString& colName);
354
void insertLegend(const QStringList& lst, int fileVersion);
357
Legend *newLegend(const QString& text);
358
bool hasLegend(){return legendMarkerID >= 0;};
360
//! Creates a new legend text using the curves titles
361
QString legendText();
364
//! \name Line Markers
366
ArrowMarker* arrow(long id);
367
void addArrow(ArrowMarker* mrk);
369
//! Used when opening a project file
370
void addArrow(QStringList list, int fileVersion);
371
QVector<int> lineMarkerKeys(){return d_lines;};
373
//!Draws a line/arrow depending on the value of "arrow"
374
void drawLine(bool on, bool arrow = FALSE);
375
bool drawArrow(){return drawArrowOn;};
376
bool drawLineActive(){return drawLineOn;};
378
Qt::PenStyle arrowLineDefaultStyle(){return defaultArrowLineStyle;};
379
bool arrowHeadDefaultFill(){return defaultArrowHeadFill;};
380
int arrowDefaultWidth(){return defaultArrowLineWidth;};
381
int arrowHeadDefaultLength(){return defaultArrowHeadLength;};
382
int arrowHeadDefaultAngle(){return defaultArrowHeadAngle;};
383
QColor arrowDefaultColor(){return defaultArrowColor;};
385
void setArrowDefaults(int lineWidth, const QColor& c, Qt::PenStyle style,
386
int headLength, int headAngle, bool fillHead);
387
bool arrowMarkerSelected();
390
//! \name Image Markers
392
ImageMarker* imageMarker(long id);
393
QVector<int> imageMarkerKeys(){return d_images;};
394
ImageMarker* addImage(ImageMarker* mrk);
395
ImageMarker* addImage(const QString& fileName);
397
void insertImageMarker(const QStringList& lst, int fileVersion);
398
bool imageMarkerSelected();
399
void updateImageMarker(int x, int y, int width, int height);
402
//! \name Common to all Markers
408
//! Keep the markers on screen each time the scales are modified by adding/removing curves
409
void updateMarkersBoundingRect();
411
long selectedMarkerKey();
412
/*!\brief Set the selected marker.
413
* \param mrk key of the marker to be selected.
414
* \param add whether the marker is to be added to an existing selection.
415
* If <i>add</i> is false (the default) or there is no existing selection, a new SelectionMoveResizer is
416
* created and stored in #d_markers_selector.
418
void setSelectedMarker(long mrk, bool add=false);
419
QwtPlotMarker* selectedMarkerPtr();
420
bool markerSelected();
421
//! Reset any selection states on markers.
422
void deselectMarker();
423
MarkerType copiedMarkerType(){return selectedMarkerType;};
428
QList<int> axesType();
430
QStringList scalesTitles();
431
void setXAxisTitle(const QString& text);
432
void setYAxisTitle(const QString& text);
433
void setRightAxisTitle(const QString& text);
434
void setTopAxisTitle(const QString& text);
435
void setAxisTitle(int axis, const QString& text);
436
QString axisTitle(int axis) { return d_plot->axisTitle(axis).text(); }
438
QFont axisTitleFont(int axis);
439
void setXAxisTitleFont(const QFont &fnt);
440
void setYAxisTitleFont(const QFont &fnt);
441
void setRightAxisTitleFont(const QFont &fnt);
442
void setTopAxisTitleFont(const QFont &fnt);
443
void setAxisTitleFont(int axis,const QFont &fnt);
445
void setAxisFont(int axis,const QFont &fnt);
446
QFont axisFont(int axis);
447
void initFonts(const QFont &scaleTitleFnt,const QFont &numbersFnt);
449
QColor axisTitleColor(int axis);
450
void setXAxisTitleColor(const QColor& c);
451
void setYAxisTitleColor(const QColor& c);
452
void setRightAxisTitleColor(const QColor& c);
453
void setTopAxisTitleColor(const QColor& c);
454
void setAxesTitleColor(QStringList l);
456
int axisTitleAlignment (int axis);
457
void setXAxisTitleAlignment(int align);
458
void setYAxisTitleAlignment(int align);
459
void setTopAxisTitleAlignment(int align);
460
void setRightAxisTitleAlignment(int align);
461
void setAxesTitlesAlignment(const QStringList& align);
463
QColor axisColor(int axis);
464
QStringList axesColors();
465
void setAxesColors(const QStringList& colors);
467
QColor axisNumbersColor(int axis);
468
QStringList axesNumColors();
469
void setAxesNumColors(const QStringList& colors);
471
void showAxis(int axis, int type, const QString& formatInfo, Table *table, bool axisOn,
472
int majTicksType, int minTicksType, bool labelsOn, const QColor& c, int format,
473
int prec, int rotation, int baselineDist, const QString& formula, const QColor& labelsColor);
475
void enableAxis(int axis, bool on = true);
476
QVector<bool> enabledAxes();
477
void enableAxes(QVector<bool> axesOn);
478
void enableAxes(const QStringList& list);
480
int labelsRotation(int axis);
481
void setAxisLabelRotation(int axis, int rotation);
483
QStringList enabledTickLabels();
484
void setEnabledTickLabels(const QStringList& list);
486
void setAxesLinewidth(int width);
487
//! used when opening a project file
488
void loadAxesLinewidth(int width);
490
void drawAxesBackbones(bool yes);
491
bool axesBackbones(){return drawAxesBackbone;};
492
//! used when opening a project file
493
void loadAxesOptions(const QString& s);
495
QList<int> axesBaseline();
496
void setAxesBaseline(const QList<int> &lst);
497
void setAxesBaseline(QStringList &lst);
499
void setMajorTicksType(const QList<int>& lst);
500
void setMajorTicksType(const QStringList& lst);
502
void setMinorTicksType(const QList<int>& lst);
503
void setMinorTicksType(const QStringList& lst);
505
int minorTickLength();
506
int majorTickLength();
507
void setAxisTicksLength(int axis, int majTicksType, int minTicksType,
508
int minLength, int majLength);
509
void setTicksLength(int minLength, int majLength);
510
void changeTicksLength(int minLength, int majLength);
512
void setLabelsNumericFormat(const QStringList& l);
513
void setLabelsNumericFormat(int axis, const QStringList& l);
514
void setLabelsNumericFormat(int axis, int format, int prec = 6, const QString& formula = QString());
515
void setLabelsDateTimeFormat(int axis, int type, const QString& formatInfo);
516
void setLabelsDayFormat(int axis, int format);
517
void setLabelsMonthFormat(int axis, int format);
519
QString axisFormatInfo(int axis);
520
QStringList axesLabelsFormatInfo(){return axesFormatInfo;};
522
void setLabelsTextFormat(int axis, const Column *column, int startRow, int endRow);
523
void setLabelsTextFormat(int axis, Table *table, const QString& columnName);
524
void setLabelsColHeaderFormat(int axis, Table *table);
526
QStringList getAxesFormulas(){return axesFormulas;};
527
void setAxesFormulas(const QStringList& l){axesFormulas = l;};
528
void setAxisFormula(int pos, const QString &f){axesFormulas[pos] = f;};
531
//! \name Canvas Frame
533
void drawCanvasFrame(bool frameOn, int width);
534
void drawCanvasFrame(const QStringList& frame);
535
void drawCanvasFrame(bool frameOn, int width, const QColor& color);
536
QColor canvasFrameColor();
537
int canvasFrameWidth();
543
void setTitle(const QString& t);
544
void setTitleFont(const QFont &fnt);
545
void setTitleColor(const QColor &c);
546
void setTitleAlignment(int align);
548
bool titleSelected();
552
void initTitle( bool on, const QFont& fnt);
555
//! \name Modifing insertCurve Data
557
int selectedCurveID();
558
int selectedCurveIndex() { return curveIndex(selectedCurveID()); }
559
QString selectedCurveTitle();
564
/*! Enables the data range selector tool.
566
* This one is a bit special, because other tools can depend upon an existing selection.
567
* Therefore, range selection (like zooming) has to be provided in addition to the generic
570
bool enableRangeSelectors(const QObject *status_target=NULL, const char *status_slot="");
572
//! \name Border and Margin
574
void setMargin (int d);
575
void setFrame(int width = 1, const QColor& color = QColor(Qt::black));
576
void setBackgroundColor(const QColor& color);
577
void setCanvasBackground(const QColor& color);
580
void addFitCurve(QwtPlotCurve *c);
581
void deleteFitCurves();
582
QList<QwtPlotCurve *> fitCurvesList(){return d_fit_curves;};
583
/*! Set start and end to selected X range of curve index or, if there's no selection, to the curve's total range.
585
* \return the number of selected or total points
587
int range(int index, double *start, double *end);
589
//! Used for VerticalBars, HorizontalBars and Histograms
590
void setBarsGap(int curve, int gapPercent, int offset);
592
//! \name Image Analysis Tools
594
void showIntensityTable();
597
//! \name User-defined Functions
599
bool modifyFunctionCurve(ApplicationWindow * parent, int curve, int type, const QStringList &formulas, const QString &var,QList<double> &ranges, int points);
600
bool addFunctionCurve(ApplicationWindow *parent, int type, const QStringList &formulas, const QString& var,
601
QList<double> &ranges, int points, const QString& title = QString::null);
602
//! Used when reading from a project file.
603
bool insertFunctionCurve(ApplicationWindow * parent, const QStringList& func_spec, int points, int fileVersion);
604
//! Returns an unique function name
605
QString generateFunctionName(const QString& name = tr("F"));
608
//! Provided for convenience in scripts.
609
void createTable(const QString& curveName);
610
void createTable(const QwtPlotCurve* curve);
611
void activateGraph();
613
//! \name Vector Curves
615
void plotVectorCurve(Table* w, const QStringList& colList, int style, int startRow = 0, int endRow = -1);
616
void updateVectorsLayout(int curve, const QColor& color, int width, int arrowLength, int arrowAngle, bool filled, int position,
617
const QString& xEndColName = QString(), const QString& yEndColName = QString());
622
void openBoxDiagram(Table *w, const QStringList& l, int fileVersion);
623
void plotBoxDiagram(Table *w, const QStringList& names, int startRow = 0, int endRow = -1);
626
void setCurveSymbol(int index, const QwtSymbol& s);
627
void setCurvePen(int index, const QPen& p);
628
void setCurveBrush(int index, const QBrush& b);
629
void setCurveStyle(int index, int s);
633
bool ignoresResizeEvents(){return ignoreResize;};
634
void setIgnoreResizeEvents(bool ok){ignoreResize=ok;};
635
void resizeEvent(QResizeEvent *e);
636
void scaleFonts(double factor);
639
void notifyChanges();
641
void updateSecondaryAxis(int axis);
642
void enableAutoscaling(bool yes){m_autoscale = yes;};
644
bool autoscaleFonts(){return autoScaleFonts;};
645
void setAutoscaleFonts(bool yes){autoScaleFonts = yes;};
647
static int obsoleteSymbolStyle(int type);
648
static QString penStyleName(Qt::PenStyle style);
649
static Qt::PenStyle getPenStyle(const QString& s);
650
static Qt::PenStyle getPenStyle(int style);
651
static Qt::BrushStyle getBrushStyle(int style);
652
static void showPlotErrorMessage(QWidget *parent, const QStringList& emptyColumns);
653
static QPrinter::PageSize minPageSize(const QPrinter& printer, const QRect& r);
655
void showTitleContextMenu();
659
void removeAxisTitle();
661
void copyAxisTitle();
662
void showAxisTitleMenu(int axis);
663
void showAxisContextMenu(int axis);
664
void hideSelectedAxis();
667
//! Convenience function enabling the grid for QwtScaleDraw::Left and Bottom Scales
669
//! Convenience function enabling the grid for a user defined axis
670
void showGrid(int axis);
672
void showAxisDialog();
673
void showScaleDialog();
675
//! Add a spectrogram to the graph
676
void plotSpectrogram(Matrix *m, CurveType type);
677
//! Restores a spectrogram. Used when opening a project file.
678
void restoreSpectrogram(ApplicationWindow *app, const QStringList& lst);
680
bool antialiasing(){return d_antialiasing;};
681
//! Enables/Disables antialiasing of plot items.
682
void setAntialiasing(bool on = true, bool update = true);
685
void print(QPainter *, const QRect &rect, const QwtPlotPrintFilter & = QwtPlotPrintFilter());
686
void printCanvas(QPainter *painter, const QRect &canvasRect,
687
const QwtScaleMap map[QwtPlot::axisCnt], const QwtPlotPrintFilter &pfilter) const;
690
void selectedGraph (Graph*);
693
void drawLineEnded(bool);
694
void cursorInfo(const QString&);
695
void showPlotDialog(int);
696
void createTable(const QString&,const QString&,QList<Column*>);
698
void viewImageDialog();
699
void viewTextDialog();
700
void viewLineDialog();
701
void viewTitleDialog();
702
void modifiedGraph();
703
void hiddenPlot(QWidget*);
705
void showLayerButtonContextMenu();
706
void showContextMenu();
707
void showCurveContextMenu(int);
708
void showMarkerPopupMenu();
710
void showAxisDialog(int);
711
void axisDblClicked(int);
712
void xAxisTitleDblClicked();
713
void yAxisTitleDblClicked();
714
void rightAxisTitleDblClicked();
715
void topAxisTitleDblClicked();
717
void createIntensityTable(const QString&);
718
void dataRangeChanged();
719
void showFitResults(const QString&);
722
//! List storing pointers to the curves resulting after a fit session, in case the user wants to delete them later on.
723
QList<QwtPlotCurve *>d_fit_curves;
724
//! Render hint for plot items.
727
bool d_scale_on_print, d_print_cropmarks;
729
QStringList axesFormulas;
730
//! Stores columns used for axes with text labels or time/date format info
731
QStringList axesFormatInfo;
732
QList <int> axisType;
733
MarkerType selectedMarkerType;
734
QwtPlotMarker::LineStyle mrklStyle;
736
//! Stores the step the user specified for the four scale. If step = 0.0, the step will be calculated automatically by the Qwt scale engine.
737
QVector<double> d_user_step;
740
//! Curves on plot keys
742
//! Arrows/lines on plot keys
743
QVector<int> d_lines;
744
//! Images on plot keys
745
QVector<int> d_images;
746
//! Stores the identifiers (keys) of the text objects on the plot
747
QVector<int> d_texts;
750
QFont auxMrkFont, defaultMarkerFont;
751
QColor auxMrkColor, auxMrkBkgColor;
752
QPoint auxMrkStart, auxMrkEnd;
753
Qt::PenStyle auxMrkStyle;
754
QString auxMrkFileName, auxMrkText;
757
int widthLine, defaultMarkerFrame;
758
QColor defaultTextMarkerColor, defaultTextMarkerBackground;
759
int auxMrkAngle,auxMrkBkg,auxMrkWidth;
760
int auxArrowHeadLength, auxArrowHeadAngle;
761
long selectedMarker,legendMarkerID;
762
bool startArrowOn, endArrowOn, drawTextOn, drawLineOn, drawArrowOn;
764
bool auxFilledArrowHead, ignoreResize;
765
bool drawAxesBackbone, m_autoscale;
767
QColor defaultArrowColor;
768
int defaultArrowLineWidth, defaultArrowHeadLength, defaultArrowHeadAngle;
769
bool defaultArrowHeadFill;
770
Qt::PenStyle defaultArrowLineStyle;
772
//! The markers selected for move/resize operations or NULL if none are selected.
773
QPointer<SelectionMoveResizer> d_markers_selector;
774
//! The current curve selection, or NULL if none is active.
775
QPointer<RangeSelectorTool> d_range_selector;
776
//! The currently active tool, or NULL for default (pointer).
777
PlotToolInterface *d_active_tool;