def __init__(self, controller, parent=None): QWidget.__init__(self, parent) self.controller = controller self.setupUi(self) self.name = "Audio" self.enabledCheckBox = None QObject.connect(self.recordingEnabled_button, SIGNAL("clicked()"), self.recordingEnabledDisabled) PluginAudioWorker.initializeAudio() # populate the input devices combo settings = QSettings() settings.beginGroup("/plugins/GatherPlugin/Audio") defaultDeviceIndex = settings.value( "inputDevice", PluginAudioWorker.defaultDeviceIndex()).toInt()[0] for device in PluginAudioWorker.devices(): if device.isInput: self.cboInputDevice.addItem( "[%s] %s" % (device.api, device.name), QVariant(device.index)) if device.index == defaultDeviceIndex: self.cboInputDevice.setCurrentIndex( self.cboInputDevice.count() - 1) # use last added device enabled = settings.value("recordingEnabled", QVariant(True)).toBool() self.recordingEnabled_button.setChecked(enabled)
def __init__(self, controller, parent=None): QWidget.__init__(self, parent) self.controller=controller self.setupUi(self) self.name="Audio" self.enabledCheckBox=None QObject.connect( self.recordingEnabled_button, SIGNAL("clicked()"), self.recordingEnabledDisabled ) PluginAudioWorker.initializeAudio() # populate the input devices combo settings = QSettings() settings.beginGroup("/plugins/GatherPlugin/Audio") defaultDeviceIndex = settings.value("inputDevice", PluginAudioWorker.defaultDeviceIndex()).toInt()[0] for device in PluginAudioWorker.devices(): if device.isInput: self.cboInputDevice.addItem( "[%s] %s" % (device.api, device.name), QVariant(device.index)) if device.index == defaultDeviceIndex: self.cboInputDevice.setCurrentIndex( self.cboInputDevice.count()-1 ) # use last added device enabled = settings.value("recordingEnabled", QVariant(True)).toBool() self.recordingEnabled_button.setChecked(enabled)