Skip to content

Commit

Permalink
add config reset
Browse files Browse the repository at this point in the history
  • Loading branch information
nachifur committed Aug 24, 2024
1 parent 0fc4510 commit ac8886e
Show file tree
Hide file tree
Showing 5 changed files with 202 additions and 22 deletions.
47 changes: 46 additions & 1 deletion output.json
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
{"row_col": "1,1", "row_col_one_img": "1,1", "show_scale": "1,1", "row_col_img_unit": "3,1", "gap": "10,10,5,5,3,3,2,2", "magnifer_row_col": "1,1", "output_scale": "1,1", "img_resolution": "-1,-1", "magnifer_resolution": "-1,-1", "magnifier_show_scale": "-1,-1", "line_width": "2,2", "magnifier_out_scale": "1,1", "title_font_size": "20", "box_position": 0, "choice_normalized_size": 0, "choice_output": 0, "image_interp": 2, "Magnifier_format": 1, "title_font": 0, "parallel_sequential": false, "parallel_to_sequential": false, "auto_save_all": false, "move_file": false, "img_vertical": false, "one_img_vertical": false, "img_unit_vertical": false, "magnifer_vertical": true, "show_original": true, "show_magnifer": true, "title_show": true, "auto_layout_check": false, "one_img": false, "onetitle": false, "customfunc": false, "show_box": true, "show_box_in_crop": true, "select_img_box": false, "title_auto": false, "title_exif": false, "title_show_parent": false, "title_show_prefix": true, "title_show_name": true, "title_show_suffix": false, "title_down_up": false}
{
"row_col": "1,1",
"row_col_one_img": "1,1",
"show_scale": "1,1",
"row_col_img_unit": "3,1",
"gap": "10,10,5,5,3,3,2,2",
"magnifer_row_col": "1,1",
"output_scale": "1,1",
"img_resolution": "-1,-1",
"magnifer_resolution": "-1,-1",
"magnifier_show_scale": "-1,-1",
"line_width": "2,2",
"magnifier_out_scale": "1,1",
"title_font_size": "20",
"box_position": 0,
"choice_normalized_size": 0,
"choice_output": 0,
"image_interp": 2,
"Magnifier_format": 1,
"title_font": 0,
"parallel_sequential": false,
"parallel_to_sequential": false,
"auto_save_all": false,
"move_file": false,
"img_vertical": false,
"one_img_vertical": false,
"img_unit_vertical": false,
"magnifer_vertical": true,
"show_original": true,
"show_magnifer": true,
"title_show": true,
"auto_layout_check": false,
"one_img": false,
"onetitle": false,
"customfunc": false,
"show_box": true,
"show_box_in_crop": true,
"select_img_box": false,
"title_auto": false,
"title_exif": false,
"title_show_parent": false,
"title_show_prefix": true,
"title_show_name": true,
"title_show_suffix": false,
"title_down_up": false
}
46 changes: 46 additions & 0 deletions output_s.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"row_col": "1,1",
"row_col_one_img": "1,1",
"show_scale": "1,1",
"row_col_img_unit": "3,1",
"gap": "10,10,5,5,3,3,2,2",
"magnifer_row_col": "1,1",
"output_scale": "1,1",
"img_resolution": "-1,-1",
"magnifer_resolution": "-1,-1",
"magnifier_show_scale": "-1,-1",
"line_width": "2,2",
"magnifier_out_scale": "1,1",
"title_font_size": "20",
"box_position": 0,
"choice_normalized_size": 0,
"choice_output": 0,
"image_interp": 2,
"Magnifier_format": 1,
"title_font": 0,
"parallel_sequential": false,
"parallel_to_sequential": false,
"auto_save_all": false,
"move_file": false,
"img_vertical": false,
"one_img_vertical": false,
"img_unit_vertical": false,
"magnifer_vertical": true,
"show_original": true,
"show_magnifer": true,
"title_show": true,
"auto_layout_check": false,
"one_img": false,
"onetitle": false,
"customfunc": false,
"show_box": true,
"show_box_in_crop": true,
"select_img_box": false,
"title_auto": false,
"title_exif": false,
"title_show_parent": false,
"title_show_prefix": true,
"title_show_name": true,
"title_show_suffix": false,
"title_down_up": false
}
97 changes: 87 additions & 10 deletions src/mulimgviewer/gui/main_gui.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -2693,7 +2693,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">LayoutConfig</property>
<property name="label">Config</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
Expand Down Expand Up @@ -2785,7 +2785,82 @@
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxToggleButton" expanded="true">
<object class="wxButton" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="drag_accept_files">0</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_ANY</property>
<property name="label">Load</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">m_button7</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">-1,-1</property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size">50,-1</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">load_configuration</event>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
Expand All @@ -2794,6 +2869,7 @@
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
Expand All @@ -2804,6 +2880,7 @@
<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>
Expand All @@ -2828,7 +2905,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_toggleBtn4</property>
<property name="name">m_button9</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
Expand All @@ -2840,23 +2917,23 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size">50,-1</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="value">1</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnToggleButton">save_configuration</event>
<event name="OnButtonClick">save_configuration</event>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="true">
<property name="BottomDockable">1</property>
Expand Down Expand Up @@ -2893,7 +2970,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Load</property>
<property name="label">Reset</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
Expand All @@ -2903,13 +2980,13 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_button7</property>
<property name="name">m_button8</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">-1,-1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
Expand All @@ -2926,7 +3003,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">load_configuration</event>
<event name="OnButtonClick">reset_configuration</event>
</object>
</object>
</object>
Expand Down
20 changes: 13 additions & 7 deletions src/mulimgviewer/gui/main_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,21 +235,23 @@ def __init__( self, parent ):

