Skip to content

Commit

Permalink
added button
Browse files Browse the repository at this point in the history
  • Loading branch information
dbriscoe511 committed Mar 26, 2022
1 parent e0cbbed commit e28a1ba
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 8 deletions.
10 changes: 10 additions & 0 deletions Clean_board_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ def __init__( self, parent ):

bSizer15.Add( ( 0, 0), 1, wx.EXPAND, 5 )


bSizer15.Add( ( 0, 0), 1, wx.EXPAND, 5 )

self.btn_apply = wx.Button( self, wx.ID_APPLY, u"Apply", wx.DefaultPosition, wx.DefaultSize, 0 )
bSizer15.Add( self.btn_apply, 0, wx.ALL, 5 )

self.btn_ok = wx.Button( self, wx.ID_OK, u"Ok", wx.DefaultPosition, wx.DefaultSize, 0 )
bSizer15.Add( self.btn_ok, 0, wx.ALL, 5 )

Expand All @@ -88,6 +94,7 @@ def __init__( self, parent ):
self.chkbox_hide_val.Bind( wx.EVT_CHECKBOX, self.level_changed )
self.chkbox_exclude_val.Bind( wx.EVT_CHECKBOX, self.level_changed )
self.btn_cancel.Bind( wx.EVT_BUTTON, self.on_cancel )
self.btn_apply.Bind( wx.EVT_BUTTON, self.on_apply )
self.btn_ok.Bind( wx.EVT_BUTTON, self.on_ok )

def __del__( self ):
Expand All @@ -103,6 +110,9 @@ def level_changed( self, event ):



def on_apply( self, event ):
event.Skip()

def on_ok( self, event ):
event.Skip()

Expand Down
15 changes: 13 additions & 2 deletions action_board_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def __init__(self,parent,mop,logger):




def on_ok(self,event):
def on_apply(self, event):

self.logger.info("Changes Applied")

#get checkboxes
hide_des = self.chkbox_hide_des.GetValue()
Expand All @@ -40,6 +41,16 @@ def on_ok(self,event):

#clean
self.mop.hide(hide_des, hide_val, des_list, val_list, unhide_des, unhide_val )


def on_ok(self,event):

self.logger.info("Changes oked")
self.on_apply(event)


event.Skip()
self.Destroy()


def on_cancel(self, event):
Expand Down
84 changes: 84 additions & 0 deletions clean_board.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,90 @@
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_APPLY</property>
<property name="label">Apply</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">btn_apply</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">on_apply</event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
Expand Down
10 changes: 5 additions & 5 deletions metadata_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
],
"versions": [
{
"version": "1.0.0",
"version": "1.0.1",
"status": "stable",
"kicad_version": "6.0",
"download_sha256": "a18622dca26e8c49f5d9dc5be6da93c8f545a1e1f20abaaef063b36e6361584c",
"download_size": 10112,
"download_url": "https://github.com/dbriscoe511/Kicad-board-cleaner/releases/download/1.0.0/Board-cleaner-1.0.0-pcm.zip",
"install_size": 16599,
"download_sha256": "be287911baabea6adbec783949c34aa02b70cc97e65c6789b55c38cf1cff81e5",
"download_size": 10104,
"download_url": "https://github.com/dbriscoe511/Kicad-board-cleaner/releases/download/1.0.1/Board-cleaner-1.0.1-pcm.zip",
"install_size": 16598,
"platforms": [
"linux",
"macos",
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.1.0

0 comments on commit e28a1ba

Please sign in to comment.