[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [labplot] src/backend/worksheet/plots/cartesian: Made many members in AxisPrivate and XYCurvePrivate
From:       Alexander Semke <null () kde ! org>
Date:       2017-06-30 18:49:49
Message-ID: E1dR0zF-0001ZU-64 () code ! kde ! org
[Download RAW message or body]

Git commit 6ab50601aa46301503f4fb848e119f2ca557fc36 by Alexander Semke.
Committed on 30/06/2017 at 18:49.
Pushed by asemke into branch 'master'.

Made many members in AxisPrivate and XYCurvePrivate private and adjusted the \
indentation.

M  +16   -6    src/backend/worksheet/plots/cartesian/Axis.cpp
M  +120  -120  src/backend/worksheet/plots/cartesian/AxisPrivate.h
M  +19   -5    src/backend/worksheet/plots/cartesian/XYCurve.cpp
M  +133  -131  src/backend/worksheet/plots/cartesian/XYCurvePrivate.h

https://commits.kde.org/labplot/6ab50601aa46301503f4fb848e119f2ca557fc36

diff --git a/src/backend/worksheet/plots/cartesian/Axis.cpp \
b/src/backend/worksheet/plots/cartesian/Axis.cpp index 12f4b36d..3fed3ff1 100644
--- a/src/backend/worksheet/plots/cartesian/Axis.cpp
+++ b/src/backend/worksheet/plots/cartesian/Axis.cpp
@@ -111,9 +111,7 @@ class AxisGrid : public QGraphicsItem {
  *  \ingroup worksheet
  */
 Axis::Axis(const QString& name, CartesianPlot* plot, const AxisOrientation& \
                orientation)
-		: WorksheetElement(name), d_ptr(new AxisPrivate(this)) {
-	d_ptr->m_plot = plot;
-	d_ptr->m_cSystem = dynamic_cast<const \
CartesianCoordinateSystem*>(plot->coordinateSystem()); +		: WorksheetElement(name), \
d_ptr(new AxisPrivate(this, plot)) {  d_ptr->orientation = orientation;
 	init();
 }
@@ -454,7 +452,7 @@ bool Axis::isVisible() const {
 
 void Axis::setPrinting(bool on) {
 	Q_D(Axis);
-	d->m_printing = on;
+	d->setPrinting(on);
 }
 
 STD_SETTER_CMD_IMPL_F_S(Axis, SetOrientation, Axis::AxisOrientation, orientation, \
retransform); @@ -871,8 +869,16 @@ void Axis::visibilityChanged() {
 //#####################################################################
 //################### Private implementation ##########################
 //#####################################################################
-AxisPrivate::AxisPrivate(Axis *owner) : m_plot(0), m_cSystem(0), m_printing(false), \
                m_hovered(false), m_suppressRecalc(false),
-	majorTicksColumn(0), minorTicksColumn(0), gridItem(new AxisGrid(this)), q(owner) {
+AxisPrivate::AxisPrivate(Axis* owner, CartesianPlot* plot) :
+	majorTicksColumn(0),
+	minorTicksColumn(0),
+	gridItem(new AxisGrid(this)),
+	q(owner),
+	m_plot(plot),
+	m_cSystem(dynamic_cast<const \
CartesianCoordinateSystem*>(plot->coordinateSystem())), +	m_hovered(false),
+	m_suppressRecalc(false),
+	m_printing(false) {
 
 	setFlag(QGraphicsItem::ItemIsSelectable, true);
 	setFlag(QGraphicsItem::ItemIsFocusable, true);
@@ -1825,6 +1831,10 @@ void AxisPrivate::hoverLeaveEvent(QGraphicsSceneHoverEvent*) {
 	}
 }
 
+void AxisPrivate::setPrinting(bool on) {
+	m_printing = on;
+}
+
 //##############################################################################
 //##################  Serialization/Deserialization  ###########################
 //##############################################################################
diff --git a/src/backend/worksheet/plots/cartesian/AxisPrivate.h \
b/src/backend/worksheet/plots/cartesian/AxisPrivate.h index a9c43778..1ed13f0a 100644
--- a/src/backend/worksheet/plots/cartesian/AxisPrivate.h
+++ b/src/backend/worksheet/plots/cartesian/AxisPrivate.h
@@ -3,7 +3,7 @@
     Project              : LabPlot
     Description          : Private members of Axis.
     --------------------------------------------------------------------
-    Copyright            : (C) 2011-2015 Alexander Semke (alexander.semke@web.de)
+    Copyright            : (C) 2011-2017 Alexander Semke (alexander.semke@web.de)
 
  ***************************************************************************/
 
@@ -38,129 +38,129 @@ class QGraphicsSceneHoverEvent;
 
 class AxisGrid;
 class CartesianPlot;
-class AbstractCoordinateSystem;
 class CartesianCoordinateSystem;
 class TextLabel;
 
-//TODO: align
 class AxisPrivate: public QGraphicsItem {
-	public:
-		explicit AxisPrivate(Axis* owner);
-
-		CartesianPlot* m_plot;
-		const CartesianCoordinateSystem* m_cSystem;
-		bool m_printing;
-		bool m_hovered;
-		bool m_suppressRecalc;
-
-		//general
-		bool autoScale;
-		Axis::AxisOrientation orientation; //!< horizontal or vertical
-		Axis::AxisPosition position; //!< left, right, bottom, top or custom (usually not \
                changed after creation)
-		Axis::AxisScale scale;
-		float offset; //!< offset from zero in the direction perpendicular to the axis
-		float start; //!< start coordinate of the axis line
-		float end; //!< end coordinate of the axis line
-		qreal scalingFactor;
-		qreal zeroOffset;
-
-		//line
-		QList<QLineF> lines;
-		QPen linePen;
-		qreal lineOpacity;
-		Axis::ArrowType arrowType;
-		Axis::ArrowPosition arrowPosition;
-		float arrowSize;
-
-		// Title
-		TextLabel* title;
-		float titleOffsetX; //distance to the axis line
-		float titleOffsetY; //distance to the axis line
-
-		// Ticks
-		Axis::TicksDirection majorTicksDirection; //!< major ticks direction: inwards, \
                outwards, both, or none
-		Axis::TicksType majorTicksType; //!< the way how the number of major ticks is \
                specified  - either as a total number or an increment
-		int majorTicksNumber; //!< number of major ticks
-		qreal majorTicksIncrement; //!< increment (step) for the major ticks
-		const AbstractColumn* majorTicksColumn; //!< column containing values for major \
                ticks' positions
-		QString majorTicksColumnPath;
-		qreal majorTicksLength; //!< major tick length (in page units!)
-		QPen majorTicksPen;
-		qreal majorTicksOpacity;
-
-		Axis::TicksDirection minorTicksDirection; //!< minor ticks direction: inwards, \
                outwards, both, or none
-		Axis::TicksType minorTicksType;  //!< the way how the number of minor ticks is \
                specified  - either as a total number or an increment
-		int minorTicksNumber; //!< number of minor ticks (between each two major ticks)
-		qreal minorTicksIncrement; //!< increment (step) for the minor ticks
-		const AbstractColumn* minorTicksColumn; //!< column containing values for minor \
                ticks' positions
-		QString minorTicksColumnPath;
-		qreal minorTicksLength; //!< minor tick length (in page units!)
-		QPen minorTicksPen;
-		qreal minorTicksOpacity;
-
-		// Tick Label
-		Axis::LabelsFormat labelsFormat;
-		int labelsPrecision;
-		bool labelsAutoPrecision;
-		Axis::LabelsPosition labelsPosition;
-		qreal labelsRotationAngle;
-		QColor labelsColor;
-		QFont labelsFont;
-		float labelsOffset; //!< offset, distance to the end of the tick line (in page \
                units)
-		qreal labelsOpacity;
-		QString labelsPrefix;
-		QString labelsSuffix;
-		QList<QPointF> majorTickPoints;//!< position of the major ticks  on the axis.
-		QList<QPointF> minorTickPoints;//!< position of the major ticks  on the axis.
-		QList<QPointF> tickLabelPoints; //!< position of the major tick labels (left lower \
                edge of label's bounding rect)
-		QList<float> tickLabelValues; //!< major tick labels values
-		QList<QString> tickLabelStrings; //!< the actual text of the major tick labels
-
-		//Grid
-		AxisGrid* gridItem;
-		QPen majorGridPen;
-		qreal majorGridOpacity;
-		QPen minorGridPen;
-		qreal minorGridOpacity;
-
-		QPainterPath linePath;
-		QPainterPath arrowPath;
-		QPainterPath majorTicksPath;
-		QPainterPath minorTicksPath;
-		QPainterPath majorGridPath;
-		QPainterPath minorGridPath;
-		QRectF boundingRectangle;
-		QPainterPath axisShape;
-
-		QString name() const;
-		virtual QRectF boundingRect() const;
-		virtual QPainterPath shape() const;
-		virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget* widget = \
                0);
-
-		virtual void retransform();
-		void retransformLine();
-		void retransformArrow();
-		void addArrow(const QPointF& point, int direction);
-		void retransformTicks();
-		void retransformTickLabelPositions();
-		void retransformTickLabelStrings();
-		void retransformMinorGrid();
-		void retransformMajorGrid();
-		int upperLabelsPrecision(int precision);
-		int lowerLabelsPrecision(int precision);
-		double round(double value, int precision);
-		virtual void recalcShapeAndBoundingRect();
-		bool swapVisible(bool on);
-
-		Axis* const q;
-
-	private:
-        virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent*);
-		virtual void hoverEnterEvent(QGraphicsSceneHoverEvent*);
-		virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent*);
-
-	protected:
-		bool transformAnchor(QPointF*);
+public:
+	explicit AxisPrivate(Axis*, CartesianPlot*);
+
+	virtual QRectF boundingRect() const override;
+	virtual QPainterPath shape() const override;
+
+	QString name() const;
+	void retransform();
+	void retransformLine();
+	void retransformArrow();
+	void retransformTicks();
+	void retransformTickLabelPositions();
+	void retransformTickLabelStrings();
+	void retransformMinorGrid();
+	void retransformMajorGrid();
+	bool swapVisible(bool);
+	void recalcShapeAndBoundingRect();
+	void setPrinting(bool);
+
+	//general
+	bool autoScale;
+	Axis::AxisOrientation orientation; //!< horizontal or vertical
+	Axis::AxisPosition position; //!< left, right, bottom, top or custom (usually not \
changed after creation) +	Axis::AxisScale scale;
+	float offset; //!< offset from zero in the direction perpendicular to the axis
+	float start; //!< start coordinate of the axis line
+	float end; //!< end coordinate of the axis line
+	qreal scalingFactor;
+	qreal zeroOffset;
+
+	//line
+	QList<QLineF> lines;
+	QPen linePen;
+	qreal lineOpacity;
+	Axis::ArrowType arrowType;
+	Axis::ArrowPosition arrowPosition;
+	float arrowSize;
+
+	// Title
+	TextLabel* title;
+	float titleOffsetX; //distance to the axis line
+	float titleOffsetY; //distance to the axis line
+
+	// Ticks
+	Axis::TicksDirection majorTicksDirection; //!< major ticks direction: inwards, \
outwards, both, or none +	Axis::TicksType majorTicksType; //!< the way how the number \
of major ticks is specified  - either as a total number or an increment +	int \
majorTicksNumber; //!< number of major ticks +	qreal majorTicksIncrement; //!< \
increment (step) for the major ticks +	const AbstractColumn* majorTicksColumn; //!< \
column containing values for major ticks' positions +	QString majorTicksColumnPath;
+	qreal majorTicksLength; //!< major tick length (in page units!)
+	QPen majorTicksPen;
+	qreal majorTicksOpacity;
+
+	Axis::TicksDirection minorTicksDirection; //!< minor ticks direction: inwards, \
outwards, both, or none +	Axis::TicksType minorTicksType;  //!< the way how the \
number of minor ticks is specified  - either as a total number or an increment +	int \
minorTicksNumber; //!< number of minor ticks (between each two major ticks) +	qreal \
minorTicksIncrement; //!< increment (step) for the minor ticks +	const \
AbstractColumn* minorTicksColumn; //!< column containing values for minor ticks' \
positions +	QString minorTicksColumnPath;
+	qreal minorTicksLength; //!< minor tick length (in page units!)
+	QPen minorTicksPen;
+	qreal minorTicksOpacity;
+
+	// Tick Label
+	Axis::LabelsFormat labelsFormat;
+	int labelsPrecision;
+	bool labelsAutoPrecision;
+	Axis::LabelsPosition labelsPosition;
+	qreal labelsRotationAngle;
+	QColor labelsColor;
+	QFont labelsFont;
+	float labelsOffset; //!< offset, distance to the end of the tick line (in page \
units) +	qreal labelsOpacity;
+	QString labelsPrefix;
+	QString labelsSuffix;
+
+	//Grid
+	AxisGrid* gridItem;
+	QPen majorGridPen;
+	qreal majorGridOpacity;
+	QPen minorGridPen;
+	qreal minorGridOpacity;
+
+	Axis* const q;
+
+	QPainterPath linePath;
+	QPainterPath majorGridPath;
+	QPainterPath minorGridPath;
+
+private:
+	virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent*);
+	virtual void hoverEnterEvent(QGraphicsSceneHoverEvent*);
+	virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent*);
+	virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget* widget = 0) \
override; +
+	void addArrow(const QPointF& point, int direction);
+	int upperLabelsPrecision(int);
+	int lowerLabelsPrecision(int);
+	double round(double value, int precision);
+	bool transformAnchor(QPointF*);
+
+	QPainterPath arrowPath;
+	QPainterPath majorTicksPath;
+	QPainterPath minorTicksPath;
+	QRectF boundingRectangle;
+	QPainterPath axisShape;
+
+	QList<QPointF> majorTickPoints;//!< position of the major ticks  on the axis.
+	QList<QPointF> minorTickPoints;//!< position of the major ticks  on the axis.
+	QList<QPointF> tickLabelPoints; //!< position of the major tick labels (left lower \
edge of label's bounding rect) +	QList<float> tickLabelValues; //!< major tick labels \
values +	QList<QString> tickLabelStrings; //!< the actual text of the major tick \
labels +
+	CartesianPlot* m_plot;
+	const CartesianCoordinateSystem* m_cSystem;
+	bool m_hovered;
+	bool m_suppressRecalc;
+	bool m_printing;
 };
 
 #endif
