QtiPlot  0.9.8.2
Public Types | Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
Graph Class Reference

A 2D-plotting widget. More...

#include <Graph.h>

List of all members.

Public Types

enum  Axis { Left, Right, Bottom, Top }
enum  AxisTitlePolicy { Default, ColName, ColComment, NameAndComment }
enum  CurveType {
  Line, Scatter, LineSymbols, VerticalBars,
  Area, Pie, VerticalDropLines, Spline,
  HorizontalSteps, Histogram, HorizontalBars, VectXYXY,
  ErrorBars, Box, VectXYAM, VerticalSteps,
  ColorMap, GrayScale, Contour, Function,
  ImagePlot, StackBar, StackColumn
}
enum  LegendDisplayMode {
  Auto, ColumnName, ColumnComment, TableName,
  TableLegend
}
enum  MarkerType { None = -1, Text = 0, Arrow = 1, Image = 2 }
enum  Scale {
  Linear, Log10, Ln, Log2,
  Reciprocal, Probability, Logit
}
enum  Ticks { NoTicks = 0, Out = 1, InOut = 2, In = 3 }

Public Slots

void activateGraph ()
bool addCurves (Table *w, const QStringList &names, int style=0, double lWidth=1, int sSize=3, int startRow=0, int endRow=-1)
void addFitCurve (QwtPlotCurve *c)
QwtHistogramaddHistogram (Matrix *m)
 Add a matrix histogram to the graph.
QStringList analysableCurvesList ()
 Returns the names of all the curves suitable for data analysis, as a string list. The list excludes error bars and spectrograms.
bool antialiasing ()
bool autoscaleFonts ()
double axisStep (int axis)
void clearAxisTitle ()
void copy (Graph *g)
void copyAxisTitle ()
void copyCurves (Graph *g)
void copyEnrichments (Graph *g)
void copyScaleDraw (Graph *g, int i)
void copyScaleWidget (Graph *g, int i)
void copyTitle ()
void createTable (const QString &curveName)
 Provided for convenience in scripts.
void createTable (const QwtPlotCurve *curve)
PlotCurvecurve (int index)
 get curve by index
PlotCurvecurve (const QString &title)
 get curve by name
int curveCount ()
int curveIndex (QwtPlotItem *c)
 Map curve pointer to index.
int curveIndex (const QString &title)
 map curve title to index
QStringList curveNamesList ()
 Returns the names of all the QwtPlotCurve items on the plot, as a string list.
QString curveRange (QwtPlotCurve *c)
 returns the curve range information as a string: "curve_name [start:end]"
QString curveTitle (int index)
 get curve title string by inde (convenience function for scripts)
void cutAxisTitle ()
void cutTitle ()
DataCurvedataCurve (int index)
void deleteFitCurves ()
void disableCurveAntialiasing (bool disable, int maxPoints)
void disableImageProfilesTool ()
void disableTools ()
void enableAutoscaling (bool on=true)
bool enableRangeSelectors (const QObject *status_target=NULL, const char *status_slot="")
void enableTextEditor ()
QList< QwtPlotCurve * > fitCurvesList ()
FunctionCurvefunctionCurve (int index)
static Qt::PenStyle getPenStyle (const QString &s)
static Qt::PenStyle getPenStyle (int style)
bool hasGridOnTop ()
void hideSelectedAxis ()
QPointer< ImageProfilesToolimageProfilesTool ()
DataCurveinsertCurve (Table *w, const QString &name, int style, int startRow=0, int endRow=-1)
DataCurveinsertCurve (Table *w, int xcol, const QString &name, int style)
DataCurveinsertCurve (Table *w, const QString &xColName, const QString &yColName, int style, int startRow=0, int endRow=-1)
DataCurveinsertCurve (Table *xt, const QString &xColName, Table *yt, const QString &yColName, int style, int startRow=0, int endRow=-1)
void insertCurve (QwtPlotItem *c)
void insertPlotItem (QwtPlotItem *i, int type)
void invertScale (int axis)
 Set axis scale.
bool isAutoscalingEnabled ()
bool isCurveAntialiasingDisabled ()
bool isCurveAntialiasingEnabled (QwtPlotItem *it)
bool isMissingDataGapEnabled ()
int maxAntialisingSize ()
void notifyChanges ()
void notifyColorChange (const QColor &c)
void notifyFontChange (const QFont &f)
static int obsoleteSymbolStyle (int type)
int oppositeAxis (int axis)
static QString penStyleName (Qt::PenStyle style)
QwtPlotItem * plotItem (int index)
 get plotted item by index
QStringList plotItemsList ()
 Returns the names of all plot items, including spectrograms, as a string list.
SpectrogramplotSpectrogram (Matrix *m, CurveType type)
 Add a spectrogram to the graph.
int range (const QString &curveTitle, double *start, double *end)
int range (QwtPlotCurve *c, double *start, double *end)
bool rangeSelectorsEnabled ()
QPointer< RangeSelectorToolrangeSelectorTool ()
void reloadCurvesData ()
void removeAxisTitle ()
void removeCurve (QwtPlotItem *it)
void removeCurve (int index)
 Removes a curve defined by its index.
void removeCurve (const QString &s)
 Removes a curve defined by its title string s.
void removeCurves (const QString &s)
 Removes all curves defined by the title/plot association string s.
QwtHistogramrestoreHistogram (Matrix *m, const QStringList &l)
 Restores a histogram from a project file.
void restoreSpectrogram (ApplicationWindow *app, const QStringList &lst)
 Restores a spectrogram. Used when opening a project file.
void reverseCurveOrder ()
double selectedXEndValue ()
double selectedXStartValue ()
void setAntialiasing (bool on=true, bool update=true)
 Enables/Disables antialiasing of plot items.
void setAutoScale ()
void setAutoscaleFonts (bool on=true)
void setAxisStep (int axis, double step)
void setBarsGap (int curve, int gapPercent, int offset)
 Used for VerticalBars, HorizontalBars and Histograms.
void setCanvasCoordinates (const QRectF &)
void setCurrentColor (const QColor &c)
void setCurrentFont (const QFont &f)
void setGridOnTop (bool on=true, bool update=true)
void setScale (int axis, double start, double end, double step=0.0, int majorTicks=5, int minorTicks=5, int type=0, bool inverted=false, double left_break=-DBL_MAX, double right_break=DBL_MAX, int pos=50, double stepBeforeBreak=0.0, double stepAfterBreak=0.0, int minTicksBeforeBreak=4, int minTicksAfterBreak=4, bool log10AfterBreak=false, int breakWidth=4, bool breakDecoration=true)
void showAxisContextMenu (int axis)
void showAxisDialog ()
void showAxisTitleMenu ()
void showCurve (int index, bool visible=true)
 Shows/Hides a curve defined by its index.
void showGrid ()
 Convenience function enabling the grid for QwtScaleDraw::Left and Bottom Scales.
void showGrid (int axis)
 Convenience function enabling the grid for a user defined axis.
void showGrids ()
void showMissingDataGap (bool on=true, bool update=true)
static void showPlotErrorMessage (QWidget *parent, const QStringList &emptyColumns)
void showScaleDialog ()
void showTitleContextMenu ()
Spectrogramspectrogram (Matrix *m)
 Returns a pointer to the spectrogram which data source is matrix m (the pointer can be NULL)
void updateCurveNames (const QString &oldName, const QString &newName, bool updateTableName=true)
void updateCurvesData (Table *w, const QString &yColName)
void updateDataCurves ()
void updateOppositeScaleDiv (int axis)
void updatePlot ()
void updateScale ()
void updateSecondaryAxis (int axis, bool changeFormat=false)
bool validCurvesDataSize ()
int visibleCurves ()
Pie Curves
bool isPiePlot ()
 Returns true if this Graph is a pie plot, false otherwise.
PieCurveplotPie (Table *w, const QString &name, int startRow=0, int endRow=-1)
 Used when creating a pie plot.
PieCurveplotPie (Table *w, const QString &name, const QPen &pen, int brush, int size, int firstColor, int startRow=0, int endRow=-1, bool visible=true, double d_start_azimuth=270, double d_view_angle=90, double d_thickness=33, double d_horizontal_offset=0.0, double d_edge_dist=25, bool d_counter_clockwise=false, bool d_auto_labeling=true, bool d_values=false, bool d_percentages=true, bool d_categories=false, bool d_fixed_labels_pos=true)
 Used when restoring a pie plot from a project file.
void removePie ()
QString pieLegendText ()
QString savePieCurveLayout ()
Customizing plot curves
void setCurveStyle (int index, int s)
void setCurveFullRange (int curveIndex)
void setCurveLineColor (int curveIndex, int colorIndex)
void setCurveLineColor (int curveIndex, QColor qColor)
void setCurveLineStyle (int curveIndex, Qt::PenStyle style)
void setCurveLineWidth (int curveIndex, double width)
void setGrayScale ()
void setIndexedColors ()
Output: Copy/Export/Print
void print ()
void copyImage ()
QPixmap graphPixmap (const QSize &size=QSize(), double scaleFontsFactor=1.0, bool transparent=false)
void exportToFile (const QString &fileName)
 Provided for convenience in scripts.
void exportSVG (const QString &fname, const QSizeF &customSize=QSizeF(), int unit=FrameWidget::Pixel, double fontsFactor=1.0)
void exportEMF (const QString &fname, const QSizeF &customSize=QSizeF(), int unit=FrameWidget::Pixel, double fontsFactor=1.0)
void exportTeX (const QString &fname, bool color=true, bool escapeStrings=true, bool fontSizes=true, const QSizeF &customSize=QSizeF(), int unit=FrameWidget::Pixel, double fontsFactor=1.0)
void exportVector (const QString &fileName, int res=0, bool color=true, const QSizeF &customSize=QSizeF(), int unit=FrameWidget::Pixel, double fontsFactor=1.0)
void exportVector (QPrinter *printer, int res=0, bool color=true, const QSizeF &customSize=QSizeF(), int unit=FrameWidget::Pixel, double fontsFactor=1.0)
void exportImage (const QString &fileName, int quality=100, bool transparent=false, int dpi=0, const QSizeF &customSize=QSizeF(), int unit=FrameWidget::Pixel, double fontsFactor=1.0, int compression=0)
void draw (QPaintDevice *, const QSize &size, double fontsFactor=1.0)
static QSize customPrintSize (const QSizeF &customSize, int unit, int dpi)
Error Bars
ErrorBarsCurveaddErrorBars (const QString &xColName, const QString &yColName, Table *errTable, const QString &errColName, int type=1, double width=1, int cap=8, const QColor &color=QColor(Qt::black), bool through=true, bool minus=true, bool plus=true)
ErrorBarsCurveaddErrorBars (const QString &yColName, Table *errTable, const QString &errColName, int type=1, double width=1, int cap=8, const QColor &color=QColor(Qt::black), bool through=true, bool minus=true, bool plus=true)
ErrorBarsCurveaddErrorBars (DataCurve *c, Table *errTable, const QString &errColName, int type=1, double width=1, int cap=8, const QColor &color=QColor(Qt::black), bool through=true, bool minus=true, bool plus=true)
void updateErrorBars (ErrorBarsCurve *er, bool xErr, double width, int cap, const QColor &c, bool plus, bool minus, bool through)
DataCurvemasterCurve (ErrorBarsCurve *er)
 Returns a valid master curve for the error bars curve.
