summaryrefslogtreecommitdiffstats
path: root/kivio/NOTES
blob: e6349c336e4bf9a77def7048a0ead6cf099fd7c2 (plain)
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
This file is just for miscellaneous notes on how things work in Kivio or
things that should/should-not be done.

- The ID System
---------------------------------------------------------------------------
The way Kivio locates stencils after saving and loading them is through an
ID system.  Each stencil set is given a unique ID.  Many times, this id
is simply the author or company's name concatenated with the native title of
the stencil set, and a roman numeral.  This is the naming convention the
author has been using.  The id's of the stencils themselves are usually
the same as the native title.

It is critically important that the Id's ******NEVER****** be translated
or Kivio won't be able to load documents which are saved in one locale,
and then loaded in another.

- Removing A Stencil Set
---------------------------------------------------------------------------
Here are the steps the code does:

- Removing a stencil set by clicking on the button 'x'.  There are quite
  a few things which happen as a result of a user clicking the 'x' on
  a DragBarButton.
  DragBarButton emits a closeRequired( DragBarButton * ) signal,
  KivioStackBar catches it with slotDeleteButton( DragBarButton * ),
  KivioStackBar then emits deleteButton(DragBarButton *, QWidget *, KivioStackBar *),
  KivioDocument then catches this with slotDeleteStencilSet( signature ) and
    iterates through all stencils on all pages of the document making sure it
	is ok to delete this stencil set.  If it is, it removes the stencil (spawner) set
	with a call to removeSpawnerSet( ... ) and emits the signal
	sig_deleteStencilSet( DragBarButton *, QWidget *, KivioStackBar * )
  StencilBarDockManager catches this with slotDeleteStencilSet( .... ) and tells the
    KivioStackBar object to delete the passed DragBarButton and widget associated with
	it.  It then checks if any pages are visible on the KivioStackBar object.  If
	there are not, it then removes it from either the bars list, or topLevel bars list
	and then deletes the KivioStackBar object.