summaryrefslogtreecommitdiffstats
path: root/src/chartsqml2/declarativeboxplotseries.cpp
diff options
context:
space:
mode:
authorTitta Heikkala <titta.heikkala@theqtcompany.com>2014-11-12 10:23:01 +0200
committerTitta Heikkala <titta.heikkala@theqtcompany.com>2014-11-12 13:13:16 +0200
commitf78be8da2422a758e0f50d3ca0cced53f44d0f12 (patch)
tree91dae2e5066bf548817c32f06c26df425a58f82f /src/chartsqml2/declarativeboxplotseries.cpp
parent6c4e7f2cd60f47ef5935ed9f21d19bb94db5f048 (diff)
Add pressed, released and doubleClicked signals
Added pressed, released and doubleClicked signals for all series. The signals are also added to QPieSlice and QBoxPlotSet. Change-Id: If94948be439a3b53ed48c02d0092091e836222a4 Task-number: QTRD-2384 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
Diffstat (limited to 'src/chartsqml2/declarativeboxplotseries.cpp')
-rw-r--r--src/chartsqml2/declarativeboxplotseries.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/chartsqml2/declarativeboxplotseries.cpp b/src/chartsqml2/declarativeboxplotseries.cpp
index f3bd598b..cb11f8c8 100644
--- a/src/chartsqml2/declarativeboxplotseries.cpp
+++ b/src/chartsqml2/declarativeboxplotseries.cpp
@@ -72,6 +72,18 @@ QT_CHARTS_BEGIN_NAMESPACE
This signal is emitted when the user clicks with a mouse on top of box-and-whiskers item.
*/
/*!
+ \qmlsignal BoxSet::onPressed()
+ This signal is emitted when the user presses with a mouse on top of box-and-whiskers item.
+*/
+/*!
+ \qmlsignal BoxSet::onReleased()
+ This signal is emitted when the user releases with a mouse on top of box-and-whiskers item.
+*/
+/*!
+ \qmlsignal BoxSet::onDoubleClicked()
+ This signal is emitted when the user doubleclicks with a mouse on top of box-and-whiskers item.
+*/
+/*!
\qmlsignal BoxSet::onHovered(bool status)
The signal is emitted if mouse is hovered on top of box-and-whiskers item.
Parameter \a status is true, if mouse entered on top of the item, and false if mouse left from top of the item.
@@ -335,6 +347,9 @@ DeclarativeBoxPlotSeries::DeclarativeBoxPlotSeries(QQuickItem *parent) :
connect(this, SIGNAL(hovered(bool, QBoxSet*)), this, SLOT(onHovered(bool, QBoxSet*)));
connect(this, SIGNAL(clicked(QBoxSet*)), this, SLOT(onClicked(QBoxSet*)));
connect(this, SIGNAL(brushChanged()), this, SLOT(handleBrushChanged()));
+ connect(this, SIGNAL(pressed(QBoxSet*)), this, SLOT(onPressed(QBoxSet*)));
+ connect(this, SIGNAL(released(QBoxSet*)), this, SLOT(onReleased(QBoxSet*)));
+ connect(this, SIGNAL(doubleClicked(QBoxSet*)), this, SLOT(onDoubleClicked(QBoxSet*)));
}
void DeclarativeBoxPlotSeries::classBegin()
@@ -394,6 +409,21 @@ void DeclarativeBoxPlotSeries::onClicked(QBoxSet *boxset)
emit clicked(qobject_cast<DeclarativeBoxSet *>(boxset));
}
+void DeclarativeBoxPlotSeries::onPressed(QBoxSet *boxset)
+{
+ emit pressed(qobject_cast<DeclarativeBoxSet *>(boxset));
+}
+
+void DeclarativeBoxPlotSeries::onReleased(QBoxSet *boxset)
+{
+ emit released(qobject_cast<DeclarativeBoxSet *>(boxset));
+}
+
+void DeclarativeBoxPlotSeries::onDoubleClicked(QBoxSet *boxset)
+{
+ emit doubleClicked(qobject_cast<DeclarativeBoxSet *>(boxset));
+}
+
QString DeclarativeBoxPlotSeries::brushFilename() const
{
return m_brushFilename;