DataCurvemasterCurve (const QString &xColName, const QString &yColName)
 Returns a valid master curve for a plot association.
Event Handlers
bool mousePressed (QEvent *)
void contextMenuEvent (QContextMenuEvent *)
void closeEvent (QCloseEvent *e)
bool focusNextPrevChild (bool next)
Curves Layout
CurveLayout initCurveLayout (int style, int curves=0, bool guessLayout=true)
static CurveLayout initCurveLayout ()
void updateCurveLayout (PlotCurve *c, const CurveLayout *cL)
void guessUniqueCurveLayout (int &colorIndex, int &symbolIndex)
 Tries to guess not already used curve color and symbol style.
Zoom
void zoomed (const QwtDoubleRect &)
void zoom (bool on)
void zoomOut ()
bool zoomOn ()
Saving/Restoring to/from file
QString saveToString (bool saveAsTemplate=false)
QString saveScale ()
QString saveScaleTitles ()
QString saveFonts ()
QString saveMarkers ()
QString saveCurveLayout (int index)
QString saveAxesTitleColors ()
QString saveAxesColors ()
QString saveEnabledAxes ()
QString saveCanvas ()
QString saveTitle ()
QString saveAxesTitleAlignement ()
QString saveEnabledTickLabels ()
QString saveTicksType ()
QString saveCurves ()
QString saveLabelsFormat ()
QString saveLabelsRotation ()
QString saveAxesLabelsType ()
QString saveAxesBaseline ()
QString saveAxesFormulas ()
QString saveAxesBackbones ()
QString saveTickLabelsSpace ()
QString saveLabelsPrefixAndSuffix ()
QString saveBackgroundImage ()
void restoreBackgroundImage (const QStringList &lst)
void restoreSymbolImage (int index, const QStringList &lst)
static QString rgbaName (const QColor &color)
Texts
LegendWidgetaddText (LegendWidget *)
LegendWidgetinsertText (const QStringList &list, int fileVersion)
 Used when opening a project file.
LegendWidgetaddTimeStamp ()
void removeLegendItem (int index)
void insertLegend (const QStringList &lst, int fileVersion)
LegendWidgetnewLegend (const QString &text=QString())
QString legendText (bool layerSpec=false, int fromIndex=0)
 Creates a new legend text using the curves titles.
Obsolete functions provided to keep existing Python scripts working
LegendWidgetlegend ()
void setLegend (const QString &)
void removeLegend ()
Line Markers
ArrowMarkeraddArrow (ArrowMarker *mrk)
void remove (ArrowMarker *arrow)
void addArrow (QStringList list, int fileVersion)
 Used when opening a project file.
QList< ArrowMarker * > arrowsList ()
int numArrows ()
void drawLine (bool on, bool arrow=false)
 Draws a line/arrow depending on the value of "arrow".
bool drawArrow ()
bool drawLineActive ()
bool arrowMarkerSelected ()
Image Markers
ImageWidgetaddImage (ImageWidget *i)
ImageWidgetaddImage (const QString &fileName)
ImageWidgetaddImage (const QImage &image)
void insertImageMarker (const QStringList &lst, int fileVersion)
bool imageMarkerSelected ()
Common to all Markers
void removeMarker ()
void updateMarkersBoundingRect (bool rescaleEvent=true)
 Keep the markers on screen each time the scales are modified by adding/removing curves.
void setSelectedArrow (ArrowMarker *mrk, bool add=false)
 Set the selected arrow.
ArrowMarkerselectedArrow ()
bool markerSelected ()
void deselectMarker ()
 Reset any selection states on markers.
Axes
QwtScaleWidget * currentScale ()
QwtScaleWidget * selectedScale ()
QRect axisTitleRect (const QwtScaleWidget *scale)
bool axisTitleSelected ()
ScaleDraw::ScaleType axisType (int axis)
void setXAxisTitle (const QString &text)
void setYAxisTitle (const QString &text)
void setRightAxisTitle (const QString &text)
void setTopAxisTitle (const QString &text)
QString axisTitleString (int axis)
void setAxisTitleString (int axis, const QString &text)
void setAxisTitle (int axis, const QString &text)
void updateAxesTitles ()
void updateAxisTitle (int axis)
void setScaleTitle (int axis, const QString &text)
 TODO: eliminate this function in version 0.9.1 (used only when restoring project files)
QFont axisTitleFont (int axis)
void setAxisTitleFont (int axis, const QFont &fnt)
void setAxisFont (int axis, const QFont &fnt)
void initFonts (const QFont &scaleTitleFnt, const QFont &numbersFnt)
QColor axisTitleColor (int axis)
void setAxisTitleColor (int axis, const QColor &c)
int axisTitleAlignment (int axis)
void setAxisTitleAlignment (int axis, int align)
int axisTitleDistance (int axis)
void setAxisTitleDistance (int axis, int dist)
QColor axisColor (int axis)
void setAxisColor (int axis, const QColor &color)
QColor axisLabelsColor (int axis)
void setAxisLabelsColor (int axis, const QColor &color)
void showAxis (int axis, int type, const QString &formatInfo, Table *table, bool axisOn, int majTicksType, int minTicksType, bool labelsOn, const QColor &c, int format, int prec, int rotation, int baselineDist, const QString &formula, const QColor &labelsColor, int spacing=4, bool backbone=true, const ScaleDraw::ShowTicksPolicy &showTicks=ScaleDraw::ShowAll, const QString &prefix=QString::null, const QString &suffix=QString::null)
void enableAxis (int axis, bool on=true)
void enableAxisLabels (int axis, bool on=true)
int labelsRotation (int axis)
void setAxisLabelRotation (int axis, int rotation)
void loadAxesLinewidth (int width)
 used when opening a project file
void drawAxesBackbones (bool yes)
bool axesBackbones ()
void loadAxesOptions (const QStringList &lst)
 used when opening a project file
void setAxisMargin (int axis, int margin)
void setMajorTicksType (const QList< int > &lst)
void setMajorTicksType (const QStringList &lst)
void setMinorTicksType (const QList< int > &lst)
void setMinorTicksType (const QStringList &lst)
void setAxisTicksLength (int axis, int majTicksType, int minTicksType, int minLength, int majLength)
void setTicksLength (int minLength, int majLength)
void changeTicksLength (int minLength, int majLength)
void setLabelsNumericFormat (const QStringList &l)
 Used for restoring project files.
void setLabelsNumericFormat (int axis, int format, int prec=6, const QString &formula=QString())
void setLabelsDateTimeFormat (int axis, int type, const QString &formatInfo)
void setLabelsDayFormat (int axis, int format)
void setLabelsMonthFormat (int axis, int format)
void recoverObsoleteDateTimeScale (int axis, int type, const QString &origin, const QString &format)
QString axisFormatInfo (int axis)
void setLabelsTextFormat (int axis, int type, const QString &name, const QStringList &lst)
void setLabelsTextFormat (int axis, int type, const QString &labelsColName, Table *table)
QString axisFormula (int axis)
void setAxisFormula (int axis, const QString &)
Canvas Frame
void setCanvasFrame (int width=1, const QColor &color=QColor(Qt::black))
QColor canvasFrameColor ()
int canvasFrameWidth ()
Canvas Image Background
QString canvasBackgroundFileName ()
void setCanvasBackgroundImage (const QString &fn=QString(), bool update=true)
QPixmap backgroundPixmap ()
Plot Title
void setTitleFont (const QFont &fnt)
void setTitleColor (const QColor &c)
void setTitleAlignment (int align)
bool titleSelected ()
void selectTitle (bool select=true)
void clearTitle ()
 Sets the title to an "almost empty" string: " ", thus keeping the QwtText object visible.
void removeTitle ()
 Sets title to an empty string and hides the text label.
void initTitle (bool on, const QFont &fnt)
Border and background
void setFrame (int width=1, const QColor &color=Qt::black)
void setBackgroundColor (const QColor &color)
User-defined Functions
void modifyFunctionCurve (int curve, int type, const QStringList &formulas, const QString &var, double start, double end, int points, const QMap< QString, double > &constants)
FunctionCurveaddFunction (const QStringList &formulas, double start, double end, int points=100, const QString &var="x", int type=0, const QString &title=QString::null)
FunctionCurveinsertFunctionCurve (const QString &formula, int points, int fileVersion)
 Used when reading from a project file with version < 0.9.5.
QString generateFunctionName (const QString &name=tr("F"))
 Returns an unique function name.
Vector Curves
VectorCurveplotVectors (Table *w, const QStringList &colList, int style, int startRow=0, int endRow=-1)
void updateVectorsLayout (int curve, const QColor &color, double width, int arrowLength, int arrowAngle, bool filled, int position, const QString &xEndColName=QString(), const QString &yEndColName=QString())
Box Plots
BoxCurveopenBoxDiagram (Table *w, const QStringList &l, int fileVersion)
void plotBox (Table *w, const QStringList &names, int startRow=0, int endRow=-1)
BoxCurveboxCurve (int index)
Resizing
void resizeEvent (QResizeEvent *e)
void scaleFonts (double factor)
Waterfall
bool isWaterfallPlot ()
int waterfallXOffset ()
int waterfallYOffset ()
void setWaterfallOffset (int x, int y, bool update=false)
void setWaterfallXOffset (int)
void setWaterfallYOffset (int)
void setWaterfallSideLines (bool on=true)
void setWaterfallFillColor (const QColor &)
void updateWaterfallFill (bool on)

Signals

void axisDblClicked (int)
void axisDivChanged (Graph *, int)
void closedGraph ()
void currentColorChanged (const QColor &)
void currentFontChanged (const QFont &)
void cursorInfo (const QString &)
void dataRangeChanged ()
void drawLineEnded (bool)
void enableTextEditor (Graph *)
void hiddenPlot (QWidget *)
void modifiedGraph ()
void selectedCanvas (Graph *)
void selectedGraph (Graph *)
void selectionChanged (SelectionMoveResizer *)
void showAxisDialog (int)
void showAxisTitleDialog ()
void showContextMenu ()
void showCurveContextMenu (QwtPlotItem *)
void showFitResults (const QString &)
void showMarkerPopupMenu ()
void showPlotDialog (int)
void updatedLayout (Graph *)
void viewLineDialog ()
void viewTitleDialog ()

