From 701e99c620a7fdac350562d3ca9888a4ea718b8b 2012-06-27 11:31:56 From: Michal Klocek Date: 2012-06-27 11:31:56 Subject: [PATCH] Adding missing functions to API --- diff --git a/src/qabstractseries.h b/src/qabstractseries.h index 4a19f52..aaee47c 100644 --- a/src/qabstractseries.h +++ b/src/qabstractseries.h @@ -63,6 +63,10 @@ public: bool isVisible() const; QChart* chart() const; + void adjustView(); + void show(); + void hide(); + Q_SIGNALS: void nameChanged(); void visibleChanged(); diff --git a/src/qchart.cpp b/src/qchart.cpp index 974d47d..4911821 100644 --- a/src/qchart.cpp +++ b/src/qchart.cpp @@ -356,33 +356,56 @@ QChart::AnimationOptions QChart::animationOptions() const /*! Scrolls the visible area of the chart to the left by the distance between two x axis ticks */ -void QChart::scrollLeft() +void QChart::scrollLeft(qreal dx) { +<<<<<<< Updated upstream // d_ptr->m_presenter->scroll(-d_ptr->m_presenter->geometry().width()/(axisX()->ticksCount()-1),0); +======= + //TODO: + Q_UNUSED(dx); + // d_ptr->m_presenter->scroll(-d_ptr->m_presenter->geometry().width()/(axisX()->d_ptr->ticksCount()-1),0); +>>>>>>> Stashed changes } /*! Scrolls the visible area of the chart to the right by the distance between two x axis ticks */ -void QChart::scrollRight() +void QChart::scrollRight(qreal dx) { +<<<<<<< Updated upstream // d_ptr->m_presenter->scroll(d_ptr->m_presenter->geometry().width()/(axisX()->ticksCount()-1),0); +======= + //TODO: + Q_UNUSED(dx); + // d_ptr->m_presenter->scroll(d_ptr->m_presenter->geometry().width()/(axisX()->ticksCount()-1),0); +>>>>>>> Stashed changes } /*! Scrolls the visible area of the chart up by the distance between two y axis ticks */ -void QChart::scrollUp() +void QChart::scrollUp(qreal dy) { +<<<<<<< Updated upstream +======= + //TODO: + Q_UNUSED(dy); +>>>>>>> Stashed changes // d_ptr->m_presenter->scroll(0,d_ptr->m_presenter->geometry().width()/(axisY()->ticksCount()-1)); } /*! Scrolls the visible area of the chart down by the distance between two y axis ticks */ -void QChart::scrollDown() +void QChart::scrollDown(qreal dy) { +<<<<<<< Updated upstream // d_ptr->m_presenter->scroll(0,-d_ptr->m_presenter->geometry().width()/(axisY()->ticksCount()-1)); +======= + //TODO: + Q_UNUSED(dy); + // d_ptr->m_presenter->scroll(0,-d_ptr->m_presenter->geometry().width()/(axisY()->ticksCount()-1)); +>>>>>>> Stashed changes } /*! diff --git a/src/qchart.h b/src/qchart.h index 2246dcf..1b63920 100644 --- a/src/qchart.h +++ b/src/qchart.h @@ -107,12 +107,14 @@ public: void zoomIn(const QRectF &rect); void zoomOut(); void zoom(qreal factor); - void scrollLeft(); - void scrollRight(); - void scrollUp(); - void scrollDown(); + void scrollLeft(qreal dx); + void scrollRight(qreal dx); + void scrollUp(qreal dy); + void scrollDown(qreal dy); void scroll(const QPointF &delta); + void adjustViewToSeries(QAbstractSeries* series= 0); + QLegend* legend() const; void setMarginsMinimum(const QRectF& margins);