Commit Graph

45 Commits

Author SHA1 Message Date
PaddleStroke
54ec582ce9 Gui: Fix property checkbox regression (#27049)
* Gui: Fix property checkbox regression

* Update PropertyItemDelegate.cpp

* Gui: property checkbox: toggle with enter when it has focus

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-20 20:22:29 +00:00
PaddleStroke
a9e545a227 PropertyEditor: Fix tab toggling bool (#26955) 2026-01-19 11:10:11 -06:00
Pieter Hijma
217dc43f64 Gui: Fix refresh on boolean property toggle 2025-11-26 14:42:38 -06:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Steven James
9ebb49d1f0 Fix setting Bool value in VarSet add properties dialog. (#24873)
* Connect Bool checkbox checkStateChanged to the editor callback so changes will actually happen.
Make the change compatible with Qt versions <6.7.0

* Remove delayed singleshot-value changed from the event filter for Checkbox as suggested by @pieterhijma

* Remove no longer relevent comment
2025-11-09 17:45:57 -06:00
pjcreath
e11853dade Gui: prevent native macOS color picker crash.
Fixes #25153
2025-11-09 16:23:17 -06:00
PhoneDroid
390ab5c749 Updated SPDX License Identifiers 2025-10-08 10:53:08 -05: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
Syres916
1899208dc8 [Gui] Property Editor allow double-click of separators 2025-07-24 22:15:15 +02:00
Alfredo Monclus
d4e6a50808 Gui: fix double-click on checkboxes locking the properties 2025-06-13 10:10:31 +02:00
Kacper Donat
6fc13048e2 Gui: Make checkbox in the property view QSS aware 2025-06-03 23:07:23 +02:00
Alfredo Monclus
e8fa74e4c4 Gui: Property editor use a checkbox instead of a combobox for booleans (#21555)
* Gui: property-editor add property copy context menu

* Gui: Property editor checkbox brighter border

* Gui: Property editor refactor optimize

* Gui: Property editor checkbox react to first click and add label

* Gui: Property editor remove auto-inserted include

* Gui: property-checkbox fix not painting the grid
2025-06-03 21:05:30 +02:00
Alfredo Monclus
e456b5671b Gui: Property editor combobox fix not popping up if the user canceled (#21688)
* Gui: Property editor combobox fix not popping up if the user canceled the popup and then try to open it again

fixes #21675

* Update src/Gui/propertyeditor/PropertyItemDelegate.cpp

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-06-02 10:40:08 +00:00
Alfredo Monclus
8f2ff7d7f6 Gui: property-editor open the combo directly and apply after selection
Previously you had to make 4 clicks to apply a combo
1 to enter edit, 1 to open the combo, 1 to select, and 1 to defocus and apply

with this commit only 2 clicks:
1 to open the combo and 1 to select
2025-05-29 22:41:37 +02:00
Alfredo Monclus
cb95cb064f Gui: property-editor make readonly cells look disabled 2025-05-26 07:13:44 -06:00
Alfredo Monclus
012a765614 Gui: property editor do not enter edit mode if the property is read-only 2025-05-25 06:25:09 -06:00
wmayer
af3861aa79 Gui: move to new-style connect() in createEditor() 2024-05-14 15:58:44 +02:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +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
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
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
07ccb73fe7 Partially revert "Remove unused code into GUI" 2022-07-17 12:32:03 +02:00
andrea
7886d3cbf4 Remove unused code into GUI 2022-07-17 03:53:11 +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
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
75da888bc5 Gui: fixes #6583: FreeCAD 0.20 crashes when attempting to change template in TechDraw
For more details see also: https://forum.freecadweb.org/viewtopic.php?p=579530#p579530
2022-03-16 08:47:56 +01:00
Uwe
75ab31a357 [Gui] PropertyEditor: remove unused includes 2022-03-03 03:59:48 +01:00
wmayer
5430c986f8 Gui: cleanup of PR #5516
* instead of breaking encapsulation of PropertyItem apply the attorney idiom
* refactoring of PropertyItemDelegate::createEditor by moving the code to PropertyItem::createPropertyEditorWidget
2022-03-01 17:19:12 +01:00
wmayer
739804b511 Mod: add string header to dxf.h 2022-03-01 17:18:29 +01:00
Zheng, Lei
6afb92ec67 Gui: add missing PropertyItemDelegate::eventFilter()
For handling focus change when editing property
2022-02-25 12:17:17 +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
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
6aec9ffed7 Gui: try to fix property editor crash
Crash stack trace
https://forum.freecadweb.org/viewtopic.php?f=8&t=37757&e=1&view=unread#p327901

It appears to by caused by handling QAbstractItemDelegate::closeEditor
signal twice. Once inside PropertyItemDelegate::editorClosed via slot
connection where the editor is closed/destroyed, the other in
PropertyEditor::closeEditor() which tries to access the destroyed
editor.

This patch removes handling of closeEditor signal in
PropertyItemDelegate.
2019-08-30 13:55:24 +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
93c5c76a60 add some comments 2019-03-04 19:25:43 +01:00
wmayer
065f7a644b fix navigation with Tab or Shift+Tab in property editor 2019-03-04 19:15:53 +01:00
wmayer
8f3c135a5c minor fixes:
make QtCreator happy by removing const & when connecting signal/slots
fix typo in comment
2018-09-11 15:50:27 +02:00
Zheng, Lei
652e9314bd PropertyEditor: improve editing experience 2018-09-11 14:51:03 +02:00
Travers Carter
7f43851536 Span property group headers across all cells to avoid text truncation
Render the background of property value editor widgets to avoid cell contents showing through the editor
2017-11-26 10:23:03 +01:00
wmayer
dd1ccdcba0 + fix to get gridline-color of stylesheet in property editor 2016-02-23 13:05:48 +01:00
wmayer
4db1e6b0a0 + make PropertyEditor class ready to be customized with Qt style sheet 2016-02-20 16:00:35 +01:00
wmayer
b0da949be1 + don't use hardcoded height in PropertyItemDelegate::sizeHint 2015-09-11 10:35:48 +02:00
wmayer
c0accca228 Fix focus issue with property editor 2013-07-17 13:58:18 +02:00
wmayer
0c0a40376a 0001076: Placement Position Entry can be improved 2013-07-14 16:19:37 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00