# 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/utils/defs.py
# class InvalidInputError(Exception):
#     """ Exception raised when the input is invalid after editing
#     """
#     pass


import logging
from argos.qt import QtCore, QtGui, QtWidgets, Qt
from argos.utils.defs import InvalidInputError


    def setData(self, qColor):
        """ Provides the main editor widget with a data to manipulate.
        """
        self.lineEditor.setText(qColor.name().upper())
        self.lineEditor.setFocus(Qt.OtherFocusReason)  #


    def getData(self):
        """ Gets data from the editor widget.
        """
        text = self.lineEditor.text()
        if not text.startswith('#'):
            text = '#' + text

        validator = self.lineEditor.validator()
        if validator is not None:
            state, text, _ = validator.validate(text, 0)
            if state != QtGui.QValidator.Acceptable:
                raise InvalidInputError("Invalid input: {!r}".format(text))

        return  text


    def openColorDialog(self):
        """ Opens a QColorDialog for the user
        """
        try:
            currentColor = self.getData()

# 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/utils/defs.py
# class InvalidInputError(Exception):
#     """ Exception raised when the input is invalid after editing
#     """
#     pass


# Path: argos/qt/colorselect.py
import logging
from argos.qt import QtCore, QtGui, QtWidgets, Qt
from argos.utils.defs import InvalidInputError



    def setData(self, qColor):
        """ Provides the main editor widget with a data to manipulate.
        """
        self.lineEditor.setText(qColor.name().upper())
        self.lineEditor.setFocus(Qt.OtherFocusReason)  #


    def getData(self):
        """ Gets data from the editor widget.
        """
        text = self.lineEditor.text()
        if not text.startswith('#'):
            text = '#' + text

        validator = self.lineEditor.validator()
        if validator is not None:
            state, text, _ = validator.validate(text, 0)
            if state != QtGui.QValidator.Acceptable:
                raise InvalidInputError("Invalid input: {!r}".format(text))

        return  text


    def openColorDialog(self):
        """ Opens a QColorDialog for the user
        """
        try:
            currentColor = self.getData()

        except InvalidInputError: