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
8246ef2e
Commit
8246ef2e
authored
May 17, 2011
by
Jeremy Kajikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started with Event Bindings and Empty procedures for those bindings,
still need to correct the EVT_ codes for the bindings...
parent
02f76339
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
6 deletions
+36
-6
weaver.py
weaver.py
+36
-6
No files found.
weaver.py
View file @
8246ef2e
...
...
@@ -17,6 +17,7 @@ try:
def
__init__
(
self
):
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Weaver"
)
# Menus and Items
self
.
menustrip
=
wx
.
MenuBar
()
m
=
wx
.
Menu
()
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnLoadOpts
,
m
.
Append
(
wx
.
ID_ANY
,
"&Load Options"
,
" Load Configuration Settings"
))
...
...
@@ -34,6 +35,7 @@ try:
self
.
menustrip
.
Append
(
m
,
"&Help"
)
self
.
SetMenuBar
(
self
.
menustrip
)
# Displayed Layout Follows
self
.
vlayout
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
hbox
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
hbox
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
"Device :"
,
style
=
wx
.
ALIGN_CENTRE
),
0
,
wx
.
ALL
,
1
)
...
...
@@ -92,20 +94,27 @@ try:
self
.
hlayout
.
Add
(
vbox
,
1
,
wx
.
ALL
,
1
)
self
.
vlayout
.
Add
(
self
.
hlayout
,
1
,
wx
.
ALL
|
wx
.
EXPAND
|
wx
.
ALIGN_CENTER_HORIZONTAL
,
1
)
self
.
CreateStatusBar
()
# Need to correct EVT_ codes for button types
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnSerialPort
,
self
.
SerialPort
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnSerialSpeed
,
self
.
SerialPort
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnShellProc
,
self
.
ShellProc
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnSendClear
,
self
.
ShellClear
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnShellSend
,
self
.
ShellSend
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnLoadSTL
,
self
.
LoadSTL
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnLoadGCode
,
self
.
LoadGCode
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnPrintCancel
,
self
.
PrintCancel
)
self
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
OnPauseResume
,
self
.
PauseResume
)
# self.Bind(wx.EVT_BUTTON, self.OnSkeinForge, self.SkeinForge)
self
.
CreateStatusBar
()
self
.
SetSizer
(
self
.
vlayout
)
self
.
vlayout
.
Fit
(
self
)
self
.
Layout
()
self
.
EventBinding
()
self
.
Centre
()
self
.
Show
(
True
)
def
EventBinding
(
self
):
pass
def
OnAbout
(
self
,
event
):
dlg
=
wx
.
MessageDialog
(
self
,
"Prusa - Mendel - RAMPS - Sprinter"
,
"About Weaver"
,
wx
.
OK
)
dlg
.
ShowModal
()
...
...
@@ -126,6 +135,12 @@ try:
def
OnExit
(
self
,
event
):
self
.
Close
(
True
)
def
OnSerialPort
(
self
,
event
):
pass
def
OnSerialSpeed
(
self
,
event
):
pass
def
OnShellProc
(
self
,
event
):
pass
...
...
@@ -135,6 +150,21 @@ try:
def
OnShellSend
(
self
,
event
):
pass
def
OnLoadSTL
(
self
,
event
):
pass
def
OnLoadGCode
(
self
,
event
):
pass
def
OnPrintCancel
(
self
,
event
):
pass
def
OnPauseResume
(
self
,
event
):
pass
def
OnSkeinForge
(
self
,
event
):
pass
except
:
print
(
"Library Failure -- Please install the wxPython Libraries"
)
quit
()
...
...
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