##// END OF EJS Templates
fix painting coordinates and added LGPL
fix painting coordinates and added LGPL

File last commit:

r7:a8e6b5a8e8d0 tip default
r7:a8e6b5a8e8d0 tip default
Show More
qcolormapseries_p.h
100 lines | 3.2 KiB | text/x-c | CLexer
/*------------------------------------------------------------------------------
-- This file is a part of the ColorMapChart API
-- Copyright (C) 2016, Plasma Physics Laboratory - CNRS
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------*/
/*-- Author : Hugo Winter
-- Mail : hugo.winter@lpp.polytechnique.fr
----------------------------------------------------------------------------*/
#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;
void getUniformGrid(double minX, double maxX, double minY, double maxY, int width, int height, QVector<double> &grid, 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;
int m_imageHeight;
int m_imageWidth;
QColorMapSeries::Strategy m_strategy;
double m_requestedMinX;
double m_requestedMaxX;
double m_requestedMinY;
double m_requestedMaxY;
void recomputeDataRange();
double computePixelValue(double &index);
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