summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Honkonen <jani.honkonen@digia.com>2012-11-22 13:31:41 +0200
committerJani Honkonen <jani.honkonen@digia.com>2012-11-22 13:31:41 +0200
commitb1616762bd1e13608c1040c543e909698670b519 (patch)
tree3b0c296c46e035e7a16db2dd938bed9568840736
parent9fe80cb5ef113d8d611b25fb6644b9543a556b7a (diff)
Fix BC: QChart::setMinimumMargins and QChart::minimumMargins are in v1.1.0 so they have to stay.old_master
-rw-r--r--src/qchart.cpp21
-rw-r--r--src/qchart.h3
2 files changed, 24 insertions, 0 deletions
diff --git a/src/qchart.cpp b/src/qchart.cpp
index 7c84d1d5..8b31af0c 100644
--- a/src/qchart.cpp
+++ b/src/qchart.cpp
@@ -368,6 +368,27 @@ QLegend *QChart::legend() const
/*!
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.
*/
void QChart::setMargins(const QMargins &margins)
{
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;