From 658bb1d8ea02be9552650efa6996fbc7501bd4a1 2012-06-26 10:13:41 From: Tero Ahola Date: 2012-06-26 10:13:41 Subject: [PATCH] QML signals documentation --- diff --git a/plugins/declarative/declarativechart.cpp b/plugins/declarative/declarativechart.cpp index d6448bb..9709595 100644 --- a/plugins/declarative/declarativechart.cpp +++ b/plugins/declarative/declarativechart.cpp @@ -185,6 +185,30 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa Axis::min, Axis::max */ +/*! + \qmlsignal ChartView::onTopMarginChanged(real margin) + The top margin of the chart view has changed to \a margin. This may happen for example if you modify font size + related properties of the legend or chart title. +*/ + +/*! + \qmlsignal ChartView::onBottomMarginChanged(real margin) + The bottom margin of the chart view has changed to \a margin. This may happen for example if you modify font size + related properties of the legend or chart title. +*/ + +/*! + \qmlsignal ChartView::onLeftMarginChanged(real margin) + The left margin of the chart view has changed to \a margin. This may happen for example if you modify font size + related properties of the legend or chart title. +*/ + +/*! + \qmlsignal ChartView::onRightMarginChanged(real margin) + The right margin of the chart view has changed to \a margin. This may happen for example if you modify font size + related properties of the legend or chart title. +*/ + DeclarativeChart::DeclarativeChart(QDeclarativeItem *parent) : QDeclarativeItem(parent), m_chart(new QChart(this)) diff --git a/src/areachart/qareaseries.cpp b/src/areachart/qareaseries.cpp index d3101e4..fc1de3a 100644 --- a/src/areachart/qareaseries.cpp +++ b/src/areachart/qareaseries.cpp @@ -113,7 +113,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \brief Signal is emitted when the fill (brush) color has changed to \a color. */ /*! - \qmlsignal AreaSeries::colorChanged(color color) + \qmlsignal AreaSeries::onColorChanged(color color) Signal is emitted when the fill (brush) color has changed to \a color. */ @@ -122,7 +122,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \brief Signal is emitted when the line (pen) color has changed to \a color. */ /*! - \qmlsignal AreaSeries::borderColorChanged(color color) + \qmlsignal AreaSeries::onBorderColorChanged(color color) Signal is emitted when the line (pen) color has changed to \a color. */ @@ -131,7 +131,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \brief Signal is emitted when user clicks the \a point on area chart. */ /*! - \qmlsignal AreaSeries::clicked(QPointF point) + \qmlsignal AreaSeries::onClicked(QPointF point) Signal is emitted when user clicks the \a point on area chart. */ @@ -141,7 +141,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE implemented by the user of QAreaSeries API. */ /*! - \qmlsignal AreaSeries::selected() + \qmlsignal AreaSeries::onSelected() The signal is emitted if the user selects/deselects the XY series. The logic for maintaining selections should be implemented by the user of AreaSeries API. */ diff --git a/src/axis/qaxis.cpp b/src/axis/qaxis.cpp index 88c6327..517f1c0 100644 --- a/src/axis/qaxis.cpp +++ b/src/axis/qaxis.cpp @@ -202,16 +202,31 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \fn void QAxis::minChanged(qreal min) Axis emits signal when \a min of axis has changed. */ +/*! + \qmlsignal Axis::onMinChanged(real min) + Axis emits signal when \a min of axis has changed. This may happen for example if you zoom, scroll or + enable nice numbers algorithm. +*/ /*! \fn void QAxis::maxChanged(qreal max) Axis emits signal when \a max of axis has changed. */ +/*! + \qmlsignal Axis::onMaxChanged(real max) + Axis emits signal when \a max of axis has changed. This may happen for example if you zoom, scroll or + enable nice numbers algorithm. +*/ /*! \fn void QAxis::rangeChanged(qreal min, qreal max) Axis emits signal when \a min or \a max of axis has changed. */ +/*! + \qmlsignal Axis::onRangeChanged(real min, real max) + Axis emits signal when \a min or \a max of axis has changed. This may happen for example if you zoom, scroll or + enable nice numbers algorithm. +*/ /*! \fn QChartAxisCategories* QAxis::categories() diff --git a/src/barchart/qbarseries.cpp b/src/barchart/qbarseries.cpp index f39ac83..6a7c57d 100644 --- a/src/barchart/qbarseries.cpp +++ b/src/barchart/qbarseries.cpp @@ -94,13 +94,11 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! \fn void QBarSeries::clicked(QBarSet *barset, int index) - The signal is emitted if the user clicks with a mouse on top of QBarSet \a barset. Clicked bar inside set is indexed by \a index */ /*! \qmlsignal BarSeries::onClicked(BarSet barset, int index) - The signal is emitted if the user clicks with a mouse on top of BarSet. Clicked bar inside set is indexed by \a index */ @@ -125,7 +123,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE This signal is emitted when barset count has been changed, for example by append or remove. */ /*! - \qmlsignal BarSeries::countChanged() + \qmlsignal BarSeries::onCountChanged() This signal is emitted when barset count has been changed, for example by append or remove. */ @@ -141,7 +139,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa append(), insert() */ /*! - \qmlsignal BarSeries::added(BarSet barset) + \qmlsignal BarSeries::onAdded(BarSet barset) Emitted when \a barset has been added to the series. */ @@ -151,7 +149,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa remove() */ /*! - \qmlsignal BarSeries::removed(BarSet barset) + \qmlsignal BarSeries::onRemoved(BarSet barset) Emitted when \a barset has been removed from the series. */ diff --git a/src/barchart/qbarset.cpp b/src/barchart/qbarset.cpp index 5269e51..9a89351 100644 --- a/src/barchart/qbarset.cpp +++ b/src/barchart/qbarset.cpp @@ -129,6 +129,10 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE This signal is emitted when the label of the barSet has changed. \sa label */ +/*! + \qmlsignal BarSet::onLabelChanged() + This signal is emitted when the label of the barSet has changed. +*/ /*! \fn void QBarSet::penChanged() diff --git a/src/piechart/qpieseries.cpp b/src/piechart/qpieseries.cpp index 3d22637..fdd1acb 100644 --- a/src/piechart/qpieseries.cpp +++ b/src/piechart/qpieseries.cpp @@ -201,11 +201,13 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! \fn void QPieSeries::countChanged() - Emitted when the slice count has changed. - \sa count */ +/*! + \qmlsignal PieSeries::onCountChanged() + Emitted when the slice count has changed. +*/ /*! \property QPieSeries::sum @@ -225,11 +227,14 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! \fn void QPieSeries::sumChanged() - Emitted when the sum of all slices has changed. - \sa sum */ +/*! + \qmlsignal PieSeries::onSumChanged() + Emitted when the sum of all slices has changed. This may happen for example if you add or remove slices, or if you + change value of a slice. +*/ /*! \fn void QPieSeries::added(QList slices) @@ -239,7 +244,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa append(), insert() */ /*! - \qmlsignal PieSeries::added(PieSlice slice) + \qmlsignal PieSeries::onAdded(PieSlice slice) Emitted when \a slice has been added to the series. */ @@ -249,27 +254,31 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa remove() */ /*! - \qmlsignal PieSeries::removed(PieSlice slice) + \qmlsignal PieSeries::onRemoved(PieSlice slice) Emitted when \a slice has been removed from the series. */ /*! \fn void QPieSeries::clicked(QPieSlice* slice) - This signal is emitted when a \a slice has been clicked. - \sa QPieSlice::clicked() */ +/*! + \qmlsignal PieSeries::onClicked(PieSlice slice) + This signal is emitted when a \a slice has been clicked. +*/ /*! \fn void QPieSeries::hovered(QPieSlice* slice, bool state) - This signal is emitted when user has hovered over or away from the \a slice. - \a state is true when user has hovered over the slice and false when hover has moved away from the slice. - \sa QPieSlice::hovered() */ +/*! + \qmlsignal PieSeries::onHovered(PieSlice slice, bool state) + This signal is emitted when user has hovered over or away from the \a slice. \a state is true when user has hovered + over the slice and false when hover has moved away from the slice. +*/ /*! \qmlmethod PieSlice PieSeries::at(int index) diff --git a/src/piechart/qpieslice.cpp b/src/piechart/qpieslice.cpp index 0c91983..aa4cc3d 100644 --- a/src/piechart/qpieslice.cpp +++ b/src/piechart/qpieslice.cpp @@ -80,7 +80,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa label */ /*! - \qmlsignal PieSlice::labelChanged() + \qmlsignal PieSlice::onLabelChanged() This signal emitted when the slice label has been changed. \sa label */ @@ -102,7 +102,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa value */ /*! - \qmlsignal PieSlice::valueChanged() + \qmlsignal PieSlice::onValueChanged() This signal is emitted when the slice value changes. \sa value */ @@ -123,7 +123,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa labelVisible */ /*! - \qmlsignal PieSlice::labelVisibleChanged() + \qmlsignal PieSlice::onLabelVisibleChanged() This signal emitted when visibility of the slice label has changed. \sa labelVisible */ @@ -168,7 +168,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa pen, borderColor */ /*! - \qmlsignal PieSlice::borderColorChanged() + \qmlsignal PieSlice::onBorderColorChanged() This signal is emitted when slice border color changes. \sa borderColor */ @@ -192,7 +192,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa pen, borderWidth */ /*! - \qmlsignal PieSlice::borderWidthChanged() + \qmlsignal PieSlice::onBorderWidthChanged() This signal is emitted when slice border width changes. \sa borderWidth */ @@ -225,7 +225,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa brush */ /*! - \qmlsignal PieSlice::colorChanged() + \qmlsignal PieSlice::onColorChanged() This signal is emitted when slice color changes. */ @@ -258,7 +258,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa labelColor */ /*! - \qmlsignal PieSlice::labelColorChanged() + \qmlsignal PieSlice::onLabelColorChanged() This signal is emitted when slice label color changes. \sa labelColor */ @@ -354,7 +354,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa percentage */ /*! - \qmlsignal void PieSlice::percentageChanged() + \qmlsignal void PieSlice::onPercentageChanged() This signal is emitted when the percentage of the slice has changed. \sa percentage */ @@ -378,7 +378,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa startAngle */ /*! - \qmlsignal PieSlice::startAngleChanged() + \qmlsignal PieSlice::onStartAngleChanged() This signal is emitted when the starting angle f the slice has changed. \sa startAngle */ @@ -402,7 +402,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa angleSpan */ /*! - \qmlsignal PieSlice::angleSpanChanged() + \qmlsignal PieSlice::onAngleSpanChanged() This signal is emitted when the angle span of the slice has changed. \sa angleSpan */ diff --git a/src/xychart/qxyseries.cpp b/src/xychart/qxyseries.cpp index 6ce6ecc..fe76a5f 100644 --- a/src/xychart/qxyseries.cpp +++ b/src/xychart/qxyseries.cpp @@ -92,7 +92,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa replace() */ /*! - \qmlsignal XYSeries::pointReplaced(int index) + \qmlsignal XYSeries::onPointReplaced(int index) Signal is emitted when a point has been replaced at \a index. */ @@ -102,7 +102,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa append(), insert() */ /*! - \qmlsignal XYSeries::pointAdded(int index) + \qmlsignal XYSeries::onPointAdded(int index) Signal is emitted when a point has been added at \a index. */ @@ -112,7 +112,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \sa remove() */ /*! - \qmlsignal XYSeries::pointRemoved(int index) + \qmlsignal XYSeries::onPointRemoved(int index) Signal is emitted when a point has been removed from \a index. */ @@ -121,7 +121,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \brief Signal is emitted when the line (pen) color has changed to \a color. */ /*! - \qmlsignal XYSeries::colorChanged(QColor color) + \qmlsignal XYSeries::onColorChanged(color color) Signal is emitted when the line (pen) color has changed to \a color. */