kspread

damages.h
1/* This file is part of the KDE project
2 Copyright 2004 Ariya Hidayat <ariya@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KSPREAD_DAMAGES
21#define KSPREAD_DAMAGES
22
23namespace KSpread
24{
25class Cell;
26class Sheet;
27
28class Damage
29{
30 public:
31
32 typedef enum
33 {
34 Nothing = 0,
35 Document,
36 Workbook,
37 Sheet,
38 Range,
39 Cell
40 } Type;
41
42 virtual Type type() const { return Nothing; }
43};
44
45class CellDamage : public Damage
46{
47 public:
48
49 CellDamage( KSpread::Cell* cell );
50
51 virtual ~CellDamage();
52
53 virtual Type type() const { return Damage::Cell; }
54
55 KSpread::Cell* cell();
56
57 private:
58 class Private;
59 Private *d;
60};
61
62class SheetDamage : public Damage
63{
64 public:
65
66 enum
67 {
68 None = 0,
69 ContentChanged,
70 PropertiesChanged,
71 Hidden,
72 Shown
73 };
74
75 SheetDamage( KSpread::Sheet* sheet, int action );
76
77 virtual ~SheetDamage();
78
79 virtual Type type() const { return Damage::Sheet; }
80
81 KSpread::Sheet* sheet() const;
82
83 int action() const;
84
85 private:
86 class Private;
87 Private *d;
88};
89
90
91} // namespace KSpread
92
93#endif // KSPREAD_DAMAGES
For every cell in the spread sheet there is a Cell object.
The KSpread namespace.
Definition commands.h:39