We have moved to https://dokuwiki.librecad.org/

Lots of content was already moved to the new wiki, but there is still work to do. If you want to contribute, please register a new account at https://dokuwiki.librecad.org/

This wiki will be kept for a while to keep search engine results valid. Moved sites may be deleted here in future.

Difference between revisions of "API & Development"

From LibreCAD wiki
Jump to: navigation, search
(Factories:)
(added description about cleanup mode in RS_GraphicView)
Line 22: Line 22:
  
 
Base class for all CAD entity types
 
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.

Revision as of 14:15, 30 May 2013

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.