Commit Graph

537 Commits

Author SHA1 Message Date
Joao Matos
154e00f9a3 Tools: Improve identation handling for attribute docstring comments. 2025-03-20 11:07:27 +01:00
tritao
b71d5fe684 Base: Remove XML binding files. 2025-03-19 20:04:19 -05:00
tritao
09918fac13 Tools: Re-enable XML comparison mode Python API bindings generator. 2025-03-19 08:32:06 -05:00
tritao
cdab9c7837 CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
hasecilu
00d5866be1 Measure: add translation source file for uploading to Crowdin 2025-03-13 10:21:10 -06:00
Chris Hennes
3ce193ddb8 Merge pull request #19921 from mosfet80/QT_CLEAN
REMOVE old QT<= 5.14 code
2025-03-11 20:54:59 +00:00
Andrea
078e315d8f Remove unnecessary check (duplicated)
before including the library, it is uselessly checked if the variable __QtAll__ and __InventorAll__ have been defined. The same check is performed again once the library is included
2025-03-10 21:53:00 +01:00
Chris Hennes
3197f9664f Merge pull request #20036 from hyarion/fix/remove-pyexport-warnings
Suppress erroneous warnings for GCC in python template
2025-03-07 14:41:22 +00:00
Benjamin Nauck
bef00d5a9c Tools: Suppress erroneous warnings for GCC 2025-03-06 21:47:50 +01:00
Chris Hennes
c11dbedde1 Merge pull request #19953 from hyarion/fix/remove-pyexport-warnings
Python bindings: Use designated initializers and remove zero-initialized fields
2025-03-06 14:38:45 +00:00
Andrea
cca14cf164 Remove old qt code
new round of removal following the report of @benj5378  .

.
2025-03-05 09:46:35 +01:00
tritao
6792d6bfd7 Remove Python-generated bindings comparison against XML-generated version. 2025-03-03 10:22:41 -06:00
Benjamin Nauck
d017242584 Use designated initializers and remove zero-initialized fields 2025-03-03 11:02:19 +01:00
Joao Matos
2e879c8982 Tools: Update binding generator. 2025-03-01 16:23:54 +00:00
Benjamin Bræstrup Sayoc
ee1c73cd04 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Chris Hennes
dce7627c33 Merge pull request #19516 from tritao/tools-python-bindings-gen
Tools: Introduce a new Python-based C++ bindings generator
2025-02-24 16:39:24 +00:00
Joao Matos
15076cb504 Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
tritao
b97e695359 Tools: Introduce a Python-based API bindings template generator.
This extends the existing XML-based template generator to allow an
additional kind of Python-based input.

The Python code is read as source code to an AST to a typed model
equivalent to the existing XML model, and processed by the existing
code templates into compatible code.

This provides a few benefits, namely readability is much increased,
but more importantly, it allows associating the APIs with Python's new
typing information, which will allow to provide accurate type hinting
without additional downstream processing in the future.

Right now this is just a proof-of-concept but if the approach is
well received, then a more complete implementation can be done with
further conversion of existing binding files.

Here is an example of how it looks, though I still think the metadata
is too verbose and can be made to look nicer with some further work.

```python
from ..Base.Metadata import metadata
from ..Base.Persistence import PersistencePy
from typing import Any, Optional, List

@metadata(
    Father="PersistencePy",
    Name="DocumentPy",
    Twin="Document",
    TwinPointer="Document",
    Include="Gui/Document.h",
    Namespace="Gui",
    FatherInclude="Base/PersistencePy.h",
    FatherNamespace="Base"
)
class DocumentPy(PersistencePy):
    """
    This is a Document class.

    Author: Werner Mayer (wmayer@users.sourceforge.net)
    Licence: LGPL
    """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        """
        Constructor for DocumentPy.
        """
        super(DocumentPy, self).__init__(*args, **kwargs)
        pass

    def show(self, objName: str) -> None:
        """
        show(objName) -> None

        Show an object.

        Parameters:
            objName (str): Name of the `Gui.ViewProvider` to show.
        """
        pass
```
2025-02-21 16:32:13 +00:00
tritao
2a3f8d037e Tools: Add documentation for the Python-based bindings system. 2025-02-21 13:18:36 +00:00
Joao Matos
aace8f7bee CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
Andrea
146d8a356b change MIN_boost_version
ubuntu version 20.04 is no longer supported.
The minimum boost version used for freecad is now 1.74 (ubuntu 22.04) https://launchpad.net/ubuntu/jammy/+package/libboost-system-dev
2025-02-15 13:33:32 -06:00
Chris Hennes
b18150e048 Merge pull request #19479 from tritao/base-cleanup-xml-generation
Base: Minor cleanups to base XML bindings generation
2025-02-10 09:34:50 -06:00
tritao
21d3cc0e78 Tools: Move bindings generator into generator folder. 2025-02-08 16:11:01 +00:00
tritao
a0578fa302 Tools: Add verbose mode to Python bindings generator. 2025-02-08 13:14:22 +00:00
tritao
5468f91eb1 Tools: Refactor existing XML generator for extra readability. 2025-02-08 13:14:22 +00:00
mosfet80
e8d466ea98 Delete src/Tools/RegExp directory
remove unnecessary tool
2025-02-07 20:29:34 -06:00
pre-commit-ci[bot]
17e17cccb5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-03 22:51:14 +00:00
tritao
551c2e48fb Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Max Wilfinger
e83024ee02 replaced .xpm with .svg 2024-11-29 12:09:42 -05:00
hasecilu
145f95202a Gui: Add suffix to programatically generated preference page's spinboxes
Units contain a leading space.