Public Member Functions

FrameWidgetactiveEnrichment ()
LegendWidgetactiveText ()
PlotToolInterfaceactiveTool () const
 Return the active tool, or NULL if none is active.
FrameWidgetadd (FrameWidget *fw, bool copy=true)
void addLegendItem ()
TexWidgetaddTexFormula (const QString &s, const QPixmap &pix)
int axesLinewidth () const
void axisLabelFormat (int axis, char &f, int &prec) const
int axisLabelFormat (int axis)
int axisLabelPrecision (int axis)
AxisTitlePolicy axisTitlePolicy ()
QRect boundingRect ()
void changeCurveIndex (int fromIndex, int toIndex)
QwtPlotItem * closestCurve (int xpos, int ypos, int &dist, int &point)
QList< QwtPlotItem * > curvesList ()
void deselect ()
void deselect (QWidget *)
void enableDouglasPeukerSpeedMode (double tolerance, int maxPoints=3000)
void enablePanningMagnifier (bool on=true, int mode=0)
QList< FrameWidget * > enrichmentsList ()
QColor frameColor ()
double getDouglasPeukerTolerance ()
QList< int > getMajorTicksType ()
QList< int > getMinorTicksType ()
 Graph (int x=0, int y=0, int width=500, int height=400, QWidget *parent=0, Qt::WFlags f=0)
Gridgrid ()
bool hasActiveTool ()
 Returns true if a plot/data tool is enabled.
bool hasPanningMagnifierEnabled ()
bool hasSeletedItems ()
bool hasSynchronizedScaleDivisions ()
QList< FrameWidget * > increasingAreaEnrichmentsList ()
void insertMarker (QwtPlotMarker *m)
bool isPrinting ()
QwtPlotMagnifier * magnifyTool ()
int majorTickLength () const
int minorTickLength () const
MultiLayermultiLayer () const
 Returns a pointer to the parent MultiLayer object.
QRectF pageGeometry ()
const QColor & paletteBackgroundColor () const
void print (QPainter *, const QRect &rect, const QwtPlotPrintFilter &=QwtPlotPrintFilter())
 Paint the plot into a given rectangle. Paint the contents of a QwtPlot instance into a given rectangle (Qwt modified code).
void raiseEnrichements ()
void remove (FrameWidget *)
void restoreCurveLabels (int curveID, const QStringList &lst)
 Used when restoring DataCurve curveID from a project file.
void select (QWidget *l, bool add=false)
void selectCanvas ()
QwtPlotItem * selectedCurveLabels ()
QPointer< SelectionMoveResizerselectionMoveResizer ()
void setActiveText (LegendWidget *l)
void setActiveTool (PlotToolInterface *tool)
 Change the active tool, deleting the old one if it exists.
void setAxesLinewidth (int width)
void setAxisTitlePolicy (const AxisTitlePolicy &policy)
void setCanvasGeometry (const QRect &canvasRect)
 Adjust plot content to its canvas size.
void setCanvasGeometry (int x, int y, int w, int h)
 Convenience function for scripts.
void setCanvasSize (const QSize &size)
 Adjust plot content to its canvas size.
void setCanvasSize (int w, int h)
 Convenience function for scripts.
void setCurvesList (QList< QwtPlotItem * > lst)
void setMajorTicksType (int axis, int type)
void setMinorTicksType (int axis, int type)
void setPageGeometry (const QRectF &r)
void setSynchronizedScaleDivisions (bool on)
void setTickLength (int minLength, int majLength)
int speedModeMaxPoints ()
QList< LegendWidget * > textsList ()
void updateCurveLabels ()
void updateLayout ()
 Adjust plot content to its current size. Must be reimplemented because the base implementation adds a mask causing an ugly drawing artefact.
 ~Graph ()

Private Slots

void selectorDeleted ()

Private Member Functions

QwtDoubleInterval axisBoundingInterval (int axis)
 Finds bounding interval of the plot data.
void deselectCurves ()
void dragEnterEvent (QDragEnterEvent *)
void drawBreak (QPainter *painter, const QRect &rect, const QwtScaleMap &map, int axis) const
void drawInwardTicks (QPainter *painter, const QRect &rect, const QwtScaleMap &map, int axis, bool min, bool maj) const
virtual void drawItems (QPainter *painter, const QRect &rect, const QwtScaleMap map[axisCnt], const QwtPlotPrintFilter &pfilter) const
void dropEvent (QDropEvent *)
QString parseAxisTitle (int axis)
void printCanvas (QPainter *painter, const QRect &canvasRect, const QwtScaleMap map[axisCnt], const QwtPlotPrintFilter &pfilter) const
void printFrame (QPainter *painter, const QRect &rect) const
virtual void printScale (QPainter *, int axisId, int startDist, int endDist, int baseDist, const QRect &) const
 Paint a scale into a given rectangle. Paint the scale into a given rectangle (modified code from Qwt).
void showEvent (QShowEvent *event)
QList< FrameWidget * > stackingOrderEnrichmentsList () const

Private Attributes

bool autoScaleFonts
CanvasPickercp
FrameWidgetd_active_enrichment
 Pointer to the currently selected text/legend.
PlotToolInterfaced_active_tool
 The currently active tool, or NULL for default (pointer).
bool d_antialiasing
 Render hint for plot items.
bool d_auto_scale
 Flag indicating if the axes limits should be changed in order to show all data each time a curva data change occurs.
AxisTitlePolicy d_axis_title_policy
QStringList d_axis_titles
QString d_canvas_bkg_path
QPixmap d_canvas_bkg_pix
QList< QwtPlotItem * > d_curves
 List storing pointers to the curves on the plot.
bool d_disable_curve_antialiasing
double d_Douglas_Peuker_tolerance
QList< FrameWidget * > d_enrichments
QList< QwtPlotCurve * > d_fit_curves
 List storing pointers to the curves resulting after a fit session, in case the user wants to delete them later on.
Gridd_grid
 Pointer to the grid.
bool d_grid_on_top
 Flag telling if the grid should be drawn on top of data.
QPointer< ImageProfilesToold_image_profiles_tool
bool d_is_printing
 Flag telling if we are performing a print operation.
QList< ArrowMarker * > d_lines
 Arrows/lines on plot.
QwtPlotMagnifier * d_magnifier
int d_maj_tick_length
QPointer< SelectionMoveResizerd_markers_selector
 The markers selected for move/resize operations or NULL if none are selected.
int d_max_antialising_size
int d_min_tick_length
 Axes tick lengths.
bool d_missing_data_gap
 Flag telling if the curves line should be connected across missing data.
QRectF d_page_rect
QwtPlotPanner * d_panner
PlotToolInterfaced_peak_fit_tool
QPointer< RangeSelectorToold_range_selector
 The current curve selection, or NULL if none is active.
ArrowMarkerd_selected_arrow
 Pointer to the currently selected line/image.
int d_speed_mode_points
bool d_synchronize_scales
QVector< double > d_user_step
 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.
int d_waterfall_offset_x
int d_waterfall_offset_y
QwtPlotZoomer * d_zoomer [2]
bool drawArrowOn
bool drawAxesBackbone
bool drawLineOn
ScalePickerscalePicker
TitlePickertitlePicker

Detailed Description

A 2D-plotting widget.

Graphs are managed by a MultiLayer, where they are sometimes referred to as "graphs" and sometimes as "layers". Other parts of the code also call them "plots", regardless of the fact that there's also a class Plot. Within the user interface, they are quite consistently called "layers".

Each graph owns a Plot called #d_plot, which handles parts of the curve, axis and marker management (similarly to QwtPlot), as well as the pickers d_zoomer (a QwtPlotZoomer), titlePicker (a TitlePicker), scalePicker (a ScalePicker) and cp (a CanvasPicker), which handle various parts of the user interaction.

Graph contains support for various curve types (see CurveType), some of them relying on Qtiplot-specific QwtPlotCurve subclasses for parts of the functionality.

Note that some of Graph's methods are implemented in analysis.cpp.

Future Plans

Merge with Plot and CanvasPicker. Think about merging in TitlePicker and ScalePicker. On the other hand, things like range selection, peak selection or (re)moving data points could be split out into tool classes like QwtPlotZoomer or SelectionMoveResizer.

What definitely should be split out are plot types like histograms and pie charts (TODO: which others?). We need a generic framework for this in any case so that new plot types can be implemented in plugins, and Graph could do with a little diet. Especially after merging in Plot and CanvasPicker. [ Framework needs to support plug-ins; assigned to ion ]


Member Enumeration Documentation

Enumerator:
Left 
Right 
Bottom 
Top 
Enumerator:
Default 
ColName 
ColComment 
NameAndComment 
Enumerator:
Line 
Scatter 
LineSymbols 
VerticalBars 
Area 
Pie 
VerticalDropLines 
Spline 
HorizontalSteps 
Histogram 
HorizontalBars 
VectXYXY 
ErrorBars 
Box 
VectXYAM 
VerticalSteps 
ColorMap 
GrayScale 
Contour 
Function 
ImagePlot 
StackBar 
StackColumn 
Enumerator:
Auto 
ColumnName 
ColumnComment 
TableName 
TableLegend 
Enumerator:
None 
Text 
Arrow 
Image 
Enumerator:
Linear 
Log10 
Ln 
Log2 
Reciprocal 
Probability 
Logit 
Enumerator:
NoTicks 
Out 
InOut 
In 

Constructor & Destructor Documentation

Graph::Graph ( int  x = 0,
int  y = 0,
int  width = 500,
int  height = 400,
QWidget *  parent = 0,
Qt::WFlags  f = 0 
)
Graph::~Graph ( )

Member Function Documentation

