Commit Graph

31 Commits

Author SHA1 Message Date
wmayer
e09d8aaba6 Gui: modernize C++: use range-based for loop 2023-08-14 19:42:18 +02:00
wmayer
6d95d8fc9c Gui: expose grabFramebuffer to Python 2023-08-03 01:31:15 +02:00
wmayer
5010ac7508 Gui: allow to change background color and gradient from Python 2023-04-04 18:44:27 +02:00
wmayer
d6190cb79c Gui: add enum types to handle background gradients
This fixes some API flaws where booleans were used to distinguish between three different types
2023-04-04 18:44:27 +02:00
xtemp09
414c803ff3 [GUI] Radial gradient implementation
This commit implements radial gradient as background and adds the option
to settings. It also renames "Color gradient" as "Linear gradient",
keeping Linear gradient default. Internally, it remains unchanged for
compatibility.

Radio gradient is more suitable for CAD, since it gives a more balanced
color distribution across the screen, improving visibility of model and
sketches with a halo-like effect.
2023-04-02 16:33:01 +07:00
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
wmayer
ab6c75fad9 Core: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 14:04:05 +02:00
wmayer
d5340a82ab Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
marioalexis
ae56fb62a7 Gui: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
713151df03 [Gui] only include the actually used inventor files 2022-03-17 21:12:19 +01:00
wmayer
1f12dca2b4 Py: replace BaseExceptionFreeCADError with more suitable exception types 2022-03-17 13:54:23 +01:00
Uwe
d6b7b91ab4 [Gui] View3D*: remove unused includes 2022-03-05 23:16:28 +01:00
wmayer
94a881f829 Gui: harmonize classes View3DInventorViewer and View3DInventorPy 2021-12-12 11:33:04 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
luz.paz
04ba2872f0 src/Gui: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Gui` files
2019-12-25 11:39:17 +01:00
luz.paz
63a577fe07 Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
d4ac072306 Gui: support in-place editing
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.

See [here](https://git.io/fjPIk) for more info about the relavent APIs.

This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.

This patch also includes necessary modification of the 'Show' module to
support in-place editing.
2019-08-17 15:08:32 +02:00
Yorik van Havre
40a893e52f Gui: Added Gui.doc.view.viewer.setBackgroundColor() py method 2019-04-09 16:52:08 -03:00
wmayer
2271280906 expose method to Python to switch on/off event redirection 2018-09-25 10:13:34 +02:00
wmayer
8943dc5fdf expose methods to Python to change navi cube settings 2018-07-29 11:32:54 +02:00
luz.paz
43244aa762 More misc. typos 2018-05-19 12:17:52 -04:00
wmayer
99ec96acd5 prepare for PyCXX 7.0 2018-04-18 19:20:50 +02:00
wmayer
e2398b4b06 fix Coverity issues 2016-08-21 14:03:02 +02:00
DeepSOIC
5d70709c65 Gui: Selection: Py interface for setting pick radius
Gui.ActiveDocument.ActiveView.getViewer().setPickRadius(new_val)
2016-08-10 18:46:45 +02:00
wmayer
1f77d98fab + add methods to get/set scene graph, add parameter to set window title of viewer 2016-05-01 17:50:40 +02:00
wmayer
c5aebfa872 Squashed commit of the following:
commit 89eb699e69c05dda0ebecf4aa22acc85386ede8f
Author: looooo <sppedflyer@gmail.com>
Date:   Wed Apr 27 21:43:16 2016 +0200

    added close function

commit 2acc25adbc9df47194934ef4db18383919248c7d
Author: looooo <sppedflyer@gmail.com>
Date:   Wed Apr 27 21:12:18 2016 +0200

    some additions to the split-view-bindings

commit ec366d154a96a71c7716900f4de1c109a9160df8
Author: looooo <sppedflyer@gmail.com>
Date:   Sun Apr 24 20:55:26 2016 +0200

    SplitView: Antia-Aliasing, getViewer, handlinging of deletion
    added anti-aliasing for the SplitView3DInventor class
    added method getViewer to the AbstractSplitView
    delete python-object when c++ object gets deleted

commit 7225cd836b0001d302c9e14328b5eb7dd489cdb1
Author: looooo <sppedflyer@gmail.com>
Date:   Sun Apr 24 15:28:57 2016 +0200

    added function Gui.createViewer([int])->Viewer/SplitViewer
2016-05-01 15:46:53 +02:00
wmayer
214306edc8 + whitespace improvement 2015-12-27 19:16:05 +01:00
wmayer
bf2194460f + fix bug in Python binding of Quarter viewer 2014-10-24 19:29:35 +02:00
Stefan Tröger
6b629aed56 add View3DInventorViewer python interface
As quarter is not wrapped by SWIG we need to expose our own python interface class.
This is a start with the most important functions to access the render and event
manager. Furthermore all extra functions available next to the swig wrapper functions
are exposed. Everything else can be added when needed.
2014-09-23 10:11:12 +02:00