# Path: argos/info.py
# DEBUGGING = ('-d' in sys.argv or '--debug' in sys.argv)
# TESTING = True # add some test menu options
# PROFILING = False# and DEBUGGING
# VERSION = '0.4.1'
# REPO_NAME = "argos"
# SCRIPT_NAME = "argos"
# PACKAGE_NAME = "argos"
# PROJECT_NAME = "Argos"
# SHORT_DESCRIPTION = "Argos HDF5/NetCDF/scientific data viewer."
# PROJECT_URL = "https://github.com/titusjan/argos"
# AUTHOR = "Pepijn Kenter"
# EMAIL = "titusjan@gmail.com"
# ORGANIZATION_NAME = "titusjan"
# ORGANIZATION_DOMAIN = "titusjan.nl"
# EXIT_CODE_SUCCESS = 0
# EXIT_CODE_ERROR = 1
# EXIT_CODE_COMMAND_ARGS = 2
# EXIT_CODE_RESTART = 66 # Indicates the program is being 'restarted'
# KEY_PROGRAM = '_program'
# KEY_VERSION = '_version'
# def program_directory():
# def resource_directory():
# def icons_directory():
# 
# 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 os
import sys
import traceback
from argos import info
from argos.qt.bindings import QtCore, QtWidgets
        self.detailsBoxWidth = detailsBoxWidth
        self.detailBoxHeight = detailBoxHeight


    def resizeEvent(self, event):
        """ Resizes the details box if present (i.e. when 'Show Details' button was clicked)
        """
        result = super(ResizeDetailsMessageBox, self).resizeEvent(event)

        details_box = self.findChild(QtWidgets.QTextEdit)
        if details_box is not None:
            #details_box.setFixedSize(details_box.sizeHint())
            details_box.setFixedSize(QtCore.QSize(self.detailsBoxWidth, self.detailBoxHeight))

        return result



def handleException(exc_type, exc_value, exc_traceback):

    traceback.format_exception(exc_type, exc_value, exc_traceback)

    logger.critical("Bug: uncaught {}".format(exc_type.__name__),
                    exc_info=(exc_type, exc_value, exc_traceback))
    if info.DEBUGGING:
        logger.info("Quitting application with exit code 1")
        sys.exit(1)
    else:
        # Constructing a QApplication in case this hasn't been done yet.
        if not QtWidgets.qApp:

# Path: argos/info.py
# DEBUGGING = ('-d' in sys.argv or '--debug' in sys.argv)
# TESTING = True # add some test menu options
# PROFILING = False# and DEBUGGING
# VERSION = '0.4.1'
# REPO_NAME = "argos"
# SCRIPT_NAME = "argos"
# PACKAGE_NAME = "argos"
# PROJECT_NAME = "Argos"
# SHORT_DESCRIPTION = "Argos HDF5/NetCDF/scientific data viewer."
# PROJECT_URL = "https://github.com/titusjan/argos"
# AUTHOR = "Pepijn Kenter"
# EMAIL = "titusjan@gmail.com"
# ORGANIZATION_NAME = "titusjan"
# ORGANIZATION_DOMAIN = "titusjan.nl"
# EXIT_CODE_SUCCESS = 0
# EXIT_CODE_ERROR = 1
# EXIT_CODE_COMMAND_ARGS = 2
# EXIT_CODE_RESTART = 66 # Indicates the program is being 'restarted'
# KEY_PROGRAM = '_program'
# KEY_VERSION = '_version'
# def program_directory():
# def resource_directory():
# def icons_directory():
# 
# 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/qt/misc.py
import logging
import os
import sys
import traceback
from argos import info
from argos.qt.bindings import QtCore, QtWidgets

        self.detailsBoxWidth = detailsBoxWidth
        self.detailBoxHeight = detailBoxHeight


    def resizeEvent(self, event):
        """ Resizes the details box if present (i.e. when 'Show Details' button was clicked)
        """
        result = super(ResizeDetailsMessageBox, self).resizeEvent(event)

        details_box = self.findChild(QtWidgets.QTextEdit)
        if details_box is not None:
            #details_box.setFixedSize(details_box.sizeHint())
            details_box.setFixedSize(QtCore.QSize(self.detailsBoxWidth, self.detailBoxHeight))

        return result



def handleException(exc_type, exc_value, exc_traceback):

    traceback.format_exception(exc_type, exc_value, exc_traceback)

    logger.critical("Bug: uncaught {}".format(exc_type.__name__),
                    exc_info=(exc_type, exc_value, exc_traceback))
    if info.DEBUGGING:
        logger.info("Quitting application with exit code 1")
        sys.exit(1)
    else:
        # Constructing a QApplication in case this hasn't been done yet.
        if not QtWidgets.qApp:

            _app = QtWidgets.QApplication()