API & Development

From LibreCAD wiki
Revision as of 14:15, 30 May 2013 by Dli (Talk | contribs)

Jump to: navigation, search

Factories

QG_ActionHandler :

Responsible for starting CAD actions

RS_EventHandler :

Responsible for routing UI events

QG_ActionFactory :

Generate GUI actions and connection to CAD actions

QG_DialogFactory

Access to GUI interface: Qt widgets

CAD Entities

RS_Entity

Base class for all CAD entity types

RS_GraphicView

Cleanup mode

There are some segfaults by action( rs_action* methods) destructors caused by actions when closing the main window. These segfault can be fixed by detecting RS_GraphicView cleanup in action destructors.

A method to detect cleanup is added:

bool RS_GraphicView::isCleanUp() const;

whenever isCleanUp() returns true, action destructors should not try to cleanup, as entities may be deleted already.

TODO: We need a better solution probably by smart pointers.