from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import Qt import linuxcnc import hal # Set up logging from . import logger log = logger.getLogger(__name__) # log.setLevel(logger.INFO) # One of DEBUG, INFO, WARNING, ERROR, CRITICAL from qtvcp.core import Status, Info INFO = Info() STATUS = Status() ################################################################ # Action class ################################################################ class _Lcnc_Action(object): def __init__(self): # only initialize once for all instances if self.__class__._instanceNum >= 1: return self.__class__._instanceNum += 1 self.cmd = linuxcnc.command() self.tmp = None self.prefilter_path = None self.home_all_warning_flag = False
from qtvcp.core import Status, Action # Set up logging from qtvcp import logger import linuxcnc import sys import os ########################################### # **** instantiate libraries section **** # ########################################### KEYBIND = Keylookup() STATUS = Status() ACTION = Action() LOG = logger.getLogger(__name__) # Set the log level for this module #LOG.setLevel(logger.INFO) # One of DEBUG, INFO, WARNING, ERROR, CRITICAL ################################### # **** HANDLER CLASS SECTION **** # ################################### class HandlerClass: ######################## # **** INITIALIZE **** # ########################
import hal from PyQt5 import QtCore, QtWidgets from qtvcp.widgets.mdi_line import MDILine as MDI_WIDGET from qtvcp.widgets.gcode_editor import GcodeEditor as GCODE from qtvcp.widgets.tool_offsetview import ToolOffsetView as TOOL_TABLE from qtvcp.widgets.origin_offsetview import OriginOffsetView as OFFSET_VIEW from qtvcp.lib.keybindings import Keylookup from qtvcp.core import Status, Action, Info from qtvcp import logger from qtvcp.widgets.stylesheeteditor import StyleSheetEditor as SSE #from qtvcp.lib.notify import Notify LOG = logger.getLogger(__name__) KEYBIND = Keylookup() STAT = Status() INFO = Info() ACTION = Action() #NOTIFY = Notify() class HandlerClass: 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')