From b1616762bd1e13608c1040c543e909698670b519 Mon Sep 17 00:00:00 2001 From: Jani Honkonen Date: Thu, 22 Nov 2012 13:31:41 +0200 Subject: Fix BC: QChart::setMinimumMargins and QChart::minimumMargins are in v1.1.0 so they have to stay. --- src/qchart.cpp | 21 +++++++++++++++++++++ src/qchart.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/src/qchart.cpp b/src/qchart.cpp index 7c84d1d5..8b31af0c 100644 --- a/src/qchart.cpp +++ b/src/qchart.cpp @@ -366,6 +366,27 @@ QLegend *QChart::legend() const return d_ptr->m_legend; } +/*! + Sets the minimum \a margins between the plot area (axes) and the edge of the chart widget. + Deprecated. Use setMargins(). +*/ +void QChart::setMinimumMargins(const QMargins &margins) +{ + qWarning() << "QChart::setMinimumMargins is deprecated. Use QChart::setMargins instead."; + d_ptr->m_presenter->layout()->setMargins(margins); +} + +/*! + Returns the rect that contains information about margins (distance between chart widget edge and axes). + Individual margins can be obtained by calling left, top, right, bottom on the returned rect. + Deprecated. Use margins(). + */ +QMargins QChart::minimumMargins() const +{ + qWarning() << "QChart::minimumMargins is deprecated. Use QChart::margins instead."; + return d_ptr->m_presenter->layout()->margins(); +} + /*! Sets the minimum \a margins between the plot area (axes) and the edge of the chart widget. */ diff --git a/src/qchart.h b/src/qchart.h index 5f447412..27806ccb 100644 --- a/src/qchart.h +++ b/src/qchart.h @@ -114,6 +114,9 @@ public: QLegend *legend() const; + void setMinimumMargins(const QMargins& margins); + QMargins minimumMargins() const; + void setMargins(const QMargins &margins); QMargins margins() const; -- cgit v1.2.3