diff --git a/src/backend/worksheet/plots/cartesian/XYCurve.cpp \
b/src/backend/worksheet/plots/cartesian/XYCurve.cpp index a6e15409..2c1090ff 100644
--- a/src/backend/worksheet/plots/cartesian/XYCurve.cpp
+++ b/src/backend/worksheet/plots/cartesian/XYCurve.cpp
@@ -208,7 +208,7 @@ bool XYCurve::isVisible() const {
 
 void XYCurve::setPrinting(bool on) {
 	Q_D(XYCurve);
-	d->m_printing = on;
+	d->setPrinting(on);
 }
 
 //##############################################################################
@@ -723,7 +723,7 @@ void XYCurve::setErrorBarsOpacity(qreal opacity) {
 
 void XYCurve::suppressRetransform(bool b) {
 	Q_D(XYCurve);
-	d->m_suppressRetransform = b;
+	d->suppressRetransform(b);
 }
 
 //##############################################################################
@@ -847,9 +847,16 @@ void XYCurve::navigateTo() {
 //##############################################################################
 //######################### Private implementation #############################
 //##############################################################################
-XYCurvePrivate::XYCurvePrivate(XYCurve *owner) : m_printing(false), \
                m_hovered(false), m_suppressRecalc(false),
-	m_suppressRetransform(false), m_hoverEffectImageIsDirty(false), \
                m_selectionEffectImageIsDirty(false),
-	sourceDataChangedSinceLastRecalc(false), q(owner) {
+XYCurvePrivate::XYCurvePrivate(XYCurve *owner) :
+	sourceDataChangedSinceLastRecalc(false),
+	q(owner),
+	m_hoverEffectImageIsDirty(false),
+	m_selectionEffectImageIsDirty(false),
+	m_hovered(false),
+	m_suppressRecalc(false),
+	m_suppressRetransform(false),
+	m_printing(false) {
+
 	setFlag(QGraphicsItem::ItemIsSelectable, true);
 	setAcceptHoverEvents(true);
 }
@@ -2176,6 +2183,13 @@ void \
XYCurvePrivate::hoverLeaveEvent(QGraphicsSceneHoverEvent*) {  }
 }
 
+void XYCurvePrivate::setPrinting(bool on) {
+	m_printing = on;
+}
+void XYCurvePrivate::suppressRetransform(bool on) {
+	m_suppressRetransform = on;
+}
+
 //##############################################################################
 //##################  Serialization/Deserialization  ###########################
 //##############################################################################
diff --git a/src/backend/worksheet/plots/cartesian/XYCurvePrivate.h \
b/src/backend/worksheet/plots/cartesian/XYCurvePrivate.h index 00b5f532..e2e5e48a \
                100644
--- a/src/backend/worksheet/plots/cartesian/XYCurvePrivate.h
+++ b/src/backend/worksheet/plots/cartesian/XYCurvePrivate.h
@@ -3,7 +3,7 @@
     Project              : LabPlot
     Description          : Private members of XYCurve
     --------------------------------------------------------------------
-    Copyright            : (C) 2010-2015 Alexander Semke (alexander.semke@web.de)
+    Copyright            : (C) 2010-2017 Alexander Semke (alexander.semke@web.de)
 	Copyright            : (C) 2013 by Stefan Gerlach (stefan.gerlach@uni-konstanz.de)
  ***************************************************************************/
 
@@ -34,136 +34,138 @@
 
 class CartesianPlot;
 
-class XYCurvePrivate: public QGraphicsItem {
-	public:
-		explicit XYCurvePrivate(XYCurve *owner);
-
-		QString name() const;
-		virtual QRectF boundingRect() const;
-		QPainterPath shape() const;
-
-		bool m_printing;
-		bool m_hovered;
-		bool m_suppressRecalc;
-		bool m_suppressRetransform;
-		QPixmap m_pixmap;
-		QImage m_hoverEffectImage;
-		QImage m_selectionEffectImage;
-		bool m_hoverEffectImageIsDirty;
-		bool m_selectionEffectImageIsDirty;
-
-		void retransform();
-		void updateLines();
-		void updateDropLines();
-		void updateSymbols();
-		void updateValues();
-		void updateFilling();
-		void updateErrorBars();
-		bool swapVisible(bool on);
-		void recalcShapeAndBoundingRect();
-		void drawSymbols(QPainter*);
-		void drawValues(QPainter*);
-		void drawFilling(QPainter*);
-		void draw(QPainter*);
-		void updatePixmap();
-
-		virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget* widget = \
                0);
-
-		//data source
-		XYCurve::DataSourceType dataSourceType;
-		const XYCurve* dataSourceCurve;
-		const AbstractColumn* xColumn;
-		const AbstractColumn* yColumn;
-		QString dataSourceCurvePath;
-		QString xColumnPath;
-		QString yColumnPath;
-		bool sourceDataChangedSinceLastRecalc;
-
-		//line
-		XYCurve::LineType lineType;
-		bool lineSkipGaps;
-		int lineInterpolationPointsCount;
-		QPen linePen;
-		qreal lineOpacity;
-
-		//drop lines
-		XYCurve::DropLineType dropLineType;
-		QPen dropLinePen;
-		qreal dropLineOpacity;
-
-		//symbols
-		Symbol::Style symbolsStyle;
-		QBrush symbolsBrush;
-		QPen symbolsPen;
-		qreal symbolsOpacity;
-		qreal symbolsRotationAngle;
-		qreal symbolsSize;
-
-		//values
-		XYCurve::ValuesType valuesType;
-		const AbstractColumn* valuesColumn;
-		QString valuesColumnPath;
-		XYCurve::ValuesPosition valuesPosition;
-		qreal valuesDistance;
-		qreal valuesRotationAngle;
-		qreal valuesOpacity;
-		QString valuesPrefix;
-		QString valuesSuffix;
-		QFont valuesFont;
-		QColor valuesColor;
-
-		//filling
-		XYCurve::FillingPosition fillingPosition;
-		PlotArea::BackgroundType fillingType;
-		PlotArea::BackgroundColorStyle fillingColorStyle;
-		PlotArea::BackgroundImageStyle fillingImageStyle;
-		Qt::BrushStyle fillingBrushStyle;
-		QColor fillingFirstColor;
-		QColor fillingSecondColor;
-		QString fillingFileName;
-		qreal fillingOpacity;
-
-		//error bars
-		XYCurve::ErrorType xErrorType;
-		const AbstractColumn* xErrorPlusColumn;
-		QString xErrorPlusColumnPath;
-		const AbstractColumn* xErrorMinusColumn;
-		QString xErrorMinusColumnPath;
-
-		XYCurve::ErrorType yErrorType;
-		const AbstractColumn* yErrorPlusColumn;
-		QString yErrorPlusColumnPath;
-		const AbstractColumn* yErrorMinusColumn;
-		QString yErrorMinusColumnPath;
-
-		XYCurve::ErrorBarsType errorBarsType;
-		double errorBarsCapSize;
-		QPen errorBarsPen;
-		qreal errorBarsOpacity;
-
-		QPainterPath linePath;
-		QPainterPath dropLinePath;
-		QPainterPath valuesPath;
-		QPainterPath errorBarsPath;
-		QPainterPath symbolsPath;
-		QRectF boundingRectangle;
-		QPainterPath curveShape;
-		QList<QLineF> lines;
-		QList<QPointF> symbolPointsLogical;	//points in logical coordinates
-		QList<QPointF> symbolPointsScene;	//points in scene coordinates
-		std::vector<bool> visiblePoints;	//vector of the size of symbolPointsLogical with \
                true of false for the points currently visible or not in the plot
-		QList<QPointF> valuesPoints;
-		std::vector<bool> connectedPointsLogical;  //vector of the size of \
                symbolPointsLogical with true for points connected with the \
                consecutive point and
-											       //false otherwise (don't connect because of a gap (NAN) \
                in-between)
-		QList<QString> valuesStrings;
-		QList<QPolygonF> fillPolygons;
-
-		XYCurve* const q;
-
-	private:
-        void contextMenuEvent(QGraphicsSceneContextMenuEvent*);
-		virtual void hoverEnterEvent(QGraphicsSceneHoverEvent*);
-		virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent*);
+class XYCurvePrivate : public QGraphicsItem {
+public:
+	explicit XYCurvePrivate(XYCurve*);
+
+	virtual QRectF boundingRect() const override;
+	QPainterPath shape() const override;
+
+	QString name() const;
+	void retransform();
+	void updateLines();
+	void updateDropLines();
+	void updateSymbols();
+	void updateValues();
+	void updateFilling();
+	void updateErrorBars();
+	bool swapVisible(bool);
+	void recalcShapeAndBoundingRect();
+	void updatePixmap();
+	void setPrinting(bool);
+	void suppressRetransform(bool);
+
+	//data source
+	XYCurve::DataSourceType dataSourceType;
+	const XYCurve* dataSourceCurve;
+	const AbstractColumn* xColumn;
+	const AbstractColumn* yColumn;
+	QString dataSourceCurvePath;
+	QString xColumnPath;
+	QString yColumnPath;
+	bool sourceDataChangedSinceLastRecalc;
+
+	//line
+	XYCurve::LineType lineType;
+	bool lineSkipGaps;
+	int lineInterpolationPointsCount;
+	QPen linePen;
+	qreal lineOpacity;
+
+	//drop lines
+	XYCurve::DropLineType dropLineType;
+	QPen dropLinePen;
+	qreal dropLineOpacity;
+
+	//symbols
+	Symbol::Style symbolsStyle;
+	QBrush symbolsBrush;
+	QPen symbolsPen;
+	qreal symbolsOpacity;
+	qreal symbolsRotationAngle;
+	qreal symbolsSize;
+
+	//values
+	XYCurve::ValuesType valuesType;
+	const AbstractColumn* valuesColumn;
+	QString valuesColumnPath;
+	XYCurve::ValuesPosition valuesPosition;
+	qreal valuesDistance;
+	qreal valuesRotationAngle;
+	qreal valuesOpacity;
+	QString valuesPrefix;
+	QString valuesSuffix;
+	QFont valuesFont;
+	QColor valuesColor;
+
+	//filling
+	XYCurve::FillingPosition fillingPosition;
+	PlotArea::BackgroundType fillingType;
+	PlotArea::BackgroundColorStyle fillingColorStyle;
+	PlotArea::BackgroundImageStyle fillingImageStyle;
+	Qt::BrushStyle fillingBrushStyle;
+	QColor fillingFirstColor;
+	QColor fillingSecondColor;
+	QString fillingFileName;
+	qreal fillingOpacity;
+
+	//error bars
+	XYCurve::ErrorType xErrorType;
+	const AbstractColumn* xErrorPlusColumn;
+	QString xErrorPlusColumnPath;
+	const AbstractColumn* xErrorMinusColumn;
+	QString xErrorMinusColumnPath;
+
+	XYCurve::ErrorType yErrorType;
+	const AbstractColumn* yErrorPlusColumn;
+	QString yErrorPlusColumnPath;
+	const AbstractColumn* yErrorMinusColumn;
+	QString yErrorMinusColumnPath;
+
+	XYCurve::ErrorBarsType errorBarsType;
+	double errorBarsCapSize;
+	QPen errorBarsPen;
+	qreal errorBarsOpacity;
+
+	XYCurve* const q;
+
+private:
+	void contextMenuEvent(QGraphicsSceneContextMenuEvent*);
+	virtual void hoverEnterEvent(QGraphicsSceneHoverEvent*) override;
+	virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent*) override;
+	virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget* widget = 0) \
override; +
+	void drawSymbols(QPainter*);
+	void drawValues(QPainter*);
+	void drawFilling(QPainter*);
+	void draw(QPainter*);
+
+	QPainterPath linePath;
+	QPainterPath dropLinePath;
+	QPainterPath valuesPath;
+	QPainterPath errorBarsPath;
+	QPainterPath symbolsPath;
+	QRectF boundingRectangle;
+	QPainterPath curveShape;
+	QList<QLineF> lines;
+	QList<QPointF> symbolPointsLogical;	//points in logical coordinates
+	QList<QPointF> symbolPointsScene;	//points in scene coordinates
+	std::vector<bool> visiblePoints;	//vector of the size of symbolPointsLogical with \
true of false for the points currently visible or not in the plot +	QList<QPointF> \
valuesPoints; +	std::vector<bool> connectedPointsLogical;  //vector of the size of \
symbolPointsLogical with true for points connected with the consecutive point and \
+												//false otherwise (don't connect because of a gap (NAN) in-between) \
+	QList<QString> valuesStrings; +	QList<QPolygonF> fillPolygons;
+
+	QPixmap m_pixmap;
+	QImage m_hoverEffectImage;
+	QImage m_selectionEffectImage;
+	bool m_hoverEffectImageIsDirty;
+	bool m_selectionEffectImageIsDirty;
+	bool m_hovered;
+	bool m_suppressRecalc;
+	bool m_suppressRetransform;
+	bool m_printing;
 };
 
 #endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic