4 #include "graphlayouter.h"
5 #include "graphsorter.h"
6 #include "graphcolorizer.h"
7 #include <QGraphicsScene>
33 QVector<GraphLayouter*>
GetLayouts()
const {
return mLayouters; }
37 QVector<GraphSorter*>
GetSorters()
const {
return mSorters; }
80 void SetColors(QColor
const beginColor, QColor
const endColor);
94 QImage
GetBitmap(
int width,
int height,
bool keepAspect);
96 void redrawRequired();
98 void mousePressEvent(QGraphicsSceneMouseEvent* ev)
override;
100 void calculateScale(
DataSet& set,
double& scaleX,
double&scaleY);
101 QString getPopupString(
const DataItem& item);
103 void placeLabel(
const QString& label,
const QPainterPath& path,
const QPointF& optimalPoint,
const QBrush& brush);
109 QVector<GraphLayouter*> mLayouters;
110 QVector<GraphSorter*> mSorters;
119 QList<QGraphicsItem*> mOldSelection;
121 void onSelectionChanged();
124 #endif // GRAPHSCENE_H
A QGraphicsScene subclass which is responsible for the creation, drawing and rendering of a stacked g...
Definition: graphscene.h:14
void SetColors(QColor const beginColor, QColor const endColor)
Sets the colors which define the start and end color of the linearly interpolated color gradient used...
Definition: graphscene.cpp:122
SortingAttribute
List of attributes used to sort the dataset.
Definition: graphsorter.h:18
QVector< GraphSorter * > GetSorters() const
Returns the available sorters.
Definition: graphscene.h:37
void SetInterpolationMode(GraphLayouter::InterpolationMode const interpMode)
Sets the interpolation method to be used by the GraphLayouter when layouting the graph.
Definition: graphscene.cpp:104
ColoringAttribute
List of attributes which can be used to calculate an appropriate color value.
Definition: graphcolorizer.h:18
The data set.
Definition: dataset.h:85
Derived classes provide layouting functionality.
Definition: graphlayouter.h:11
void Set2DColoring(bool enable)
Sets a flag which enables 2D coloring: alpha value of color changes according to the layours sum valu...
Definition: graphscene.cpp:128
InterpolationMode
List of interpolation methods.
Definition: graphlayouter.h:19
Represents a single layer of the stacked graph.
Definition: dataset.h:23
void CreateStackedGraph(DataSet &data)
Creates a stacked graph out of the given dataset.
Definition: graphscene.cpp:167
Class provides coloring for the graph layers by using linear interpolation.
Definition: graphcolorizer.h:10
void SetLabeling(bool enabled)
Determines if the layers should show their labels.
Definition: graphscene.cpp:134
void SetSorter(GraphSorter *const sorter)
Sets the sorter to use in the CreateStackedGraph method.
Definition: graphscene.cpp:98
Derived classes provide sorting functionality for the graph layers, usign different algorithms...
Definition: graphsorter.h:10
QVector< GraphLayouter * > GetLayouts() const
Returns the available layouts.
Definition: graphscene.h:33
QImage GetBitmap(int width, int height, bool keepAspect)
Renders the current graph into a QImage.
Definition: graphscene.cpp:316
void SetLayout(GraphLayouter *const layouter)
Sets the layouter to use in the CreateStackedGraph method.
Definition: graphscene.cpp:92
void SetSortingAttribute(GraphSorter::SortingAttribute const sortAttribute)
Sets the sorting attribute to be used by the GraphSorter when sorting the dataset.
Definition: graphscene.cpp:110
void SetColoringAttribute(GraphColorizer::ColoringAttribute const colorAttribute)
Sets the coloring attribute to be used by the GraphColorizer when assigning colors to the graph layer...
Definition: graphscene.cpp:116