def __init__(self, halcomp, widgets, paths): self.hal = halcomp self.w = widgets self.PATHS = paths self.current_mode = (None, None) self._last_count = 0 self.STYLEEDITOR = SSE(widgets, paths)
def __init__(self, halcomp, widgets, paths): self.hal = halcomp self.w = widgets self.PATH = paths.CONFIGPATH self.IMAGE_PATH = paths.IMAGEDIR self._big_view = -1 self.STYLEEDITOR = SSE(widgets, paths)
def __init__(self, halcomp, widgets, paths): self.hal = halcomp self.w = widgets self.PATHS = paths self.STYLEEDITOR = SSE(widgets, paths) global TOOLBAR TOOLBAR = ToolBarActions(path=paths) STATUS.connect('general', self.return_value)
def __init__(self, halcomp,widgets,paths): self.hal = halcomp self.w = widgets self.PATHS = paths self.STYLEEDITOR = SSE(widgets,paths) self.picked_line = None STATUS.connect('general',self.return_value) STATUS.connect('graphics-line-selected', self.set_picked_line)
def __init__(self, halcomp, widgets, paths): self.hal = halcomp self.w = widgets self.PATHS = paths self.STYLEEDITOR = SSE(widgets, paths) global TOOLBAR TOOLBAR = ToolBarActions(path=paths) STATUS.connect('general', self.return_value) STATUS.connect('motion-mode-changed', self.motion_mode) STATUS.connect('user-system-changed', self._set_user_system_text)
def __init__(self, halcomp, widgets, paths): self.hal = halcomp self.w = widgets self.PATHS = paths self.STYLEEDITOR = SSE(widgets, paths) global TOOLBAR STATUS.connect('general', self.return_value) STATUS.connect('motion-mode-changed', self.motion_mode) STATUS.connect('user-system-changed', self._set_user_system_text) STATUS.connect('actual-spindle-speed-changed', self.update_spindle)
def __init__(self, halcomp, widgets, paths): self.hal = halcomp self.w = widgets self.stat = linuxcnc.stat() self.cmnd = linuxcnc.command() self.error = linuxcnc.error_channel() self.PATHS = paths self.IMAGE_PATH = paths.IMAGEDIR self.STYLEEDITOR = SSE(widgets, paths) global TOOLBAR TOOLBAR = ToolBarActions(path=paths)
def __init__(self, halcomp, widgets, paths): self.h = halcomp self.w = widgets self.gcodes = GCodes(widgets) self.valid = QtGui.QDoubleValidator(-999.999, 999.999, 3) self.styleeditor = SSE(widgets, paths) KEYBIND.add_call('Key_F4', 'on_keycall_F4') KEYBIND.add_call('Key_F12','on_keycall_F12') KEYBIND.add_call('Key_Pause', 'on_keycall_PAUSE') KEYBIND.add_call('Key_Space', 'on_keycall_PAUSE') # some global variables self.factor = 1.0 self.probe = None self.default_setup = os.path.join(PATH.CONFIGPATH, "default_setup.html") self.start_line = 0 self.run_time = 0 self.time_tenths = 0 self.timer_on = False self.home_all = False self.min_spindle_rpm = INFO.MIN_SPINDLE_SPEED self.max_spindle_rpm = INFO.MAX_SPINDLE_SPEED self.max_spindle_power = INFO.get_error_safe_setting('DISPLAY', 'MAX_SPINDLE_POWER',"0") self.max_linear_velocity = INFO.MAX_TRAJ_VELOCITY self.system_list = ["G54","G55","G56","G57","G58","G59","G59.1","G59.2","G59.3"] self.slow_jog_factor = 10 self.reload_tool = 0 self.last_loaded_program = "" self.first_turnon = True self.unit_label_list = ["ts_height", "tp_height", "zoffset_units", "max_probe_units"] self.lineedit_list = ["work_height", "touch_height", "sensor_height", "laser_x", "laser_y", "sensor_x", "sensor_y", "camera_x", "camera_y", "search_vel", "probe_vel", "max_probe", "eoffset_count"] self.onoff_list = ["frame_program", "frame_tool", "frame_offsets", "frame_dro", "frame_override"] self.axis_a_list = ["label_axis_a", "dro_axis_a", "action_zero_a", "axistoolbutton_a", "action_home_a", "widget_jog_angular", "widget_increments_angular", "a_plus_jogbutton", "a_minus_jogbutton"] STATUS.connect('general', self.dialog_return) STATUS.connect('state-on', lambda w: self.enable_onoff(True)) STATUS.connect('state-off', lambda w: self.enable_onoff(False)) STATUS.connect('mode-auto', lambda w: self.enable_auto(True)) STATUS.connect('gcode-line-selected', lambda w, line: self.set_start_line(line)) STATUS.connect('hard-limits-tripped', self.hard_limit_tripped) STATUS.connect('program-pause-changed', lambda w, state: self.w.btn_pause_spindle.setEnabled(state)) STATUS.connect('user-system-changed', lambda w, data: self.user_system_changed(data)) STATUS.connect('metric-mode-changed', lambda w, mode: self.metric_mode_changed(mode)) STATUS.connect('file-loaded', self.file_loaded) STATUS.connect('all-homed', self.all_homed) STATUS.connect('not-all-homed', self.not_all_homed) STATUS.connect('periodic', lambda w: self.update_runtimer()) STATUS.connect('interp-idle', lambda w: self.stop_timer()) STATUS.connect('actual-spindle-speed-changed',self.update_spindle) STATUS.connect('requested-spindle-speed-changed',self.update_spindle_requested)
def __init__(self, halcomp, widgets, paths): # some global variables self.hal = halcomp self.w = widgets self.PATH = paths self._big_view = -1 self.flag = 0 self.activeStyle = ''' { background-color: white;}''' self.defaultStyle = ''' { background-color: light blue;}''' self.activeWidgetDict = { 'programPage': False, 'userPage': False, 'machinePage': False, 'tooloffsetsPage': False, 'loadPage': False, 'mdiPage': False, 'workoffsetsPage': False, 'setupPage': False } self.current_mode = (None, None) self._last_count = 0 self.run_time = 0 self.time_tenths = 0 self.timerOn = False self.slow_jog_factor = 10 self.STYLEEDITOR = SSE(widgets, paths) self.GCODES = GCodes() STATUS.connect('periodic', lambda w: self.update_runtimer()) STATUS.connect('command-running', lambda w: self.start_timer()) STATUS.connect('command-stopped', lambda w: self.stop_timer()) STATUS.connect("metric-mode-changed", lambda w, d: self.mode_changed(d)) STATUS.connect('state-off', lambda w: self.w.pushbutton_metric.setEnabled(False)) STATUS.connect('state-estop', lambda w: self.w.pushbutton_metric.setEnabled(False)) STATUS.connect( 'interp-idle', lambda w: self.w.pushbutton_metric.setEnabled( self.homed_on_test())) STATUS.connect('interp-run', lambda w: self.w.pushbutton_metric.setEnabled(False)) STATUS.connect('all-homed', lambda w: self.w.pushbutton_metric.setEnabled(True)) STATUS.connect( 'not-all-homed', lambda w, data: self.w.pushbutton_metric.setEnabled(False))
def __init__(self, halcomp, widgets, paths): self.h = halcomp self.w = widgets self.PATHS = paths INIPATH = os.environ.get('INI_FILE_NAME', '/dev/null') self.inifile = linuxcnc.ini(INIPATH) self.STYLEEDITOR = SSE(widgets, paths) self.GCODES = GCodes(widgets) self.valid = QtGui.QDoubleValidator(0.0, 999.999, 3) KEYBIND.add_call('Key_F12', 'on_keycall_F12') KEYBIND.add_call('Key_Pause', 'on_keycall_pause') KEYBIND.add_call('Key_Plus', 'on_keycall_plus') KEYBIND.add_call('Key_Minus', 'on_keycall_minus') STAT.connect('general', self.dialog_return) STAT.connect('state-on', lambda w: self.enable_onoff(True)) STAT.connect('state-off', lambda w: self.enable_onoff(False)) STAT.connect('gcode-line-selected', lambda w, line: self.set_start_line(line)) STAT.connect('hard-limits-tripped', self.hard_limit_tripped) STAT.connect('interp-idle', lambda w: self.set_start_line(0)) STAT.connect('user-system-changed', self.user_system_changed) STAT.connect('file-loaded', self.file_loaded) STAT.connect('all-homed', self.all_homed) STAT.connect('not-all-homed', lambda w, list: self.set_dro_homed(False)) # some global variables self.axis_list = INFO.AVAILABLE_AXES self.max_linear_velocity = INFO.MAX_LINEAR_VELOCITY self.max_spindle_rpm = INFO.MAX_SPINDLE_SPEED self.system_list = [ "G53", "G54", "G55", "G56", "G57", "G58", "G59", "G59.1", "G59.2", "G59.3" ] self.slow_jog_factor = 10 self.reload_tool = 0 self.last_loaded_program = "" self.first_turnon = True self.onoff_list = ["frame_program", "frame_tool", "frame_dro"] self.axis_a_list = [ "label_axis_a", "dro_axis_a", "action_zero_a", "axistoolbutton_a", "action_home_a", "widget_jog_angular", "widget_increments_angular", "a_plus_jogbutton", "a_minus_jogbutton" ]
def __init__(self, halcomp, widgets, paths): self.w = widgets self.PATHS = paths self.hal = halcomp INIPATH = os.environ.get('INI_FILE_NAME', '/dev/null') self.inifile = linuxcnc.ini(INIPATH) self.STYLEEDITOR = SSE(widgets, paths) KEYBIND.add_call('Key_F12', 'on_keycall_F12') # STAT.connect('general',self.return_value) STAT.connect('state-on', self.machine_on) STAT.connect('state-off', self.machine_off) STAT.connect('gcode-line-selected', self.gcode_line_selected) STAT.connect('hard-limits-tripped', self.hard_limit_tripped) STAT.connect("interp-idle", self.interp_idle_changed) STAT.connect("user-system-changed", self.user_system_changed) STAT.connect("tool-in-spindle-changed", self.tool_in_spindle_changed) STAT.connect("file-loaded", self.file_loaded) STAT.connect("all-homed", self.all_homed) STAT.connect("not-all-homed", self.not_homed) # some global variables self.axis_list = INFO.AVAILABLE_AXES self.joint_list = INFO.AVAILABLE_JOINTS self.max_velocity = INFO.MAX_LINEAR_VELOCITY self.system_list = [ "G53", "G54", "G55", "G56", "G57", "G58", "G59", "G59.1", "G59.2", "G59.3" ] self.home_location_x = self.inifile.find('JOINT_0', 'HOME') self.home_location_y = self.inifile.find('JOINT_1', 'HOME') self.home_location_z = self.inifile.find('JOINT_2', 'HOME') self.tool_sensor_x = self.inifile.find('TOOLSENSOR', 'X') self.tool_sensor_y = self.inifile.find('TOOLSENSOR', 'Y') self.laser_offset_x = self.inifile.find('LASER', 'X') self.laser_offset_y = self.inifile.find('LASER', 'Y') self.homed = False self.start_line = 0 self.program_length = 0 self.slow_jog_factor = 10 self.tool_in_spindle = 0 self.reload_tool = 0 self.last_loaded_program = "" self.onoff_list = ["widget_controls", "Program_frame", "DRO_frame"]
def __init__(self, halcomp, widgets, paths): self.hal = halcomp self.w = widgets self.PATH = paths self._big_view = -1 self.STYLEEDITOR = SSE(widgets, paths) self.flag = 0 self.activeStyle = ''' { background-color: white;}''' self.defaultStyle = ''' { background-color: light blue;}''' self.activeWidgetDict = { 'programPage': False, 'userPage': False, 'machinePage': False, 'tooloffsetsPage': False, 'loadPage': False, 'mdiPage': False, 'workoffsetsPage': False, 'setupPage': False } self.current_mode = (None, None) self._last_count = 0
from qtvcp import logger LOG = logger.getLogger(__name__) # Set the log level for this module #LOG.setLevel(logger.INFO) # One of DEBUG, INFO, WARNING, ERROR, CRITICAL ########################################### # **** instantiate libraries section **** # ########################################### KEYBIND = Keylookup() STATUS = Status() ACTION = Action() INFO = Info() TOOLBAR = ToolBarActions() STYLEEDITOR = SSE() ################################### # **** HANDLER CLASS SECTION **** # ################################### class HandlerClass: ######################## # **** INITIALIZE **** # ######################## # widgets allows access to widgets from the qtvcp files # at this point the widgets and hal pins are not instantiated def __init__(self, halcomp,widgets,paths): self.hal = halcomp self.w = widgets self.PATHS = paths
def __init__(self, halcomp, widgets, paths): self.hal = halcomp self.w = widgets self.PATHS = paths self.STYLEEDITOR = SSE(widgets, paths)
def __init__(self, halcomp, widgets, paths): self.h = halcomp self.w = widgets self.PATHS = paths self.gcodes = GCodes(widgets) self._last_count = 0 self.degree = u"\N{DEGREE SIGN}".encode('utf-8') self.valid = QtGui.QDoubleValidator(-999.999, 999.999, 3) self.styleeditor = SSE(widgets, paths) KEYBIND.add_call('Key_F12', 'on_keycall_F12') KEYBIND.add_call('Key_Pause', 'on_keycall_pause') # some global variables self.start_line = 0 self.run_time = 0 self.time_tenths = 0 self.timerOn = False self.home_all = False self.min_spindle_rpm = INFO.MIN_SPINDLE_SPEED self.max_spindle_rpm = INFO.MAX_SPINDLE_SPEED self.max_linear_velocity = INFO.MAX_TRAJ_VELOCITY self.system_list = [ "G54", "G55", "G56", "G57", "G58", "G59", "G59.1", "G59.2", "G59.3" ] self.slow_jog_factor = 10 self.reload_tool = 0 self.last_loaded_program = "" self.first_turnon = True self.lineedit_list = [ "work_height", "touch_height", "sensor_height", "laser_x", "laser_y", "sensor_x", "sensor_y", "search_vel", "probe_vel", "max_probe", "eoffset_count" ] self.onoff_list = ["frame_dro"] self.auto_list = ["chk_eoffsets", "cmb_gcode_history"] self.axis_a_list = [ "label_axis_a", "dro_axis_a", "action_zero_a", "axistoolbutton_a", "action_home_a", "slider_jog_angular", "btn_jog_a_slow", "widget_increments_angular", "btn_jog_pos_a", "btn_jog_neg_a", "status_label_jog_angular" ] self.html = """<html> <head> <title>Test page for the download:// scheme</title> </head> <body> <h1>Setup Tab</h1> <p>If you select a file with .html as a file ending, it will be shown here..</p> <img src="file://%s" alt="lcnc_swoop" /> <hr /> <a href="http://www.linuxcnc.org/docs/2.8/html/gui/qtdragon.html">QtDragon Documentation link</a> </body> </html> """ % (os.path.join(paths.IMAGEDIR, 'lcnc_swoop.png')) STATUS.connect('general', self.dialog_return) STATUS.connect('state-on', lambda w: self.enable_onoff(True)) STATUS.connect('state-off', lambda w: self.enable_onoff(False)) STATUS.connect('mode-manual', lambda w: self.enable_auto(True)) STATUS.connect('mode-mdi', lambda w: self.enable_auto(True)) STATUS.connect('mode-auto', lambda w: self.enable_auto(False)) STATUS.connect('gcode-line-selected', lambda w, line: self.set_start_line(line)) STATUS.connect("metric-mode-changed", lambda w, d: self.mode_changed(d)) STATUS.connect('hard-limits-tripped', self.hard_limit_tripped) STATUS.connect('interp-idle', lambda w: self.set_start_line(0)) STATUS.connect('program-pause-changed', lambda w, state: self.w.spindle_pause.setEnabled(state)) STATUS.connect('user-system-changed', self.user_system_changed) STATUS.connect('file-loaded', self.file_loaded) STATUS.connect('homed', self.homed) STATUS.connect('all-homed', self.all_homed) STATUS.connect('not-all-homed', self.not_all_homed) STATUS.connect('periodic', lambda w: self.update_runtimer()) STATUS.connect('command-running', lambda w: self.start_timer()) STATUS.connect('command-stopped', lambda w: self.stop_timer()) self._block_signal = False