diff options
author | Titta Heikkala <titta.heikkala@theqtcompany.com> | 2014-10-24 12:32:40 +0300 |
---|---|---|
committer | Titta Heikkala <titta.heikkala@theqtcompany.com> | 2014-10-24 13:19:08 +0300 |
commit | 17ddbeb778159d96113a51079b603665a0f1058d (patch) | |
tree | 478e7a61e70176e01f4b61f2757fd678710f788c /src/charts/barchart | |
parent | 6858d35fa14078847dfcb003467a641b6231657e (diff) |
Removed the old hovered signal from bar chart
A new hovered signal that provides index information has been added for
bar chart (QTRD-2161). The old hovered signal has now been removed.
Change-Id: Ia65be1c363cbfda942d48bceb5326bd54a3c35ec
Task-number: QTRD-2199
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
Diffstat (limited to 'src/charts/barchart')
-rw-r--r-- | src/charts/barchart/abstractbarchartitem.cpp | 2 | ||||
-rw-r--r-- | src/charts/barchart/bar.cpp | 6 | ||||
-rw-r--r-- | src/charts/barchart/bar_p.h | 1 | ||||
-rw-r--r-- | src/charts/barchart/qabstractbarseries.cpp | 8 | ||||
-rw-r--r-- | src/charts/barchart/qabstractbarseries.h | 1 | ||||
-rw-r--r-- | src/charts/barchart/qbarset.cpp | 7 | ||||
-rw-r--r-- | src/charts/barchart/qbarset.h | 1 |
7 files changed, 1 insertions, 25 deletions
diff --git a/src/charts/barchart/abstractbarchartitem.cpp b/src/charts/barchart/abstractbarchartitem.cpp index d0adca67..1d32d9fa 100644 --- a/src/charts/barchart/abstractbarchartitem.cpp +++ b/src/charts/barchart/abstractbarchartitem.cpp @@ -162,10 +162,8 @@ void AbstractBarChartItem::handleDataStructureChanged() Bar *bar = new Bar(set, c, this); m_bars.append(bar); connect(bar, SIGNAL(clicked(int,QBarSet*)), m_series, SIGNAL(clicked(int,QBarSet*))); - connect(bar, SIGNAL(hovered(bool,QBarSet*)), m_series, SIGNAL(hovered(bool,QBarSet*))); connect(bar, SIGNAL(hovered(bool, int, QBarSet*)), m_series, SIGNAL(hovered(bool, int, QBarSet*))); connect(bar, SIGNAL(clicked(int,QBarSet*)), set, SIGNAL(clicked(int))); - connect(bar, SIGNAL(hovered(bool,QBarSet*)), set, SIGNAL(hovered(bool))); connect(bar, SIGNAL(hovered(bool, int, QBarSet*)), set, SIGNAL(hovered(bool, int))); // m_layout.append(QRectF(0, 0, 1, 1)); diff --git a/src/charts/barchart/bar.cpp b/src/charts/barchart/bar.cpp index 41f20b7b..400fd58b 100644 --- a/src/charts/barchart/bar.cpp +++ b/src/charts/barchart/bar.cpp @@ -36,10 +36,8 @@ Bar::Bar(QBarSet *barset, int index, QGraphicsItem *parent) : QGraphicsRectItem( Bar::~Bar() { // End hover event, if bar is deleted during it - if (m_hovering) { - emit hovered(false, m_barset); + if (m_hovering) emit hovered(false, m_index, m_barset); - } } void Bar::mousePressEvent(QGraphicsSceneMouseEvent *event) @@ -53,7 +51,6 @@ void Bar::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event) m_hovering = true; - emit hovered(true, m_barset); emit hovered(true, m_index, m_barset); } @@ -62,7 +59,6 @@ void Bar::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event) m_hovering = false; - emit hovered(false, m_barset); emit hovered(false, m_index, m_barset); } diff --git a/src/charts/barchart/bar_p.h b/src/charts/barchart/bar_p.h index 5033fc3c..4f8b010d 100644 --- a/src/charts/barchart/bar_p.h +++ b/src/charts/barchart/bar_p.h @@ -52,7 +52,6 @@ public: Q_SIGNALS: void clicked(int index, QBarSet *barset); - void hovered(bool status, QBarSet *barset); void hovered(bool status, int index, QBarSet *barset); private: diff --git a/src/charts/barchart/qabstractbarseries.cpp b/src/charts/barchart/qabstractbarseries.cpp index a4795248..9c11f921 100644 --- a/src/charts/barchart/qabstractbarseries.cpp +++ b/src/charts/barchart/qabstractbarseries.cpp @@ -211,14 +211,6 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \fn void QAbstractBarSeries::hovered(bool status, QBarSet* barset) - - The signal is emitted if mouse is hovered on top of series. - Parameter \a barset is the pointer of barset, where hover happened. - Parameter \a status is true, if mouse entered on top of series, false if mouse left from top of series. -*/ - -/*! \fn void QAbstractBarSeries::hovered(bool status, int index, QBarSet* barset) The signal is emitted if mouse is hovered on top of series. diff --git a/src/charts/barchart/qabstractbarseries.h b/src/charts/barchart/qabstractbarseries.h index 919c9abe..47a04476 100644 --- a/src/charts/barchart/qabstractbarseries.h +++ b/src/charts/barchart/qabstractbarseries.h @@ -77,7 +77,6 @@ protected: Q_SIGNALS: void clicked(int index, QBarSet *barset); - void hovered(bool status, QBarSet *barset); void hovered(bool status, int index, QBarSet *barset); void countChanged(); void labelsVisibleChanged(); diff --git a/src/charts/barchart/qbarset.cpp b/src/charts/barchart/qbarset.cpp index d7457ba6..0555b625 100644 --- a/src/charts/barchart/qbarset.cpp +++ b/src/charts/barchart/qbarset.cpp @@ -134,13 +134,6 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \fn void QBarSet::hovered(bool status) - - The signal is emitted if mouse is hovered on top of bar set. - Parameter \a status is true, if mouse entered on top of bar set, false if mouse left from top of bar set. -*/ - -/*! \fn void QBarSet::hovered(bool status, int index) The signal is emitted if mouse is hovered on top of bar set. diff --git a/src/charts/barchart/qbarset.h b/src/charts/barchart/qbarset.h index ea708296..2faafbeb 100644 --- a/src/charts/barchart/qbarset.h +++ b/src/charts/barchart/qbarset.h @@ -84,7 +84,6 @@ public: Q_SIGNALS: void clicked(int index); - void hovered(bool status); void hovered(bool status, int index); void penChanged(); void brushChanged(); |