Commit Graph

43 Commits

Author SHA1 Message Date
wmayer
ef63a35e0f Gui: fix -Wclazy-connect-by-name 2023-04-05 16:23:15 +02:00
wmayer
ac94fb4a33 Gui: move to new style connect() 2023-01-12 17:40:20 +01:00
Zheng, Lei
41dcee396d Gui: split out TreeParams into its own source files
Auto generated using TreeParams.py
2022-12-03 17:08:17 -06:00
berniev
a909df7f39 Gui: Single arg ctors must be explicit (PR #7369) 2022-08-24 15:06:03 +02:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
d88729d2c4 Gui: use empty 2022-08-06 16:35:45 +02:00
wmayer
6becbc3b72 Fix several clazy issues:
* Returning data of temporary QByteArray [-Wclazy-returning-data-from-temporary]
2022-07-25 00:19:41 +02:00
wmayer
6ee2c7f865 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
0bef4e82f2 Fix several clazy issue:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
2022-07-24 22:29:06 +02:00
Zheng, Lei
15c59d6007 App/Gui: Fix auto checking 'Sync sub object' if property link editor
Related FreeCAD/FreeCAD#6672 case C
2022-04-10 14:31:25 +02:00
wmayer
aea110ba15 Gui: clean-up Selection API
Replace the int of the SubType of SelectionChanges with an enum class.
The meaning of it is nowhere documented and some magic numbers like 0,1,2 are used in several places in the code.
2022-04-09 23:07:02 +02:00
wmayer
9eac35cf5d 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
Chris Hennes
bedf920702 Gui: PR6497 move return statement to new line 2022-03-29 12:33:50 -05:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
wmayer
a999a249e3 Qt: remove some more leftovers of Qt4 2022-03-19 23:27:28 +01:00
Uwe
5a95b71829 [Gui] DlgMacro etc.: remove unused includes 2022-03-16 23:41:14 +01:00
wmayer
2dc78804b6 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
4ae1ca58d1 App: use forward declaration to reduce compile time 2022-03-04 17:27:53 +01:00
Uwe
b4fff07d9e [App] Expression and Extension: remove unused includes 2022-02-25 18:06:57 +01:00
wmayer
ca5c799ce2 Gui: rename methods of SelectionObserver to clarify intention in client code 2021-12-07 14:17:07 +01:00
Benjamin Nauck
05c61e349a Gui: Add support for selecting multiple objects without keyboard
Adds checkboxes to the document tree which makes it possible to
select multiple document objects on devices without physical keyboard.

These checkboxes are opt-in and can be enabled/disabled from:
Edit -> Preferences -> Display -> Navigation -> Selection

Forum thread for feature the request:
https://forum.freecadweb.org/viewtopic.php?f=34&t=53065

We need to iterate the tree to add/remove the selection boxes when
the enable-setting has been changed.

The size for the first column in the tree is adjusted to fit both
name and optional checkbox.
2021-02-03 21:51:56 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
2c744264d6 Gui: several fixes for expression search box:
+ rename method setMatchExact() to setExactMatch()
+ move handling of user-defined parameters to class ExpressionParameter
+ Qt::MatchExactly is not supported by QCompleter, use Qt::MatchStartsWith instead
+ add possibility to change match behaviour via context-menu
2020-09-13 18:35:46 +02:00
Zheng, Lei
4f5a2e923c Gui: allow change ExpressionCompleter filter mode
Fixes #4428

Filter mode set to Qt::MatchContains for tree view search and link
property editor object search.

Other usage of the completer (e.g. property editor, speadsheet) defaults
to Qt::MatchContains, but can be changed using parameter,

    BaseApp/Preferences/Expression/CompleterMatchExact
2020-09-13 18:35:02 +02:00
Zheng, Lei
92804a79d8 Gui: fix property link editor for PropertyLinkSubList 2020-06-03 14:34:20 +02:00
donovaly
4dc774c030 DlgPropertyLink.cpp: fix compilation
see https://forum.freecadweb.org/viewtopic.php?f=10&t=43298
2020-02-12 09:46:47 +01:00
Zheng, Lei
cbaee7e4ec Gui: add more options to DlgPropertyLink
Support user editable sub-element column.
(Dis)allow sync sub-object 3D view selection.
2020-02-11 15:40:27 -05:00
Zheng, Lei
0633abb70d Gui: refactor link property editor
PropertyLinkItem now support all major types of link property.
PropertyLinkListItem is no longer necessary, but kept for backward
compatible, which is now identical to PropertyLinkItem.

DlgPropertyLink, the link selection dialog, is now made modeless, so
that that user can select geometry sub-element directory from 3D view.
2020-02-11 15:40:27 -05:00
Zheng, Lei
05433f7148 Gui: fix crash on editing PropertyLinkList 2019-08-17 15:32:50 +02:00
Zheng, Lei
2bd4795e80 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
a7094210f8 Fix scan coverity issues:
CID 184294: Uncaught exception
CID 183597: Unchecked return value
CID 175809: Dereference before null check
CID 175810: Logically dead code
CID 133000: Uninitialized scalar variable
CID 133001: Uninitialized scalar variable
CID 183591: Explicit null dereferenced
2018-11-13 16:47:58 +01:00
Yorik van Havre
8fd89533a8 Select items already present in PropertyLinkList edit dialog 2018-05-16 14:58:33 -03:00
wmayer
5022c8df5c use object's inlist to filter selection in property link dialog to avoid dependency loops 2018-02-07 23:31:14 +01:00
wmayer
cc00dc85d0 #3325: DlgPropertyLink as editor of Tip property 2018-01-28 22:37:03 +01:00
Yorik van Havre
86ca43743f Added 'Remove link' option to PropertyLinkList dialog too 2018-01-12 13:27:34 -02:00
wmayer
aa370e5d1b improve property link dialog for multi-selection 2017-09-23 18:37:52 +02:00
wmayer
22ac03a5b5 property editor for PropertyLinkList 2017-09-23 18:03:03 +02:00
Yorik van Havre
a967c41b0b Small improvements to the PropertyLink editor
* The "Edit" link is now a button, same as the Placement editor
* Added a "None" entry on top of the Link dialog
2017-04-17 23:00:14 -03:00
wmayer
ad57478ab4 fix a couple of compiler warnings 2017-01-20 22:54:10 +01:00
Yorik van Havre
7c15e1407f Added a search box to the PropertyLink dialog 2017-01-20 00:03:42 -02:00
Mateusz Skowroński
3b463f2138 Qt::WFlags is obsolete in Qt5. Replace it with Qt::WindowFlags.
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:58 +01:00
Johannes Reinhardt
2b28d41134 fixed a few small typos 2014-05-12 14:32:27 +02:00
wmayer
2aa2cb3fa6 + fixes #0001063: Show a PropertyLink in Property view 2014-03-13 14:28:53 +01:00