- moved all the Levelling stuff out of the CNCjob Properties Tab to its own tool, Levelling Tool. The functionality itself is not finished yet.

This commit is contained in:
Marius Stanciu
2021-01-02 22:04:05 +02:00
committed by Marius
parent 3995080503
commit 230b8b9f3a
11 changed files with 2310 additions and 1949 deletions

View File

@@ -2160,555 +2160,6 @@ class CNCObjectUI(ObjectUI):
)
self.custom_box.addWidget(self.snippets_cb)
# Autolevelling
self.sal_btn = FCButton('%s' % _("Autolevelling"), checkable=True)
# self.sal_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/properties32.png'))
self.sal_btn.setToolTip(
_("Enable the autolevelling feature.")
)
self.sal_btn.setStyleSheet("""
QPushButton
{
font-weight: bold;
}
""")
self.custom_box.addWidget(self.sal_btn)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.custom_box.addWidget(separator_line)
self.al_frame = QtWidgets.QFrame()
self.al_frame.setContentsMargins(0, 0, 0, 0)
self.custom_box.addWidget(self.al_frame)
self.al_box = QtWidgets.QVBoxLayout()
self.al_box.setContentsMargins(0, 0, 0, 0)
self.al_frame.setLayout(self.al_box)
grid0 = QtWidgets.QGridLayout()
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.al_box.addLayout(grid0)
al_title = FCLabel('<b>%s</b>' % _("Probe Points Table"))
al_title.setToolTip(_("Generate GCode that will obtain the height map"))
self.show_al_table = FCCheckBox(_("Show"))
self.show_al_table.setToolTip(_("Toggle the display of the Probe Points table."))
self.show_al_table.setChecked(True)
hor_lay = QtWidgets.QHBoxLayout()
hor_lay.addWidget(al_title)
hor_lay.addStretch()
hor_lay.addWidget(self.show_al_table, alignment=QtCore.Qt.AlignRight)
grid0.addLayout(hor_lay, 0, 0, 1, 2)
self.al_probe_points_table = FCTable()
self.al_probe_points_table.setColumnCount(3)
self.al_probe_points_table.setColumnWidth(0, 20)
self.al_probe_points_table.setHorizontalHeaderLabels(['#', _('X-Y Coordinates'), _('Height')])
grid0.addWidget(self.al_probe_points_table, 1, 0, 1, 2)
self.plot_probing_pts_cb = FCCheckBox(_("Plot probing points"))
self.plot_probing_pts_cb.setToolTip(
_("Plot the probing points in the table.\n"
"If a Voronoi method is used then\n"
"the Voronoi areas are also plotted.")
)
grid0.addWidget(self.plot_probing_pts_cb, 3, 0, 1, 2)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 5, 0, 1, 2)
# #############################################################################################################
# ############### Probe GCode Generation ######################################################################
# #############################################################################################################
self.probe_gc_label = FCLabel('<b>%s</b>:' % _("Probe GCode Generation"))
self.probe_gc_label.setToolTip(
_("Will create a GCode which will be sent to the controller,\n"
"either through a file or directly, with the intent to get the height map\n"
"that is to modify the original GCode to level the cutting height.")
)
grid0.addWidget(self.probe_gc_label, 7, 0, 1, 2)
# Travel Z Probe
self.ptravelz_label = FCLabel('%s:' % _("Probe Z travel"))
self.ptravelz_label.setToolTip(
_("The safe Z for probe travelling between probe points.")
)
self.ptravelz_entry = FCDoubleSpinner()
self.ptravelz_entry.set_precision(self.decimals)
self.ptravelz_entry.set_range(0.0000, 10000.0000)
grid0.addWidget(self.ptravelz_label, 9, 0)
grid0.addWidget(self.ptravelz_entry, 9, 1)
# Probe depth
self.pdepth_label = FCLabel('%s:' % _("Probe Z depth"))
self.pdepth_label.setToolTip(
_("The maximum depth that the probe is allowed\n"
"to probe. Negative value, in current units.")
)
self.pdepth_entry = FCDoubleSpinner()
self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-910000.0000, 0.0000)
grid0.addWidget(self.pdepth_label, 11, 0)
grid0.addWidget(self.pdepth_entry, 11, 1)
# Probe feedrate
self.feedrate_probe_label = FCLabel('%s:' % _("Probe Feedrate"))
self.feedrate_probe_label.setToolTip(
_("The feedrate used while the probe is probing.")
)
self.feedrate_probe_entry = FCDoubleSpinner()
self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0, 910000.0000)
grid0.addWidget(self.feedrate_probe_label, 13, 0)
grid0.addWidget(self.feedrate_probe_entry, 13, 1)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 15, 0, 1, 2)
# AUTOLEVELL MODE
al_mode_lbl = FCLabel('<b>%s</b>:' % _("Mode"))
al_mode_lbl.setToolTip(_("Choose a mode for height map generation.\n"
"- Manual: will pick a selection of probe points by clicking on canvas\n"
"- Grid: will automatically generate a grid of probe points"))
self.al_mode_radio = RadioSet(
[
{'label': _('Manual'), 'value': 'manual'},
{'label': _('Grid'), 'value': 'grid'}
])
grid0.addWidget(al_mode_lbl, 16, 0)
grid0.addWidget(self.al_mode_radio, 16, 1)
# AUTOLEVELL METHOD
self.al_method_lbl = FCLabel('%s:' % _("Method"))
self.al_method_lbl.setToolTip(_("Choose a method for approximation of heights from autolevelling data.\n"
"- Voronoi: will generate a Voronoi diagram\n"
"- Bilinear: will use bilinear interpolation. Usable only for grid mode."))
self.al_method_radio = RadioSet(
[
{'label': _('Voronoi'), 'value': 'v'},
{'label': _('Bilinear'), 'value': 'b'}
])
self.al_method_lbl.setDisabled(True)
self.al_method_radio.setDisabled(True)
self.al_method_radio.set_value('v')
grid0.addWidget(self.al_method_lbl, 17, 0)
grid0.addWidget(self.al_method_radio, 17, 1)
# ## Columns
self.al_columns_entry = FCSpinner()
self.al_columns_entry.setMinimum(2)
self.al_columns_label = FCLabel('%s:' % _("Columns"))
self.al_columns_label.setToolTip(
_("The number of grid columns.")
)
grid0.addWidget(self.al_columns_label, 19, 0)
grid0.addWidget(self.al_columns_entry, 19, 1)
# ## Rows
self.al_rows_entry = FCSpinner()
self.al_rows_entry.setMinimum(2)
self.al_rows_label = FCLabel('%s:' % _("Rows"))
self.al_rows_label.setToolTip(
_("The number of grid rows.")
)
grid0.addWidget(self.al_rows_label, 21, 0)
grid0.addWidget(self.al_rows_entry, 21, 1)
self.al_add_button = FCButton(_("Add Probe Points"))
grid0.addWidget(self.al_add_button, 23, 0, 1, 2)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 25, 0, 1, 2)
self.al_controller_label = FCLabel('<b>%s</b>:' % _("Controller"))
self.al_controller_label.setToolTip(
_("The kind of controller for which to generate\n"
"height map gcode.")
)
self.al_controller_combo = FCComboBox()
self.al_controller_combo.addItems(["MACH3", "MACH4", "LinuxCNC", "GRBL"])
grid0.addWidget(self.al_controller_label, 27, 0)
grid0.addWidget(self.al_controller_combo, 27, 1)
# #############################################################################################################
# ########################## GRBL frame #######################################################################
# #############################################################################################################
self.grbl_frame = QtWidgets.QFrame()
self.grbl_frame.setContentsMargins(0, 0, 0, 0)
grid0.addWidget(self.grbl_frame, 29, 0, 1, 2)
self.grbl_box = QtWidgets.QVBoxLayout()
self.grbl_box.setContentsMargins(0, 0, 0, 0)
self.grbl_frame.setLayout(self.grbl_box)
# #############################################################################################################
# ########################## GRBL TOOLBAR #####################################################################
# #############################################################################################################
self.al_toolbar = FCDetachableTab(protect=True, parent=self)
self.al_toolbar.setTabsClosable(False)
self.al_toolbar.useOldIndex(True)
self.al_toolbar.set_detachable(val=False)
self.grbl_box.addWidget(self.al_toolbar)
# GRBL Connect TAB
self.gr_conn_tab = QtWidgets.QWidget()
self.gr_conn_tab.setObjectName("connect_tab")
self.gr_conn_tab_layout = QtWidgets.QVBoxLayout(self.gr_conn_tab)
self.gr_conn_tab_layout.setContentsMargins(2, 2, 2, 2)
# self.gr_conn_scroll_area = VerticalScrollArea()
# self.gr_conn_tab_layout.addWidget(self.gr_conn_scroll_area)
self.al_toolbar.addTab(self.gr_conn_tab, _("Connect"))
# GRBL Control TAB
self.gr_ctrl_tab = QtWidgets.QWidget()
self.gr_ctrl_tab.setObjectName("connect_tab")
self.gr_ctrl_tab_layout = QtWidgets.QVBoxLayout(self.gr_ctrl_tab)
self.gr_ctrl_tab_layout.setContentsMargins(2, 2, 2, 2)
# self.gr_ctrl_scroll_area = VerticalScrollArea()
# self.gr_ctrl_tab_layout.addWidget(self.gr_ctrl_scroll_area)
self.al_toolbar.addTab(self.gr_ctrl_tab, _("Control"))
# GRBL Sender TAB
self.gr_send_tab = QtWidgets.QWidget()
self.gr_send_tab.setObjectName("connect_tab")
self.gr_send_tab_layout = QtWidgets.QVBoxLayout(self.gr_send_tab)
self.gr_send_tab_layout.setContentsMargins(2, 2, 2, 2)
# self.gr_send_scroll_area = VerticalScrollArea()
# self.gr_send_tab_layout.addWidget(self.gr_send_scroll_area)
self.al_toolbar.addTab(self.gr_send_tab, _("Sender"))
for idx in range(self.al_toolbar.count()):
if self.al_toolbar.tabText(idx) == _("Connect"):
self.al_toolbar.tabBar.setTabTextColor(idx, QtGui.QColor('red'))
if self.al_toolbar.tabText(idx) == _("Control"):
self.al_toolbar.tabBar.setTabEnabled(idx, False)
if self.al_toolbar.tabText(idx) == _("Sender"):
self.al_toolbar.tabBar.setTabEnabled(idx, False)
# #############################################################################################################
# #############################################################################################################
# GRBL CONNECT
# #############################################################################################################
grbl_conn_grid = QtWidgets.QGridLayout()
grbl_conn_grid.setColumnStretch(0, 0)
grbl_conn_grid.setColumnStretch(1, 1)
grbl_conn_grid.setColumnStretch(2, 0)
self.gr_conn_tab_layout.addLayout(grbl_conn_grid)
# COM list
self.com_list_label = FCLabel('%s:' % _("COM list"))
self.com_list_label.setToolTip(
_("Lists the available serial ports.")
)
self.com_list_combo = FCComboBox()
self.com_search_button = FCButton(_("Search"))
self.com_search_button.setToolTip(
_("Search for the available serial ports.")
)
grbl_conn_grid.addWidget(self.com_list_label, 2, 0)
grbl_conn_grid.addWidget(self.com_list_combo, 2, 1)
grbl_conn_grid.addWidget(self.com_search_button, 2, 2)
# BAUDRATES list
self.baudrates_list_label = FCLabel('%s:' % _("Baud rates"))
self.baudrates_list_label.setToolTip(
_("Lists the available serial ports.")
)
self.baudrates_list_combo = FCComboBox()
cbmodel = QtCore.QStringListModel()
self.baudrates_list_combo.setModel(cbmodel)
self.baudrates_list_combo.addItems(
['9600', '19200', '38400', '57600', '115200', '230400', '460800', '500000', '576000', '921600', '1000000',
'1152000', '1500000', '2000000'])
self.baudrates_list_combo.setCurrentText('115200')
grbl_conn_grid.addWidget(self.baudrates_list_label, 4, 0)
grbl_conn_grid.addWidget(self.baudrates_list_combo, 4, 1)
# New baudrate
self.new_bd_label = FCLabel('%s:' % _("New"))
self.new_bd_label.setToolTip(
_("New, custom baudrate.")
)
self.new_baudrate_entry = FCSpinner()
self.new_baudrate_entry.set_range(40, 9999999)
self.add_bd_button = FCButton(_("Add"))
self.add_bd_button.setToolTip(
_("Add the specified custom baudrate to the list.")
)
grbl_conn_grid.addWidget(self.new_bd_label, 6, 0)
grbl_conn_grid.addWidget(self.new_baudrate_entry, 6, 1)
grbl_conn_grid.addWidget(self.add_bd_button, 6, 2)
self.del_bd_button = FCButton(_("Delete selected baudrate"))
grbl_conn_grid.addWidget(self.del_bd_button, 8, 0, 1, 3)
ctrl_hlay = QtWidgets.QHBoxLayout()
self.controller_reset_button = FCButton(_("Reset"))
self.controller_reset_button.setToolTip(
_("Software reset of the controller.")
)
self.controller_reset_button.setDisabled(True)
ctrl_hlay.addWidget(self.controller_reset_button)
self.com_connect_button = FCButton()
self.com_connect_button.setText(_("Disconnected"))
self.com_connect_button.setToolTip(
_("Connect to the selected port with the selected baud rate.")
)
self.com_connect_button.setStyleSheet("QPushButton {background-color: red;}")
ctrl_hlay.addWidget(self.com_connect_button)
grbl_conn_grid.addWidget(FCLabel(""), 9, 0, 1, 3)
grbl_conn_grid.setRowStretch(9, 1)
grbl_conn_grid.addLayout(ctrl_hlay, 10, 0, 1, 3)
# #############################################################################################################
# GRBL CONTROL
# #############################################################################################################
grbl_ctrl_grid = QtWidgets.QGridLayout()
grbl_ctrl_grid.setColumnStretch(0, 0)
grbl_ctrl_grid.setColumnStretch(1, 1)
grbl_ctrl_grid.setColumnStretch(2, 0)
self.gr_ctrl_tab_layout.addLayout(grbl_ctrl_grid)
grbl_ctrl2_grid = QtWidgets.QGridLayout()
grbl_ctrl2_grid.setColumnStretch(0, 0)
grbl_ctrl2_grid.setColumnStretch(1, 1)
self.gr_ctrl_tab_layout.addLayout(grbl_ctrl2_grid)
self.gr_ctrl_tab_layout.addStretch(1)
jog_title_label = FCLabel(_("Jog"))
jog_title_label.setStyleSheet("""
FCLabel
{
font-weight: bold;
}
""")
zero_title_label = FCLabel(_("Zero Axes"))
zero_title_label.setStyleSheet("""
FCLabel
{
font-weight: bold;
}
""")
grbl_ctrl_grid.addWidget(jog_title_label, 0, 0)
grbl_ctrl_grid.addWidget(zero_title_label, 0, 2)
self.jog_wdg = FCJog(self.app)
self.jog_wdg.setStyleSheet("""
FCJog
{
border: 1px solid lightgray;
border-radius: 5px;
}
""")
self.zero_axs_wdg = FCZeroAxes(self.app)
self.zero_axs_wdg.setStyleSheet("""
FCZeroAxes
{
border: 1px solid lightgray;
border-radius: 5px
}
""")
grbl_ctrl_grid.addWidget(self.jog_wdg, 2, 0)
grbl_ctrl_grid.addWidget(self.zero_axs_wdg, 2, 2)
self.pause_resume_button = RotatedToolButton()
self.pause_resume_button.setSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.pause_resume_button.setText(_("Pause/Resume"))
self.pause_resume_button.setCheckable(True)
self.pause_resume_button.setStyleSheet("""
RotatedToolButton:checked
{
background-color: red;
color: white;
border: none;
}
""")
pause_frame = QtWidgets.QFrame()
pause_frame.setContentsMargins(0, 0, 0, 0)
pause_frame.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Expanding)
pause_hlay = QtWidgets.QHBoxLayout()
pause_hlay.setContentsMargins(0, 0, 0, 0)
pause_hlay.addWidget(self.pause_resume_button)
pause_frame.setLayout(pause_hlay)
grbl_ctrl_grid.addWidget(pause_frame, 2, 1)
# JOG Step
self.jog_step_label = FCLabel('%s:' % _("Step"))
self.jog_step_label.setToolTip(
_("Each jog action will move the axes with this value.")
)
self.jog_step_entry = FCSliderWithDoubleSpinner()
self.jog_step_entry.set_precision(self.decimals)
self.jog_step_entry.setSingleStep(0.1)
self.jog_step_entry.set_range(0, 500)
grbl_ctrl2_grid.addWidget(self.jog_step_label, 0, 0)
grbl_ctrl2_grid.addWidget(self.jog_step_entry, 0, 1)
# JOG Feedrate
self.jog_fr_label = FCLabel('%s:' % _("Feedrate"))
self.jog_fr_label.setToolTip(
_("Feedrate when jogging.")
)
self.jog_fr_entry = FCSliderWithDoubleSpinner()
self.jog_fr_entry.set_precision(self.decimals)
self.jog_fr_entry.setSingleStep(10)
self.jog_fr_entry.set_range(0, 10000)
grbl_ctrl2_grid.addWidget(self.jog_fr_label, 1, 0)
grbl_ctrl2_grid.addWidget(self.jog_fr_entry, 1, 1)
# #############################################################################################################
# GRBL SENDER
# #############################################################################################################
grbl_send_grid = QtWidgets.QGridLayout()
grbl_send_grid.setColumnStretch(0, 1)
grbl_send_grid.setColumnStretch(1, 0)
self.gr_send_tab_layout.addLayout(grbl_send_grid)
# Send CUSTOM COMMAND
self.grbl_command_label = FCLabel('%s:' % _("Send Command"))
self.grbl_command_label.setToolTip(
_("Send a custom command to GRBL.")
)
grbl_send_grid.addWidget(self.grbl_command_label, 2, 0, 1, 2)
self.grbl_command_entry = FCEntry()
self.grbl_command_entry.setPlaceholderText(_("Type GRBL command ..."))
self.grbl_send_button = QtWidgets.QToolButton()
self.grbl_send_button.setText(_("Send"))
self.grbl_send_button.setToolTip(
_("Send a custom command to GRBL.")
)
grbl_send_grid.addWidget(self.grbl_command_entry, 4, 0)
grbl_send_grid.addWidget(self.grbl_send_button, 4, 1)
# Get Parameter
self.grbl_get_param_label = FCLabel('%s:' % _("Get Config parameter"))
self.grbl_get_param_label.setToolTip(
_("A GRBL configuration parameter.")
)
grbl_send_grid.addWidget(self.grbl_get_param_label, 6, 0, 1, 2)
self.grbl_parameter_entry = FCEntry()
self.grbl_parameter_entry.setPlaceholderText(_("Type GRBL parameter ..."))
self.grbl_get_param_button = QtWidgets.QToolButton()
self.grbl_get_param_button.setText(_("Get"))
self.grbl_get_param_button.setToolTip(
_("Get the value of a specified GRBL parameter.")
)
grbl_send_grid.addWidget(self.grbl_parameter_entry, 8, 0)
grbl_send_grid.addWidget(self.grbl_get_param_button, 8, 1)
grbl_send_grid.setRowStretch(9, 1)
# GET Report
self.grbl_report_button = FCButton(_("Get Report"))
self.grbl_report_button.setToolTip(
_("Print in shell the GRBL report.")
)
grbl_send_grid.addWidget(self.grbl_report_button, 10, 0, 1, 2)
hm_lay = QtWidgets.QHBoxLayout()
# GET HEIGHT MAP
self.grbl_get_heightmap_button = FCButton(_("Apply AutoLevelling"))
self.grbl_get_heightmap_button.setToolTip(
_("Will send the probing GCode to the GRBL controller,\n"
"wait for the Z probing data and then apply this data\n"
"over the original GCode therefore doing autolevelling.")
)
hm_lay.addWidget(self.grbl_get_heightmap_button, stretch=1)
self.grbl_save_height_map_button = QtWidgets.QToolButton()
self.grbl_save_height_map_button.setIcon(QtGui.QIcon(self.app.resource_location + '/save_as.png'))
self.grbl_save_height_map_button.setToolTip(
_("Will save the GRBL height map.")
)
hm_lay.addWidget(self.grbl_save_height_map_button, stretch=0, alignment=Qt.AlignRight)
grbl_send_grid.addLayout(hm_lay, 12, 0, 1, 2)
self.grbl_frame.hide()
# #############################################################################################################
height_lay = QtWidgets.QHBoxLayout()
self.h_gcode_button = FCButton(_("Save Probing GCode"))
self.h_gcode_button.setToolTip(
_("Will save the probing GCode.")
)
self.h_gcode_button.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding)
height_lay.addWidget(self.h_gcode_button)
self.view_h_gcode_button = QtWidgets.QToolButton()
self.view_h_gcode_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
# self.view_h_gcode_button.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
self.view_h_gcode_button.setToolTip(
_("View/Edit the probing GCode.")
)
# height_lay.addStretch()
height_lay.addWidget(self.view_h_gcode_button)
grid0.addLayout(height_lay, 31, 0, 1, 2)
self.import_heights_button = FCButton(_("Import Height Map"))
self.import_heights_button.setToolTip(
_("Import the file that has the Z heights\n"
"obtained through probing and then apply this data\n"
"over the original GCode therefore\n"
"doing autolevelling.")
)
grid0.addWidget(self.import_heights_button, 33, 0, 1, 2)
self.h_gcode_button.hide()
self.import_heights_button.hide()
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 35, 0, 1, 2)
# #############################################################################################################
# ## Export G-Code ##
# #############################################################################################################
@@ -2737,35 +2188,8 @@ class CNCObjectUI(ObjectUI):
self.review_gcode_button.setIcon(QtGui.QIcon(self.app.resource_location + '/find32.png'))
g_export_lay.addWidget(self.review_gcode_button)
self.custom_box.addStretch()
self.custom_box.addStretch(1)
self.al_probe_points_table.setRowCount(0)
self.al_probe_points_table.resizeColumnsToContents()
self.al_probe_points_table.resizeRowsToContents()
v_header = self.al_probe_points_table.verticalHeader()
v_header.hide()
self.al_probe_points_table.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
h_header = self.al_probe_points_table.horizontalHeader()
h_header.setMinimumSectionSize(10)
h_header.setDefaultSectionSize(70)
h_header.setSectionResizeMode(0, QtWidgets.QHeaderView.Fixed)
h_header.resizeSection(0, 20)
h_header.setSectionResizeMode(1, QtWidgets.QHeaderView.Stretch)
h_header.setSectionResizeMode(2, QtWidgets.QHeaderView.ResizeToContents)
self.al_probe_points_table.setMinimumHeight(self.al_probe_points_table.getHeight())
self.al_probe_points_table.setMaximumHeight(self.al_probe_points_table.getHeight())
# Set initial UI
self.al_frame.hide()
self.al_rows_entry.setDisabled(True)
self.al_rows_label.setDisabled(True)
self.al_columns_entry.setDisabled(True)
self.al_columns_label.setDisabled(True)
self.al_method_lbl.setDisabled(True)
self.al_method_radio.setDisabled(True)
self.al_method_radio.set_value('v')
# self.on_mode_radio(val='grid')