Compare commits

...

233 Commits

Author SHA1 Message Date
Uwe f5d13554ec [FEM] [skip CI] remove unused import for potential 2022-08-10 13:44:09 +02:00
Uwe 57e0e6e769 [FEM] [skip CI] formatting fix for potential 2022-08-10 13:42:54 +02:00
Uwe 31376b12ad [FEM] electric Potential: add missing conversion
- add missing conversion of property change that was already done before FC 0.20
2022-08-10 13:33:39 +02:00
Uwe c96fe6b32e [FEM] Elmer: fix material bug and improve material handling
- for fluid material writing the elasticity solver failed with unknown Young Modulus
- fix regression with checking for fluid material. Checking the material of the bodies is not sufficient. One can e.g. have a solid without bodies defined, then it applied to all bodies and there might be a fluid defined for only one body. Checking the body's material would then deliver there is no fluid
2022-08-10 06:17:04 +02:00
Uwe c06f24122b [FEM] update a bimetal testfile 2022-08-10 04:26:37 +02:00
Uwe 88dc25d151 [FEM] Elmer: set constraints for relaxation factor
- the relaxation factor is crucial for nonlinear systems thus help the user by setting constraints and convenient steps.
Since the property stays a float no update is necessary, existing properties just stay a normal float
2022-08-10 04:11:07 +02:00
Uwe ad7e780a1f [FEM] Elmer: notify users about missing fluid material
- it was often unclear when no flow equation was written to the case.sif (was a regression FC0.20)
2022-08-10 03:29:51 +02:00
Uwe 4d5135ac4b [FEM] fix bimetall example
- add missing density
- set a second temperature to make the heat solver actually working
- adapt to new defaults
2022-08-10 02:28:13 +02:00
Uwe a00268b5ed [Material] add materials used by our examples
- add generic copper and invar
- also extend the generic aluminum card
2022-08-10 02:09:35 +02:00
Uwe c31af916bc [FEM] Elmer: automatic update for BiCGstablDegree
- up to last week we used the invalid BiCGstablDegree 0 thus update to the default of 2
2022-08-10 02:08:54 +02:00
Uwe 25b39419fd [FEM] fix selection issues with flow velocity constraint
- same fix as commit 7e071623 for flow velocity constraint
- the used selection widget did not highlight the selected faces. This made it very hard to work with when one has an existing document where e.g. 5 faces have a certain velocity and you cannot figure out which ones.
To fix this use another selection widget
2022-08-10 01:38:55 +02:00
Uwe 18bdc5c551 [Part] manually backport second part of today's override fixes 2022-08-10 01:30:59 +02:00
wmayer 3c8404fd09 Part: fix build failures with OCC >= 7.6 2022-08-10 00:59:45 +02:00
Uwe 7f8c5bcd85 [FEM] Elmer: fix broken example
- (a regression to FC 0.20.0), use new settings ("direct" is already the default, iterative solving takes here about 5 times longer, DisplaceMesh must be False)
2022-08-09 05:39:11 +02:00
Uwe b2fe784efd [Win installer] prepare for 0.20.1 release 2022-08-09 04:21:57 +02:00
Uwe ddbcc0b3d5 [Build] output point release version
- to Splashscreen, About, MainWindow and Console
2022-08-09 03:32:24 +02:00
Uwe 87953bf330 [FEM] increase size of generic solver task panel
- increase it to size of CCX panel to create more room for the log output
2022-08-09 03:23:52 +02:00
sliptonic 9e267241fe Merge pull request #7333 from mlampert/bugfix/external-thread-issues
PATH: Bugfix/external thread issues
2022-08-09 00:49:40 +02:00
Uwe 8fe6438ca8 [FEM] backport a variable renaming
- to avoid merge conflicts
2022-08-08 12:49:46 +02:00
Uwe 855634a670 [FEM] Elmer: scale EigenMode results
- for an not yet known reason the result from Elmer are only for eigen analyses a factor 1000 (we send the mesh scaled to Elmer and it seems the eigen solver does not notice this)
Therefore scale these results
2022-08-08 12:36:17 +02:00
Uwe 194902fb90 [FEM] fix warp filter factor
- since our mesh is in mm, we must multiply the set factor by 1000 to get the real factor. This applies also for pipelines from CCX results.
Now the factor fits with the factor one can set in the CCX results dialog
2022-08-08 12:35:21 +02:00
wmayer b221137067 Gui: set width of list box according to text length 2022-08-08 12:34:18 +02:00
Uwe 2be012c9c6 [FEM] backport some changes to resolve merge conflicts
- manually done
2022-08-08 11:39:13 +02:00
berniev 3e6f7cfc53 Gui: redundant void 2 2022-08-08 11:16:32 +02:00
berniev 8714208cfb App: redundant void 2 2022-08-08 11:14:47 +02:00
wmayer 0ddacad17a Mod: [skip ci] improve whitespace 2022-08-08 10:59:29 +02:00
wmayer 73af68afc5 Gui: [skip ci] include header with export macros 2022-08-08 10:58:22 +02:00
Uwe 365230d313 [FEM] update test files 2022-08-08 03:26:56 +02:00
Uwe 898a57ca29 [FEM] collected Elmer fixes
- manually merge the recent Elmer fixes and novelties
2022-08-08 02:39:14 +02:00
Uwe c2ae76dd77 [FEM] add generic Aluminum material
- with full thermal info
2022-08-08 02:24:09 +02:00
Roy-043 02d6b1dd51 Sketcher: Fix sWhatsThis for Sketcher_CompConstrainRadDia (#7324) 2022-08-08 02:14:04 +02:00
luz paz bcdc681755 FEM: remove trailing whitespace from various FEM files 2022-08-08 02:13:22 +02:00
Uwe d8ed961e35 [FEM] fix pipeline recompute issue
- after a simulation was run, the pipelines and its childs are recomputed but its shape coloring is not updated.

- also update XML documentation
- also remove comment in tasks.py for now
2022-08-08 02:08:05 +02:00
Uwe 73132b3743 [FEM] add framework to scale result mesh values
- it seems that we will need to scale result values (probably for the Elmer Eigen solver)
  This PR adds the framework to do this. It is meant for Elmer but designed versatile.
2022-08-08 02:06:32 +02:00
Uwe 6da987a91b [FEM] fix pipeline recompute bug
- on recomputing scalar or warp filters the information about the field was lost.
  This is because the validity of an array was tested before it is actually filled

- also fix MSVC warning of using a C++ keyword as variable
- also avoid an unnecessary recompute after Elmer solver was run
2022-08-08 00:09:37 +02:00
wmayer 7fd0a19ed7 Gui: improve integrated Python console:
* correctly handle the case that Py_BuildValue() can return a null pointer
* fix a latin1 <-> UTF-8 conversion problem
2022-08-07 19:36:08 +02:00
Uwe 5922dd75bf [FEM] pipeline fix when there is no field
- for the case that pipeline with a field is active, then another pipeline that does not display any field, we cannot just return because the pipeline cannot have the color bar range of the prevision pipeline
2022-08-07 15:27:29 +02:00
Uwe f99c270091 [FEM] [skip CI] set unit for potential loads 2022-08-07 15:18:47 +02:00
Uwe 7fcf092632 [FEM] update Elmer test files 2022-08-07 06:54:37 +02:00
Uwe 93db713b0e [Base] attempt to make a Path backport compiling 2022-08-07 06:49:58 +02:00
Uwe 1571a4817f [FEM] make point filter aware of electric flux
- make point filter aware of electric flux (manually backported)
2022-08-07 06:35:31 +02:00
Uwe 9fd20de4b8 [FEM] fix selection issues with electrostatic constraint
- the used selection widget did not highlight the selected faces. This made it very hard to work with when one has an existing document where e.g. 5 faces have a certain voltage and you cannot figure out which ones.
To fix this use another selection widget
2022-08-07 06:30:53 +02:00
Uwe a4d95722e2 [Fem] Elmer: writer: remove unused variable 2022-08-07 06:29:48 +02:00
Uwe 59da0af311 [FEM] make point filter aware of force density 2022-08-07 06:28:01 +02:00
Uwe 7fbae8a314 [FEM] Elmer: resale the mesh using Elmer
- according to Peter from the Elmer team, we can use Elmer for both, scaling in and scaling back just for consistency
2022-08-07 06:25:28 +02:00
Uwe 8913921f5b [FEM] Elmer: fix pipeline update issue
- the existing result pipeline can have several children. They must all be updated.
2022-08-07 06:24:16 +02:00
berniev da88c7a6d3 give success message normal prominence 2022-08-07 06:23:23 +02:00
sliptonic 002fcacd57 Merge pull request #7278 from mlampert/bugfix/vcarve-c++-exception
PATH: Bugfix/vcarve c++ exception
2022-08-06 03:58:33 +02:00
Uwe 0c14bcb0d9 [Fem] Elmer: update test files 2022-08-05 02:42:45 +02:00
Yorik van Havre bfe8b89da1 Draft: Enabled shortcut for undo segment - fixes #6181
That shortcut had apparently been left out last time the system was recoded..
I used the default shortcut '/' because Ctrl doesn't really work with the
current system, and Z is already taken
2022-08-05 02:30:03 +02:00
Uwe eb4a62f945 [FEM] Elmer: sync input scaling with master 2022-08-05 02:29:14 +02:00
Uwe 40c4f6585b [FEM] fix enable editing for all solvers
- currently for Z88 nothing happens when clicking the Edit button in the solver task dialog. The reason is that opening *.txt files was never implemented
- also do this for Elmer
- for Z88 we need to open several file for a proper editing because the solver info is distributed over these files
2022-08-04 04:25:36 +02:00
Uwe 75d970afda [FEM] Elmer: setup new pipelines like we do for CCX
and manually new created ones
2022-08-04 04:25:00 +02:00
Uwe 655508d68e [FEM] Elmer: use different default linear solver
- BiCGStabl is as robust as BiCGStab but in all tested cases it converges faster
2022-08-04 04:24:34 +02:00
Uwe c66e4b4772 [FEM] Elmer: use direct solving as default for stresses
- direct solving is sometimes even 10 times faster (as fast as CCX) and as accurate as CCX
2022-08-04 04:22:59 +02:00
Uwe 2e3d9dadda [FEM] pipeline: minor highlighting fix
- if a pipeline is invisible the highlighting must not be triggered
2022-08-04 04:21:59 +02:00
Günter Neiß bfe4c724b4 OpenSCAD: remove SCAD-Import error in importCSG.py
Signed-off-by: Günter Neiß <gneiss@web.de>
2022-08-04 01:20:45 +02:00
wmayer ff659b1352 Fem: [skip ci] fix possible crash in PropertyPostDataObject::getMemSize 2022-08-04 00:50:50 +02:00
Uwe b06edfcb97 [Gui] QSint: missing piece to fix QGroupBox visibility
- also the freecadscheme must be adapted (e.g. for PartDesign dialogs)
- fixes now #6102 completely
2022-08-04 00:49:51 +02:00
Chris Hennes d1d9a17a98 Addon Manager: fix thread termination bug 2022-08-03 01:21:45 +02:00
wmayer 67c24b5749 Fem: [skip ci] replace the SoAnnotation with an SoSeparator to fix rendering artifacts for non-convex objects 2022-08-03 01:15:58 +02:00
wmayer 426ff82c87 Fem: use SoAnnotation to highlight result pipeline objects 2022-08-03 01:15:14 +02:00
carlopav 22e8085394 [Draft] Fix Draft Edit AddPoint with BSpline
ref. https://forum.freecadweb.org/viewtopic.php?p=613622#p613622

Fix Bug when adding point to a BSpline.
2022-08-03 01:14:01 +02:00
luz paz b522212d71 AddonManager: Fix source comment typos
[skip ci]
2022-08-03 01:11:58 +02:00
Uwe 6146311a94 - fixes #6102
- the point is that we don't set any style for the group boxes, therefore the Windows style is applied as nothing was set yet. The default Windows style is the color #dddddd which is hardly visible on our blue default style.
as solution set an explicit color.
2022-08-02 05:22:30 +02:00
Yorik van Havre 68b5d8dbca Merge pull request #7259 from Roy-043/Draft-Fix-handling-of-groups-on-move-copy-and-rotate-copy
Draft: Fix handling of groups on move-copy and rotate-copy
2022-08-02 05:19:10 +02:00
wmayer 3a424136ff Spreadsheet: fixes #7285: [Bug] FreeCAD crashes if cell value ' is set in Spreadsheet 2022-08-01 11:51:53 +02:00
Uwe 67682e2bb3 [.github] [skip CI] checks.yml: disable a whitespace check
- todo whitespace is not important
2022-08-01 04:38:47 +02:00
Floriansimmer 65b1048463 Ci v2 (#7282)
* Github: Build and Test

Build and Test:
- ccache
- build
- Unittest
- install
- Unittest of install
- report

misc:
- use .clang-tidy file to configure Clang-tidy checks
- use use .pylintrc to configure Pylint checks
- Update changed-files Action
- better regex for file extension filter
- show enabled clang-tidy checks in Step Report
- show enabled Pylint Checks
- cpplint filter documentation
- modified cpplint filters recomended by https://github.com/sider/runners/blob/HEAD/images/cpplint/sider_recommended_CPPLINT.cfg
- fixed Branch filter for Clazy QT6 checks --> has only worked on pull requests
- fail the CI only on Build  errors, Unittest errors and misspellings

* Github: remove Codespell action as it is now integrated into the check workflow
2022-08-01 04:37:23 +02:00
Uwe 6975093d6e [FEM] Elmer: fixes for the point filter
- use correct names and support all possible outputs
2022-08-01 04:35:32 +02:00
Uwe 2893474ab2 [FEM] Elmer: update .sif files
- because of solver default settings change
2022-08-01 04:34:41 +02:00
Uwe 4430a1cce9 [FEM] Elmer: set sensible defaults for elasticity equation
- for BiCGstabl the minimal degree is 2, but 3 is recommended
- when adding the equation, it should do something, therefore enable the calculation of the principal stresses (as it was, nothing was calculated except of the displacement)
2022-08-01 04:34:41 +02:00
wmayer 75b912b173 Fem: implement a selection observer to notify a ViewProviderFemPostObject when its selection status has changed 2022-07-31 21:20:09 +02:00
Uwe 01ae4db181 [FEM] Constraint: BodeHeat: fix regression from commit 22c64ef8
- a simple indentation mistake
2022-07-31 21:19:00 +02:00
Uwe 8303a55092 [FEM] add missing eigenfrequcy calculation for Elmer
- while for CCX we output the eigenfrequency, for Elmer the user had to perform the calculation of a sqrt of the complex result.
This is inconvenient and error-prone and also requires the knowledge where the result is output by Elmer and in what format. (cast me more than an hour to find this out)
Therefore perform the calculation for the user and output the result.
2022-07-31 05:44:14 +02:00
Uwe 9c7f869e3b [FEM] Elmer: fix small number property handling
- use an expression as discussed: https://forum.freecadweb.org/viewtopic.php?p=613897#p613897
2022-07-31 05:43:01 +02:00
Uwe fdb3dd9de4 [FEM] Elmer: fix eigenmode results for point filter
Elmers' eigenmode results have a different result name
2022-07-31 05:42:06 +02:00
adrianinsaval 014ed4ccc5 Bump PACKAGE_VERSION_PATCH for next patch release 2022-07-31 05:39:28 +02:00
Chris Hennes e51acb490c Addon Manager: Add other_files download for wiki macros 2022-07-30 21:35:19 -05:00
Uwe 58c9ed6028 [FEM] Elmer: add missing direct variant MUMPS
- also use capitalized wording to Umfpack as Elmer does
2022-07-30 20:10:35 +02:00
Zheng, Lei bb55fe76db Gui: fix ViewProviderLink transform with scale
Fixes FreeCAD/FreeCAD#7113
2022-07-30 19:17:55 +02:00
Uwe 451d95d04a Revert "App: fixes #7277: Write to network drive fails on Windows"
This reverts commit c00740aa15.
2022-07-30 16:09:50 +02:00
wmayer c00740aa15 App: fixes #7277: Write to network drive fails on Windows 2022-07-30 14:04:33 +02:00
Adrian Insaurralde Avalos 25ea7e41a6 [python init] Prepend install prefix if libdir is not absolute
For python init script so it can work by default
2022-07-30 00:33:07 +02:00
wmayer 191c95c0ea Mod: [skip ci] fix warning: [-Wreturn-std-move] 2022-07-30 00:21:35 +02:00
wmayer f5096a17e2 Gui: [skip ci] mkae sure the tooltip in ActionGroup::onActivated() disappears again 2022-07-30 00:12:29 +02:00
wmayer 130da19292 App: fixes #7112: Addon manager does not work on windows with special characters in the username 2022-07-29 10:06:34 -05:00
Wanderer Fan 5df4501ccc [TD]fix redraw does not paint all views 2022-07-29 01:37:00 +02:00
Wanderer Fan 919e31ea27 [TD]fix Symbol update on property change 2022-07-29 01:35:59 +02:00
Uwe 60499ffcd4 [Sketcher] fix icon name
- fix a FIXME, Sketcher_CreateEllipse depicts already the right thing, it just has to be renamed
2022-07-29 01:34:51 +02:00
Chris Hennes 8811dc4a48 Addon Manager: Fix get_zip_url for non-github URLs 2022-07-28 02:11:24 +02:00
wmayer 86686ab7ed Part: [skip ci] add unit test for PR #7260 2022-07-27 17:02:48 +02:00
Uwe 55bcd7bf19 [FEM] fix PostObject hiding issue
- when a PostObject is hidden the FemPostDataAtPointFilter must not be taken into account
2022-07-27 16:59:14 +02:00
Uwe 264227ae7b [FEM] sync an icon with master 2022-07-27 16:45:05 +02:00
Uwe 67cafa1453 [FEM] PostDataAtPoint: remove unnecessary style setting
- PostDataAtPoint is a point therefore setting a filling style is not necessary

- also fix a typo in a comment
2022-07-27 16:16:18 +02:00
Uwe a181437a71 [FEM] skip CI] update a comment 2022-07-27 16:11:23 +02:00
Uwe 390461c581 [FEM] update ViewProvider selection code
as suggested in
https://github.com/FreeCAD/FreeCAD/commit/67e836b7e953cf5901a337a6f56df34a0446cd6a#r79459854
2022-07-27 16:11:23 +02:00
Uwe c1b350f117 [Sketcher] CommandCreateGeo: next attempt to fix compilation 2022-07-27 16:03:37 +02:00
Uwe d5404eed47 [Sketcher] CommandCreateGeo: fix compilation 2022-07-27 15:40:06 +02:00
tomate44 75186322eb [Part] BSplineSurface: fix KnotSequence for periodic BSpline surfaces 2022-07-27 15:03:31 +02:00
Uwe 93fe24201a [Sketcher] [skip CI] whitespace fix 2022-07-27 15:02:50 +02:00
0penBrain 9d729cf114 [BUGFIX] Sketcher: fix icon normal/construction toggling when commands used in custom toolbar
Fixes #7064
2022-07-27 14:51:12 +02:00
Chrismettal 0d10011b38 [Stylesheets] Remove whitespace and add "checked" icon style 2022-07-27 14:24:07 +02:00
Uwe f81f9e3bab [FEM] BodyHeat constraint: use unique icon
- it was not possible to distinguish the constraint from the heatFlux constraint
2022-07-27 14:04:40 +02:00
Uwe 4b092abdb0 [FEM] BodyHeat constraint: hide unused property
- the constraint does not take a references and when trying to set one as user because one thinks this empty property must be set, one gets a recompute error
2022-07-27 14:04:40 +02:00
wmayer 341e017960 Spreadsheet: fix several memory leaks 2022-07-27 14:02:45 +02:00
Uwe aae0a70bb6 [FEM] PostObject: improve color bar refreshing
- for data point filters the color bar must not be updated
2022-07-26 04:14:58 +02:00
Uwe ff1e67b44d [FEM] Elmer writer: fix errors on missing material properties
- we must in this case raise an error and stop the writer script
2022-07-26 04:13:55 +02:00
Uwe a3e00bd73e [FEM] update bodyHeatSource
- to the state of the other constraints

(this constraint is currently completely broken by the way)
2022-07-26 04:13:17 +02:00
adrianinsaval 28773a081c Improve grid maxNumberOfLines warning message 2022-07-25 21:03:31 +02:00
wmayer 632ac1521a Part: add instruction how to adjust the maximum number of grid lines 2022-07-25 21:01:28 +02:00
Uwe 53977e0220 Fem: [skip ci] Fix several clazy issues: * Maybe you meant to call base method instead [-Wclazy-skipped-base-method] * Using copy-ctor but class SbMatrix has a trivial copy-ctor but non trivial assign operator [-Wclazy-rule-of-two-soft] * Missing emit keyword on signal call FemGui::PointMarker::PointsChanged [-Wclazy-incorrect-emit] 2022-07-25 20:47:42 +02:00
Uwe 6ba6463107 [FEM] Elmer: fix python error when solver failed
we must then stop the execution of the script
2022-07-25 03:39:41 +02:00
Uwe 9cfbdbe96c [FEM] ViewProviderDocumentObject: fix parenthesis mistake
(I don't know how this happened)
2022-07-24 19:34:55 +02:00
Uwe 7a9a7544ea [FEM] fix color bar handling on hiding post objects
- fixed the remaining part of #7230: on hiding an object, refresh the color bar of the new visible object (if there is any)
2022-07-24 19:34:55 +02:00
Uwe a1d57f9877 [FEM] set default selection mode to BoundBox for post objects
- this fixes a long-standing annoyance that popped up also from time to time in the forum:
  the post objects deliver information via its coloring but a selection in the tree changed the shape color

Even experienced users like me did not know about the SelectionStyle property and always had to click into the model to see the real color, not the selection color.
Therefore SelectionStyle set to BoundBox is sensible as default settings for post objects since this assures that the users always see the right coloring.
2022-07-24 19:34:55 +02:00
Uwe 5bea268817 [.github] try to get the checks also for the 0-20 branch 2022-07-24 06:10:09 +02:00
Uwe add9dd377b Revert "a test for .github"
This reverts commit 25865955b1.
2022-07-24 06:09:11 +02:00
Uwe 6fd477d34b [.github] disable tidy checks for now
- as requested in https://github.com/FreeCAD/FreeCAD/pull/7152#issuecomment-1193176866
2022-07-24 06:07:39 +02:00
Uwe 3b6a83e1b4 [.github] disable clang checks for now
see https://github.com/FreeCAD/FreeCAD/pull/7152#issuecomment-1193167296
2022-07-24 06:07:39 +02:00
Floriansimmer 777bafbc1c Github: basic check CI Run (#7152)
* Github: basic check CI Run

- trailing Whitespace
- tab
- string based QT connections
- Cpplint
- pylint
- Black
- clang-format
- Codespell
- clang-tidy
- clazy (+QT6 Checks)
- Report
2022-07-24 06:07:39 +02:00
mosfet80 03ad5fd551 Git ignore hidden files with defined exceptions (#7108)
* git ignore all hidden files

* Removal file with non-existent link

* git Ignore all hidden files except .gitignore

* Set exceptions in gitignore
2022-07-24 06:07:39 +02:00
Uwe 25865955b1 a test for .github
ignore
2022-07-24 06:03:54 +02:00
Uwe a5860ad542 [FEM] fix regression of missing stress results
- fixes the regression that went in short as "last minute fix": commit 3af54a7dda -> fixes #7242

- also remove a doubled entry in an IF
2022-07-24 05:51:23 +02:00
Uwe ca013f6af7 [FEM] TaskBoxes: add missing info about transparency
The user had no info about the current transparency nor the value he will be selecting.
2022-07-24 05:50:28 +02:00
Uwe 85c8aeb40c [FEM] task_material_common: add a comment 2022-07-23 17:39:36 +02:00
Uwe 8c376a89f2 [FEM] fix material task dialog for fluids
- this fixes a mistake from commit ef088674
- it also consistently use the thermal expansion coefficient
- add code comments

now the material task dialog works with all fluid materials without errors or warnings
2022-07-23 17:39:36 +02:00
Syres916 39fd2593c1 [Part] Bugfix Primitives correction of decimal..
...places on creation
See https://forum.freecadweb.org/viewtopic.php?f=3&t=70339
2022-07-23 17:37:04 +02:00
wmayer fdeee21237 Part: fix TopoShape.isInside() for faces 2022-07-23 17:35:43 +02:00
Uwe 58a87e1ca4 [FEM] better fix for missing colorbar update for FemPostObject
- better fix for #7230 because we can call the direct paint method and because the bar is now also updated when the object is shown

- also add a ToDo note
2022-07-23 17:16:49 +02:00
Uwe 34e60c6731 [FEM] fix missing colorbar update for FemPostObject
- fixes issue #7230

- to update the color bar for post objects, the Field property has to be reset to trigger this. This PR does this.
2022-07-23 17:16:49 +02:00
Roy-043 fc33aed8c1 Arch: Housekeeping: import translate from correct file 2022-07-23 17:00:33 +02:00
Uwe 8ad3fc8ccc [FEM] [skip CI] fix UI file height entry
- was automatically done by QT designer
2022-07-23 16:59:55 +02:00
Uwe a64469320c [FEM] [skipCI] ViewProviderFemPostPipeline: remove unused include
- also sorting
2022-07-23 16:58:39 +02:00
Yorik van Havre 96ea0d266a Merge pull request #7215 from Roy-043/Draft-Remove-unnecessary-DisplayStatusbar-preference
Draft: Remove unnecessary DisplayStatusbar preference
2022-07-20 12:19:08 +02:00
Uwe 832100482c [PD] TaskExtrudeParameters: add missing simplification
forgot this change in commit 98dae1b2
2022-07-20 12:18:07 +02:00
Uwe f9f753e321 [PD] TaskExtrudeParameters: simplify code
to avoid several time the same translatable string
2022-07-20 03:22:44 +02:00
adrianinsaval fb223c2587 [PD Pad/Pocket] Fix bug with midplane usage in TwoLengths mode (#7216)
* [PD Pad/Pocket] Fix bug with midplane usage in TwoLengths mode
2022-07-20 03:22:03 +02:00
wmayer c98a03ecc6 Gui: fix crash in ViewProviderLink::currentDraggingPlacement() if there is no active dragger 2022-07-20 03:21:35 +02:00
wmayer 7f39542a73 Part: add instruction how to adjust the maximum number of grid lines 2022-07-20 03:21:01 +02:00
Yorik van Havre cc3d165ed8 Merge pull request #7181 from manuvarkey/bug_fix_1
Fix bug #6679, add new profiles
2022-07-19 03:16:29 +02:00
Roy-043 58d27e220f Arch: Fix getCutVolume in ArchCommands.py 2022-07-19 03:13:34 +02:00
Yorik van Havre 3b5dd5b852 Merge pull request #7200 from Roy-043/Draft-Fix-color-handling-in-make_point.py
Draft: Fix color handling in make_point.py
2022-07-19 03:12:37 +02:00
Yorik van Havre d385cbece7 Merge pull request #7174 from Roy-043/Draft-Fix-EditMode-for-hatch,-facebinder-and-shapestring
Draft: Fix EditMode for hatch, facebinder and shapestring
2022-07-19 03:11:24 +02:00
Yorik van Havre 98897fb356 Merge pull request #7176 from Roy-043/Draft_Add_resetEdit_to_gui_hatch.py
Draft: Add resetEdit to gui_hatch.py
2022-07-19 03:07:46 +02:00
Yorik van Havre 8b433990ad Merge pull request #7173 from Roy-043/Draft_Fix_setEdit_in_view_text.py
Draft: Fix setEdit in view_text.py
2022-07-19 03:06:52 +02:00
Yorik van Havre 0e7449aef1 Merge pull request #7141 from Roy-043/Draft-make_hatch.py-should-return-the-object
Draft: make_hatch.py should return the object
2022-07-19 03:04:37 +02:00
sliptonic feab004970 Merge pull request #6974 from agren/restore-path-drilling-retract-behaviour
Path: Restore drilling op retract value to user supplied Retract Height
2022-07-18 00:38:38 +02:00
Uwe 136eb1d17a [PD] add parameter enabling logic for pad/pocket
- currently all parameters are always enabled and thus can lead to errors like the one reported here:
https://forum.freecadweb.org/viewtopic.php?f=3&t=70266
2022-07-18 00:31:55 +02:00
Uwe 50f112eaff [PD] improve face selection for Pad/Pocket
- this PR extends PR #7191 as described in this forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=70327
2022-07-18 00:29:09 +02:00
Uwe a7dbbd5f21 [FEM] fix Z88 binary handling
- when the binary was not found, the function called the non-existing binary
- also push error message for Elmer and Z88 to the status info so that user gets feedback also when report view console is not shown
- uniform wording to 'binary'
- avoid unnecessary console output
2022-07-17 03:39:21 +02:00
Uwe 89ecdae088 [PD] fix Pad/Pocket logic issue
- fixes the bug reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=70266
  as Method #2
  -> When switching to two dimensions, symmetric must be unchecked if it is checked
2022-07-17 03:24:19 +02:00
Uwe 13c4de32f2 [FEM] check if solver executables exist
- currently one can enter any path for the solver executables, a check is missing

- moreover for Z88 the executable name is error-prone (just happened to me and cost me half an hour to find out what is wrong), therefore check also the correct filename. For Elmer this cannot be done since there are different executables one can choose of (e.g. for multi-threading etc.)
2022-07-17 03:21:42 +02:00
Uwe abc61d3e14 [FEM] check if Gmsh, CCX and Mystran solver binaries exist
- adds the check like we have already for Z88 and Elmer
- also remove an unnecessary return statement
2022-07-17 03:13:59 +02:00
Uwe 6be3aef0e2 [FEM] fix CCX (new framework) binary handling
- when the binary was not found, the function called the non-existing binary
- also push error message to the status info so that user gets feedback also when report view console is not shown
2022-07-17 03:07:50 +02:00
Uwe 8cd18ce93e [FEM] [skip CI] tell user when Elmer write succeeded
At the moment the user gets no feedback, while for Z88 and CCX he gets a result
2022-07-17 03:04:12 +02:00
Uwe 7979e8c639 [Gui] preferences: clarify Part/PD page
- users are confused that we have a preferences page named "Part design" that also defines things for the Part WB. The Wiki is clear that the preferences page is for both, Part and PD, however the UI is not.
This PR makes this clear.
2022-07-16 18:09:15 +02:00
wmayer e0a8a7f306 PD: fix ProfileBased::getSupportFace() to also handle the case where a support face is selected 2022-07-16 17:35:34 +02:00
wmayer 233685616d PD: rename getUpToFaceFromLinkSub to getFaceFromLinkSub 2022-07-16 17:35:34 +02:00
Roy-043 22c971499a Update view_facebinder.py
There is no need for `Gui.Control.closeDialog()` in `setEdit`
2022-07-16 17:33:29 +02:00
Roy-043 e2ed278874 Draft: Fix Hatch task panel title
Form -> Hatch
2022-07-16 17:32:47 +02:00
Marshal Horn c97f1afd72 Replaced python2 usage of next()
iterator.next() is deprecated in python3.
next(iterator) is the direct replacement.
In some cases a for() loop makes more sense
2022-07-16 17:29:23 +02:00
Wanderer Fan 8d5f274d03 [TD]fix crash on body with no shape 2022-07-14 01:59:41 +02:00
Bernd Hahnebach bd2a9b259d FEM: Python code formatting 2022-07-14 01:56:54 +02:00
Uwe c68d109db1 [FEM] femutils.py: style changes
- as requested
2022-07-14 01:55:10 +02:00
Uwe c1bea323d2 [FEM] fix solver console bugs
- for Elmer and Z88 on Windows several windows pop up (console windows). This is maybe annoying and the user is wondering what is going on, but the main problem is that when you close them, you break the solving process.
Therefore, on Windows only, hide the empty popup windows.
2022-07-14 01:55:10 +02:00
sliptonic 179329d1ba Merge pull request #7137 from Russ4262/fix/path_array_polar
Path: Fix Type=Polar regression in PathArray
2022-07-14 01:51:40 +02:00
Uwe b0e55b69ed Merge pull request #7178 from sliptonic/bug/misc
[Path]  Several small bug fixes
2022-07-14 01:47:26 +02:00
Bernd Hahnebach fc13b150d5 FEM: elmer solver writer, add some comment in the regard of units 2022-07-14 01:37:30 +02:00
wmayer 9e3618005e Part: [skip ci] fix possible build failure 2022-07-14 01:34:26 +02:00
Peter Marquardt fcba255925 Draft: fix spacing of ToolTip text 2022-07-14 01:32:17 +02:00
Bernd Hahnebach f6e1aeabe3 FEM: typos, found with:
codespell -q 2 -S *.ts -S *.dyn -S *.svg  -L childs,dof,dum,freez,methode,nd,normaly,programm,som,uint,vertexes,inout  src/Mod/Fem/
2022-07-14 01:30:54 +02:00
Uwe bbc5ca8a74 [FEM] fix CCX multi-threading bug
- in the preferences one could specify more CPU cores than available

- also correct a label sine the number of cores are since FC 0.20 used for all CCX solver runs

- also remove unnecessary (doubled) slots from the UI file
2022-07-10 17:34:48 +02:00
Uwe 0e304cd22b [FEM] remove doubled slots from preferences UI files 2022-07-10 17:34:48 +02:00
wehrle cc55bf7d83 correction 2022-07-10 13:44:24 +02:00
Roy-043 9833f3fd99 Draft: Fix join.py 2022-07-09 20:17:31 +02:00
Wanderer Fan 6cd575600c [TD]fix bad edge in face finder 2022-07-09 20:15:50 +02:00
Benjamin Bræstrup Sayoc 23f39ad2da [TechDraw] Use function overloadin and avoid code repeat 2022-07-09 20:14:45 +02:00
wmayer 3dadeab9e0 GuiPy: allow to call setupWithoutGUI more than once 2022-07-09 20:12:41 +02:00
Roy-043 1861868428 Draft: displayStatusbarScaleWidget should be checked in preferences-draftinterface.ui 2022-07-09 20:11:18 +02:00
Roy-043 3ce1ce70c9 Arch: Invert opening symbol Simple door 2022-07-09 20:08:01 +02:00
Wanderer Fan 6e77b5ae3f [TD]fix multiple open dialogs 2022-07-09 19:43:31 +02:00
wmayer ebed2d0b33 Test: [skip ci] unit test for fix of Vector2d::Rotate 2022-07-09 19:41:46 +02:00
Wanderer Fan 74bbc3e1db [TD]fix scaling of bitmap 2022-07-09 19:35:49 +02:00
Yorik van Havre 020375256c Merge pull request #7122 from donovaly/Arch-fix-typo
[Arch] fix typo in function name
2022-07-09 19:33:02 +02:00
wmayer 323acb01cf App: fix build failure on Windows caused by PR #7034 2022-07-09 19:31:01 +02:00
flachyjoe 8bb7cfe780 [App] Fix file not found error with canonical filename
boost::filesystem::canonical doesn't resolve non existent file where
boost::filesystem::weakly_canonical does.

Notice boost::filesystem::weakly_canonical only resolve absolute path.
2022-07-09 19:29:48 +02:00
flachyjoe d25478bb35 [App] Fix #5592 : Respect symbolic links
Use the real path to the file when saving the document.
2022-07-09 19:29:48 +02:00
Wanderer Fan ed94b600ca [TD]fix bitmap hatch 2022-07-03 17:55:17 +02:00
Uwe ee78a3c046 [Base] Tools2D.h: a simplification and code style unification 2022-07-03 16:22:28 +02:00
ChenOrange 6a44d1e8ff Vector2d:fix rotate bug 2022-07-03 16:22:28 +02:00
luz paz cc90163850 LGTM: omit src/Tools/wiki2qhelp.py from analysis
Per https://lgtm.com/projects/g/FreeCAD/FreeCAD

[skip ci]
2022-07-03 16:22:02 +02:00
Uwe da1e2c22de [FEM] fix wrong console outputs for fluid materials
- since a while ThermalExpansionCoefficient is used, VolumetricThermalExpansionCoefficient is only used for the material task panel
- as already stated in a code comment, the unit of VolumetricThermalExpansionCoefficient is ThermalExpansionCoefficient, therefore we must check for ThermalExpansionCoefficient
- we must also check if ThermalExpansionCoefficient exists

- Adapt the existing fluid material cards to use the ThermalExpansionCoefficient
2022-07-03 16:17:10 +02:00
Mihail ed7c650f48 FEM WB Elmer viscosity bug fix.
In Elmer there was errors "Viscosity not found" if used mixed solid and flow calculation.
This fix disables Stokes-Navier eruation for Solid objects.

	modified:      src/Mod/Fem/femsolver/elmer/writer.py
2022-07-03 16:15:44 +02:00
Yorik van Havre ad181ce993 Merge pull request #7071 from Roy-043/Draft-Fix-Placement-in-make_sketch
Draft: Fix Sketch Placement in make_sketch (issue #7058)
2022-07-01 03:27:13 +02:00
Wanderer Fan c91c096235 [TD]fix Dimension export to DXF 2022-07-01 02:46:13 +02:00
Wanderer Fan c06f0e9132 [TD]Include CosmeticLines in Dxf 2022-07-01 02:46:13 +02:00
wmayer 5930aac110 Test: ignore UnicodeEncodeError in TestMetadata.test_file_path 2022-07-01 02:21:05 +02:00
wmayer 1d55d10a51 Test: use codecs.open in TestMetadata.test_file_path 2022-07-01 02:12:40 +02:00
wmayer 9a51cd0e34 App: issue #7112: Addon manager does not work on windows with special characters in the username 2022-07-01 02:02:44 +02:00
Roy-043 a0e5012ed0 Draft: Fix default fillmode in DraftGui.py 2022-07-01 02:01:44 +02:00
wmayer ad2c36b351 Test: [skip ci] test file path with utf-8 <-> utf-16 conversion 2022-06-30 00:33:30 +02:00
wmayer 4c74687a6d Test: extend test for enumeration 2022-06-30 00:31:32 +02:00
Roy-043 0d510a837f Draft: Fix align working plane to DatumPlane bug 2022-06-30 00:30:10 +02:00
Roy-043 c219656919 Draft: Fix align working plane to DatumPlane bug 2022-06-30 00:29:48 +02:00
wmayer bb6ab2d7c2 Part: fix GeomBSplineCurve::toBiArcs
If tangent of start and end point are parallel then also check a tangent in between to make sure that it can be considered a straight line
See https://forum.freecadweb.org/viewtopic.php?f=8&t=69710
2022-06-30 00:27:09 +02:00
Uwe ebb5a2bdc6 [FEM] fix point filter initialization issue
- on opening the task dialog of existing point filter, the point value must be displayed
2022-06-27 02:14:45 +02:00
sliptonic 7547f6c79b Merge pull request #6760 from Russ4262/fix/dressup_leadinout
Path: Fixes #6693 - Add Z and K values to arc commands
2022-06-25 19:23:44 +02:00
Uwe f4bf59e000 [PD] Hole initialization bugfix
- by default there is no hole head cut and therefore its parameter must be initialized as read-only (will be enably when user sets a head cut)

- also fix a typo

- also fix a UI file issue (automatically done by Qt Designer)
2022-06-25 16:59:19 +02:00
Kuzemko Alexsandr 79df3ea2eb [Part] Fix display "labelfillet" name for Chamfer and Fillet (#7083)
* Fix display "labelfillet" name for Chamfer and Fillet
* Synchronize options name with PartDesign_Chamfer. Proposed by  @Roy-043
@Roy-043 https://github.com/FreeCAD/FreeCAD/pull/7074#issuecomment-1165303970
2022-06-25 15:06:18 +02:00
Uwe d0c9fec938 [PD] Hole dialog fixes
- when there is no profile the change of the hole cut type was not handled
- for the deprecated hole cut types it must also be possible to use custom values
2022-06-25 14:12:06 +02:00
ShuffleWire de5e7f35e1 Base: add Const attribute to many MatrixPy methods
multiply(), determinant(), isOrthogonal(),
submatrix(), analyze() also get the const attribute
2022-06-24 02:38:20 +02:00
wmayer a015548a88 Part: add Const attribute to several methods in TopoShapePy 2022-06-24 02:38:20 +02:00
wmayer 8a56db68e7 Base: add Const attribute to MatrixPy::inverse() 2022-06-24 02:38:20 +02:00
Adrian Insaurralde Avalos 3f2df77d3f Rename FindOpenCasCade.cmake to FindOCC.cmake
To fix a warning 'name passed to `find_package_handle_standard_args` (OCC) does not match'
2022-06-24 02:37:40 +02:00
luzpaz bb51742f33 Stylesheets: fix typos
[skip ci]
2022-06-24 02:34:58 +02:00
wmayer d07ca8c3b6 Test: [skip ci] test for fixed Rotation::inverse() 2022-06-20 13:14:43 +02:00
marioalexis 763ba9e149 Base: Fix wrong function name in RotationPy documentation. 2022-06-20 02:20:46 +02:00
Uwe c62f6a7e4c Merge branch 'releases/FreeCAD-0-20' of github.com:FreeCAD/FreeCAD into releases/FreeCAD-0-20 2022-06-20 01:00:24 +02:00
Uwe 3e375b6528 update version number and copyright year 2022-06-20 01:00:05 +02:00
Christoph Moench-Tegeder 0a5a1803a5 fix Expressions assignment for FreeBSD
Just like Apple, FreeBSD uses clang as it's main compiler, and thus
runs afoul of the same problem in src/App/PropertyExpressionEngine.cpp
like Apple (issue #5281): "error: no viable overloaded '='".
Extend the fix from #5281 for the BSDs (check macro FC_OS_BSD) -
at least OpenBSD uses clang, too (maybe this check should be reworked
to test for clang, but I can't test on Apple, so let's keep this fix
minimalistic).

References: #5281
2022-06-19 16:15:02 +02:00
marioalexis be9218a76a Base: Set angle in Rotation::inverse function 2022-06-19 15:45:08 +02:00
Wanderer Fan e3865d5121 [TD]fix ProjGroup view spacing 2022-06-19 15:13:42 +02:00
Wanderer Fan 66d6379f7e [TD]fix dimension update on scale change 2022-06-19 15:13:41 +02:00
wmayer c7c9f630b3 plugin: do not exclude widget plugins from tarball 2022-06-19 15:09:22 +02:00
wmayer 6f0e049638 Mesh: fixes #6902: Conda test errors 2022-06-19 15:08:22 +02:00
wmayer 28f730a81e Mesh: fixes #7018: 3mf created with FreeCAD cannot be loaded with PrusaSlicer 2022-06-19 15:06:19 +02:00
wmayer 637472f105 Part: [skip ci] add tests for ruled surfaces 2022-06-19 15:04:16 +02:00
wmayer bd3d6aa3ed Spreadsheet: add tests for merging cells and binding cells 2022-06-19 15:02:42 +02:00
Uwe bcd43070b3 update screenshot in Readme
update screenshot to FC 0.20
2022-06-19 15:01:40 +02:00
TotalCaesar659 c6ab0be18e Update URL to HTTPS 2022-06-19 15:01:40 +02:00
Uwe 668570fc85 [Win installer] update information
- also refine a script
2022-06-19 15:01:40 +02:00
Uwe 3c565e1307 Update Readme to FreeCAD 0.20 2022-06-19 14:59:23 +02:00
504 changed files with 9257 additions and 5144 deletions
+488
View File
@@ -0,0 +1,488 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,cppcoreguidelines-*,concurrency-*'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: file
User: florians
CheckOptions:
- key: readability-suspicious-call-argument.PrefixSimilarAbove
value: '30'
- key: cppcoreguidelines-no-malloc.Reallocations
value: '::realloc'
- key: cppcoreguidelines-owning-memory.LegacyResourceConsumers
value: '::free;::realloc;::freopen;::fclose'
- key: bugprone-reserved-identifier.Invert
value: 'false'
- key: bugprone-narrowing-conversions.PedanticMode
value: 'false'
- key: bugprone-unused-return-value.CheckedFunctions
value: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty;::std::back_inserter;::std::distance;::std::find;::std::find_if;::std::inserter;::std::lower_bound;::std::make_pair;::std::map::count;::std::map::find;::std::map::lower_bound;::std::multimap::equal_range;::std::multimap::upper_bound;::std::set::count;::std::set::find;::std::setfill;::std::setprecision;::std::setw;::std::upper_bound;::std::vector::at;::bsearch;::ferror;::feof;::isalnum;::isalpha;::isblank;::iscntrl;::isdigit;::isgraph;::islower;::isprint;::ispunct;::isspace;::isupper;::iswalnum;::iswprint;::iswspace;::isxdigit;::memchr;::memcmp;::strcmp;::strcoll;::strncmp;::strpbrk;::strrchr;::strspn;::strstr;::wcscmp;::access;::bind;::connect;::difftime;::dlsym;::fnmatch;::getaddrinfo;::getopt;::htonl;::htons;::iconv_open;::inet_addr;::isascii;::isatty;::mmap;::newlocale;::openat;::pathconf;::pthread_equal;::pthread_getspecific;::pthread_mutex_trylock;::readdir;::readlink;::recvmsg;::regexec;::scandir;::semget;::setjmp;::shm_open;::shmget;::sigismember;::strcasecmp;::strsignal;::ttyname'
- key: modernize-use-auto.MinTypeNameLength
value: '5'
- key: cppcoreguidelines-macro-usage.CheckCapsOnly
value: 'false'
- key: readability-inconsistent-declaration-parameter-name.Strict
value: 'false'
- key: readability-suspicious-call-argument.DiceDissimilarBelow
value: '60'
- key: bugprone-assert-side-effect.IgnoredFunctions
value: __builtin_expect
- key: readability-suspicious-call-argument.Equality
value: 'true'
- key: bugprone-easily-swappable-parameters.QualifiersMix
value: 'false'
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
value: 'true'
- key: bugprone-argument-comment.CommentNullPtrs
value: '0'
- key: cppcoreguidelines-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
value: 'true'
- key: cppcoreguidelines-init-variables.IncludeStyle
value: llvm
- key: modernize-use-nodiscard.ReplacementString
value: '[[nodiscard]]'
- key: modernize-loop-convert.MakeReverseRangeHeader
value: ''
- key: readability-suspicious-call-argument.SuffixSimilarAbove
value: '30'
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerNarrowingConversion
value: 'true'
- key: bugprone-easily-swappable-parameters.IgnoredParameterNames
value: '"";iterator;Iterator;begin;Begin;end;End;first;First;last;Last;lhs;LHS;rhs;RHS'
- key: modernize-loop-convert.UseCxx20ReverseRanges
value: 'true'
- key: cppcoreguidelines-prefer-member-initializer.UseAssignment
value: 'false'
- key: performance-type-promotion-in-math-fn.IncludeStyle
value: llvm
- key: readability-function-cognitive-complexity.DescribeBasicIncrements
value: 'true'
- key: bugprone-suspicious-include.ImplementationFileExtensions
value: 'c;cc;cpp;cxx'
- key: modernize-loop-convert.MakeReverseRangeFunction
value: ''
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
value: 'true'
- key: bugprone-suspicious-missing-comma.SizeThreshold
value: '5'
- key: readability-identifier-naming.IgnoreFailedSplit
value: 'false'
- key: readability-qualified-auto.AddConstToQualified
value: 'true'
- key: bugprone-sizeof-expression.WarnOnSizeOfThis
value: 'true'
- key: bugprone-string-constructor.WarnOnLargeLength
value: 'true'
- key: cppcoreguidelines-explicit-virtual-functions.OverrideSpelling
value: override
- key: readability-uppercase-literal-suffix.IgnoreMacros
value: 'true'
- key: modernize-make-shared.IgnoreMacros
value: 'true'
- key: bugprone-dynamic-static-initializers.HeaderFileExtensions
value: ';h;hh;hpp;hxx'
- key: bugprone-suspicious-enum-usage.StrictMode
value: 'false'
- key: performance-unnecessary-copy-initialization.AllowedTypes
value: ''
- key: bugprone-suspicious-missing-comma.MaxConcatenatedTokens
value: '5'
- key: modernize-use-transparent-functors.SafeMode
value: 'false'
- key: readability-suspicious-call-argument.Levenshtein
value: 'true'
- key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
value: 'true'
- key: bugprone-string-constructor.LargeLengthThreshold
value: '8388608'
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
value: 'false'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreAllFloatingPointValues
value: 'false'
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
value: 'false'
- key: bugprone-exception-escape.FunctionsThatShouldNotThrow
value: ''
- key: performance-inefficient-vector-operation.EnableProto
value: 'false'
- key: modernize-make-shared.MakeSmartPtrFunction
value: 'std::make_shared'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: readability-suspicious-call-argument.PrefixDissimilarBelow
value: '25'
- key: readability-function-size.LineThreshold
value: '4294967295'
- key: bugprone-easily-swappable-parameters.MinimumLength
value: '2'
- key: portability-simd-intrinsics.Suggest
value: 'false'
- key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
value: ''
- key: modernize-use-override.IgnoreDestructors
value: 'false'
- key: modernize-make-shared.MakeSmartPtrFunctionHeader
value: '<memory>'
- key: bugprone-sizeof-expression.WarnOnSizeOfConstant
value: 'true'
- key: readability-redundant-string-init.StringNames
value: '::std::basic_string_view;::std::basic_string'
- key: modernize-make-unique.IgnoreDefaultInitialization
value: 'true'
- key: modernize-use-emplace.ContainersWithPushBack
value: '::std::vector;::std::list;::std::deque'
- key: readability-magic-numbers.IgnoreBitFieldsWidths
value: 'true'
- key: modernize-make-unique.IncludeStyle
value: llvm
- key: modernize-use-override.OverrideSpelling
value: override
- key: readability-suspicious-call-argument.LevenshteinDissimilarBelow
value: '50'
- key: bugprone-argument-comment.CommentStringLiterals
value: '0'
- key: concurrency-mt-unsafe.FunctionSet
value: any
- key: readability-identifier-length.IgnoredExceptionVariableNames
value: '^[e]$'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: bugprone-reserved-identifier.AllowedIdentifiers
value: ''
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: 'false'
- key: readability-else-after-return.WarnOnUnfixable
value: 'true'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredFloatingPointValues
value: '1.0;100.0;'
- key: modernize-use-emplace.IgnoreImplicitConstructors
value: 'false'
- key: cppcoreguidelines-macro-usage.IgnoreCommandLineMacros
value: 'true'
- key: readability-suspicious-call-argument.Substring
value: 'true'
- key: modernize-use-equals-delete.IgnoreMacros
value: 'true'
- key: readability-identifier-length.IgnoredVariableNames
value: ''
- key: readability-magic-numbers.IgnoreAllFloatingPointValues
value: 'false'
- key: cppcoreguidelines-pro-bounds-constant-array-index.IncludeStyle
value: llvm
- key: readability-suspicious-call-argument.Abbreviations
value: 'arr=array;cnt=count;idx=index;src=source;stmt=statement;cpy=copy;dest=destination;dist=distancedst=distance;ptr=pointer;wdth=width;str=string;ln=line;srv=server;attr=attribute;ref=reference;buf=buffer;col=column;nr=number;vec=vector;len=length;elem=element;val=value;i=index;var=variable;hght=height;cl=client;num=number;pos=position;lst=list;addr=address'
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
value: 'false'
- key: readability-uppercase-literal-suffix.NewSuffixes
value: ''
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: performance-unnecessary-value-param.AllowedTypes
value: ''
- key: readability-uniqueptr-delete-release.PreferResetCall
value: 'false'
- key: readability-identifier-length.MinimumExceptionNameLength
value: '2'
- key: cppcoreguidelines-avoid-magic-numbers.IgnorePowersOf2IntegerValues
value: 'false'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoreBitFieldsWidths
value: 'true'
- key: cppcoreguidelines-avoid-magic-numbers.IgnoredIntegerValues
value: '1;2;3;4;'
- key: cppcoreguidelines-no-malloc.Allocations
value: '::malloc;::calloc'
- key: bugprone-narrowing-conversions.IgnoreConversionFromTypes
value: ''
- key: readability-function-size.BranchThreshold
value: '4294967295'
- key: bugprone-suspicious-missing-comma.RatioThreshold
value: '0.200000'
- key: readability-implicit-bool-conversion.AllowIntegerConditions
value: 'false'
- key: readability-identifier-length.IgnoredParameterNames
value: '^[n]$'
- key: readability-function-size.StatementThreshold
value: '800'
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 'false'
- key: cppcoreguidelines-init-variables.MathHeader
value: '<math.h>'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: bugprone-reserved-identifier.AggressiveDependentMemberLookup
value: 'false'
- key: readability-suspicious-call-argument.DiceSimilarAbove
value: '70'
- key: modernize-use-equals-default.IgnoreMacros
value: 'true'
- key: readability-suspicious-call-argument.Abbreviation
value: 'true'
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: 'false'
- key: readability-identifier-length.MinimumLoopCounterNameLength
value: '2'
- key: modernize-use-emplace.SmartPointers
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
- key: cppcoreguidelines-no-malloc.Deallocations
value: '::free'
- key: bugprone-dangling-handle.HandleClasses
value: 'std::basic_string_view;std::experimental::basic_string_view'
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues
value: 'false'
- key: readability-suspicious-call-argument.JaroWinklerSimilarAbove
value: '85'
- key: readability-simplify-subscript-expr.Types
value: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array'
- key: performance-unnecessary-copy-initialization.ExcludedContainerTypes
value: ''
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: 'true'
- key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
value: '3'
- key: readability-function-size.VariableThreshold
value: '4294967295'
- key: cert-dcl16-c.NewSuffixes
value: 'L;LL;LU;LLU'
- key: bugprone-narrowing-conversions.WarnOnFloatingPointNarrowingConversion
value: 'true'
- key: readability-identifier-naming.GetConfigPerFile
value: 'true'
- key: modernize-use-default-member-init.UseAssignment
value: 'false'
- key: readability-function-size.NestingThreshold
value: '4294967295'
- key: modernize-use-override.AllowOverrideAndFinal
value: 'false'
- key: cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes
value: ''
- key: readability-function-size.ParameterThreshold
value: '4294967295'
- key: modernize-pass-by-value.ValuesOnly
value: 'false'
- key: readability-function-cognitive-complexity.IgnoreMacros
value: 'false'
- key: modernize-loop-convert.IncludeStyle
value: llvm
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
value: 'false'
- key: bugprone-narrowing-conversions.WarnWithinTemplateInstantiation
value: 'false'
- key: cert-err33-c.CheckedFunctions
value: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;'
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
value: 'false'
- key: readability-redundant-smartptr-get.IgnoreMacros
value: 'true'
- key: cppcoreguidelines-explicit-virtual-functions.AllowOverrideAndFinal
value: 'false'
- key: readability-identifier-naming.AggressiveDependentMemberLookup
value: 'false'
- key: readability-identifier-length.MinimumParameterNameLength
value: '3'
- key: modernize-use-emplace.TupleTypes
value: '::std::pair;::std::tuple'
- key: modernize-use-emplace.TupleMakeFunctions
value: '::std::make_pair;::std::make_tuple'
- key: bugprone-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
value: 'true'
- key: cppcoreguidelines-owning-memory.LegacyResourceProducers
value: '::malloc;::aligned_alloc;::realloc;::calloc;::fopen;::freopen;::tmpfile'
- key: bugprone-easily-swappable-parameters.SuppressParametersUsedTogether
value: 'true'
- key: bugprone-argument-comment.StrictMode
value: '0'
- key: modernize-replace-random-shuffle.IncludeStyle
value: llvm
- key: modernize-use-bool-literals.IgnoreMacros
value: 'true'
- key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField
value: 'true'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: bugprone-suspicious-string-compare.StringCompareLikeFunctions
value: ''
- key: modernize-avoid-bind.PermissiveParameterList
value: 'false'
- key: bugprone-easily-swappable-parameters.NamePrefixSuffixSilenceDissimilarityTreshold
value: '1'
- key: readability-suspicious-call-argument.Suffix
value: 'true'
- key: readability-suspicious-call-argument.JaroWinklerDissimilarBelow
value: '75'
- key: modernize-use-noexcept.ReplacementString
value: ''
- key: modernize-use-override.FinalSpelling
value: final
- key: modernize-use-using.IgnoreMacros
value: 'true'
- key: cppcoreguidelines-explicit-virtual-functions.FinalSpelling
value: final
- key: readability-suspicious-call-argument.MinimumIdentifierNameLength
value: '3'
- key: bugprone-narrowing-conversions.WarnOnIntegerNarrowingConversion
value: 'true'
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: cppcoreguidelines-pro-type-member-init.UseAssignment
value: 'false'
- key: bugprone-suspicious-include.HeaderFileExtensions
value: ';h;hh;hpp;hxx'
- key: performance-no-automatic-move.AllowedTypes
value: ''
- key: readability-suspicious-call-argument.SubstringDissimilarBelow
value: '40'
- key: bugprone-argument-comment.CommentIntegerLiterals
value: '0'
- key: bugprone-stringview-nullptr.IncludeStyle
value: llvm
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: 'false'
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: bugprone-argument-comment.CommentFloatLiterals
value: '0'
- key: bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit
value: '16'
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
value: 'false'
- key: readability-else-after-return.WarnOnConditionVariables
value: 'true'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: readability-suspicious-call-argument.SuffixDissimilarBelow
value: '25'
- key: bugprone-argument-comment.CommentCharacterLiterals
value: '0'
- key: cppcoreguidelines-macro-usage.AllowedRegexp
value: '^DEBUG_*'
- key: readability-suspicious-call-argument.LevenshteinSimilarAbove
value: '66'
- key: cppcoreguidelines-narrowing-conversions.PedanticMode
value: 'false'
- key: modernize-make-shared.IgnoreDefaultInitialization
value: 'true'
- key: readability-suspicious-call-argument.JaroWinkler
value: 'true'
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXHeadersInCppSources
value: 'true'
- key: modernize-make-shared.IncludeStyle
value: llvm
- key: readability-suspicious-call-argument.Prefix
value: 'true'
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
value: 'false'
- key: bugprone-implicit-widening-of-multiplication-result.UseCXXStaticCastsInCppSources
value: 'true'
- key: bugprone-signed-char-misuse.CharTypdefsToIgnore
value: ''
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
value: 'false'
- key: modernize-make-unique.IgnoreMacros
value: 'true'
- key: performance-for-range-copy.AllowedTypes
value: ''
- key: bugprone-argument-comment.CommentBoolLiterals
value: '0'
- key: readability-braces-around-statements.ShortStatementLines
value: '0'
- key: bugprone-argument-comment.CommentUserDefinedLiterals
value: '0'
- key: readability-magic-numbers.IgnoredFloatingPointValues
value: '1.0;100.0;'
- key: performance-inefficient-string-concatenation.StrictMode
value: 'false'
- key: readability-redundant-declaration.IgnoreMacros
value: 'true'
- key: bugprone-easily-swappable-parameters.IgnoredParameterTypeSuffixes
value: 'bool;Bool;_Bool;it;It;iterator;Iterator;inputit;InputIt;forwardit;ForwardIt;bidirit;BidirIt;constiterator;const_iterator;Const_Iterator;Constiterator;ConstIterator;RandomIt;randomit;random_iterator;ReverseIt;reverse_iterator;reverse_const_iterator;ConstReverseIterator;Const_Reverse_Iterator;const_reverse_iterator;Constreverseiterator;constreverseiterator'
- key: modernize-make-unique.MakeSmartPtrFunction
value: 'std::make_unique'
- key: portability-restrict-system-includes.Includes
value: '*'
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: 'false'
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
value: '<memory>'
- key: bugprone-signal-handler.AsyncSafeFunctionSet
value: POSIX
- key: bugprone-easily-swappable-parameters.ModelImplicitConversions
value: 'true'
- key: readability-suspicious-call-argument.SubstringSimilarAbove
value: '50'
- key: cppcoreguidelines-narrowing-conversions.WarnWithinTemplateInstantiation
value: 'false'
- key: readability-identifier-length.MinimumVariableNameLength
value: '3'
- key: cppcoreguidelines-narrowing-conversions.WarnOnEquivalentBitWidth
value: 'true'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnorePublicMemberVariables
value: 'false'
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctionsWhenCopyIsDeleted
value: 'false'
- key: modernize-use-noexcept.UseNoexceptFalse
value: 'true'
- key: readability-function-cognitive-complexity.Threshold
value: '25'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: 'true'
- key: bugprone-argument-comment.IgnoreSingleArgument
value: '0'
- key: bugprone-narrowing-conversions.WarnOnEquivalentBitWidth
value: 'true'
- key: bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression
value: 'false'
- key: performance-faster-string-find.StringLikeClasses
value: '::std::basic_string;::std::basic_string_view'
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion
value: 'true'
- key: bugprone-assert-side-effect.CheckFunctionCalls
value: 'false'
- key: bugprone-string-constructor.StringNames
value: '::std::basic_string;::std::basic_string_view'
- key: bugprone-assert-side-effect.AssertMacros
value: assert,NSAssert,NSCAssert
- key: bugprone-exception-escape.IgnoredExceptions
value: ''
- key: bugprone-signed-char-misuse.DiagnoseSignedUnsignedCharComparisons
value: 'true'
- key: modernize-use-default-member-init.IgnoreMacros
value: 'true'
- key: llvm-qualified-auto.AddConstToQualified
value: 'false'
- key: llvm-else-after-return.WarnOnConditionVariables
value: 'false'
- key: bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant
value: 'true'
- key: modernize-raw-string-literal.DelimiterStem
value: lit
- key: readability-suspicious-call-argument.Dice
value: 'true'
- key: readability-identifier-length.IgnoredLoopCounterNames
value: '^[ijk_]$'
- key: modernize-raw-string-literal.ReplaceShorterLiterals
value: 'false'
- key: readability-magic-numbers.IgnoredIntegerValues
value: '1;2;3;4;'
- key: performance-inefficient-vector-operation.VectorLikeClasses
value: '::std::vector'
- key: modernize-use-auto.RemoveStars
value: 'false'
- key: bugprone-implicit-widening-of-multiplication-result.IncludeStyle
value: llvm
- key: portability-simd-intrinsics.Std
value: ''
- key: performance-unnecessary-value-param.IncludeStyle
value: llvm
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
value: 'false'
- key: modernize-replace-disallow-copy-and-assign-macro.MacroName
value: DISALLOW_COPY_AND_ASSIGN
- key: llvm-else-after-return.WarnOnUnfixable
value: 'false'
...
+15
View File
@@ -0,0 +1,15 @@
{
"problemMatcher": [
{
"owner": "black-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(would reformat (.*))$",
"file": 2,
"message": 1
}
]
}
]
}
+17
View File
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "clang",
"pattern": [
{
"regexp": "^(.+):([0-9]+):([0-9]+): (error|warning|note): (.+)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
+16
View File
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "codespell-matcher",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+):(\\d+):\\s+(.+)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
+16
View File
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "cpplint",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+):([0-9]+): (.+)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "grepMatcher-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+):([0-9]+):(.+)$",
"file": 1,
"line": 2,
"message": 3
}
]
}
]
}
+18
View File
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "pylint-error",
"severity": "error",
"pattern": [
{
"regexp": "^(.+?):([0-9]+):([0-9]+): ([([E|F][0-9]+): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
+18
View File
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "pylint-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+?):([0-9]+):([0-9]+): ([^E|F][0-9]+): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
File diff suppressed because it is too large Load Diff
-31
View File
@@ -1,31 +0,0 @@
# GitHub Action to automate the identification of common misspellings in text files.
# https://github.com/codespell-project/actions-codespell
# https://github.com/codespell-project/codespell
name: Codespell
on:
pull_request:
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v12.2
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
ignore_words_file: .github/codespellignore
skip: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/
path: ${{ steps.changed-files.outputs.all_changed_files }}
+7 -4
View File
@@ -1,5 +1,11 @@
# file types to ignore
.*
!/.gitignore
!/.travis/
!/.travis.yml
!/.clang-format
!/.git-blame-ignore-revs
!/.gitattributes
*.DS_Store
*.pyc
*.obj
@@ -34,10 +40,7 @@ install_manifest.txt
/src/Tools/offlinedoc/localwiki/
/src/Tools/offlinedoc/*.txt
OpenSCAD_rc.py
/\.idea/
.tags
tags
/\.vscode/
# crowdin file
src/Tools/freecad.zip
+614
View File
@@ -0,0 +1,614 @@
[MAIN]
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Load and enable all available extensions. Use --list-extensions to see a list
# all available extensions.
#enable-all-extensions=
# In error mode, messages with a category besides ERROR or FATAL are
# suppressed, and no reports are done by default. Error mode is compatible with
# disabling specific errors.
#errors-only=
# Always return a 0 (non-error) status code, even if lint errors are found.
# This is primarily useful in continuous integration scripts.
#exit-zero=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-allow-list=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
# for backward compatibility.)
extension-pkg-whitelist=
# Return non-zero exit code if any of these messages/categories are detected,
# even if score is above --fail-under value. Syntax same as enable. Messages
# specified are enabled, while categories only check already-enabled messages.
fail-on=
# Specify a score threshold to be exceeded before program exits with error.
fail-under=10
# Interpret the stdin as a python script, whose filename needs to be passed as
# the module_or_package argument.
#from-stdin=
# Files or directories to be skipped. They should be base names, not paths.
ignore=CVS
# Add files or directories matching the regex patterns to the ignore-list. The
# regex matches against paths and can be in Posix or Windows format.
ignore-paths=
# Files or directories matching the regex patterns are skipped. The regex
# matches against base names, not paths. The default value ignores Emacs file
# locks
ignore-patterns=^\.#
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.10
# Discover python modules and packages in the file system subtree.
recursive=no
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# In verbose mode, extra non-checker-related info will be displayed.
#verbose=
[REPORTS]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
# 'convention', and 'info' which contain the number of messages in each
# category, as well as 'statement' which is the total number of statements
# analyzed. This score is used by the global evaluation report (RP0004).
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
#output-format=
# Tells whether to display a full report or only the messages.
reports=yes
# Activate the evaluation score.
score=yes
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
# UNDEFINED.
confidence=HIGH,
CONTROL_FLOW,
INFERENCE,
INFERENCE_FAILURE,
UNDEFINED
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
invalid-name,
wrong-import-order,
import-error,
undefined-variable
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
[BASIC]
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style. If left empty, argument names will be checked with the set
# naming style.
#argument-rgx=
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style. If left empty, attribute names will be checked with the set naming
# style.
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma.
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Bad variable names regexes, separated by a comma. If names match any regex,
# they will always be refused
bad-names-rgxs=
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style. If left empty, class attribute names will be checked
# with the set naming style.
#class-attribute-rgx=
# Naming style matching correct class constant names.
class-const-naming-style=UPPER_CASE
# Regular expression matching correct class constant names. Overrides class-
# const-naming-style. If left empty, class constant names will be checked with
# the set naming style.
#class-const-rgx=
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-
# style. If left empty, class names will be checked with the set naming style.
#class-rgx=
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style. If left empty, constant names will be checked with the set naming
# style.
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style. If left empty, function names will be checked with the set
# naming style.
#function-rgx=
# Good variable names which should always be accepted, separated by a comma.
good-names=i,
j,
k,
ex,
Run,
_
# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=
# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style. If left empty, inline iteration names will be checked
# with the set naming style.
#inlinevar-rgx=
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style. If left empty, method names will be checked with the set naming style.
#method-rgx=
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style. If left empty, module names will be checked with the set naming style.
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
# Regular expression matching correct type variable names. If left empty, type
# variable names will be checked with the set naming style.
#typevar-rgx=
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style. If left empty, variable names will be checked with the set
# naming style.
#variable-rgx=
[CLASSES]
# Warn about protected attribute access inside special methods
check-protected-access-in-special-methods=no
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp,
__post_init__
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,
_fields,
_replace,
_source,
_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=cls
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit,argparse.parse_error
[DESIGN]
# List of regular expressions of class ancestor names to ignore when counting
# public methods (see R0903)
exclude-too-few-public-methods=
# List of qualified class names to ignore when counting class parents (see
# R0901)
ignored-parents=
# Maximum number of arguments for function / method.
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of locals for function / method body.
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body.
max-returns=6
# Maximum number of statements in function / method body.
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[EXCEPTIONS]
# Exceptions that will emit a warning when caught.
overgeneral-exceptions=BaseException,
Exception
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[IMPORTS]
# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=
# Output a graph (.gv or any supported image format) of external dependencies
# to the given file (report RP0402 must not be disabled).
ext-import-graph=
# Output a graph (.gv or any supported image format) of all (i.e. internal and
# external) dependencies to the given file (report RP0402 must not be
# disabled).
import-graph=
# Output a graph (.gv or any supported image format) of internal dependencies
# to the given file (report RP0402 must not be disabled).
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=old
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO
# Regular expression of note tags to take in consideration.
notes-rgx=
[SIMILARITIES]
# Comments are removed from the similarity computation
ignore-comments=yes
# Docstrings are removed from the similarity computation
ignore-docstrings=yes
# Imports are removed from the similarity computation
ignore-imports=yes
# Signatures are removed from the similarity computation
ignore-signatures=yes
# Minimum lines number of a similarity.
min-similarity-lines=4
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name. Available dictionaries: none. To make it work,
# install the 'python-enchant' package.
spelling-dict=
# List of comma separated words that should be considered directives if they
# appear at the beginning of a comment and should not be checked.
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains the private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to the private dictionary (see the
# --spelling-private-dict-file option) instead of raising a message.
spelling-store-unknown-words=no
[STRING]
# This flag controls whether inconsistent-quotes generates a warning when the
# character used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=no
# This flag controls whether the implicit-str-concat should generate a warning
# on implicit string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=no
[TYPECHECK]
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of symbolic message names to ignore for Mixin members.
ignored-checks-for-mixins=no-member,
not-async-context-manager,
not-context-manager,
attribute-defined-outside-init
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
# Regex pattern to define which classes are considered mixins.
mixin-class-rgx=.*[Mm]ixin
# List of decorators that change the signature of a decorated function.
signature-mutators=
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored. Default to name
# with leading underscore.
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
+3 -3
View File
@@ -18,9 +18,9 @@ project(FreeCAD)
set(PACKAGE_VERSION_NAME "Vulcan")
set(PACKAGE_VERSION_MAJOR "0")
set(PACKAGE_VERSION_MINOR "20")
set(PACKAGE_VERSION_PATCH "0")
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
set(FREECAD_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
set(PACKAGE_VERSION_PATCH "1")
set(PACKAGE_VERSION_SUFFIX "") # either "dev" for development snapshot or "" (empty string)
set(FREECAD_VERSION_PATCH "1") # number of patch release (e.g. "4" for the 0.18.4 release)
set(FREECAD_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
+6 -6
View File
@@ -11,7 +11,7 @@
[![Release](https://img.shields.io/github/release/freecad/freecad.svg)](https://github.com/freecad/freecad/releases/latest) [![Master][freecad-master-status]][gitlab-branch-master] [![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad) [![Gitter](https://img.shields.io/gitter/room/freecad/freecad.svg)](https://gitter.im/freecad/freecad?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/FreeCAD/FreeCAD.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:python) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/FreeCAD/FreeCAD.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FreeCAD/FreeCAD/context:cpp) [![Liberapay](https://img.shields.io/liberapay/receives/FreeCAD.svg?logo=liberapay)](https://liberapay.com/FreeCAD)
![screenshot](https://wiki.freecadweb.org/images/thumb/7/72/Freecad016_screenshot1.jpg/800px-Freecad016_screenshot1.jpg)
<img src="https://user-images.githubusercontent.com/1828501/174066870-1692005b-f8d7-43fb-a289-6d2f07f73d7f.png" width="800"/>
Overview
--------
@@ -55,13 +55,13 @@ Other options are described at the [wiki Download page](https://wiki.freecadweb.
Build Status
------------
| Master | 0.19 | Translation |
| Master | 0.20 | Translation |
|:------:|:----:|:-----------:|
|[![Master][freecad-master-status]][gitlab-branch-master]|[![0.19][freecad-0.19-status]][gitlab-branch-0.19]|[![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad)|
|[![Master][freecad-master-status]][gitlab-branch-master]|[![0.20][freecad-0.20-status]][gitlab-branch-0.20]|[![Crowdin](https://d322cqt584bo4o.cloudfront.net/freecad/localized.svg)](https://crowdin.com/project/freecad)|
[freecad-0.19-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/releases/FreeCAD-0-19/pipeline.svg
[freecad-0.20-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/releases/FreeCAD-0-20/pipeline.svg
[freecad-master-status]: https://gitlab.com/freecad/FreeCAD-CI/badges/master/pipeline.svg
[gitlab-branch-0.19]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/releases/FreeCAD-0-19
[gitlab-branch-0.20]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/releases/FreeCAD-0-20
[gitlab-branch-master]: https://gitlab.com/freecad/FreeCAD-CI/-/commits/master
[travis-builds]: https://travis-ci.org/FreeCAD/FreeCAD/builds
@@ -99,7 +99,7 @@ To report an issue please:
For more detail see:
- [Wiki Page about the Bug Tracker](https://wiki.freecadweb.org/Tracker)
- [Bug Tracker](https://tracker.freecadweb.org)
- [Help Forum](http://forum.freecadweb.org/viewforum.php?f=3)
- [Help Forum](https://forum.freecadweb.org/viewforum.php?f=3)
Usage & Getting help
+1 -1
View File
@@ -1,7 +1,7 @@
macro(SetupOpenCasCade)
# -------------------------------- OpenCasCade --------------------------------
find_package(OpenCasCade)
find_package(OCC)
if(NOT OCC_FOUND)
message(FATAL_ERROR "================================================================\n"
"Neither OpenCASCADE Community Edition nor OpenCASCADE was found!\n"
@@ -125,9 +125,7 @@ macro(SetupShibokenAndPyside)
"PySide2 Python module not found.\n"
"================================\n")
else()
message(STATUS "===============================================\n"
"PySide2 Python module found at ${PRINT_OUTPUT}.\n"
"===============================================\n")
message(STATUS "PySide2 Python module found at ${PRINT_OUTPUT}.\n")
endif()
endmacro(SetupShibokenAndPyside)
+1
View File
@@ -12,6 +12,7 @@ path_classifiers:
- "src/CXX/"
template:
- "src/Tools/examplePy2wiki.py"
- "src/Tools/wiki2qhelp.py"
- "src/Mode/TemplatePyMod/"
unmaintained:
- "src/Mod/Robot/"
+11 -3
View File
@@ -2441,10 +2441,14 @@ void Application::initConfig(int argc, char ** argv)
// We only set these keys if not yet defined. Therefore it suffices to search
// only for 'BuildVersionMajor'.
if (App::Application::Config().find("BuildVersionMajor") == App::Application::Config().end()) {
std::stringstream str; str << FCVersionMajor << "." << FCVersionMinor;
std::stringstream str;
str << FCVersionMajor
<< "." << FCVersionMinor
<< "." << FCVersionPoint;
App::Application::Config()["ExeVersion" ] = str.str();
App::Application::Config()["BuildVersionMajor" ] = FCVersionMajor;
App::Application::Config()["BuildVersionMinor" ] = FCVersionMinor;
App::Application::Config()["BuildVersionPoint" ] = FCVersionPoint;
App::Application::Config()["BuildRevision" ] = FCRevision;
App::Application::Config()["BuildRepositoryURL" ] = FCRepositoryURL;
App::Application::Config()["BuildRevisionDate" ] = FCRevisionDate;
@@ -2524,17 +2528,21 @@ void Application::initConfig(int argc, char ** argv)
// Remove banner if FreeCAD is invoked via the -c command as regular
// Python interpreter
if (!(mConfig["Verbose"] == "Strict"))
Console().Message("%s %s, Libs: %s.%sR%s\n%s",mConfig["ExeName"].c_str(),
Console().Message("%s %s, Libs: %s.%s.%sR%s\n%s",
mConfig["ExeName"].c_str(),
mConfig["ExeVersion"].c_str(),
mConfig["BuildVersionMajor"].c_str(),
mConfig["BuildVersionMinor"].c_str(),
mConfig["BuildVersionPoint"].c_str(),
mConfig["BuildRevision"].c_str(),
mConfig["CopyrightInfo"].c_str());
else
Console().Message("%s %s, Libs: %s.%sB%s\n",mConfig["ExeName"].c_str(),
Console().Message("%s %s, Libs: %s.%s.%sB%s\n",
mConfig["ExeName"].c_str(),
mConfig["ExeVersion"].c_str(),
mConfig["BuildVersionMajor"].c_str(),
mConfig["BuildVersionMinor"].c_str(),
mConfig["BuildVersionPoint"].c_str(),
mConfig["BuildRevision"].c_str());
}
LoadParameters();
+6 -3
View File
@@ -104,9 +104,9 @@ PyMethodDef Application::Methods[] = {
"* If no module is given it will be determined by the file extension.\n"
"* If more than one module can load a file the first one will be taken.\n"
"* If no module exists to load the file an exception will be raised."},
{"open", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( Application::sOpenDocument )), METH_VARARGS|METH_KEYWORDS,
{"open", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( Application::sOpenDocument )), METH_VARARGS|METH_KEYWORDS,
"See openDocument(string)"},
{"openDocument", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( Application::sOpenDocument )), METH_VARARGS|METH_KEYWORDS,
{"openDocument", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( Application::sOpenDocument )), METH_VARARGS|METH_KEYWORDS,
"openDocument(filepath,hidden=False) -> object\n"
"Create a document and load the project file into the document.\n\n"
"filepath: file path to an existing file. If the file doesn't exist\n"
@@ -116,7 +116,7 @@ PyMethodDef Application::Methods[] = {
// {"saveDocument", (PyCFunction) Application::sSaveDocument, METH_VARARGS,
// "saveDocument(string) -- Save the document to a file."},
// {"saveDocumentAs", (PyCFunction) Application::sSaveDocumentAs, METH_VARARGS},
{"newDocument", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( Application::sNewDocument )), METH_VARARGS|METH_KEYWORDS,
{"newDocument", reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( Application::sNewDocument )), METH_VARARGS|METH_KEYWORDS,
"newDocument(name, label=None, hidden=False, temp=False) -> object\n"
"Create a new document with a given name.\n\n"
"name: unique document name which is checked automatically.\n"
@@ -492,6 +492,9 @@ PyObject* Application::sGetVersion(PyObject * /*self*/, PyObject *args)
it = cfg.find("BuildVersionMinor");
list.append(Py::String(it != cfg.end() ? it->second : ""));
it = cfg.find("BuildVersionPoint");
list.append(Py::String(it != cfg.end() ? it->second : ""));
it = cfg.find("BuildRevision");
list.append(Py::String(it != cfg.end() ? it->second : ""));
+18 -11
View File
@@ -2614,23 +2614,30 @@ bool Document::saveToFile(const char* filename) const
bool policy = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Document")->GetBool("BackupPolicy",true);
//realpath is canonical filename i.e. without symlink
#ifdef FC_OS_WIN32
QString utf8Name = QString::fromUtf8(filename);
auto realpath = fs::weakly_canonical(fs::absolute(fs::path(utf8Name.toStdWString())));
std::string nativePath = QString::fromStdWString(realpath.native()).toStdString();
#else
auto realpath = fs::weakly_canonical(fs::absolute(fs::path(filename)));
std::string nativePath = realpath.native();
#endif
// make a tmp. file where to save the project data first and then rename to
// the actual file name. This may be useful if overwriting an existing file
// fails so that the data of the work up to now isn't lost.
std::string uuid = Base::Uuid::createUuid();
std::string fn = filename;
std::string fn = nativePath;
if (policy) {
fn += ".";
fn += uuid;
}
Base::FileInfo tmp(fn);
// In case some folders in the path do not exist
#ifdef FC_OS_WIN32
QString utf8Name = QString::fromUtf8(filename);
auto parentPath = fs::absolute(fs::path(utf8Name.toStdWString())).parent_path();
#else
auto parentPath = fs::absolute(fs::path(filename)).parent_path();
#endif
auto parentPath = realpath.parent_path();
fs::create_directories(parentPath);
// open extra scope to close ZipWriter properly
@@ -2677,9 +2684,9 @@ bool Document::saveToFile(const char* filename) const
count_bak = -1;
}
bool useFCBakExtension = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Document")->GetBool("UseFCBakExtension",false);
std::string saveBackupDateFormat = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Document")->GetASCII("SaveBackupDateFormat","%Y%m%d-%H%M%S");
("User parameter:BaseApp/Preferences/Document")->GetBool("UseFCBakExtension",false);
std::string saveBackupDateFormat = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Document")->GetASCII("SaveBackupDateFormat","%Y%m%d-%H%M%S");
BackupPolicy policy;
if (useFCBakExtension) {
@@ -2691,7 +2698,7 @@ bool Document::saveToFile(const char* filename) const
policy.setPolicy(BackupPolicy::Standard);
}
policy.setNumberOfFiles(count_bak);
policy.apply(fn, filename);
policy.apply(fn, nativePath);
}
signalFinishSave(*this, filename);
+20 -20
View File
@@ -112,7 +112,7 @@ public:
boost::signals2::signal<void (const App::DocumentObject&, const App::Property&)> signalChanged;
/// returns the type name of the ViewProvider
virtual const char* getViewProviderName(void) const {
virtual const char* getViewProviderName() const {
return "";
}
/**
@@ -129,11 +129,11 @@ public:
}
/// Constructor
DocumentObject(void);
DocumentObject();
virtual ~DocumentObject();
/// returns the name which is set in the document for this object (not the name property!)
const char *getNameInDocument(void) const;
const char *getNameInDocument() const;
/// Return the object ID that is unique within its owner document
long getID() const {return _Id;}
/// returns the name that is safe to be exported to other document
@@ -143,7 +143,7 @@ public:
virtual bool isAttachedToDocument() const override;
virtual const char* detachFromDocument() override;
/// gets the document in which this Object is handled
App::Document *getDocument(void) const;
App::Document *getDocument() const;
/** Set the property touched -> changed, cause recomputation in Update()
*/
@@ -151,22 +151,22 @@ public:
/// set this document object touched (cause recomputation on dependent features)
void touch(bool noRecompute=false);
/// test if this document object is touched
bool isTouched(void) const;
bool isTouched() const;
/// Enforce this document object to be recomputed
void enforceRecompute();
/// Test if this document object must be recomputed
bool mustRecompute(void) const;
bool mustRecompute() const;
/// reset this document object touched
void purgeTouched(void) {
void purgeTouched() {
StatusBits.reset(ObjectStatus::Touch);
StatusBits.reset(ObjectStatus::Enforce);
setPropertyStatus(0,false);
}
/// set this feature to error
bool isError(void) const {return StatusBits.test(ObjectStatus::Error);}
bool isValid(void) const {return !StatusBits.test(ObjectStatus::Error);}
bool isError() const {return StatusBits.test(ObjectStatus::Error);}
bool isValid() const {return !StatusBits.test(ObjectStatus::Error);}
/// remove the error from the object
void purgeError(void){StatusBits.reset(ObjectStatus::Error);}
void purgeError(){StatusBits.reset(ObjectStatus::Error);}
/// returns true if this objects is currently recomputing
bool isRecomputing() const {return StatusBits.test(ObjectStatus::Recompute);}
/// returns true if this objects is currently restoring from file
@@ -228,7 +228,7 @@ public:
/// returns a list of objects linked by the property
std::vector<App::DocumentObject*> getOutListOfProperty(App::Property*) const;
/// returns a list of objects this object is pointing to by Links and all further descended
std::vector<App::DocumentObject*> getOutListRecursive(void) const;
std::vector<App::DocumentObject*> getOutListRecursive() const;
/// clear internal out list cache
void clearOutListCache() const;
/// get all possible paths from this to another object following the OutList
@@ -237,10 +237,10 @@ public:
/// get all objects link to this object
std::vector<App::DocumentObject*> getInList(void) const
#else
const std::vector<App::DocumentObject*> &getInList(void) const;
const std::vector<App::DocumentObject*> &getInList() const;
#endif
/// get all objects link directly or indirectly to this object
std::vector<App::DocumentObject*> getInListRecursive(void) const;
std::vector<App::DocumentObject*> getInListRecursive() const;
/** Get a set of all objects linking to this object, including possible external parent objects
*
* @param inSet [out]: a set containing all objects linking to this object.
@@ -299,7 +299,7 @@ public:
* necessarily mean that it will be recomputed. It only means that all
* objects that link it (i.e. its InList) will be recomputed.
*/
virtual short mustExecute(void) const;
virtual short mustExecute() const;
/** Recompute only this feature
*
@@ -308,7 +308,7 @@ public:
bool recomputeFeature(bool recursive=false);
/// get the status Message
const char *getStatusString(void) const;
const char *getStatusString() const;
/** Called in case of losing a link
* Get called by the document when a object got deleted a link property of this
@@ -317,7 +317,7 @@ public:
* additional or different behavior.
*/
virtual void onLostLinkToObject(DocumentObject*);
virtual PyObject *getPyObject(void) override;
virtual PyObject *getPyObject() override;
/** Get the sub element/object by name
*
@@ -561,7 +561,7 @@ public:
protected:
/// recompute only this object
virtual App::DocumentObjectExecReturn *recompute(void);
virtual App::DocumentObjectExecReturn *recompute();
/** get called by the document to recompute this feature
* Normally this method get called in the processing of
* Document::recompute().
@@ -569,7 +569,7 @@ protected:
* with the data from linked objects and objects own
* properties.
*/
virtual App::DocumentObjectExecReturn *execute(void);
virtual App::DocumentObjectExecReturn *execute();
/**
* Executes the extensions of a document object.
@@ -592,8 +592,8 @@ protected:
*/
std::bitset<32> StatusBits;
void setError(void){StatusBits.set(ObjectStatus::Error);}
void resetError(void){StatusBits.reset(ObjectStatus::Error);}
void setError(){StatusBits.set(ObjectStatus::Error);}
void resetError(){StatusBits.reset(ObjectStatus::Error);}
void setDocument(App::Document* doc);
/// get called before the value is changed
+1 -1
View File
@@ -3193,7 +3193,7 @@ static int column;
// show the parser the lexer method
#define yylex ExpressionParserlex
int ExpressionParserlex(void);
int ExpressionParserlex();
// Parser, defined in ExpressionParser.y
# define YYTOKENTYPE
+8 -8
View File
@@ -148,7 +148,7 @@ void LinkParams::removeCopyOnChangeApplyToAll() {
EXTENSION_PROPERTY_SOURCE(App::LinkBaseExtension, App::DocumentObjectExtension)
LinkBaseExtension::LinkBaseExtension(void)
LinkBaseExtension::LinkBaseExtension()
:enableLabelCache(false),hasOldSubElement(false),hasCopyOnChange(true)
{
initExtensionType(LinkBaseExtension::getExtensionClassTypeId());
@@ -166,7 +166,7 @@ LinkBaseExtension::~LinkBaseExtension()
{
}
PyObject* LinkBaseExtension::getExtensionPyObject(void) {
PyObject* LinkBaseExtension::getExtensionPyObject() {
if (ExtensionPythonObject.is(Py::_None())){
// ref counter is set to 1
ExtensionPythonObject = Py::Object(new LinkBaseExtensionPy(this),true);
@@ -293,7 +293,7 @@ void LinkBaseExtension::setProperty(int idx, Property *prop) {
static const char _GroupPrefix[] = "Configuration (";
App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute(void) {
App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute() {
// The actual value of LinkTouched is not important, just to notify view
// provider that the link (in fact, its dependents, i.e. linked ones) have
// recomputed.
@@ -398,7 +398,7 @@ App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute(void) {
return inherited::extensionExecute();
}
short LinkBaseExtension::extensionMustExecute(void) {
short LinkBaseExtension::extensionMustExecute() {
auto link = getLink();
if(!link)
return 0;
@@ -2226,7 +2226,7 @@ template class AppExport ExtensionPythonT<LinkBaseExtension>;
EXTENSION_PROPERTY_SOURCE(App::LinkExtension, App::LinkBaseExtension)
LinkExtension::LinkExtension(void)
LinkExtension::LinkExtension()
{
initExtensionType(LinkExtension::getExtensionClassTypeId());
@@ -2266,7 +2266,7 @@ bool Link::canLinkProperties() const {
namespace App {
PROPERTY_SOURCE_TEMPLATE(App::LinkPython, App::Link)
template<> const char* App::LinkPython::getViewProviderName(void) const {
template<> const char* App::LinkPython::getViewProviderName() const {
return "Gui::ViewProviderLinkPython";
}
template class AppExport FeaturePythonT<App::Link>;
@@ -2293,7 +2293,7 @@ bool LinkElement::canDelete() const {
namespace App {
PROPERTY_SOURCE_TEMPLATE(App::LinkElementPython, App::LinkElement)
template<> const char* App::LinkElementPython::getViewProviderName(void) const {
template<> const char* App::LinkElementPython::getViewProviderName() const {
return "Gui::ViewProviderLinkPython";
}
template class AppExport FeaturePythonT<App::LinkElement>;
@@ -2312,7 +2312,7 @@ LinkGroup::LinkGroup() {
namespace App {
PROPERTY_SOURCE_TEMPLATE(App::LinkGroupPython, App::LinkGroup)
template<> const char* App::LinkGroupPython::getViewProviderName(void) const {
template<> const char* App::LinkGroupPython::getViewProviderName() const {
return "Gui::ViewProviderLinkPython";
}
template class AppExport FeaturePythonT<App::LinkGroup>;
+7 -7
View File
@@ -286,8 +286,8 @@ public:
bool extensionGetLinkedObject(DocumentObject *&ret,
bool recurse, Base::Matrix4D *mat, bool transform, int depth) const override;
virtual App::DocumentObjectExecReturn *extensionExecute(void) override;
virtual short extensionMustExecute(void) override;
virtual App::DocumentObjectExecReturn *extensionExecute() override;
virtual short extensionMustExecute() override;
virtual void extensionOnChanged(const Property* p) override;
virtual void onExtendedUnsetupObject () override;
virtual void onExtendedDocumentRestored() override;
@@ -296,7 +296,7 @@ public:
virtual int extensionIsElementVisible(const char *) override;
virtual bool extensionHasChildElement() const override;
virtual PyObject* getExtensionPyObject(void) override;
virtual PyObject* getExtensionPyObject() override;
virtual Property *extensionGetPropertyByName(const char* name) const override;
@@ -536,9 +536,9 @@ public:
LINK_PROPS_DEFINE(LINK_PARAMS_LINK)
Link(void);
Link();
const char* getViewProviderName(void) const override{
const char* getViewProviderName() const override{
return "Gui::ViewProviderLink";
}
@@ -581,7 +581,7 @@ public:
LINK_PROPS_DEFINE(LINK_PARAMS_ELEMENT)
LinkElement();
const char* getViewProviderName(void) const override{
const char* getViewProviderName() const override{
return "Gui::ViewProviderLink";
}
@@ -620,7 +620,7 @@ public:
LinkGroup();
const char* getViewProviderName(void) const override{
const char* getViewProviderName() const override{
return "Gui::ViewProviderLink";
}
+9 -1
View File
@@ -98,7 +98,11 @@ Metadata::Metadata(const fs::path& metadataFile)
auto errHandler = std::make_unique<MetadataInternal::XMLErrorHandler>();
_parser->setErrorHandler(errHandler.get());
#if defined (FC_OS_WIN32)
_parser->parse(reinterpret_cast<const XMLCh*>(metadataFile.wstring().c_str()));
#else
_parser->parse(metadataFile.string().c_str());
#endif
auto doc = _parser->getDocument();
_dom = doc->getDocumentElement();
@@ -448,6 +452,7 @@ bool Metadata::satisfies(const Meta::Dependency& dep)
std::map<std::string, std::string>& config = App::Application::Config();
replacements.insert(std::make_pair("$BuildVersionMajor", config["BuildVersionMajor"]));
replacements.insert(std::make_pair("$BuildVersionMinor", config["BuildVersionMinor"]));
replacements.insert(std::make_pair("$BuildVersionMinor", config["BuildVersionPoint"]));
replacements.insert(std::make_pair("$BuildRevision", config["BuildRevision"]));
for (const auto& replacement : replacements) {
auto pos = injectedString.find(replacement.first);
@@ -492,7 +497,10 @@ bool App::Metadata::supportsCurrentFreeCAD() const
if (fcVersion == Meta::Version()) {
std::map<std::string, std::string>& config = App::Application::Config();
std::stringstream ss;
ss << config["BuildVersionMajor"] << "." << config["BuildVersionMinor"] << "." << (config["BuildRevision"].empty() ? "0" : config["BuildRevision"]);
ss << config["BuildVersionMajor"]
<< "." << config["BuildVersionMinor"]
<< "." << config["BuildVersionPoint"]
<< "." << (config["BuildRevision"].empty() ? "0" : config["BuildRevision"]);
fcVersion = Meta::Version(ss.str());
}
+7 -3
View File
@@ -23,6 +23,7 @@
#include "PreCompiled.h"
#include "Metadata.h"
#include <Base/FileInfo.h>
// inclusion of the generated files (generated out of MetadataPy.xml)
#include "MetadataPy.h"
@@ -64,10 +65,13 @@ int MetadataPy::PyInit(PyObject* args, PyObject* /*kwd*/)
// Main class constructor -- takes a file path, loads the metadata from it
PyErr_Clear();
const char* filename;
if (PyArg_ParseTuple(args, "s", &filename)) {
char* filename;
if (PyArg_ParseTuple(args, "et", "utf-8", &filename)) {
try {
auto md = new Metadata(filename);
std::string utf8Name = std::string(filename);
PyMem_Free(filename);
auto md = new Metadata(Base::FileInfo::stringToPath(utf8Name));
setTwinPointer(md);
return 0;
}
+1 -1
View File
@@ -179,7 +179,7 @@ private:
typedef boost::adjacency_list< boost::listS, boost::vecS, boost::directedS > DiGraph;
typedef std::pair<int, int> Edge;
// Note: use std::map instead of unordered_map to keep the binding order stable
#ifdef FC_OS_MACOSX
#if defined(FC_OS_MACOSX) || defined(FC_OS_BSD)
typedef std::map<App::ObjectIdentifier, ExpressionInfo> ExpressionMap;
#else
typedef std::map<const App::ObjectIdentifier, ExpressionInfo> ExpressionMap;
+6 -6
View File
@@ -179,7 +179,7 @@ Rotate around Z axis.
angle : float\n Angle in radians.</UserDocu>
</Documentation>
</Methode>
<Methode Name="multiply">
<Methode Name="multiply" Const="true">
<Documentation>
<UserDocu>multiply(matrix) -> Base.Matrix
multiply(vector) -> Base.Vector\n
@@ -202,7 +202,7 @@ vector : Base.Vector</UserDocu>
Compute the inverse matrix in-place, if possible.</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverse">
<Methode Name="inverse" Const="true">
<Documentation><UserDocu>inverse() -> Base.Matrix\n
Compute the inverse matrix, if possible.</UserDocu>
</Documentation>
@@ -219,13 +219,13 @@ Transpose the matrix in-place.</UserDocu>
Returns a transposed copy of this matrix.</UserDocu>
</Documentation>
</Methode>
<Methode Name="determinant">
<Methode Name="determinant" Const="true">
<Documentation>
<UserDocu>determinant() -> float\n
Compute the determinant of the matrix.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isOrthogonal">
<Methode Name="isOrthogonal" Const="true">
<Documentation>
<UserDocu>isOrthogonal(tol=1e-6) -> float\n
Checks if the matrix is orthogonal, i.e. M * M^T = k*I and returns
@@ -233,7 +233,7 @@ the multiple of the identity matrix. If it's not orthogonal 0 is returned.\n
tol : float\n Tolerance used to check orthogonality.</UserDocu>
</Documentation>
</Methode>
<Methode Name="submatrix">
<Methode Name="submatrix" Const="true">
<Documentation>
<UserDocu>submatrix(dim) -> Base.Matrix\n
Get the leading principal submatrix of the given dimension.
@@ -242,7 +242,7 @@ corresponding identity matrix.\n
dim : int\n Dimension parameter must be in the range [1,4].</UserDocu>
</Documentation>
</Methode>
<Methode Name="analyze">
<Methode Name="analyze" Const="true">
<Documentation>
<UserDocu>analyze() -> str\n
Analyzes the type of transformation.</UserDocu>
+4 -4
View File
@@ -103,7 +103,7 @@ static void
PyBaseProxy_dealloc(PyObject* self)
{
/* Clear weakrefs first before calling any destructors */
if (reinterpret_cast<PyBaseProxy*>(self)->weakreflist != nullptr)
if (reinterpret_cast<PyBaseProxy*>(self)->weakreflist)
PyObject_ClearWeakRefs(self);
Py_TYPE(self)->tp_free(self);
}
@@ -349,7 +349,7 @@ int PyObjectBase::__setattro(PyObject *obj, PyObject *attro, PyObject *value)
//Hint: In general we don't allow to delete attributes (i.e. value=0). However, if we want to allow
//we must check then in _setattr() of all subclasses whether value is 0.
if ( value==nullptr ) {
if (!value) {
PyErr_Format(PyExc_AttributeError, "Cannot delete attribute: '%s'", attr);
return -1;
}
@@ -409,7 +409,7 @@ PyObject *PyObjectBase::_getattr(const char *attr)
// As fallback solution use Python's default method to get generic attributes
PyObject *w, *res;
w = PyUnicode_InternFromString(attr);
if (w != nullptr) {
if (w) {
res = PyObject_GenericGetAttr(this, w);
Py_XDECREF(w);
return res;
@@ -429,7 +429,7 @@ int PyObjectBase::_setattr(const char *attr, PyObject *value)
PyObject *w;
// As fallback solution use Python's default method to get generic attributes
w = PyUnicode_InternFromString(attr); // new reference
if (w != nullptr) {
if (w) {
// call methods from tp_getset if defined
int res = PyObject_GenericSetAttr(this, w, value);
Py_DECREF(w);
+5
View File
@@ -47,6 +47,7 @@
#endif
#define slots
#include <bitset>
#include <cstring>
#include "Exception.h"
#ifndef PYCXX_PYTHON_2TO3
@@ -122,6 +123,10 @@ inline void Assert(int expr, char *msg) // C++ assert
};
}
inline bool asBoolean(PyObject *obj) {
return PyObject_IsTrue(obj) != 0;
}
}
/*------------------------------
+1
View File
@@ -341,6 +341,7 @@ Rotation Rotation::inverse() const
rot._axis[0] = -this->_axis[0];
rot._axis[1] = -this->_axis[1];
rot._axis[2] = -this->_axis[2];
rot._angle = this->_angle;
return rot;
}
+1 -1
View File
@@ -40,7 +40,7 @@ angle2 : float
angle3 : float\n
Rotation(seq, angle1, angle2, angle3)
Define from one string and three floats (Euler angles) as Euler rotation
of a given type. Call toEulerSequence() for supported sequence types.
of a given type. Call toEulerAngles() for supported sequence types.
seq : str
angle1 : float
angle2 : float
+20 -21
View File
@@ -264,7 +264,7 @@ inline Vector2d& Vector2d::operator-= (const Vector2d &v)
inline Vector2d Vector2d::operator* (double c) const
{
return Vector2d(c*x, c*y);
return Vector2d(c * x, c * y);
}
inline Vector2d& Vector2d::operator*= (double c)
@@ -276,17 +276,17 @@ inline Vector2d& Vector2d::operator*= (double c)
inline double Vector2d::operator* (const Vector2d &v) const
{
return x*v.x + y*v.y;
return x * v.x + y * v.y;
}
inline Vector2d operator* (double c, const Vector2d &v)
{
return Vector2d(c*v.x, c*v.y);
return Vector2d(c * v.x, c * v.y);
}
inline Vector2d Vector2d::operator/ (double c) const
{
return Vector2d(x/c, y/c);
return Vector2d(x / c, y / c);
}
inline Vector2d& Vector2d::operator/= (double c)
@@ -298,12 +298,12 @@ inline Vector2d& Vector2d::operator/= (double c)
inline bool Vector2d::IsNull(double tolerance) const
{
return x*x + y*y <= tolerance*tolerance;
return x * x + y * y <= tolerance * tolerance;
}
inline double Vector2d::Length() const
{
return sqrt(x*x + y*y);
return sqrt(x * x + y * y);
}
inline double Vector2d::Angle() const
@@ -313,7 +313,7 @@ inline double Vector2d::Angle() const
inline double Vector2d::Sqr() const
{
return x*x + y*y;
return x * x + y * y;
}
inline Vector2d& Vector2d::Set(double x, double y)
@@ -339,8 +339,9 @@ inline Vector2d& Vector2d::Scale(double factor)
inline Vector2d& Vector2d::Rotate(double angle)
{
x = x*cos(angle) - y*sin(angle);
y = x*sin(angle) + y*cos(angle);
auto tmp_x = x;
x = x * cos(angle) - y * sin(angle);
y = tmp_x * sin(angle) + y * cos(angle);
return *this;
}
@@ -363,7 +364,7 @@ inline Vector2d Vector2d::Perpendicular(bool clockwise) const
inline Vector2d Vector2d::FromPolar(double r, double fi)
{
return Vector2d(r*cos(fi), r*sin(fi));
return Vector2d(r * cos(fi), r * sin(fi));
}
inline double Vector2d::Distance(const Vector2d& v) const
@@ -371,7 +372,7 @@ inline double Vector2d::Distance(const Vector2d& v) const
double dx = (x - v.x);
double dy = (y - v.y);
return sqrt(dx*dx + dy*dy);
return sqrt(dx * dx + dy * dy);
}
inline bool Vector2d::IsEqual(const Vector2d& v, double tolerance) const
@@ -414,7 +415,7 @@ inline bool Polygon2d::Delete (size_t ulNdx)
{
std::vector<Vector2d>::iterator it = _aclVct.begin();
std::advance(it, ulNdx);
_aclVct.erase ( it );
_aclVct.erase(it);
return true;
}
@@ -491,10 +492,10 @@ inline BoundBox2d::BoundBox2d (const BoundBox2d &rclBB)
inline BoundBox2d::BoundBox2d (double fX1, double fY1, double fX2, double fY2)
{
MinX = std::min<double>( fX1, fX2 );
MaxX = std::max<double>( fX1, fX2 );
MinY = std::min<double>( fY1, fY2 );
MaxY = std::max<double>( fY1, fY2 );
MinX = std::min<double>(fX1, fX2);
MaxX = std::max<double>(fX1, fX2);
MinY = std::min<double>(fY1, fY2);
MaxY = std::max<double>(fY1, fY2);
}
inline bool BoundBox2d::IsValid ()
@@ -504,8 +505,8 @@ inline bool BoundBox2d::IsValid ()
inline bool BoundBox2d::IsEqual(const BoundBox2d& b, double tolerance) const
{
return Vector2d(MinX,MinY).IsEqual(Vector2d(b.MinX,b.MinY), tolerance) &&
Vector2d(MaxX,MaxY).IsEqual(Vector2d(b.MaxX,b.MaxY), tolerance);
return Vector2d(MinX, MinY).IsEqual(Vector2d(b.MinX, b.MinY), tolerance) &&
Vector2d(MaxX, MaxY).IsEqual(Vector2d(b.MaxX, b.MaxY), tolerance);
}
inline BoundBox2d& BoundBox2d::operator= (const BoundBox2d& rclBB)
@@ -549,7 +550,7 @@ inline bool BoundBox2d::Contains(const Vector2d &v, double tolerance) const
inline Vector2d BoundBox2d::GetCenter() const
{
return Vector2d((MinX + MaxX)*0.5, (MinY + MaxY)*0.5);
return Vector2d((MinX + MaxX) * 0.5, (MinY + MaxY) * 0.5);
}
inline void BoundBox2d::SetVoid()
@@ -569,5 +570,3 @@ inline void BoundBox2d::Add(const Vector2d &v)
} // namespace Base
#endif // BASE_TOOLS2D_H
+1
View File
@@ -2,6 +2,7 @@
// Version Number
#define FCVersionMajor "${PACKAGE_VERSION_MAJOR}"
#define FCVersionMinor "${PACKAGE_VERSION_MINOR}"
#define FCVersionPoint "${FREECAD_VERSION_PATCH}"
#define FCVersionName "${PACKAGE_VERSION_NAME}"
// test: $Format:Hash (%H), Date: %ci$
#define FCRevision "${PACKAGE_WCREF}" //Highest committed revision number
+2 -1
View File
@@ -10,7 +10,8 @@ if (WIN32)
REALPATH BASE_DIR "${CMAKE_INSTALL_PREFIX}")
set( ${CMAKE_INSTALL_BINDIR})
else()
set(FREECAD_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
get_filename_component(FREECAD_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}"
REALPATH BASE_DIR "${CMAKE_INSTALL_PREFIX}")
endif()
configure_file(__init__.py.template ${NAMESPACE_INIT})
+2 -1
View File
@@ -33,6 +33,7 @@
# include <QTimer>
# include <QToolBar>
# include <QToolButton>
# include <QToolTip>
#endif
#include <Base/Exception.h>
@@ -381,7 +382,7 @@ void ActionGroup::onActivated (QAction* a)
void ActionGroup::onHovered (QAction *a)
{
Gui::ToolTip::showText(QCursor::pos(), a->toolTip());
QToolTip::showText(QCursor::pos(), a->toolTip());
}
+17 -16
View File
@@ -1017,7 +1017,7 @@ bool Application::sendHasMsgToFocusView(const char* pMsg)
return false;
}
Gui::MDIView* Application::activeView(void) const
Gui::MDIView* Application::activeView() const
{
if (activeDocument())
return activeDocument()->getActiveView();
@@ -1049,12 +1049,12 @@ void Application::activateView(const Base::Type& type, bool create)
}
/// Getter for the active view
Gui::Document* Application::activeDocument(void) const
Gui::Document* Application::activeDocument() const
{
return d->activeDocument;
}
Gui::Document* Application::editDocument(void) const
Gui::Document* Application::editDocument() const
{
return d->editDocument;
}
@@ -1188,7 +1188,7 @@ void Application::detachView(Gui::BaseView* pcView)
d->passive.remove(pcView);
}
void Application::onUpdate(void)
void Application::onUpdate()
{
// update all documents
std::map<const App::Document*, Gui::Document*>::iterator It;
@@ -1218,7 +1218,7 @@ void Application::viewActivated(MDIView* pcView)
}
void Application::updateActive(void)
void Application::updateActive()
{
activeDocument()->onUpdate();
}
@@ -1569,7 +1569,7 @@ QString Application::workbenchMenuText(const QString& wb) const
return QString();
}
QStringList Application::workbenches(void) const
QStringList Application::workbenches() const
{
// If neither 'HiddenWorkbench' nor 'ExtraWorkbench' is set then all workbenches are returned.
const std::map<std::string,std::string>& config = App::Application::Config();
@@ -1659,22 +1659,22 @@ void Application::setupContextMenu(const char* recipient, MenuItem* items) const
}
}
bool Application::isClosing(void)
bool Application::isClosing()
{
return d->isClosing;
}
MacroManager *Application::macroManager(void)
MacroManager *Application::macroManager()
{
return d->macroMngr;
}
CommandManager &Application::commandManager(void)
CommandManager &Application::commandManager()
{
return d->commandManager;
}
Gui::PreferencePackManager* Application::prefPackManager(void)
Gui::PreferencePackManager* Application::prefPackManager()
{
return d->prefPackManager;
}
@@ -1756,7 +1756,7 @@ static void init_resources()
Q_INIT_RESOURCE(translation);
}
void Application::initApplication(void)
void Application::initApplication()
{
static bool init = false;
if (init) {
@@ -1778,7 +1778,7 @@ void Application::initApplication(void)
}
}
void Application::initTypes(void)
void Application::initTypes()
{
// views
Gui::BaseView ::init();
@@ -1848,7 +1848,7 @@ void Application::initTypes(void)
(ViewProviderDocumentObject::getClassTypeId());
}
void Application::initOpenInventor(void)
void Application::initOpenInventor()
{
// init the Inventor subsystem
SoDB::init();
@@ -1856,12 +1856,12 @@ void Application::initOpenInventor(void)
SoFCDB::init();
}
void Application::runInitGuiScript(void)
void Application::runInitGuiScript()
{
Base::Interpreter().runString(Base::ScriptFactory().ProduceScript("FreeCADGuiInit"));
}
void Application::runApplication(void)
void Application::runApplication()
{
const std::map<std::string,std::string>& cfg = App::Application::Config();
std::map<std::string,std::string>::const_iterator it;
@@ -2038,7 +2038,8 @@ void Application::runApplication(void)
std::map<std::string, std::string>& config = App::Application::Config();
QString major = QString::fromLatin1(config["BuildVersionMajor"].c_str());
QString minor = QString::fromLatin1(config["BuildVersionMinor"].c_str());
QString title = QString::fromLatin1("%1 %2.%3").arg(mainApp.applicationName(), major, minor);
QString point = QString::fromLatin1(config["BuildVersionPoint"].c_str());
QString title = QString::fromLatin1("%1 %2.%3.%4").arg(mainApp.applicationName(), major, minor, point);
mw.setWindowTitle(title);
} else {
mw.setWindowTitle(mainApp.applicationName());
+15 -15
View File
@@ -89,9 +89,9 @@ public:
/// get called if a view gets activated, this manage the whole activation scheme
void viewActivated(Gui::MDIView* pcView);
/// call update to all documents and all views (costly!)
void onUpdate(void);
void onUpdate();
/// call update to all views of the active document
void updateActive(void);
void updateActive();
/// call update to all command actions
void updateActions(bool delay = false);
//@}
@@ -160,11 +160,11 @@ public:
/// message when a GuiDocument is about to vanish
void onLastWindowClosed(Gui::Document* pcDoc);
/// Getter for the active document
Gui::Document* activeDocument(void) const;
Gui::Document* activeDocument() const;
/// Set the active document
void setActiveDocument(Gui::Document* pcDocument);
/// Getter for the editing document
Gui::Document* editDocument(void) const;
Gui::Document* editDocument() const;
Gui::MDIView* editViewOfNode(SoNode *node) const;
/// Set editing document, which will reset editing of all other document
void setEditDocument(Gui::Document* pcDocument);
@@ -177,7 +177,7 @@ public:
*/
Gui::Document* getDocument(const App::Document* pDoc) const;
/// Getter for the active view of the active document or null
Gui::MDIView* activeView(void) const;
Gui::MDIView* activeView() const;
/// Activate a view of the given type of the active document
void activateView(const Base::Type&, bool create=false);
/// Shows the associated view provider of the given object
@@ -189,7 +189,7 @@ public:
//@}
/// true when the application shutting down
bool isClosing(void);
bool isClosing();
void checkForPreviousCrashes();
/** @name workbench handling */
@@ -199,7 +199,7 @@ public:
QPixmap workbenchIcon(const QString&) const;
QString workbenchToolTip(const QString&) const;
QString workbenchMenuText(const QString&) const;
QStringList workbenches(void) const;
QStringList workbenches() const;
void setupContextMenu(const char* recipient, MenuItem*) const;
//@}
@@ -212,24 +212,24 @@ public:
/** @name User Commands */
//@{
/// Get macro manager
Gui::MacroManager *macroManager(void);
Gui::MacroManager *macroManager();
/// Reference to the command manager
Gui::CommandManager &commandManager(void);
Gui::CommandManager &commandManager();
/// helper which create the commands
void createStandardOperations();
//@}
Gui::PreferencePackManager* prefPackManager(void);
Gui::PreferencePackManager* prefPackManager();
/** @name Init, Destruct an Access methods */
//@{
/// some kind of singleton
static Application* Instance;
static void initApplication(void);
static void initTypes(void);
static void initOpenInventor(void);
static void runInitGuiScript(void);
static void runApplication(void);
static void initApplication();
static void initTypes();
static void initOpenInventor();
static void runInitGuiScript();
static void runApplication();
void tryClose( QCloseEvent * e );
//@}
+1 -1
View File
@@ -360,7 +360,7 @@ private:
}
void RecoveryWriter::writeFiles(void)
void RecoveryWriter::writeFiles()
{
#if 0
FileWriter::writeFiles();
+1 -1
View File
@@ -110,7 +110,7 @@ public:
always returns true.
*/
virtual bool shouldWrite(const std::string&, const Base::Persistence *) const;
virtual void writeFiles(void);
virtual void writeFiles();
private:
AutoSaveProperty& saver;
+2 -2
View File
@@ -45,7 +45,7 @@ int AxisOriginPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
// returns a string which represent the object e.g. when printed in python
std::string AxisOriginPy::representation(void) const
std::string AxisOriginPy::representation() const
{
return "<AxisOrigin>";
}
@@ -175,7 +175,7 @@ void AxisOriginPy::setLabels(Py::Dict dict)
getAxisOriginPtr()->setLabels(labels);
}
Py::Object AxisOriginPy::getNode(void) const
Py::Object AxisOriginPy::getNode() const
{
SoGroup* node = getAxisOriginPtr()->getNode();
PyObject* Ptr = Base::Interpreter().createSWIGPointerObj("pivy.coin","SoGroup *", node, 1);
+2 -2
View File
@@ -88,7 +88,7 @@ public:
BitmapFactoryInst* BitmapFactoryInst::_pcSingleton = nullptr;
BitmapFactoryInst& BitmapFactoryInst::instance(void)
BitmapFactoryInst& BitmapFactoryInst::instance()
{
if (_pcSingleton == nullptr)
{
@@ -112,7 +112,7 @@ BitmapFactoryInst& BitmapFactoryInst::instance(void)
return *_pcSingleton;
}
void BitmapFactoryInst::destruct (void)
void BitmapFactoryInst::destruct ()
{
if (_pcSingleton != nullptr)
delete _pcSingleton;
+3 -3
View File
@@ -52,8 +52,8 @@ public:
BottomRight /**< Place to the bottom right corner */
};
static BitmapFactoryInst& instance(void);
static void destruct (void);
static BitmapFactoryInst& instance();
static void destruct ();
/// Adds a path where pixmaps can be found
void addPath(const QString& path);
@@ -149,7 +149,7 @@ private:
};
/// Get the global instance
inline BitmapFactoryInst& BitmapFactory(void)
inline BitmapFactoryInst& BitmapFactory()
{
return BitmapFactoryInst::instance();
}
+1 -1
View File
@@ -76,7 +76,7 @@ public:
*/
virtual ~ComboView();
Gui::TaskView::TaskView *getTaskPanel(void){return taskPanel;}
Gui::TaskView::TaskView *getTaskPanel(){return taskPanel;}
QTabWidget* getTabPanel() const { return tabs;}
+23 -23
View File
@@ -264,12 +264,12 @@ void Command::addToGroup(ActionGroup* group)
group->addAction(_pcAction->findChild<QAction*>());
}
Application *Command::getGuiApplication(void)
Application *Command::getGuiApplication()
{
return Application::Instance;
}
Gui::Document* Command::getActiveGuiDocument(void) const
Gui::Document* Command::getActiveGuiDocument() const
{
return getGuiApplication()->activeDocument();
}
@@ -474,7 +474,7 @@ void Command::_invoke(int id, bool disablelog)
#endif
}
void Command::testActive(void)
void Command::testActive()
{
if (!_pcAction)
return;
@@ -523,7 +523,7 @@ void Command::setEnabled(bool on)
// Helper methods
//--------------------------------------------------------------------------
bool Command::hasActiveDocument(void) const
bool Command::hasActiveDocument() const
{
return getActiveGuiDocument() != nullptr;
}
@@ -533,7 +533,7 @@ bool Command::hasObject(const char* Name)
return getDocument() != nullptr && getDocument()->getObject(Name) != nullptr;
}
Gui::SelectionSingleton& Command::getSelection(void)
Gui::SelectionSingleton& Command::getSelection()
{
return Gui::Selection();
}
@@ -605,17 +605,17 @@ void Command::openCommand(const char* sCmdName)
App::GetApplication().setActiveTransaction(sCmdName);
}
void Command::commitCommand(void)
void Command::commitCommand()
{
App::GetApplication().closeActiveTransaction();
}
void Command::abortCommand(void)
void Command::abortCommand()
{
App::GetApplication().closeActiveTransaction(true);
}
bool Command::hasPendingCommand(void)
bool Command::hasPendingCommand()
{
return !!App::GetApplication().getActiveTransaction();
}
@@ -810,13 +810,13 @@ const std::string Command::strToPython(const char* Str)
}
/// Updates the (active) document (propagate changes)
void Command::updateActive(void)
void Command::updateActive()
{
WaitCursor wc;
doCommand(App,"App.ActiveDocument.recompute()");
}
bool Command::isActiveObjectValid(void)
bool Command::isActiveObjectValid()
{
Gui::Document* active = Gui::Application::Instance->activeDocument();
assert(active);
@@ -843,7 +843,7 @@ void Command::updateAll(std::list<Gui::Document*> cList)
//--------------------------------------------------------------------------
/// returns the begin of a online help page
const char * Command::beginCmdHelp(void)
const char * Command::beginCmdHelp()
{
return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
"<html>\n"
@@ -855,7 +855,7 @@ const char * Command::beginCmdHelp(void)
}
/// returns the end of a online help page
const char * Command::endCmdHelp(void)
const char * Command::endCmdHelp()
{
return "</body></html>\n\n";
}
@@ -974,7 +974,7 @@ void Command::printConflictingAccelerators() const
Base::Console().Warning("Accelerator conflict between %s (%s) and %s (%s)\n", sName, sAccel, cmd->sName, cmd->sAccel);
}
Action * Command::createAction(void)
Action * Command::createAction()
{
Action *pcAction;
pcAction = new Action(this,getMainWindow());
@@ -1021,7 +1021,7 @@ Command *GroupCommand::addCommand(const char *name) {
return cmd;
}
Action * GroupCommand::createAction(void) {
Action * GroupCommand::createAction() {
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
pcAction->setMenuRole(QAction::NoRole);
pcAction->setDropDownMenu(true);
@@ -1136,7 +1136,7 @@ void MacroCommand::activated(int iMsg)
}
}
Action * MacroCommand::createAction(void)
Action * MacroCommand::createAction()
{
Action *pcAction;
pcAction = new Action(this,getMainWindow());
@@ -1306,7 +1306,7 @@ void PythonCommand::activated(int iMsg)
}
}
bool PythonCommand::isActive(void)
bool PythonCommand::isActive()
{
try {
Base::PyGILStateLocker lock;
@@ -1336,7 +1336,7 @@ void PythonCommand::languageChange()
}
}
const char* PythonCommand::getHelpUrl(void) const
const char* PythonCommand::getHelpUrl() const
{
PyObject* pcTemp;
pcTemp = Interpreter().runMethodObject(_pcPyCommand, "CmdHelpURL");
@@ -1347,7 +1347,7 @@ const char* PythonCommand::getHelpUrl(void) const
return PyUnicode_AsUTF8(pcTemp);
}
Action * PythonCommand::createAction(void)
Action * PythonCommand::createAction()
{
QAction* qtAction = new QAction(nullptr);
Action *pcAction;
@@ -1522,7 +1522,7 @@ void PythonGroupCommand::activated(int iMsg)
}
}
bool PythonGroupCommand::isActive(void)
bool PythonGroupCommand::isActive()
{
try {
Base::PyGILStateLocker lock;
@@ -1546,7 +1546,7 @@ bool PythonGroupCommand::isActive(void)
return true;
}
Action * PythonGroupCommand::createAction(void)
Action * PythonGroupCommand::createAction()
{
Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow());
pcAction->setDropDownMenu(hasDropDownMenu());
@@ -1656,7 +1656,7 @@ void PythonGroupCommand::languageChange()
}
}
const char* PythonGroupCommand::getHelpUrl(void) const
const char* PythonGroupCommand::getHelpUrl() const
{
return "";
}
@@ -1833,7 +1833,7 @@ std::vector <Command*> CommandManager::getModuleCommands(const char *sModName) c
return vCmds;
}
std::vector <Command*> CommandManager::getAllCommands(void) const
std::vector <Command*> CommandManager::getAllCommands() const
{
std::vector <Command*> vCmds;
@@ -1870,7 +1870,7 @@ void CommandManager::runCommandByName (const char* sName) const
pCmd->invoke(0);
}
void CommandManager::testActive(void)
void CommandManager::testActive()
{
for ( std::map<std::string, Command*>::iterator It= _sCommands.begin();It!=_sCommands.end();++It) {
It->second->testActive();
+36 -36
View File
@@ -213,15 +213,15 @@ class SelectionSingleton;
class MDIView;
void CreateStdCommands(void);
void CreateDocCommands(void);
void CreateFeatCommands(void);
void CreateMacroCommands(void);
void CreateViewStdCommands(void);
void CreateWindowStdCommands(void);
void CreateStructureCommands(void);
void CreateTestCommands(void);
void CreateLinkCommands(void);
void CreateStdCommands();
void CreateDocCommands();
void CreateFeatCommands();
void CreateMacroCommands();
void CreateViewStdCommands();
void CreateWindowStdCommands();
void CreateStructureCommands();
void CreateTestCommands();
void CreateLinkCommands();
/** The CommandBase class
@@ -246,7 +246,7 @@ public:
//@{
protected:
/// Creates the used Action when adding to a widget. The default implementation does nothing.
virtual Action * createAction(void);
virtual Action * createAction();
public:
/// Reassigns QAction stuff after the language has changed.
@@ -323,7 +323,7 @@ protected:
/// Methods which gets called when activated, needs to be reimplemented!
virtual void activated(int iMsg)=0;
/// Creates the used Action
virtual Action * createAction(void);
virtual Action * createAction();
/// Applies the menu text, tool and status tip to the passed action object
void applyCommandData(const char* context, Action* );
const char* keySequenceToAccel(int) const;
@@ -336,9 +336,9 @@ public:
/// CommandManager is a friend
friend class CommandManager;
/// Override this method if your Cmd is not always active
virtual bool isActive(void){return true;}
virtual bool isActive(){return true;}
/// Get somtile called to check the state of the command
void testActive(void);
void testActive();
/// Enables or disables the command
void setEnabled(bool);
/// (Re)Create the text for the tooltip (for example, when the shortcut is changed)
@@ -372,11 +372,11 @@ public:
/** @name Helper methods to get important classes */
//@{
/// Get pointer to the Application Window
static Application* getGuiApplication(void);
static Application* getGuiApplication();
/// Get a reference to the selection
static Gui::SelectionSingleton& getSelection(void);
static Gui::SelectionSingleton& getSelection();
/// Get pointer to the active gui document
Gui::Document* getActiveGuiDocument(void) const;
Gui::Document* getActiveGuiDocument() const;
/** Get pointer to the named or active App document
* Returns a pointer to the named document or the active
* document when no name is given. NULL is returned
@@ -407,17 +407,17 @@ public:
/// Open a new Undo transaction on the active document
static void openCommand(const char* sName=nullptr);
/// Commit the Undo transaction on the active document
static void commitCommand(void);
static void commitCommand();
/// Abort the Undo transaction on the active document
static void abortCommand(void);
static void abortCommand();
/// Check if an Undo transaction is open on the active document
static bool hasPendingCommand(void);
static bool hasPendingCommand();
/// Updates the (active) document (propagate changes)
static void updateActive(void);
static void updateActive();
/// Updates the (all or listed) documents (propagate changes)
static void updateAll(std::list<Gui::Document*> cList);
/// Checks if the active object of the active document is valid
static bool isActiveObjectValid(void);
static bool isActiveObjectValid();
/// Translate command
void languageChange();
/// Updates the QAction with respect to the passed mode.
@@ -539,17 +539,17 @@ public:
/** @name Helper methods to generate help pages */
//@{
/// returns the begin of a online help page
const char * beginCmdHelp(void);
const char * beginCmdHelp();
/// returns the end of a online help page
const char * endCmdHelp(void);
const char * endCmdHelp();
/// Get the help URL
virtual const char* getHelpUrl(void) const { return sHelpUrl; }
virtual const char* getHelpUrl() const { return sHelpUrl; }
//@}
/** @name Helper methods for the Active tests */
//@{
/// true when there is a document
bool hasActiveDocument(void) const;
bool hasActiveDocument() const;
/// true when there is a document and a Feature with Name
bool hasObject(const char* Name);
//@}
@@ -557,7 +557,7 @@ public:
/** @name checking of internal state */
//@{
/// returns the name to which the command belongs
const char* getAppModuleName(void) const {return sAppModule;}
const char* getAppModuleName() const {return sAppModule;}
void setAppModuleName(const char*);
/// Get the command name
const char* getName() const { return sName; }
@@ -643,7 +643,7 @@ public:
protected:
virtual void activated(int iMsg);
virtual Gui::Action * createAction(void);
virtual Gui::Action * createAction();
virtual void languageChange();
void setup(Action *);
@@ -673,11 +673,11 @@ protected:
/// Method which gets called when activated
virtual void activated(int iMsg);
/// if the command is not always active
virtual bool isActive(void);
virtual bool isActive();
/// Get the help URL
const char* getHelpUrl(void) const;
const char* getHelpUrl() const;
/// Creates the used Action
virtual Action * createAction(void);
virtual Action * createAction();
//@}
public:
@@ -724,11 +724,11 @@ protected:
/// Method which gets called when activated
virtual void activated(int iMsg);
/// if the command is not always active
virtual bool isActive(void);
virtual bool isActive();
/// Get the help URL
const char* getHelpUrl(void) const;
const char* getHelpUrl() const;
/// Creates the used Action
virtual Action * createAction(void);
virtual Action * createAction();
//@}
public:
@@ -779,7 +779,7 @@ protected:
/// Method which get called when activated
void activated(int iMsg);
/// Creates the used Action
Action * createAction(void);
Action * createAction();
//@}
public:
@@ -845,7 +845,7 @@ public:
* of a special app module use GetModuleCommands()
* @see Command
*/
std::vector <Command*> getAllCommands(void) const;
std::vector <Command*> getAllCommands() const;
/** Returns all commands of a group
* delivers a vector of all commands in the given group.
@@ -866,7 +866,7 @@ public:
/// method is OBSOLETE use GetModuleCommands() or GetAllCommands()
const std::map<std::string, Command*>& getCommands() const { return _sCommands; }
/// get frequently called by the AppWnd to check the commands are active.
void testActive(void);
void testActive();
void addCommandMode(const char* sContext, const char* sName);
void updateCommands(const char* sContext, int mode);
+32 -32
View File
@@ -242,7 +242,7 @@ void StdCmdImport::activated(int iMsg)
}
}
bool StdCmdImport::isActive(void)
bool StdCmdImport::isActive()
{
return (getActiveGuiDocument() ? true : false);
}
@@ -490,7 +490,7 @@ void StdCmdExport::activated(int iMsg)
}
}
bool StdCmdExport::isActive(void)
bool StdCmdExport::isActive()
{
return (getActiveGuiDocument() ? true : false);
}
@@ -543,7 +543,7 @@ void StdCmdMergeProjects::activated(int iMsg)
}
}
bool StdCmdMergeProjects::isActive(void)
bool StdCmdMergeProjects::isActive()
{
return this->hasActiveDocument();
}
@@ -576,7 +576,7 @@ void StdCmdDependencyGraph::activated(int iMsg)
getMainWindow()->addWindow(view);
}
bool StdCmdDependencyGraph::isActive(void)
bool StdCmdDependencyGraph::isActive()
{
return (getActiveGuiDocument() ? true : false);
}
@@ -643,7 +643,7 @@ void StdCmdSave::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Save\")");
}
bool StdCmdSave::isActive(void)
bool StdCmdSave::isActive()
{
#if 0
if( getActiveGuiDocument() )
@@ -683,7 +683,7 @@ void StdCmdSaveAs::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"SaveAs\")");
}
bool StdCmdSaveAs::isActive(void)
bool StdCmdSaveAs::isActive()
{
#if 0
if( getActiveGuiDocument() )
@@ -721,7 +721,7 @@ void StdCmdSaveCopy::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"SaveCopy\")");
}
bool StdCmdSaveCopy::isActive(void)
bool StdCmdSaveCopy::isActive()
{
return ( getActiveGuiDocument() ? true : false );
}
@@ -748,7 +748,7 @@ void StdCmdSaveAll::activated(int iMsg)
Gui::Document::saveAll();
}
bool StdCmdSaveAll::isActive(void)
bool StdCmdSaveAll::isActive()
{
return ( getActiveGuiDocument() ? true : false );
}
@@ -786,7 +786,7 @@ void StdCmdRevert::activated(int iMsg)
doCommand(Command::App,"App.ActiveDocument.restore()");
}
bool StdCmdRevert::isActive(void)
bool StdCmdRevert::isActive()
{
return ( getActiveGuiDocument() ? true : false );
}
@@ -816,7 +816,7 @@ void StdCmdProjectInfo::activated(int iMsg)
dlg.exec();
}
bool StdCmdProjectInfo::isActive(void)
bool StdCmdProjectInfo::isActive()
{
return ( getActiveGuiDocument() ? true : false );
}
@@ -846,7 +846,7 @@ void StdCmdProjectUtil::activated(int iMsg)
dlg.exec();
}
bool StdCmdProjectUtil::isActive(void)
bool StdCmdProjectUtil::isActive()
{
return true;
}
@@ -878,7 +878,7 @@ void StdCmdPrint::activated(int iMsg)
}
}
bool StdCmdPrint::isActive(void)
bool StdCmdPrint::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("Print");
}
@@ -908,7 +908,7 @@ void StdCmdPrintPreview::activated(int iMsg)
}
}
bool StdCmdPrintPreview::isActive(void)
bool StdCmdPrintPreview::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("PrintPreview");
}
@@ -939,7 +939,7 @@ void StdCmdPrintPdf::activated(int iMsg)
}
}
bool StdCmdPrintPdf::isActive(void)
bool StdCmdPrintPdf::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("PrintPdf");
}
@@ -996,12 +996,12 @@ void StdCmdUndo::activated(int iMsg)
getGuiApplication()->sendMsgToActiveView("Undo");
}
bool StdCmdUndo::isActive(void)
bool StdCmdUndo::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("Undo");
}
Action * StdCmdUndo::createAction(void)
Action * StdCmdUndo::createAction()
{
Action *pcAction;
@@ -1040,12 +1040,12 @@ void StdCmdRedo::activated(int iMsg)
getGuiApplication()->sendMsgToActiveView("Redo");
}
bool StdCmdRedo::isActive(void)
bool StdCmdRedo::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("Redo");
}
Action * StdCmdRedo::createAction(void)
Action * StdCmdRedo::createAction()
{
Action *pcAction;
@@ -1081,7 +1081,7 @@ void StdCmdCut::activated(int iMsg)
getGuiApplication()->sendMsgToActiveView("Cut");
}
bool StdCmdCut::isActive(void)
bool StdCmdCut::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("Cut");
}
@@ -1114,7 +1114,7 @@ void StdCmdCopy::activated(int iMsg)
}
}
bool StdCmdCopy::isActive(void)
bool StdCmdCopy::isActive()
{
if (getGuiApplication()->sendHasMsgToFocusView("Copy"))
return true;
@@ -1152,7 +1152,7 @@ void StdCmdPaste::activated(int iMsg)
}
}
bool StdCmdPaste::isActive(void)
bool StdCmdPaste::isActive()
{
if (getGuiApplication()->sendHasMsgToFocusView("Paste"))
return true;
@@ -1243,7 +1243,7 @@ void StdCmdDuplicateSelection::activated(int iMsg)
fi.deleteFile();
}
bool StdCmdDuplicateSelection::isActive(void)
bool StdCmdDuplicateSelection::isActive()
{
return Gui::Selection().hasSelection();
}
@@ -1275,7 +1275,7 @@ void StdCmdSelectAll::activated(int iMsg)
rSel.setSelection(doc->getName(), objs);
}
bool StdCmdSelectAll::isActive(void)
bool StdCmdSelectAll::isActive()
{
return App::GetApplication().getActiveDocument() != nullptr;
}
@@ -1448,7 +1448,7 @@ void StdCmdDelete::activated(int iMsg)
Gui::getMainWindow()->update();
}
bool StdCmdDelete::isActive(void)
bool StdCmdDelete::isActive()
{
return Selection().getCompleteSelection().size() > 0;
}
@@ -1502,7 +1502,7 @@ void StdCmdRefresh::activated(int iMsg)
}
}
bool StdCmdRefresh::isActive(void)
bool StdCmdRefresh::isActive()
{
return this->getDocument() && this->getDocument()->mustExecute();
}
@@ -1528,7 +1528,7 @@ void StdCmdTransform::activated(int iMsg)
Gui::Control().showDialog(new Gui::Dialog::TaskTransform());
}
bool StdCmdTransform::isActive(void)
bool StdCmdTransform::isActive()
{
return (Gui::Control().activeDialog()==nullptr);
}
@@ -1562,7 +1562,7 @@ void StdCmdPlacement::activated(int iMsg)
Gui::Control().showDialog(plm);
}
bool StdCmdPlacement::isActive(void)
bool StdCmdPlacement::isActive()
{
return Gui::Selection().countObjectsOfType(App::GeoFeature::getClassTypeId()) >= 1;
}
@@ -1596,7 +1596,7 @@ void StdCmdTransformManip::activated(int iMsg)
getActiveGuiDocument()->setEdit(vp, Gui::ViewProvider::Transform);
}
bool StdCmdTransformManip::isActive(void)
bool StdCmdTransformManip::isActive()
{
return Gui::Selection().countObjectsOfType(App::GeoFeature::getClassTypeId()) == 1;
}
@@ -1664,7 +1664,7 @@ void StdCmdAlignment::activated(int iMsg)
Gui::Selection().clearSelection();
}
bool StdCmdAlignment::isActive(void)
bool StdCmdAlignment::isActive()
{
if (ManualAlignment::hasInstance())
return false;
@@ -1706,7 +1706,7 @@ void StdCmdEdit::activated(int iMsg)
}
}
bool StdCmdEdit::isActive(void)
bool StdCmdEdit::isActive()
{
return (Selection().getCompleteSelection().size() > 0) || (Gui::Control().activeDialog() != nullptr);
}
@@ -1763,7 +1763,7 @@ protected:
copyExpressions(objs);
}
virtual Gui::Action * createAction(void) {
virtual Gui::Action * createAction() {
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
pcAction->setDropDownMenu(true);
applyCommandData(this->className(), pcAction);
@@ -1932,7 +1932,7 @@ protected:
namespace Gui {
void CreateDocCommands(void)
void CreateDocCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
+3 -3
View File
@@ -110,7 +110,7 @@ void StdCmdRandomColor::activated(int iMsg)
}
}
bool StdCmdRandomColor::isActive(void)
bool StdCmdRandomColor::isActive()
{
return (Gui::Selection().size() != 0);
}
@@ -135,7 +135,7 @@ StdCmdSendToPythonConsole::StdCmdSendToPythonConsole()
sAccel = "Ctrl+Shift+P";
}
bool StdCmdSendToPythonConsole::isActive(void)
bool StdCmdSendToPythonConsole::isActive()
{
//active only if either 1 object is selected or multiple subobjects from the same object
return Gui::Selection().getSelectionEx().size() == 1;
@@ -211,7 +211,7 @@ void StdCmdSendToPythonConsole::activated(int iMsg)
namespace Gui {
void CreateFeatCommands(void)
void CreateFeatCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
+4 -4
View File
@@ -65,8 +65,8 @@ public:
protected:
virtual void activated(int iMsg);
virtual bool isActive(void);
virtual Action * createAction(void);
virtual bool isActive();
virtual Action * createAction();
virtual void languageChange();
};
@@ -86,7 +86,7 @@ bool StdCmdLinkMakeGroup::isActive() {
return !!App::GetApplication().getActiveDocument();
}
Action * StdCmdLinkMakeGroup::createAction(void)
Action * StdCmdLinkMakeGroup::createAction()
{
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
pcAction->setDropDownMenu(true);
@@ -892,7 +892,7 @@ public:
namespace Gui {
void CreateLinkCommands(void)
void CreateLinkCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
rcCmdMgr.addCommand(new StdCmdLinkMake());
+11 -11
View File
@@ -58,7 +58,7 @@ void StdCmdDlgMacroRecord::activated(int iMsg)
cDlg.exec();
}
bool StdCmdDlgMacroRecord::isActive(void)
bool StdCmdDlgMacroRecord::isActive()
{
return ! (getGuiApplication()->macroManager()->isOpen());
}
@@ -86,7 +86,7 @@ void StdCmdMacroStopRecord::activated(int iMsg)
getGuiApplication()->macroManager()->commit();
}
bool StdCmdMacroStopRecord::isActive(void)
bool StdCmdMacroStopRecord::isActive()
{
return getGuiApplication()->macroManager()->isOpen();
}
@@ -115,7 +115,7 @@ void StdCmdDlgMacroExecute::activated(int iMsg)
cDlg.exec();
}
bool StdCmdDlgMacroExecute::isActive(void)
bool StdCmdDlgMacroExecute::isActive()
{
return ! (getGuiApplication()->macroManager()->isOpen());
}
@@ -144,7 +144,7 @@ void StdCmdDlgMacroExecuteDirect::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Run\")");
}
bool StdCmdDlgMacroExecuteDirect::isActive(void)
bool StdCmdDlgMacroExecuteDirect::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("Run");
}
@@ -169,7 +169,7 @@ void StdCmdMacroAttachDebugger::activated(int iMsg)
"RemoteDebugger.attachToRemoteDebugger()");
}
bool StdCmdMacroAttachDebugger::isActive(void)
bool StdCmdMacroAttachDebugger::isActive()
{
return true;
}
@@ -199,7 +199,7 @@ void StdCmdMacroStartDebug::activated(int iMsg)
dbg->stepRun();
}
bool StdCmdMacroStartDebug::isActive(void)
bool StdCmdMacroStartDebug::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("StartDebug");
}
@@ -225,7 +225,7 @@ void StdCmdMacroStopDebug::activated(int iMsg)
Application::Instance->macroManager()->debugger()->tryStop();
}
bool StdCmdMacroStopDebug::isActive(void)
bool StdCmdMacroStopDebug::isActive()
{
static PythonDebugger* dbg = Application::Instance->macroManager()->debugger();
return dbg->isRunning();
@@ -252,7 +252,7 @@ void StdCmdMacroStepOver::activated(int iMsg)
Application::Instance->macroManager()->debugger()->stepOver();
}
bool StdCmdMacroStepOver::isActive(void)
bool StdCmdMacroStepOver::isActive()
{
static PythonDebugger* dbg = Application::Instance->macroManager()->debugger();
return dbg->isRunning();
@@ -279,7 +279,7 @@ void StdCmdMacroStepInto::activated(int iMsg)
Application::Instance->macroManager()->debugger()->stepInto();
}
bool StdCmdMacroStepInto::isActive(void)
bool StdCmdMacroStepInto::isActive()
{
static PythonDebugger* dbg = Application::Instance->macroManager()->debugger();
return dbg->isRunning();
@@ -306,14 +306,14 @@ void StdCmdToggleBreakpoint::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ToggleBreakpoint\")");
}
bool StdCmdToggleBreakpoint::isActive(void)
bool StdCmdToggleBreakpoint::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("ToggleBreakpoint");
}
namespace Gui {
void CreateMacroCommands(void)
void CreateMacroCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
rcCmdMgr.addCommand(new StdCmdDlgMacroRecord());
+1 -1
View File
@@ -39,7 +39,7 @@
// returns a string which represents the object e.g. when printed in python
std::string CommandPy::representation(void) const
std::string CommandPy::representation() const
{
return std::string("<Command object>");
}
+12 -12
View File
@@ -102,12 +102,12 @@ void StdCmdWorkbench::activated(int i)
}
}
bool StdCmdWorkbench::isActive(void)
bool StdCmdWorkbench::isActive()
{
return true;
}
Action * StdCmdWorkbench::createAction(void)
Action * StdCmdWorkbench::createAction()
{
Action *pcAction;
@@ -152,7 +152,7 @@ void StdCmdRecentFiles::activated(int iMsg)
/**
* Creates the QAction object containing the recent files.
*/
Action * StdCmdRecentFiles::createAction(void)
Action * StdCmdRecentFiles::createAction()
{
RecentFilesAction* pcAction = new RecentFilesAction(this, getMainWindow());
pcAction->setObjectName(QLatin1String("recentFiles"));
@@ -192,7 +192,7 @@ void StdCmdRecentMacros::activated(int iMsg)
/**
* Creates the QAction object containing the recent macros.
*/
Action * StdCmdRecentMacros::createAction(void)
Action * StdCmdRecentMacros::createAction()
{
RecentMacrosAction* pcAction = new RecentMacrosAction(this, getMainWindow());
pcAction->setObjectName(QLatin1String("recentMacros"));
@@ -218,7 +218,7 @@ StdCmdAbout::StdCmdAbout()
eType = 0;
}
Action * StdCmdAbout::createAction(void)
Action * StdCmdAbout::createAction()
{
Action *pcAction;
@@ -356,7 +356,7 @@ StdCmdDlgPreferences::StdCmdDlgPreferences()
eType = 0;
}
Action * StdCmdDlgPreferences::createAction(void)
Action * StdCmdDlgPreferences::createAction()
{
Action *pcAction = Command::createAction();
pcAction->setMenuRole(QAction::PreferencesRole);
@@ -803,7 +803,7 @@ void StdCmdTextDocument::activated(int iMsg)
commitCommand();
}
bool StdCmdTextDocument::isActive(void)
bool StdCmdTextDocument::isActive()
{
return hasActiveDocument();
}
@@ -845,8 +845,8 @@ public:
void updateIcon(int mode);
protected:
virtual void activated(int iMsg);
virtual bool isActive(void);
virtual Gui::Action * createAction(void);
virtual bool isActive();
virtual Gui::Action * createAction();
};
StdCmdUserEditMode::StdCmdUserEditMode()
@@ -863,7 +863,7 @@ StdCmdUserEditMode::StdCmdUserEditMode()
this->getGuiApplication()->signalUserEditModeChanged.connect(boost::bind(&StdCmdUserEditMode::updateIcon, this, bp::_1));
}
Gui::Action * StdCmdUserEditMode::createAction(void)
Gui::Action * StdCmdUserEditMode::createAction()
{
Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow());
pcAction->setDropDownMenu(true);
@@ -928,14 +928,14 @@ void StdCmdUserEditMode::activated(int iMsg)
Gui::Application::Instance->setUserEditMode(iMsg);
}
bool StdCmdUserEditMode::isActive(void)
bool StdCmdUserEditMode::isActive()
{
return true;
}
namespace Gui {
void CreateStdCommands(void)
void CreateStdCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
+3 -3
View File
@@ -75,7 +75,7 @@ void StdCmdPart::activated(int iMsg)
updateActive();
}
bool StdCmdPart::isActive(void)
bool StdCmdPart::isActive()
{
return hasActiveDocument();
}
@@ -117,14 +117,14 @@ void StdCmdGroup::activated(int iMsg)
gui->signalScrollToObject(*static_cast<ViewProviderDocumentObject*>(vp));
}
bool StdCmdGroup::isActive(void)
bool StdCmdGroup::isActive()
{
return hasActiveDocument();
}
namespace Gui {
void CreateStructureCommands(void)
void CreateStructureCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
+16 -16
View File
@@ -132,7 +132,7 @@ void FCCmdTest1::activated(int iMsg)
Q_UNUSED(iMsg);
}
bool FCCmdTest1::isActive(void)
bool FCCmdTest1::isActive()
{
//return (GetActiveOCCDocument()!=NULL);
return true;
@@ -160,7 +160,7 @@ void FCCmdTest2::activated(int iMsg)
Q_UNUSED(iMsg);
}
bool FCCmdTest2::isActive(void)
bool FCCmdTest2::isActive()
{
return (getDocument()!=nullptr);
}
@@ -190,7 +190,7 @@ void FCCmdTest3::activated(int iMsg)
}
bool FCCmdTest3::isActive(void)
bool FCCmdTest3::isActive()
{
return (getDocument()!=nullptr);
}
@@ -221,7 +221,7 @@ void FCCmdTest4::activated(int iMsg)
}
bool FCCmdTest4::isActive(void)
bool FCCmdTest4::isActive()
{
return (getDocument()!=nullptr);
}
@@ -250,7 +250,7 @@ void FCCmdTest5::activated(int iMsg)
return;
}
bool FCCmdTest5::isActive(void)
bool FCCmdTest5::isActive()
{
return (getDocument()!=nullptr);
}
@@ -280,7 +280,7 @@ void FCCmdTest6::activated(int iMsg)
return;
}
bool FCCmdTest6::isActive(void)
bool FCCmdTest6::isActive()
{
return (getDocument()!=nullptr);
}
@@ -330,7 +330,7 @@ void CmdTestCmdFuncs::activated(int iMsg)
Gui::copyVisualT(objName.c_str(), "DisplayMode", objName.c_str());
}
bool CmdTestCmdFuncs::isActive(void)
bool CmdTestCmdFuncs::isActive()
{
return (getDocument()!=nullptr);
}
@@ -372,7 +372,7 @@ void CmdTestProgress1::activated(int iMsg)
}
}
bool CmdTestProgress1::isActive(void)
bool CmdTestProgress1::isActive()
{
return (!Base::Sequencer().isRunning());
}
@@ -415,7 +415,7 @@ void CmdTestProgress2::activated(int iMsg)
}
}
bool CmdTestProgress2::isActive(void)
bool CmdTestProgress2::isActive()
{
return ( !Base::Sequencer().isRunning() );
}
@@ -485,7 +485,7 @@ void CmdTestProgress3::activated(int iMsg)
}
}
bool CmdTestProgress3::isActive(void)
bool CmdTestProgress3::isActive()
{
return ( !Base::Sequencer().isRunning() );
}
@@ -540,7 +540,7 @@ void CmdTestProgress4::activated(int iMsg)
}
}
bool CmdTestProgress4::isActive(void)
bool CmdTestProgress4::isActive()
{
return (!Base::Sequencer().isRunning());
}
@@ -620,7 +620,7 @@ void CmdTestProgress5::activated(int iMsg)
thr3->start();
}
bool CmdTestProgress5::isActive(void)
bool CmdTestProgress5::isActive()
{
return (!Base::Sequencer().isRunning());
}
@@ -647,7 +647,7 @@ void CmdTestMDI1::activated(int iMsg)
getMainWindow()->removeWindow(mdi);
}
bool CmdTestMDI1::isActive(void)
bool CmdTestMDI1::isActive()
{
return getMainWindow()->activeWindow();
}
@@ -675,7 +675,7 @@ void CmdTestMDI2::activated(int iMsg)
}
}
bool CmdTestMDI2::isActive(void)
bool CmdTestMDI2::isActive()
{
return getMainWindow()->activeWindow();
}
@@ -703,7 +703,7 @@ void CmdTestMDI3::activated(int iMsg)
mdi->show();
}
bool CmdTestMDI3::isActive(void)
bool CmdTestMDI3::isActive()
{
return getMainWindow()->activeWindow();
}
@@ -811,7 +811,7 @@ void CmdTestConsoleOutput::activated(int iMsg)
namespace Gui {
void CreateTestCommands(void)
void CreateTestCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
+54 -54
View File
@@ -115,7 +115,7 @@ void StdOrthographicCamera::activated(int iMsg)
}
}
bool StdOrthographicCamera::isActive(void)
bool StdOrthographicCamera::isActive()
{
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
if (view) {
@@ -132,7 +132,7 @@ bool StdOrthographicCamera::isActive(void)
return false;
}
Action * StdOrthographicCamera::createAction(void)
Action * StdOrthographicCamera::createAction()
{
Action *pcAction = Command::createAction();
pcAction->setCheckable(true);
@@ -165,7 +165,7 @@ void StdPerspectiveCamera::activated(int iMsg)
}
}
bool StdPerspectiveCamera::isActive(void)
bool StdPerspectiveCamera::isActive()
{
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
if (view) {
@@ -183,7 +183,7 @@ bool StdPerspectiveCamera::isActive(void)
return false;
}
Action * StdPerspectiveCamera::createAction(void)
Action * StdPerspectiveCamera::createAction()
{
Action *pcAction = Command::createAction();
pcAction->setCheckable(true);
@@ -261,8 +261,8 @@ public:
protected:
virtual void activated(int iMsg);
virtual bool isActive(void);
virtual Action * createAction(void);
virtual bool isActive();
virtual Action * createAction();
virtual void languageChange();
private:
@@ -298,7 +298,7 @@ StdCmdFreezeViews::StdCmdFreezeViews()
eType = Alter3DView;
}
Action * StdCmdFreezeViews::createAction(void)
Action * StdCmdFreezeViews::createAction()
{
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
pcAction->setDropDownMenu(true);
@@ -500,7 +500,7 @@ void StdCmdFreezeViews::onRestoreViews()
}
}
bool StdCmdFreezeViews::isActive(void)
bool StdCmdFreezeViews::isActive()
{
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
if (view) {
@@ -557,7 +557,7 @@ StdCmdToggleClipPlane::StdCmdToggleClipPlane()
eType = Alter3DView;
}
Action * StdCmdToggleClipPlane::createAction(void)
Action * StdCmdToggleClipPlane::createAction()
{
Action *pcAction = (Action*)Command::createAction();
#if 0
@@ -588,7 +588,7 @@ void StdCmdToggleClipPlane::activated(int iMsg)
#endif
}
bool StdCmdToggleClipPlane::isActive(void)
bool StdCmdToggleClipPlane::isActive()
{
#if 0
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
@@ -623,8 +623,8 @@ public:
void updateIcon(const Gui::MDIView* view);
protected:
virtual void activated(int iMsg);
virtual bool isActive(void);
virtual Gui::Action * createAction(void);
virtual bool isActive();
virtual Gui::Action * createAction();
};
StdCmdDrawStyle::StdCmdDrawStyle()
@@ -641,7 +641,7 @@ StdCmdDrawStyle::StdCmdDrawStyle()
this->getGuiApplication()->signalActivateView.connect(boost::bind(&StdCmdDrawStyle::updateIcon, this, bp::_1));
}
Gui::Action * StdCmdDrawStyle::createAction(void)
Gui::Action * StdCmdDrawStyle::createAction()
{
Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow());
pcAction->setDropDownMenu(true);
@@ -836,7 +836,7 @@ void StdCmdDrawStyle::activated(int iMsg)
}
}
bool StdCmdDrawStyle::isActive(void)
bool StdCmdDrawStyle::isActive()
{
return Gui::Application::Instance->activeDocument();
}
@@ -866,7 +866,7 @@ void StdCmdToggleVisibility::activated(int iMsg)
Selection().setVisible(SelectionSingleton::VisToggle);
}
bool StdCmdToggleVisibility::isActive(void)
bool StdCmdToggleVisibility::isActive()
{
return (Gui::Selection().size() != 0);
}
@@ -913,7 +913,7 @@ void StdCmdToggleSelectability::activated(int iMsg)
}
}
bool StdCmdToggleSelectability::isActive(void)
bool StdCmdToggleSelectability::isActive()
{
return (Gui::Selection().size() != 0);
}
@@ -941,7 +941,7 @@ void StdCmdShowSelection::activated(int iMsg)
Selection().setVisible(SelectionSingleton::VisShow);
}
bool StdCmdShowSelection::isActive(void)
bool StdCmdShowSelection::isActive()
{
return (Gui::Selection().size() != 0);
}
@@ -969,7 +969,7 @@ void StdCmdHideSelection::activated(int iMsg)
Selection().setVisible(SelectionSingleton::VisHide);
}
bool StdCmdHideSelection::isActive(void)
bool StdCmdHideSelection::isActive()
{
return (Gui::Selection().size() != 0);
}
@@ -1011,7 +1011,7 @@ void StdCmdSelectVisibleObjects::activated(int iMsg)
rSel.setSelection(app->getName(), visible);
}
bool StdCmdSelectVisibleObjects::isActive(void)
bool StdCmdSelectVisibleObjects::isActive()
{
return App::GetApplication().getActiveDocument();
}
@@ -1052,7 +1052,7 @@ void StdCmdToggleObjects::activated(int iMsg)
}
}
bool StdCmdToggleObjects::isActive(void)
bool StdCmdToggleObjects::isActive()
{
return App::GetApplication().getActiveDocument();
}
@@ -1089,7 +1089,7 @@ void StdCmdShowObjects::activated(int iMsg)
}
}
bool StdCmdShowObjects::isActive(void)
bool StdCmdShowObjects::isActive()
{
return App::GetApplication().getActiveDocument();
}
@@ -1126,7 +1126,7 @@ void StdCmdHideObjects::activated(int iMsg)
}
}
bool StdCmdHideObjects::isActive(void)
bool StdCmdHideObjects::isActive()
{
return App::GetApplication().getActiveDocument();
}
@@ -1164,7 +1164,7 @@ void StdCmdSetAppearance::activated(int iMsg)
#endif
}
bool StdCmdSetAppearance::isActive(void)
bool StdCmdSetAppearance::isActive()
{
#if 0
return Gui::Selection().size() != 0;
@@ -1491,7 +1491,7 @@ void StdCmdViewFitAll::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewFit\")");
}
bool StdCmdViewFitAll::isActive(void)
bool StdCmdViewFitAll::isActive()
{
//return isViewOfType(Gui::View3DInventor::getClassTypeId());
return getGuiApplication()->sendHasMsgToActiveView("ViewFit");
@@ -1522,7 +1522,7 @@ void StdCmdViewFitSelection::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewSelection\")");
}
bool StdCmdViewFitSelection::isActive(void)
bool StdCmdViewFitSelection::isActive()
{
//return isViewOfType(Gui::View3DInventor::getClassTypeId());
return getGuiApplication()->sendHasMsgToActiveView("ViewSelection");
@@ -1551,7 +1551,7 @@ void StdViewDock::activated(int iMsg)
Q_UNUSED(iMsg);
}
bool StdViewDock::isActive(void)
bool StdViewDock::isActive()
{
MDIView* view = getMainWindow()->activeWindow();
return (qobject_cast<View3DInventor*>(view) ? true : false);
@@ -1580,7 +1580,7 @@ void StdViewUndock::activated(int iMsg)
Q_UNUSED(iMsg);
}
bool StdViewUndock::isActive(void)
bool StdViewUndock::isActive()
{
MDIView* view = getMainWindow()->activeWindow();
return (qobject_cast<View3DInventor*>(view) ? true : false);
@@ -1642,7 +1642,7 @@ void StdViewFullscreen::activated(int iMsg)
Q_UNUSED(iMsg);
}
bool StdViewFullscreen::isActive(void)
bool StdViewFullscreen::isActive()
{
MDIView* view = getMainWindow()->activeWindow();
return (qobject_cast<View3DInventor*>(view) ? true : false);
@@ -1669,7 +1669,7 @@ StdViewDockUndockFullscreen::StdViewDockUndockFullscreen()
rcCmdMgr.addCommand(new StdViewFullscreen());
}
Action * StdViewDockUndockFullscreen::createAction(void)
Action * StdViewDockUndockFullscreen::createAction()
{
ActionGroup* pcAction = new ActionGroup(this, getMainWindow());
pcAction->setDropDownMenu(true);
@@ -1740,7 +1740,7 @@ void StdViewDockUndockFullscreen::activated(int iMsg)
}
}
bool StdViewDockUndockFullscreen::isActive(void)
bool StdViewDockUndockFullscreen::isActive()
{
MDIView* view = getMainWindow()->activeWindow();
if (qobject_cast<View3DInventor*>(view)) {
@@ -1785,7 +1785,7 @@ void StdCmdViewVR::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewVR\")");
}
bool StdCmdViewVR::isActive(void)
bool StdCmdViewVR::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("ViewVR");
}
@@ -1958,7 +1958,7 @@ void StdViewScreenShot::activated(int iMsg)
}
}
bool StdViewScreenShot::isActive(void)
bool StdViewScreenShot::isActive()
{
return isViewOfType(Gui::View3DInventor::getClassTypeId());
}
@@ -1988,7 +1988,7 @@ void StdCmdViewCreate::activated(int iMsg)
getActiveGuiDocument()->getActiveView()->viewAll();
}
bool StdCmdViewCreate::isActive(void)
bool StdCmdViewCreate::isActive()
{
return (getActiveGuiDocument()!=nullptr);
}
@@ -2023,7 +2023,7 @@ void StdCmdToggleNavigation::activated(int iMsg)
}
}
bool StdCmdToggleNavigation::isActive(void)
bool StdCmdToggleNavigation::isActive()
{
//#0001087: Inventor Navigation continues with released Mouse Button
//This happens because 'Esc' is also used to close the task dialog.
@@ -2159,7 +2159,7 @@ void StdCmdAxisCross::activated(int iMsg)
}
}
bool StdCmdAxisCross::isActive(void)
bool StdCmdAxisCross::isActive()
{
Gui::View3DInventor* view = qobject_cast<View3DInventor*>(Gui::getMainWindow()->activeWindow());
if (view && view->getViewer()->hasAxisCross()) {
@@ -2201,7 +2201,7 @@ void StdCmdViewExample1::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example1\")");
}
bool StdCmdViewExample1::isActive(void)
bool StdCmdViewExample1::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("Example1");
}
@@ -2229,7 +2229,7 @@ void StdCmdViewExample2::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example2\")");
}
bool StdCmdViewExample2::isActive(void)
bool StdCmdViewExample2::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("Example2");
}
@@ -2257,7 +2257,7 @@ void StdCmdViewExample3::activated(int iMsg)
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example3\")");
}
bool StdCmdViewExample3::isActive(void)
bool StdCmdViewExample3::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("Example3");
}
@@ -2286,7 +2286,7 @@ void StdCmdViewIvStereoOff::activated(int iMsg)
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"Mono\")");
}
bool StdCmdViewIvStereoOff::isActive(void)
bool StdCmdViewIvStereoOff::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("SetStereoOff");
}
@@ -2315,7 +2315,7 @@ void StdCmdViewIvStereoRedGreen::activated(int iMsg)
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"Anaglyph\")");
}
bool StdCmdViewIvStereoRedGreen::isActive(void)
bool StdCmdViewIvStereoRedGreen::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("SetStereoRedGreen");
}
@@ -2343,7 +2343,7 @@ void StdCmdViewIvStereoQuadBuff::activated(int iMsg)
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"QuadBuffer\")");
}
bool StdCmdViewIvStereoQuadBuff::isActive(void)
bool StdCmdViewIvStereoQuadBuff::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("SetStereoQuadBuff");
}
@@ -2371,7 +2371,7 @@ void StdCmdViewIvStereoInterleavedRows::activated(int iMsg)
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedRows\")");
}
bool StdCmdViewIvStereoInterleavedRows::isActive(void)
bool StdCmdViewIvStereoInterleavedRows::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedRows");
}
@@ -2399,7 +2399,7 @@ void StdCmdViewIvStereoInterleavedColumns::activated(int iMsg)
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedColumns\")");
}
bool StdCmdViewIvStereoInterleavedColumns::isActive(void)
bool StdCmdViewIvStereoInterleavedColumns::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedColumns");
}
@@ -2449,7 +2449,7 @@ void StdCmdViewIvIssueCamPos::activated(int iMsg)
getGuiApplication()->macroManager()->addLine(MacroManager::Gui,Temp.c_str());
}
bool StdCmdViewIvIssueCamPos::isActive(void)
bool StdCmdViewIvIssueCamPos::isActive()
{
return getGuiApplication()->sendHasMsgToActiveView("GetCamera");
}
@@ -2483,7 +2483,7 @@ void StdViewZoomIn::activated(int iMsg)
}
}
bool StdViewZoomIn::isActive(void)
bool StdViewZoomIn::isActive()
{
return (qobject_cast<View3DInventor*>(getMainWindow()->activeWindow()));
}
@@ -2516,7 +2516,7 @@ void StdViewZoomOut::activated(int iMsg)
}
}
bool StdViewZoomOut::isActive(void)
bool StdViewZoomOut::isActive()
{
return (qobject_cast<View3DInventor*>(getMainWindow()->activeWindow()));
}
@@ -3124,7 +3124,7 @@ StdCmdTreeSelectAllInstances::StdCmdTreeSelectAllInstances()
eType = AlterSelection;
}
bool StdCmdTreeSelectAllInstances::isActive(void)
bool StdCmdTreeSelectAllInstances::isActive()
{
const auto &sels = Selection().getSelectionEx("*",App::DocumentObject::getClassTypeId(), ResolveMode::OldStyleElement, true);
if(sels.empty())
@@ -3231,7 +3231,7 @@ void StdCmdMeasureDistance::activated(int iMsg)
}
}
bool StdCmdMeasureDistance::isActive(void)
bool StdCmdMeasureDistance::isActive()
{
App::Document* doc = App::GetApplication().getActiveDocument();
if (!doc || doc->countObjectsOfType(App::GeoFeature::getClassTypeId()) == 0)
@@ -3304,7 +3304,7 @@ void StdCmdTextureMapping::activated(int iMsg)
Gui::Control().showDialog(new Gui::Dialog::TaskTextureMapping);
}
bool StdCmdTextureMapping::isActive(void)
bool StdCmdTextureMapping::isActive()
{
Gui::MDIView* view = getMainWindow()->activeWindow();
return view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())
@@ -3419,7 +3419,7 @@ void StdCmdSelBack::activated(int iMsg)
Selection().selStackGoBack();
}
bool StdCmdSelBack::isActive(void)
bool StdCmdSelBack::isActive()
{
return Selection().selStackBackSize()>1;
}
@@ -3449,7 +3449,7 @@ void StdCmdSelForward::activated(int iMsg)
Selection().selStackGoForward();
}
bool StdCmdSelForward::isActive(void)
bool StdCmdSelForward::isActive()
{
return !!Selection().selStackForwardSize();
}
@@ -3734,7 +3734,7 @@ void StdCmdSelBoundingBox::activated(int iMsg)
}
}
bool StdCmdSelBoundingBox::isActive(void)
bool StdCmdSelBoundingBox::isActive()
{
if(_pcAction) {
bool checked = _pcAction->isChecked();
@@ -3744,7 +3744,7 @@ bool StdCmdSelBoundingBox::isActive(void)
return true;
}
Action * StdCmdSelBoundingBox::createAction(void)
Action * StdCmdSelBoundingBox::createAction()
{
Action *pcAction = Command::createAction();
pcAction->setCheckable(true);
@@ -3758,7 +3758,7 @@ Action * StdCmdSelBoundingBox::createAction(void)
namespace Gui {
void CreateViewStdCommands(void)
void CreateViewStdCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
+15 -15
View File
@@ -65,7 +65,7 @@ void StdCmdArrangeIcons::activated(int iMsg)
getMainWindow()->arrangeIcons ();
}
bool StdCmdArrangeIcons::isActive(void)
bool StdCmdArrangeIcons::isActive()
{
return !(getMainWindow()->windows().isEmpty());
}
@@ -93,7 +93,7 @@ void StdCmdTileWindows::activated(int iMsg)
getMainWindow()->tile();
}
bool StdCmdTileWindows::isActive(void)
bool StdCmdTileWindows::isActive()
{
return !(getMainWindow()->windows().isEmpty());
}
@@ -121,7 +121,7 @@ void StdCmdCascadeWindows::activated(int iMsg)
getMainWindow()->cascade();
}
bool StdCmdCascadeWindows::isActive(void)
bool StdCmdCascadeWindows::isActive()
{
return !(getMainWindow()->windows().isEmpty());
}
@@ -153,7 +153,7 @@ void StdCmdCloseActiveWindow::activated(int iMsg)
getMainWindow()->closeActiveWindow();
}
bool StdCmdCloseActiveWindow::isActive(void)
bool StdCmdCloseActiveWindow::isActive()
{
return !(getMainWindow()->windows().isEmpty());
}
@@ -181,7 +181,7 @@ void StdCmdCloseAllWindows::activated(int iMsg)
getMainWindow()->closeAllDocuments();
}
bool StdCmdCloseAllWindows::isActive(void)
bool StdCmdCloseAllWindows::isActive()
{
return !(getMainWindow()->windows().isEmpty()) || App::GetApplication().getDocuments().size();
}
@@ -210,7 +210,7 @@ void StdCmdActivateNextWindow::activated(int iMsg)
getMainWindow()->activateNextWindow();
}
bool StdCmdActivateNextWindow::isActive(void)
bool StdCmdActivateNextWindow::isActive()
{
return !(getMainWindow()->windows().isEmpty());
}
@@ -239,7 +239,7 @@ void StdCmdActivatePrevWindow::activated(int iMsg)
getMainWindow()->activatePreviousWindow();
}
bool StdCmdActivatePrevWindow::isActive(void)
bool StdCmdActivatePrevWindow::isActive()
{
return !(getMainWindow()->windows().isEmpty());
}
@@ -312,12 +312,12 @@ void StdCmdDockViewMenu::activated(int iMsg)
Q_UNUSED(iMsg);
}
bool StdCmdDockViewMenu::isActive(void)
bool StdCmdDockViewMenu::isActive()
{
return true;
}
Action * StdCmdDockViewMenu::createAction(void)
Action * StdCmdDockViewMenu::createAction()
{
Action *pcAction;
pcAction = new DockWidgetAction(this, getMainWindow());
@@ -348,12 +348,12 @@ void StdCmdToolBarMenu::activated(int iMsg)
Q_UNUSED(iMsg);
}
bool StdCmdToolBarMenu::isActive(void)
bool StdCmdToolBarMenu::isActive()
{
return true;
}
Action * StdCmdToolBarMenu::createAction(void)
Action * StdCmdToolBarMenu::createAction()
{
Action *pcAction;
pcAction = new ToolBarAction(this, getMainWindow());
@@ -396,7 +396,7 @@ StdCmdStatusBar::StdCmdStatusBar()
eType = 0;
}
Action * StdCmdStatusBar::createAction(void)
Action * StdCmdStatusBar::createAction()
{
Action *pcAction = Command::createAction();
pcAction->setCheckable(true);
@@ -448,12 +448,12 @@ void StdCmdWindowsMenu::activated(int iMsg)
Q_UNUSED(iMsg);
}
bool StdCmdWindowsMenu::isActive(void)
bool StdCmdWindowsMenu::isActive()
{
return true;
}
Action * StdCmdWindowsMenu::createAction(void)
Action * StdCmdWindowsMenu::createAction()
{
// Allow to show 10 menu items in the 'Window' menu and one separator.
// If we have more windows then the user can use the 'Windows...' item.
@@ -483,7 +483,7 @@ Action * StdCmdWindowsMenu::createAction(void)
namespace Gui {
void CreateWindowStdCommands(void)
void CreateWindowStdCommands()
{
CommandManager &rcCmdMgr = Application::Instance->commandManager();
+5 -5
View File
@@ -230,7 +230,7 @@ void ControlSingleton::closedDialog()
| QDockWidget::DockWidgetFloatable);
}
bool ControlSingleton::isAllowedAlterDocument(void) const
bool ControlSingleton::isAllowedAlterDocument() const
{
if (ActiveDialog)
return ActiveDialog->isAllowedAlterDocument();
@@ -238,14 +238,14 @@ bool ControlSingleton::isAllowedAlterDocument(void) const
}
bool ControlSingleton::isAllowedAlterView(void) const
bool ControlSingleton::isAllowedAlterView() const
{
if (ActiveDialog)
return ActiveDialog->isAllowedAlterView();
return true;
}
bool ControlSingleton::isAllowedAlterSelection(void) const
bool ControlSingleton::isAllowedAlterSelection() const
{
if (ActiveDialog)
return ActiveDialog->isAllowedAlterSelection();
@@ -254,14 +254,14 @@ bool ControlSingleton::isAllowedAlterSelection(void) const
// -------------------------------------------
ControlSingleton& ControlSingleton::instance(void)
ControlSingleton& ControlSingleton::instance()
{
if (_pcSingleton == nullptr)
_pcSingleton = new ControlSingleton;
return *_pcSingleton;
}
void ControlSingleton::destruct (void)
void ControlSingleton::destruct ()
{
if (_pcSingleton != nullptr)
delete _pcSingleton;
+1 -1
View File
@@ -128,7 +128,7 @@ private:
};
/// Get the global instance
inline ControlSingleton& Control(void)
inline ControlSingleton& Control()
{
return ControlSingleton::instance();
}
+3 -3
View File
@@ -110,11 +110,11 @@ public:
public:
bool reject();
bool isAllowedAlterDocument(void) const
bool isAllowedAlterDocument() const
{ return true; }
bool isAllowedAlterView(void) const
bool isAllowedAlterView() const
{ return true; }
bool isAllowedAlterSelection(void) const
bool isAllowedAlterSelection() const
{ return true; }
QDialogButtonBox::StandardButtons getStandardButtons() const;
@@ -55,7 +55,7 @@ DlgEditFileIncludePropertyExternal::~DlgEditFileIncludePropertyExternal()
}
int DlgEditFileIncludePropertyExternal::Do(void)
int DlgEditFileIncludePropertyExternal::Do()
{
QFileInfo file = QString::fromUtf8(Prop.getValue());
assert(file.exists());
+1 -1
View File
@@ -42,7 +42,7 @@ public:
DlgEditFileIncludePropertyExternal( App::PropertyFileIncluded& Prop, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
virtual ~DlgEditFileIncludePropertyExternal();
int Do(void);
int Do();
protected Q_SLOTS:
protected:
+1 -1
View File
@@ -110,7 +110,7 @@ DlgMacroExecuteImp::~DlgMacroExecuteImp()
/**
* Fills up the list with all macro files found in the specified location.
*/
void DlgMacroExecuteImp::fillUpList(void)
void DlgMacroExecuteImp::fillUpList()
{
// lists all files in macro path
QDir dir(this->macroPath, QLatin1String("*.FCMacro *.py"));
+1 -1
View File
@@ -65,7 +65,7 @@ protected Q_SLOTS:
void on_tabMacroWidget_currentChanged(int index);
protected:
void fillUpList(void);
void fillUpList();
protected:
QString macroPath;
+1 -1
View File
@@ -937,7 +937,7 @@ ParameterGroupItem::~ParameterGroupItem()
_hcGrp->ClearObserver();
}
void ParameterGroupItem::fillUp(void)
void ParameterGroupItem::fillUp()
{
// filling up groups
std::vector<Base::Reference<ParameterGrp> > vhcParamGrp = _hcGrp->GetGroups();
+1 -1
View File
@@ -220,7 +220,7 @@ public:
void setData ( int column, int role, const QVariant & value );
QVariant data ( int column, int role ) const;
void fillUp(void);
void fillUp();
Base::Reference<ParameterGrp> _hcGrp;
};
+29 -5
View File
@@ -36,11 +36,13 @@
#include <App/Application.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Tools.h>
#include "DlgPreferencesImp.h"
#include "ui_DlgPreferences.h"
#include "BitmapFactory.h"
#include "MainWindow.h"
#include "Tools.h"
#include "WidgetFactory.h"
@@ -65,7 +67,9 @@ DlgPreferencesImp::DlgPreferencesImp(QWidget* parent, Qt::WindowFlags fl)
invalidParameter(false), canEmbedScrollArea(true)
{
ui->setupUi(this);
ui->listBox->setFixedWidth(108);
QFontMetrics fm(font());
int length = QtTools::horizontalAdvance(fm, longestGroupName());
ui->listBox->setFixedWidth(Base::clamp<int>(length + 20, 108, 120));
ui->listBox->setGridSize(QSize(108, 75));
connect(ui->buttonBox, SIGNAL (helpRequested()),
@@ -106,6 +110,17 @@ void DlgPreferencesImp::setupPages()
ui->listBox->setCurrentRow(0);
}
QString DlgPreferencesImp::longestGroupName() const
{
std::string name;
for (const auto &group : _pages) {
if (group.first.size() > name.size())
name = group.first;
}
return QString::fromStdString(name);
}
/**
* Create the necessary widgets for a new group named \a groupName. Returns a
* pointer to the group's QTabWidget: that widget's lifetime is managed by the
@@ -122,11 +137,20 @@ QTabWidget* DlgPreferencesImp::createTabForGroup(const std::string &groupName)
QListWidgetItem* item = new QListWidgetItem(ui->listBox);
item->setData(GroupNameRole, QVariant(groupNameQString));
item->setText(QObject::tr(groupNameQString.toLatin1()));
item->setToolTip(QObject::tr(groupNameQString.toLatin1()));
// for Part/PD we need another tooltip since this group is for 2 WBs
if (groupName.compare("Part/Part Design") == 0)
item->setToolTip(QObject::tr(QString::fromStdString("Part and Part Design workbench").toLatin1()));
else
item->setToolTip(QObject::tr(groupNameQString.toLatin1()));
std::string fileName = groupName;
for (auto & ch : fileName) {
if (ch == ' ') ch = '_';
else ch = tolower(ch);
// for Part/PD the filename cannot be groupName since this group is for 2 WBs
if (groupName.compare("Part/Part Design") == 0)
fileName = "Part design";
for (auto &ch : fileName) {
if (ch == ' ')
ch = '_';
else
ch = tolower(ch);
}
fileName = std::string("preferences-") + fileName;
QPixmap icon = Gui::BitmapFactory().pixmapFromSvg(fileName.c_str(), QSize(48, 48));
+1
View File
@@ -143,6 +143,7 @@ private:
void createPageInGroup(QTabWidget* tabWidget, const std::string& pageName);
void applyChanges();
void restoreDefaults();
QString longestGroupName() const;
//@}
private:
+5 -5
View File
@@ -66,7 +66,7 @@ DlgRunExternal::~DlgRunExternal()
delete ui;
}
int DlgRunExternal::Do(void)
int DlgRunExternal::Do()
{
QFileInfo ifo (ProcName);
@@ -79,23 +79,23 @@ int DlgRunExternal::Do(void)
return exec();
}
void DlgRunExternal::reject (void)
void DlgRunExternal::reject ()
{
QDialog::reject();
}
void DlgRunExternal::accept (void)
void DlgRunExternal::accept ()
{
QDialog::accept();
}
void DlgRunExternal::abort (void)
void DlgRunExternal::abort ()
{
process.terminate();
DlgRunExternal::reject();
}
void DlgRunExternal::advanced (void)
void DlgRunExternal::advanced ()
{
if (advancedHidden){
ui->extensionWidget->show();
+1
View File
@@ -25,6 +25,7 @@
#include <QDialog>
#include <QProcess>
#include <FCGlobal.h>
namespace Gui {
namespace Dialog {
+2 -2
View File
@@ -180,13 +180,13 @@ void DlgUnitsCalculator::parseError(const QString& errorText)
ui->ValueOutput->setText(errorText);
}
void DlgUnitsCalculator::copy(void)
void DlgUnitsCalculator::copy()
{
QClipboard *cb = QApplication::clipboard();
cb->setText(ui->ValueOutput->text());
}
void DlgUnitsCalculator::returnPressed(void)
void DlgUnitsCalculator::returnPressed()
{
if (ui->pushButton_Copy->isEnabled()) {
ui->textEdit->append(ui->ValueInput->text() + QString::fromLatin1(" = ") + ui->ValueOutput->text());
+2 -2
View File
@@ -56,8 +56,8 @@ protected Q_SLOTS:
void on_comboBoxScheme_activated(int);
void on_spinBoxDecimals_valueChanged(int);
void copy(void);
void returnPressed(void);
void copy();
void returnPressed();
void parseError(const QString& errorText);
+3 -3
View File
@@ -63,15 +63,15 @@ public:
*/
//@{
/// get called when the document is updated
virtual void onUpdate(void){}
virtual void onUpdate(){}
/// returns the name of the view (important for messages)
virtual const char *getName(void) const { return "DockWindow"; }
virtual const char *getName() const { return "DockWindow"; }
/// Message handler
virtual bool onMsg(const char* ,const char** ){ return false; }
/// Message handler test
virtual bool onHasMsg(const char*) const { return false; }
/// overwrite when checking on close state
virtual bool canClose(void){return true;}
virtual bool canClose(){return true;}
//@}
Q_SIGNALS:
+17 -17
View File
@@ -457,11 +457,11 @@ void Document::setEditingTransform(const Base::Matrix4D &mat) {
activeView->getViewer()->setEditingTransform(mat);
}
void Document::resetEdit(void) {
void Document::resetEdit() {
Application::Instance->setEditDocument(nullptr);
}
void Document::_resetEdit(void)
void Document::_resetEdit()
{
std::list<Gui::BaseView*>::iterator it;
if (d->_editViewProvider) {
@@ -1036,7 +1036,7 @@ std::vector<std::pair<ViewProviderDocumentObject*,int> > Document::getViewProvid
return ret;
}
App::Document* Document::getDocument(void) const
App::Document* Document::getDocument() const
{
return d->_pcDocument;
}
@@ -1130,7 +1130,7 @@ bool Document::askIfSavingFailed(const QString& error)
}
/// Save the document
bool Document::save(void)
bool Document::save()
{
if (d->_pcDocument->isSaved()) {
try {
@@ -1213,7 +1213,7 @@ bool Document::save(void)
}
/// Save the document under a new file name
bool Document::saveAs(void)
bool Document::saveAs()
{
getMainWindow()->showMessage(QObject::tr("Save document under new filename..."));
@@ -1314,7 +1314,7 @@ void Document::saveAll()
}
/// Save a copy of the document under a new file name
bool Document::saveCopy(void)
bool Document::saveCopy()
{
getMainWindow()->showMessage(QObject::tr("Save a copy of the document under new filename..."));
@@ -1339,7 +1339,7 @@ bool Document::saveCopy(void)
}
}
unsigned int Document::getMemSize (void) const
unsigned int Document::getMemSize () const
{
unsigned int size = 0;
@@ -1918,7 +1918,7 @@ void Document::detachView(Gui::BaseView* pcView, bool bPassiv)
}
}
void Document::onUpdate(void)
void Document::onUpdate()
{
#ifdef FC_LOGUPDATECHAIN
Base::Console().Log("Acti: Gui::Document::onUpdate()");
@@ -1935,7 +1935,7 @@ void Document::onUpdate(void)
}
}
void Document::onRelabel(void)
void Document::onRelabel()
{
#ifdef FC_LOGUPDATECHAIN
Base::Console().Log("Acti: Gui::Document::onRelabel()");
@@ -1954,7 +1954,7 @@ void Document::onRelabel(void)
d->connectChangeDocumentBlocker.unblock();
}
bool Document::isLastView(void)
bool Document::isLastView()
{
if (d->baseViews.size() <= 1)
return true;
@@ -2113,7 +2113,7 @@ bool Document::sendMsgToFirstView(const Base::Type& typeId, const char* pMsg, co
}
/// Getter for the active view
MDIView* Document::getActiveView(void) const
MDIView* Document::getActiveView() const
{
// get the main window's active view
MDIView* active = getMainWindow()->activeWindow();
@@ -2276,29 +2276,29 @@ void Document::openCommand(const char* sName)
getDocument()->openTransaction(sName);
}
void Document::commitCommand(void)
void Document::commitCommand()
{
getDocument()->commitTransaction();
}
void Document::abortCommand(void)
void Document::abortCommand()
{
getDocument()->abortTransaction();
}
bool Document::hasPendingCommand(void) const
bool Document::hasPendingCommand() const
{
return getDocument()->hasPendingTransaction();
}
/// Get a string vector with the 'Undo' actions
std::vector<std::string> Document::getUndoVector(void) const
std::vector<std::string> Document::getUndoVector() const
{
return getDocument()->getAvailableUndoNames();
}
/// Get a string vector with the 'Redo' actions
std::vector<std::string> Document::getRedoVector(void) const
std::vector<std::string> Document::getRedoVector() const
{
return getDocument()->getAvailableRedoNames();
}
@@ -2401,7 +2401,7 @@ void Document::redo(int iSteps)
d->_redoViewProviders.clear();
}
PyObject* Document::getPyObject(void)
PyObject* Document::getPyObject()
{
_pcDocPy->IncRef();
return _pcDocPy;
+17 -17
View File
@@ -141,13 +141,13 @@ public:
/** @name I/O of the document */
//@{
unsigned int getMemSize (void) const;
unsigned int getMemSize () const;
/// Save the document
bool save(void);
bool save();
/// Save the document under a new file name
bool saveAs(void);
bool saveAs();
/// Save a copy of the document under a new file name
bool saveCopy(void);
bool saveCopy();
/// Save all open document
static void saveAll();
/// This method is used to save properties or very small amounts of data to an XML document.
@@ -170,12 +170,12 @@ public:
bool isModified() const;
/// Getter for the App Document
App::Document* getDocument(void) const;
App::Document* getDocument() const;
/** @name methods for View handling */
//@{
/// Getter for the active view
Gui::MDIView* getActiveView(void) const;
Gui::MDIView* getActiveView() const;
void setActiveWindow(Gui::MDIView* view);
Gui::MDIView* getEditingViewOfViewProvider(Gui::ViewProvider*) const;
Gui::MDIView* getViewOfViewProvider(const Gui::ViewProvider*) const;
@@ -207,9 +207,9 @@ public:
/// Get all view providers along the path and the corresponding node index in the path
std::vector<std::pair<ViewProviderDocumentObject*,int> > getViewProvidersByPath(SoPath * path) const;
/// call update on all attached views
void onUpdate(void);
void onUpdate();
/// call relabel to all attached views
void onRelabel(void);
void onRelabel();
/// returns a list of all attached MDI views
std::list<MDIView*> getMDIViews() const;
/// returns a list of all MDI views of a certain type
@@ -244,9 +244,9 @@ public:
const Base::Matrix4D &getEditingTransform() const;
void setEditingTransform(const Base::Matrix4D &mat);
/// reset from edit mode, this cause all document to reset edit
void resetEdit(void);
void resetEdit();
/// reset edit of this document
void _resetEdit(void);
void _resetEdit();
/// get the in edit ViewProvider or NULL
ViewProvider *getInEdit(ViewProviderDocumentObject **parentVp=nullptr,
std::string *subname=nullptr, int *mode=nullptr, std::string *subElement=nullptr) const;
@@ -265,15 +265,15 @@ public:
/// Open a new Undo transaction on the document
void openCommand(const char* sName=nullptr);
/// Commit the Undo transaction on the document
void commitCommand(void);
void commitCommand();
/// Abort the Undo transaction on the document
void abortCommand(void);
void abortCommand();
/// Check if an Undo transaction is open
bool hasPendingCommand(void) const;
bool hasPendingCommand() const;
/// Get an Undo string vector with the Undo names
std::vector<std::string> getUndoVector(void) const;
std::vector<std::string> getUndoVector() const;
/// Get an Redo string vector with the Redo names
std::vector<std::string> getRedoVector(void) const;
std::vector<std::string> getRedoVector() const;
/// Will UNDO one or more steps
void undo(int iSteps);
/// Will REDO one or more steps
@@ -288,12 +288,12 @@ public:
/// handles the application close event
bool canClose(bool checkModify=true, bool checkLink=false);
bool isLastView(void);
bool isLastView();
/// called by Application before being deleted
void beforeDelete();
virtual PyObject *getPyObject(void);
virtual PyObject *getPyObject();
const char *getCameraSettings() const;
bool saveCameraSettings(const char *) const;
+8 -8
View File
@@ -50,7 +50,7 @@
using namespace Gui;
// returns a string which represent the object e.g. when printed in python
std::string DocumentPy::representation(void) const
std::string DocumentPy::representation() const
{
std::stringstream str;
str << "<GUI Document object at " << getDocumentPtr() << ">";
@@ -377,7 +377,7 @@ PyObject* DocumentPy::toggleInSceneGraph(PyObject *args) {
Py_Return;
}
Py::Object DocumentPy::getActiveObject(void) const
Py::Object DocumentPy::getActiveObject() const
{
App::DocumentObject *object = getDocumentPtr()->getDocument()->getActiveObject();
if (object) {
@@ -394,7 +394,7 @@ void DocumentPy::setActiveObject(Py::Object /*arg*/)
throw Py::AttributeError("'Document' object attribute 'ActiveObject' is read-only");
}
Py::Object DocumentPy::getActiveView(void) const
Py::Object DocumentPy::getActiveView() const
{
Gui::MDIView *view = getDocumentPtr()->getActiveView();
if (view) {
@@ -411,7 +411,7 @@ void DocumentPy::setActiveView(Py::Object /*arg*/)
throw Py::AttributeError("'Document' object attribute 'ActiveView' is read-only");
}
Py::Object DocumentPy::getDocument(void) const
Py::Object DocumentPy::getDocument() const
{
App::Document *doc = getDocumentPtr()->getDocument();
if (doc) {
@@ -423,7 +423,7 @@ Py::Object DocumentPy::getDocument(void) const
}
}
Py::Object DocumentPy::getEditingTransform(void) const
Py::Object DocumentPy::getEditingTransform() const
{
return Py::asObject(new Base::MatrixPy(new Base::Matrix4D(
getDocumentPtr()->getEditingTransform())));
@@ -438,7 +438,7 @@ void DocumentPy::setEditingTransform(Py::Object arg)
*static_cast<Base::MatrixPy*>(arg.ptr())->getMatrixPtr());
}
Py::Object DocumentPy::getInEditInfo(void) const {
Py::Object DocumentPy::getInEditInfo() const {
ViewProviderDocumentObject *vp = nullptr;
std::string subname,subelement;
int mode = 0;
@@ -462,7 +462,7 @@ void DocumentPy::setInEditInfo(Py::Object arg)
pyobj)->getViewProviderDocumentObjectPtr(),subname);
}
Py::Int DocumentPy::getEditMode(void) const
Py::Int DocumentPy::getEditMode() const
{
int mode = -1;
getDocumentPtr()->getInEdit(nullptr,nullptr,&mode);
@@ -475,7 +475,7 @@ Py::Boolean DocumentPy::getTransacting() const
return Py::Boolean(getDocumentPtr()->isPerformingTransaction());
}
Py::Boolean DocumentPy::getModified(void) const
Py::Boolean DocumentPy::getModified() const
{
return Py::Boolean(getDocumentPtr()->isModified());
}
+7 -7
View File
@@ -311,7 +311,7 @@ bool EditorView::onHasMsg(const char* pMsg) const
}
/** Checking on close state. */
bool EditorView::canClose(void)
bool EditorView::canClose()
{
if ( !d->textEdit->document()->isModified() )
return true;
@@ -341,7 +341,7 @@ void EditorView::setDisplayName(EditorView::DisplayName type)
/**
* Saves the content of the editor to a file specified by the appearing file dialog.
*/
bool EditorView::saveAs(void)
bool EditorView::saveAs()
{
QString fn = FileDialog::getSaveFileName(this, QObject::tr("Save Macro"),
QString(), QString::fromLatin1("%1 (*.FCMacro);;Python (*.py)").arg(tr("FreeCAD macro")));
@@ -382,7 +382,7 @@ bool EditorView::open(const QString& fileName)
* Copies the selected text to the clipboard and deletes it from the text edit.
* If there is no selected text nothing happens.
*/
void EditorView::cut(void)
void EditorView::cut()
{
d->textEdit->cut();
}
@@ -390,7 +390,7 @@ void EditorView::cut(void)
/**
* Copies any selected text to the clipboard.
*/
void EditorView::copy(void)
void EditorView::copy()
{
d->textEdit->copy();
}
@@ -399,7 +399,7 @@ void EditorView::copy(void)
* Pastes the text from the clipboard into the text edit at the current cursor position.
* If there is no text in the clipboard nothing happens.
*/
void EditorView::paste(void)
void EditorView::paste()
{
d->textEdit->paste();
}
@@ -408,7 +408,7 @@ void EditorView::paste(void)
* Undoes the last operation.
* If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.
*/
void EditorView::undo(void)
void EditorView::undo()
{
d->lock = true;
if (!d->undos.isEmpty()) {
@@ -423,7 +423,7 @@ void EditorView::undo(void)
* Redoes the last operation.
* If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.
*/
void EditorView::redo(void)
void EditorView::redo()
{
d->lock = true;
if (!d->redos.isEmpty()) {
+3 -3
View File
@@ -66,13 +66,13 @@ public:
void setDisplayName(DisplayName);
void OnChange(Base::Subject<const char*> &rCaller,const char* rcReason);
const char *getName(void) const {return "EditorView";}
void onUpdate(void){}
const char *getName() const {return "EditorView";}
void onUpdate(){}
bool onMsg(const char* pMsg,const char** ppReturn);
bool onHasMsg(const char* pMsg) const;
bool canClose(void);
bool canClose();
/** @name Standard actions of the editor */
//@{
+1 -1
View File
@@ -31,7 +31,7 @@ class ExpressionBinding;
class ExpressionBindingPy : public Py::PythonExtension<ExpressionBindingPy>
{
public:
static void init_type(void); // announce properties and methods
static void init_type(); // announce properties and methods
ExpressionBindingPy(ExpressionBinding*);
~ExpressionBindingPy();
+2 -2
View File
@@ -107,8 +107,8 @@ void GUIConsole::SendLog(const std::string& msg, Base::LogStyle level)
#else /* FC_OS_LINUX */
// safely ignore GUIConsole::s_nMaxLines and GUIConsole::s_nRefCount
GUIConsole::GUIConsole (void) {}
GUIConsole::~GUIConsole (void) {}
GUIConsole::GUIConsole () {}
GUIConsole::~GUIConsole () {}
void GUIConsole::SendLog(const std::string& msg, Base::LogStyle level)
{
switch(level){
+3 -3
View File
@@ -44,11 +44,11 @@ class GuiExport GUIConsole :public Base::ILogger
{
public:
/// Constructor
GUIConsole(void);
GUIConsole();
/// Destructor
virtual ~GUIConsole(void);
virtual ~GUIConsole();
void SendLog(const std::string& msg, Base::LogStyle level) override;
const char* Name(void) override {return "GUIConsole";}
const char* Name() override {return "GUIConsole";}
protected:
static const unsigned int s_nMaxLines;
+11 -11
View File
@@ -330,7 +330,7 @@ void InputField::pushToHistory(const QString &valueq)
}
}
std::vector<QString> InputField::getHistory(void)
std::vector<QString> InputField::getHistory()
{
std::vector<QString> res;
@@ -349,7 +349,7 @@ std::vector<QString> InputField::getHistory(void)
return res;
}
void InputField::setToLastUsedValue(void)
void InputField::setToLastUsedValue()
{
std::vector<QString> hist = getHistory();
if(!hist.empty())
@@ -378,7 +378,7 @@ void InputField::pushToSavedValues(const QString &valueq)
}
}
std::vector<QString> InputField::getSavedValues(void)
std::vector<QString> InputField::getSavedValues()
{
std::vector<QString> res;
@@ -451,7 +451,7 @@ const Base::Unit& InputField::getUnit() const
}
/// get stored, valid quantity as a string
QString InputField::getQuantityString(void) const
QString InputField::getQuantityString() const
{
return actQuantity.getUserString();
}
@@ -465,7 +465,7 @@ void InputField::setQuantityString(const QString& text)
}
/// return the quantity in C locale, i.e. decimal separator is a dot.
QString InputField::rawText(void) const
QString InputField::rawText() const
{
double factor;
QString unit;
@@ -484,7 +484,7 @@ void InputField::setRawText(const QString& text)
}
/// get the value of the singleStep property
double InputField::singleStep(void)const
double InputField::singleStep()const
{
return StepSize;
}
@@ -496,7 +496,7 @@ void InputField::setSingleStep(double s)
}
/// get the value of the maximum property
double InputField::maximum(void)const
double InputField::maximum()const
{
return Maximum;
}
@@ -512,7 +512,7 @@ void InputField::setMaximum(double m)
}
/// get the value of the minimum property
double InputField::minimum(void)const
double InputField::minimum()const
{
return Minimum;
}
@@ -538,7 +538,7 @@ void InputField::setUnitText(const QString& str)
}
}
QString InputField::getUnitText(void)
QString InputField::getUnitText()
{
double dFactor;
QString unitStr;
@@ -576,7 +576,7 @@ void InputField::setFormat(const QString& format)
}
// get the value of the minimum property
int InputField::historySize(void)const
int InputField::historySize()const
{
return HistorySize;
}
@@ -590,7 +590,7 @@ void InputField::setHistorySize(int i)
HistorySize = i;
}
void InputField::selectNumber(void)
void InputField::selectNumber()
{
QString str = text();
unsigned int i = 0;
+14 -14
View File
@@ -83,18 +83,18 @@ public:
void setValue(const double&);
/// get the current value
Base::Quantity getQuantity(void)const{return this->actQuantity;}
Base::Quantity getQuantity()const{return this->actQuantity;}
/// Get the current quantity without unit
double rawValue() const;
/// get stored, valid quantity as a string (user string - avoid storing)
QString getQuantityString(void) const;
QString getQuantityString() const;
/// set, validate and display quantity from a string. Must match existing units.
void setQuantityString(const QString& text);
/// return the quantity in C locale, i.e. decimal separator is a dot.
QString rawText(void) const;
QString rawText() const;
/// expects the string in C locale and internally converts it into the OS-specific locale
void setRawText(const QString& text);
@@ -114,37 +114,37 @@ public:
const Base::Unit& getUnit() const;
/// set the input field to the last used value (works only if the setParamGrpPath() was called)
void setToLastUsedValue(void);
void setToLastUsedValue();
/// get the value of the singleStep property
double singleStep(void)const;
double singleStep()const;
/// set the value of the singleStep property
void setSingleStep(double);
/// get the value of the maximum property
double maximum(void)const;
double maximum()const;
/// set the value of the maximum property
void setMaximum(double);
/// get the value of the minimum property
double minimum(void)const;
double minimum()const;
/// set the value of the minimum property
void setMinimum(double);
/// get the value of the minimum property
int historySize(void)const;
int historySize()const;
/// set the value of the minimum property
void setHistorySize(int);
/// set the unit by a string (can be used in the *.ui file)
void setUnitText(const QString&);
/// get the unit as a string (can be used in the *.ui file)
QString getUnitText(void);
QString getUnitText();
/// get the value of the precision property
int getPrecision(void) const;
int getPrecision() const;
/// set the value of the precision property (can be used in the *.ui file)
void setPrecision(const int);
/// get the value of the format property: "f" (fixed), "e" (scientific), "g" (general)
QString getFormat(void) const;
QString getFormat() const;
/// set the value of the format property (can be used in the *.ui file)
void setFormat(const QString&);
/// set the number portion selected (use after setValue())
void selectNumber(void);
void selectNumber();
/// input validation
void fixup(QString& input) const;
/// input validation
@@ -159,11 +159,11 @@ public:
/// push a new value to the history, if no string given the actual text of the input field is used.
void pushToHistory(const QString &valueq = QString());
/// get the history of the field, newest first
std::vector<QString> getHistory(void);
std::vector<QString> getHistory();
/// push a new value to the history, if no string given the actual text of the input field is used.
void pushToSavedValues(const QString &valueq = QString());
/// get the history of the field, newest first
std::vector<QString> getSavedValues(void);
std::vector<QString> getSavedValues();
//@}
void bind(const App::ObjectIdentifier &_path);
+2 -2
View File
@@ -113,14 +113,14 @@ public:
};
}
Translator* Translator::instance(void)
Translator* Translator::instance()
{
if (!_pcSingleton)
_pcSingleton = new Translator;
return _pcSingleton;
}
void Translator::destruct (void)
void Translator::destruct ()
{
if (_pcSingleton)
delete _pcSingleton;
+2 -2
View File
@@ -46,7 +46,7 @@ int LinkViewPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
// returns a string which represent the object e.g. when printed in python
std::string LinkViewPy::representation(void) const
std::string LinkViewPy::representation() const
{
return "<Link view>";
}
@@ -337,7 +337,7 @@ int LinkViewPy::setCustomAttributes(const char*, PyObject*)
return 0;
}
Py::Object LinkViewPy::getRootNode(void) const
Py::Object LinkViewPy::getRootNode() const
{
try {
SoNode* node = getLinkViewPtr()->getLinkRoot();
+1 -1
View File
@@ -183,7 +183,7 @@ bool MDIView::onHasMsg(const char* pMsg) const
return false;
}
bool MDIView::canClose(void)
bool MDIView::canClose()
{
if (getAppDocument() && getAppDocument()->testStatus(App::Document::TempDoc))
return true;
+1 -1
View File
@@ -78,7 +78,7 @@ public:
/// Message handler test
virtual bool onHasMsg(const char* pMsg) const;
/// overwrite when checking on close state
virtual bool canClose(void);
virtual bool canClose();
/// delete itself
virtual void deleteSelf();
virtual PyObject *getPyObject();
+2 -2
View File
@@ -97,7 +97,7 @@ void MacroManager::open(MacroType eType, const char *sName)
Base::Console().Log("CmdM: Open macro: %s\n", sName);
}
void MacroManager::commit(void)
void MacroManager::commit()
{
QFile file(this->macroName);
if (file.open(QFile::WriteOnly))
@@ -155,7 +155,7 @@ void MacroManager::commit(void)
}
}
void MacroManager::cancel(void)
void MacroManager::cancel()
{
Base::Console().Log("Cancel macro: %s\n",(const char*)this->macroName.toUtf8());
+3 -3
View File
@@ -73,11 +73,11 @@ public:
*/
void open(MacroType eType,const char *sName);
/// close (and save) the recording session
void commit(void);
void commit();
/// cancels the recording session
void cancel(void);
void cancel();
/// indicates if a macro recording is in progress
bool isOpen(void) const {return openMacro;}
bool isOpen() const {return openMacro;}
/// insert a new line in the macro
void addLine(LineType Type,const char* sLine,bool pending=false);
/** Set the active module
+5 -4
View File
@@ -1142,7 +1142,7 @@ QList<QWidget*> MainWindow::windows(QMdiArea::WindowOrder order) const
return mdis;
}
MDIView* MainWindow::activeWindow(void) const
MDIView* MainWindow::activeWindow() const
{
// each activated window notifies this main window when it is activated
return d->activeView;
@@ -1450,7 +1450,7 @@ void MainWindow::saveWindowSettings()
ToolBarManager::getInstance()->saveState();
}
void MainWindow::startSplasher(void)
void MainWindow::startSplasher()
{
// startup splasher
// when running in verbose mode no splasher
@@ -1468,7 +1468,7 @@ void MainWindow::startSplasher(void)
}
}
void MainWindow::stopSplasher(void)
void MainWindow::stopSplasher()
{
if (d->splashscreen) {
d->splashscreen->finish(this);
@@ -1542,7 +1542,8 @@ QPixmap MainWindow::splashImage() const
QString title = qApp->applicationName();
QString major = QString::fromLatin1(App::Application::Config()["BuildVersionMajor"].c_str());
QString minor = QString::fromLatin1(App::Application::Config()["BuildVersionMinor"].c_str());
QString version = QString::fromLatin1("%1.%2").arg(major, minor);
QString point = QString::fromLatin1(App::Application::Config()["BuildVersionPoint"].c_str());
QString version = QString::fromLatin1("%1.%2.%3").arg(major, minor, point);
QString position, fontFamily;
std::map<std::string,std::string>::const_iterator te = App::Application::Config().find("SplashInfoExeName");
+3 -3
View File
@@ -136,9 +136,9 @@ public:
/** Gets the one and only instance. */
static MainWindow* getInstance();
/** Starts the splasher at startup. */
void startSplasher(void);
void startSplasher();
/** Stops the splasher after startup. */
void stopSplasher(void);
void stopSplasher();
/* The image of the About dialog, it might be empty. */
QPixmap aboutImage() const;
/* The image of the splash screen of the application. */
@@ -355,7 +355,7 @@ public:
void SendLog(const std::string& msg, Base::LogStyle level) override;
/// name of the observer
const char *Name(void) override {return "StatusBar";}
const char *Name() override {return "StatusBar";}
friend class MainWindow;
private:
+1 -1
View File
@@ -136,7 +136,7 @@ MergeDocuments::~MergeDocuments()
connectImport.disconnect();
}
unsigned int MergeDocuments::getMemSize (void) const
unsigned int MergeDocuments::getMemSize () const
{
return 0;
}
+1 -1
View File
@@ -41,7 +41,7 @@ class GuiExport MergeDocuments : public Base::Persistence
public:
MergeDocuments(App::Document* doc);
~MergeDocuments();
unsigned int getMemSize (void) const;
unsigned int getMemSize () const;
std::vector<App::DocumentObject*> importObjects(std::istream&);
void importObject(const std::vector<App::DocumentObject*>& o, Base::XMLReader & r);
void exportObject(const std::vector<App::DocumentObject*>& o, Base::Writer & w);
+1 -1
View File
@@ -58,7 +58,7 @@ public:
enum { Continue=0, Restart=1, Finish=2, Cancel=3, Ignore=4 };
AbstractMouseSelection();
virtual ~AbstractMouseSelection(void) {}
virtual ~AbstractMouseSelection() {}
/// implement this in derived classes
virtual void initialize() = 0;
/// implement this in derived classes
+1 -1
View File
@@ -414,7 +414,7 @@ StdCmdDownloadOnlineHelp::~StdCmdDownloadOnlineHelp()
delete wget;
}
Action * StdCmdDownloadOnlineHelp::createAction(void)
Action * StdCmdDownloadOnlineHelp::createAction()
{
Action *pcAction;
+3 -3
View File
@@ -138,11 +138,11 @@ public:
void clicked(int id);
void open();
bool isAllowedAlterDocument(void) const
bool isAllowedAlterDocument() const
{ return true; }
bool isAllowedAlterView(void) const
bool isAllowedAlterView() const
{ return true; }
bool isAllowedAlterSelection(void) const
bool isAllowedAlterSelection() const
{ return true; }
QDialogButtonBox::StandardButtons getStandardButtons() const;
+2 -2
View File
@@ -148,7 +148,7 @@ void PreferenceUiForm::changeEvent(QEvent *e)
}
template <typename PW>
void PreferenceUiForm::loadPrefWidgets(void)
void PreferenceUiForm::loadPrefWidgets()
{
QList<PW> pw = form->findChildren<PW>();
for (typename QList<PW>::iterator it = pw.begin(); it != pw.end(); ++it)
@@ -156,7 +156,7 @@ void PreferenceUiForm::loadPrefWidgets(void)
}
template <typename PW>
void PreferenceUiForm::savePrefWidgets(void)
void PreferenceUiForm::savePrefWidgets()
{
QList<PW> pw = form->findChildren<PW>();
for (typename QList<PW>::iterator it = pw.begin(); it != pw.end(); ++it)
+10 -11
View File
@@ -190,8 +190,8 @@ PyObject* InteractiveInterpreter::compile(const char* source) const
PyObject* eval = PyObject_CallObject(func,args); // must decref later
#endif
Py_DECREF(args);
Py_DECREF(func);
Py_XDECREF(args);
Py_XDECREF(func);
if (eval){
return eval;
@@ -356,11 +356,10 @@ void InteractiveInterpreter::runCode(PyCodeObject* code) const
*/
bool InteractiveInterpreter::push(const char* line)
{
d->buffer.append(QString::fromLatin1(line));
d->buffer.append(QString::fromUtf8(line));
QString source = d->buffer.join(QLatin1String("\n"));
try {
// Source is already UTF-8, so we can use toLatin1()
bool more = runSource(source.toLatin1());
bool more = runSource(source.toUtf8());
if (!more)
d->buffer.clear();
return more;
@@ -378,7 +377,7 @@ bool InteractiveInterpreter::push(const char* line)
return false;
}
bool InteractiveInterpreter::hasPendingInput( void ) const
bool InteractiveInterpreter::hasPendingInput( ) const
{
return (!d->buffer.isEmpty());
}
@@ -1083,7 +1082,7 @@ void PythonConsole::insertFromMimeData (const QMimeData * source)
}
}
QTextCursor PythonConsole::inputBegin(void) const
QTextCursor PythonConsole::inputBegin() const
{
// construct cursor at begin of input line ...
QTextCursor inputLineBegin(this->textCursor());
@@ -1362,7 +1361,7 @@ void PythonConsole::onCopyCommand()
d->type = PythonConsoleP::Normal;
}
QString PythonConsole::readline( void )
QString PythonConsole::readline( )
{
QEventLoop loop;
// output is set to the current prompt which we need to extract
@@ -1575,7 +1574,7 @@ const QStringList& ConsoleHistory::values() const
/**
* restart resets the history access to the latest item.
*/
void ConsoleHistory::restart( void )
void ConsoleHistory::restart( )
{
_it = _history.end();
}
@@ -1585,7 +1584,7 @@ void ConsoleHistory::restart( void )
* Note: with simply remembering a start index, it does not work to nest scratch regions.
* However, just replace the index keeping by a stack - in case this is be a concern.
*/
void ConsoleHistory::markScratch( void )
void ConsoleHistory::markScratch( )
{
_scratchBegin = _history.length();
}
@@ -1593,7 +1592,7 @@ void ConsoleHistory::markScratch( void )
/**
* doScratch removes the tail of the history list, starting from the index marked lately.
*/
void ConsoleHistory::doScratch( void )
void ConsoleHistory::doScratch( )
{
if (_scratchBegin < _history.length())
{
+6 -6
View File
@@ -44,7 +44,7 @@ public:
bool push(const char*);
int compileCommand(const char*) const;
bool hasPendingInput( void ) const;
bool hasPendingInput( ) const;
void setBuffer(const QStringList&);
QStringList getBuffer() const;
void clearBuffer();
@@ -78,8 +78,8 @@ public:
void append(const QString &inputLine);
const QStringList& values() const;
void restart();
void markScratch( void );
void doScratch( void );
void markScratch( );
void doScratch( );
private:
QStringList _history;
@@ -110,7 +110,7 @@ public:
void OnChange( Base::Subject<const char*> &rCaller,const char* rcReason );
void printStatement( const QString& cmd );
QString readline( void );
QString readline( );
public Q_SLOTS:
void onSaveHistoryAs();
@@ -139,7 +139,7 @@ protected:
bool canInsertFromMimeData ( const QMimeData * source ) const;
QMimeData * createMimeDataFromSelection () const;
void insertFromMimeData ( const QMimeData * source );
QTextCursor inputBegin( void ) const;
QTextCursor inputBegin( ) const;
private:
void runSource(const QString&);
@@ -153,7 +153,7 @@ private:
void saveHistory() const;
Q_SIGNALS:
void pendingSource( void );
void pendingSource( );
private:
struct PythonConsoleP* d;
+5 -5
View File
@@ -45,7 +45,7 @@ private:
PythonConsole* pyConsole;
public:
static void init_type(void); // announce properties and methods
static void init_type(); // announce properties and methods
PythonStdout(PythonConsole *pc);
~PythonStdout();
@@ -71,7 +71,7 @@ private:
PythonConsole* pyConsole;
public:
static void init_type(void); // announce properties and methods
static void init_type(); // announce properties and methods
PythonStderr(PythonConsole *pc);
~PythonStderr();
@@ -94,7 +94,7 @@ public:
class OutputStdout : public Py::PythonExtension<OutputStdout>
{
public:
static void init_type(void); // announce properties and methods
static void init_type(); // announce properties and methods
OutputStdout();
~OutputStdout();
@@ -117,7 +117,7 @@ public:
class OutputStderr : public Py::PythonExtension<OutputStderr>
{
public:
static void init_type(void); // announce properties and methods
static void init_type(); // announce properties and methods
OutputStderr();
~OutputStderr();
@@ -139,7 +139,7 @@ private:
PythonConsole* pyConsole;
public:
static void init_type(void); // announce properties and methods
static void init_type(); // announce properties and methods
PythonStdin(PythonConsole *pc);
~PythonStdin();

Some files were not shown because too many files have changed in this diff Show More