Commit Graph

113 Commits

Author SHA1 Message Date
wmayer
a2579ebb92 Core: support to load old project files containing image planes
See forum: https://forum.freecad.org/viewtopic.php?p=670545#p670545
2023-03-26 13:51:07 +02:00
wmayer
6ae787cc6b Gui: fix image handling:
* Change FileHandlder to accepts all image format supported by Qt
* Make sure image object is not touched after accepting or rejecting changes
* Make option 'Keep aspect ratio' the default
* Fix WhatThis text of command
2023-03-22 17:55:55 +01:00
wmayer
5871c2bb46 Gui: add function to scale image 2023-03-22 16:24:51 +01:00
wmayer
9b38980b7a Gui: allow to change orientation of image plane, implement two-side rendering 2023-03-22 16:15:35 +01:00
Alexander Golubev
35ae3750b9 Gui: Prevent UiLoader from loading 3rd-party Qt plugins.
Due to a flaw in the QUiLoader, UiLoader were loading all designer plugins
it can find in QApplication::libraryPaths(). This in general a bad
practice and leads to bugs due to some plugins may perform some unexpected
actions upon load which may interfere with FreeCAD's functionality.

To avoid such problems reset the libraryPaths before creation of a
UiLoader object.

Also move setLanguageChangeEnabled(true) into constructor due to it's
called every time it's being instanced anyway.

See: https://github.com/FreeCAD/FreeCAD/issues/8708
2023-03-18 17:59:50 +01:00
wmayer
45ec24b1cb PD: refactor the constructor of TaskDialogPython 2023-02-24 16:35:51 +01:00
wmayer
678ecf64db Gui: handle language change events in task dialogs 2023-02-23 16:38:45 +01:00
wmayer
8d42b6f93c Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
luz paz
772fe258b9 L10N: Don't translate "..." string
Follow-up to 1d001afcc7
2022-12-02 11:57:34 +01:00
wmayer
9345738604 Gui: [skip ci] fix several warnings reported by GH Actions 2022-11-06 15:53:18 +01:00
wmayer
ea4a6948be Gui: add class TaskDialogPy 2022-10-09 14:26:42 +02: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
23961706be Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
berniev
3877fc62c3 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
wmayer
779a728a8c Gui: remove redundant void 2022-08-12 17:59:59 +02:00
berniev
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
wmayer
bfef3ed33a Gui: [skip ci] include header with export macros 2022-08-08 10:22:59 +02:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
Uwe
c40e476a5b [Gui] remove some more superfluous nullptr checks 2022-07-18 13:15:38 +02:00
wmayer
0f5725b34a modernize C++: replace boost::function with std::function 2022-06-30 20:31:55 +02:00
wmayer
82a6241fc5 fix (Qt) issues found by clang's clazy tool:
+ -Wclazy-incorrect-emit
+ -Wclazy-strict-iterators
+ -Wclazy-overloaded-signal
+ -Wclazy-qstring-arg
+ -Wclazy-unused-non-trivial-variable
+ -Wclazy-container-anti-pattern
+ -Wclazy-range-loop-reference
+ -Wclazy-const-signal-or-slot
+ -Wclazy-detaching-temporary
+ -Wclazy-qfileinfo-exists
2022-06-29 21:00:54 +02:00
wmayer
2628fb0350 App: fix memory leaks in Enumeration class and simplify code 2022-06-25 18:18:57 +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
54342101af Gui: remove all leftovers of iisTaskPanel 2022-03-23 10:37:28 +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
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
21974cc08f [Gui] Task: remove unused includes 2022-03-03 03:16:35 +01:00
wmayer
21ba35adab Gui: move PythonWrapper class to its own source file 2021-09-22 23:30:03 +02:00
wmayer
bc5c585c8b Gui: move Ui loader classes to their own source files 2021-09-22 20:31:01 +02:00
flachyjoe
934f9ed01d improve TaskDialog API doc 2021-05-13 13:10:40 +02:00
Chris Hennes
098d7b9aee [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
wmayer
12b8f10421 Gui: [skip ci] expose Control::showModelView() to Python 2021-03-29 17:05:54 +02:00
David Osterberg
c1b3fba031 Beautify xml step 1: These changes do not affect the uic output 2021-03-02 16:29:11 +01:00
wmayer
20e67c469d Gui: [skip ci] add option to automatically close task dialog if undo/redo was pressed 2021-02-12 17:42:49 +01:00
wmayer
8f65602cef Gui: add virtual method 'closed' to TaskDialog that is called when deleting a dialog 2021-02-05 16:36:19 +01:00
Chris Hennes
f5f1f476f1 Guard against segfaults due to out-of-order dialog deletion 2021-02-05 15:38:24 +01:00
Mateusz Skowroński
98f63ba60f Fix build warnings from deprecated Boost headers (they are used internally by Boost). Thanks @wwmayer for the hint. 2020-12-29 10:20:53 +01:00
wmayer
0385e56b69 Gui: [skip ci] fix crash when using a dialog instance twice for a task panel 2020-12-18 11:46:31 +01:00
wmayer
7c824bbd93 Gui: [skip ci] fix -Wodr
The forward declarations of QuantitySpinBox and Ui_TaskAppearance were done in the wrong namespace
2020-11-24 15:46:46 +01:00
wmayer
56c6db10e0 C++11: replace deprecated function std::bind2nd with lambda functions 2020-10-15 14:46:02 +02:00
wmayer
78e1adbcb1 Gui: [skip ci] fix parsing of arguments of ControlPy methods
See https://forum.freecadweb.org/viewtopic.php?f=10&t=50805
2020-10-04 20:04:23 +02:00
wmayer
1b2a7ef6fc PVS: V547 Expression is always true/false 2020-07-18 10:59:27 +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
wmayer
891a435c55 Qt5: 'static QString Gui::TaskView::TaskWatcherCommands::trUtf8(const char*, const char*, int)' is deprecated [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
e1b3ec41b6 Sketcher: add option to disable leaving sketch with Esc button 2020-02-09 13:52:09 +01:00
wmayer
8648bbe3df Gui: fix naming inconsistency and rename 'combi' to 'combo' 2020-02-08 13:43:44 +01:00