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
Hide 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,55 +52,70 @@
<action-widget
response=
"0"
>
CloseButton
</action-widget>
</action-widgets>
</object>
<object
class=
"Gtk
Alignment"
id=
"PreferencesBox
"
>
<object
class=
"Gtk
Frame"
id=
"SettingsFrame
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"
xscale
"
>
0
</property>
<property
name=
"
yscale"
>
0
</property>
<property
name=
"
label_xalign
"
>
0
</property>
<property
name=
"
shadow_type"
>
none
</property>
<child>
<object
class=
"Gtk
VBox"
id=
"VBox
"
>
<object
class=
"Gtk
Alignment"
id=
"Align1
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
3
</property>
<property
name=
"xscale"
>
0
</property>
<property
name=
"yscale"
>
0
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"Gtk
Alignment"
id=
"SelectorsContainer
"
>
<object
class=
"Gtk
VBox"
id=
"VBox
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"
xscale"
>
0
</property>
<property
name=
"
yscale"
>
0
</property>
<property
name=
"
orientation"
>
vertical
</property>
<property
name=
"
spacing"
>
3
</property>
<child>
<placeholder/>
<object
class=
"GtkAlignment"
id=
"SelectorsContainer"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"xscale"
>
0
</property>
<property
name=
"yscale"
>
0
</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkHButtonBox"
id=
"hbuttonbox1"
>
<property
name=
"visible"
>
True
</property>
<child>
<object
class=
"GtkButton"
id=
"PreferencesButton"
>
<property
name=
"label"
>
gtk-preferences
</property>
<object
class=
"GtkHButtonBox"
id=
"hbuttonbox1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
<child>
<object
class=
"GtkButton"
id=
"PreferencesButton"
>
<property
name=
"label"
>
gtk-preferences
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
0
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
1
</property>
</packing>
</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