Commit Graph

54 Commits

Author SHA1 Message Date
Ronny Standtke
0ff5ff37f4 move "Close" button of angular variant also to north 2023-03-13 11:56:27 -05:00
wmayer
84aa8155ce Part: replace slots with member function pointers 2023-02-03 00:21:38 +01:00
wmayer
b57e5646f6 Part: move to new style connect() 2023-01-13 17:14:07 +01:00
luz paz
6e542b6fad Part: remove trailing whitespace 2022-11-15 14:19:30 -06:00
Adrián Insaurralde Avalos
860ce0a78e Move "Close" button to north in measure dialog
for consistency with other task dialogs
2022-11-03 20:29:15 -04:00
Uwe
998056364d [Part] Task*: remove unused includes - part 1
- also some sorting
2022-09-26 03:05:23 +02:00
Uwe
2d61e15112 [Part] fix bold italic measurement text
- bold and italic font did not work for measurement text, see https://github.com/FreeCAD/FreeCAD/pull/7148#issuecomment-1247989284
2022-09-16 03:09:24 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +02:00
Uwe
88a06f8f10 Mod: remove some unnecessary nullptr checks 2022-07-18 12:58:12 +02:00
Uwe
a5eb40a9a6 [Part] cleanup new preferences Feature
- correct preferences location
- handle preferences packs
- remove unused code
2022-07-18 12:42:26 +02:00
VM4Dim
53d9b1899f [PartGui] Add Font and Color Preferences to Measure dimensions (#7148)
* [Part] Add Font and Color Preferences to Measure dimensions v4

authored-by: VM4Dim <vm4dim@users.noreply.github.com>
Co-authored-by: Uwe <donovaly@users.noreply.github.com>
2022-07-18 11:52:00 +02:00
Uwe
5d76afe0a5 re-add some nullptr
to be safe since their removal within assert() or bools might have some impact I don't know
2022-07-18 02:32:36 +02:00
Uwe
5f8e0c46ee [Part] remove more superfluous nullptr checks 2022-07-18 01:36:27 +02:00
mosfet80
620c273c4e Boost version <=1.60 is never used in freecad 0.20 (#7038)
* Boost version 1.60 is never used in freecad 0.20
2022-06-24 02:20:26 +02:00
wmayer
8edb3e64cc Part: make DimensionLinear node kit unpickable
See forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=69056
2022-05-30 15:43:27 +02:00
Kuzemko Alexsandr
3e7ad90b7b [Part] Part Measure Linear (tool) fix translation for "Selection xx" button.
* [PartDesign] Part Design Measure Linear (tool) fix translation for
"Selection xx" button.

* [Part] No need translate "Selection xx" string twice.
2022-05-05 22:51:18 +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
wmayer
068c0e5a98 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
8f894ebefe [Part] remove Python.h from headers
seems not to be necessary anymore
2022-03-20 14:16:55 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +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
wmayer
1d412261d6 Part: [skip ci] Fix coverity warning
Coverity warnings fixed:

CID 316522 (#2 of 2): Uninitialized scalar variable (UNINIT)
5. uninit_use_in_call: Using uninitialized value newSelection. Field newSelection.shapeType is uninitialized when calling push_back
2021-02-21 16:06:59 +01:00
Chris Hennes
46a899c437 [Part] Coverity: dtors can't throw 2021-02-09 23:58:09 +01:00
donovaly
c5b6e105f7 [Part] fix angular measurement
the arrow heads are much too large so that the feature use quite useless

The PR fixes this to make the arrow heads as large as for linear dimensions
It also slightly increase the arrow head size since.
2021-01-06 04:37:53 +01:00
vocx-fc
d54cdff9e5 Part: improve tooltip of measure commands
Also update the text of the buttons in the `TaskDimension` task panel.

Remove tabs in the source code, as there was a mix of tabs
and spaces. Further cleaning is necessary as the indentation
is inconsistent and mostly 2 spaces instead of 4 spaces.
2020-10-13 12:50:50 +02:00
vocx-fc
9177eae0bb Part: move icons to measure subdirectory
The path to the icons is added to `AppPartGui.cpp`
using `Gui::BitmapFactory().addPath()`, so the icons are found
automatically in their new directories.
2020-10-12 19:54:11 +02:00
wmayer
16f953ad65 PVS: V1004 A pointer was used unsafely after it was verified against nullptr 2020-07-18 10:59:27 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
4ec45b545e 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
1e117647ff [skip ci] include missing boost header 2020-06-07 20:58:45 +02:00
asapelkin
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
wmayer
a247b7e6a5 force strict ISO C++ (-Wpedantic)
for Drawing, Image, Inspection, Mesh, MeshPart, Part, Path, Points, Raytracing, ReverseEngineering, Spreadsheet, Start, Surface, Web

TODO: fix several -Woverflow in area
2019-09-18 11:32:42 +02:00
Zheng, Lei
6da72b9859 Part: changes to Part Module
* Added Part::Feature::getTopoShape/getShape() function that can obtain
  shape from any object with proper implementation of getSubObject(). It
  can even construct compound from group object with proper implementation
  of getSubObjects().

* Modified ViewProviderExt to work on any object, because it now obtain
  the shape using Part::Feature::getShape()

* Modified various Part features to obtain base/tool shapes using
  Part::getShape(), which allows them to be any type of object,
  including Link and groups.

* Modified various Part command to relax type requirement on selected
  objects.

* Add support of link and group to dimension, and add dimension refresh
  command

* Support link and group in simple command command, and add a few more
  copy command variations.

* Add special handling of 'Shape' attribute in PropertyContainerPy and
  use Part::Feature::getShape() to return shape for any object without
  Shape property. This allows many python feature work with any object
  without modification.

* GeometrySurface/CurvePy, add convenience attribute 'Rotation'

* TopoShapePy:

    * Extended support of sub shape attribute, e.g. Compound1, Solid2,
      SubShape3 ('SubShape' is used to access child shape of a compound)

    * makeWires(), new API to sort and return wires given a list of edges.

    * transformed/translated/rotated/scaled(), return a new shape with
      some transformation.

    * findPlane(), find the plane of a planar shape

    * isCoplanar(), check if two shape are coplanar
2019-08-17 15:08:35 +02:00
Abdullah Tahiri
df38102017 PCH: Part GUI 2019-05-03 23:15:25 +02:00
wmayer
684ac9db9a make colors of measurements customizable 2019-04-05 13:33:29 +02:00
Craig Marshall
23ecb8eace Fix #2034 with more precision attempt 2 2019-03-14 23:16:14 +01:00
Craig Marshall
690774c0ef Fixes Bug 2034. Made Part dimensional arrows proportional to line length and radius 2019-03-12 10:38:07 -03:00
wmayer
3e713d918c fixes FreeCAD segfaults when pressing 'Clear All' in Measure tasks dialogue with no opened document 2019-03-10 12:27:20 +01:00
wmayer
3845350c0a PVS: V773 A memory leak is possible 2019-02-17 18:40:06 +01:00
luz.paz
506741aee1 [For v0.18] Crowdin fixes
https://crowdin.com/translate/freecad/568/en-en#1172237
https://crowdin.com/translate/freecad/568/en-en#1172239
https://crowdin.com/translate/freecad/568/en-en#195053
https://crowdin.com/translate/freecad/568/en-en#1172247
https://crowdin.com/translate/freecad/568/en-en#1172249
https://crowdin.com/translate/freecad/568/en-en#1172251
https://crowdin.com/translate/freecad/6766/en-en#6511058
https://crowdin.com/translate/freecad/6766/en-en#6511060
https://crowdin.com/translate/freecad/6766/en-en#6502381
+ random typo fixes
2019-01-13 02:24:50 +01:00
wmayer
57cc33c8ee fixes 0003427: Measurement tool measures wrongly 2018-09-26 16:37:00 +02:00
wmayer
c582b069ba fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
wmayer
f5a8ffb92e check for valid vertexes when measuring angles between two edges 2017-05-29 20:49:35 +02:00
Peter Lama
a75a98ef27 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
Kunda
99c99006b8 source typo fixes pt4 (only on py3 merged code) 2017-03-02 13:47:21 +01:00
wmayer
e8b36592c0 fix Coverity issues 2016-08-21 18:46:40 +02:00
Mateusz Skowroński
7d0e892d36 Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78

This change is Qt4/Qt5 neutral.
2016-01-05 16:43:33 +01:00
wmayer
834c0a642d + include missing header files 2015-07-01 13:02:29 +02:00
wmayer
23462b70d1 + fix some issues 2014-03-15 12:36:07 +01:00