labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

DatapickerCurve.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : DatapickerCurve.h
3  Project : LabPlot
4  Description : container for Curve-Point and Datasheet/Spreadsheet
5  of datapicker
6  --------------------------------------------------------------------
7  Copyright : (C) 2015 by Ankit Wagadre (wagadre.ankit@gmail.com)
8  Copyright : (C) 2015-2019 Alexander Semke (alexander.semke@web.de)
9  ***************************************************************************/
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  * This program is distributed in the hope that it will be useful, *
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
20  * GNU General Public License for more details. *
21  * *
22  * You should have received a copy of the GNU General Public License *
23  * along with this program; if not, write to the Free Software *
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
25  * Boston, MA 02110-1301 USA *
26  * *
27  ***************************************************************************/
28 
29 #ifndef DATAPICKERCURVE_H
30 #define DATAPICKERCURVE_H
31 
33 #include "backend/lib/macros.h"
36 
37 class DatapickerPoint;
38 class QAction;
40 class Column;
41 class Spreadsheet;
42 class AbstractColumn;
43 
45  Q_OBJECT
46 
47 public:
48  explicit DatapickerCurve(const QString&);
49  ~DatapickerCurve() override;
50 
52  struct Errors {
55  };
56 
57  QIcon icon() const override;
58  void setPrinting(bool);
59  void setSelectedInView(bool);
61  void updatePoints();
62  void updatePoint(const DatapickerPoint*);
63 
64  BASIC_D_ACCESSOR_DECL(Errors, curveErrorTypes, CurveErrorTypes)
65  BASIC_D_ACCESSOR_DECL(Symbol::Style, pointStyle, PointStyle)
66  BASIC_D_ACCESSOR_DECL(qreal, pointOpacity, PointOpacity)
67  BASIC_D_ACCESSOR_DECL(qreal, pointRotationAngle, PointRotationAngle)
68  BASIC_D_ACCESSOR_DECL(qreal, pointSize, PointSize)
69  CLASS_D_ACCESSOR_DECL(QBrush, pointBrush, PointBrush)
70  CLASS_D_ACCESSOR_DECL(QPen, pointPen, PointPen)
71  BASIC_D_ACCESSOR_DECL(qreal, pointErrorBarSize, PointErrorBarSize)
72  CLASS_D_ACCESSOR_DECL(QBrush, pointErrorBarBrush, PointErrorBarBrush)
73  CLASS_D_ACCESSOR_DECL(QPen, pointErrorBarPen, PointErrorBarPen)
74  BASIC_D_ACCESSOR_DECL(bool, pointVisibility, PointVisibility)
75 
76  POINTER_D_ACCESSOR_DECL(AbstractColumn, posXColumn, PosXColumn)
77  QString& posXColumnPath() const;
78  POINTER_D_ACCESSOR_DECL(AbstractColumn, posYColumn, PosYColumn)
79  QString& posYColumnPath() const;
80  POINTER_D_ACCESSOR_DECL(AbstractColumn, posZColumn, PosZColumn)
81  QString& posZColumnPath() const;
82  POINTER_D_ACCESSOR_DECL(AbstractColumn, plusDeltaXColumn, PlusDeltaXColumn)
83  QString& plusDeltaXColumnPath() const;
84  POINTER_D_ACCESSOR_DECL(AbstractColumn, minusDeltaXColumn, MinusDeltaXColumn)
85  QString& minusDeltaXColumnPath() const;
86  POINTER_D_ACCESSOR_DECL(AbstractColumn, plusDeltaYColumn, PlusDeltaYColumn)
87  QString& plusDeltaYColumnPath() const;
88  POINTER_D_ACCESSOR_DECL(AbstractColumn, minusDeltaYColumn, MinusDeltaYColumn)
89  QString& minusDeltaYColumnPath() const;
90 
91  void save(QXmlStreamWriter*) const override;
92  bool load(XmlStreamReader*, bool preview) override;
93 
95 
96 protected:
97  DatapickerCurve(const QString& name, DatapickerCurvePrivate* dd);
99 
100 private:
101  Q_DECLARE_PRIVATE(DatapickerCurve)
102  void init();
103  void initAction();
104  Column* appendColumn(const QString&);
105 
107 
108 signals:
118  void pointSizeChanged(qreal);
120  void pointOpacityChanged(qreal);
121  void pointBrushChanged(QBrush);
122  void pointPenChanged(const QPen&);
125  void pointErrorBarPenChanged(const QPen&);
127 };
128 #endif // DATAPICKERCURVE_H
Base class of all persistent objects in a Project.
QString name() const
Interface definition for data with column logic.
Aspect that manages a column.
Definition: Column.h:42
Top-level container for Curve-Point and Datasheet/Spreadsheet of datapicker.
QString & plusDeltaXColumnPath() const
DatapickerCurvePrivate *const d_ptr
void minusDeltaYColumnChanged(const AbstractColumn *)
void posZColumnChanged(const AbstractColumn *)
~DatapickerCurve() override
QIcon icon() const override
QString & posZColumnPath() const
DatapickerCurvePrivate Private
DatapickerCurve(const QString &)
void posXColumnChanged(const AbstractColumn *)
void setPrinting(bool)
QString & minusDeltaXColumnPath() const
void save(QXmlStreamWriter *) const override
Save as XML.
QString & posYColumnPath() const
void pointSizeChanged(qreal)
QString & minusDeltaYColumnPath() const
void curveErrorTypesChanged(const DatapickerCurve::Errors &)
void setSelectedInView(bool)
void plusDeltaYColumnChanged(const AbstractColumn *)
Spreadsheet * m_datasheet
void pointStyleChanged(Symbol::Style)
void pointVisibilityChanged(bool)
void posYColumnChanged(const AbstractColumn *)
void pointErrorBarBrushChanged(QBrush)
void pointPenChanged(const QPen &)
void updatePoint(const DatapickerPoint *)
Column * appendColumn(const QString &)
QString & plusDeltaYColumnPath() const
void addDatasheet(DatapickerImage::GraphType)
void pointOpacityChanged(qreal)
bool load(XmlStreamReader *, bool preview) override
Load from XML.
QString & posXColumnPath() const
void pointErrorBarPenChanged(const QPen &)
void minusDeltaXColumnChanged(const AbstractColumn *)
void pointBrushChanged(QBrush)
void pointRotationAngleChanged(qreal)
void plusDeltaXColumnChanged(const AbstractColumn *)
void pointErrorBarSizeChanged(qreal)
Aspect providing a spreadsheet table with column logic.
Definition: Spreadsheet.h:40
Style
Definition: Symbol.h:38
XML stream parser that supports errors as well as warnings. This class also adds line and column numb...
#define CLASS_D_ACCESSOR_DECL(type, method, Method)
Definition: macros.h:134
#define POINTER_D_ACCESSOR_DECL(type, method, Method)
Definition: macros.h:161
#define BASIC_D_ACCESSOR_DECL(type, method, Method)
Definition: macros.h:107