xychart_p.h
92 lines
| 2.5 KiB
| text/x-c
|
CLexer
Jani Honkonen
|
r794 | /**************************************************************************** | ||
** | ||||
Miikka Heikkinen
|
r2432 | ** Copyright (C) 2013 Digia Plc | ||
Jani Honkonen
|
r794 | ** All rights reserved. | ||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
** This file is part of the Qt Commercial Charts Add-on. | ||||
** | ||||
** $QT_BEGIN_LICENSE$ | ||||
** Licensees holding valid Qt Commercial licenses may use this file in | ||||
** accordance with the Qt Commercial License Agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and Digia. | ||||
** | ||||
** If you have questions regarding the use of this file, please use | ||||
** contact form at http://qt.digia.com | ||||
** $QT_END_LICENSE$ | ||||
** | ||||
****************************************************************************/ | ||||
unknown
|
r1366 | // W A R N I N G | ||
// ------------- | ||||
// | ||||
// This file is not part of the QtCommercial Chart API. It exists purely as an | ||||
// implementation detail. This header file may change from version to | ||||
// version without notice, or even be removed. | ||||
// | ||||
// We mean it. | ||||
Jani Honkonen
|
r1935 | #ifndef XYCHART_H | ||
#define XYCHART_H | ||||
Michal Klocek
|
r466 | |||
#include "qchartglobal.h" | ||||
#include "chartitem_p.h" | ||||
Michal Klocek
|
r1217 | #include "xyanimation_p.h" | ||
Marek Rosa
|
r1805 | #include "qvalueaxis.h" | ||
Michal Klocek
|
r466 | #include <QPen> | ||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class ChartPresenter; | ||||
class QXYSeries; | ||||
Michal Klocek
|
r2273 | class XYChart : public ChartItem | ||
Michal Klocek
|
r466 | { | ||
Jani Honkonen
|
r2097 | Q_OBJECT | ||
Michal Klocek
|
r466 | public: | ||
Miikka Heikkinen
|
r2483 | explicit XYChart(QXYSeries *series,QGraphicsItem *item = 0); | ||
Tero Ahola
|
r1782 | ~XYChart() {} | ||
Michal Klocek
|
r466 | |||
Miikka Heikkinen
|
r2483 | void setGeometryPoints(const QVector<QPointF> &points); | ||
Michal Klocek
|
r1217 | QVector<QPointF> geometryPoints() const { return m_points; } | ||
Michal Klocek
|
r466 | |||
Jani Honkonen
|
r2104 | void setAnimation(XYAnimation *animation); | ||
ChartAnimation *animation() const { return m_animation; } | ||||
Michal Klocek
|
r1218 | virtual void updateGeometry() = 0; | ||
Michal Klocek
|
r677 | |||
Michal Klocek
|
r1241 | bool isDirty() const { return m_dirty; } | ||
void setDirty(bool dirty); | ||||
Miikka Heikkinen
|
r2483 | void getSeriesRanges(qreal &minX, qreal &maxX, qreal &minY, qreal &maxY); | ||
QVector<bool> offGridStatusVector(); | ||||
sauimone
|
r775 | public Q_SLOTS: | ||
Michal Klocek
|
r466 | void handlePointAdded(int index); | ||
void handlePointRemoved(int index); | ||||
void handlePointReplaced(int index); | ||||
Tero Ahola
|
r1783 | void handlePointsReplaced(); | ||
Michal Klocek
|
r1698 | void handleDomainUpdated(); | ||
Michal Klocek
|
r466 | |||
sauimone
|
r775 | Q_SIGNALS: | ||
Jani Honkonen
|
r2104 | void clicked(const QPointF &point); | ||
Marek Rosa
|
r2255 | void hovered(const QPointF &point, bool state); | ||
Michal Klocek
|
r571 | |||
Michal Klocek
|
r466 | protected: | ||
Jani Honkonen
|
r2097 | virtual void updateChart(QVector<QPointF> &oldPoints, QVector<QPointF> &newPoints, int index = -1); | ||
Michal Klocek
|
r466 | |||
private: | ||||
inline bool isEmpty(); | ||||
Tero Ahola
|
r1782 | protected: | ||
Jani Honkonen
|
r2104 | QXYSeries *m_series; | ||
Michal Klocek
|
r466 | QVector<QPointF> m_points; | ||
Jani Honkonen
|
r2104 | XYAnimation *m_animation; | ||
Michal Klocek
|
r1241 | bool m_dirty; | ||
Michal Klocek
|
r466 | |||
Michal Klocek
|
r571 | friend class AreaChartItem; | ||
Michal Klocek
|
r466 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif | ||||