kspread

dependencies.h
1/* This file is part of the KDE project
2 Copyright 2004 Tomas Mecir <mecirt@gmail.com>
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, or (at your option) any later version.
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_DEPENDENCIES
21#define KSPREAD_DEPENDENCIES
22
23#include <tqvaluelist.h>
24
25#include "kspread_util.h"
26
27namespace KSpread
28{
29class Sheet;
30
31struct DependencyList;
32
35
37 int cellrow, cellcolumn;
38 Sheet *cellsheet;
39 Range range;
40};
41
42
48
50 public:
52 DependencyManager (Sheet *s);
55
57 void reset ();
58
60 void cellChanged (const Point &cell);
62 void rangeChanged (const Range &range);
64 void rangeListChanged (const RangeList &rangeList);
65
67 void areaModified (const TQString &name);
68
70 RangeList getDependencies (const Point &cell);
72 TQValueList<Point> getDependants (const Point &cell);
73protected:
74
76 DependencyList *deps;
77 friend class DependencyList;
78};
79
80//end of namespace
81}
82
83#endif // KSPREAD_DEPENDENCIES
84
void cellChanged(const Point &cell)
handle the fact that cell's contents have changed
void areaModified(const TQString &name)
a named area was somehow modified
DependencyList * deps
local d-pointer
TQValueList< Point > getDependants(const Point &cell)
get cells depending on this cell, either through normal or range dependency
void rangeListChanged(const RangeList &rangeList)
handle the fact that a range list has been changed
RangeList getDependencies(const Point &cell)
get dependencies of a cell
void reset()
clear all data
void rangeChanged(const Range &range)
handle the fact that a range has been changed
DependencyManager(Sheet *s)
constructor
Represents the position of a single cell in a workbook.
Represents a region within a workbook.
The KSpread namespace.
Definition commands.h:39
Range dependency - stores information about one dependency of one cell on one range of cells.
range-list and cell-list TODO: move to a separate file, improve structure, add iterators and all that...