latex/export/cell.h
1/*
2**
3** Copyright (C) 2002 Robert JACOLIN
4**
5** This library is free software; you can redistribute it and/or
6** modify it under the terms of the GNU Library General Public
7** License as published by the Free Software Foundation; either
8** version 2 of the License, or (at your option) any later version.
9**
10** This library is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13** Library General Public License for more details.
14**
15** To receive a copy of the GNU Library General Public License, write to the
16** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18**
19*/
20
21#ifndef __KSPREAD_LATEX_CELL_H__
22#define __KSPREAD_LATEX_CELL_H__
23
24#include <tqstring.h>
25
26#include "config.h"
27#include "format.h"
28#include "xmlparser.h"
29
30/***********************************************************************/
31/* Class: Cell */
32/***********************************************************************/
33
34class Table;
35class Column;
36
40class Cell: public Format
41{
42
43 /* USEFULL DATA */
44 long _row;
45 long _col;
46 TQString _text;
47 TQString _textDataType;
48 TQString _result;
49 TQString _resultDataType;
50
51
52 public:
61 Cell();
62
63 Cell(long row, long col)
64 {
65 _row = row;
66 _col = col;
67 }
68
69 /*
70 * Destructor
71 *
72 * The destructor must remove the list of frames.
73 */
74
75 virtual ~Cell();
76
77 /* ==== getters ==== */
78
79 long getRow() const { return _row; }
80 long getCol() const { return _col; }
81 TQString getText() const { return _text; }
82 TQString getTextDataType() const { return _textDataType; }
83 TQString getResult() const { return _result; }
84 TQString getResultDataType() const { return _resultDataType; }
85
86 /* ==== setters ==== */
87 void setRow(int r) { _row = r; }
88 void setCol(int c) { _col = c; }
89 void setText(TQString text) { _text = text; }
90 void setTextDataType(TQString dt) { _textDataType = dt; }
91 void setResult(TQString result) { _result = result; }
92 void setResultDataType(TQString dt) { _resultDataType = dt; }
93
97 void analyse (const TQDomNode);
98 void analyseText (const TQDomNode);
99 void analyseResult (const TQDomNode);
100 void generate (TQTextStream&, Table*);
101
102 private:
103
104};
105
106#endif /* __KSPREAD_LATEX_CELL_H__ */
107
This class hold a column.
Definition column.h:38
This class describe a cell, row or column format.
void generate(TQTextStream &out, Column *col=NULL, Row *row=NULL)
Generate the cell format inherited from the row or the colum format or use its own format.
virtual void analyse(const TQDomNode)
Helpfull functions.
This class hold a table.