def __init__(self, parent=None, report=True, enabled=True, *args, **kwargs):
        """
        Initializes the class.

        :param parent: Object parent.
        :type parent: QObject
        :param report: Report to Crittercism.
        :type report: bool
        :param enabled: Is reporter enabled.
        :type enabled: bool
        :param \*args: Arguments.
        :type \*args: \*
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*
        """

        if hasattr(self, "_Reporter__initialized"):
            return

        LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))

        super(Reporter, self).__init__(parent, *args, **kwargs)

        # --- Setting class attributes. ---
        self.__initialized = True

        self.__report = None
        self.report = report
        self.__enabled = None
        self.enabled = enabled

        self.__jquery_javascript_path = umbra.ui.common.get_resource_path(os.path.join("javascripts", "jquery.js"))
        self.__crittercism_javascript_path = umbra.ui.common.get_resource_path(
            os.path.join("javascripts", "crittercism.js"))
        self.__reporter_javascript_path = umbra.ui.common.get_resource_path(os.path.join("javascripts", "reporter.js"))
        self.__jquery_javascript = foundations.io.File(self.__jquery_javascript_path).read()
        self.__crittercism_javascript = foundations.io.File(self.__crittercism_javascript_path).read()
        self.__reporter_javascript = foundations.io.File(self.__reporter_javascript_path).read().format(
            UiConstants.crittercism_id, Constants.version)

        self.__style = """* {
                            margin: 0;
                            padding: 0;
                        }

                        ::-webkit-scrollbar {
                            height: 12px;
                            width: 12px;
                        }

                        ::-webkit-scrollbar-track-piece  {
                            background-color: rgb(48, 48, 48);
                        }

                        ::-webkit-scrollbar-thumb:horizontal, ::-webkit-scrollbar-thumb:vertical {
                            background-color: rgb(96, 96, 96);
                        }

                        ::-webkit-scrollbar-thumb:horizontal:hover, ::-webkit-scrollbar-thumb:vertical:hover {
                            background-color: rgb(128, 128, 128);
                        }

                        ::-webkit-scrollbar-thumb:horizontal {
                            width: 50px;
                        }

                        ::-webkit-scrollbar-thumb:vertical {
                            height: 50px;
                        }

                        body {
                            background-color: rgb(32, 32, 32);
                            color: rgb(192, 192, 192);
                            font-size: 12pt;
                            margin: 16px;
                            overflow-y: scroll;
                        }

                        A:link {
                            color: rgb(160, 96, 64);
                            text-decoration: none;
                        }

                        A:visited {
                            text-decoration: none;
                            color: rgb(160, 96, 64);
                        }

                        A:active {
                            text-decoration: none;
                            color: rgb(160, 96, 64);
                        }

                        A:hover {
                            text-decoration: underline;
                            color: rgb(160, 96, 64);
                        }

                        .floatRight {
                            float: right;
                        }

                        .textAlignRight {
                            text-align: right;
                        }

                        div {
                            overflow:hidden;
                            margin: auto;
                            text-overflow: ellipsis;
                            word-wrap: break-word;
                        }

                        div.header {
                            background-color: rgb(210, 64, 32);
                            color: rgb(32, 32, 32);
                            padding: 24px;
                        }

                        div.traceback {
                            background-color: rgb(210, 64, 32);
                            color: rgb(32, 32, 32);
                            font-size: 16px;
                            padding: 16px;
                        }

                        div.content {
                            padding: 16px;
                        }

                        div.stack {
                        }

                        div.location {
                            background-color: rgb(48, 48, 48);
                            font-size: 16px;
                            padding: 8px;
                        }

                        div.context {
                            background-color: rgb(48, 48, 48);
                            color: rgb(160, 160, 160);
                            font-family: "Courier New";
                            font-size: 14px;
                            padding: 32px;

                        }

                        span.highlight {
                            background-color: rgb(160, 96, 64);
                            color: rgb(32, 32, 32);
                            display: block;
                            font-weight: bold;
                        }

                        div.exception {
                            background-color: rgb(210, 64, 32);
                            color: rgb(32, 32, 32);
                            font-size: 16px;
                            padding: 16px;
                        }

                        div.debug {
                            padding: 16px;
                        }

                        div.frame {
                            background-color: rgb(48, 48, 48);
                            padding: 8px;
                        }

                        div.type {
                            font-size: 16px;
                        }

                        div.locals {
                            background-color: rgb(48, 48, 48);
                            color: rgb(160, 160, 160);
                            line-height: 150%;
                            padding: 32px;
                        }"""
        self.__html = None

        self.__onlineText = "An <b>unhandled</b> exception occured, \
this report has been sent to <b>HDRLabs</b> development team!"
        self.__offlineText = "An <b>unhandled</b> exception occured, \
mailing this report to <b>{0}</b> would help improving <b>{1}</b>!".format(__email__, Constants.application_name)
        self.__footerText = \
            "The severity of this exception is not critical and <b>{0}</b> will resume!".format(
                Constants.application_name)

        self.__initialize_ui()