void Graph::activateGraph ( )
slot
FrameWidget* Graph::activeEnrichment ( )
inline
LegendWidget * Graph::activeText ( )
PlotToolInterface* Graph::activeTool ( ) const
inline
FrameWidget * Graph::add ( FrameWidget fw,
bool  copy = true 
)
ArrowMarker * Graph::addArrow ( ArrowMarker mrk)
slot
void Graph::addArrow ( QStringList  list,
int  fileVersion 
)
slot
bool Graph::addCurves ( Table w,
const QStringList &  names,
int  style = 0,
double  lWidth = 1,
int  sSize = 3,
int  startRow = 0,
int  endRow = -1 
)
slot
ErrorBarsCurve * Graph::addErrorBars ( const QString &  xColName,
const QString &  yColName,
Table errTable,
const QString &  errColName,
int  type = 1,
double  width = 1,
int  cap = 8,
const QColor &  color = QColor(Qt::black),
bool  through = true,
bool  minus = true,
bool  plus = true 
)
slot
ErrorBarsCurve * Graph::addErrorBars ( const QString &  yColName,
Table errTable,
const QString &  errColName,
int  type = 1,
double  width = 1,
int  cap = 8,
const QColor &  color = QColor(Qt::black),
bool  through = true,
bool  minus = true,
bool  plus = true 
)
slot
ErrorBarsCurve * Graph::addErrorBars ( DataCurve c,
Table errTable,
const QString &  errColName,
int  type = 1,
double  width = 1,
int  cap = 8,
const QColor &  color = QColor(Qt::black),
bool  through = true,
bool  minus = true,
bool  plus = true 
)
slot
void Graph::addFitCurve ( QwtPlotCurve *  c)
slot
FunctionCurve * Graph::addFunction ( const QStringList &  formulas,
double  start,
double  end,
int  points = 100,
const QString &  var = "x",
int  type = 0,
const QString &  title = QString::null 
)
slot
QwtHistogram * Graph::addHistogram ( Matrix m)
slot
ImageWidget * Graph::addImage ( ImageWidget i)
slot
ImageWidget * Graph::addImage ( const QString &  fileName)
slot

References d_enrichments, and modifiedGraph().

ImageWidget * Graph::addImage ( const QImage &  image)
slot

References d_enrichments, and modifiedGraph().

void Graph::addLegendItem ( )
TexWidget * Graph::addTexFormula ( const QString &  s,
const QPixmap &  pix 
)

References d_enrichments, and modifiedGraph().

Referenced by TexWidget::restore().

LegendWidget * Graph::addText ( LegendWidget t)
slot
LegendWidget * Graph::addTimeStamp ( )
slot
QStringList Graph::analysableCurvesList ( )
slot
bool Graph::antialiasing ( )
inlineslot
bool Graph::arrowMarkerSelected ( )
slot
QList<ArrowMarker *> Graph::arrowsList ( )
inlineslot
bool Graph::autoscaleFonts ( )
inlineslot
bool Graph::axesBackbones ( )
inlineslot

References drawAxesBackbone.

Referenced by AxesDialog::setGraph().

int Graph::axesLinewidth ( ) const
QwtDoubleInterval Graph::axisBoundingInterval ( int  axis)
private

Finds bounding interval of the plot data.

Referenced by setScale().

QColor Graph::axisColor ( int  axis)
slot
void Graph::axisDblClicked ( int  )
signal

Referenced by Graph(), and showScaleDialog().

void Graph::axisDivChanged ( Graph ,
int   
)
signal

Referenced by setScale(), and zoomed().

QString Graph::axisFormatInfo ( int  axis)
slot
QString Graph::axisFormula ( int  axis)
slot
void Graph::axisLabelFormat ( int  axis,
char &  f,
int &  prec 
) const
Returns:
the number format for the major scale labels of a specified axis
Parameters:
axisaxis index
Return values:
fformat character
precprecision

References ScaleDraw::labelFormat().

Referenced by copyScaleDraw(), saveLabelsFormat(), AxesDialog::setLabelsNumericFormat(), showAxis(), AxesDialog::showAxisFormatOptions(), and AxesDialog::updateLabelsFormat().

int Graph::axisLabelFormat ( int  axis)
int Graph::axisLabelPrecision ( int  axis)
QColor Graph::axisLabelsColor ( int  axis)
slot
double Graph::axisStep ( int  axis)
inlineslot
int Graph::axisTitleAlignment ( int  axis)
slot
QColor Graph::axisTitleColor ( int  axis)
slot
int Graph::axisTitleDistance ( int  axis)
slot
QFont Graph::axisTitleFont ( int  axis)
slot
AxisTitlePolicy Graph::axisTitlePolicy ( )
inline

References d_axis_title_policy.

Referenced by copy().

QRect Graph::axisTitleRect ( const QwtScaleWidget *  scale)
slot
bool Graph::axisTitleSelected ( )
slot
QString Graph::axisTitleString ( int  axis)
slot
ScaleDraw::ScaleType Graph::axisType ( int  axis)
slot
QPixmap Graph::backgroundPixmap ( )
inlineslot
QRect Graph::boundingRect ( )
BoxCurve * Graph::boxCurve ( int  index)
slot

References Box, dataCurve(), and PlotCurve::type().

QString Graph::canvasBackgroundFileName ( )
inlineslot
QColor Graph::canvasFrameColor ( )
slot
int Graph::canvasFrameWidth ( )
slot
void Graph::changeCurveIndex ( int  fromIndex,
int  toIndex 
)
void Graph::changeTicksLength ( int  minLength,
int  majLength 
)
slot
void Graph::clearAxisTitle ( )
slot
void Graph::clearTitle ( )
slot

Sets the title to an "almost empty" string: " ", thus keeping the QwtText object visible.

References modifiedGraph().

Referenced by ApplicationWindow::clearSelection(), and showTitleContextMenu().

void Graph::closedGraph ( )
signal

Referenced by closeEvent().

void Graph::closeEvent ( QCloseEvent *  e)
slot

References closedGraph().

QwtPlotItem * Graph::closestCurve ( int  xpos,
int  ypos,
int &  dist,
int &  point 
)
void Graph::contextMenuEvent ( QContextMenuEvent *  e)
slot
void Graph::copy ( Graph g)
slot
void Graph::copyAxisTitle ( )
slot
void Graph::copyCurves ( Graph g)
slot
void Graph::copyEnrichments ( Graph g)
slot

References add(), addArrow(), arrowsList(), and enrichmentsList().

Referenced by copy().

void Graph::copyImage ( )
slot
void Graph::copyScaleDraw ( Graph g,
int  i 
)
slot
void Graph::copyScaleWidget ( Graph g,
int  i 
)
slot
void Graph::copyTitle ( )
slot

Referenced by showTitleContextMenu().

void Graph::createTable ( const QString &  curveName)
slot

Provided for convenience in scripts.

References curve().

Referenced by ApplicationWindow::showCurveWorksheet().

void Graph::createTable ( const QwtPlotCurve *  curve)
slot
void Graph::currentColorChanged ( const QColor &  )
signal
void Graph::currentFontChanged ( const QFont &  )
signal
QwtScaleWidget * Graph::currentScale ( )
slot
void Graph::cursorInfo ( const QString &  )
signal
PlotCurve * Graph::curve ( int  index)
slot

get curve by index

References d_curves.

Referenced by FFTDialog::accept(), FitDialog::accept(), FunctionDialog::acceptFunction(), FunctionDialog::acceptParametric(), FunctionDialog::acceptPolar(), InterpolationDialog::activateCurve(), SmoothCurveDialog::activateCurve(), IntegrationDialog::activateCurve(), PolynomFitDialog::activateCurve(), ExpDecayDialog::activateCurve(), FitDialog::activateCurve(), FFTDialog::activateDataSet(), ApplicationWindow::analysis(), ImageProfilesTool::append(), AssociationsDialog::changePlotAssociation(), RangeSelectorTool::clearMultipleSelection(), closestCurve(), RangeSelectorTool::copyMultipleSelection(), BaselineDialog::createBaseline(), createTable(), dataCurve(), ApplicationWindow::differentiate(), LegendWidget::drawText(), FilterDialog::filter(), ExpDecayDialog::fit(), PolynomFitDialog::fit(), functionCurve(), LegendWidget::getCurve(), guessUniqueCurveLayout(), initCurveLayout(), insertFunctionCurve(), insertText(), IntegrationDialog::integrateCurve(), InterpolationDialog::interpolate(), DataPickerTool::keyEventFilter(), RangeSelectorTool::keyEventFilter(), legendText(), RangeSelectorTool::mightNeedMultipleSelection(), modifyFunctionCurve(), ApplicationWindow::openGraph(), parseAxisTitle(), ApplicationWindow::plotDoubleYAxis(), range(), RangeSelectorTool::RangeSelectorTool(), removeCurve(), CurvesDialog::removeCurves(), removePie(), PieLabel::restore(), restoreCurveLabels(), restoreSymbolImage(), saveCurveLayout(), savePieCurveLayout(), saveToString(), setBarsGap(), setCurveFullRange(), setCurveLineColor(), setCurveLineStyle(), setCurveLineWidth(), CurveRangeDialog::setCurvesToModify(), setCurveStyle(), CurveRangeDialog::setCurveToModify(), FunctionDialog::setCurveToModify(), Filter::setDataFromCurve(), setWaterfallFillColor(), setWaterfallSideLines(), ApplicationWindow::showDataSetDialog(), RangeSelectorTool::showSelectionDialog(), MultiLayer::showWaterfallFillDialog(), SmoothCurveDialog::smooth(), updateVectorsLayout(), and updateWaterfallFill().

PlotCurve* Graph::curve ( const QString &  title)
inlineslot

get curve by name

References curve(), and curveIndex().

Referenced by curve().

int Graph::curveCount ( )
inlineslot
int Graph::curveIndex ( QwtPlotItem *  c)
inlineslot
int Graph::curveIndex ( const QString &  title)
inlineslot

map curve title to index

References plotItemsList().

QStringList Graph::curveNamesList ( )
slot

Returns the names of all the QwtPlotCurve items on the plot, as a string list.

References d_curves.

Referenced by ApplicationWindow::dependingPlots(), MultiPeakFit::insertPeakFunctionCurve(), and ApplicationWindow::multilayerDependencies().

QString Graph::curveRange ( QwtPlotCurve *  c)
slot
QList<QwtPlotItem *> Graph::curvesList ( )
inline
QString Graph::curveTitle ( int  index)
slot

get curve title string by inde (convenience function for scripts)

References plotItem().

QSize Graph::customPrintSize ( const QSizeF &  customSize,
int  unit,
int  dpi 
)
staticslot
void Graph::cutAxisTitle ( )
slot

References copyAxisTitle(), and removeAxisTitle().

Referenced by showAxisTitleMenu().

void Graph::cutTitle ( )
slot

References removeTitle().

Referenced by showTitleContextMenu().

DataCurve * Graph::dataCurve ( int  index)
slot
void Graph::dataRangeChanged ( )
signal

Referenced by enableRangeSelectors().

void Graph::deleteFitCurves ( )
slot

References d_fit_curves, and removeCurve().

Referenced by FitDialog::deleteFitCurves().

void Graph::deselect ( )
void Graph::deselect ( QWidget *  l)

References d_markers_selector.

void Graph::deselectCurves ( )
private

References curvesList(), and Function.

Referenced by deselect(), and select().

void Graph::deselectMarker ( )
slot
void Graph::disableCurveAntialiasing ( bool  disable,
int  maxPoints 
)
slot
void Graph::disableImageProfilesTool ( )
slot

