Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pyMKcam
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
pyMKcam
Commits
301f4e4d
Commit
301f4e4d
authored
Jun 22, 2012
by
Lars Kruse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide the toolpath settings tab if no toolpath is selected; add a frame label
parent
1b4da9bf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
35 deletions
+57
-35
ToolpathProcessors.py
pycam/Plugins/ToolpathProcessors.py
+11
-4
toolpath_processors.ui
share/ui/toolpath_processors.ui
+46
-31
No files found.
pycam/Plugins/ToolpathProcessors.py
View file @
301f4e4d
...
...
@@ -31,7 +31,7 @@ _log = pycam.Utils.log.get_logger()
class
ToolpathProcessors
(
pycam
.
Plugins
.
ListPluginBase
):
DEPENDS
=
[
"ParameterGroupManager"
]
DEPENDS
=
[
"
Toolpaths"
,
"
ParameterGroupManager"
]
CATEGORIES
=
[
"Toolpath"
]
UI_FILE
=
"toolpath_processors.ui"
...
...
@@ -109,9 +109,8 @@ class ToolpathProcessors(pycam.Plugins.ListPluginBase):
general_widget
.
add_widget
,
general_widget
.
clear_widgets
)
self
.
core
.
register_ui
(
"gcode_preferences"
,
"General"
,
general_widget
.
get_widget
())
complete_box
=
self
.
gui
.
get_object
(
"PreferencesBox"
)
self
.
core
.
register_ui
(
"toolpath_handling"
,
"Settings"
,
complete_box
)
self
.
_frame
=
self
.
gui
.
get_object
(
"SettingsFrame"
)
self
.
core
.
register_ui
(
"toolpath_handling"
,
"Settings"
,
self
.
_frame
)
self
.
gui
.
get_object
(
"PreferencesButton"
)
.
connect
(
"clicked"
,
self
.
_toggle_window
,
True
)
self
.
gui
.
get_object
(
"CloseButton"
)
.
connect
(
"clicked"
,
...
...
@@ -136,9 +135,11 @@ class ToolpathProcessors(pycam.Plugins.ListPluginBase):
get_current_set_func
=
self
.
get_selected
)
self
.
_event_handlers
=
(
(
"toolpath-processor-list-changed"
,
self
.
_update_processors
),
(
"toolpath-selection-changed"
,
self
.
_update_visibility
),
)
self
.
register_event_handlers
(
self
.
_event_handlers
)
self
.
_update_processors
()
self
.
_update_visibility
()
return
True
def
teardown
(
self
):
...
...
@@ -157,6 +158,12 @@ class ToolpathProcessors(pycam.Plugins.ListPluginBase):
item
=
item
[
"name"
]
self
.
_proc_selector
.
set_value
(
item
)
def
_update_visibility
(
self
):
if
self
.
core
.
get
(
"toolpaths"
)
.
get_selected
():
self
.
_frame
.
show
()
else
:
self
.
_frame
.
hide
()
def
_update_processors
(
self
):
selected
=
self
.
get_selected
()
processors
=
self
.
core
.
get
(
"get_parameter_sets"
)(
"toolpath_processor"
)
.
values
()
...
...
share/ui/toolpath_processors.ui
View file @
301f4e4d
...
...
@@ -52,10 +52,16 @@
<action-widget
response=
"0"
>
CloseButton
</action-widget>
</action-widgets>
</object>
<object
class=
"GtkAlignment"
id=
"PreferencesBox"
>
<object
class=
"GtkFrame"
id=
"SettingsFrame"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<object
class=
"GtkAlignment"
id=
"Align1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"xscale"
>
0
</property>
<property
name=
"yscale"
>
0
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"GtkVBox"
id=
"VBox"
>
<property
name=
"visible"
>
True
</property>
...
...
@@ -103,4 +109,13 @@
</object>
</child>
</object>
</child>
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"label1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"label"
translatable=
"yes"
>
<
b
>
Settings
<
/b
>
</property>
<property
name=
"use_markup"
>
True
</property>
</object>
</child>
</object>
</interface>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment