Commit Graph

64 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Pieter Hijma
14511201fa Gui: Fix too enthusiastic auto-collapse 2025-10-09 16:11:24 -05:00
Pieter Hijma
c082a98291 Gui: Create a Property View submenu for expansion
The Property View's context menu has a submenu for property expansion
that allows you set the property expansion to default (remembers state),
to expand all and to collapse all.  Then there are toggles for
default/auto expand/auto collapse that always collapses or expands or
remembers the state.
2025-09-16 11:47:22 +02:00
Alex Tran
986385a2c4 Read auto collapse user preferences 2025-09-16 11:29:49 +02:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Pieter Hijma
d2f19d297d Gui: Add support for renaming properties 2025-08-10 11:37:11 +02:00
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Benjamin Nauck
df3c324b7d Gui: use contains() and isEmpty() instead of count() where possible 2025-05-03 22:19:51 +02:00
Benjamin Bræstrup Sayoc
8d2d0a47f4 Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Nauck
6f535f19fb Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
Furgo
5dc4a45afe Change property view panel title to sentence case 2024-05-08 10:04:50 +02:00
wmayer
70b8e7a07b Gui: Give property editors an object name
This allows it to easily find the widgets with Qt's findChild() method
2024-02-12 11:41:09 -06:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
948cbfccd9 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
52e1c7c33b modernize C++: move from boost::bind to std::bind 2023-08-08 17:36:13 +02:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
wmayer
8d42b6f93c Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
wmayer
4b08850edb Qt6 port:
* QApplication::setFallbackSessionManagementEnabled has been removed
* QString::medRef() has been removed. Use QString::mid() again.
* QTextStream::setCodec has been removed
* Use operator QVariant of the QFont class to make code Qt5 and Qt6 compatible
* Signature of QTreeWidget::mimeData() has changed in Qt6. Remove TreeWidget::mimeData() because it doesn't change the implementation
* QLayout::setMargin() is deprecated in Qt5 and has been removed in Qt6. Use QLayout::setContentsMargins()
* QDateTime::toTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::toSecsSinceEpoch()
* QDesktopWidget is deprecated in Qt5 and has been removed in Qt6. Use QScreen
2022-11-01 16:55:40 +01:00
wmayer
3b01056b9b Gui: ignore recursive call of PropertyView::onTimer() 2022-10-20 23:00:50 +02:00
wmayer
0e0976377e Gui: [skip ci] whitespace improvements 2022-10-20 21:26:53 +02: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
3877fc62c3 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
wmayer
85bd6b5c6b Fix several clazy issues:
* C++11 range-loop might detach Qt container [-Wclazy-range-loop-detach]
2022-07-24 23:48:37 +02:00
wmayer
0b2c73cf32 Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
2022-04-09 17:03:43 +02:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
4147337715 [Gui] Python and Property: remove unused includes 2022-03-05 03:44:45 +01:00
Zheng Lei
f12ae8a13c Gui: improve PropertyEditor refresh (#3535)
* Gui: fix PropertyView 'Add property' action

* Gui: fix property view font color for linked property

* Gui: improve PropertyEditor refresh

* Gui: show real property name in property view tool tip

* Gui: improve property view tool tip

* Gui: fix auto recompute in property view

* Gui: remove duplicated PropertyModel signal of dataChanged()

* Gui: fix property view update on property change
Including changes in document properties

* Gui: fix transaction closing on property editor change
On editing row removal and on model reset.

* Gui: fix property view auto expansion of previous selected item

* Gui: improve property editor navigation using tab/shift+tab
2022-02-21 12:26:21 +01:00
wmayer
a6838cf58f Gui: rename methods of SelectionObserver to clarify intention in client code 2021-12-07 14:17:07 +01:00
Chris Hennes
7857a88c4d [GUI] Remove explicit triangle styling from tabs
On Windows the lower tabs of the PropertyView were being set to
triangular, which breaks stylesheets. This removes that code, so they
now take on whatever the standard shape is on the system.

Fixes #0004599
2021-03-25 15:44:19 +01:00
wmayer
ff85177c3f Gui: [skip ci] add possibility to auto-expand items in property editor 2021-02-08 18:53:07 +01:00
wmayer
fdd2e0e315 Gui: [skip ci] support undo/redo for view properties in editor 2021-02-08 13:22:14 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
2a50ac2252 PVS: V595 A pointer was utilized before it was verified against nullptr 2020-07-18 10:59:28 +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
Zheng, Lei
303bf40f09 Gui: improve property editor status update 2020-05-16 12:15:49 +02: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
Zheng, Lei
6d770d85dc Gui: fix property view flickering 2019-09-10 14:17:07 +02:00
Zheng, Lei
f9008396df Gui: fix property view on multiple sub-element selections 2019-09-10 14:17:06 +02:00
Zheng, Lei
e8e1a67e50 Gui: restore static property order in PropertyView 2019-08-30 15:51:47 +02:00
Zheng, Lei
cecf15291f Gui: sort property by name in property view 2019-08-17 15:32:51 +02:00
Zheng, Lei
ba0d573369 Gui: fix selection change handling in PropertyView 2019-08-17 15:32:50 +02:00
Zheng, Lei
8b3ef8faf5 Gui: property view related changes
* Display property from linked object, colored green,

* Change DlgPropertyLink to support external linking and sub-object
  selection

* Improve large selection performance by using a timer

* Improve TAB key behavior in property editor

* Add context menu to show hidden properties, change property status,
  set expression on any and property, and add/remove dynamic properties

* Optimize expression completer model construction, as the original
  implementation gets prohibitively slow for moderate number of objects.
2019-08-17 15:08:33 +02:00
wmayer
be0192a0e2 add option to disable auto-deactivation of property view for inactive document 2018-09-14 16:30:26 +02:00
Markus Lampert
333dfe92d7 Disable property editor if none of the selected objects is in the active document. 2018-09-13 22:18:28 -07:00
wmayer
a3ad182067 use triangular tabs in property view only on Windows 2017-01-27 17:05:08 +01:00
wmayer
4686997786 fix more Coverity issues 2016-08-17 21:55:00 +02:00