summaryrefslogtreecommitdiffstats
path: root/tests/manual/boxplottester/mainwidget.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 /tests/manual/boxplottester/mainwidget.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 'tests/manual/boxplottester/mainwidget.cpp')
-rw-r--r--tests/manual/boxplottester/mainwidget.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/manual/boxplottester/mainwidget.cpp b/tests/manual/boxplottester/mainwidget.cpp
index 784512d3..81a05f67 100644
--- a/tests/manual/boxplottester/mainwidget.cpp
+++ b/tests/manual/boxplottester/mainwidget.cpp
@@ -250,8 +250,15 @@ void MainWidget::addSeries()
m_series[m_seriesCount]->setName("Box & Whiskers");
connect(m_series[m_seriesCount], SIGNAL(clicked(QBoxSet*)), this, SLOT(boxClicked(QBoxSet*)));
+ connect(m_series[m_seriesCount], SIGNAL(pressed(QBoxSet*)), this, SLOT(boxPressed(QBoxSet*)));
+ connect(m_series[m_seriesCount], SIGNAL(released(QBoxSet*)), this, SLOT(boxReleased(QBoxSet*)));
+ connect(m_series[m_seriesCount], SIGNAL(doubleClicked(QBoxSet*)),
+ this, SLOT(boxDoubleClicked(QBoxSet*)));
connect(m_series[m_seriesCount], SIGNAL(hovered(bool, QBoxSet*)), this, SLOT(boxHovered(bool, QBoxSet*)));
connect(set1, SIGNAL(clicked()), this, SLOT(singleBoxClicked()));
+ connect(set1, SIGNAL(pressed()), this, SLOT(singleBoxPressed()));
+ connect(set1, SIGNAL(released()), this, SLOT(singleBoxReleased()));
+ connect(set1, SIGNAL(doubleClicked()), this, SLOT(singleBoxDoubleClicked()));
connect(set2, SIGNAL(hovered(bool)), this, SLOT(singleBoxHovered(bool)));
m_series[m_seriesCount]->setBoxOutlineVisible(m_boxOutlined->checkState());
@@ -453,11 +460,41 @@ void MainWidget::boxHovered(bool state, QBoxSet *set)
qDebug() << "box median " << set->at(QBoxSet::Median) << " hover ended";
}
+void MainWidget::boxPressed(QBoxSet *set)
+{
+ qDebug() << "boxPressed, median = " << set->at(QBoxSet::Median);
+}
+
+void MainWidget::boxReleased(QBoxSet *set)
+{
+ qDebug() << "boxReleased, median = " << set->at(QBoxSet::Median);
+}
+
+void MainWidget::boxDoubleClicked(QBoxSet *set)
+{
+ qDebug() << "boxDoubleClicked, median = " << set->at(QBoxSet::Median);
+}
+
void MainWidget::singleBoxClicked()
{
qDebug() << "singleBoxClicked";
}
+void MainWidget::singleBoxPressed()
+{
+ qDebug() << "singleBoxPressed";
+}
+
+void MainWidget::singleBoxReleased()
+{
+ qDebug() << "singleBoxReleased";
+}
+
+void MainWidget::singleBoxDoubleClicked()
+{
+ qDebug() << "singleBoxDoubleClicked";
+}
+
void MainWidget::singleBoxHovered(bool state)
{
if (state)