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
38d63f7d
Commit
38d63f7d
authored
May 31, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First attempt at a tabbed GUI
parent
7064f906
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
229 additions
and
142 deletions
+229
-142
gui.py
printrun/gui.py
+221
-138
pronterface.py
pronterface.py
+8
-4
No files found.
printrun/gui.py
View file @
38d63f7d
This diff is collapsed.
Click to expand it.
pronterface.py
View file @
38d63f7d
...
@@ -191,6 +191,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -191,6 +191,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self
.
settings
.
_add
(
SpinSetting
(
"preview_grid_step1"
,
10.
,
0
,
200
,
_
(
"Fine grid spacing"
),
_
(
"Fine Grid Spacing (default: 10)"
)))
self
.
settings
.
_add
(
SpinSetting
(
"preview_grid_step1"
,
10.
,
0
,
200
,
_
(
"Fine grid spacing"
),
_
(
"Fine Grid Spacing (default: 10)"
)))
self
.
settings
.
_add
(
SpinSetting
(
"preview_grid_step2"
,
50.
,
0
,
200
,
_
(
"Coarse grid spacing"
),
_
(
"Coarse Grid Spacing (default: 50)"
)))
self
.
settings
.
_add
(
SpinSetting
(
"preview_grid_step2"
,
50.
,
0
,
200
,
_
(
"Coarse grid spacing"
),
_
(
"Coarse Grid Spacing (default: 50)"
)))
self
.
settings
.
_add
(
StringSetting
(
"bgcolor"
,
"#FFFFFF"
,
_
(
"Background color"
),
_
(
"Pronterface background color (default: #FFFFFF)"
)))
self
.
settings
.
_add
(
StringSetting
(
"bgcolor"
,
"#FFFFFF"
,
_
(
"Background color"
),
_
(
"Pronterface background color (default: #FFFFFF)"
)))
self
.
settings
.
_add
(
BooleanSetting
(
"tabbed"
,
False
,
_
(
"Use tabbed interface"
),
_
(
"Use tabbed interface instead of the single window one"
)))
self
.
pauseScript
=
"pause.gcode"
self
.
pauseScript
=
"pause.gcode"
self
.
endScript
=
"end.gcode"
self
.
endScript
=
"end.gcode"
...
@@ -274,7 +275,10 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -274,7 +275,10 @@ class PronterWindow(MainWindow, pronsole.pronsole):
except
:
except
:
pass
pass
self
.
popmenu
()
self
.
popmenu
()
self
.
createGui
()
if
self
.
settings
.
tabbed
:
self
.
createTabbedGui
()
else
:
self
.
createGui
()
self
.
t
=
Tee
(
self
.
catchprint
)
self
.
t
=
Tee
(
self
.
catchprint
)
self
.
stdout
=
sys
.
stdout
self
.
stdout
=
sys
.
stdout
self
.
skeining
=
0
self
.
skeining
=
0
...
@@ -740,7 +744,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -740,7 +744,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
for
i
in
xrange
(
len
(
self
.
custombuttons
)):
for
i
in
xrange
(
len
(
self
.
custombuttons
)):
btndef
=
self
.
custombuttons
[
i
]
btndef
=
self
.
custombuttons
[
i
]
try
:
try
:
b
=
wx
.
Button
(
self
.
panel
,
-
1
,
btndef
.
label
,
style
=
wx
.
BU_EXACTFIT
)
b
=
wx
.
Button
(
self
.
cbuttons_
panel
,
-
1
,
btndef
.
label
,
style
=
wx
.
BU_EXACTFIT
)
b
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Execute command: "
)
+
btndef
.
command
))
b
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Execute command: "
)
+
btndef
.
command
))
if
btndef
.
background
:
if
btndef
.
background
:
b
.
SetBackgroundColour
(
btndef
.
background
)
b
.
SetBackgroundColour
(
btndef
.
background
)
...
@@ -749,13 +753,13 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -749,13 +753,13 @@ class PronterWindow(MainWindow, pronsole.pronsole):
b
.
SetForegroundColour
(
"#ffffff"
)
b
.
SetForegroundColour
(
"#ffffff"
)
except
:
except
:
if
i
==
newbuttonbuttonindex
:
if
i
==
newbuttonbuttonindex
:
self
.
newbuttonbutton
=
b
=
wx
.
Button
(
self
.
panel
,
-
1
,
"+"
,
size
=
(
19
,
18
),
style
=
wx
.
BU_EXACTFIT
)
self
.
newbuttonbutton
=
b
=
wx
.
Button
(
self
.
cbuttons_
panel
,
-
1
,
"+"
,
size
=
(
19
,
18
),
style
=
wx
.
BU_EXACTFIT
)
#b.SetFont(wx.Font(12, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
#b.SetFont(wx.Font(12, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
b
.
SetForegroundColour
(
"#4444ff"
)
b
.
SetForegroundColour
(
"#4444ff"
)
b
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"click to add new custom button"
)))
b
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"click to add new custom button"
)))
b
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
cbutton_edit
)
b
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
cbutton_edit
)
else
:
else
:
b
=
wx
.
Button
(
self
.
panel
,
-
1
,
"."
,
size
=
(
1
,
1
))
b
=
wx
.
Button
(
self
.
cbuttons_
panel
,
-
1
,
"."
,
size
=
(
1
,
1
))
#b = wx.StaticText(self.panel,-1, "", size = (72, 22), style = wx.ALIGN_CENTRE+wx.ST_NO_AUTORESIZE) #+wx.SIMPLE_BORDER
#b = wx.StaticText(self.panel,-1, "", size = (72, 22), style = wx.ALIGN_CENTRE+wx.ST_NO_AUTORESIZE) #+wx.SIMPLE_BORDER
b
.
Disable
()
b
.
Disable
()
#continue
#continue
...
...
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