##// 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.h
144 lines | 5.1 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_H
#define QCOLORMAPSERIES_H
#include <QtCharts/QChartGlobal>
#include <QtCharts/QAbstractSeries>
#include <QtGui/QPen>
#include <QtGui/QBrush>
#include "colormapdatapart.h"
QT_CHARTS_BEGIN_NAMESPACE
class QColorMapSeriesPrivate;
class QT_CHARTS_EXPORT QColorMapSeries : public QAbstractSeries
{
Q_OBJECT
// Q_PROPERTY(bool pointsVisible READ pointsVisible WRITE setPointsVisible)
// Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
// Q_PROPERTY(QString pointLabelsFormat READ pointLabelsFormat WRITE setPointLabelsFormat NOTIFY pointLabelsFormatChanged)
// Q_PROPERTY(bool pointLabelsVisible READ pointLabelsVisible WRITE setPointLabelsVisible NOTIFY pointLabelsVisibilityChanged)
// Q_PROPERTY(QFont pointLabelsFont READ pointLabelsFont WRITE setPointLabelsFont NOTIFY pointLabelsFontChanged)
// Q_PROPERTY(QColor pointLabelsColor READ pointLabelsColor WRITE setPointLabelsColor NOTIFY pointLabelsColorChanged)
// Q_PROPERTY(bool pointLabelsClipping READ pointLabelsClipping WRITE setPointLabelsClipping NOTIFY pointLabelsClippingChanged)
protected:
explicit QColorMapSeries(QColorMapSeriesPrivate &d, QObject *parent =0);
public :
enum Strategy
{
LastPixel,
MeanPixel,
MedianPixel
};
explicit QColorMapSeries(QObject *parent =0);
~QColorMapSeries();
QAbstractSeries::SeriesType type() const;
void append(ColorMapDataPart* dataPart, bool copy=true);
void append(const QList<ColorMapDataPart *> &dataParts, bool copy=true);
int count() const;
QVector<ColorMapDataPart*> dataParts() const;
QColorMapSeries &operator << (const ColorMapDataPart &dataPart);
QColorMapSeries &operator << (const QList<ColorMapDataPart *> &dataParts);
void getUniformGrid(double minX, double maxX, double minY, double maxY, int width, int height, QVector<double> &grid, QColorMapSeries::Strategy strategy);
// QVector<double> *getUniformGrid(int width, int height, QVector<double> &grid, Strategy lambda);
// virtual void attachAxis(QAbstractAxis *axis);
virtual void setPen(const QPen &pen);
QPen pen() const;
virtual void setBrush(const QBrush &brush);
QBrush brush() const;
// virtual void setColor(const QColor &color);
// QColor color() const;
// void setPointsVisible(bool visible = true);
// bool pointsVisible() const;
// void setPointLabelsFormat(const QString &format);
// QString pointLabelsFormat() const;
// void setPointLabelsVisible(bool visible = true);
// bool pointLabelsVisible() const;
// void setPointLabelsFont(const QFont &font);
// QFont pointLabelsFont() const;
// void setPointLabelsColor(const QColor &color);
// QColor pointLabelsColor() const;
// void setPointLabelsClipping(bool enabled = true);
// bool pointLabelsClipping() const;
double minX();
double minY();
double minZ();
double maxX();
double maxY();
double maxZ();
Q_SIGNALS:
// void clicked(const Point3D &point);
// void hovered(const Point3D &point, bool state);
// void pressed(const Point3D &point);
// void released(const Point3D &point);
// void doubleClicked(const Point3D &point);
// void pointReplaced(int index);
// void pointRemoved(int index);
void dataPartAdded(int index);
// void colorChanged(QColor color);
// void pointsReplaced();
// void pointLabelsFormatChanged(const QString &format);
// void pointLabelsVisibilityChanged(bool visible);
// void pointLabelsFontChanged(const QFont &font);
// void pointLabelsColorChanged(const QColor &color);
// void pointLabelsClippingChanged(bool clipping);
// void pointsRemoved(int index, int count);
void penChanged(const QPen &pen);
private:
Q_DECLARE_PRIVATE(QColorMapSeries)
Q_DISABLE_COPY(QColorMapSeries)
friend class ColorMapLegendMarker;
friend class ColorMapChart;
friend class QColorMapLegendMarkerPrivate;
};
QT_CHARTS_END_NAMESPACE
#endif // QCOLORMAPSERIES_H