scatterpresenter_p.h
51 lines
| 1.2 KiB
| text/x-c
|
CLexer
|
r158 | #ifndef SCATTERPRESENTER_H | ||
#define SCATTERPRESENTER_H | ||||
#include "qchartglobal.h" | ||||
#include "chartitem_p.h" | ||||
#include <QObject> | ||||
|
r182 | #include <QPen> | ||
|
r158 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class QScatterSeries; | ||||
class ScatterPresenter : public QObject, public ChartItem | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
explicit ScatterPresenter(QScatterSeries *series, QGraphicsObject *parent = 0); | ||||
public: // from ChartItem | ||||
|
r394 | QRectF boundingRect() const { return m_path.controlPointRect(); } | ||
|
r316 | QPainterPath shape() const { return m_path; } | ||
|
r158 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); | ||
|
r300 | void mousePressEvent (QGraphicsSceneMouseEvent * event); | ||
|
r394 | void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); | ||
|
r158 | |||
|
r316 | Q_SIGNALS: | ||
|
r394 | void clicked(QPointF coordinates); | ||
|
r158 | |||
public Q_SLOTS: | ||||
|
r439 | void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY); | ||
|
r158 | void handleGeometryChanged(const QRectF& rect); | ||
void handleModelChanged(); | ||||
public: | ||||
void changeGeometry(); | ||||
|
r439 | qreal m_minX; | ||
qreal m_maxX; | ||||
qreal m_minY; | ||||
qreal m_maxY; | ||||
|
r158 | QScatterSeries *m_series; | ||
|
r447 | QRectF m_clippingRect; | ||
|
r182 | QPen m_markerPen; | ||
|
r195 | QBrush m_markerBrush; | ||
|
r316 | QPainterPath m_path; | ||
|
r439 | |||
|
r158 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // SCATTERPRESENTER_H | ||||