Commit Graph

59 Commits

Author SHA1 Message Date
marioalexis
ff1b4eff05 Gui: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
ae53c9b0a4 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
wmayer
07ccb73fe7 Partially revert "Remove unused code into GUI" 2022-07-17 12:32:03 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
d5340a82ab Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
Zheng, Lei
8bec44934b Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
5df3dbae6f Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
b78dc894e1 Core: Fix several coverity issues:
* CID 350582: Big parameter passed by value
* CID 350639: Big parameter passed by value
* CID 305234: Uncaught exception
* CID 316529: Uncaught exception
* CID 350597: Uncaught exception
* CID 350623: Uncaught exception
* CID 332690: Uncaught exception
* CID 332700: Unchecked return value
* CID 350576: Uninitialized scalar field
* CID 350587: Uninitialized scalar variable
* CID 192606: Uninitialized scalar field
* CID 332699: Uninitialized pointer field
* CID 350561: Dereference null return value
* CID 350610: Dereference null return value
* CID 350567: Dereference after null check
2022-03-13 13:53:32 +01:00
Uwe
8f4053e31d [Gui] ViewProviderPython* etc.: remove unused includes 2022-03-06 02:24:52 +01:00
wmayer
739804b511 Mod: add string header to dxf.h 2022-03-01 17:18:29 +01:00
Uwe
08a43f03ed [Gui] remove unused headers 2022-02-19 03:41:28 +01:00
wmayer
21ba35adab Gui: move PythonWrapper class to its own source file 2021-09-22 23:30:03 +02:00
wmayer
bb73b571f7 App/Gui: fix possible crash when destroying Python feature or its view provider 2021-02-17 12:00:38 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
Zheng, Lei
15d04447d5 Gui: fix ViewProviderPythonFeature::getLinkedViewProvider 2020-08-07 17:20:55 +02:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
730154a684 boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +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
wmayer
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
b2893691cf Gui: improve Gui.addIcon(), add Gui.isIconCached()
The motivation of this patch is to make it easy for Python workbench
cache its own icons (possibly generated at runtime), saving the trouble
of pre-compiling the icons as binary resources.

* Gui.addIcon() now support a third argument as format. Default format
  is 'XPM' as before. The intention is to allow user to cache other
  format of icon image, like 'PNG'.

* ViewProviderPythonFeature::getIcon() now checks if the given string
  argument is a key to a cached icon.
2019-09-07 16:01:19 +02:00
wmayer
d05ae18340 fix -Wreturn-std-move 2019-09-07 15:19:28 +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
wmayer
2f359cbee1 correctly handle again NotImplementedError in Python view providers 2019-02-22 13:26:33 +01:00
wmayer
4192b88298 fixes 0003804: FC becomes unusable after double-cicking on FEM elements while clip view is active 2019-02-15 23:30:18 +01:00
wmayer
36271b4052 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
wmayer
6ceee1f6b2 returning a boolean from setEdit/unsetEdit of a Python view provider indicates a handled edit mode, None indicates to forward it to the C++ view provider 2018-10-03 17:39:22 +02:00
markus
80c1e0417d Return NotImplemented on PythonFeature::setEdit if the setEdit is implemented and returns True for one of the standard, not Default, edit modes 2018-10-03 16:49:10 +02:00
wmayer
74c0ba5fcf fixes #0003564: Python objects: updateData calls to proxy instance that should have been deleted 2018-08-25 16:33:22 +02:00
wmayer
8a16eec936 fixes #0003424: 'basic_string::_M_construct null not valid' when opening a v0.16 project with v0.17 2018-04-10 10:51:34 +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
577ed59fbc switch to PySide2 for Qt5 2016-12-24 15:33:15 +01:00
wmayer
a012f6ba49 remove obsolete class ViewProviderPythonFeaturePy 2016-11-09 12:15:15 +01:00
wmayer
1e6dcabefc fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02: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
8e2b45b245 + build failure 2015-03-31 13:00:42 +02:00
wmayer
85ae6ad4bb + support context-menu in Python view providers 2015-03-31 11:32:43 +02:00
Sebastian Hoogen
d2bb75566e add encoding parameter to .as_std_string()
to handle PyUnicode Objects. Usually ASCII for object names and Utf-8
for file names and console output.
issue #995
2015-02-08 15:37:00 +01:00
jriegel
d0d832896a Merge remote-tracking branch 'refs/remotes/origin/jriegel/NewWinBuild' into jriegel/review-NewLibPack
Conflicts:
	src/3rdParty/salomesmesh/CMakeLists.txt
2014-08-27 15:39:00 +02:00
wmayer
a50743041b + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
jriegel
d46e0d0cb6 some type clearification 2014-08-21 17:59:33 +02:00
wmayer
5b43758db7 + fixes #0001522: SIGSEGV, crashes on long script (500 Lines) 2014-05-03 17:58:57 +02:00
wmayer
8aac094b06 + Selection handling of Python view providers 2013-10-26 22:15:20 +02:00
wmayer
d761e01511 + Selection handling of Python view providers 2013-10-26 19:52:22 +02:00
wmayer
4c005e4602 + Interface for selection of Python view providers 2013-10-25 15:07:39 +02:00