Browse Source

Update documention

master
Debao Zhang 11 years ago
parent
commit
c8bc61ffe6
  1. 39
      src/xlsx/xlsxchart.cpp
  2. 23
      src/xlsx/xlsxdocument.cpp
  3. 3
      src/xlsx/xlsxworkbook.cpp
  4. 14
      src/xlsx/xlsxworksheet.cpp

39
src/xlsx/xlsxchart.cpp

@ -48,20 +48,51 @@ ChartPrivate::~ChartPrivate()
/*! /*!
* \class Chart * \class Chart
* * \inmodule QtXlsx
* Main class for the charts. * \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) Chart::Chart(Worksheet *parent)
:OOXmlFile(new ChartPrivate(this)) :OOXmlFile(new ChartPrivate(this))
{ {
d_func()->sheet = parent; d_func()->sheet = parent;
} }
/*!
* Destroys the chart.
*/
Chart::~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) void Chart::addSeries(const CellRange &range, Worksheet *sheet)
{ {
Q_D(Chart); Q_D(Chart);
@ -88,6 +119,10 @@ void Chart::setChartType(ChartType type)
d->chartType = type; d->chartType = type;
} }
/*!
* \internal
*
*/
void Chart::setChartStyle(int id) void Chart::setChartStyle(int id)
{ {
Q_UNUSED(id) Q_UNUSED(id)

23
src/xlsx/xlsxdocument.cpp

@ -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) bool Document::insertImage(int row, int column, const QImage &image)
{ {
return currentWorksheet()->insertImage(row, column, 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) Chart *Document::insertChart(int row, int col, const QSize &size)
{ {
return currentWorksheet()->insertChart(row, col, 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. * \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*/) 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. Rename current worksheet to new \a name.
Returns true if the name defined successful. Returns true if the name defined successful.
\sa renameWorksheet()
*/ */
bool Document::setSheetName(const QString &name) 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) 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) void Document::setCurrentWorksheet(const QString &name)
{ {

3
src/xlsx/xlsxworkbook.cpp

@ -328,6 +328,9 @@ bool Workbook::copyWorksheet(int index, const QString &newName)
return false; return false;
} }
/*!
\deprecated
*/
QList<QSharedPointer<Worksheet> > Workbook::worksheets() const QList<QSharedPointer<Worksheet> > Workbook::worksheets() const
{ {
Q_D(const Workbook); Q_D(const Workbook);

14
src/xlsx/xlsxworksheet.cpp

@ -1087,6 +1087,10 @@ bool Worksheet::addConditionalFormatting(const ConditionalFormatting &cf)
return true; 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) bool Worksheet::insertImage(int row, int column, const QImage &image)
{ {
Q_D(Worksheet); Q_D(Worksheet);
@ -1111,11 +1115,21 @@ bool Worksheet::insertImage(int row, int column, const QImage &image)
return true; 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*/) int Worksheet::insertImage(int row, int column, const QImage &image, const QPointF & /*offset*/, double /*xScale*/, double /*yScale*/)
{ {
return insertImage(row, column, image); 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) Chart *Worksheet::insertChart(int row, int column, const QSize &size)
{ {
Q_D(Worksheet); Q_D(Worksheet);

Loading…
Cancel
Save