Commit Graph

28 Commits

Author SHA1 Message Date
wmayer
4bbdfb5f7b PVS: V768 The expression is of enum type. It is odd that it is used as an expression of a Boolean-type. 2020-07-18 10:59:28 +02:00
wmayer
006fada679 fixes #0004193: ViewProviders do not inform observers about Proxy property change 2020-01-13 02:30:10 +01:00
wmayer
a5630bc689 fix some const correctness 2019-12-29 17:13:18 +01:00
Zheng, Lei
6b0823bc18 Gui: fix ViewProviderPythonFeature getDetail() 2019-10-22 17:07:28 +02:00
Zheng, Lei
d3dea0178d App/Gui: unify NotImplementedError handling in python features
Recognize NotImplementedError as an indication to call the C++
implementation.
2019-09-27 18:01:54 +02:00
Zheng, Lei
f1b569621a Split App::AutoTransaction into its own file 2019-09-10 14:17:07 +02:00
wmayer
4068df6483 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wunused-variable
+ fix -Wbraced-scalar-init
+ fix -Wparentheses (View3DInventorViewer::checkGroupOnTop: operator '?:' has lower precedence than '+'; '+' will be evaluated first)
+ fix -Wundefined-bool-conversion (MainWindow::updateActions)
+ suppress -Woverloaded-virtual but fix later
2019-08-17 19:52:12 +02:00
Zheng, Lei
ad57821cf9 Python feature/observer related changes
* Add new API and signal handler in document observer

* Pre initialize python handler function to improve performance. In
  case Python code use dynamic patching, i.e. add class method at
  runtime (which is rare and should be discouraged), the python feature
  can be re-initialized by simply assign proeprty Proxy again.

* Add property tracking in DocumentObjectT

* WidgetFactory adds support for accepting python QIcon, which is used
  by ViewProviderPythonFeature
2019-08-17 15:08:34 +02:00
Zheng, Lei
be6ec3fdfc App: Property related API changes
Property:

* Extended property status bitset. Mirror most of PropertyType and
  allow dynamic change property type.

* Cache property name and type to improve performance

* Centralize property status change signalling

* Change aboutToSetValue()/hasSetValue() to virtual

* Add new API getFullName() to obtain full quanlified name of the property

AtomicPropertyChangeInterface:

* Allow calling aboutToSetValue()/hasSetValue() when actually changed

PropertyLists:

* Refactor implementation by an abstract class PropertyListBase and a
  template class PropertyListsT, to allow better code reuse.
  PropertyListT is derived from AtomicPropertyChangeInterface to allow
  more efficient change on individual elements.

* All list type property now accept setting python value as a dictionary
  with index as key to set individual element of a list.

* Add touch list for more efficient handling of value changes. The list
  contains the index of changed value. And empty touch list should be
  treated as the entire list is changed. PropertyContainerPy expose this
  functionality with getPropertyTouchList().

PropertyPersistentObject:

* New property to allow dynamic creation of any FreeCAD object derived
  from Base::Persistence, and use it as a property.

DynamicProperty:

* Use boost multi_index_container for efficient property lookup while
  keeping order.

* Modify to be allowed to use in PropertyContainer directly

PropertyContainer:

* Use boost multi_index_container for efficient property lookup while
  keeping order.

* Allow adding/removing dynamic property on all property container

* Modify Save/Restore() to persist property status, and better handle
  transient property which can now be dynamically enabled/disabled per
  object.

* Add new API getFullName() to obtain full quanlified name of the property.
  Implemented by Document, DocumentObject, and also
  ViewProviderDocumentObject if future patch

DocumentObject and FeaturePython are modified to accommondate the
dynamic property changes.

Removed get/setCustomAttribute() implementation from DocumentObjectPy,
and rely on PropertyContainerPy for the implementation, because of the
additional dynamic property support in property container.

Gui::ViewProviderDocumentObject, which is derived from
PropertyContainer, is also modified accordingly
2019-08-17 14:52:09 +02:00
wmayer
a5bf15b55d remove properties from transactions when being deleted 2017-08-28 21:20:17 +02:00
wmayer
beff8eb3ca remove undesired virtual keyword from ViewProviderPythonFeatureImp 2017-04-28 21:15:53 +02:00
Yorik van Havre
77f652ea2f Gui: implemented isShow() for python viewproviders 2017-04-28 15:03:47 -03:00
wmayer
8d19b38550 fix setEdit, unsetEdit and doubleClicked methods of Python view provider 2017-02-20 22:16:56 +01:00
wmayer
b19a4246ab fix typos 2016-12-19 14:07:35 +01:00
wmayer
a012f6ba49 remove obsolete class ViewProviderPythonFeaturePy 2016-11-09 12:15:15 +01:00
wmayer
0cddf520d0 + make isReadOnly & isHidden of PropertyContainer non-virtual 2015-11-14 02:07:57 +01:00
wmayer
123f182c96 + support of drag'n'drop for custom view provider 2015-11-03 16:21:51 +01:00
wmayer
8850da2315 + implement onDelete for Python proxy of view provider 2015-07-16 16:13:39 +02:00
wmayer
cab441cf2a + remove references to SoFCSelection where not needed 2015-05-20 19:24:12 +02:00
wmayer
85ae6ad4bb + support context-menu in Python view providers 2015-03-31 11:32:43 +02:00
wmayer
f2d90bc49d + fixes #0001869: Clones displayed in wrong view mode 2015-01-12 19:36:04 +01:00
wmayer
a50743041b + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
wmayer
4c005e4602 + Interface for selection of Python view providers 2013-10-25 15:07:39 +02:00
jriegel
d0494bad26 add double click handling to the PythonViewProvider template 2013-08-04 19:20:54 +02:00
wmayer
90aed2baf4 0001059: Cannot add object to DocumentObjectGroupPython 2013-03-23 16:45:37 +01:00
wmayer
dca1b4bf5c Allow to remove user-defined properties 2012-11-04 13:24:22 +01:00
wmayer
e95de7090d + add method to get SoDetail from element name
+ fix broken selection mechanism

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5260 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-10 21:11:20 +00: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