References d_image_profiles_tool.

Referenced by ~Graph().

void Graph::disableTools ( )
slot
void Graph::dragEnterEvent ( QDragEnterEvent *  e)
private

References multiLayer().

void Graph::draw ( QPaintDevice *  device,
const QSize &  size,
double  fontsFactor = 1.0 
)
slot
bool Graph::drawArrow ( )
inlineslot
void Graph::drawAxesBackbones ( bool  yes)
slot
void Graph::drawBreak ( QPainter *  painter,
const QRect &  rect,
const QwtScaleMap &  map,
int  axis 
) const
private
void Graph::drawInwardTicks ( QPainter *  painter,
const QRect &  rect,
const QwtScaleMap &  map,
int  axis,
bool  min,
bool  maj 
) const
private
void Graph::drawItems ( QPainter *  painter,
const QRect &  rect,
const QwtScaleMap  map[axisCnt],
const QwtPlotPrintFilter &  pfilter 
) const
privatevirtual
void Graph::drawLine ( bool  on,
bool  arrow = false 
)
slot
bool Graph::drawLineActive ( )
inlineslot
void Graph::drawLineEnded ( bool  )
signal

Referenced by drawLine().

void Graph::dropEvent ( QDropEvent *  event)
private
void Graph::enableAutoscaling ( bool  on = true)
inlineslot
void Graph::enableAxis ( int  axis,
bool  on = true 
)
slot
void Graph::enableAxisLabels ( int  axis,
bool  on = true 
)
slot
void Graph::enableDouglasPeukerSpeedMode ( double  tolerance,
int  maxPoints = 3000 
)
void Graph::enablePanningMagnifier ( bool  on = true,
int  mode = 0 
)
bool Graph::enableRangeSelectors ( const QObject *  status_target = NULL,
const char *  status_slot = "" 
)
slot

Enables the data range selector tool.

      This one is a bit special, because other tools can depend upon an existing selection.
      Therefore, range selection (like zooming) has to be provided in addition to the generic
      tool interface.

References d_range_selector, and dataRangeChanged().

Referenced by ApplicationWindow::showRangeSelectors().

void Graph::enableTextEditor ( )
slot
void Graph::enableTextEditor ( Graph )
signal
QList<FrameWidget *> Graph::enrichmentsList ( )
inline
void Graph::exportEMF ( const QString &  fname,
const QSizeF &  customSize = QSizeF(),
int  unit = FrameWidget::Pixel,
double  fontsFactor = 1.0 
)
slot
void Graph::exportImage ( const QString &  fileName,
int  quality = 100,
bool  transparent = false,
int  dpi = 0,
const QSizeF &  customSize = QSizeF (),
int  unit = FrameWidget::Pixel,
double  fontsFactor = 1.0,
int  compression = 0 
)
slot
void Graph::exportSVG ( const QString &  fname,
const QSizeF &  customSize = QSizeF(),
int  unit = FrameWidget::Pixel,
double  fontsFactor = 1.0 
)
slot
void Graph::exportTeX ( const QString &  fname,
bool  color = true,
bool  escapeStrings = true,
bool  fontSizes = true,
const QSizeF &  customSize = QSizeF(),
int  unit = FrameWidget::Pixel,
double  fontsFactor = 1.0 
)
slot
void Graph::exportToFile ( const QString &  fileName)
slot

Provided for convenience in scripts.

References exportEMF(), exportImage(), exportSVG(), exportTeX(), and exportVector().

void Graph::exportVector ( const QString &  fileName,
int  res = 0,
bool  color = true,
const QSizeF &  customSize = QSizeF (),
int  unit = FrameWidget::Pixel,
double  fontsFactor = 1.0 
)
slot
void Graph::exportVector ( QPrinter *  printer,
int  res = 0,
bool  color = true,
const QSizeF &  customSize = QSizeF (),
int  unit = FrameWidget::Pixel,
double  fontsFactor = 1.0 
)
slot
QList<QwtPlotCurve *> Graph::fitCurvesList ( )
inlineslot
bool Graph::focusNextPrevChild ( bool  next)
slot
QColor Graph::frameColor ( )
FunctionCurve * Graph::functionCurve ( int  index)
slot

References curve(), Function, and PlotCurve::type().

QString Graph::generateFunctionName ( const QString &  name = tr("F"))
slot

Returns an unique function name.

References d_curves, Function, and PlotCurve::type().

Referenced by addFunction(), and Fit::insertFitFunctionCurve().

double Graph::getDouglasPeukerTolerance ( )
inline
QList< int > Graph::getMajorTicksType ( )
QList< int > Graph::getMinorTicksType ( )
Qt::PenStyle Graph::getPenStyle ( const QString &  s)
staticslot
Qt::PenStyle Graph::getPenStyle ( int  style)
staticslot
QPixmap Graph::graphPixmap ( const QSize &  size = QSize(),
double  scaleFontsFactor = 1.0,
bool  transparent = false 
)
slot

References boundingRect(), and print().

Referenced by copyImage(), and exportImage().

Grid* Graph::grid ( )
inline
void Graph::guessUniqueCurveLayout ( int &  colorIndex,
int &  symbolIndex 
)
slot
bool Graph::hasActiveTool ( )

Returns true if a plot/data tool is enabled.

References d_active_tool, d_magnifier, d_panner, d_peak_fit_tool, d_range_selector, drawLineActive(), and zoomOn().

Referenced by Spectrogram::selectedLabels().

bool Graph::hasGridOnTop ( )
inlineslot

References d_grid_on_top.

Referenced by copy(), and PlotDialog::setActiveLayer().

bool Graph::hasPanningMagnifierEnabled ( )
inline
bool Graph::hasSeletedItems ( )
bool Graph::hasSynchronizedScaleDivisions ( )
inline

References d_synchronize_scales.

Referenced by AxesDialog::updatePlot().

void Graph::hiddenPlot ( QWidget *  )
signal
void Graph::hideSelectedAxis ( )
slot
bool Graph::imageMarkerSelected ( )
slot
QPointer<ImageProfilesTool> Graph::imageProfilesTool ( )
inlineslot
QList< FrameWidget * > Graph::increasingAreaEnrichmentsList ( )
CurveLayout Graph::initCurveLayout ( int  style,
int  curves = 0,
bool  guessLayout = true 
)
slot
CurveLayout Graph::initCurveLayout ( )
staticslot
void Graph::initFonts ( const QFont &  scaleTitleFnt,
const QFont &  numbersFnt 
)
slot
void Graph::initTitle ( bool  on,
const QFont &  fnt 
)
slot
DataCurve * Graph::insertCurve ( Table w,
const QString &  name,
int  style,
int  startRow = 0,
int  endRow = -1 
)
slot
DataCurve * Graph::insertCurve ( Table w,
int  xcol,
const QString &  name,
int  style 
)
slot
DataCurve * Graph::insertCurve ( Table w,
const QString &  xColName,
const QString &  yColName,
int  style,
int  startRow = 0,
int  endRow = -1 
)
slot
DataCurve * Graph::insertCurve ( Table xt,
const QString &  xColName,
Table yt,
const QString &  yColName,
int  style,
int  startRow = 0,
int  endRow = -1 
)
slot
void Graph::insertCurve ( QwtPlotItem *  c)
slot

References d_antialiasing, and d_curves.

FunctionCurve * Graph::insertFunctionCurve ( const QString &  formula,
int  points,
int  fileVersion 
)
slot

Used when reading from a project file with version < 0.9.5.

References addFunction(), curve(), FunctionCurve::Normal, FunctionCurve::Parametric, and FunctionCurve::Polar.

Referenced by ApplicationWindow::openGraph().

void Graph::insertImageMarker ( const QStringList &  lst,
int  fileVersion 
)
slot
void Graph::insertLegend ( const QStringList &  lst,
int  fileVersion 
)
slot
void Graph::insertMarker ( QwtPlotMarker *  m)
void Graph::insertPlotItem ( QwtPlotItem *  i,
int  type 
)
slot
LegendWidget * Graph::insertText ( const QStringList &  list,
int  fileVersion 
)
slot
void Graph::invertScale ( int  axis)
slot

Set axis scale.

bool Graph::isAutoscalingEnabled ( )
inlineslot
bool Graph::isCurveAntialiasingDisabled ( )
inlineslot

References d_disable_curve_antialiasing.

Referenced by copy().

bool Graph::isCurveAntialiasingEnabled ( QwtPlotItem *  it)
slot
bool Graph::isMissingDataGapEnabled ( )
inlineslot
bool Graph::isPiePlot ( )
slot
bool Graph::isPrinting ( )
inline
bool Graph::isWaterfallPlot ( )
inlineslot
int Graph::labelsRotation ( int  axis)
slot
LegendWidget * Graph::legend ( )
slot
QString Graph::legendText ( bool  layerSpec = false,
int  fromIndex = 0 
)
slot
void Graph::loadAxesLinewidth ( int  width)
slot

used when opening a project file

References setAxesLinewidth().

Referenced by ApplicationWindow::openGraph().

void Graph::loadAxesOptions ( const QStringList &  lst)
slot

used when opening a project file

References drawAxesBackbone.

Referenced by ApplicationWindow::openGraph().

QwtPlotMagnifier* Graph::magnifyTool ( )
inline
int Graph::majorTickLength ( ) const
bool Graph::markerSelected ( )
slot
DataCurve * Graph::masterCurve ( ErrorBarsCurve er)
slot
DataCurve * Graph::masterCurve ( const QString &  xColName,
const QString &  yColName 
)
slot

Returns a valid master curve for a plot association.

References d_curves, and Function.

int Graph::maxAntialisingSize ( )
inlineslot

References d_max_antialising_size.

Referenced by copy().

int Graph::minorTickLength ( ) const
void Graph::modifiedGraph ( )
signal
void Graph::modifyFunctionCurve ( int  curve,
int  type,
const QStringList &  formulas,
const QString &  var,
double  start,
double  end,
int  points,
const QMap< QString, double > &  constants 
)
slot
bool Graph::mousePressed ( QEvent *  e)
slot
MultiLayer * Graph::multiLayer ( ) const

Returns a pointer to the parent MultiLayer object.

