示例#1
0
class MSplashScreen(object):
    """ The mixin class that contains common code for toolkit specific
    implementations of the ISplashScreen interface.

    Reimplements: open(), close()
    """

    ###########################################################################
    # 'IWindow' interface.
    ###########################################################################

    def open(self):
        """ Creates the toolkit-specific control for the widget. """

        super(MSplashScreen, self).open()

        if self.show_log_messages:
            self._log_handler = SplashScreenLogHandler(self)
            self._log_handler.setLevel(self.log_level)

            # Get the root logger.
            logger = logging.getLogger()
            logger.addHandler(self._log_handler)

    def close(self):
        """ Close the window. """

        if self.show_log_messages:
            # Get the root logger.
            logger = logging.getLogger()
            logger.removeHandler(self._log_handler)

        super(MSplashScreen, self).close()
示例#2
0
class MSplashScreen(HasTraits):
    """ The mixin class that contains common code for toolkit specific
    implementations of the ISplashScreen interface.

    Reimplements: open(), close()
    """

    # ------------------------------------------------------------------------
    # 'IWindow' interface.
    # ------------------------------------------------------------------------

    def open(self):
        """ Creates the toolkit-specific control for the widget. """

        super(MSplashScreen, self).open()

        if self.show_log_messages:
            self._log_handler = SplashScreenLogHandler(self)
            self._log_handler.setLevel(self.log_level)

            # Get the root logger.
            logger = logging.getLogger()
            logger.addHandler(self._log_handler)

    def close(self):
        """ Close the window. """

        if self.show_log_messages:
            # Get the root logger.
            logger = logging.getLogger()
            logger.removeHandler(self._log_handler)

        super(MSplashScreen, self).close()
示例#3
0
    def open(self):
        """ Creates the toolkit-specific control for the widget. """

        super(MSplashScreen, self).open()

        if self.show_log_messages:
            self._log_handler = SplashScreenLogHandler(self)
            self._log_handler.setLevel(self.log_level)

            # Get the root logger.
            logger = logging.getLogger()
            logger.addHandler(self._log_handler)
示例#4
0
    def open(self):
        """ Creates the toolkit-specific control for the widget. """

        super(MSplashScreen, self).open()

        if self.show_log_messages:
            self._log_handler = SplashScreenLogHandler(self)
            self._log_handler.setLevel(self.log_level)

            # Get the root logger.
            logger = logging.getLogger()
            logger.addHandler(self._log_handler)