libodsstream
calcwriterinterface.h
1 
12 /*******************************************************************************
13  * Copyright (c) 2013 Olivier Langella <Olivier.Langella@u-psud.fr>.
14  *
15  * This file is part of the libodsstream library.
16  *
17  * libodsstream is a library to read and write ODS documents as streams
18  * Copyright (C) 2013 Olivier Langella <Olivier.Langella@u-psud.fr>
19  *
20  * This program is free software: you can redistribute it and/or modify
21  * it under the terms of the GNU Lesser General Public License as published
22  *by the Free Software Foundation, either version 3 of the License, or (at your
23  *option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28  * GNU Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public License
31  * along with this program. If not, see <http://www.gnu.org/licenses/>.
32  *
33  * Contributors:
34  * Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
35  *implementation
36  ******************************************************************************/
37 
38 #ifndef CALCWRITERINTERFACE_H
39 #define CALCWRITERINTERFACE_H
40 
41 
42 #include <QDate>
43 #include <QUrl>
48 
50 {
51  public:
52  virtual ~CalcWriterInterface(){};
53  virtual void close() = 0;
54 
60  virtual void writeSheet(const QString &sheetName) = 0;
61 
65  virtual void writeLine() = 0;
70  virtual void writeCell(const char *cell_text) = 0;
75  virtual void writeCell(const QString &cell_text) = 0;
79  virtual void writeEmptyCell() = 0;
84  virtual void writeCell(int number) = 0;
89  virtual void
90  writeCell(unsigned int posInteger)
91  {
92  writeCell((int)posInteger);
93  };
98  virtual void writeCell(float number) = 0;
103  virtual void writeCell(double number) = 0;
104 
109  virtual void writeCellPercentage(double value) = 0;
114  virtual void writeCell(bool true_or_false) = 0;
119  virtual void writeCell(const QDate &date) = 0;
124  virtual void writeCell(const QDateTime &datetime) = 0;
130  virtual void writeCell(const QUrl &url_link, const QString &text) = 0;
131 
132 
139  virtual OdsTableCellStyleRef
141  {
142  return nullptr;
143  };
151  virtual void setTableCellStyleRef(OdsTableCellStyleRef style_ref){};
152 
158  void
160  {
161  setTableCellStyleRef(nullptr);
162  };
163 
168  virtual void setCellAnnotation(const QString &annotation) = 0;
169 
173  virtual void addColorScale(const OdsColorScale &ods_color_scale){};
174 
181  virtual QString
183  {
184  return QString();
185  };
186 
189  virtual void setCurrentOdsTableSettings(const OdsTableSettings &settings){};
190 };
191 
192 #endif // CALCWRITERINTERFACE_H
CalcWriterInterface::writeCell
virtual void writeCell(unsigned int posInteger)
write a positive integer in a cell
Definition: calcwriterinterface.h:114
CalcWriterInterface::writeEmptyCell
virtual void writeEmptyCell()=0
write an empty cell
OdsTableCellStyle
Definition: odstablecellstyle.h:33
CalcWriterInterface::setCurrentOdsTableSettings
virtual void setCurrentOdsTableSettings(const OdsTableSettings &settings)
set ODS table settings of the current sheet (table)
Definition: calcwriterinterface.h:213
CalcWriterInterface::setCellAnnotation
virtual void setCellAnnotation(const QString &annotation)=0
set annotation to write in the next cell
CalcWriterInterface::writeCellPercentage
virtual void writeCellPercentage(double value)=0
write a double as a percentage
OdsColorScale
Definition: odscolorscale.h:43
CalcWriterInterface::getTableCellStyleRef
virtual OdsTableCellStyleRef getTableCellStyleRef(const OdsTableCellStyle &style)
Definition: calcwriterinterface.h:164
odscolorscale.h
structure to apply a color scale in ODS sheets
CalcWriterInterface::getOdsCellCoordinate
virtual QString getOdsCellCoordinate()
get the last written cell coordinate in ODS coordinate format get the coordinate of the last written ...
Definition: calcwriterinterface.h:206
CalcWriterInterface::clearTableCellStyleRef
void clearTableCellStyleRef()
Definition: calcwriterinterface.h:183
CalcWriterInterface::addColorScale
virtual void addColorScale(const OdsColorScale &ods_color_scale)
apply solor scale conditional format on a cell range
Definition: calcwriterinterface.h:197
CalcWriterInterface::writeLine
virtual void writeLine()=0
open a new line
odstablecellstyleref.h
internal reference on handler for ODS cell style
CalcWriterInterface
Definition: calcwriterinterface.h:49
CalcWriterInterface::writeCell
virtual void writeCell(const char *cell_text)=0
write a text cell
CalcWriterInterface::writeSheet
virtual void writeSheet(const QString &sheetName)=0
open a new sheet
odstablecellstyle.h
handler for ODS cell style
OdsTableSettings
Definition: odstablesettings.h:42
OdsTableCellStyleRefInternal
Definition: odstablecellstyleref.h:38
CalcWriterInterface::setTableCellStyleRef
virtual void setTableCellStyleRef(OdsTableCellStyleRef style_ref)
Definition: calcwriterinterface.h:175
odstablesettings.h
store table settings