Referenced by AddWidgetTool::addEquation(), AddWidgetTool::addText(), AddWidgetTool::AddWidgetTool(), ScreenPickerTool::append(), ImageProfilesTool::append(), LineDialog::apply(), TextDialog::apply(), AxesDialog::applyAxisFormat(), PlotDialog::applyBoxWhiskersFormat(), AxesDialog::applyCanvasFormat(), PlotDialog::applyErrorBarFormat(), PlotDialog::applyLabelsFormat(), PlotDialog::applyLineFormat(), PlotDialog::applyPercentileFormat(), PlotDialog::applySymbolsFormat(), FrameWidget::calculateBottomValue(), FrameWidget::calculateRightValue(), FrameWidget::calculateXValue(), FrameWidget::calculateYValue(), ImageProfilesTool::clone(), TextEditor::closeEvent(), ImageProfilesTool::connectPlotLayers(), RangeSelectorTool::copyMultipleSelection(), RangeSelectorTool::copySelectedCurve(), EnrichmentDialog::createImage(), createTable(), deselect(), ArrowMarker::displayInfo(), MultiLayer::dragEnterEvent(), dragEnterEvent(), MultiLayer::dropEvent(), dropEvent(), RangeSelectorTool::emitStatusText(), enablePanningMagnifier(), enableTextEditor(), CanvasPicker::eventFilter(), AddWidgetTool::eventFilter(), exportEMF(), exportImage(), exportVector(), EnrichmentDialog::frameApplyTo(), FrameWidget::FrameWidget(), LegendWidget::getCurve(), guessUniqueCurveLayout(), ImageProfilesTool::ImageProfilesTool(), initCurveLayout(), PieCurve::initLabels(), DataPickerTool::keyEventFilter(), ScaleDraw::labelString(), legendText(), PieCurve::loadData(), Fit::logFitInfo(), Integration::logInfo(), ImageProfilesTool::modifiedMatrix(), newLegend(), FFT::outputGraphs(), ImageWidget::paintEvent(), LegendWidget::parse(), RangeSelectorTool::pasteSelection(), EnrichmentDialog::patternApplyTo(), plotBox(), print(), raiseEnrichements(), resizeEvent(), EnrichmentDialog::saveImagesInternally(), saveToString(), EnrichmentDialog::setBestSize(), EnrichmentDialog::setCoordinates(), Spectrogram::setDefaultColorMap(), setIndexedColors(), PlotDialog::setLabelsFont(), RectangleWidget::setLinkedLayer(), Spectrogram::setMatrix(), FrameWidget::setOriginCoord(), LegendWidget::showTextEditor(), stackingOrderEnrichmentsList(), TextEditor::TextEditor(), EnrichmentDialog::textFormatApplyTo(), EnrichmentDialog::updateForm(), AxesDialog::updateGrid(), updateWaterfallFill(), and AddWidgetTool::~AddWidgetTool().

LegendWidget * Graph::newLegend ( const QString &  text = QString())
slot
void Graph::notifyChanges ( )
slot
void Graph::notifyColorChange ( const QColor &  c)
inlineslot
void Graph::notifyFontChange ( const QFont &  f)
inlineslot
int Graph::numArrows ( )
inlineslot

References d_lines.

int Graph::obsoleteSymbolStyle ( int  type)
staticslot
BoxCurve * Graph::openBoxDiagram ( Table w,
const QStringList &  l,
int  fileVersion 
)
slot
int Graph::oppositeAxis ( int  axis)
slot
QRectF Graph::pageGeometry ( )
inline
const QColor & Graph::paletteBackgroundColor ( ) const
QString Graph::parseAxisTitle ( int  axis)
private
QString Graph::penStyleName ( Qt::PenStyle  style)
staticslot
QString Graph::pieLegendText ( )
slot

References d_curves.

Referenced by newLegend().

void Graph::plotBox ( Table w,
const QStringList &  names,
int  startRow = 0,
int  endRow = -1 
)
slot
QwtPlotItem * Graph::plotItem ( int  index)
slot
QStringList Graph::plotItemsList ( )
slot

Returns the names of all plot items, including spectrograms, as a string list.

References d_curves.

Referenced by curveIndex(), plotSpectrogram(), CurvesDialog::setGraph(), CurvesDialog::shiftCurveBy(), and CurvesDialog::showCurveRange().

PieCurve * Graph::plotPie ( Table w,
const QString &  name,
int  startRow = 0,
int  endRow = -1 
)
slot
PieCurve * Graph::plotPie ( Table w,
const QString &  name,
const QPen &  pen,
int  brush,
int  size,
int  firstColor,
int  startRow = 0,
int  endRow = -1,
bool  visible = true,
double  d_start_azimuth = 270,
double  d_view_angle = 90,
double  d_thickness = 33,
double  d_horizontal_offset = 0.0,
double  d_edge_dist = 25,
bool  d_counter_clockwise = false,
bool  d_auto_labeling = true,
bool  d_values = false,
bool  d_percentages = true,
bool  d_categories = false,
bool  d_fixed_labels_pos = true 
)
slot
Spectrogram * Graph::plotSpectrogram ( Matrix m,
CurveType  type 
)
slot
VectorCurve * Graph::plotVectors ( Table w,
const QStringList &  colList,
int  style,
int  startRow = 0,
int  endRow = -1 
)
slot
void Graph::print ( QPainter *  painter,
const QRect &  plotRect,
const QwtPlotPrintFilter &  pfilter = QwtPlotPrintFilter() 
)

Paint the plot into a given rectangle. Paint the contents of a QwtPlot instance into a given rectangle (Qwt modified code).

Parameters:
painterPainter
plotRectBounding rectangle
pfilterPrint filter

References boundingRect(), d_curves, d_is_printing, deselect(), LegendWidget::font(), FrameWidget::isOnTop(), FrameWidget::print(), printCanvas(), printFrame(), printScale(), LegendWidget::setFont(), VectorCurve::setVectorPen(), stackingOrderEnrichmentsList(), PlotCurve::type(), VectorCurve::vectorPen(), VectXYAM, and VectXYXY.

Referenced by MultiLayer::canvasPixmap(), MultiLayer::draw(), MultiLayer::exportVector(), MultiLayer::printActiveLayer(), and MultiLayer::printAllLayers().

void Graph::print ( )
slot

References multiLayer().

Referenced by draw(), exportVector(), and graphPixmap().

void Graph::printCanvas ( QPainter *  painter,
const QRect &  canvasRect,
const QwtScaleMap  map[axisCnt],
const QwtPlotPrintFilter &  pfilter 
) const
private

References drawItems().

Referenced by print().

void Graph::printFrame ( QPainter *  painter,
const QRect &  rect 
) const
private

References paletteBackgroundColor().

Referenced by print().

void Graph::printScale ( QPainter *  painter,
int  axisId,
int  startDist,
int  endDist,
int  baseDist,
const QRect &  rect 
) const
privatevirtual

Paint a scale into a given rectangle. Paint the scale into a given rectangle (modified code from Qwt).

Parameters:
painterPainter
axisIdAxis
startDistStart border distance
endDistEnd border distance
baseDistBase distance
rectBounding rectangle

Referenced by print().

void Graph::raiseEnrichements ( )
int Graph::range ( const QString &  curveTitle,
double *  start,
double *  end 
)
slot

Set start and end to selected X range of curve "curveTitle" or, if there's no selection, to the curve's total range.

      \return the number of selected or total points

References curve().

Referenced by InterpolationDialog::activateCurve(), IntegrationDialog::activateCurve(), PolynomFitDialog::activateCurve(), ExpDecayDialog::activateCurve(), FitDialog::activateCurve(), and Filter::setDataFromCurve().

int Graph::range ( QwtPlotCurve *  c,
double *  start,
double *  end 
)
slot

Set start and end to selected X range of curve "curve" or, if there's no selection, to the curve's total range.

      \return the number of selected or total points

References d_range_selector.

bool Graph::rangeSelectorsEnabled ( )
slot
QPointer<RangeSelectorTool> Graph::rangeSelectorTool ( )
inlineslot
void Graph::recoverObsoleteDateTimeScale ( int  axis,
int  type,
const QString &  origin,
const QString &  format 
)
slot
void Graph::reloadCurvesData ( )
slot

References d_curves, Function, and PlotCurve::type().

void Graph::remove ( FrameWidget f)
void Graph::remove ( ArrowMarker arrow)
slot
void Graph::removeAxisTitle ( )
slot
void Graph::removeCurve ( QwtPlotItem *  it)
slot
void Graph::removeCurve ( int  index)
slot

Removes a curve defined by its index.

References d_curves, and removeCurve().

void Graph::removeCurve ( const QString &  s)
slot

Removes a curve defined by its title string s.

References curveIndex(), and removeCurve().

void Graph::removeCurves ( const QString &  s)
slot

Removes all curves defined by the title/plot association string s.

References d_curves, Function, and removeCurve().

Referenced by ApplicationWindow::removeCurves().

void Graph::removeLegend ( )
slot
void Graph::removeLegendItem ( int  index)
slot
void Graph::removeMarker ( )
slot
void Graph::removePie ( )
slot
void Graph::removeTitle ( )
slot

Sets title to an empty string and hides the text label.

References modifiedGraph().

Referenced by cutTitle(), Graph(), and showTitleContextMenu().

void Graph::resizeEvent ( QResizeEvent *  e)
slot
void Graph::restoreBackgroundImage ( const QStringList &  lst)
slot
void Graph::restoreCurveLabels ( int  curveID,
const QStringList &  lst 
)

Used when restoring DataCurve curveID from a project file.

References curve(), and DataCurve::restoreLabels().

Referenced by ApplicationWindow::openGraph().

QwtHistogram * Graph::restoreHistogram ( Matrix m,
const QStringList &  l 
)
slot
void Graph::restoreSpectrogram ( ApplicationWindow app,
const QStringList &  lst 
)
slot
void Graph::restoreSymbolImage ( int  index,
const QStringList &  lst 
)
slot

References curve(), and d_curves.

Referenced by ApplicationWindow::openGraph().

void Graph::reverseCurveOrder ( )
slot
QString Graph::rgbaName ( const QColor &  color)
staticslot

Referenced by saveCurveLayout().

QString Graph::saveAxesBackbones ( )
slot

References drawAxesBackbone.

Referenced by saveToString().

QString Graph::saveAxesBaseline ( )
slot

Referenced by saveToString().

QString Graph::saveAxesColors ( )
slot

Referenced by saveToString().

QString Graph::saveAxesFormulas ( )
slot

References ScaleDraw::formula().

Referenced by saveToString().

QString Graph::saveAxesLabelsType ( )
slot
QString Graph::saveAxesTitleAlignement ( )
slot

Referenced by saveToString().

QString Graph::saveAxesTitleColors ( )
slot

Referenced by saveToString().

QString Graph::saveBackgroundImage ( )
slot

References d_canvas_bkg_path, and d_canvas_bkg_pix.

Referenced by saveToString().

QString Graph::saveCanvas ( )
slot

References canvasFrameColor().

Referenced by saveToString().

QString Graph::saveCurveLayout ( int  index)
slot
QString Graph::saveCurves ( )
slot
QString Graph::saveEnabledAxes ( )
slot

