Stacked Graphs
Geometry & Aesthetics
 All Classes Functions Variables Enumerations
graphlayouter.h
1 #ifndef GRAPHLAYOUTER_H
2 #define GRAPHLAYOUTER_H
3 
4 #include <QObject>
5 #include "dataset.h"
6 #include "namedobject.h"
7 
11 class GraphLayouter : public QObject, public INamedObject
12 {
13  Q_OBJECT
14  Q_INTERFACES(INamedObject)
15 public:
19  enum InterpolationMode { Cubic = 0, Linear, SIZE_OF_ENUM };
20 
24  static const char* const interpolationMode_str[InterpolationMode::SIZE_OF_ENUM];
25 
26  GraphLayouter(QObject *parent);
27  ~GraphLayouter();
28 
37  void Layout(DataSet& dataset, const InterpolationMode interpMode, const double scaleX, const double scaleY);
38 private:
39  void pathTo(QPainterPath& path, InterpolationMode interpMode, double& originX, double& originY, double pX, double pY, double xScale, double yScale);
40  void moveTo(QPainterPath& path, double& originX, double& originY, double pX, double pY, double xScale, double yScale);
41 
42  virtual void calculateBaseLine(DataSet& dataset, QVector<double>& baseline) = 0;
43 };
44 
45 #endif // GRAPHLAYOUTER_H
void Layout(DataSet &dataset, const InterpolationMode interpMode, const double scaleX, const double scaleY)
Calls calculateBaseLine to get a baseline according to the selected layouting algorithm.
Definition: graphlayouter.cpp:16
The data set.
Definition: dataset.h:85
Derived classes provide layouting functionality.
Definition: graphlayouter.h:11
InterpolationMode
List of interpolation methods.
Definition: graphlayouter.h:19
static const char *const interpolationMode_str[InterpolationMode::SIZE_OF_ENUM]
String value of the interpolation methods used to display in the GUI.
Definition: graphlayouter.h:24
Interface for objects which have a name.
Definition: namedobject.h:9