Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
icl::qt::DefineQuadrangleMouseHandler Class Reference

Special MouseHandler Implementation that allows for defining a quadrangle. More...

#include <DefineQuadrangleMouseHandler.h>

Inheritance diagram for icl::qt::DefineQuadrangleMouseHandler:
icl::qt::MouseHandler icl::utils::Uncopyable icl::utils::Lockable

List of all members.

Public Member Functions

 DefineQuadrangleMouseHandler ()
 empty constructor (creates a null handler)
 DefineQuadrangleMouseHandler (const utils::Size &maxSize, bool convexOnly=true)
 constructor with given max size
virtual void process (const qt::MouseEvent &e)
 MouseHandler interface.
virtual ~DefineQuadrangleMouseHandler ()
 destructor
void init (const utils::Size &maxSize, bool convexOnly=true)
 deferred intialization method
void setOffset (const utils::Point &p)
 sets an offset that shifts both in- and outputs
void setHandleSize (float size)
 sets the size of the handles
std::vector< utils::PointgetQuadrangle () const
 returns the current quadrangle
void setQuadrangle (const utils::Point ps[4]) throw (utils::ICLException)
 sets the current quadrangle
bool isNull () const
 returns whether this mousehandler has been initialized yet
utils::VisualizationDescription vis () const
 returns a visualization

Private Attributes

Data * m_data
 pimpl type

Detailed Description

Special MouseHandler Implementation that allows for defining a quadrangle.

The resulting quadrangle (defined by it's four corners points) can be restricted to be always convex. The quadrangle is initialized as a rectangle that is 20 px smaller than the given max-size rectangle.


Constructor & Destructor Documentation

empty constructor (creates a null handler)

icl::qt::DefineQuadrangleMouseHandler::DefineQuadrangleMouseHandler ( const utils::Size maxSize,
bool  convexOnly = true 
)

constructor with given max size

The maxSize must be identical to the image the mousehandler is used as a overlay with. Convex means that the quadrangle is convex and that its opposing edges do not intersect

destructor


Member Function Documentation

returns the current quadrangle

void icl::qt::DefineQuadrangleMouseHandler::init ( const utils::Size maxSize,
bool  convexOnly = true 
)

deferred intialization method

returns whether this mousehandler has been initialized yet

virtual void icl::qt::DefineQuadrangleMouseHandler::process ( const qt::MouseEvent e) [virtual]

MouseHandler interface.

Reimplemented from icl::qt::MouseHandler.

sets the size of the handles

sets an offset that shifts both in- and outputs

sets the current quadrangle

If the given quadrangle is not completely covered by the image rect, or the convexOnly flag is activated and the given quadrangle is not convex, an exception is thrown

returns a visualization


Member Data Documentation

pimpl type

pimpl pointer


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines