Update documention

This commit is contained in:
Debao Zhang
2014-01-20 11:07:00 +08:00
parent a0624bb36a
commit c8bc61ffe6
4 changed files with 73 additions and 6 deletions
+37 -2
View File
@@ -48,20 +48,51 @@ ChartPrivate::~ChartPrivate()
/*!
* \class Chart
*
* Main class for the charts.
* \inmodule QtXlsx
* \brief Main class for the charts.
*/
/*!
\enum Chart::ChartType
\value CT_Area
\value CT_Area3D,
\value CT_Line,
\value CT_Line3D,
\value CT_Scatter,
\value CT_Pie,
\value CT_Pie3D,
\value CT_Doughnut,
\value CT_Bar,
\value CT_Bar3D,
\omitvalue CT_Stock,
\omitvalue CT_Radar,
\omitvalue CT_OfPie,
\omitvalue CT_Surface,
\omitvalue CT_Surface3D,
\omitvalue CT_Bubble
*/
/*!
* \internal
*/
Chart::Chart(Worksheet *parent)
:OOXmlFile(new ChartPrivate(this))
{
d_func()->sheet = parent;
}
/*!
* Destroys the chart.
*/
Chart::~Chart()
{
}
/*!
* Add the data series which is in the range \a range of the \a sheet.
*/
void Chart::addSeries(const CellRange &range, Worksheet *sheet)
{
Q_D(Chart);
@@ -88,6 +119,10 @@ void Chart::setChartType(ChartType type)
d->chartType = type;
}
/*!
* \internal
*
*/
void Chart::setChartStyle(int id)
{
Q_UNUSED(id)
+19 -4
View File
@@ -396,20 +396,28 @@ QVariant Document::read(int row, int col) const
}
/*!
* \brief Insert an \a image to current active worksheet at the position \a row, \a column
* Insert an \a image to current active worksheet at the position \a row, \a column
* Returns ture if success.
*/
bool Document::insertImage(int row, int column, const QImage &image)
{
return currentWorksheet()->insertImage(row, column, image);
}
/*!
* Creates an chart with the given \a size and insert it to the current
* active worksheet at the position \a row, \a col.
* The chart will be returned.
*/
Chart *Document::insertChart(int row, int col, const QSize &size)
{
return currentWorksheet()->insertChart(row, col, size);
}
/*!
* \brief Insert an \a image to current active worksheet to the position \a row, \a column with the given
* \overload
* \deprecated
* Insert an \a image to current active worksheet to the position \a row, \a column with the given
* \a xOffset, \a yOffset, \a xScale and \a yScale.
*/
int Document::insertImage(int row, int column, const QImage &image, double /*xOffset*/, double /*yOffset*/, double /*xScale*/, double /*yScale*/)
@@ -701,8 +709,11 @@ bool Document::deleteWorksheet(const QString &name)
}
/*!
\deprecated
Rename current worksheet to new \a name.
Returns true if the name defined successful.
\sa renameWorksheet()
*/
bool Document::setSheetName(const QString &name)
{
@@ -722,7 +733,9 @@ Worksheet *Document::currentWorksheet() const
}
/*!
* \brief Set current worksheet to be the sheet at \a index.
* \deprecated
* Set current worksheet to be the sheet at \a index.
* \sa selectWorksheet()
*/
void Document::setCurrentWorksheet(int index)
{
@@ -731,7 +744,9 @@ void Document::setCurrentWorksheet(int index)
}
/*!
* \brief Set current selected worksheet to be the sheet named \a name.
* \deprecated
* Set current selected worksheet to be the sheet named \a name.
* \sa selectWorksheet()
*/
void Document::setCurrentWorksheet(const QString &name)
{
+3
View File
@@ -328,6 +328,9 @@ bool Workbook::copyWorksheet(int index, const QString &newName)
return false;
}
/*!
\deprecated
*/
QList<QSharedPointer<Worksheet> > Workbook::worksheets() const
{
Q_D(const Workbook);
+14
View File
@@ -1087,6 +1087,10 @@ bool Worksheet::addConditionalFormatting(const ConditionalFormatting &cf)
return true;
}
/*!
* Insert an \a image at the position \a row, \a column
* Returns ture if success.
*/
bool Worksheet::insertImage(int row, int column, const QImage &image)
{
Q_D(Worksheet);
@@ -1111,11 +1115,21 @@ bool Worksheet::insertImage(int row, int column, const QImage &image)
return true;
}
/*!
* \overload
* Insert an \a image at the position \a row, \a column with the given
* \a offset \a xScale and \a yScale.
*/
int Worksheet::insertImage(int row, int column, const QImage &image, const QPointF & /*offset*/, double /*xScale*/, double /*yScale*/)
{
return insertImage(row, column, image);
}
/*!
* Creates an chart with the given \a size and insert
* at the position \a row, \a column.
* The chart will be returned.
*/
Chart *Worksheet::insertChart(int row, int column, const QSize &size)
{
Q_D(Worksheet);