def updateWidgets(self):
    devices = Phonon.BackendCapabilities.availableAudioOutputDevices()
    model = Phonon.AudioOutputDeviceModel(devices)
    self.devicesListView.setModel(model)
    self.mimeListWidget.clear()
    for mimeType in Phonon.BackendCapabilities.availableMimeTypes():
        item = QtGui.QListWidgetItem(self.mimeListWidget)
        item.setText(mimeType)
    self.effectsTreeWidget.clear()
    for effect in Phonon.BackendCapabilities.availableAudioEffects():
        item = QtGui.QTreeWidgetItem(self.effectsTreeWidget)
        item.setText(0, 'Effect')
        item.setText(1, effect.name())
        item.setText(2, effect.description())
        for parameter in Phonon.Effect(effect, self).parameters():
            defaultValue = parameter.defaultValue()
            minimumValue = parameter.minimumValue()
            maximumValue = parameter.maximumValue()
            valueString = ('%s / %s / %s' % (defaultValue, minimumValue, maximumValue))
            parameterItem = QtGui.QTreeWidgetItem(item)
            parameterItem.setText(0, 'Parameter')
            parameterItem.setText(1, parameter.name())
            parameterItem.setText(2, parameter.description())
            parameterItem.setText(3, str(parameter.type()))
            parameterItem.setText(4, valueString)
    for i in range(self.effectsTreeWidget.columnCount()):
        if (i == 0):
            self.effectsTreeWidget.setColumnWidth(0, 150)
        elif (i == 2):
            self.effectsTreeWidget.setColumnWidth(2, 350)
        else:
            self.effectsTreeWidget.resizeColumnToContents(i)
def updateWidgets(self):
    devices = Phonon.BackendCapabilities.availableAudioOutputDevices()
    model = Phonon.AudioOutputDeviceModel(devices)
    self.devicesListView.setModel(model)
    self.mimeListWidget.clear()
    for mimeType in Phonon.BackendCapabilities.availableMimeTypes():
        item = QtGui.QListWidgetItem(self.mimeListWidget)
        item.setText(mimeType)
    self.effectsTreeWidget.clear()
    for effect in Phonon.BackendCapabilities.availableAudioEffects():
        item = QtGui.QTreeWidgetItem(self.effectsTreeWidget)
        item.setText(0, 'Effect')
        item.setText(1, effect.name())
        item.setText(2, effect.description())
        for parameter in Phonon.Effect(effect, self).parameters():
            defaultValue = parameter.defaultValue()
            minimumValue = parameter.minimumValue()
            maximumValue = parameter.maximumValue()
            valueString = ('%s / %s / %s' % (defaultValue, minimumValue, maximumValue))
            parameterItem = QtGui.QTreeWidgetItem(item)
            parameterItem.setText(0, 'Parameter')
            parameterItem.setText(1, parameter.name())
            parameterItem.setText(2, parameter.description())
            parameterItem.setText(3, str(parameter.type()))
            parameterItem.setText(4, valueString)
    for i in range(self.effectsTreeWidget.columnCount()):
        if (i == 0):
            self.effectsTreeWidget.setColumnWidth(0, 150)
        elif (i == 2):
            self.effectsTreeWidget.setColumnWidth(2, 350)
        else:
            self.effectsTreeWidget.resizeColumnToContents(i)