wSizer112 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )

self.m_staticText361 = wx.StaticText( self.m_panel4, wx.ID_ANY, u"LayoutConfig", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText361 = wx.StaticText( self.m_panel4, wx.ID_ANY, u"Config", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText361.Wrap( -1 )

wSizer112.Add( self.m_staticText361, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

self.m_staticline201 = wx.StaticLine( self.m_panel4, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_VERTICAL )
wSizer112.Add( self.m_staticline201, 0, wx.EXPAND |wx.ALL, 5 )

self.m_toggleBtn4 = wx.ToggleButton( self.m_panel4, wx.ID_ANY, u"Save", wx.DefaultPosition, wx.Size( 50,-1 ), 0 )
self.m_toggleBtn4.SetValue( True )
wSizer112.Add( self.m_toggleBtn4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

self.m_button7 = wx.Button( self.m_panel4, wx.ID_ANY, u"Load", wx.Point( -1,-1 ), wx.Size( 50,-1 ), 0 )
wSizer112.Add( self.m_button7, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

self.m_button9 = wx.Button( self.m_panel4, wx.ID_ANY, u"Save", wx.DefaultPosition, wx.Size( 50,-1 ), 0 )
wSizer112.Add( self.m_button9, 0, wx.ALL, 5 )

self.m_button8 = wx.Button( self.m_panel4, wx.ID_ANY, u"Reset", wx.DefaultPosition, wx.Size( 50,-1 ), 0 )
wSizer112.Add( self.m_button8, 0, wx.ALL, 5 )


fgSizer3.Add( wSizer112, 1, wx.EXPAND, 5 )

Expand Down Expand Up @@ -810,8 +812,9 @@ def __init__( self, parent ):
self.choice_normalized_size.Bind( wx.EVT_CHOICE, self.change_img_stitch_mode )
self.parallel_sequential.Bind( wx.EVT_CHECKBOX, self.parallel_sequential_fc )
self.parallel_to_sequential.Bind( wx.EVT_CHECKBOX, self.parallel_to_sequential_fc )
self.m_toggleBtn4.Bind( wx.EVT_TOGGLEBUTTON, self.save_configuration )
self.m_button7.Bind( wx.EVT_BUTTON, self.load_configuration )
self.m_button9.Bind( wx.EVT_BUTTON, self.save_configuration )
self.m_button8.Bind( wx.EVT_BUTTON, self.reset_configuration )
self.select_img_box.Bind( wx.EVT_CHECKBOX, self.select_img_box_func )
self.title_auto.Bind( wx.EVT_CHECKBOX, self.title_auto_fc )
self.title_down_up.Bind( wx.EVT_CHECKBOX, self.title_down_up_fc )
Expand Down Expand Up @@ -894,10 +897,13 @@ def parallel_sequential_fc( self, event ):
def parallel_to_sequential_fc( self, event ):
event.Skip()

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

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

def load_configuration( self, event ):
def reset_configuration( self, event ):
event.Skip()

def select_img_box_func( self, event ):
Expand Down
Loading

0 comments on commit ac8886e

Please sign in to comment.