コード例 #1
0
ファイル: i_splash_screen.py プロジェクト: bergtholdt/pyface
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
ファイル: i_splash_screen.py プロジェクト: bergtholdt/pyface
    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)