summaryrefslogtreecommitdiffstats
path: root/src/charts/scatterchart/scatterchartitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/charts/scatterchart/scatterchartitem.cpp')
-rw-r--r--src/charts/scatterchart/scatterchartitem.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/charts/scatterchart/scatterchartitem.cpp b/src/charts/scatterchart/scatterchartitem.cpp
index 42bced1e..12d2f042 100644
--- a/src/charts/scatterchart/scatterchartitem.cpp
+++ b/src/charts/scatterchart/scatterchartitem.cpp
@@ -41,7 +41,8 @@ ScatterChartItem::ScatterChartItem(QScatterSeries *series, QGraphicsItem *item)
m_pointLabelsVisible(false),
m_pointLabelsFormat(series->pointLabelsFormat()),
m_pointLabelsFont(series->pointLabelsFont()),
- m_pointLabelsColor(series->pointLabelsColor())
+ m_pointLabelsColor(series->pointLabelsColor()),
+ m_mousePressed(false)
{
QObject::connect(m_series->d_func(), SIGNAL(updated()), this, SLOT(handleUpdated()));
QObject::connect(m_series, SIGNAL(visibleChanged()), this, SLOT(handleUpdated()));
@@ -55,6 +56,7 @@ ScatterChartItem::ScatterChartItem(QScatterSeries *series, QGraphicsItem *item)
setZValue(ChartPresenter::ScatterSeriesZValue);
setFlags(QGraphicsItem::ItemClipsChildrenToShape);
+ setFlag(QGraphicsItem::ItemIsSelectable);
handleUpdated();
@@ -112,6 +114,21 @@ void ScatterChartItem::markerHovered(QGraphicsItem *marker, bool state)
emit XYChart::hovered(m_markerMap[marker], state);
}
+void ScatterChartItem::markerPressed(QGraphicsItem *marker)
+{
+ emit XYChart::pressed(m_markerMap[marker]);
+}
+
+void ScatterChartItem::markerReleased(QGraphicsItem *marker)
+{
+ emit XYChart::released(m_markerMap[marker]);
+}
+
+void ScatterChartItem::markerDoubleClicked(QGraphicsItem *marker)
+{
+ emit XYChart::doubleClicked(m_markerMap[marker]);
+}
+
void ScatterChartItem::updateGeometry()
{