CartesianPlot
This class implements the cartesian plot and the actual plot area that is visualized on the Worksheet.
Public Types
enum BorderTypeFlagsenum MouseModeenum NavigationOperationenum PlotColorModeenum RangeBreakStyleenum RangeTypeenum Type
Public Methods
|
CartesianPlot(const QString &name, bool loading=false) |
|
addCoordinateSystem() |
|
addCoordinateSystem(CartesianCoordinateSystem *cSystem) |
|
addLegend(CartesianPlotLegend *) |
|
addNewMenu() |
|
addXRange() |
|
addXRange(const Range< double > &) |
|
addYRange() |
|
addYRange(const Range< double > &) |
|
analysisMenu() |
|
autoScale(const Dimension, int index=-1) const |
|
background() const |
|
borderLine() const |
|
cSystemIndex(WorksheetElement *e) |
|
coordinateSystem(int) const |
|
coordinateSystemCount() const |
|
createContextMenu() override |
|
cursorLine() const |
|
cursorPos(int cursorNumber) const |
|
curveChildIndex(const WorksheetElement *) const |
|
curveCount() const |
|
dataRange(const Dimension, int index=-1) |
|
dataRect() const |
|
defaultCoordinateSystem() const |
|
dependsOn() const override |
|
enableAutoScale(const Dimension, int index, bool enable, bool fullRange=false) |
|
fillAddNewPlotMenu(QMenu *, QActionGroup *) |
|
fillAnalysisMenu(QMenu *, QActionGroup *) |
|
fillDistributionFitMenu(QMenu *, QActionGroup *) |
|
fillFitMenu(QMenu *, QActionGroup *) |
|
getCurve(int index) const |
|
horizontalAxis() const |
|
icon() const override |
|
isPanningActive() const |
|
isPrinted() const |
|
isSelected() const |
|
load(XmlStreamReader *, bool preview) override |
|
loadThemeConfig(const KConfig &) override |
|
mouseHoverOutsideDataRect() |
|
mouseHoverZoomSelectionMode(QPointF logicPos, int cSystemIndex) |
|
mouseMode() const |
|
mouseMoveCursorMode(int cursorNumber, QPointF logicPos) |
|
mouseMoveSelectionMode(QPointF logicStart, QPointF logicEnd) |
|
mouseMoveZoomSelectionMode(QPointF logicPos, int cSystemIndex) |
|
mousePressCursorMode(int cursorNumber, QPointF logicPos) |
|
mousePressZoomSelectionMode(QPointF logicPos, int cSystemIndex) |
|
mouseReleaseZoomSelectionMode(int cSystemIndex) |
|
navigate(int cSystemIndex, NavigationOperation) |
|
pasteTypes() const override |
|
plotColor(int index) const |
|
plotColors() const |
|
processDropEvent(const QVector< quintptr > &) override |
|
range(const Dimension, int index=-1) const |
|
rangeCount(const Dimension) const |
|
rangeDateTimeFormat(const Dimension) const |
|
rangeDateTimeFormat(const Dimension, const int index) const |
|
rangeDirty(const Dimension, int index) const |
|
rangeFormat(const Dimension, const int) const |
|
rangeScale(const Dimension, const int index) const |
|
removeCoordinateSystem(int index) |
|
removeRange(const Dimension, int index) |
|
resizeInsetPlot(CartesianPlot *) |
|
retransformScale(Dimension, int index) |
|
retransformScales() |
|
save(QXmlStreamWriter *) const override |
|
saveTheme(KConfig &config) |
|
setCoordinateSystemRangeIndex(int cSystemIndex, Dimension, int rangeIndex) |
|
setMax(const Dimension, int index, double) |
|
setMin(const Dimension, int index, double) |
|
setMouseMode(MouseMode) |
|
setPrevRect(const QRectF &) override |
|
setRange(const Dimension, const int index, const Range< double > &range) |
|
setRangeDefault(const Dimension, const Range< double >) |
|
setRangeDirty(const Dimension, int index, bool dirty) |
|
setRangeFormat(const Dimension, const RangeT::Format) |
|
setRangeFormat(const Dimension, const int, const RangeT::Format) |
|
setRangeScale(const Dimension, const int index, const RangeT::Scale scale) |
|
setRect(const QRectF &) override |
|
setType(Type type) |
|
setXRange(int index, const Range< double > &) |
|
setYRange(int index, const Range< double > &) |
|
theme() const |
|
type() const |
|
verticalAxis() const |
|
wheelEvent(const QPointF &sceneRelPos, int delta, int xIndex, int yIndex, bool considerDimension, Dimension dim) |
|
xRangeFormatDefault() const |
|
yRangeFormatDefault() const |
Detailed Description
-
class CartesianPlot : public AbstractPlot
This class implements the cartesian plot and the actual plot area that is visualized on the
Worksheet.The definition of the cartesian coordinate systems as well as of the to be plotted data ranges is done in this class.
Public Functions
-
void setType(Type type)
initializes all children of
CartesianPlotand setups a default plot of typetypewith a plot title.
-
virtual QIcon icon() const override
Returns an icon to be used in the project explorer.
-
virtual QMenu *createContextMenu() override
Return a new context menu.
The caller takes ownership of the menu.
-
virtual QVector<AbstractAspect*> dependsOn() const override
returns the list of all parent aspects (folders and sub-folders)
-
virtual QVector<AspectType> pasteTypes() const override
return the list of all aspect types that can be copy&pasted into the current aspect. returns an empty list on default, needs to be re-implemented in all derived classes that want to allow other aspects to be pasted into.
-
QRectF dataRect() const
returns the actual bounding rectangular of the plot area showing data (plot’s rectangular minus padding) in plot’s coordinates
-
Axis *horizontalAxis() const
returns the first horizontal axis on the plot area, usually used to set the axis title for the plot area and in case multiple axes of the same orientation are present.
-
Axis *verticalAxis() const
returns the first horizontal axis on the plot area, usually used to set the axis title for the plot area and in case multiple axes of the same orientation are present.
-
void addLegend(CartesianPlotLegend*)
public helper function to set a legend object created outside of CartesianPlot, e.g. in
OriginProjectParser.
-
int curveChildIndex(const WorksheetElement*) const
returns the index of the child
curvein the list of all “curve-like” children (xy-curve, histogram, boxplot, etc.). This function is used when applying the theme color to the newly added “curve”.:
-
virtual void save(QXmlStreamWriter*) const override
Save as XML.
-
virtual bool load(XmlStreamReader*, bool preview) override
Load from XML.
-
void resizeInsetPlot(CartesianPlot*)
sets the size of the inset plot to 30% of the parent plot’s size and allows to resize it with the mouse (not controlled by worksheet’s layout)
Public Slots
-
void shift(int index, const Dimension, bool leftOrDown)
helper function called in other shift*() functions and doing the actual change of the data ranges.
- Parameters:
x – if set to \true the x-range is modified, the y-range for
falseleftOrDown – the “shift left” for x or “shift down” for y is performed if set to
\true, “shift right” or “shift up” forfalse
-
void dataChanged(int xIndex = -1, int yIndex = -1, WorksheetElement *sender = nullptr)
called when in one of the curves the data was changed. Autoscales the coordinate system and the x-axes, when “auto-scale” is active.
-
struct RangeBreak
-
struct RangeBreaks
-
void setType(Type type)