You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
2.0 KiB
37 lines
2.0 KiB
15 years ago
|
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.
|