def __init__ ( self , parent = None , report = True , enabled = True , * args , ** kwargs ) : if hasattr ( self , "_Reporter__initialized" ) : return LOGGER . debug ( "> Initializing '{0}()' class." . format ( self . __class__ . __name__ ) ) super ( Reporter , self ) . __init__ ( parent , * args , ** kwargs ) self . __initialized = True self . __report = None self . report = report self . __enabled = None self . enabled = enabled self . __jquery_javascript_path = umbra . ui . common . get_resource_path ( os . path . join ( "javascripts" , "jquery.js" ) ) self . __crittercism_javascript_path = umbra . ui . common . get_resource_path ( os . path . join ( "javascripts" , "crittercism.js" ) ) self . __reporter_javascript_path = umbra . ui . common . get_resource_path ( os . path . join ( "javascripts" , "reporter.js" ) ) self . __jquery_javascript = foundations . io . File ( self . __jquery_javascript_path ) . read ( ) self . __crittercism_javascript = foundations . io . File ( self . __crittercism_javascript_path ) . read ( ) self . __reporter_javascript = foundations . io . File ( self . __reporter_javascript_path ) . read ( ) . format ( UiConstants . crittercism_id , Constants . version ) self . __style = """* {
                            margin: 0;
                            padding: 0;
                        }
                        ::-webkit-scrollbar {
                            height: 12px;
                            width: 12px;
                        }
                        ::-webkit-scrollbar-track-piece  {
                            background-color: rgb(48, 48, 48);
                        }
                        ::-webkit-scrollbar-thumb:horizontal, ::-webkit-scrollbar-thumb:vertical {
                            background-color: rgb(96, 96, 96);
                        }
                        ::-webkit-scrollbar-thumb:horizontal:hover, ::-webkit-scrollbar-thumb:vertical:hover {
                            background-color: rgb(128, 128, 128);
                        }
                        ::-webkit-scrollbar-thumb:horizontal {
                            width: 50px;
                        }
                        ::-webkit-scrollbar-thumb:vertical {
                            height: 50px;
                        }
                        body {
                            background-color: rgb(32, 32, 32);
                            color: rgb(192, 192, 192);
                            font-size: 12pt;
                            margin: 16px;
                            overflow-y: scroll;
                        }
                        A:link {
                            color: rgb(160, 96, 64);
                            text-decoration: none;
                        }
                        A:visited {
                            text-decoration: none;
                            color: rgb(160, 96, 64);
                        }
                        A:active {
                            text-decoration: none;
                            color: rgb(160, 96, 64);
                        }
                        A:hover {
                            text-decoration: underline;
                            color: rgb(160, 96, 64);
                        }
                        .floatRight {
                            float: right;
                        }
                        .textAlignRight {
                            text-align: right;
                        }
                        div {
                            overflow:hidden;
                            margin: auto;
                            text-overflow: ellipsis;
                            word-wrap: break-word;
                        }
                        div.header {
                            background-color: rgb(210, 64, 32);
                            color: rgb(32, 32, 32);
                            padding: 24px;
                        }
                        div.traceback {
                            background-color: rgb(210, 64, 32);
                            color: rgb(32, 32, 32);
                            font-size: 16px;
                            padding: 16px;
                        }
                        div.content {
                            padding: 16px;
                        }
                        div.stack {
                        }
                        div.location {
                            background-color: rgb(48, 48, 48);
                            font-size: 16px;
                            padding: 8px;
                        }
                        div.context {
                            background-color: rgb(48, 48, 48);
                            color: rgb(160, 160, 160);
                            font-family: "Courier New";
                            font-size: 14px;
                            padding: 32px;
                        }
                        span.highlight {
                            background-color: rgb(160, 96, 64);
                            color: rgb(32, 32, 32);
                            display: block;
                            font-weight: bold;
                        }
                        div.exception {
                            background-color: rgb(210, 64, 32);
                            color: rgb(32, 32, 32);
                            font-size: 16px;
                            padding: 16px;
                        }
                        div.debug {
                            padding: 16px;
                        }
                        div.frame {
                            background-color: rgb(48, 48, 48);
                            padding: 8px;
                        }
                        div.type {
                            font-size: 16px;
                        }
                        div.locals {
                            background-color: rgb(48, 48, 48);
                            color: rgb(160, 160, 160);
                            line-height: 150%;
                            padding: 32px;
                        }""" self . __html = None self . __onlineText = "An <b>unhandled</b> exception occured, \
this report has been sent to <b>HDRLabs</b> development team!" self . __offlineText = "An <b>unhandled</b> exception occured, \
mailing this report to <b>{0}</b> would help improving <b>{1}</b>!" . format ( __email__ , Constants . application_name ) self . __footerText = "The severity of this exception is not critical and <b>{0}</b> will resume!" . format ( Constants . application_name ) self . __initialize_ui ( )
Initializes the class.

        :param parent: Object parent.
        :type parent: QObject
        :param report: Report to Crittercism.
        :type report: bool
        :param enabled: Is reporter enabled.
        :type enabled: bool
        :param \*args: Arguments.
        :type \*args: \*
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*