~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kspread/doc/NOTES.chart

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Current status:
 
2
  ChartInterface: kspread -> kchart
 
3
  ChartModel: kchart -> kspread
 
4
Drawbacks:
 
5
- Hardcoded shape id of the chart shape in KSpread.
 
6
- Specialized for both, KChart and KSpread.
 
7
 
 
8
 
 
9
On shape insertion:
 
10
KSpread does not know the shape id before the config dialog is shown.
 
11
Solution 1:
 
12
- Install extra plugin by KChart for KSpread
 
13
- Identifies KChart as data consumer
 
14
- Use shape id to install config widgets to be used at shape creation
 
15
BULLSHIT (there's a shape):
 
16
- Let plugin install QObject implementing DataConsumerInterface
 
17
- Let DataConsumerInterface know about DataConsumerManager
 
18
 
 
19
 
 
20
 
 
21
How does the chart shape know that the hosting app is KSpread or that
 
22
it should retrieve its data from an embedded table?
 
23
Is it possible to know what is the active shape on shape insertion?
 
24
Solution 1:
 
25
- Query KComponentData
 
26
Solution 2:
 
27
- Register SourceRangeManager as (canvas) resource.
 
28
Notes:
 
29
- KoShapeUserData is qobject_cast'able
 
30
 
 
31
 
 
32
How does KSpread communicate with the chart shape?
 
33
Solution 1:
 
34
- Chart shape implements a data consumer interface
 
35
Solution 2:
 
36
- KSpread fires KoEventActions and KChart can react by querying SourceRangeManager.
 
37
Notes:
 
38
- QAbstractItemModel seems to have the necessary signals for reacting on data changes
 
39
  except the cell region. Provide the whole sheet and let KChart trim the model?
 
40
  What about mouse selections of the cell region then? Use QItemSelection(Model)?
 
41
  Is it possible to temporarily activate the cell tool for the selection? Needs
 
42
  non-modal dialog.
 
43
- The cell region may be provided by a special role of the model's root item.
 
44
 
 
45
 
 
46
Does KChart has to communicate with KSpread/embedded tables at all?
 
47
- Current status: KChartModel provides accessors and setters for the cell region.
 
48
- KSpread needs to know the used cell region, so that it can shift it on
 
49
  column/row/cell range insertions/deletions.
 
50
- Therefore, the communication in both directions, KChart <-> KSpread,
 
51
  is mandatory.
 
52
- KChart needs information about:
 
53
    - data changes (cell shifts) -> QAbstractItemModel::dataChanged(), etc.
 
54
    - complete deletion of the cell region -> QAbstractItemModel::destroyed()
 
55
    - textual representation of the cell region -> ???
 
56
- KSpread needs information about:
 
57
    - cell region change requests
 
58
    - deletion of the chart shape
 
59
 
 
60
 
 
61
How would KSpread communicate with a database?