kivio

KivioCanvas Class Reference

List of all members.

Detailed Description

Definition at line 60 of file kivio_canvas.h.


Public Types

 Insert
 Rubber
enum  RectType { Insert, Rubber }

Public Slots

virtual void setUpdatesEnabled (bool)
void zoomIn (const QPoint &)
void zoomOut (const QPoint &)
void scrollDx (int dx)
void scrollDy (int dy)
void scrollV (int value)
void scrollH (int value)
void updateScrollBars ()
void startPasteMoving ()
void updateAutoGuideLines ()

Signals

void visibleAreaChanged ()

Public Member Functions

 KivioCanvas (QWidget *, KivioView *, KivioDoc *, QScrollBar *, QScrollBar *)
 ~KivioCanvas ()
int xOffset () const
int yOffset () const
const KivioPageactivePage () const
KivioPageactivePage ()
KivioPagefindPage (const QString &_name)
KivioViewview () const
KivioDocdoc () const
QSize actualSize () const
virtual bool event (QEvent *)
void startRectDraw (const QPoint &p, RectType t)
void continueRectDraw (const QPoint &p, RectType t)
void endRectDraw ()
QRect rect () const
void startSpawnerDragDraw (const QPoint &p)
void continueSpawnerDragDraw (const QPoint &p)
void endSpawnerDragDraw ()
void drawSelectedStencilsXOR ()
void drawStencilXOR (KivioStencil *)
KoPoint snapToGrid (const KoPoint &)
KoPoint snapToGuides (const KoPoint &, bool &, bool &)
KoPoint snapToGridAndGuides (const KoPoint &)
KoPoint mapFromScreen (const QPoint &)
QPoint mapToScreen (const KoPoint &)
void beginUnclippedSpawnerPainter ()
void endUnclippedSpawnerPainter ()
void setViewCenterPoint (const KoPoint &)
KoRect visibleArea ()
void setVisibleArea (KoRect, int margin=0)
void setVisibleAreaByWidth (KoRect, int margin=0)
void setVisibleAreaByHeight (KoRect, int margin=0)
KoGuides & guideLines ()
int pageOffsetX () const
int pageOffsetY () const
void setShowConnectorTargets (bool state)
bool showConnectorTargets () const

Protected Slots

void borderTimerTimeout ()

Protected Member Functions

virtual void mousePressEvent (QMouseEvent *)
virtual void mouseReleaseEvent (QMouseEvent *)
virtual void mouseMoveEvent (QMouseEvent *)
virtual void enterEvent (QEvent *)
virtual void leaveEvent (QEvent *)
virtual void resizeEvent (QResizeEvent *)
virtual void paintEvent (QPaintEvent *)
virtual void wheelEvent (QWheelEvent *)
virtual void dragEnterEvent (QDragEnterEvent *)
virtual void dragMoveEvent (QDragMoveEvent *)
virtual void dragLeaveEvent (QDragLeaveEvent *)
virtual void dropEvent (QDropEvent *)
virtual void keyPressEvent (QKeyEvent *)
void beginUnclippedPainter ()
void endUnclippedPainter ()
void paintSelectedXOR ()
void continuePasteMoving (const QPoint &pos)
void endPasteMoving ()

Friends

class KivioView

Member Function Documentation

void KivioCanvas::beginUnclippedSpawnerPainter (  ) 

Creates a new spawner drawing object.

Definition at line 695 of file kivio_canvas.cpp.

void KivioCanvas::continueSpawnerDragDraw ( const QPoint &  p  ) 

Undraws the old stencil outline, draws the new one.

Definition at line 596 of file kivio_canvas.cpp.

void KivioCanvas::dragEnterEvent ( QDragEnterEvent *  e  )  [protected, virtual]

Handles the initial drag event.

Parameters:
e The event
This will check to make sure the drag object is of the correct mimetype. If it is, it accepts it, and the calls startSpawnerDragDraw which will allocate a new drawing object and set some class variables for future drawing.

Definition at line 822 of file kivio_canvas.cpp.

void KivioCanvas::dragLeaveEvent ( QDragLeaveEvent *   )  [protected, virtual]

Handles when a drag leaves this object.

Parameters:
e The event object
This will call endSpawnerDragDraw() which terminates the drawing object and ends interaction with the drag.

Definition at line 892 of file kivio_canvas.cpp.

void KivioCanvas::dragMoveEvent ( QDragMoveEvent *  e  )  [protected, virtual]

Handles drag-move events.

Parameters:
e The event
This makes sure the drag object is of type kivio/stencilSpawner since these are currently the only type of mime-types accepted. If so, it accepts the event, and then tells the drawing object to update itself with a new position.

Definition at line 844 of file kivio_canvas.cpp.

void KivioCanvas::dropEvent ( QDropEvent *  e  )  [protected, virtual]

Handles drops for this object.

Parameters:
e The drop event object
This function takes care of handling the final drop event of this object. It will allocate a new object of the currently dragged Spawner type (stencil), and add it to the active page of the document (which actually adds it to the active layer of the active page).

Definition at line 865 of file kivio_canvas.cpp.

void KivioCanvas::endSpawnerDragDraw (  ) 

Ends the ability to draw a drag & drop spawner object.

Definition at line 663 of file kivio_canvas.cpp.

void KivioCanvas::endUnclippedSpawnerPainter (  ) 

Deletes the current spawner drawing object.

Definition at line 726 of file kivio_canvas.cpp.

void KivioCanvas::startSpawnerDragDraw ( const QPoint &  p  ) 

Starts a new drag & draw (called from the drag enter event).

Parameters:
p The point to begin at
This will allocate a new KivioStencil for drawing with and set some class variables used during redraws.

Definition at line 547 of file kivio_canvas.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys