# Path: argos/info.py
# DEBUGGING = ('-d' in sys.argv or '--debug' in sys.argv)
# 
# Path: argos/qt/bindings.py
# API_PYSIDE2 = 'pyside2'
# API_PYQT5 = 'pyqt5'
# ALL_API = [API_PYQT5, API_PYSIDE2]
# QT_API_NAME = os.environ.get('QT_API')
#     QT_API_NAME = None
#         QT_API_NAME = API_PYQT5
#         QT_API_NAME = API_PYSIDE2
#         QT_API_NAME = API_PYQT5
#         QT_API_NAME = API_PYSIDE2


import logging
import pyqtgraph as pg
from argos.info import DEBUGGING
from argos.qt import Qt, QtCore, QtWidgets, QtSignal
from pyqtgraph.graphicsItems.PlotItem import PlotItem
    def close(self):
        """ Is called before destruction. Can be used to clean-up resources
            Could be called 'finalize' but PlotItem already has a close so we reuse that.
        """
        logger.debug("Finalizing: {}".format(self))
        super(ArgosPgPlotItem, self).close()


    def _axesMouseClickEvent(self, mouseClickEvent, axisNumber):
        """ Handles the mouse clicks events when clicked on the axes or in the central viewbox

            :param mouseClickEvent: pyqtgraph.GraphicsScene.mouseEvents.MouseClickEvent
            :param axisNumber: the axis (X=0, Y=1, both=2)

            Emits sigResetAxis when the middle mouse button is clicked.
        """
        if mouseClickEvent.button() == QtCore.Qt.MiddleButton:
            mouseClickEvent.accept()
            self.emitResetAxisSignal(axisNumber)


    def mouseClickEvent(self, mouseClickEvent):
        """ Handles (PyQtGraph) mouse click events.

            Opens the context menu if a right mouse button was clicked. (We can't simply use
            setContextMenuPolicy(Qt.ActionsContextMenu because the PlotItem class does not derive
            from QWidget).

            :param mouseClickEvent: pyqtgraph.GraphicsScene.mouseEvents.MouseClickEvent
        """

# Path: argos/info.py
# DEBUGGING = ('-d' in sys.argv or '--debug' in sys.argv)
# 
# Path: argos/qt/bindings.py
# API_PYSIDE2 = 'pyside2'
# API_PYQT5 = 'pyqt5'
# ALL_API = [API_PYQT5, API_PYSIDE2]
# QT_API_NAME = os.environ.get('QT_API')
#     QT_API_NAME = None
#         QT_API_NAME = API_PYQT5
#         QT_API_NAME = API_PYSIDE2
#         QT_API_NAME = API_PYQT5
#         QT_API_NAME = API_PYSIDE2


# Path: argos/inspector/pgplugins/pgplotitem.py
import logging
import pyqtgraph as pg
from argos.info import DEBUGGING
from argos.qt import Qt, QtCore, QtWidgets, QtSignal
from pyqtgraph.graphicsItems.PlotItem import PlotItem

    def close(self):
        """ Is called before destruction. Can be used to clean-up resources
            Could be called 'finalize' but PlotItem already has a close so we reuse that.
        """
        logger.debug("Finalizing: {}".format(self))
        super(ArgosPgPlotItem, self).close()


    def _axesMouseClickEvent(self, mouseClickEvent, axisNumber):
        """ Handles the mouse clicks events when clicked on the axes or in the central viewbox

            :param mouseClickEvent: pyqtgraph.GraphicsScene.mouseEvents.MouseClickEvent
            :param axisNumber: the axis (X=0, Y=1, both=2)

            Emits sigResetAxis when the middle mouse button is clicked.
        """
        if mouseClickEvent.button() == QtCore.Qt.MiddleButton:
            mouseClickEvent.accept()
            self.emitResetAxisSignal(axisNumber)


    def mouseClickEvent(self, mouseClickEvent):
        """ Handles (PyQtGraph) mouse click events.

            Opens the context menu if a right mouse button was clicked. (We can't simply use
            setContextMenuPolicy(Qt.ActionsContextMenu because the PlotItem class does not derive
            from QWidget).

            :param mouseClickEvent: pyqtgraph.GraphicsScene.mouseEvents.MouseClickEvent
        """

        if mouseClickEvent.button() == QtCore.Qt.RightButton: