- working on a proper GCode Editor
This commit is contained in:
@@ -1557,8 +1557,13 @@ class FCInputDialog(QtWidgets.QInputDialog):
|
||||
|
||||
|
||||
class FCButton(QtWidgets.QPushButton):
|
||||
def __init__(self, parent=None):
|
||||
super(FCButton, self).__init__(parent)
|
||||
def __init__(self, text=None, checkable=None, click_callback=None, parent=None):
|
||||
super(FCButton, self).__init__(text, parent)
|
||||
if not checkable is None:
|
||||
self.setCheckable(checkable)
|
||||
|
||||
if not click_callback is None:
|
||||
self.clicked.connect(click_callback)
|
||||
|
||||
def get_value(self):
|
||||
return self.isChecked()
|
||||
|
||||
@@ -1870,7 +1870,7 @@ class CNCObjectUI(ObjectUI):
|
||||
self.custom_box.addWidget(self.updateplot_button)
|
||||
|
||||
# Editor
|
||||
self.editor_button = QtWidgets.QPushButton(_('GCode Editor'))
|
||||
self.editor_button = FCButton(_('GCode Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
|
||||
self.editor_button.setToolTip(
|
||||
|
||||
Reference in New Issue
Block a user