Exemplo n.º 1
0
class DebuggerExceptions(QWidget):
    " Implements the debugger context viewer "

    def __init__(self, parent=None):
        QWidget.__init__(self, parent)

        self.__createLayout()
        self.connect(self.clientExcptViewer, SIGNAL('ClientExceptionsCleared'),
                     self.__onClientExceptionsCleared)
        return

    def __createLayout(self):
        " Creates the widget layout "

        verticalLayout = QVBoxLayout(self)
        verticalLayout.setContentsMargins(1, 1, 1, 1)

        self.splitter = QSplitter(Qt.Vertical)

        self.ignoredExcptViewer = IgnoredExceptionsViewer(self.splitter)
        self.clientExcptViewer = ClientExceptionsViewer(
            self.splitter, self.ignoredExcptViewer)

        self.splitter.addWidget(self.clientExcptViewer)
        self.splitter.addWidget(self.ignoredExcptViewer)

        self.splitter.setCollapsible(0, False)
        self.splitter.setCollapsible(1, False)

        verticalLayout.addWidget(self.splitter)
        return

    def clear(self):
        " Clears everything "
        self.clientExcptViewer.clear()
        return

    def addException(self, exceptionType, exceptionMessage, stackTrace):
        " Adds the exception to the view "
        self.clientExcptViewer.addException(exceptionType, exceptionMessage,
                                            stackTrace)
        return

    def isIgnored(self, exceptionType):
        " Returns True if this exception type should be ignored "
        return self.ignoredExcptViewer.isIgnored(exceptionType)

    def setFocus(self):
        " Sets the focus to the client exception window "
        self.clientExcptViewer.setFocus()
        return

    def getTotalClientExceptionCount(self):
        " Provides the total number of the client exceptions "
        return self.clientExcptViewer.getTotalCount()

    def __onClientExceptionsCleared(self):
        " Triggered when the user cleared exceptions "
        self.emit(SIGNAL('ClientExceptionsCleared'))
        return
Exemplo n.º 2
0
    def __createLayout(self):
        " Creates the widget layout "

        verticalLayout = QVBoxLayout(self)
        verticalLayout.setContentsMargins(1, 1, 1, 1)

        self.splitter = QSplitter(Qt.Vertical)

        self.ignoredExcptViewer = IgnoredExceptionsViewer(self.splitter)
        self.clientExcptViewer = ClientExceptionsViewer(
            self.splitter, self.ignoredExcptViewer)

        self.splitter.addWidget(self.clientExcptViewer)
        self.splitter.addWidget(self.ignoredExcptViewer)

        self.splitter.setCollapsible(0, False)
        self.splitter.setCollapsible(1, False)

        verticalLayout.addWidget(self.splitter)
        return
Exemplo n.º 3
0
    def __createLayout( self ):
        " Creates the widget layout "

        verticalLayout = QVBoxLayout( self )
        verticalLayout.setContentsMargins( 1, 1, 1, 1 )

        self.splitter = QSplitter( Qt.Vertical )

        self.ignoredExcptViewer = IgnoredExceptionsViewer( self.splitter )
        self.clientExcptViewer = ClientExceptionsViewer( self.splitter,
                                                           self.ignoredExcptViewer )

        self.splitter.addWidget( self.clientExcptViewer )
        self.splitter.addWidget( self.ignoredExcptViewer )

        self.splitter.setCollapsible( 0, False )
        self.splitter.setCollapsible( 1, False )

        verticalLayout.addWidget( self.splitter )
        return
Exemplo n.º 4
0
class DebuggerExceptions( QWidget ):
    " Implements the debugger context viewer "

    def __init__( self, parent = None ):
        QWidget.__init__( self, parent )

        self.__createLayout()
        self.connect( self.clientExcptViewer,
                      SIGNAL( 'ClientExceptionsCleared' ),
                      self.__onClientExceptionsCleared )
        return

    def __createLayout( self ):
        " Creates the widget layout "

        verticalLayout = QVBoxLayout( self )
        verticalLayout.setContentsMargins( 1, 1, 1, 1 )

        self.splitter = QSplitter( Qt.Vertical )

        self.ignoredExcptViewer = IgnoredExceptionsViewer( self.splitter )
        self.clientExcptViewer = ClientExceptionsViewer( self.splitter,
                                                           self.ignoredExcptViewer )

        self.splitter.addWidget( self.clientExcptViewer )
        self.splitter.addWidget( self.ignoredExcptViewer )

        self.splitter.setCollapsible( 0, False )
        self.splitter.setCollapsible( 1, False )

        verticalLayout.addWidget( self.splitter )
        return

    def clear( self ):
        " Clears everything "
        self.clientExcptViewer.clear()
        return

    def addException( self, exceptionType, exceptionMessage,
                            stackTrace ):
        " Adds the exception to the view "
        self.clientExcptViewer.addException( exceptionType, exceptionMessage,
                                             stackTrace )
        return

    def isIgnored( self, exceptionType ):
        " Returns True if this exception type should be ignored "
        return self.ignoredExcptViewer.isIgnored( exceptionType )

    def setFocus( self ):
        " Sets the focus to the client exception window "
        self.clientExcptViewer.setFocus()
        return

    def getTotalClientExceptionCount( self ):
        " Provides the total number of the client exceptions "
        return self.clientExcptViewer.getTotalCount()

    def __onClientExceptionsCleared( self ):
        " Triggered when the user cleared exceptions "
        self.emit( SIGNAL( 'ClientExceptionsCleared' ) )
        return