lib
KoGuides Class Reference
List of all members.Detailed Description
Definition at line 36 of file KoGuides.h.
Public Types | |
typedef int | SnapStatus |
Public Slots | |
void | moveGuide (const QPoint &pos, bool horizontal, int rulerWidth) |
void | addGuide (const QPoint &pos, bool horizontal, int rulerWidth) |
Signals | |
void | guideLinesChanged (KoView *view) |
void | moveGuides (bool state) |
void | paintGuides (bool state) |
Public Member Functions | |
KoGuides (KoView *view, KoZoomHandler *zoomHandler) | |
~KoGuides () | |
void | paintGuides (QPainter &painter) |
bool | mousePressEvent (QMouseEvent *e) |
bool | mouseMoveEvent (QMouseEvent *e) |
bool | mouseReleaseEvent (QMouseEvent *e) |
bool | keyPressEvent (QKeyEvent *e) |
void | setGuideLines (const QValueList< double > &horizontalPos, const QValueList< double > &verticalPos) |
void | setAutoGuideLines (const QValueList< double > &horizontalPos, const QValueList< double > &verticalPos) |
void | getGuideLines (QValueList< double > &horizontalPos, QValueList< double > &verticalPos) const |
void | snapToGuideLines (KoRect &rect, int snap, SnapStatus &snapStatus, KoPoint &diff) |
void | snapToGuideLines (KoPoint &pos, int snap, SnapStatus &snapStatus, KoPoint &diff) |
void | repaintSnapping (const KoRect &snappedRect) |
void | repaintSnapping (const KoPoint &snappedPoint, SnapStatus snapStatus) |
void | repaintAfterSnapping () |
void | diffNextGuide (KoRect &rect, KoPoint &diff) |
Static Public Attributes | |
static const SnapStatus | SNAP_NONE = 0 |
static const SnapStatus | SNAP_HORIZ = 1 |
static const SnapStatus | SNAP_VERT = 2 |
static const SnapStatus | SNAP_BOTH = 3 |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 77 of file KoGuides.cpp. |
|
Destructor.
Definition at line 86 of file KoGuides.cpp. |
Member Function Documentation
|
Add Guide. This slot can be connected to void KoRuler::addGuide( const QPoint &, bool, int ); It will finish the inserting of a guide from moveGuide().
Definition at line 711 of file KoGuides.cpp. |
|
Find the closesed disance to the next guide within the given distance.
Definition at line 614 of file KoGuides.cpp. |
|
Get the position of the guide lines. This filles the passed lists with the positions of the guide lines. The lists will be emptied before any positions are added.
Definition at line 336 of file KoGuides.cpp. |
|
Signal that shows that the guide lines are changed. This signal is emmited when the guide lines are changed ( moved / deleted )
|
|
Definition at line 266 of file KoGuides.cpp. |
|
Handle mouseMoveEvent. If the mouse button is pressed and a guide was selected it moves the selected guides. If the mouse is moved over a guide line the cursor gets updated.
Definition at line 203 of file KoGuides.cpp. |
|
Handle mousePressEvent. This checks if a mousePressEvent would affect a guide line. If the mouse is pressed over a guide line it gets selected. Guide lines which were select get unselect. If also the Ctrl Key is pressed the selection of the guide gets toggled. If no guide is under the position all guides get deselected.
Definition at line 130 of file KoGuides.cpp. |
|
Definition at line 230 of file KoGuides.cpp. |
|
Move Guide. This slot can be connected to void KoRuler::moveGuide( const QPoint &, bool, int ); It will add a new guide when you move from the ruler to the canvas. After that it moves the guide.
Definition at line 680 of file KoGuides.cpp. |
|
This signal is emitted when guides start/stop moving.
|
|
This signal is emitted when guides start/stop painting. With this signal it is possible to only repaint the guides in the paint method of the canvas. Just set/unset a flag when this signal is emmited. This signal is emitted before and after a repaint is done.
|
|
Paint the guides.
Definition at line 92 of file KoGuides.cpp. |
|
repaint guides so none is snapped This issues a paint request if any guides have changed snapping status. It also effectively un-snaps all since it doesn't take an argument Definition at line 588 of file KoGuides.cpp. |
|
repaint guides if any changed snapping status This issues a paint request if any guides have changed snapping status.
Definition at line 533 of file KoGuides.cpp. |
|
repaint guides if any changed snapping status This issues a paint request if any guides have changed snapping status.
Definition at line 479 of file KoGuides.cpp. |
|
Set the positions for snapping of auto guide lines. This removes all existing auto guide lines and set up new ones at the positions given.
Definition at line 312 of file KoGuides.cpp. |
|
Set the guide lines. This removes all existing guides and set up new ones at the positions given.
Definition at line 286 of file KoGuides.cpp. |
|
Snap rect to guidelines. This looks fo a guide which is in reach for the guide as defined in snap.
Definition at line 432 of file KoGuides.cpp. |
|
Snap rect to guidelines. This looks for a guide which is in reach for the guide as defined in snap. This method has the abillity to combine more calls. The snapStatus and diff args are both input and output. On first call you should set snapStatus to 0. The return value would then show in which directions it has snapped. If you combine several KoGuides you can let these output arguments be input for the next koGuide. That way you'll always catch the nearest guide.
Definition at line 368 of file KoGuides.cpp. |
The documentation for this class was generated from the following files: