ResizeOverlay Class Reference

#include <resizeoverlay.h>

Inheritance diagram for ResizeOverlay:

Inheritance graph
[legend]
Collaboration diagram for ResizeOverlay:

Collaboration graph
[legend]
List of all members.

Public Slots

void slotMoveAllResizeHandles (double dx, double dy)

Public Member Functions

 ResizeOverlay (Item *parent)
 ~ResizeOverlay ()
ItemparentItem () const
void showResizeHandles (bool show)
void setVisible (bool visible)
virtual bool isValidXPos (ResizeHandle *rh)
virtual bool isValidYPos (ResizeHandle *rh)

Protected Slots

virtual void slotResizeHandleMoved (int id, double dx, double dy)=0

Protected Member Functions

void syncX (ResizeHandle *rh1, ResizeHandle *rh2)
void syncX (ResizeHandle *rh1, ResizeHandle *rh2, ResizeHandle *rh3)
void syncY (ResizeHandle *rh1, ResizeHandle *rh2)
void syncY (ResizeHandle *rh1, ResizeHandle *rh2, ResizeHandle *rh3)
ResizeHandleresizeHandle (int id)
ResizeHandlecreateResizeHandle (int id, ResizeHandle::DrawType drawType, int xsnap=1, int ysnap=1)
void removeResizeHandle (int id)

Protected Attributes

Itemp_item
ResizeHandleMap m_resizeHandleMap
bool b_showResizeHandles
bool b_visible

Detailed Description

Author:
David Saxton

Definition at line 116 of file resizeoverlay.h.


Member Function Documentation

void ResizeOverlay::showResizeHandles ( bool  show  ) 

Shows / hides the resize handles. They are hidden by default.

Definition at line 42 of file resizeoverlay.cpp.

References b_showResizeHandles, b_visible, and m_resizeHandleMap.

Referenced by DPRectangle::setSelected(), FlowContainer::setSelected(), DPText::setSelected(), and DPLine::setSelected().

void ResizeOverlay::setVisible ( bool  visible  ) 

Sets the visibility. Visibility is true by default.

Definition at line 53 of file resizeoverlay.cpp.

References b_showResizeHandles, b_visible, and m_resizeHandleMap.

Referenced by FlowContainer::setExpanded(), and FlowContainer::updateContainedVisibility().

virtual bool ResizeOverlay::isValidXPos ( ResizeHandle rh  )  [inline, virtual]

Reinherit this function to determine whether the X coordinate of the spot that the resize handle has moved into is valid or not

Reimplemented in RectangularOverlay.

Definition at line 137 of file resizeoverlay.h.

Referenced by ResizeHandle::moveRH().

virtual bool ResizeOverlay::isValidYPos ( ResizeHandle rh  )  [inline, virtual]

Reinherit this function to determine whether the Y coordinate of the spot that the resize handle has moved into is valid or not

Reimplemented in RectangularOverlay.

Definition at line 142 of file resizeoverlay.h.

Referenced by ResizeHandle::moveRH().

void ResizeOverlay::syncX ( ResizeHandle rh1,
ResizeHandle rh2 
) [protected]

Connects up the given resize handles so that they are always kept at the same horizontal coordinate

Definition at line 121 of file resizeoverlay.cpp.

Referenced by RectangularOverlay::RectangularOverlay(), and syncX().

void ResizeOverlay::syncY ( ResizeHandle rh1,
ResizeHandle rh2 
) [protected]

Connects up the given resize handles so that they are always kept at the same vertical coordinate

Definition at line 128 of file resizeoverlay.cpp.

Referenced by RectangularOverlay::RectangularOverlay(), and syncY().

ResizeHandle * ResizeOverlay::resizeHandle ( int  id  )  [protected]

Returns a pointer to the ResizeHandle with the given id, or 0 if no such handle exists

Definition at line 90 of file resizeoverlay.cpp.

References m_resizeHandleMap.

ResizeHandle * ResizeOverlay::createResizeHandle ( int  id,
ResizeHandle::DrawType  drawType,
int  xsnap = 1,
int  ysnap = 1 
) [protected]

Creates and attaches the resize handle with the given DrawType. If a ResizeHandle with the given id exists, will return a pointer to that instead

Definition at line 64 of file resizeoverlay.cpp.

References m_resizeHandleMap.

Referenced by LineOverlay::LineOverlay(), MechanicsItemOverlay::MechanicsItemOverlay(), and RectangularOverlay::RectangularOverlay().

void ResizeOverlay::removeResizeHandle ( int  id  )  [protected]

Removes the resize handle with the given id

Definition at line 77 of file resizeoverlay.cpp.

References m_resizeHandleMap.

Referenced by RectangularOverlay::removeBotMiddle(), and RectangularOverlay::removeTopMiddle().


The documentation for this class was generated from the following files:
Generated on Tue May 8 17:05:57 2007 for KTechLab by  doxygen 1.5.1