Commit Graph

18 Commits

Author SHA1 Message Date
tritao
9e08039ab6 App: Clean up XML bindings. 2025-02-12 01:54:27 +00:00
wmayer
5771c94523 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
Jonas Bähr
3e68d6fd50 Remove C++ escaping from *Py.xml templates
Now all escaping required for the C++ code generation is done when the
.cpp/.h files are generated. Previously, only newlines were escaped
automatically. This was a) inconsistent and b) leaked c++ details into
the xml data.
In addition, the escaping is now done in one central place, harmonizing
the three previous implementations.

Pre-existing c++ escape sequences in the XML files have been replaced by
their literal equivalent so that the resulting python doc sting remains
unchanged.
2023-08-16 13:17:25 +02:00
luzpaz
23af228b87 Fix various indentation issues (tabs->spaces) 2023-01-23 16:59:28 +01:00
marioalexis
53e02bc851 App: Improve docstrings in PropertyContainerPy.xml 2022-06-09 18:46:41 -04:00
Zheng, Lei
8cf3cf330b App/Gui: allow change dynamic property group and documentation
Exposed as PropertyContainerPy.setGroup/DocumentationOfProperty.

Added a menu action to property view for rename dynamic property group.
2021-11-14 20:45:09 -06:00
Markus Lampert
8fbbfb29d8 Expose PropertyEnumeration values list to python. 2020-12-31 20:06:02 -08:00
Zheng, Lei
673d035bb3 PropertyContainerPy: modified getPropertyByName()
Add 'checkOwner' argument to allow caller distinguish linked property
2019-08-17 15:32:48 +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
ickby
b262cf6e9f Persistence: Incorporate review feedback 2018-10-27 16:15:39 +02:00
ickby
4a7d49f8b6 Persistence: Enable binary dumps of properties 2018-10-27 16:15:09 +02:00
wmayer
df1e2642d0 replacement for PR 698 2017-04-27 23:05:40 +02:00
Kunda
3017173c9a source typo fixes pt6 2017-03-07 13:43:46 -03:00
wmayer
c54311123b + Add method getEditorMode() to see if a property is hidden or read-only in the property editor 2014-07-29 11:36:42 +02:00
wmayer
4699856799 + Add method to get typeid of property via Python 2014-03-05 15:10:37 +01:00
wmayer
05b6123bb2 0000535: request for python editible Properties panels
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5273 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-12 12:40:08 +00:00
wmayer
3a4bb6ec4f 0000535: request for python editible Properties panels
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5271 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-11 21:20:00 +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