Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
690e37bd
Commit
690e37bd
authored
Mar 25, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some documentation markers to add_extra_controls
parent
f639bce1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
gui.py
printrun/gui.py
+10
-0
No files found.
printrun/gui.py
View file @
690e37bd
...
@@ -67,6 +67,9 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
...
@@ -67,6 +67,9 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
standalone_mode
=
extra_buttons
is
not
None
standalone_mode
=
extra_buttons
is
not
None
base_line
=
1
if
standalone_mode
else
2
base_line
=
1
if
standalone_mode
else
2
## Hotend & bed temperatures
# Hotend temp
self
.
Add
(
wx
.
StaticText
(
parentpanel
,
-
1
,
_
(
"Heat:"
)),
pos
=
(
base_line
+
0
,
0
),
span
=
(
1
,
2
),
flag
=
wx
.
ALIGN_CENTER_VERTICAL
|
wx
.
ALIGN_RIGHT
)
self
.
Add
(
wx
.
StaticText
(
parentpanel
,
-
1
,
_
(
"Heat:"
)),
pos
=
(
base_line
+
0
,
0
),
span
=
(
1
,
2
),
flag
=
wx
.
ALIGN_CENTER_VERTICAL
|
wx
.
ALIGN_RIGHT
)
htemp_choices
=
[
root
.
temps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
root
.
temps
.
keys
(),
key
=
lambda
x
:
root
.
temps
[
x
])]
htemp_choices
=
[
root
.
temps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
root
.
temps
.
keys
(),
key
=
lambda
x
:
root
.
temps
[
x
])]
...
@@ -86,6 +89,7 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
...
@@ -86,6 +89,7 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
root
.
printerControls
.
append
(
root
.
settbtn
)
root
.
printerControls
.
append
(
root
.
settbtn
)
self
.
Add
(
root
.
settbtn
,
pos
=
(
base_line
+
0
,
4
),
span
=
(
1
,
1
))
self
.
Add
(
root
.
settbtn
,
pos
=
(
base_line
+
0
,
4
),
span
=
(
1
,
1
))
# Bed temp
self
.
Add
(
wx
.
StaticText
(
parentpanel
,
-
1
,
_
(
"Bed:"
)),
pos
=
(
base_line
+
1
,
0
),
span
=
(
1
,
2
),
flag
=
wx
.
ALIGN_CENTER_VERTICAL
|
wx
.
ALIGN_RIGHT
)
self
.
Add
(
wx
.
StaticText
(
parentpanel
,
-
1
,
_
(
"Bed:"
)),
pos
=
(
base_line
+
1
,
0
),
span
=
(
1
,
2
),
flag
=
wx
.
ALIGN_CENTER_VERTICAL
|
wx
.
ALIGN_RIGHT
)
btemp_choices
=
[
root
.
bedtemps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
root
.
bedtemps
.
keys
(),
key
=
lambda
x
:
root
.
temps
[
x
])]
btemp_choices
=
[
root
.
bedtemps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
root
.
bedtemps
.
keys
(),
key
=
lambda
x
:
root
.
temps
[
x
])]
...
@@ -126,6 +130,8 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
...
@@ -126,6 +130,8 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
root
.
tempdisp
=
wx
.
StaticText
(
parentpanel
,
-
1
,
""
)
root
.
tempdisp
=
wx
.
StaticText
(
parentpanel
,
-
1
,
""
)
## Extrusion controls
if
not
extra_buttons
:
if
not
extra_buttons
:
ebuttonspanel
=
root
.
newPanel
(
parentpanel
)
ebuttonspanel
=
root
.
newPanel
(
parentpanel
)
ebuttonssizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
ebuttonssizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
...
@@ -181,6 +187,8 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
...
@@ -181,6 +187,8 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
esettingspanel
.
SetSizer
(
esettingssizer
)
esettingspanel
.
SetSizer
(
esettingssizer
)
self
.
Add
(
esettingspanel
,
pos
=
(
base_line
+
3
,
0
),
span
=
(
1
,
5
))
self
.
Add
(
esettingspanel
,
pos
=
(
base_line
+
3
,
0
),
span
=
(
1
,
5
))
## Temperature gauges
gauges_base_line
=
base_line
+
8
if
standalone_mode
else
base_line
+
5
gauges_base_line
=
base_line
+
8
if
standalone_mode
else
base_line
+
5
if
root
.
display_gauges
:
if
root
.
display_gauges
:
root
.
hottgauge
=
TempGauge
(
parentpanel
,
size
=
(
-
1
,
24
),
title
=
_
(
"Heater:"
),
maxval
=
300
)
root
.
hottgauge
=
TempGauge
(
parentpanel
,
size
=
(
-
1
,
24
),
title
=
_
(
"Heater:"
),
maxval
=
300
)
...
@@ -207,6 +215,8 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
...
@@ -207,6 +215,8 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None):
else
:
else
:
self
.
Add
(
root
.
tempdisp
,
pos
=
(
gauges_base_line
+
0
,
0
),
span
=
(
1
,
6
))
self
.
Add
(
root
.
tempdisp
,
pos
=
(
gauges_base_line
+
0
,
0
),
span
=
(
1
,
6
))
## Temperature graph
if
root
.
display_graph
:
if
root
.
display_graph
:
root
.
graph
=
Graph
(
parentpanel
,
wx
.
ID_ANY
,
root
)
root
.
graph
=
Graph
(
parentpanel
,
wx
.
ID_ANY
,
root
)
if
standalone_mode
:
if
standalone_mode
:
...
...
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