Referenced by saveToString().

QString Graph::saveEnabledTickLabels ( )
slot

Referenced by saveToString().

QString Graph::saveFonts ( )
slot

Referenced by saveToString().

QString Graph::saveLabelsFormat ( )
slot

References axisLabelFormat(), and axisLabelPrecision().

Referenced by saveToString().

QString Graph::saveLabelsPrefixAndSuffix ( )
slot

References ScaleDraw::prefix(), and ScaleDraw::suffix().

Referenced by saveToString().

QString Graph::saveLabelsRotation ( )
slot

References labelsRotation().

Referenced by saveToString().

QString Graph::saveMarkers ( )
slot
QString Graph::savePieCurveLayout ( )
slot
QString Graph::saveScale ( )
slot

References d_user_step, and ScaleEngine::type().

Referenced by saveToString().

QString Graph::saveScaleTitles ( )
slot

References axisTitleString().

Referenced by saveToString().

QString Graph::saveTickLabelsSpace ( )
slot

References ScaleDraw::showTicksPolicy().

Referenced by saveToString().

QString Graph::saveTicksType ( )
slot

References getMajorTicksType(), and getMinorTicksType().

Referenced by saveToString().

QString Graph::saveTitle ( )
slot

Referenced by saveToString().

QString Graph::saveToString ( bool  saveAsTemplate = false)
slot
void Graph::scaleFonts ( double  factor)
slot
void Graph::select ( QWidget *  l,
bool  add = false 
)
void Graph::selectCanvas ( )

References selectedCanvas().

Referenced by CanvasPicker::eventFilter().

ArrowMarker* Graph::selectedArrow ( )
inlineslot
void Graph::selectedCanvas ( Graph )
signal

Referenced by selectCanvas().

QwtPlotItem * Graph::selectedCurveLabels ( )
void Graph::selectedGraph ( Graph )
signal

Referenced by activateGraph(), and selectTitle().

QwtScaleWidget * Graph::selectedScale ( )
slot
double Graph::selectedXEndValue ( )
slot
double Graph::selectedXStartValue ( )
slot
void Graph::selectionChanged ( SelectionMoveResizer )
signal

Referenced by select(), and selectorDeleted().

QPointer<SelectionMoveResizer> Graph::selectionMoveResizer ( )
inline
void Graph::selectorDeleted ( )
privateslot

References d_markers_selector, and selectionChanged().

Referenced by select().

void Graph::selectTitle ( bool  select = true)
slot
void Graph::setActiveText ( LegendWidget l)
inline

References d_active_enrichment.

Referenced by TextEditor::closeEvent().

void Graph::setActiveTool ( PlotToolInterface tool)
void Graph::setAntialiasing ( bool  on = true,
bool  update = true 
)
slot
void Graph::setAutoScale ( )
slot
void Graph::setAutoscaleFonts ( bool  on = true)
inlineslot
void Graph::setAxesLinewidth ( int  width)
void Graph::setAxisColor ( int  axis,
const QColor &  color 
)
slot
void Graph::setAxisFont ( int  axis,
const QFont &  fnt 
)
slot
void Graph::setAxisFormula ( int  axis,
const QString &  formula 
)
slot
void Graph::setAxisLabelRotation ( int  axis,
int  rotation 
)
slot
void Graph::setAxisLabelsColor ( int  axis,
const QColor &  color 
)
slot
void Graph::setAxisMargin ( int  axis,
int  margin 
)
slot
void Graph::setAxisStep ( int  axis,
double  step 
)
inlineslot

References d_user_step.

void Graph::setAxisTicksLength ( int  axis,
int  majTicksType,
int  minTicksType,
int  minLength,
int  majLength 
)
slot
void Graph::setAxisTitle ( int  axis,
const QString &  text 
)
slot
void Graph::setAxisTitleAlignment ( int  axis,
int  align 
)
slot
void Graph::setAxisTitleColor ( int  axis,
const QColor &  c 
)
slot
void Graph::setAxisTitleDistance ( int  axis,
int  dist 
)
slot
void Graph::setAxisTitleFont ( int  axis,
const QFont &  fnt 
)
slot
void Graph::setAxisTitlePolicy ( const AxisTitlePolicy policy)
inline
void Graph::setAxisTitleString ( int  axis,
const QString &  text 
)
slot
void Graph::setBackgroundColor ( const QColor &  color)
slot
void Graph::setBarsGap ( int  curve,
int  gapPercent,
int  offset 
)
slot

Used for VerticalBars, HorizontalBars and Histograms.

References curve(), QwtBarCurve::gap(), QwtBarCurve::offset(), QwtBarCurve::setGap(), and QwtBarCurve::setOffset().

Referenced by PlotDialog::acceptParams(), and ApplicationWindow::openGraph().

void Graph::setCanvasBackgroundImage ( const QString &  fn = QString(),
bool  update = true 
)
slot
void Graph::setCanvasCoordinates ( const QRectF &  r)
slot
void Graph::setCanvasFrame ( int  width = 1,
const QColor &  color = QColor(Qt::black) 
)
slot
void Graph::setCanvasGeometry ( const QRect &  cr)

Adjust plot content to its canvas size.

Parameters:
crThe new geometry of the canvas.

References autoScaleFonts, scaleFonts(), and updateMarkersBoundingRect().

Referenced by PlotDialog::acceptParams(), MultiLayer::arrangeLayers(), ApplicationWindow::pasteSelection(), MultiLayer::plotProfiles(), and MultiLayer::resizeLayers().

void Graph::setCanvasGeometry ( int  x,
int  y,
int  w,
int  h 
)
inline

Convenience function for scripts.

References setCanvasGeometry().

Referenced by setCanvasGeometry().

void Graph::setCanvasSize ( const QSize &  size)

Adjust plot content to its canvas size.

Parameters:
crThe new size of the canvas.

References autoScaleFonts, scaleFonts(), and updateMarkersBoundingRect().

Referenced by PlotDialog::applyCanvasSize(), MultiLayer::arrangeLayers(), and PlotDialog::resizeLayerToFitImage().

void Graph::setCanvasSize ( int  w,
int  h 
)
inline

Convenience function for scripts.

References setCanvasSize().

Referenced by setCanvasSize().

void Graph::setCurrentColor ( const QColor &  c)
slot
void Graph::setCurrentFont ( const QFont &  f)
slot
void Graph::setCurveFullRange ( int  curveIndex)
slot
void Graph::setCurveLineColor ( int  curveIndex,
int  colorIndex 
)
slot
void Graph::setCurveLineColor ( int  curveIndex,
QColor  qColor 
)
slot

References curve(), and modifiedGraph().

void Graph::setCurveLineStyle ( int  curveIndex,
Qt::PenStyle  style 
)
slot

References curve(), and modifiedGraph().

void Graph::setCurveLineWidth ( int  curveIndex,
double  width 
)
slot

References curve(), and modifiedGraph().

void Graph::setCurvesList ( QList< QwtPlotItem * >  lst)
inline

References d_curves.

Referenced by reverseCurveOrder().

void Graph::setCurveStyle ( int  index,
int  s 
)
slot
void Graph::setFrame ( int  width = 1,
const QColor &  color = Qt::black 
)
slot
void Graph::setGrayScale ( )
slot
void Graph::setGridOnTop ( bool  on = true,
bool  update = true 
)
slot
void Graph::setIndexedColors ( )
slot
void Graph::setLabelsDateTimeFormat ( int  axis,
int  type,
const QString &  formatInfo 
)
slot
void Graph::setLabelsDayFormat ( int  axis,
int  format 
)
slot
void Graph::setLabelsMonthFormat ( int  axis,
int  format 
)
slot
void Graph::setLabelsNumericFormat ( const QStringList &  l)
slot

Used for restoring project files.

References ScaleDraw::formula().

Referenced by copyScaleDraw(), ApplicationWindow::openGraph(), and showAxis().

void Graph::setLabelsNumericFormat ( int  axis,
int  format,
int  prec = 6,
const QString &  formula = QString() 
)
slot
void Graph::setLabelsTextFormat ( int  axis,
int  type,
const QString &  name,
const QStringList &  lst 
)
slot
void Graph::setLabelsTextFormat ( int  axis,
int  type,
const QString &  labelsColName,
Table table 
)
slot
void Graph::setLegend ( const QString &  s)
slot
void Graph::setMajorTicksType ( int  axis,
int  type 
)
void Graph::setMajorTicksType ( const QList< int > &  lst)
slot
void Graph::setMajorTicksType ( const QStringList &  lst)
slot

References setMajorTicksType().

void Graph::setMinorTicksType ( int  axis,
int  type 
)
void Graph::setMinorTicksType ( const QList< int > &  lst)
slot
void Graph::setMinorTicksType ( const QStringList &  lst)
slot

References setMinorTicksType().

void Graph::setPageGeometry ( const QRectF &  r)
inline
void Graph::setRightAxisTitle ( const QString &  text)
slot

References modifiedGraph(), and setAxisTitle().

void Graph::setScale ( int  axis,
double  start,
double  end,
double  step = 0.0,
int  majorTicks = 5,
int  minorTicks = 5,
int  type = 0,
bool  inverted = false,
double  left_break = -DBL_MAX,
double  right_break = DBL_MAX,
int  pos = 50,
double  stepBeforeBreak = 0.0,
double  stepAfterBreak = 0.0,
int  minTicksBeforeBreak = 4,
int  minTicksAfterBreak = 4,
bool  log10AfterBreak = false,
int  breakWidth = 4,
bool  breakDecoration = true 
)
slot
void Graph::setScaleTitle ( int  axis,
const QString &  text 
)
slot

TODO: eliminate this function in version 0.9.1 (used only when restoring project files)

References setAxisTitle().

Referenced by ApplicationWindow::openGraph().

void Graph::setSelectedArrow ( ArrowMarker mrk,
bool  add = false 
)
slot

Set the selected arrow.

Parameters:
mrkkey of the arrow to be selected.
addwhether the arrow is to be added to an existing selection. If add is false (the default) or there is no existing selection, a new SelectionMoveResizer is created and stored in d_markers_selector.

References d_lines, d_markers_selector, d_selected_arrow, ScalePicker::deselect(), ArrowMarker::editable(), modifiedGraph(), scalePicker, and selectTitle().

Referenced by CanvasPicker::selectMarker().

void Graph::setSynchronizedScaleDivisions ( bool  on)
inline
void Graph::setTickLength ( int  minLength,
int  majLength 
)

References d_maj_tick_length, and d_min_tick_length.

Referenced by setAxisTicksLength().

void Graph::setTicksLength ( int  minLength,
int  majLength 
)
slot
void Graph::setTitleAlignment ( int  align)
slot

