From b1d7efa360aa0c961547924ac95a2ff42e38d2b4 2014-11-12 13:47:05 From: Miikka Heikkinen Date: 2014-11-12 13:47:05 Subject: [PATCH] Remove deprecated elements from APIs. Task-number: QTRD-2098 Change-Id: Ib658c8a51af0b73ded5d6b13c8fa58762f859961 Reviewed-by: Mika Salmela Reviewed-by: Titta Heikkala --- diff --git a/examples/charts/qmlcustomlegend/qml/qmlcustomlegend/ChartViewHighlighted.qml b/examples/charts/qmlcustomlegend/qml/qmlcustomlegend/ChartViewHighlighted.qml index 7bc9b54..b6c1877 100644 --- a/examples/charts/qmlcustomlegend/qml/qmlcustomlegend/ChartViewHighlighted.qml +++ b/examples/charts/qmlcustomlegend/qml/qmlcustomlegend/ChartViewHighlighted.qml @@ -44,7 +44,6 @@ ChartView { titleText: "EUR" min: 0 max: 40000 - niceNumbersEnabled: true labelFormat: "%.0f" tickCount: 5 } @@ -70,6 +69,7 @@ ChartView { } chartViewHighlighted.title = selectedSeries.name; axisY.max = maxVal; + axisY.applyNiceNumbers() } } diff --git a/src/charts/axis/chartaxiselement.cpp b/src/charts/axis/chartaxiselement.cpp index f9ab6a3..be07d14 100644 --- a/src/charts/axis/chartaxiselement.cpp +++ b/src/charts/axis/chartaxiselement.cpp @@ -80,7 +80,6 @@ void ChartAxisElement::connectSlots() QObject::connect(axis(), SIGNAL(shadesVisibleChanged(bool)), this, SLOT(handleShadesVisibleChanged(bool))); QObject::connect(axis(), SIGNAL(labelsAngleChanged(int)), this, SLOT(handleLabelsAngleChanged(int))); QObject::connect(axis(), SIGNAL(linePenChanged(const QPen&)), this, SLOT(handleArrowPenChanged(const QPen&))); - QObject::connect(axis(), SIGNAL(labelsPenChanged(const QPen&)), this, SLOT(handleLabelsPenChanged(const QPen&))); QObject::connect(axis(), SIGNAL(labelsBrushChanged(const QBrush&)), this, SLOT(handleLabelsBrushChanged(const QBrush&))); QObject::connect(axis(), SIGNAL(labelsFontChanged(const QFont&)), this, SLOT(handleLabelsFontChanged(const QFont&))); QObject::connect(axis(), SIGNAL(gridLinePenChanged(const QPen&)), this, SLOT(handleGridPenChanged(const QPen&))); @@ -88,7 +87,6 @@ void ChartAxisElement::connectSlots() QObject::connect(axis(), SIGNAL(shadesBrushChanged(const QBrush&)), this, SLOT(handleShadesBrushChanged(const QBrush&))); QObject::connect(axis(), SIGNAL(titleTextChanged(const QString&)), this, SLOT(handleTitleTextChanged(const QString&))); QObject::connect(axis(), SIGNAL(titleFontChanged(const QFont&)), this, SLOT(handleTitleFontChanged(const QFont&))); - QObject::connect(axis(), SIGNAL(titlePenChanged(const QPen&)), this, SLOT(handleTitlePenChanged(const QPen&))); QObject::connect(axis(), SIGNAL(titleBrushChanged(const QBrush&)), this, SLOT(handleTitleBrushChanged(const QBrush&))); QObject::connect(axis(), SIGNAL(titleVisibleChanged(bool)), this, SLOT(handleTitleVisibleChanged(bool))); QObject::connect(axis()->d_ptr.data(), SIGNAL(rangeChanged(qreal, qreal)), this, SLOT(handleRangeChanged(qreal, qreal))); @@ -132,11 +130,6 @@ void ChartAxisElement::handleLabelsAngleChanged(int angle) presenter()->layout()->invalidate(); } -void ChartAxisElement::handleLabelsPenChanged(const QPen &pen) -{ - Q_UNUSED(pen) -} - void ChartAxisElement::handleLabelsBrushChanged(const QBrush &brush) { foreach (QGraphicsItem *item, m_labels->childItems()) @@ -159,11 +152,6 @@ void ChartAxisElement::handleTitleTextChanged(const QString &title) m_title->setHtml(title); } -void ChartAxisElement::handleTitlePenChanged(const QPen &pen) -{ - Q_UNUSED(pen) -} - void ChartAxisElement::handleTitleBrushChanged(const QBrush &brush) { m_title->setDefaultTextColor(brush.color()); diff --git a/src/charts/axis/chartaxiselement_p.h b/src/charts/axis/chartaxiselement_p.h index 803c70a..2cd9f35 100644 --- a/src/charts/axis/chartaxiselement_p.h +++ b/src/charts/axis/chartaxiselement_p.h @@ -116,10 +116,8 @@ public Q_SLOTS: virtual void handleShadesPenChanged(const QPen &pen) = 0; virtual void handleArrowPenChanged(const QPen &pen) = 0; virtual void handleGridPenChanged(const QPen &pen) = 0; - void handleLabelsPenChanged(const QPen &pen); void handleLabelsBrushChanged(const QBrush &brush); void handleLabelsFontChanged(const QFont &font); - void handleTitlePenChanged(const QPen &pen); void handleTitleBrushChanged(const QBrush &brush); void handleTitleFontChanged(const QFont &font); void handleTitleTextChanged(const QString &title); diff --git a/src/charts/axis/qabstractaxis.cpp b/src/charts/axis/qabstractaxis.cpp index 4cdb535..0b50240 100644 --- a/src/charts/axis/qabstractaxis.cpp +++ b/src/charts/axis/qabstractaxis.cpp @@ -92,12 +92,6 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \property QAbstractAxis::labelsPen - \deprecated - The pen of the labels. -*/ - -/*! \property QAbstractAxis::labelsBrush The brush of the labels. Only the color of the brush is relevant. */ @@ -220,12 +214,6 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \property QAbstractAxis::titlePen - \deprecated - The pen of the title text. -*/ - -/*! \property QAbstractAxis::titleBrush The brush of the title text. Only the color of the brush is relevant. */ @@ -299,12 +287,6 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \fn void QAbstractAxis::labelsPenChanged(const QPen& pen) - \deprecated - The pen of the axis labels has changed to \a pen. -*/ - -/*! \fn void QAbstractAxis::labelsBrushChanged(const QBrush& brush) The brush of the axis labels has changed to \a brush. */ @@ -369,12 +351,6 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \fn void QAbstractAxis::titlePenChanged(const QPen& pen) - \deprecated - The pen of the axis shades has changed to \a pen. -*/ - -/*! \fn void QAbstractAxis::titleBrushChanged(const QBrush& brush) The brush of the axis title has changed to \a brush. */ @@ -548,22 +524,6 @@ bool QAbstractAxis::labelsVisible() const return d_ptr->m_labelsVisible; } -void QAbstractAxis::setLabelsPen(const QPen &pen) -{ - if (d_ptr->m_labelsPen != pen) { - d_ptr->m_labelsPen = pen; - emit labelsPenChanged(pen); - } -} - -QPen QAbstractAxis::labelsPen() const -{ - if (d_ptr->m_labelsPen == QChartPrivate::defaultPen()) - return QPen(); - else - return d_ptr->m_labelsPen; -} - /*! Sets \a brush used to draw labels. */ @@ -648,22 +608,6 @@ bool QAbstractAxis::isTitleVisible() const return d_ptr->m_titleVisible; } -void QAbstractAxis::setTitlePen(const QPen &pen) -{ - if (d_ptr->m_titlePen != pen) { - d_ptr->m_titlePen = pen; - emit titlePenChanged(pen); - } -} - -QPen QAbstractAxis::titlePen() const -{ - if (d_ptr->m_titlePen == QChartPrivate::defaultPen()) - return QPen(); - else - return d_ptr->m_titlePen; -} - /*! Sets \a brush used to draw title. */ @@ -877,7 +821,7 @@ void QAbstractAxis::setRange(const QVariant &min, const QVariant &max) /*! Returns the orientation in which the axis is being used (Vertical or Horizontal) */ -Qt::Orientation QAbstractAxis::orientation() +Qt::Orientation QAbstractAxis::orientation() const { return d_ptr->orientation(); } @@ -901,12 +845,10 @@ QAbstractAxisPrivate::QAbstractAxisPrivate(QAbstractAxis *q) m_gridLineVisible(true), m_gridLinePen(QChartPrivate::defaultPen()), m_labelsVisible(true), - m_labelsPen(QChartPrivate::defaultPen()), m_labelsBrush(QChartPrivate::defaultBrush()), m_labelsFont(QChartPrivate::defaultFont()), m_labelsAngle(0), m_titleVisible(true), - m_titlePen(QChartPrivate::defaultPen()), m_titleBrush(QChartPrivate::defaultBrush()), m_titleFont(QChartPrivate::defaultFont()), m_shadesVisible(false), @@ -949,15 +891,11 @@ void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) if (forced || QChartPrivate::defaultBrush() == m_labelsBrush) q_ptr->setLabelsBrush(theme->labelBrush()); - if (forced || QChartPrivate::defaultPen() == m_labelsPen) - q_ptr->setLabelsPen(Qt::NoPen); // NoPen for performance reasons if (forced || QChartPrivate::defaultFont() == m_labelsFont) q_ptr->setLabelsFont(theme->labelFont()); if (forced || QChartPrivate::defaultBrush() == m_titleBrush) q_ptr->setTitleBrush(theme->labelBrush()); - if (forced || QChartPrivate::defaultPen() == m_titlePen) - q_ptr->setTitlePen(Qt::NoPen); // NoPen for performance reasons if (forced || QChartPrivate::defaultFont() == m_titleFont) { QFont font(m_labelsFont); font.setBold(true); diff --git a/src/charts/axis/qabstractaxis.h b/src/charts/axis/qabstractaxis.h index 385a591..555660c 100644 --- a/src/charts/axis/qabstractaxis.h +++ b/src/charts/axis/qabstractaxis.h @@ -39,7 +39,6 @@ class QT_CHARTS_EXPORT QAbstractAxis : public QObject Q_PROPERTY(QColor color READ linePenColor WRITE setLinePenColor NOTIFY colorChanged) //labels Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) - Q_PROPERTY(QPen labelsPen READ labelsPen WRITE setLabelsPen NOTIFY labelsPenChanged) Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged) Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged) Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged) @@ -55,7 +54,6 @@ class QT_CHARTS_EXPORT QAbstractAxis : public QObject Q_PROPERTY(QBrush shadesBrush READ shadesBrush WRITE setShadesBrush NOTIFY shadesBrushChanged) //title Q_PROPERTY(QString titleText READ titleText WRITE setTitleText NOTIFY titleTextChanged) - Q_PROPERTY(QPen titlePen READ titlePen WRITE setTitlePen NOTIFY titlePenChanged) Q_PROPERTY(QBrush titleBrush READ titleBrush WRITE setTitleBrush NOTIFY titleBrushChanged) Q_PROPERTY(bool titleVisible READ isTitleVisible WRITE setTitleVisible NOTIFY titleVisibleChanged) Q_PROPERTY(QFont titleFont READ titleFont WRITE setTitleFont NOTIFY titleFontChanged) @@ -108,8 +106,6 @@ public: //labels handling bool labelsVisible() const; void setLabelsVisible(bool visible = true); - void setLabelsPen(const QPen &pen); - QPen labelsPen() const; void setLabelsBrush(const QBrush &brush); QBrush labelsBrush() const; void setLabelsFont(const QFont &font); @@ -122,8 +118,6 @@ public: //title handling bool isTitleVisible() const; void setTitleVisible(bool visible = true); - void setTitlePen(const QPen &pen); - QPen titlePen() const; void setTitleBrush(const QBrush &brush); QBrush titleBrush() const; void setTitleFont(const QFont &font); @@ -143,7 +137,7 @@ public: void setShadesBorderColor(QColor color); QColor shadesBorderColor() const; - Qt::Orientation orientation(); + Qt::Orientation orientation() const; Qt::Alignment alignment() const; //range handling @@ -156,7 +150,6 @@ Q_SIGNALS: void linePenChanged(const QPen &pen); void lineVisibleChanged(bool visible); void labelsVisibleChanged(bool visible); - void labelsPenChanged(const QPen &pen); void labelsBrushChanged(const QBrush &brush); void labelsFontChanged(const QFont &pen); void labelsAngleChanged(int angle); @@ -165,7 +158,6 @@ Q_SIGNALS: void colorChanged(QColor color); void labelsColorChanged(QColor color); void titleTextChanged(const QString &title); - void titlePenChanged(const QPen &pen); void titleBrushChanged(const QBrush &brush); void titleVisibleChanged(bool visible); void titleFontChanged(const QFont &font); diff --git a/src/charts/axis/qabstractaxis_p.h b/src/charts/axis/qabstractaxis_p.h index 26281ca..9a3f95e 100644 --- a/src/charts/axis/qabstractaxis_p.h +++ b/src/charts/axis/qabstractaxis_p.h @@ -100,13 +100,11 @@ private: QPen m_gridLinePen; bool m_labelsVisible; - QPen m_labelsPen; QBrush m_labelsBrush; QFont m_labelsFont; int m_labelsAngle; bool m_titleVisible; - QPen m_titlePen; QBrush m_titleBrush; QFont m_titleFont; QString m_title; diff --git a/src/charts/axis/valueaxis/qvalueaxis.cpp b/src/charts/axis/valueaxis/qvalueaxis.cpp index 423b20d..d4068b2 100644 --- a/src/charts/axis/valueaxis/qvalueaxis.cpp +++ b/src/charts/axis/valueaxis/qvalueaxis.cpp @@ -172,17 +172,6 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \property QValueAxis::niceNumbersEnabled - \obsolete - Using this function can lead to unexpected behavior. Use applyNiceNumbers() instead. -*/ - -/*! - \qmlproperty bool ValueAxis::niceNumbersEnabled - Deprecated; Using this function can lead to unexpected behavior. Use applyNiceNumbers() instead. -*/ - -/*! Constructs an axis object which is a child of \a parent. */ QValueAxis::QValueAxis(QObject *parent) : @@ -259,31 +248,6 @@ int QValueAxis::tickCount() const return d->m_tickCount; } -void QValueAxis::setNiceNumbersEnabled(bool enable) -{ - Q_D(QValueAxis); - qWarning() << "Deprecated; Using this function can lead to unexpected behavior. " \ - "Use applyNiceNumbers() instead."; - if(enable) { - QObject::connect(this,SIGNAL(rangeChanged(qreal,qreal)),this,SLOT(applyNiceNumbers())); - QObject::connect(this,SIGNAL(tickCountChanged(int)),this,SLOT(applyNiceNumbers())); - applyNiceNumbers(); - } - else { - QObject::disconnect(this,SIGNAL(rangeChanged(qreal,qreal)),this,SLOT(applyNiceNumbers())); - QObject::disconnect(this,SIGNAL(tickCountChanged(int)),this,SLOT(applyNiceNumbers())); - } - d->m_niceNumbersEnabled=enable; -} - -bool QValueAxis::niceNumbersEnabled() const -{ - Q_D(const QValueAxis); - qWarning() << "Deprecated; Using this function can lead to unexpected behavior. " \ - "Use applyNiceNumbers() instead."; - return d->m_niceNumbersEnabled; -} - void QValueAxis::setLabelFormat(const QString &format) { Q_D(QValueAxis); @@ -333,8 +297,7 @@ QValueAxisPrivate::QValueAxisPrivate(QValueAxis *q) m_max(0), m_tickCount(5), m_format(QString::null), - m_applying(false), - m_niceNumbersEnabled(false) + m_applying(false) { } diff --git a/src/charts/axis/valueaxis/qvalueaxis.h b/src/charts/axis/valueaxis/qvalueaxis.h index 1db434c..fad187a 100644 --- a/src/charts/axis/valueaxis/qvalueaxis.h +++ b/src/charts/axis/valueaxis/qvalueaxis.h @@ -29,7 +29,6 @@ class QT_CHARTS_EXPORT QValueAxis : public QAbstractAxis { Q_OBJECT Q_PROPERTY(int tickCount READ tickCount WRITE setTickCount NOTIFY tickCountChanged) - Q_PROPERTY(bool niceNumbersEnabled READ niceNumbersEnabled WRITE setNiceNumbersEnabled) Q_PROPERTY(qreal min READ min WRITE setMin NOTIFY minChanged) Q_PROPERTY(qreal max READ max WRITE setMax NOTIFY maxChanged) Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat NOTIFY labelFormatChanged) @@ -58,9 +57,6 @@ public: void setLabelFormat(const QString &format); QString labelFormat() const; - void setNiceNumbersEnabled(bool enable = true); - bool niceNumbersEnabled() const; - public Q_SLOTS: void applyNiceNumbers(); diff --git a/src/charts/axis/valueaxis/qvalueaxis_p.h b/src/charts/axis/valueaxis/qvalueaxis_p.h index ad2b00c..d32306e 100644 --- a/src/charts/axis/valueaxis/qvalueaxis_p.h +++ b/src/charts/axis/valueaxis/qvalueaxis_p.h @@ -44,8 +44,8 @@ public: void initializeGraphics(QGraphicsItem* parent); void initializeDomain(AbstractDomain *domain); - qreal min() { return m_min; }; - qreal max() { return m_max; }; + qreal min() { return m_min; } + qreal max() { return m_max; } void setRange(qreal min,qreal max); protected: @@ -59,7 +59,6 @@ private: int m_tickCount; QString m_format; bool m_applying; - bool m_niceNumbersEnabled; Q_DECLARE_PUBLIC(QValueAxis) }; diff --git a/src/charts/qchart.cpp b/src/charts/qchart.cpp index 726b5cc..99d4c60 100644 --- a/src/charts/qchart.cpp +++ b/src/charts/qchart.cpp @@ -102,14 +102,6 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \property QChart::minimumMargins - Minimum margins between the plot area (axes) and the edge of the chart widget. - This property is deprecated; use margins property instead. - - \sa margins - */ - -/*! \property QChart::margins Margins between the plot area (axes) and the edge of the chart widget. */ @@ -503,18 +495,6 @@ QLegend *QChart::legend() const return d_ptr->m_legend; } -void QChart::setMinimumMargins(const QMargins &margins) -{ - qWarning() << "QChart::setMinimumMargins is deprecated. Use QChart::setMargins instead."; - d_ptr->m_presenter->layout()->setMargins(margins); -} - -QMargins QChart::minimumMargins() const -{ - qWarning() << "QChart::minimumMargins is deprecated. Use QChart::margins instead."; - return d_ptr->m_presenter->layout()->margins(); -} - void QChart::setMargins(const QMargins &margins) { d_ptr->m_presenter->layout()->setMargins(margins); diff --git a/src/charts/qchart.h b/src/charts/qchart.h index ac9e989..1836f65 100644 --- a/src/charts/qchart.h +++ b/src/charts/qchart.h @@ -43,7 +43,6 @@ class QT_CHARTS_EXPORT QChart : public QGraphicsWidget Q_PROPERTY(bool dropShadowEnabled READ isDropShadowEnabled WRITE setDropShadowEnabled) Q_PROPERTY(qreal backgroundRoundness READ backgroundRoundness WRITE setBackgroundRoundness) Q_PROPERTY(QChart::AnimationOptions animationOptions READ animationOptions WRITE setAnimationOptions) - Q_PROPERTY(QMargins minimumMargins READ minimumMargins WRITE setMinimumMargins) Q_PROPERTY(QMargins margins READ margins WRITE setMargins) Q_PROPERTY(QChart::ChartType chartType READ chartType) Q_PROPERTY(bool plotAreaBackgroundVisible READ isPlotAreaBackgroundVisible WRITE setPlotAreaBackgroundVisible) @@ -139,9 +138,6 @@ public: QLegend *legend() const; - void setMinimumMargins(const QMargins& margins); - QMargins minimumMargins() const; - void setMargins(const QMargins &margins); QMargins margins() const; diff --git a/src/charts/qchartview.cpp b/src/charts/qchartview.cpp index 9826ab0..29762e8 100644 --- a/src/charts/qchartview.cpp +++ b/src/charts/qchartview.cpp @@ -29,7 +29,7 @@ \value NoRubberBand \value VerticalRubberBand - \value HorizonalRubberBand + \value HorizontalRubberBand \value RectangleRubberBand */ @@ -170,7 +170,7 @@ void QChartView::mouseMoveEvent(QMouseEvent *event) d_ptr->m_rubberBandOrigin.setY(rect.top()); height = rect.height(); } - if (!d_ptr->m_rubberBandFlags.testFlag(HorizonalRubberBand)) { + if (!d_ptr->m_rubberBandFlags.testFlag(HorizontalRubberBand)) { d_ptr->m_rubberBandOrigin.setX(rect.left()); width = rect.width(); } @@ -201,7 +201,7 @@ void QChartView::mouseReleaseEvent(QMouseEvent *event) if (d_ptr->m_rubberBandFlags == VerticalRubberBand) { rect.setX(d_ptr->m_chart->plotArea().x()); rect.setWidth(d_ptr->m_chart->plotArea().width()); - } else if (d_ptr->m_rubberBandFlags == HorizonalRubberBand) { + } else if (d_ptr->m_rubberBandFlags == HorizontalRubberBand) { rect.setY(d_ptr->m_chart->plotArea().y()); rect.setHeight(d_ptr->m_chart->plotArea().height()); } @@ -214,12 +214,12 @@ void QChartView::mouseReleaseEvent(QMouseEvent *event) // Since there is no suitable API for that, use zoomIn with rect bigger than the // plot area. if (d_ptr->m_rubberBandFlags == VerticalRubberBand - || d_ptr->m_rubberBandFlags == HorizonalRubberBand) { + || d_ptr->m_rubberBandFlags == HorizontalRubberBand) { QRectF rect = d_ptr->m_chart->plotArea(); if (d_ptr->m_rubberBandFlags == VerticalRubberBand) { qreal adjustment = rect.height() / 2; rect.adjust(0, -adjustment, 0, adjustment); - } else if (d_ptr->m_rubberBandFlags == HorizonalRubberBand) { + } else if (d_ptr->m_rubberBandFlags == HorizontalRubberBand) { qreal adjustment = rect.width() / 2; rect.adjust(-adjustment, 0, adjustment, 0); } diff --git a/src/charts/qchartview.h b/src/charts/qchartview.h index a8837c4..37c45d9 100644 --- a/src/charts/qchartview.h +++ b/src/charts/qchartview.h @@ -40,7 +40,7 @@ public: enum RubberBand { NoRubberBand = 0x0, VerticalRubberBand = 0x1, - HorizonalRubberBand = 0x2, + HorizontalRubberBand = 0x2, RectangleRubberBand = 0x3 }; diff --git a/src/chartsqml2/declarativechart.cpp b/src/chartsqml2/declarativechart.cpp index 55e39c3..3cbe157 100644 --- a/src/chartsqml2/declarativechart.cpp +++ b/src/chartsqml2/declarativechart.cpp @@ -132,40 +132,10 @@ QT_CHARTS_BEGIN_NAMESPACE */ /*! - \qmlproperty real ChartView::topMargin - Deprecated; use margins instead. -*/ - -/*! - \qmlproperty real ChartView::bottomMargin - Deprecated; use margins instead. -*/ - -/*! - \qmlproperty real ChartView::leftMargin - Deprecated; use margins instead. -*/ - -/*! - \qmlproperty real ChartView::rightMargin - Deprecated; use margins instead. -*/ - -/*! - \qmlproperty Margins ChartView::minimumMargins - Deprecated; use margins instead. - The minimum margins allowed between the outer bounds and the plotArea of the ChartView. Margins - area of ChartView is used for drawing title, axes and legend. Please note that setting the - properties of minimumMargins may be bigger than the defined value, depending on other ChartView - properties that affect it's layout. If you need to know the actual plotting area used at any - given time, you can check ChartView::plotArea instead. -*/ - -/*! \qmlproperty rect ChartView::plotArea The area on the ChartView that is used for drawing series. This is the ChartView rect without the margins. - \sa ChartView::minimumMargins + \sa ChartView::margins */ /*! @@ -314,10 +284,14 @@ void DeclarativeChart::initChart(QChart::ChartType type) m_margins->setLeft(m_chart->margins().left()); m_margins->setRight(m_chart->margins().right()); m_margins->setBottom(m_chart->margins().bottom()); - connect(m_margins, SIGNAL(topChanged(int,int,int,int)), this, SLOT(changeMinimumMargins(int,int,int,int))); - connect(m_margins, SIGNAL(bottomChanged(int,int,int,int)), this, SLOT(changeMinimumMargins(int,int,int,int))); - connect(m_margins, SIGNAL(leftChanged(int,int,int,int)), this, SLOT(changeMinimumMargins(int,int,int,int))); - connect(m_margins, SIGNAL(rightChanged(int,int,int,int)), this, SLOT(changeMinimumMargins(int,int,int,int))); + connect(m_margins, SIGNAL(topChanged(int,int,int,int)), + this, SLOT(changeMargins(int,int,int,int))); + connect(m_margins, SIGNAL(bottomChanged(int,int,int,int)), + this, SLOT(changeMargins(int,int,int,int))); + connect(m_margins, SIGNAL(leftChanged(int,int,int,int)), + this, SLOT(changeMargins(int,int,int,int))); + connect(m_margins, SIGNAL(rightChanged(int,int,int,int)), + this, SLOT(changeMargins(int,int,int,int))); connect(m_chart->d_ptr->m_dataset, SIGNAL(seriesAdded(QAbstractSeries*)), this, SLOT(handleSeriesAdded(QAbstractSeries*))); connect(m_chart->d_ptr->m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*)), this, SIGNAL(seriesRemoved(QAbstractSeries*))); connect(m_chart, &QChart::plotAreaChanged, this, &DeclarativeChart::plotAreaChanged); @@ -328,10 +302,10 @@ void DeclarativeChart::handleSeriesAdded(QAbstractSeries *series) emit seriesAdded(series); } -void DeclarativeChart::changeMinimumMargins(int top, int bottom, int left, int right) +void DeclarativeChart::changeMargins(int top, int bottom, int left, int right) { m_chart->setMargins(QMargins(left, top, right, bottom)); - emit minimumMarginsChanged(); + emit marginsChanged(); } DeclarativeChart::~DeclarativeChart() @@ -793,30 +767,6 @@ void DeclarativeChart::setBackgroundRoundness(qreal diameter) } } -qreal DeclarativeChart::topMargin() -{ - qWarning() << "ChartView.topMargin is deprecated. Use margins instead."; - return m_chart->margins().top(); -} - -qreal DeclarativeChart::bottomMargin() -{ - qWarning() << "ChartView.bottomMargin is deprecated. Use margins instead."; - return m_chart->margins().bottom(); -} - -qreal DeclarativeChart::leftMargin() -{ - qWarning() << "ChartView.leftMargin is deprecated. Use margins instead."; - return m_chart->margins().left(); -} - -qreal DeclarativeChart::rightMargin() -{ - qWarning() << "ChartView.rightMargin is deprecated. Use margins instead."; - return m_chart->margins().right(); -} - void DeclarativeChart::zoom(qreal factor) { m_chart->zoom(factor); @@ -995,11 +945,6 @@ void DeclarativeChart::setAxisY(QAbstractAxis *axis, QAbstractSeries *series) seriesAxisAttachHelper(series, axis, Qt::Vertical, Qt::AlignLeft); } -void DeclarativeChart::createDefaultAxes() -{ - qWarning() << "ChartView.createDefaultAxes() is deprecated. Axes are created automatically."; -} - QAbstractAxis *DeclarativeChart::defaultAxis(Qt::Orientation orientation, QAbstractSeries *series) { if (!series) { diff --git a/src/chartsqml2/declarativechart.h b/src/chartsqml2/declarativechart.h index 22f5677..a6e7b61 100644 --- a/src/chartsqml2/declarativechart.h +++ b/src/chartsqml2/declarativechart.h @@ -47,11 +47,6 @@ class DeclarativeChart : public QQuickPaintedItem Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged) Q_PROPERTY(bool dropShadowEnabled READ dropShadowEnabled WRITE setDropShadowEnabled NOTIFY dropShadowEnabledChanged) Q_PROPERTY(qreal backgroundRoundness READ backgroundRoundness WRITE setBackgroundRoundness NOTIFY backgroundRoundnessChanged REVISION 3) - Q_PROPERTY(qreal topMargin READ topMargin) - Q_PROPERTY(qreal bottomMargin READ bottomMargin) - Q_PROPERTY(qreal leftMargin READ leftMargin) - Q_PROPERTY(qreal rightMargin READ rightMargin) - Q_PROPERTY(DeclarativeMargins *minimumMargins READ minimumMargins NOTIFY minimumMarginsChanged REVISION 1) Q_PROPERTY(DeclarativeMargins *margins READ margins NOTIFY marginsChanged REVISION 2) Q_PROPERTY(QRectF plotArea READ plotArea NOTIFY plotAreaChanged REVISION 1) Q_PROPERTY(QColor plotAreaColor READ plotAreaColor WRITE setPlotAreaColor NOTIFY plotAreaColorChanged REVISION 3) @@ -144,11 +139,6 @@ public: void setBackgroundRoundness(qreal diameter); // Margins & plotArea - qreal topMargin(); - qreal bottomMargin(); - qreal leftMargin(); - qreal rightMargin(); - DeclarativeMargins *minimumMargins() { return m_margins; } DeclarativeMargins *margins() { return m_margins; } QRectF plotArea() { return m_chart->plotArea(); } @@ -170,7 +160,6 @@ public: Q_INVOKABLE void removeAllSeries() { m_chart->removeAllSeries(); } Q_INVOKABLE void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = 0); Q_INVOKABLE void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = 0); - Q_INVOKABLE void createDefaultAxes(); Q_INVOKABLE QAbstractAxis *axisX(QAbstractSeries *series = 0); Q_INVOKABLE QAbstractAxis *axisY(QAbstractSeries *series = 0); Q_INVOKABLE void zoom(qreal factor); @@ -184,7 +173,6 @@ Q_SIGNALS: void titleColorChanged(QColor color); void backgroundColorChanged(); void dropShadowEnabledChanged(bool enabled); - void minimumMarginsChanged(); Q_REVISION(2) void marginsChanged(); void plotAreaChanged(QRectF plotArea); void seriesAdded(QAbstractSeries *series); @@ -195,7 +183,7 @@ Q_SIGNALS: Q_REVISION(4) void localeChanged(); private Q_SLOTS: - void changeMinimumMargins(int top, int bottom, int left, int right); + void changeMargins(int top, int bottom, int left, int right); void handleAxisXSet(QAbstractAxis *axis); void handleAxisYSet(QAbstractAxis *axis); void handleAxisXTopSet(QAbstractAxis *axis); diff --git a/src/chartsqml2/plugins.qmltypes b/src/chartsqml2/plugins.qmltypes index c3db999..b7d9665 100644 --- a/src/chartsqml2/plugins.qmltypes +++ b/src/chartsqml2/plugins.qmltypes @@ -522,17 +522,6 @@ Module { Property { name: "backgroundColor"; type: "QColor" } Property { name: "dropShadowEnabled"; type: "bool" } Property { name: "backgroundRoundness"; revision: 3; type: "double" } - Property { name: "topMargin"; type: "double"; isReadonly: true } - Property { name: "bottomMargin"; type: "double"; isReadonly: true } - Property { name: "leftMargin"; type: "double"; isReadonly: true } - Property { name: "rightMargin"; type: "double"; isReadonly: true } - Property { - name: "minimumMargins" - revision: 1 - type: "DeclarativeMargins" - isReadonly: true - isPointer: true - } Property { name: "margins" revision: 2 @@ -634,7 +623,6 @@ Module { name: "setAxisY" Parameter { name: "axis"; type: "QAbstractAxis"; isPointer: true } } - Method { name: "createDefaultAxes" } Method { name: "axisX" type: "QAbstractAxis*" @@ -1500,7 +1488,6 @@ Module { Property { name: "linePen"; type: "QPen" } Property { name: "color"; type: "QColor" } Property { name: "labelsVisible"; type: "bool" } - Property { name: "labelsPen"; type: "QPen" } Property { name: "labelsBrush"; type: "QBrush" } Property { name: "labelsAngle"; type: "int" } Property { name: "labelsFont"; type: "QFont" } @@ -1513,7 +1500,6 @@ Module { Property { name: "shadesPen"; type: "QPen" } Property { name: "shadesBrush"; type: "QBrush" } Property { name: "titleText"; type: "string" } - Property { name: "titlePen"; type: "QPen" } Property { name: "titleBrush"; type: "QBrush" } Property { name: "titleVisible"; type: "bool" } Property { name: "titleFont"; type: "QFont" } @@ -1536,10 +1522,6 @@ Module { Parameter { name: "visible"; type: "bool" } } Signal { - name: "labelsPenChanged" - Parameter { name: "pen"; type: "QPen" } - } - Signal { name: "labelsBrushChanged" Parameter { name: "brush"; type: "QBrush" } } @@ -1572,10 +1554,6 @@ Module { Parameter { name: "title"; type: "string" } } Signal { - name: "titlePenChanged" - Parameter { name: "pen"; type: "QPen" } - } - Signal { name: "titleBrushChanged" Parameter { name: "brush"; type: "QBrush" } } @@ -2297,7 +2275,6 @@ Module { ] exportMetaObjectRevisions: [0, 0, 0] Property { name: "tickCount"; type: "int" } - Property { name: "niceNumbersEnabled"; type: "bool" } Property { name: "min"; type: "double" } Property { name: "max"; type: "double" } Property { name: "labelFormat"; type: "string" } diff --git a/tests/auto/qabstractaxis/tst_qabstractaxis.cpp b/tests/auto/qabstractaxis/tst_qabstractaxis.cpp index 44b65d2..df7ee49 100644 --- a/tests/auto/qabstractaxis/tst_qabstractaxis.cpp +++ b/tests/auto/qabstractaxis/tst_qabstractaxis.cpp @@ -56,7 +56,6 @@ void tst_QAbstractAxis::qabstractaxis() QCOMPARE(m_axis->labelsAngle(), 0); QCOMPARE(m_axis->labelsBrush(), QBrush()); QCOMPARE(m_axis->labelsFont(), QFont()); - QCOMPARE(m_axis->labelsPen(), QPen()); QCOMPARE(m_axis->labelsVisible(), true); QCOMPARE(m_axis->orientation(), Qt::Orientation(0)); m_axis->setLineVisible(false); @@ -68,7 +67,6 @@ void tst_QAbstractAxis::qabstractaxis() m_axis->setLabelsBrush(QBrush()); m_axis->setLabelsColor(QColor()); m_axis->setLabelsFont(QFont()); - m_axis->setLabelsPen(QPen()); m_axis->setLabelsVisible(false); m_axis->setMax(QVariant()); m_axis->setMin(QVariant()); @@ -443,48 +441,6 @@ void tst_QAbstractAxis::labelsFont() } -void tst_QAbstractAxis::labelsPen_data() -{ - QTest::addColumn("labelsPen"); - QTest::newRow("null") << QPen(); - QTest::newRow("blue") << QPen(Qt::blue); - QTest::newRow("black") << QPen(Qt::black); - QTest::newRow("red") << QPen(Qt::red); -} - -void tst_QAbstractAxis::labelsPen() -{ - QFETCH(QPen, labelsPen); - - QSignalSpy spy0(m_axis, SIGNAL(lineVisibleChanged(bool))); - QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - - m_axis->setLabelsPen(labelsPen); - QCOMPARE(m_axis->labelsPen(), labelsPen); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); - - m_chart->setAxisX(m_axis, m_series); - m_view->show(); - QTest::qWaitForWindowShown(m_view); - //TODO QCOMPARE(m_axis->labelsPen(), labelsPen); -} - void tst_QAbstractAxis::labelsVisible_data() { QTest::addColumn("labelsVisible"); diff --git a/tests/auto/qabstractaxis/tst_qabstractaxis.h b/tests/auto/qabstractaxis/tst_qabstractaxis.h index 68b29ef..72b3f7a 100644 --- a/tests/auto/qabstractaxis/tst_qabstractaxis.h +++ b/tests/auto/qabstractaxis/tst_qabstractaxis.h @@ -57,8 +57,6 @@ private slots: void labelsColor(); void labelsFont_data(); void labelsFont(); - void labelsPen_data(); - void labelsPen(); void labelsVisible_data(); void labelsVisible(); void orientation_data(); diff --git a/tests/auto/qchartview/tst_qchartview.cpp b/tests/auto/qchartview/tst_qchartview.cpp index 42dc937..14ab9db 100644 --- a/tests/auto/qchartview/tst_qchartview.cpp +++ b/tests/auto/qchartview/tst_qchartview.cpp @@ -120,11 +120,11 @@ void tst_QChartView::rubberBand_data() QTest::addColumn("max"); if (isPolarTest()) { - QTest::newRow("HorizonalRubberBand") << QChartView::RubberBands(QChartView::HorizonalRubberBand) << 0 << 0 << QPoint(5,5) << QPoint(5,5); + QTest::newRow("HorizontalRubberBand") << QChartView::RubberBands(QChartView::HorizontalRubberBand) << 0 << 0 << QPoint(5,5) << QPoint(5,5); QTest::newRow("VerticalRubberBand") << QChartView::RubberBands(QChartView::VerticalRubberBand) << 0 << 0 << QPoint(5,5) << QPoint(5,5); QTest::newRow("RectangleRubberBand") << QChartView::RubberBands(QChartView::RectangleRubberBand) << 0 << 0 << QPoint(5,5) << QPoint(5,5); } else { - QTest::newRow("HorizonalRubberBand") << QChartView::RubberBands(QChartView::HorizonalRubberBand) << 0 << 1 << QPoint(5,5) << QPoint(5,5); + QTest::newRow("HorizontalRubberBand") << QChartView::RubberBands(QChartView::HorizontalRubberBand) << 0 << 1 << QPoint(5,5) << QPoint(5,5); QTest::newRow("VerticalRubberBand") << QChartView::RubberBands(QChartView::VerticalRubberBand) << 1 << 0 << QPoint(5,5) << QPoint(5,5); QTest::newRow("RectangleRubberBand") << QChartView::RubberBands(QChartView::RectangleRubberBand) << 1 << 1 << QPoint(5,5) << QPoint(5,5); } diff --git a/tests/auto/qml-qtquicktest/tst_chartview_1_1.qml b/tests/auto/qml-qtquicktest/tst_chartview_1_1.qml index e823610..f485aad 100644 --- a/tests/auto/qml-qtquicktest/tst_chartview_1_1.qml +++ b/tests/auto/qml-qtquicktest/tst_chartview_1_1.qml @@ -32,10 +32,6 @@ Rectangle { function test_chartViewProperties() { compare(chartView.animationOptions, ChartView.NoAnimation, "ChartView.animationOptions"); verify(chartView.backgroundColor != undefined); - verify(chartView.bottomMargin > 0, "ChartView.bottomMargin"); - verify(chartView.topMargin > 0, "ChartView.topMargin"); - verify(chartView.leftMargin > 0, "ChartView.leftMargin"); - verify(chartView.rightMargin > 0, "ChartView.rightMargin"); compare(chartView.count, 0, "ChartView.count"); compare(chartView.dropShadowEnabled, false, "ChartView.dropShadowEnabled"); verify(chartView.plotArea.height > 0, "ChartView.plotArea.height"); diff --git a/tests/auto/qvalueaxis/tst_qvalueaxis.cpp b/tests/auto/qvalueaxis/tst_qvalueaxis.cpp index 66b7af3..024de09 100644 --- a/tests/auto/qvalueaxis/tst_qvalueaxis.cpp +++ b/tests/auto/qvalueaxis/tst_qvalueaxis.cpp @@ -103,7 +103,6 @@ void tst_QValueAxis::qvalueaxis() QVERIFY(qFuzzyCompare(m_valuesaxis->max(), 0)); QVERIFY(qFuzzyCompare(m_valuesaxis->min(), 0)); - QCOMPARE(m_valuesaxis->niceNumbersEnabled(), false); QCOMPARE(m_valuesaxis->tickCount(), 5); QCOMPARE(m_valuesaxis->type(), QAbstractAxis::AxisTypeValue); @@ -113,7 +112,6 @@ void tst_QValueAxis::qvalueaxis() QVERIFY(!qFuzzyCompare(m_valuesaxis->max(), 0)); QVERIFY(!qFuzzyCompare(m_valuesaxis->min(), 0)); - QCOMPARE(m_valuesaxis->niceNumbersEnabled(), false); QCOMPARE(m_valuesaxis->tickCount(), 5); } diff --git a/tests/manual/chartwidgettest/mainwidget.cpp b/tests/manual/chartwidgettest/mainwidget.cpp index 318710d..f761e42 100644 --- a/tests/manual/chartwidgettest/mainwidget.cpp +++ b/tests/manual/chartwidgettest/mainwidget.cpp @@ -68,7 +68,7 @@ MainWidget::MainWidget(QWidget *parent) : // Create chart view with the chart m_chartView = new QChartView(m_chart, this); - m_chartView->setRubberBand(QChartView::HorizonalRubberBand); + m_chartView->setRubberBand(QChartView::HorizontalRubberBand); // Another grid layout as a main layout QGridLayout *mainLayout = new QGridLayout(); diff --git a/tests/manual/polarcharttest/mainwindow.cpp b/tests/manual/polarcharttest/mainwindow.cpp index bb7e1ef..a38efbc 100644 --- a/tests/manual/polarcharttest/mainwindow.cpp +++ b/tests/manual/polarcharttest/mainwindow.cpp @@ -60,8 +60,6 @@ MainWindow::MainWindow(QWidget *parent) : m_plotAreaBackgroundBrush(new QBrush(Qt::NoBrush)), m_angularShadesPen(new QPen(Qt::NoPen)), m_radialShadesPen(new QPen(Qt::NoPen)), - m_labelPen(new QPen(Qt::NoPen)), - m_titlePen(new QPen(Qt::NoPen)), m_gridPen(new QPen(QRgb(0x010101))), // Note: Pure black is default color, so it gets overridden by m_arrowPen(new QPen(QRgb(0x010101))), // default theme if set to that initially. This is an example of workaround. m_backgroundPen(new QPen(Qt::NoPen)), @@ -429,14 +427,12 @@ void MainWindow::setAngularAxis(MainWindow::AxisMode mode) m_angularAxis->setLabelsAngle(m_labelsAngle); m_angularAxis->setLabelsFont(m_currentLabelFont); m_angularAxis->setLabelsBrush(*m_labelBrush); - m_angularAxis->setLabelsPen(*m_labelPen); m_angularAxis->setLabelsVisible(m_labelsVisible); m_angularAxis->setShadesBrush(*m_angularShadesBrush); m_angularAxis->setShadesPen(*m_angularShadesPen); m_angularAxis->setShadesVisible(m_angularShadesVisible); m_angularAxis->setTitleFont(m_currentTitleFont); m_angularAxis->setTitleBrush(*m_titleBrush); - m_angularAxis->setTitlePen(*m_titlePen); m_angularAxis->setTitleVisible(m_titleVisible); m_angularAxis->setTitleText(m_angularTitle); m_angularAxis->setGridLinePen(*m_gridPen); @@ -499,14 +495,12 @@ void MainWindow::setRadialAxis(MainWindow::AxisMode mode) m_radialAxis->setLabelsAngle(m_labelsAngle); m_radialAxis->setLabelsFont(m_currentLabelFont); m_radialAxis->setLabelsBrush(*m_labelBrush); - m_radialAxis->setLabelsPen(*m_labelPen); m_radialAxis->setLabelsVisible(m_labelsVisible); m_radialAxis->setShadesBrush(*m_radialShadesBrush); m_radialAxis->setShadesPen(*m_radialShadesPen); m_radialAxis->setShadesVisible(m_radialShadesVisible); m_radialAxis->setTitleFont(m_currentTitleFont); m_radialAxis->setTitleBrush(*m_titleBrush); - m_radialAxis->setTitlePen(*m_titlePen); m_radialAxis->setTitleVisible(m_titleVisible); m_radialAxis->setTitleText(m_radialTitle); m_radialAxis->setGridLinePen(*m_gridPen); @@ -750,22 +744,18 @@ void MainWindow::animationIndexChanged(int index) void MainWindow::labelsIndexChanged(int index) { delete m_labelBrush; - delete m_labelPen; switch (index) { case 0: m_labelBrush = new QBrush(Qt::NoBrush); - m_labelPen = new QPen(Qt::NoPen); m_labelsVisible = false; break; case 1: m_labelBrush = new QBrush(Qt::black); - m_labelPen = new QPen(Qt::NoPen); m_labelsVisible = true; break; case 2: m_labelBrush = new QBrush(Qt::white); - m_labelPen = new QPen(Qt::blue); m_labelsVisible = true; break; default: @@ -773,50 +763,42 @@ void MainWindow::labelsIndexChanged(int index) } m_radialAxis->setLabelsBrush(*m_labelBrush); - m_radialAxis->setLabelsPen(*m_labelPen); m_radialAxis->setLabelsVisible(m_labelsVisible); m_angularAxis->setLabelsBrush(*m_labelBrush); - m_angularAxis->setLabelsPen(*m_labelPen); m_angularAxis->setLabelsVisible(m_labelsVisible); } void MainWindow::titleIndexChanged(int index) { delete m_titleBrush; - delete m_titlePen; switch (index) { case 0: m_titleBrush = new QBrush(Qt::NoBrush); - m_titlePen = new QPen(Qt::NoPen); m_titleVisible = false; m_angularTitle = QString(); m_radialTitle = QString(); break; case 1: m_titleBrush = new QBrush(Qt::NoBrush); - m_titlePen = new QPen(Qt::NoPen); m_titleVisible = true; m_angularTitle = QString(); m_radialTitle = QString(); break; case 2: m_titleBrush = new QBrush(Qt::NoBrush); - m_titlePen = new QPen(Qt::NoPen); m_titleVisible = false; m_angularTitle = QString("Invisible Ang. Title!"); m_radialTitle = QString("Invisible Rad. Title!"); break; case 3: m_titleBrush = new QBrush(Qt::black); - m_titlePen = new QPen(Qt::NoPen); m_titleVisible = true; m_angularTitle = QString("Angular Title"); m_radialTitle = QString("Radial Title"); break; case 4: m_titleBrush = new QBrush(Qt::white); - m_titlePen = new QPen(Qt::blue); m_titleVisible = true; m_angularTitle = QString("Angular Blue Title"); m_radialTitle = QString("Radial Blue Title"); @@ -826,11 +808,9 @@ void MainWindow::titleIndexChanged(int index) } m_radialAxis->setTitleBrush(*m_titleBrush); - m_radialAxis->setTitlePen(*m_titlePen); m_radialAxis->setTitleVisible(m_titleVisible); m_radialAxis->setTitleText(m_radialTitle); m_angularAxis->setTitleBrush(*m_titleBrush); - m_angularAxis->setTitlePen(*m_titlePen); m_angularAxis->setTitleVisible(m_titleVisible); m_angularAxis->setTitleText(m_angularTitle); } diff --git a/tests/manual/polarcharttest/mainwindow.h b/tests/manual/polarcharttest/mainwindow.h index 693a224..237e262 100644 --- a/tests/manual/polarcharttest/mainwindow.h +++ b/tests/manual/polarcharttest/mainwindow.h @@ -125,8 +125,6 @@ private: QBrush *m_plotAreaBackgroundBrush; QPen *m_angularShadesPen; QPen *m_radialShadesPen; - QPen *m_labelPen; - QPen *m_titlePen; QPen *m_gridPen; QPen *m_arrowPen; QPen *m_backgroundPen; diff --git a/tests/manual/qmlchartaxis/qml/qmlchartaxis/Legacy.qml b/tests/manual/qmlchartaxis/qml/qmlchartaxis/Legacy.qml deleted file mode 100644 index 7649f1c..0000000 --- a/tests/manual/qmlchartaxis/qml/qmlchartaxis/Legacy.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.io -** -** This file is part of the Qt Charts module. -** -** Licensees holding valid commercial license for Qt may use this file in -** accordance with the Qt License Agreement provided with the Software -** or, alternatively, in accordance with the terms contained in a written -** agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.io -** -****************************************************************************/ - -import QtQuick 2.0 -import QtCharts 2.0 - -ChartView { - id: chartView - title: "Deprecated code" - property int index: 0 - - Component.onCompleted: { - // Calling createDefaultAxes in onCompleted is now deprecated. It needs to be tested, - // though, because some application may still use it - chartView.createDefaultAxes(); - } - - LineSeries { - name: "line series" - XYPoint { x: 0; y: 0 } - XYPoint { x: 1; y: 1 } - XYPoint { x: 2; y: 2 } - XYPoint { x: 3; y: 3 } - XYPoint { x: 4; y: 4 } - } - - ScatterSeries { - name: "scatter series" - XYPoint { x: 0; y: 0 } - XYPoint { x: 0.5; y: 1 } - XYPoint { x: 1; y: 2 } - XYPoint { x: 1.5; y: 3 } - XYPoint { x: 2; y: 4 } - XYPoint { x: 1; y: 1 } - XYPoint { x: 2; y: 2 } - XYPoint { x: 3; y: 3 } - XYPoint { x: 4; y: 4 } - } -} diff --git a/tests/manual/qmlchartaxis/qml/qmlchartaxis/main.qml b/tests/manual/qmlchartaxis/qml/qmlchartaxis/main.qml index 4b6bc30..52b11c5 100644 --- a/tests/manual/qmlchartaxis/qml/qmlchartaxis/main.qml +++ b/tests/manual/qmlchartaxis/qml/qmlchartaxis/main.qml @@ -85,10 +85,6 @@ Rectangle { text: "Default + User defined" onClicked: viewName = "DefaultAndUserDefined"; } - Button { - text: "Legacy" - onClicked: viewName = "Legacy"; - } } } } diff --git a/tests/manual/qmlchartaxis/resources.qrc b/tests/manual/qmlchartaxis/resources.qrc index 2f9f4b6..260f3b1 100644 --- a/tests/manual/qmlchartaxis/resources.qrc +++ b/tests/manual/qmlchartaxis/resources.qrc @@ -13,6 +13,5 @@ qml/qmlchartaxis/CreatingDynamically.qml qml/qmlchartaxis/SwitchingDynamically.qml qml/qmlchartaxis/DefaultAndUserDefined.qml - qml/qmlchartaxis/Legacy.qml diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/Chart.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/Chart.qml index acfbdab..6767b3b 100644 --- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/Chart.qml +++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/Chart.qml @@ -95,10 +95,10 @@ ChartView { color: "transparent" border.color: "red" anchors.fill: parent - anchors.topMargin: chartView.minimumMargins.top - anchors.bottomMargin: chartView.minimumMargins.bottom - anchors.leftMargin: chartView.minimumMargins.left - anchors.rightMargin: chartView.minimumMargins.right + anchors.topMargin: chartView.margins.top + anchors.bottomMargin: chartView.margins.bottom + anchors.leftMargin: chartView.margins.left + anchors.rightMargin: chartView.margins.right opacity: 0.0 onOpacityChanged: if (opacity > 0.9) opacity = 0.0; Behavior on opacity { diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml index ab2cdeb..1ea2f53 100644 --- a/tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml +++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/ChartEditorAxis.qml @@ -105,10 +105,6 @@ Row { onClicked: axis.tickCount--; } - Button { - text: "axis nice nmb" - onClicked: axis.niceNumbersEnabled = !axis.niceNumbersEnabled; - } FontEditor { id: fontEditor