|
|
#ifndef QCOLORMAPSERIES_P_H
|
|
|
#define QCOLORMAPSERIES_P_H
|
|
|
|
|
|
#include <private/qabstractseries_p.h>
|
|
|
#include "colormapdatapart.h"
|
|
|
#include <point3d.h>
|
|
|
|
|
|
QT_CHARTS_BEGIN_NAMESPACE
|
|
|
|
|
|
#include "qcolormapseries.h"
|
|
|
|
|
|
class QAbstractAxis;
|
|
|
|
|
|
class QColorMapSeriesPrivate : public QAbstractSeriesPrivate
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
|
|
|
public :
|
|
|
|
|
|
QColorMapSeriesPrivate(QColorMapSeries *q);
|
|
|
|
|
|
void initializeDomain();
|
|
|
void initializeAxes();
|
|
|
void initializeGraphics(QGraphicsItem* parent);
|
|
|
void initializeTheme(int index, ChartTheme* theme, bool forced = false);
|
|
|
void initializeAnimations(QChart::AnimationOptions options, int duration,
|
|
|
QEasingCurve &curve);
|
|
|
|
|
|
QList<QLegendMarker *> createLegendMarkers(QLegend *legend);
|
|
|
|
|
|
QAbstractAxis::AxisType defaultAxisType(Qt::Orientation orientation) const;
|
|
|
QAbstractAxis* createDefaultAxis(Qt::Orientation) const;
|
|
|
|
|
|
ColorMapDataPart* getUniformGrid(int xpos, int ypos,int width, int height, QColorMapSeries::Strategy strategy);
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
void updated();
|
|
|
|
|
|
protected:
|
|
|
QList<ColorMapDataPart*> m_dataParts;
|
|
|
QPen m_pen;
|
|
|
QBrush m_brush;
|
|
|
bool m_pointsVisible;
|
|
|
QString m_pointLabelsFormat;
|
|
|
bool m_pointLabelsVisible;
|
|
|
QFont m_pointLabelsFont;
|
|
|
QColor m_pointLabelsColor;
|
|
|
bool m_pointLabelsClipping;
|
|
|
|
|
|
private:
|
|
|
double m_minX;
|
|
|
double m_maxX;
|
|
|
double m_minY;
|
|
|
double m_maxY;
|
|
|
double m_minZ;
|
|
|
double m_maxZ;
|
|
|
void recomputeDataRange();
|
|
|
QPair<int,int> getLastX(double start, double end);
|
|
|
int getLastY(int x,double start, double end);
|
|
|
double clusterStrategyLast(QVector<Point3D>& cluster);
|
|
|
double clusterStrategyMean(QVector<Point3D> &cluster);
|
|
|
double clusterStrategyMedian(QVector<Point3D>& cluster);
|
|
|
void buildCluster(int xpos,int ypos, double dx,double dy,QVector<Point3D>& cluster);
|
|
|
Q_DECLARE_PUBLIC(QColorMapSeries)
|
|
|
};
|
|
|
|
|
|
QT_CHARTS_END_NAMESPACE
|
|
|
|
|
|
|
|
|
#endif // QCOLORMAPSERIES_P_H
|
|
|
|