Features in Office
Implemented dragging of guide lines from the rulers.
When dragging outside of the ruler, the ruler emits a signal guideLineCreated which when connected to the KoCanvasControllers slot addGuideLine will temporary activate the KoGuidesTool.
This tool then positions the new guide line corresponding to the mouse movement.
When the mouse gets released, the guide line is added to the guides data provided by the canvas.
To add support for guide lines to an application one has to do the following steps:
1. when creating your rulers, connect the guideLineCreated signal with the canvas controllers addGuideLine slot.
2. In the canvas implementation, reimplement the guidesData function to provide access to the guides data of the applications KoDocument implementation.
3. In the canvas implementation call KoGuidesData::paintGuides to paint the guides.
4. Profit!!! :-)