summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorTitta Heikkala <titta.heikkala@digia.com>2013-10-23 14:55:35 +0300
committerTitta Heikkala <titta.heikkala@digia.com>2013-10-28 10:19:05 +0200
commit2ce3423968b53608871b5fd75c202c0699f569b4 (patch)
tree2dbc27f2e1ef877de545d5c105d224180d6b1f79 /plugins
parentc98d8af1763df3e8f3c2b8b2117ebcd882b6b16d (diff)
Fix Charts documentation
The documentation structure is changed so that it can be generated with both Qt5 and Qt4. Also the erroneous VBarModelMapper is removed from VBoxPlotModelMapper documentation. Task-number: QTRD-2492, QTRD-2495 Change-Id: I45028915ca55f6ff1170db58518a8f08ac4158fb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/declarative/declarativeboxplotseries.cpp62
-rw-r--r--plugins/declarative/declarativecategoryaxis.cpp13
-rw-r--r--plugins/declarative/declarativechart.cpp26
-rw-r--r--plugins/declarative/declarativemargins.cpp12
-rw-r--r--plugins/declarative/declarativepolarchart.cpp31
-rw-r--r--plugins/declarative/declarativexypoint.cpp14
-rw-r--r--plugins/declarative/font.qdoc114
7 files changed, 80 insertions, 192 deletions
diff --git a/plugins/declarative/declarativeboxplotseries.cpp b/plugins/declarative/declarativeboxplotseries.cpp
index 33973f87..42cd6391 100644
--- a/plugins/declarative/declarativeboxplotseries.cpp
+++ b/plugins/declarative/declarativeboxplotseries.cpp
@@ -25,16 +25,21 @@
QTCOMMERCIALCHART_BEGIN_NAMESPACE
+#ifdef QDOC_QT5
+/*!
+ \qmltype BoxSet
+ \instantiates QBoxSet
+ \inqmlmodule QtCommercial.Chart
+
+ \include /doc/src/declarativeboxset.qdocinc
+*/
+#else
/*!
\qmlclass BoxSet QBoxSet
- BoxSet represents one box-and-whiskers item. It takes five values to create a graphical representation
- of range and three medians. There are two ways to give the values. The first one is with constructor
- or with append method. In these the values have to be given in the following order: lower extreme, lower quartile, median,
- upper quartile and upper extreme. The second method is to create an empty QBoxSet instance and give the values using
- value specific methods.
- \sa BoxPlotSeries
+ \include ../doc/src/declarativeboxset.qdocinc
*/
+#endif
/*!
\qmlproperty string BoxSet::values
The values on the box-and-whiskers set.
@@ -95,43 +100,22 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE
*/
+#ifdef QDOC_QT5
/*!
- \qmlclass BoxPlotSeries QBoxPlotSeries
- \inherits QAbstractSeries
-
- BoxPlotSeries represents a series of data shown as box-and-whiskers bars. The purpose of this class is to act as
- a container for single box-and-whiskers items. Each item is drawn to own slot. If chart includes multiple instances of
- BoxPlotSeries then box-and-whiskers items with the same index are drawn to same slot.
-
- The following QML shows how to create a simple box-and-whiskers chart:
- \code
- import QtQuick 1.0
- import QtCommercial.Chart 1.3
-
- ChartView {
- title: "Box Plot series"
- width: 400
- height: 300
- theme: ChartView.ChartThemeBrownSand
- legend.alignment: Qt.AlignBottom
+ \qmltype BoxPlotSeries
+ \instantiates QBoxPlotSeries
+ \inqmlmodule QtCommercial.Chart
- BoxPlotSeries {
- id: plotSeries
- name: "Income"
- BoxSet { label: "Jan"; values: [3, 4, 5.1, 6.2, 8.5] }
- BoxSet { label: "Feb"; values: [5, 6, 7.5, 8.6, 11.8] }
- BoxSet { label: "Mar"; values: [3.2, 5, 5.7, 8, 9.2] }
- BoxSet { label: "Apr"; values: [3.8, 5, 6.4, 7, 8] }
- BoxSet { label: "May"; values: [4, 5, 5.2, 6, 7] }
- }
- }
- \endcode
+ \include /doc/src/declarativeboxplotseries.qdocinc
+*/
+#else
+/*!
+ \qmlclass BoxPlotSeries QBoxPlotSeries
- \beginfloatleft
- \image examples_qmlboxplot.png
- \endfloat
- \clearfloat
+ \include ../doc/src/declarativeboxplotseries.qdocinc
*/
+#endif
+
/*!
\qmlmethod BoxPlotSeries::append(string label, VariantList values)
Appends a new box-and-whiskers set with \a label and \a values to the series.
diff --git a/plugins/declarative/declarativecategoryaxis.cpp b/plugins/declarative/declarativecategoryaxis.cpp
index bb2aad9c..dad88cc4 100644
--- a/plugins/declarative/declarativecategoryaxis.cpp
+++ b/plugins/declarative/declarativecategoryaxis.cpp
@@ -23,11 +23,20 @@
QTCOMMERCIALCHART_BEGIN_NAMESPACE
+#ifdef QDOC_QT5
+/*!
+ \qmltype CategoryRange
+ \inqmlmodule QtCommercial.Chart
+
+ \include /doc/src/categoryrange.qdocinc
+*/
+#else
/*!
\qmlclass CategoryRange
- \brief With CategoryRange you can define a range used by a CategoryAxis.
- \sa CategoryAxis
+
+ \include ../doc/src/categoryrange.qdocinc
*/
+#endif
DeclarativeCategoryRange::DeclarativeCategoryRange(QObject *parent) :
QObject(parent),
diff --git a/plugins/declarative/declarativechart.cpp b/plugins/declarative/declarativechart.cpp
index 005fd667..8364f0e7 100644
--- a/plugins/declarative/declarativechart.cpp
+++ b/plugins/declarative/declarativechart.cpp
@@ -52,21 +52,21 @@
QTCOMMERCIALCHART_BEGIN_NAMESPACE
+#ifdef QDOC_QT5
/*!
- \qmlclass ChartView DeclarativeChart
-
- ChartView element is the parent that is responsible for showing different chart series types.
+ \qmltype ChartView
+ \instantiates DeclarativeChart
+ \inqmlmodule QtCommercial.Chart
- The following QML shows how to create a simple chart with one pie series:
- \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 1
- \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 2
- \snippet ../examples/qmlpiechart/qml/qmlpiechart/main.qml 3
+ \include /doc/src/chartview.qdocinc
+*/
+#else
+/*!
+ \qmlclass ChartView DeclarativeChart
- \beginfloatleft
- \image examples_qmlpiechart.png
- \endfloat
- \clearfloat
+ \include ../doc/src/chartview.qdocinc
*/
+#endif
/*!
\qmlproperty Theme ChartView::theme
@@ -82,9 +82,9 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE
/*!
\qmlproperty Font ChartView::titleFont
- The title font of the chart
+ The title font of the chart.
- See the \l {Font} {QML Font Element} for detailed documentation.
+ See the Qt documentation for more details of Font.
*/
/*!
diff --git a/plugins/declarative/declarativemargins.cpp b/plugins/declarative/declarativemargins.cpp
index b9cc4b09..35fc9e84 100644
--- a/plugins/declarative/declarativemargins.cpp
+++ b/plugins/declarative/declarativemargins.cpp
@@ -24,10 +24,20 @@
QTCOMMERCIALCHART_BEGIN_NAMESPACE
+#ifdef QDOC_QT5
+/*!
+ \qmltype Margins
+ \inqmlmodule QtCommercial.Chart
+
+ \include /doc/src/margins.qdocinc
+*/
+#else
/*!
\qmlclass Margins
- Uncreatable type that is used to define top, bottom, left and right margins.
+
+ \include ../doc/src/margins.qdocinc
*/
+#endif
/*!
\qmlproperty int Margins::top
diff --git a/plugins/declarative/declarativepolarchart.cpp b/plugins/declarative/declarativepolarchart.cpp
index 1fd0c5c0..86bd2a13 100644
--- a/plugins/declarative/declarativepolarchart.cpp
+++ b/plugins/declarative/declarativepolarchart.cpp
@@ -23,30 +23,21 @@
QTCOMMERCIALCHART_BEGIN_NAMESPACE
+#ifdef QDOC_QT5
/*!
- \qmlclass PolarChartView DeclarativePolarChart
-
- PolarChartView element is the parent that is responsible for showing different chart series types
- in a polar chart.
-
- Polar charts support line, spline, area, and scatter series, and all axis types
- supported by those series.
-
- \note When setting ticks to an angular ValueAxis, keep in mind that the first and last tick
- are co-located at 0/360 degree angle.
+ \qmltype PolarChartView
+ \instantiates DeclarativePolarChart
+ \inqmlmodule QtCommercial.Chart
- \note If the angular distance between two consecutive points in a series is more than 180 degrees,
- any line connecting the two points becomes meaningless, so choose the axis ranges accordingly
- when displaying line, spline, or area series.
-
- The following QML shows how to create a polar chart with two series:
- \snippet ../demos/qmlpolarchart/qml/qmlpolarchart/View1.qml 1
+ \include /doc/src/declarativepolarchart.qdocinc
+*/
+#else
+/*!
+ \qmlclass PolarChartView DeclarativePolarChart
- \beginfloatleft
- \image demos_qmlpolarchart1.png
- \endfloat
- \clearfloat
+ \include ../doc/src/declarativepolarchart.qdocinc
*/
+#endif
DeclarativePolarChart::DeclarativePolarChart(QDECLARATIVE_ITEM *parent)
: DeclarativeChart(QChart::ChartTypePolar, parent)
diff --git a/plugins/declarative/declarativexypoint.cpp b/plugins/declarative/declarativexypoint.cpp
index d7020f2d..d4f96a42 100644
--- a/plugins/declarative/declarativexypoint.cpp
+++ b/plugins/declarative/declarativexypoint.cpp
@@ -23,12 +23,20 @@
QTCOMMERCIALCHART_BEGIN_NAMESPACE
+#ifdef QDOC_QT5
+/*!
+ \qmltype XYPoint
+ \inqmlmodule QtCommercial.Chart
+
+ \include /doc/src/declarativexypoint.qdocinc
+*/
+#else
/*!
\qmlclass XYPoint QPointF
- XYPoint is a convenience element for initializing XY-series with static coordinate data. To
- manipulate an XY-series dynamically, use it's data manipulation functions instead.
- \sa LineSeries, AreaSeries, ScatterSeries, SplineSeries
+
+ \include ../doc/src/declarativexypoint.qdocinc
*/
+#endif
/*!
\qmlproperty real XYPoint::x
diff --git a/plugins/declarative/font.qdoc b/plugins/declarative/font.qdoc
deleted file mode 100644
index 09728d93..00000000
--- a/plugins/declarative/font.qdoc
+++ /dev/null
@@ -1,114 +0,0 @@
-/*!
- \qmlclass Font QFont
- \brief Defines the font used for drawing text.
-
- Font instantiates the C++ class QFont
-*/
-
-// NOTE: This is a copy-paste from:
-// <qt dir>\src\declarative\graphicsitems\qdeclarativetext.cpp
-
-/*!
- \qmlproperty string Font::family
-
- Sets the family name of the font.
-
- The family name is case insensitive and may optionally include a foundry name, e.g. "Helvetica [Cronyx]".
- If the family is available from more than one foundry, and the foundry isn't specified, an arbitrary foundry is chosen.
- If the family isn't available, a family will be set using the font matching algorithm.
-*/
-
-/*!
- \qmlproperty bool Font::bold
-
- Sets whether the font weight is bold.
-*/
-
-/*!
- \qmlproperty enumeration Font::weight
-
- Sets the font's weight.
-
- The weight can be one of:
- \list
- \o Font.Light
- \o Font.Normal - the default
- \o Font.DemiBold
- \o Font.Bold
- \o Font.Black
- \endlist
-
- \qml
- Text { text: "Hello"; font.weight: Font.DemiBold }
- \endqml
-*/
-
-/*!
- \qmlproperty bool Font::italic
-
- Sets on or off the italic style property.
-*/
-
-/*!
- \qmlproperty bool Font::underline
-
- Sets on or off the underlined property.
-*/
-
-/*!
- \qmlproperty bool Font::strikeout
-
- Sets on or off the strikeout style.
-*/
-
-/*!
- \qmlproperty real Font::pointSize
-
- Sets the font size in points. The point size must be greater than zero.
-*/
-
-/*!
- \qmlproperty int Font::pixelSize
-
- Sets the font size in pixels.
-
- Using this function makes the font device dependent.
- Use \c pointSize to set the size of the font in a device independent manner.
-*/
-
-/*!
- \qmlproperty real Font::letterSpacing
-
- Sets the letter spacing for the font.
-
- Letter spacing changes the default spacing between individual letters in the font.
- A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.
-*/
-
-/*!
- \qmlproperty real Font::wordSpacing
-
- Sets the word spacing for the font.
-
- Word spacing changes the default spacing between individual words.
- A positive value increases the word spacing by a corresponding amount of pixels,
- while a negative value decreases the inter-word spacing accordingly.
-*/
-
-/*!
- \qmlproperty enumeration Font::capitalization
-
- Sets the capitalization for the text.
-
- \list
- \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
- \o Font.AllUppercase - Changes the text to uppercasse.
- \o Font.AllLowercase - Changes the text to lowercase.
- \o Font.SmallCaps - Renders the text small-caps type.
- \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
- \endlist
-
- \qml
- Text { text: "Hello"; font.capitalization: Font.AllLowercase }
- \endqml
-*/