Ejemplo n.º 1
0
    def __init__(self, parent, logger, audiobackend):
        QtWidgets.QDialog.__init__(self, parent)
        Ui_Settings_Dialog.__init__(self)

        # Setup the user interface
        self.setupUi(self)

        self.audiobackend = audiobackend
        self.logger = logger

        devices = self.audiobackend.get_readable_devices_list()

        if devices == []:
            # no audio input device: display a message and exit
            QtWidgets.QMessageBox.critical(self, no_input_device_title,
                                           no_input_device_message)
            QtCore.QTimer.singleShot(0, self.exitOnInit)
            sys.exit(1)
            return

        for device in devices:
            self.comboBox_inputDevice.addItem(device)

        channels = self.audiobackend.get_readable_current_channels()
        for channel in channels:
            self.comboBox_firstChannel.addItem(channel)
            self.comboBox_secondChannel.addItem(channel)

        current_device = self.audiobackend.get_readable_current_device()
        self.comboBox_inputDevice.setCurrentIndex(current_device)

        first_channel = self.audiobackend.get_current_first_channel()
        self.comboBox_firstChannel.setCurrentIndex(first_channel)
        second_channel = self.audiobackend.get_current_second_channel()
        self.comboBox_secondChannel.setCurrentIndex(second_channel)

        # signals
        self.comboBox_inputDevice.currentIndexChanged.connect(
            self.input_device_changed)
        self.comboBox_firstChannel.activated.connect(
            self.first_channel_changed)
        self.comboBox_secondChannel.activated.connect(
            self.second_channel_changed)
        self.radioButton_single.toggled.connect(
            self.single_input_type_selected)
        self.radioButton_duo.toggled.connect(self.duo_input_type_selected)
Ejemplo n.º 2
0
    def __init__(self, parent, logger, audiobackend):
        QtWidgets.QDialog.__init__(self, parent)
        Ui_Settings_Dialog.__init__(self)

        # Setup the user interface
        self.setupUi(self)

        self.audiobackend = audiobackend
        self.logger = logger

        devices = self.audiobackend.get_readable_devices_list()

        if devices == []:
            # no audio input device: display a message and exit
            QtWidgets.QMessageBox.critical(self, no_input_device_title, no_input_device_message)
            QtCore.QTimer.singleShot(0, self.exitOnInit)
            return

        for device in devices:
            self.comboBox_inputDevice.addItem(device)

        channels = self.audiobackend.get_readable_current_channels()
        for channel in channels:
            self.comboBox_firstChannel.addItem(channel)
            self.comboBox_secondChannel.addItem(channel)

        current_device = self.audiobackend.get_readable_current_device()
        self.comboBox_inputDevice.setCurrentIndex(current_device)

        first_channel = self.audiobackend.get_current_first_channel()
        self.comboBox_firstChannel.setCurrentIndex(first_channel)
        second_channel = self.audiobackend.get_current_second_channel()
        self.comboBox_secondChannel.setCurrentIndex(second_channel)

        # signals
        self.comboBox_inputDevice.currentIndexChanged.connect(self.input_device_changed)
        self.comboBox_firstChannel.activated.connect(self.first_channel_changed)
        self.comboBox_secondChannel.activated.connect(self.second_channel_changed)
        self.radioButton_single.toggled.connect(self.single_input_type_selected)
        self.radioButton_duo.toggled.connect(self.duo_input_type_selected)
Ejemplo n.º 3
0
    def __init__(self, parent):
        QtGui.QDialog.__init__(self, parent)
        Ui_Settings_Dialog.__init__(self)

        # Setup the user interface
        self.setupUi(self)
Ejemplo n.º 4
0
	def __init__(self, parent):
		QtGui.QDialog.__init__(self, parent)
		Ui_Settings_Dialog.__init__(self)
		
		# Setup the user interface
		self.setupUi(self)