##// END OF EJS Templates
improvements in execution time, colorbar ok, more work to do on axes,
improvements in execution time, colorbar ok, more work to do on axes,

File last commit:

r3:ab1c9ba54a31 default
r3:ab1c9ba54a31 default
Show More
qcolormapseries.h
122 lines | 3.9 KiB | text/x-c | CLexer
#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);
QVector<double> *getUniformGrid(int xpos, int ypos,int width, int height, Strategy strategy);
// QVector<double> *getUniformGrid(int width, int height, 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