Command to generate the C++ code on `src` dir:
$ python3 -m cogapp -r Gui/PreferencePages/DlgSettingsAdvanced.{h,cpp}
2024-11-25 17:52:51 +01:00
mosfet80
8c68631015 Delete src/Tools/generateTemplates/templateModuleGui.py
the file is never used
2024-11-22 11:34:08 -05:00
Kris Slyka
27115e98e4 [tools] fcinfo: fix syntax warnings and improve output for git diffs (#16312)
* Fix syntax warnings about invalid escape sequences

Backspaces in regular expressions were not escaped properly leading to warnings on every invocation of the program.

* Improve formatting of fcinfo output

* Printing of part BREP file properties (hash and size) has been made optional since these values often change without explicit user action making git diffs almost unreadable by hiding actual changes behind a flood of changed hashes because a base feature further up the history was changed. There is a new option (-p) to re-enable the printing of these file properties.

* Unformatted float outputs have been replaced with proper formatting using f-strings which round the values to a sensible number of places.

* Colors are printed in their native 0-255 range. Printing them as float brings no benefit here.

* Most string concatenation for output has been replaced with f-strings

* Fix printing of color properties
2024-11-18 17:52:16 +01:00
bgbsww
94aad208bc Make python Regex Strings raw to avoid py3.12 SyntaxError 2024-09-30 17:42:49 +02:00
Christoph Moench-Tegeder
c74378be11 replace exec_program() with execute_process()
Recent CMake (>= 3.28) do not allow exec_program() any more by default,
but prefer execute_process(), which takes slightly different flags.
According to the documentation, exec_program() has been deprecated
since CMake 3.0 (which was released in 2014, so it should be common
enough that I don't feel like making allowances for any really old CMake).

References: https://cmake.org/cmake/help/latest/policy/CMP0153.html
2024-09-23 17:41:19 +02:00
pre-commit-ci[bot]
09386be6a9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-08-25 07:29:42 +00:00
David Carter
43337a9045 Material: Update translation paths
Correct issue where the translations were being generated from the
wrong source. All translatable files were moved to the MatGui library.
2024-07-15 20:59:10 -05:00
Chris Hennes
20ffb68961 Tools: Support Qt6 in updatecrowdin.py 2024-07-15 17:53:44 +02:00
Yorik van Havre
95663f6434 Tools: fixed deprecated regex syntax in crowdin tool 2024-07-11 15:05:46 +02:00
Yorik van Havre
29d201149d Translations: Fixed BIM translations 2024-07-10 11:14:02 +02:00
Ben Hagen
bf2355fecc macOS: Add symlink to /Applications and use bigger icons 2024-06-16 22:17:44 -05:00
obelisk79
178bac70b7 [UI] Logo Update (#14284)
* Updating instances of FreeCAD's old logo to reflect the new Logo

* updating additional instances of the Logo

* updating additional instances of the Logo

* Update logo for windows installer

* Update logo reference to /src/Gui/Icons/freecad.svg
2024-05-27 15:33:55 -04:00
Chris Hennes
73ae4102e6 Update translations
Arch->BIM is a WIP
2024-05-25 19:11:51 -05:00
Johannes Wüller
33e91421b5 Fix backwards-compatible Qt6 warnings 2024-05-13 11:39:24 -05:00
Chris Hennes
a5d8aaa21c Update translations
Also removes Web from translation scripts.
2024-05-06 18:17:53 +02:00
sliptonic
3d517ff2cf Merge pull request #13134 from chennes/qtQuickTechDemo
Start: Recreate start as a QtWidgets-based app
2024-04-22 11:49:02 -05:00
Chris Mayo
d7e0182e6a Tools: Resolve SyntaxWarning in generateTools.py
src/Tools/generateBase/generateTools.py:144: SyntaxWarning: invalid escape sequence '\+'
  rbe = re.compile("\+")
2024-04-22 11:07:28 -05:00
Chris Hennes
43849667b2 Remove WebKit SVG renderer. 2024-04-21 22:27:50 -05:00
Chris Hennes
0f6ef9571f Precommit: formatting fixes after Black update 2024-04-04 23:24:37 -05:00
Chris Hennes
8f82109248 Fix Material resource location 2024-04-02 22:52:52 -05:00
Dov Grobgeld
8707578ce1 Fix regexp string quoting 2024-03-31 17:28:47 +02:00