References modifiedGraph().

Referenced by ApplicationWindow::openGraph().

void Graph::setTitleColor ( const QColor &  c)
slot

References modifiedGraph().

Referenced by ApplicationWindow::openGraph().

void Graph::setTitleFont ( const QFont &  fnt)
slot
void Graph::setTopAxisTitle ( const QString &  text)
slot

References modifiedGraph(), and setAxisTitle().

void Graph::setWaterfallFillColor ( const QColor &  c)
slot
void Graph::setWaterfallOffset ( int  x,
int  y,
bool  update = false 
)
slot
void Graph::setWaterfallSideLines ( bool  on = true)
slot
void Graph::setWaterfallXOffset ( int  offset)
slot
void Graph::setWaterfallYOffset ( int  offset)
slot
void Graph::setXAxisTitle ( const QString &  text)
slot
void Graph::setYAxisTitle ( const QString &  text)
slot
void Graph::showAxis ( int  axis,
int  type,
const QString &  formatInfo,
Table table,
bool  axisOn,
int  majTicksType,
int  minTicksType,
bool  labelsOn,
const QColor &  c,
int  format,
int  prec,
int  rotation,
int  baselineDist,
const QString &  formula,
const QColor &  labelsColor,
int  spacing = 4,
bool  backbone = true,
const ScaleDraw::ShowTicksPolicy showTicks = ScaleDraw::ShowAll,
const QString &  prefix = QString::null,
const QString &  suffix = QString::null 
)
slot
void Graph::showAxisContextMenu ( int  axis)
slot
void Graph::showAxisDialog ( )
slot
void Graph::showAxisDialog ( int  )
signal
void Graph::showAxisTitleDialog ( )
signal
void Graph::showAxisTitleMenu ( )
slot
void Graph::showContextMenu ( )
signal

Referenced by contextMenuEvent().

void Graph::showCurve ( int  index,
bool  visible = true 
)
slot

Shows/Hides a curve defined by its index.

References modifiedGraph(), and plotItem().

Referenced by ApplicationWindow::hideCurve(), ApplicationWindow::hideOtherCurves(), and ApplicationWindow::showAllCurves().

void Graph::showCurveContextMenu ( QwtPlotItem *  )
signal

Referenced by contextMenuEvent().

void Graph::showEvent ( QShowEvent *  event)
private

References updateCurveLabels().

void Graph::showFitResults ( const QString &  )
signal
void Graph::showGrid ( )
slot

Convenience function enabling the grid for QwtScaleDraw::Left and Bottom Scales.

Referenced by showGrids(), and ApplicationWindow::zoomRectanglePlot().

void Graph::showGrid ( int  axis)
slot

Convenience function enabling the grid for a user defined axis.

References d_grid, and modifiedGraph().

void Graph::showGrids ( )
slot
void Graph::showMarkerPopupMenu ( )
signal

Referenced by contextMenuEvent(), and Graph().

void Graph::showMissingDataGap ( bool  on = true,
bool  update = true 
)
slot
void Graph::showPlotDialog ( int  )
signal

Referenced by Graph().

void Graph::showPlotErrorMessage ( QWidget *  parent,
const QStringList &  emptyColumns 
)
staticslot

Referenced by CurvesDialog::addCurves().

void Graph::showScaleDialog ( )
slot
void Graph::showTitleContextMenu ( )
slot
Spectrogram * Graph::spectrogram ( Matrix m)
slot

Returns a pointer to the spectrogram which data source is matrix m (the pointer can be NULL)

References d_curves, and Spectrogram::matrix().

Referenced by plotSpectrogram().

int Graph::speedModeMaxPoints ( )
inline
QList< FrameWidget * > Graph::stackingOrderEnrichmentsList ( ) const
private
QList< LegendWidget * > Graph::textsList ( )

References d_enrichments.

Referenced by MultiLayer::setFonts().

bool Graph::titleSelected ( )
slot
void Graph::updateAxesTitles ( )
slot
void Graph::updateAxisTitle ( int  axis)
slot
void Graph::updateCurveLabels ( )

References curvesList(), and Function.

Referenced by resizeEvent(), and showEvent().

void Graph::updateCurveLayout ( PlotCurve c,
const CurveLayout cL 
)
slot
void Graph::updateCurveNames ( const QString &  oldName,
const QString &  newName,
bool  updateTableName = true 
)
slot
void Graph::updateCurvesData ( Table w,
const QString &  yColName 
)
slot
void Graph::updateDataCurves ( )
slot
void Graph::updatedLayout ( Graph )
signal

Referenced by updateLayout().

void Graph::updateErrorBars ( ErrorBarsCurve er,
bool  xErr,
double  width,
int  cap,
const QColor &  c,
bool  plus,
bool  minus,
bool  through 
)
slot
void Graph::updateLayout ( )

Adjust plot content to its current size. Must be reimplemented because the base implementation adds a mask causing an ugly drawing artefact.

References updatedLayout().

Referenced by AxesDialog::applyAxisFormatToLayer(), copy(), insertText(), ApplicationWindow::openGraph(), resizeEvent(), MultiLayer::resizeLayers(), TexWidget::restore(), MultiLayer::setCommonLayerAxes(), showAxis(), and Spectrogram::showColorScale().

void Graph::updateMarkersBoundingRect ( bool  rescaleEvent = true)
slot
void Graph::updateOppositeScaleDiv ( int  axis)
slot
void Graph::updatePlot ( )
slot
void Graph::updateScale ( )
slot
void Graph::updateSecondaryAxis ( int  axis,
bool  changeFormat = false 
)
slot
void Graph::updateVectorsLayout ( int  curve,
const QColor &  color,
double  width,
int  arrowLength,
int  arrowAngle,
bool  filled,
int  position,
const QString &  xEndColName = QString(),
const QString &  yEndColName = QString() 
)
slot
void Graph::updateWaterfallFill ( bool  on)
slot
bool Graph::validCurvesDataSize ( )
slot
void Graph::viewLineDialog ( )
signal

Referenced by Graph().

void Graph::viewTitleDialog ( )
signal
int Graph::visibleCurves ( )
slot
int Graph::waterfallXOffset ( )
inlineslot
int Graph::waterfallYOffset ( )
inlineslot
void Graph::zoom ( bool  on)
slot

References d_curves, and d_zoomer.

Referenced by disableTools(), Graph(), and ApplicationWindow::zoomIn().

void Graph::zoomed ( const QwtDoubleRect &  )
slot
bool Graph::zoomOn ( )
slot
void Graph::zoomOut ( )
slot

Member Data Documentation

bool Graph::autoScaleFonts
private
CanvasPicker* Graph::cp
private

Referenced by deselectMarker(), Graph(), remove(), and ~Graph().

FrameWidget* Graph::d_active_enrichment
private
PlotToolInterface* Graph::d_active_tool
private

The currently active tool, or NULL for default (pointer).

Referenced by activeTool(), disableTools(), Graph(), hasActiveTool(), setActiveTool(), updatePlot(), and ~Graph().

bool Graph::d_antialiasing
private
bool Graph::d_auto_scale
private

Flag indicating if the axes limits should be changed in order to show all data each time a curva data change occurs.

Referenced by addCurves(), copy(), enableAutoscaling(), Graph(), isAutoscalingEnabled(), saveToString(), updatePlot(), and updateScale().

AxisTitlePolicy Graph::d_axis_title_policy
private
QStringList Graph::d_axis_titles
private
QString Graph::d_canvas_bkg_path
private
QPixmap Graph::d_canvas_bkg_pix
private
QList<QwtPlotItem*> Graph::d_curves
private
bool Graph::d_disable_curve_antialiasing
private
double Graph::d_Douglas_Peuker_tolerance
private
QList<FrameWidget*> Graph::d_enrichments
private
QList<QwtPlotCurve *> Graph::d_fit_curves
private

List storing pointers to the curves resulting after a fit session, in case the user wants to delete them later on.

Referenced by addFitCurve(), copyCurves(), deleteFitCurves(), fitCurvesList(), and removeCurve().

Grid* Graph::d_grid
private

Pointer to the grid.

Referenced by Graph(), grid(), setAxesLinewidth(), setAxisColor(), setGridOnTop(), showAxis(), and showGrid().

bool Graph::d_grid_on_top
private

Flag telling if the grid should be drawn on top of data.

Referenced by copy(), Graph(), hasGridOnTop(), saveToString(), and setGridOnTop().

QPointer<ImageProfilesTool> Graph::d_image_profiles_tool
private
bool Graph::d_is_printing
private

Flag telling if we are performing a print operation.

Referenced by drawItems(), Graph(), isPrinting(), and print().

QList<ArrowMarker*> Graph::d_lines
private
QwtPlotMagnifier* Graph::d_magnifier
private
int Graph::d_maj_tick_length
private
QPointer<SelectionMoveResizer> Graph::d_markers_selector
private

The markers selected for move/resize operations or NULL if none are selected.

Referenced by deselect(), deselectMarker(), hasSeletedItems(), remove(), removeMarker(), select(), selectionMoveResizer(), selectorDeleted(), setSelectedArrow(), and ~Graph().

int Graph::d_max_antialising_size
private
int Graph::d_min_tick_length
private

Axes tick lengths.

Referenced by drawInwardTicks(), Graph(), minorTickLength(), and setTickLength().

bool Graph::d_missing_data_gap
private

Flag telling if the curves line should be connected across missing data.

Referenced by copy(), Graph(), isMissingDataGapEnabled(), saveToString(), and showMissingDataGap().

QRectF Graph::d_page_rect
private
QwtPlotPanner* Graph::d_panner
private
PlotToolInterface * Graph::d_peak_fit_tool
private
QPointer<RangeSelectorTool> Graph::d_range_selector
private
ArrowMarker* Graph::d_selected_arrow
private
int Graph::d_speed_mode_points
private
bool Graph::d_synchronize_scales
private
QVector<double> Graph::d_user_step
private

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.

Referenced by axisStep(), Graph(), recoverObsoleteDateTimeScale(), saveScale(), setAutoScale(), setAxisStep(), setScale(), updateOppositeScaleDiv(), and updatePlot().

int Graph::d_waterfall_offset_x
private
int Graph::d_waterfall_offset_y
private
QwtPlotZoomer* Graph::d_zoomer[2]
private
bool Graph::drawArrowOn
private

Referenced by drawArrow(), drawLine(), and Graph().

bool Graph::drawAxesBackbone
private
bool Graph::drawLineOn
private

Referenced by drawLine(), drawLineActive(), and Graph().

ScalePicker* Graph::scalePicker
private
TitlePicker* Graph::titlePicker
private

The documentation for this class was generated from the following files: