krs_cell.h
1/*
2 * Copyright (c) 2005 Cyrille Berger <cberger@cberger.net>
3 * Copyright (c) 2006 Isaac Clerencia <isaac@warp.es>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Library General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program 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
13 * GNU Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20#ifndef KROSS_KSPREADCOREKRSCELL_H
21#define KROSS_KSPREADCOREKRSCELL_H
22
23#include <kspread_sheet.h>
24#include <kspread_cell.h>
25#include <kspread_value.h>
26
27#include <api/class.h>
28
29#include <tqstring.h>
30#include <tqcolor.h>
31
32namespace Kross { namespace KSpreadCore {
33
50class Cell : public Kross::Api::Class<Cell>
51{
52 public:
53 Cell(KSpread::Cell* cell, KSpread::Sheet* sheet, uint col, uint row);
54 virtual ~Cell();
55 virtual const TQString getClassName() const;
56 private:
57
61 TQVariant value() const;
65 bool setValue(const TQVariant& value);
66
70 int column() const;
74 int row() const;
75
79 Cell* previousCell() const;
83 Cell* nextCell() const;
87 void setPreviousCell(Cell* c);
91 void setNextCell(Cell* c);
92
97 const TQString name() const;
102 const TQString fullName() const;
103
107 const TQString comment() const;
111 void setComment(const TQString& c);
112
113#if 0
114 bool isFormula() const;
115 Formula *formula () const;
116#endif
117
121 const TQString getFormatString() const;
125 void setFormatString(const TQString& format);
126
132 const TQString text() const;
137 bool setText(const TQString& text);
138
142 const TQString textColor();
147 void setTextColor(const TQString& textcolor);
148
152 const TQString backgroundColor();
157 void setBackgroundColor(const TQString& backgroundcolor);
158
159 private:
160 KSpread::Cell* m_cell;
161 KSpread::Sheet* m_sheet;
162 uint m_col, m_row;
163
164 TQVariant toVariant(const KSpread::Value& value) const;
165};
166}
167}
168
169
170#endif
For every cell in the spread sheet there is a Cell object.
Provides a wrapper for cell value.
For every cell in the spread sheet there is a Cell object.
Definition krs_cell.h:51