QCAD
Open Source 2D CAD
EventHandler Class Reference

Event handler class. More...

Public Member Functions

void dragEnter (void event)
 
void drawInfoLabel (void painter, void textLabel)
 
void drawSnapLabel (void painter, void pos, void posRestriction, void text)
 
void drop (void event)
 Handles drop into the drawing area. More...
 
void EventHandler (void viewport, void documentInterface)
 
void horizontalScrolled (void pos)
 
void updateSnapInfo (void painter, void snap, void restriction)
 Called on every repaint of a view to update snap related information. More...
 
void updateTextLabel (void painter, void textLabel)
 
void verticalScrolled (void pos)
 
void viewportChanged ()
 Called whenever the current viewport changed through panning or zooming. More...
 

Public Attributes

int document
 
int documentInterface
 
int graphicsView
 
int hruler
 
int hsb
 
int vpWidget
 
int vruler
 
int vsb
 

Detailed Description

Event handler class.

For each new document that is created or opened, an event handler is created to handle various events for the life time of the document.

Constructor & Destructor Documentation

void EventHandler::EventHandler ( void  viewport,
void  documentInterface 
)
inline

Member Function Documentation

void EventHandler::dragEnter ( void  event)
inline
void EventHandler::drawInfoLabel ( void  painter,
void  textLabel 
)
inline
void EventHandler::drawSnapLabel ( void  painter,
void  pos,
void  posRestriction,
void  text 
)
inline
void EventHandler::drop ( void  event)
inline

Handles drop into the drawing area.

Parameters
eventQDropEvent
void EventHandler::horizontalScrolled ( void  pos)
inline
void EventHandler::updateSnapInfo ( void  painter,
void  snap,
void  restriction 
)
inline

Called on every repaint of a view to update snap related information.

Parameters
painterQPainter for the view in screen coordinates.
snapCurrent snap.
void EventHandler::updateTextLabel ( void  painter,
void  textLabel 
)
inline
void EventHandler::verticalScrolled ( void  pos)
inline
void EventHandler::viewportChanged ( )
inline

Called whenever the current viewport changed through panning or zooming.

Updates the scroll bars, rulers, etc.

Member Data Documentation

int EventHandler::document
int EventHandler::documentInterface
int EventHandler::graphicsView
int EventHandler::hruler
int EventHandler::hsb
int EventHandler::vpWidget
int EventHandler::vruler
int EventHandler::vsb

The documentation for this class was generated from the following file: