Commit Graph

97 Commits

Author SHA1 Message Date
Zheng, Lei
899fb722ea ViewProvider/ViewProviderExtension: various new APIs
Some of these new APIs are not strictly needed for Link to work, but
good to have.

Summary of the API changes:

* getModeSwitch/getTransformNode() exposes view provider mode switch
  and transformation coin3D node, required by ViewProviderLink to
  override placement and visibility.

* canAddToSceneGraph() inform 3D viewer whether to add the root node to
  scenegraph. Some object only exists as a child of some coordinate
  system. Not adding them can simplify scenegraph and visibility
  management.

* showInTree() inform tree view whether to show the corresponding tree
  item.

* getDefaultMode() to expose the current active mode regardless of the
  view provider's visibility

* (can)DropObjectEx() superseds (can)DropObject() with additional
  support of subname reference, which makes it easy to support linking
  to sub-objects. One of the use case is cross coordinate system
  linking.

* getDropPrefix() is used to tell tree view where the object is dropped
  into. A non empty return means the object is actually dropped into a
  sub-object. For example, Assembly3 container puts all dropped object
  into its child container PartGroup.

* canDragAndDropObject() is used to inform tree view whether the object
  dropped need to be dragged out of its original parent, which usually
  does not make sure for Link type object.

* beforeDelete() will be called by Gui::Document when either the
  object itself is being deleted or when the document is being
  destoried.

* is/setLinkVisibility() allows to show/hide a link to this object.
  This may be used during editing, to prevent showing editing geometry
  in multiple places.

* update() is made a virtual function, it will be overridden by
  ViewProviderDocumentObject in future patch.

* startEditing() now becomes virtual, and return a ViewProvider that
  actually handles the editing. This is for future Link type object to
  forward editing request

* covert(), convenience function to convert between Coin3D and FC matrix

ViewProviderExtension also gains many relavant extension point of the
new API. There is also the new extensionModeSwitchChange() for notifying
mode switch changes

ViewProviderPy exposes several method/attribute for the new API as well.
2019-08-17 14:52:10 +02:00
Abdullah Tahiri
489f48a223 Gui::Add mergeoverlay function to ViewProviderExtension 2019-06-23 01:03:36 +02:00
Abdullah Tahiri
79b54c3494 Gui: Extend ViewProvider to enable merging of overlays on icon 2019-06-23 01:03:35 +02:00
plgarcia
77232b2141 Drags and drop with groups 2018-11-29 21:25:28 +01:00
wmayer
f513305916 fix crash with Py3 when releasing memory buffer 2018-10-29 11:59:34 +01:00
wmayer
869fb99595 improve whitespaces 2018-10-18 23:31:55 +02:00
Zheng, Lei
31f2ebdf55 ViewProvider: fix potential crash when exit editing 2018-09-20 12:47:19 +02:00
wmayer
53bd021b97 improve exception handling in ViewProvider::eventCallback 2018-07-30 12:25:54 +02:00
luzpaz
a225b13bef Misc. typos
- Tooltip uniformity 
- source comment typo fixes
- remove double whitespaces
2017-11-24 09:45:08 -02:00
wmayer
4d63e9a4c4 various minor changes:
+ whitespace improvement
+ code cleanup
2017-11-21 17:51:22 +01:00
wmayer
48155db774 issue #0002080: Attempt to remove FEM analysis result (displacement & stress) results in false warning 2017-10-18 19:46:20 +02:00
wmayer
62329d1cf9 issue #0003070: VRML 2 crashes with corner cases 2017-06-11 16:41:52 +02:00
wmayer
fb7094bf31 use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
45198fb712 use names directly from document to set them in scene inspector 2017-01-30 22:29:26 +01:00
wmayer
411823860b avoid changing scenegraph while traversing it 2017-01-13 22:01:47 +01:00
wmayer
5de0f2b185 replace invalid characters in VRML string with underscore 2016-12-21 17:02:06 +01:00
wmayer
2468ab6e71 fix typos & whitespaces 2016-12-21 11:19:54 +01:00
wmayer
3dc611f3df fix CIDs 154872, 152491, 129453 2016-12-18 13:10:07 +01:00
wmayer
359a25d0c8 issue #0002802: Set a name to coin rootnodes of objects 2016-12-15 22:16:19 +01:00
wmayer
6782fe8086 fix dangling pointer, remove superfluous semicolons, avoid excessive report messages of extension object 2016-12-09 23:03:18 +01:00
Stefan Tröger
88728bc73d Extensions: Group fix for python 2016-12-04 19:50:42 +01:00
Stefan Tröger
3debf0d29e Fix rebase errors 2016-10-08 12:48:34 +02:00
Stefan Tröger
86f66c31da Extensions: Fix visibility restore issue 2016-10-08 12:48:34 +02:00
Stefan Tröger
5b9aea71d5 Extensions: Port ViewProvider of GeoFeatureGroup 2016-10-08 12:48:34 +02:00
Stefan Tröger
f61bb9062e Extensions: Port ViewProvider of groups 2016-10-08 12:48:34 +02:00
Stefan Tröger
b5f4023050 Extensions: Introduce ViewProviderExtension 2016-10-08 12:48:34 +02:00
wmayer
fb9cd567d3 fix msvc problems 2016-09-21 22:14:09 +02:00
wmayer
1e6dcabefc fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
DeepSOIC
8415bc32b6 Gui: Selection: pick radius support 2016-08-10 18:46:45 +02:00
wmayer
e471ebe1fb prepare view provider for undo/redo 2016-07-23 11:45:38 +02:00
wmayer
3d16ae0f04 prepare view provider for undo/redo 2016-07-23 11:45:21 +02:00
wmayer
a03ff7f63b + check for empty SoPath when using SoSearchAction 2016-04-16 16:54:41 +02:00
Stefan Tröger
6fa3b94ff1 Override mode works with non-toplevel viewprovider
And adopt the part design body to handle the override mode correctly
2016-04-12 18:12:23 +02:00
Stefan Tröger
0f8da717d9 fix sketch editing within transformed parts 2016-04-12 18:12:08 +02:00
jriegel
fd000dff8a Add highlighting of tree view items 2016-04-12 18:11:44 +02:00
wmayer
02e2117962 + add method to get display mask mode from view provider 2016-02-24 21:00:55 +01:00
Mateusz Skowroński
6942c23895 Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78

This change is Qt4/Qt5 neutral.
2016-01-05 16:43:33 +01:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
Stefan Tröger
512a2b94d2 Adaption of FreeCAD to QuarterWidget
-removes all soqtviewer references
-create a quarter adaptor class which implements missing functionality
-adopts freecad code to make use of SoRenderManager and changed View3DInventorViewer  interface
2014-09-23 10:11:11 +02:00
wmayer
839eced7a9 + fix more compiler warnings 2014-08-27 13:26:44 +02:00
wmayer
a50743041b + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
wmayer
17ce376924 + code cleanup 2014-08-16 14:15:46 +02:00
tanderson
b7a41fa382 implemented 2014-01-16 10:27:21 -02:00
wmayer
10a8c462b8 + Get exact point on data model when picking in 3d view 2013-11-21 12:50:49 +01:00
jriegel
61914bc772 Add all base system changes from the Assembly branch 2013-02-10 20:02:33 +01:00
logari81
1f3434fa6e Sketcher: implement box selection (based on mrlukeparry's work) 2012-09-04 14:14:03 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00