def populateTable(self): row = 0 format = QAudioFormat() for codec in self.deviceInfo.supportedCodecs(): format.setCodec(codec) for frequency in self.deviceInfo.supportedFrequencies(): format.setFrequency(frequency) for channels in self.deviceInfo.supportedChannels(): format.setChannels(channels) for sampleType in self.deviceInfo.supportedSampleTypes(): format.setSampleType(sampleType) for sampleSize in self.deviceInfo.supportedSampleSizes( ): format.setSampleSize(sampleSize) for endian in self.deviceInfo.supportedByteOrders( ): format.setByteOrder(endian) if self.deviceInfo.isFormatSupported(format): self.allFormatsTable.setRowCount(row + 1) codecItem = QTableWidgetItem( format.codec()) self.allFormatsTable.setItem( row, 0, codecItem) frequencyItem = QTableWidgetItem( str(format.frequency())) self.allFormatsTable.setItem( row, 1, frequencyItem) channelsItem = QTableWidgetItem( str(format.channels())) self.allFormatsTable.setItem( row, 2, channelsItem) sampleTypeItem = QTableWidgetItem( sampletoString(format.sampleType())) self.allFormatsTable.setItem( row, 3, sampleTypeItem) sampleSizeItem = QTableWidgetItem( str(format.sampleSize())) self.allFormatsTable.setItem( row, 4, sampleSizeItem) byteOrderItem = QTableWidgetItem( byteOrdertoString(format.byteOrder())) self.allFormatsTable.setItem( row, 5, byteOrderItem) row += 1
def populateTable(self): row = 0 format = QAudioFormat() for codec in self.deviceInfo.supportedCodecs(): format.setCodec(codec) for frequency in self.deviceInfo.supportedFrequencies(): format.setFrequency(frequency) for channels in self.deviceInfo.supportedChannels(): format.setChannels(channels) for sampleType in self.deviceInfo.supportedSampleTypes(): format.setSampleType(sampleType) for sampleSize in self.deviceInfo.supportedSampleSizes(): format.setSampleSize(sampleSize) for endian in self.deviceInfo.supportedByteOrders(): format.setByteOrder(endian) if self.deviceInfo.isFormatSupported(format): self.allFormatsTable.setRowCount(row + 1); codecItem = QTableWidgetItem(format.codec()) self.allFormatsTable.setItem(row, 0, codecItem) frequencyItem = QTableWidgetItem(str(format.frequency())) self.allFormatsTable.setItem(row, 1, frequencyItem) channelsItem = QTableWidgetItem(str(format.channels())) self.allFormatsTable.setItem(row, 2, channelsItem) sampleTypeItem = QTableWidgetItem(sampletoString(format.sampleType())) self.allFormatsTable.setItem(row, 3, sampleTypeItem) sampleSizeItem = QTableWidgetItem(str(format.sampleSize())) self.allFormatsTable.setItem(row, 4, sampleSizeItem) byteOrderItem = QTableWidgetItem(byteOrdertoString(format.byteOrder())) self.allFormatsTable.setItem(row, 5, byteOrderItem) row += 1