# 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/widgets/constants.py
# MONO_FONT = 'Monospace'
# 
# FONT_SIZE = 10
# 
# Path: argos/widgets/misc.py
# class BasePanel(QtWidgets.QFrame):
#     """ Base panel from which others are derived.
# 
#         Define shape
#     """
#     def __init__(self, **kwargs):
#         super(BasePanel, self).__init__(**kwargs)
#         #self.setFrameShape(QtWidgets.QFrame.StyledPanel)
#         #self.setFrameShadow(QtWidgets.QFrame.Sunken)


import logging
from argos.qt import Qt, QtGui, QtWidgets
from argos.widgets.constants import MONO_FONT, FONT_SIZE
from argos.widgets.misc import BasePanel
#
# You should have received a copy of the GNU General Public License
# along with Argos. If not, see <http://www.gnu.org/licenses/>.

""" Widgets for displaying messages
"""
from __future__ import print_function



logger = logging.getLogger(__name__)


# The main window inherits from a Qt class, therefore it has many
# ancestors public methods and attributes.
# pylint: disable=R0901, R0902, R0904, W0201


class MessageDisplay(BasePanel):
    """ Widget that shows a label and title.
        Consists of a title label and a larger message label for details.
    """
    def __init__(self, parent=None, msg="", title="Error"):
        super(MessageDisplay, self).__init__(parent=parent)

        self.layout = QtWidgets.QVBoxLayout()
        self.setLayout(self.layout)

        self.titleLabel = QtWidgets.QLabel(title)
        self.titleLabel.setTextFormat(Qt.PlainText)

# 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/widgets/constants.py
# MONO_FONT = 'Monospace'
# 
# FONT_SIZE = 10
# 
# Path: argos/widgets/misc.py
# class BasePanel(QtWidgets.QFrame):
#     """ Base panel from which others are derived.
# 
#         Define shape
#     """
#     def __init__(self, **kwargs):
#         super(BasePanel, self).__init__(**kwargs)
#         #self.setFrameShape(QtWidgets.QFrame.StyledPanel)
#         #self.setFrameShadow(QtWidgets.QFrame.Sunken)


# Path: argos/widgets/display.py
import logging
from argos.qt import Qt, QtGui, QtWidgets
from argos.widgets.constants import MONO_FONT, FONT_SIZE
from argos.widgets.misc import BasePanel

#
# You should have received a copy of the GNU General Public License
# along with Argos. If not, see <http://www.gnu.org/licenses/>.

""" Widgets for displaying messages
"""
from __future__ import print_function



logger = logging.getLogger(__name__)


# The main window inherits from a Qt class, therefore it has many
# ancestors public methods and attributes.
# pylint: disable=R0901, R0902, R0904, W0201


class MessageDisplay(BasePanel):
    """ Widget that shows a label and title.
        Consists of a title label and a larger message label for details.
    """
    def __init__(self, parent=None, msg="", title="Error"):
        super(MessageDisplay, self).__init__(parent=parent)

        self.layout = QtWidgets.QVBoxLayout()
        self.setLayout(self.layout)

        self.titleLabel = QtWidgets.QLabel(title)
        self.titleLabel.setTextFormat(Qt.PlainText)

        self.titleLabel.setTextInteractionFlags(Qt.TextSelectableByMouse)