Commit Graph

29 Commits

Author SHA1 Message Date
wmayer
1f3e35e95c Gui: allow to change background color and gradient from Python 2023-04-04 18:44:27 +02:00
wmayer
eb3fd5fe47 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
81cfe34085 [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
0382f276a2 Gui: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
75acacd1b7 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
201f4c9a5a Core: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 14:04:05 +02:00
wmayer
e9890c0798 Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
marioalexis
f78412c75b Gui: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
fe5f5bdda5 [Gui] only include the actually used inventor files 2022-03-17 21:12:19 +01:00
wmayer
d69defaa3c Py: replace BaseExceptionFreeCADError with more suitable exception types 2022-03-17 13:54:23 +01:00
Uwe
14288f9725 [Gui] View3D*: remove unused includes 2022-03-05 23:16:28 +01:00
wmayer
4dae213b45 Gui: harmonize classes View3DInventorViewer and View3DInventorPy 2021-12-12 11:33:04 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
luz.paz
f11783a498 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
0f67e8ddfa Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
00bcef0619 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
5b44d3c46b Gui: Added Gui.doc.view.viewer.setBackgroundColor() py method 2019-04-09 16:52:08 -03:00
wmayer
fff2a34618 expose method to Python to switch on/off event redirection 2018-09-25 10:13:34 +02:00
wmayer
e6658ed3f3 expose methods to Python to change navi cube settings 2018-07-29 11:32:54 +02:00
luz.paz
7a09a5774e More misc. typos 2018-05-19 12:17:52 -04:00
wmayer
840c9e8b3c prepare for PyCXX 7.0 2018-04-18 19:20:50 +02:00
wmayer
0824c5fd3c fix Coverity issues 2016-08-21 14:03:02 +02:00
DeepSOIC
137c951e7b Gui: Selection: Py interface for setting pick radius
Gui.ActiveDocument.ActiveView.getViewer().setPickRadius(new_val)
2016-08-10 18:46:45 +02:00
wmayer
5edeb99828 + add methods to get/set scene graph, add parameter to set window title of viewer 2016-05-01 17:50:40 +02:00
wmayer
e331bdbc5d 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
24c234b80a + whitespace improvement 2015-12-27 19:16:05 +01:00
wmayer
30d38e6749 + fix bug in Python binding of Quarter viewer 2014-10-24 19:29:35 +02:00
Stefan Tröger
cf167ec60a 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