Skip to content

Commit 470c677

Browse files
committed
Initial GUI API
1 parent a2c1482 commit 470c677

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+8020
-1176
lines changed

.vscode/bookmarks.json

+15-25
Original file line numberDiff line numberDiff line change
@@ -4,89 +4,79 @@
44
"path": "fpo.py",
55
"bookmarks": [
66
{
7-
"line": 19,
8-
"column": 0,
9-
"label": "Tags"
10-
},
11-
{
12-
"line": 27,
7+
"line": 292,
138
"column": 0,
149
"label": "Conventions"
1510
},
1611
{
17-
"line": 40,
12+
"line": 305,
1813
"column": 0,
1914
"label": "Imports"
2015
},
2116
{
22-
"line": 117,
17+
"line": 365,
2318
"column": 0,
2419
"label": "Symbol constants"
2520
},
2621
{
27-
"line": 160,
22+
"line": 408,
2823
"column": 0,
2924
"label": "Supported property types"
3025
},
3126
{
32-
"line": 204,
27+
"line": 449,
3328
"column": 0,
3429
"label": "Utility functions"
3530
},
3631
{
37-
"line": 362,
32+
"line": 607,
3833
"column": 0,
3934
"label": "Property"
4035
},
4136
{
42-
"line": 476,
37+
"line": 721,
4338
"column": 0,
4439
"label": "Display Mode"
4540
},
4641
{
47-
"line": 663,
42+
"line": 915,
4843
"column": 0,
4944
"label": "Type Meta"
5045
},
5146
{
52-
"line": 820,
47+
"line": 1072,
5348
"column": 0,
5449
"label": "Preference"
5550
},
5651
{
57-
"line": 934,
52+
"line": 1192,
5853
"column": 0,
5954
"label": "proxy decorator"
6055
},
6156
{
62-
"line": 986,
57+
"line": 1244,
6358
"column": 0,
6459
"label": "view_proxy decorator"
6560
},
6661
{
67-
"line": 1066,
62+
"line": 1324,
6863
"column": 0,
6964
"label": "DataProxy Templates"
7065
},
7166
{
72-
"line": 1388,
67+
"line": 1645,
7368
"column": 0,
7469
"label": "ViewProxy templates"
7570
},
7671
{
77-
"line": 1626,
72+
"line": 1883,
7873
"column": 0,
7974
"label": "Migrations"
8075
},
8176
{
82-
"line": 1755,
77+
"line": 2012,
8378
"column": 0,
8479
"label": "Module init"
85-
},
86-
{
87-
"line": 1829,
88-
"column": 0,
89-
"label": "Global user functions"
9080
}
9181
]
9282
}

.vscode/settings.json

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"editor.rulers": [
3-
80
3+
80, 100, 120
44
],
55
"cSpell.words": [
6+
"cleartext",
7+
"fcui",
68
"freecad",
79
"frenet",
810
"getstate",
@@ -11,11 +13,17 @@
1113
"Muñoz",
1214
"pdbody",
1315
"pivy",
16+
"pixmap",
17+
"Pixmap",
18+
"Preselection",
1419
"proxyfied",
20+
"qobject",
1521
"scriptable",
1622
"setstate",
1723
"tmpl",
1824
"TransformManip",
25+
"typora",
26+
"unpolish",
1927
"unsetup",
2028
"vobject",
2129
"wireframe"
@@ -122,5 +130,16 @@
122130
"bold": false,
123131
"italic": false
124132
}
125-
]
133+
],
134+
"[python]": {
135+
"diffEditor.ignoreTrimWhitespace": false,
136+
"gitlens.codeLens.symbolScopes": [
137+
"!Module"
138+
],
139+
"editor.formatOnType": true,
140+
"editor.defaultFormatter": "charliermarsh.ruff",
141+
"editor.wordBasedSuggestions": "off"
142+
},
143+
"ruff.lineLength": 100,
144+
"ruff.nativeServer": true
126145
}

README.md

+34-9
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,56 @@
1-
# FreeCAD Scripted Objects Modern API
1+
# FreeCAD Scripting Modern APIs
22

33
## Audience
44

5-
This is for developers of FreeCAD extensions commonly known
6-
as Feature Python Objects or more generally Scripted Objects.
5+
This is for developers of FreeCAD extensions like Workbenches and Macros in pure
6+
python.
77

88
This is a python API, it is expected that the readers are python developers with
9-
a little more than basic python coding skills. The API does not use any obscure
10-
language feature but it uses classes, functions, decorators, type hints, etc...
9+
basic python coding skills. The API does not use any obscure language feature but
10+
it uses classes, functions, decorators, type hints, etc...
1111

1212
It is also expected that the readers are FreeCAD users, and have a good understanding
1313
of the basic usage of it.
1414

15-
## Deliverables
15+
## Scripted Object API (Feature Python Object)
16+
17+
This API is an overlay API that helps in definition of Feature Python Objects in
18+
a more declarative an pythonic way.
1619

1720
* `fpo.py `
1821
This is the API implementation
1922
* `examples/`
20-
contains basic usage examples of the api
23+
contains basic usage examples of the fpo api
2124
* `docs/`
2225
contains source and generated documentation
2326

24-
## Documentation
27+
### Documentation
2528

2629
* [docs/documentation.md](docs/documentation.md)
2730
* [docs/documentation.pdf](docs/documentation.pdf)
2831

32+
33+
## Declarative Qt/Gui API
34+
35+
This API provides a simple way to create GUIs for the extensions without the
36+
complexity of raw Qt code or .ui files. Code layout reflect GUI structure making
37+
it readable and easy to maintain. The API covers the most common Widgets, Qt is
38+
a massive library so covering everything is virtually impossible for this project
39+
and largely unnecessary.
40+
41+
* `fcui.py`
42+
This is the GUI API implementation
43+
* `examples/ui/`
44+
contains basic usage examples of the `fcui` api
45+
* `docs/`
46+
contains source and generated documentation
47+
48+
49+
### Documentation
50+
* [docs/ui-documentation.md](docs/ui-documentation.md)
51+
* [docs/ui-documentation.pdf](docs/ui-documentation.pdf)
52+
53+
2954
## Status
3055

31-
This is a working draft as of April 05, 2024
56+
This is a working draft as of Nov 10, 2024

0 commit comments

Comments
 (0)