diff --git a/doc/qcharts.qdocconf b/doc/qcharts.qdocconf index 9716386..a999aba 100644 --- a/doc/qcharts.qdocconf +++ b/doc/qcharts.qdocconf @@ -16,10 +16,10 @@ HTML.templatedir = . HTML.stylesheets = style/offline.css HTML.headerstyles = \ " \n" -sources.fileextensions = "*.cpp *.qdoc *.mm *.qml" -headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx" -examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml" -examples.imageextensions = "*.png *.jpeg *.jpg *.gif *.mng" +sources.fileextensions = *.cpp *.qdoc *.mm *.qml +headers.fileextensions = *.h *.ch *.h++ *.hh *.hpp *.hxx +examples.fileextensions = *.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml +examples.imageextensions = *.png *.jpeg *.jpg *.gif *.mng imagedirs = ./images outputdir = ./html diff --git a/example/gdpbarchart/widget.cpp b/example/gdpbarchart/widget.cpp index 1cd0280..2ca41e1 100644 --- a/example/gdpbarchart/widget.cpp +++ b/example/gdpbarchart/widget.cpp @@ -1,6 +1,7 @@ /*! \class Widget \brief Ui for the application. + \internal */ #include "widget.h" diff --git a/src/qchart.cpp b/src/qchart.cpp index fb1c41b..f6c8b9a 100644 --- a/src/qchart.cpp +++ b/src/qchart.cpp @@ -6,21 +6,44 @@ #include #include +/*! + \class QChart + \brief QtCommercial chart API. + + QChart is a QGraphicsWidget that you can show in a QGraphicsScene. It manages the graphical + representation of different types of QChartSeries and other chart related objects like + QChartAxis and QChartLegend. If you simply want to show a chart in a layout, you can use the + convenience class QChartView instead of QChart. +*/ + QTCOMMERCIALCHART_BEGIN_NAMESPACE +/*! + Constructs a chart object which is a child of parent. +*/ QChart::QChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) : QGraphicsWidget(parent,wFlags), -m_backgroundItem(0), -m_titleItem(0), -m_dataset(new ChartDataSet(this)), -m_presenter(new ChartPresenter(this,m_dataset)) + m_backgroundItem(0), + m_titleItem(0), + m_dataset(new ChartDataSet(this)), + m_presenter(new ChartPresenter(this,m_dataset)) { } -QChart::~QChart() {} +/*! + Destroys the object and it's children, like QChartSeries and QChartAxis object added to it. +*/ +QChart::~QChart() +{ +} -void QChart::addSeries(QChartSeries* series,QChartAxis* axisY) +/*! + Adds the series and optional y axis onto the chart and takes the ownership of the objects. + If auto scaling is enabled, re-scales the axes the series is bound to (both the x axis and + the y axis). +*/ +void QChart::addSeries(QChartSeries* series, QChartAxis* axisY) { - m_dataset->addSeries(series,axisY); + m_dataset->addSeries(series, axisY); } void QChart::removeSeries(QChartSeries* series) diff --git a/src/qchart.h b/src/qchart.h index d9f72f7..0fa31ca 100644 --- a/src/qchart.h +++ b/src/qchart.h @@ -1,5 +1,5 @@ -#ifndef CHART_H -#define CHART_H +#ifndef QCHART_H +#define QCHART_H #include #include @@ -21,9 +21,6 @@ class ChartItem; class ChartDataSet; class ChartPresenter; -/*! - * TODO: define the responsibilities - */ class QTCOMMERCIALCHART_EXPORT QChart : public QGraphicsWidget { Q_OBJECT @@ -34,7 +31,7 @@ public: ChartThemeVanilla, ChartThemeIcy, ChartThemeGrayscale, - ChartThemeScientific, + ChartThemeScientific //ChartThemeUnnamed1 }; @@ -42,7 +39,7 @@ public: QChart(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0); ~QChart(); - void addSeries(QChartSeries* series,QChartAxis* axisY=0);// takes series ownership , takes axis ownership + void addSeries(QChartSeries* series, QChartAxis* axisY = 0); void removeSeries(QChartSeries* series); //returns ownership , deletes axis if no series attached void removeAllSeries(); // deletes series and axis