Commit Graph

30 Commits

Author SHA1 Message Date
wmayer
d0e5a281c6 Gui: [skip ci] merge icons of extensions of view provider of a Python feature 2020-11-22 11:15:11 +01:00
wmayer
3c7ae4f3e3 0004441: Changing Placement of a App::Part that contains a Part::FeaturePython causes drawing of a ghost object at original Placement [skip ci] 2020-09-24 17:39:17 +02:00
wmayer
f77bfe3e57 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
7dc81c76c7 fixes #0004193: ViewProviders do not inform observers about Proxy property change 2020-01-13 02:30:10 +01:00
wmayer
a9f820470b fix some const correctness 2019-12-29 17:13:18 +01:00
Zheng, Lei
42987f8612 Gui: fix ViewProviderPythonFeature getDetail() 2019-10-22 17:07:28 +02:00
Zheng, Lei
0f29155502 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
fd0f4f5654 Split App::AutoTransaction into its own file 2019-09-10 14:17:07 +02:00
wmayer
5172c3bc08 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
08f0511b1f 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
f4205130ae 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
a5bc70cca0 remove properties from transactions when being deleted 2017-08-28 21:20:17 +02:00
wmayer
38388cf650 remove undesired virtual keyword from ViewProviderPythonFeatureImp 2017-04-28 21:15:53 +02:00
Yorik van Havre
765e164b0b Gui: implemented isShow() for python viewproviders 2017-04-28 15:03:47 -03:00
wmayer
f55635900f fix setEdit, unsetEdit and doubleClicked methods of Python view provider 2017-02-20 22:16:56 +01:00
wmayer
72ab17fb48 fix typos 2016-12-19 14:07:35 +01:00
wmayer
07a2182674 remove obsolete class ViewProviderPythonFeaturePy 2016-11-09 12:15:15 +01:00
wmayer
53d323b5e0 + make isReadOnly & isHidden of PropertyContainer non-virtual 2015-11-14 02:07:57 +01:00
wmayer
919d47015a + support of drag'n'drop for custom view provider 2015-11-03 16:21:51 +01:00
wmayer
6b3d7b17a7 + implement onDelete for Python proxy of view provider 2015-07-16 16:13:39 +02:00
wmayer
27863408c9 + remove references to SoFCSelection where not needed 2015-05-20 19:24:12 +02:00
wmayer
1d4de73415 + support context-menu in Python view providers 2015-03-31 11:32:43 +02:00
wmayer
bdfaaee833 + fixes #0001869: Clones displayed in wrong view mode 2015-01-12 19:36:04 +01:00
wmayer
cc775f9254 + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
wmayer
2d62de2932 + Interface for selection of Python view providers 2013-10-25 15:07:39 +02:00
jriegel
1b7acb839b add double click handling to the PythonViewProvider template 2013-08-04 19:20:54 +02:00
wmayer
b7658c04f6 0001059: Cannot add object to DocumentObjectGroupPython 2013-03-23 16:45:37 +01:00
wmayer
77144681ef 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