Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
94ae63e
Implemented a basic working editor, not ready for use yet
jmwright Oct 13, 2025
785a7ff
Implemented more of the core features of the editor
jmwright Oct 14, 2025
fc7c000
Fix two errors showing up in the console
jmwright Oct 15, 2025
b1995cf
Lint fixes
jmwright Oct 15, 2025
e8a2e2a
Implemented the ability to toggle comments
jmwright Oct 17, 2025
26e9951
Trying to get blocks with mixed comments and non-comments to work
jmwright Oct 22, 2025
e7da1df
Merge branch 'master' of github.com:CadQuery/CQ-editor into editor-up…
jmwright Oct 22, 2025
06e0270
Merge branch 'master' of github.com:CadQuery/CQ-editor into editor-up…
jmwright Oct 22, 2025
3688a72
Improved block commenting and un-commenting
jmwright Oct 23, 2025
7a23f78
Fixed fonts and some related version pins
jmwright Oct 23, 2025
ffaf894
Tweaked the clear log and clear console icons
jmwright Oct 23, 2025
037589b
Started adding editor debugger and fixed bug with Editor.set_text
jmwright Oct 23, 2025
74790ec
Fixed bug in set_text and fixed test order errors
jmwright Oct 27, 2025
aee0f73
Omitting __main__.py from test coverage requirements
jmwright Oct 27, 2025
7ae3a54
Improved test coverage and fixed things that came up
jmwright Oct 27, 2025
50892c9
Added editor test file
jmwright Oct 27, 2025
c9c14b0
Re-ordered test files
jmwright Oct 28, 2025
0aab23c
Merged tests back together and removed some waits that were causing p…
jmwright Oct 28, 2025
269c407
Lint fix
jmwright Oct 28, 2025
fc76611
Added more tests and fixed bug with block un-commenting
jmwright Oct 28, 2025
c25b23f
Fixed the font setting method and added the maximum line length indic…
jmwright Oct 28, 2025
6ecbc44
Added breakpoints back to the code editor
jmwright Oct 28, 2025
a40cb3a
Lint fixes
jmwright Oct 28, 2025
8a5d1f4
Fixed a bug with tabbing and tried to increase test coverage a bit
jmwright Oct 29, 2025
7e16db5
Added search feature in code editor
jmwright Oct 29, 2025
982d559
Increasing test coverage
jmwright Oct 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
timid = True
branch = True
source = src
omit =
cq_editor/__main__.py
cq_editor/widgets/pyhighlight.py

[report]
exclude_lines =
Expand Down
8 changes: 4 additions & 4 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ build:
- CQ-editor = cq_editor.__main__:main
requirements:
build:
- python >=3.8
- python >=3.10
- setuptools

run:
- python >=3.9
- python >=3.10
- cadquery=master
- ocp
- logbook
- pyqt=5.*
- pyqtgraph
- spyder >=5.5.6,<6
- qtawesome=1.4.0
- path
- logbook
- requests
- qtconsole >=5.5.1,<5.6.0
- qtconsole >=5.5.1,<5.7.0
test:
imports:
- cq_editor
Expand Down
13 changes: 10 additions & 3 deletions cq_editor/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ def main():

args = parser.parse_args(app.arguments()[1:])

win = MainWindow(filename=args.filename if args.filename else None)
win.show()
sys.exit(app.exec_())
# sys.exit(app.exec_())

try:
win = MainWindow(filename=args.filename if args.filename else None)
win.show()
app.exec_()
except Exception as e:
import traceback

traceback.print_exc()


if __name__ == "__main__":
Expand Down
40 changes: 23 additions & 17 deletions cq_editor/icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
import qtawesome as qta

_icons_specs = {
"new": (("fa.file-o",), {}),
"open": (("fa.folder-open-o",), {}),
"new": (("fa5.file",), {}),
"open": (("fa5.folder-open",), {}),
# borrowed from spider-ide
"autoreload": [
("fa.repeat", "fa.clock-o"),
("fa5s.redo-alt", "fa5.clock"),
{
"options": [
{"scale_factor": 0.75, "offset": (-0.1, -0.1)},
{"scale_factor": 0.5, "offset": (0.25, 0.25)},
]
},
],
"save": (("fa.save",), {}),
"save": (("fa5.save",), {}),
"save_as": (
("fa.save", "fa.pencil"),
("fa5.save", "fa5s.pencil-alt"),
{
"options": [
{
Expand All @@ -39,12 +39,13 @@
]
},
),
"run": (("fa.play",), {}),
"delete": (("fa.trash",), {}),
"run": (("fa5s.play",), {}),
"debug": (("fa5s.bug",), {}),
"delete": (("fa5s.trash",), {}),
"delete-many": (
(
"fa.trash",
"fa.trash",
"fa5s.trash",
"fa5s.trash",
),
{
"options": [
Expand All @@ -53,25 +54,30 @@
]
},
),
"help": (("fa.life-ring",), {}),
"about": (("fa.info",), {}),
"preferences": (("fa.cogs",), {}),
"help": (("fa5s.life-ring",), {}),
"about": (("fa5s.info",), {}),
"preferences": (("fa5s.cogs",), {}),
"inspect": (
("fa.cubes", "fa.search"),
("fa5s.cubes", "fa5s.search"),
{"options": [{"scale_factor": 0.8, "offset": (0, 0), "color": "gray"}, {}]},
),
"screenshot": (("fa.camera",), {}),
"screenshot": (("fa5s.camera",), {}),
"screenshot-save": (
("fa.save", "fa.camera"),
("fa5.save", "fa5s.camera"),
{
"options": [
{"scale_factor": 0.8},
{"scale_factor": 0.8, "offset": (0.2, 0.2)},
]
},
),
"toggle-comment": (("fa.hashtag",), {}),
"search": (("fa.search",), {}),
"toggle-comment": (("fa5s.hashtag",), {}),
"search": (("fa5s.search",), {}),
"arrow-step-over": (("fa5s.step-forward",), {}),
"arrow-step-in": (("fa5s.angle-down",), {}),
"arrow-continue": (("fa5s.arrow-right",), {}),
"clear": (("fa5s.eraser",), {}),
"clear-2": (("fa5s.broom",), {}),
}


Expand Down
10 changes: 10 additions & 0 deletions cq_editor/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,16 @@ def prepare_menubar(self):
)
menu_edit.addAction(self.autocomplete_action)

# Add the menu action to open the code search controls
self.search_action = QAction(
icon("search"),
"Search",
self,
shortcut="ctrl+F",
triggered=self.components["editor"].search_widget.show_search,
)
menu_edit.addAction(self.search_action)

menu_edit.addAction(
QAction(
icon("preferences"),
Expand Down
2 changes: 1 addition & 1 deletion cq_editor/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def add(self, name, component):
for child in component.preferences.children():
# Fill the editor color scheme drop down list
if child.name() == "Color scheme":
child.setLimits(["Spyder", "Monokai", "Zenburn"])
child.setLimits(["Light", "Dark"])
# Fill the camera projection type
elif child.name() == "Projection Type":
child.setLimits(
Expand Down
Loading