Commit Graph

26 Commits

Author SHA1 Message Date
Yorik van Havre
113bfed537 Merge pull request #9446 from Rexbas/navigation-animation
Gui: Refactor navigation animations
2023-09-25 18:15:43 +02:00
Yorik van Havre
2489998ab6 Merge pull request #10555 from Syres916/Font_8514oem_exclude
[Preferences] Exclude 8514oem from Monospace fonts
2023-09-25 10:57:26 +02:00
Syres916
0c96b7d903 [Gui] Fix color bar position and text (#10552)
* [Gui] Fix ColorBar position and labelling

* [Gui] Improve formatting

* [Gui] ColorBar adjusts if user squashes window height

* [Gui] Changes following feedback
2023-09-19 18:35:22 -05:00
wmayer
dc6ce5a08b Gui: implement handling of Combo, Property and Tree view 2023-09-14 13:35:13 +02:00
wmayer
26cd974e08 Gui: fix clang-tidy warning 2023-09-08 21:45:10 +02:00
Michael Tuma
32c5968069 Made the interval that the Python profiler runs at configurable
Added a "User parameter:BaseApp/Preferences/PythonConsole/ProfilerInterval" int
property which sets how often (in milliseconds) the Python profiler runs while
Python code is running. Setting this value to zero will totally disable it.

Also added a preference in the Python console screen which allows the user to
set the value of this property to between 0 (disabled) and 5000 (once every 5
seconds). (+1 squashed commits)

Squashed commits:

[cca88ac633] Made the Python profiler only run when the console is running code

This has two purposes. First, it prevents a performance impact from running the
profiler whenever Python code is running. Second, it prevents crashes caused by
Qt's process events function being called too frequently. When the Python code
is running in the console, it monopolizes the main thread and prevents events
from being processed. Therefore, causing events to be processed in the callback
should not force events to be processed too frequently, because the normal loop
is being prevented by the Python code. (+1 squashed commits)

Squashed commits:

[45f86917e6] Made long-running Python code not freeze the GUI without multithreading

Removed the background thread running Python code and replaced it with a custom
profiler which the Python interpreter runs frequently (at every Python opcode I
believe) on the main thread whenever Python code is running. The profiler will
make Qt process any new events every 200 ms, preventing "App not responding"
messages and making sure any Ctrl+C keypresses will be processed. This prevents
the previous issue where running anything GUI-related from Python would crash
the program (because Qt isn't thread-safe). (+1 squashed commits)

Squashed commits:

[0ef7d810b3] Made the process of getting thread IDs cross-platform compatible

Instead of using <threads.h>, now the standard <thread> header from C++
11 is used to find the thread ID, since <threads.h> is apparently not
available on Windows. (+1 squashed commits)

Squashed commits:

[74c7b867f2] # This is a combination of 2 commits.

Python from the console now runs in the background

In a nutshell, all Python code which is input from the interactive console
now runs in a seperate QThread which runs in the background, instead of
on the UI thread. This means that long operates operations will no longer
cause the app to display an "App not responding" message, because the UI
thread is now free to keep running unencumbered.

However, it is still not possible to run multiple Python statements at
the same time. If the user tries to run some Python while a previous
statement is still being processed, instead it will display an error
message in the console stating that the previous command is still
being processed.

I also added a seperate QTimer which runs once every 100ms to flush any
output from the Python code back to the console. I can't flush the output
to the console from the background thread because the relevant Qt5 code
is not thread-safe (it causes random segfaults). So I added this timer
as a work-around, since it runs in the main UI thread.

Implemented Ctrl+C keyboard interrupts in the console

This is implemented by detecting a Ctrl+C key event in the Python
console in the main Qt UI thread, and sending a keyboard interrupt
to the background thread that runs the Python code.
2023-09-08 21:45:10 +02:00
Syres916
c65434cfc9 [Gui] Correct logic and use more simplistic condition 2023-09-05 18:26:34 +01:00
Syres916
f26824459f [Preferences] Exclude 8514oem from Monospace fonts 2023-09-05 11:29:37 +01:00
Rexbas
dc216cde2a Gui: Refactor navigation animations
- Animations are played through an Animator
- Standard animations have a fixed duration and inherit from QVariantAnimation
- The animation duration can be changed in the preferences
- Fix animations when using the two arrows above the NaviCube
- Start an animation or start and wait for an animation
- Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation
- Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation
- Replace OpenInventor navigation style infinite spin animation with SpinningAnimation
- Stops an active animation when a new animation is started
- Stops an active animation when the user starts dragging, panning or zooming
- Refactor reorientCamera so it can be used in animations
- Enable animations by default
2023-09-04 21:43:41 +02:00
PaddleStroke
09d50dc072 Assembly: Initial implementation (#10427)
* Assembly: Initial implementation.
* Disable Assembly wb as it's WIP.
* Stub code for handling assembly import.

Co-authored-by: sliptonic <shopinthewoods@gmail.com>
Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2023-08-31 12:30:10 -05:00
PaddleStroke
41aefb1331 Pref: wb: Add contextual menu to sort alphabetically. (#10363)
Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2023-08-28 10:39:44 -05:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
Chris Hennes
a29e62de92 Merge pull request #10238 from Ondsel-Development/pref_theme_2
[Preferences] theme : Variables in stylesheet and more.
2023-08-18 08:49:34 -05:00
howie-j
c3d1836345 Update DlgSettings3DView.ui 2023-08-16 13:29:35 +02:00
Paddle
a222f64a93 Theme: Fix the issue that the stylesheet combobox did not update when theme changed. 2023-08-16 08:14:07 +02:00
Paddle
f63122aa7a When theme color change we set the stylesheet. 2023-08-15 14:35:39 +02:00
Paddle
3e6c4acd0b Move the stylesheet combobox to the end of the page and change name/tooltip. 2023-08-15 14:35:39 +02:00
Paddle
55c45b62ca Pref Theme : Change name of colors. 2023-08-14 08:11:58 +02:00
Paddle
37ad74519f Pref: Theme: Make sure theme has changed before saving the setting. 2023-08-11 13:19:19 +02:00
Paddle
c547e3cddf Pref: Theme: Solves #10136 2023-08-11 13:19:19 +02:00
wmayer
12bd92cdf5 Gui: fix another tabstop compilation warning
See also #10105
2023-08-10 17:01:45 +02:00
wmayer
c15be7d714 fixes #10105: Tabstop assignment compilation warning 2023-08-09 16:29:31 +02:00
Paddle
7e833518b3 Preference Page Theme : remove jun from .ui file. 2023-08-09 10:19:29 +02:00
luzpaz
a6202bc3ce Fix various typos 2023-08-08 14:25:00 +02:00
Paddle
4f4919a3c8 Move DlgSettingsTheme 2023-08-08 11:12:48 +02:00
Paddle
34eb609415 Move all the preference pages to PreferencePages subfolder. 2023-08-08 11:12:48 +02:00