File: Interfaces.dox

package info (click to toggle)
calligra 1%3A2.4.4-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 290,028 kB
  • sloc: cpp: 1,105,019; xml: 24,940; ansic: 11,807; python: 8,457; perl: 2,792; sh: 1,507; yacc: 1,307; ruby: 1,248; sql: 903; lex: 455; makefile: 89
file content (70 lines) | stat: -rw-r--r-- 3,078 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
 * \page interfaces Interfaces
 * \author Stefan Nikolaus
 * \date 2008-08-21
 *
 *
 * \section intro Introduction
 * This page describes how external applications can interact with KSpread.
 *
 * \subsection resources Development Resources
 * The interfaces are located in KoTableInterface.h.
 * Pointers to them are stored as canvas resources (KoResourceManager).
 *
 * \subsection ranges About Cell Ranges
 * KSpread is able to export data from and import data to cell ranges. Those cell
 * ranges will be modified by column/row/cell range insertions/removals, as every
 * other cell range does. I.e. their location is variable and external applications
 * need to get informed about their movements.
 * For this case, KSpread's interfaces provide methods, that return an <b>extended
 * model</b> - extended by a method returning the current cell range address.
 *
 *
 *
 *
 * \section export Data Export
 * \par Status
 *      design not fixed yet; not implemented yet
 * \par Example usage
 *      Charts
 *
 * The interface for exporting data to external applications is called KoTable::SourceRangeManager.
 *
 * To export data there's a method that takes a cell range address and returns an extended model.
 * The model gets informed of value changes and it informs its views (or its users in general).
 *
 * In order to remove a cell range, that acts as data source, a method taking the extended model
 * as parameter is provided.
 *
 *
 *
 *
 * \section import Data Import
 * \par Status
 *      design not fixed yet; not implemented yet
 * \par Example usage
 *      Database queries
 *
 * The interface for importing data from external applications is called KoTable::TargetRangeManager.
 *
 * It provides a method, that takes a cell range address and an arbitrary data model. The method
 * returns an extended model, a proxy model for the provided data model, in order to deliver the
 * variable cell range address.
 * If the external application does not want to provide a model itself, but just wants to write
 * to the cell range, the data model parameter can also be null. Then, a writable table model is
 * created by KSpread and returned as extended model.
 *
 * In order to remove a cell range, that retrieves external data, a method taking the extended model
 * as parameter is provided.
 *
 * The TargetRangeManager implementation needs to track the model signals indicating data changes
 * and column/row insertions/removals. It has the task to write the data into the value storage.
 *
 * Most of the database range settings (OpenDocument v1.1, 8.6.1 Database range) should be passed to
 * the creation method, collected in one parameter.
 * Optionally, a dialog should be shown asking for exactly the same settings on creation. The passed
 * ones should then be taken as defaults, because the defaults may vary for different external data.
 * Additionally, a list of config widgets is passed, that will be shown in the same dialog. There,
 * the data provider's parameters can be changed, e.g. altering a SQL query, even later after
 * creation.
 */