summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;