# 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 __init__(self, parent=None):
        super(ColorSelectWidget, self).__init__(parent=parent)

        self.mainLayout = QtWidgets.QHBoxLayout()
        self.mainLayout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.mainLayout)

        self.lineEditor = QtWidgets.QLineEdit()
        self.lineEditor.setToolTip("Color hex code: a '#' followed by 6 hex-digits.")
        self.mainLayout.addWidget(self.lineEditor)
        self.setFocusProxy(self.lineEditor)

        regExp = QtCore.QRegExp(r'#[0-9A-F]{6}', Qt.CaseInsensitive)
        validator = QtGui.QRegExpValidator(regExp, parent=self)
        self.lineEditor.setValidator(validator)

        self.pickButton = QtWidgets.QPushButton()
        self.pickButton.setText("Color Picker...")
        self.pickButton.setToolTip("Open color dialog.")
        self.pickButton.setFocusPolicy(Qt.NoFocus)
        self.pickButton.clicked.connect(self.openColorDialog)

        self.mainLayout.addWidget(self.pickButton)


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

# 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 __init__(self, parent=None):
        super(ColorSelectWidget, self).__init__(parent=parent)

        self.mainLayout = QtWidgets.QHBoxLayout()
        self.mainLayout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.mainLayout)

        self.lineEditor = QtWidgets.QLineEdit()
        self.lineEditor.setToolTip("Color hex code: a '#' followed by 6 hex-digits.")
        self.mainLayout.addWidget(self.lineEditor)
        self.setFocusProxy(self.lineEditor)

        regExp = QtCore.QRegExp(r'#[0-9A-F]{6}', Qt.CaseInsensitive)
        validator = QtGui.QRegExpValidator(regExp, parent=self)
        self.lineEditor.setValidator(validator)

        self.pickButton = QtWidgets.QPushButton()
        self.pickButton.setText("Color Picker...")
        self.pickButton.setToolTip("Open color dialog.")
        self.pickButton.setFocusPolicy(Qt.NoFocus)
        self.pickButton.clicked.connect(self.openColorDialog)

        self.mainLayout.addWidget(self.pickButton)


    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)  #