#ifndef QCOLORMAPSERIES_H #define QCOLORMAPSERIES_H #include #include #include #include #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 &dataParts, bool copy=true); int count() const; QVector dataParts() const; QColorMapSeries &operator << (const ColorMapDataPart &dataPart); QColorMapSeries &operator << (const QList &dataParts); ColorMapDataPart* getUniformGrid(int xpos, int ypos,int width, int height, Strategy strategy); //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