示例#1
0
    def chooseAnnotation(self, action):

        text = action.text()
        audioGlobals.text_ = text

        if text in audioGlobals.classLabels:
            if text == 'Speech':
                audioGlobals.colorName = 'green'
            elif text == 'Music':
                audioGlobals.colorName = 'red'
            elif text == 'Activity':
                audioGlobals.colorName = 'magenta'

            elif text == 'Laugh':
                audioGlobals.colorName = 'yellow'
            elif text == 'Cough':
                audioGlobals.colorName = '#4B0082'
            elif text == 'Moan':
                audioGlobals.colorName = '#800000'

            eA.saveAnnotation()
            self.draw()
            audioGlobals.chartFig.axes.clear()
            audioGlobals.chartFig.drawChart()
            audioGlobals.chartFig.draw()
示例#2
0
    def closeSpeaker(self):
        if audioGlobals.text_ != 'Add New Speaker':
            audioGlobals.text_ = 'Speech::' + self.speakerID.text()
            self.Ok.clicked.disconnect()
            self.close()

            eA.saveAnnotation()
            audioGlobals.fig.draw()
            audioGlobals.chartFig.axes.clear()
            audioGlobals.chartFig.drawChart()
            audioGlobals.chartFig.draw()
示例#3
0
    def closeSpeaker(self):
        if audioGlobals.text_ != 'Add New Speaker':
            audioGlobals.text_ = 'Speech::' + self.speakerID.text()
            self.Ok.clicked.disconnect() 
            self.close()

            eA.saveAnnotation()
            audioGlobals.fig.draw()
            audioGlobals.chartFig.axes.clear()
            audioGlobals.chartFig.drawChart()
            audioGlobals.chartFig.draw()
示例#4
0
    def Speakers(self, action):
        text = action.text()

        if text == 'Add New Speaker':
            self.newSpeaker()
        else:
            audioGlobals.text_ = 'Speech::' + text
            eA.saveAnnotation()
            self.draw()
            audioGlobals.chartFig.axes.clear()
            audioGlobals.chartFig.drawChart()
            audioGlobals.chartFig.draw()
示例#5
0
    def Speakers(self, action):
        text = action.text()

        if text == 'Add New Speaker':
            self.newSpeaker()
        else:
            audioGlobals.text_ = 'Speech::' + text
            eA.saveAnnotation()
            self.draw()
            audioGlobals.chartFig.axes.clear()
            audioGlobals.chartFig.drawChart()
            audioGlobals.chartFig.draw()
示例#6
0
    def chooseAnnotation(self, action):
        global doIt

        doIt = False

        text = action.text()
        audioGlobals.text_ = text


        if text == 'Speech':
            audioGlobals.colorName = 'green'
            doIt = True

        elif text == 'Music':
            audioGlobals.colorName = 'red'
            doIt = True

        elif text == 'Activity':
            audioGlobals.colorName = 'magenta'
            doIt = True

        elif text == 'Laugh':
            audioGlobals.colorName = 'yellow'
            doIt = True
        elif text == 'Cough':
            audioGlobals.colorName = '#4B0082'
            doIt = True
        elif text == 'Moan':
            audioGlobals.colorName = '#800000'
            doIt = True
        elif text == 'Steps':
            doIt = True
        elif text =='TV':
            doIt = True
        
        if doIt:
            eA.saveAnnotation()
            self.draw()
            audioGlobals.chartFig.axes.clear()
            audioGlobals.chartFig.drawChart()
            audioGlobals.chartFig.draw()
示例#7
0
    def chooseAnnotation(self, action):
        global doIt

        doIt = False

        text = action.text()
        audioGlobals.text_ = text


        if text == 'Speech':
            audioGlobals.colorName = 'green'
            doIt = True

        elif text == 'Music':
            audioGlobals.colorName = 'red'
            doIt = True

        elif text == 'Activity':
            audioGlobals.colorName = 'magenta'
            doIt = True

        elif text == 'Laugh':
            audioGlobals.colorName = 'yellow'
            doIt = True
        elif text == 'Cough':
            audioGlobals.colorName = '#4B0082'
            doIt = True
        elif text == 'Moan':
            audioGlobals.colorName = '#800000'
            doIt = True
        elif text == 'Steps':
            doIt = True
        elif text =='TV':
            doIt = True
        
        if doIt:
            eA.saveAnnotation()
            self.draw()
            audioGlobals.chartFig.axes.clear()
            audioGlobals.chartFig.drawChart()
            audioGlobals.chartFig.draw()