mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-26 02:20:26 -04:00 
			
		
		
		
	Test MI: added option to lock stream selection to spectrum display
This commit is contained in:
		
							parent
							
								
									e361afd29f
								
							
						
					
					
						commit
						d0c829f141
					
				| @ -150,6 +150,15 @@ void TestMIGui::on_startStop_toggled(bool checked) | ||||
| 
 | ||||
| void TestMIGui::on_streamIndex_currentIndexChanged(int index) | ||||
| { | ||||
|     if (ui->streamLock->isChecked()) | ||||
|     { | ||||
|         m_spectrumStreamIndex = index; | ||||
|         m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(true, m_spectrumStreamIndex); | ||||
|         ui->spectrumSource->blockSignals(true); | ||||
|         ui->spectrumSource->setCurrentIndex(index); | ||||
|         ui->spectrumSource->blockSignals(false); | ||||
|     } | ||||
| 
 | ||||
|     m_streamIndex = index; | ||||
|     updateFileRecordStatus(); | ||||
|     updateSampleRateAndFrequency(); | ||||
| @ -161,6 +170,23 @@ void TestMIGui::on_spectrumSource_currentIndexChanged(int index) | ||||
|     m_spectrumStreamIndex = index; | ||||
|     m_deviceUISet->m_deviceAPI->setSpectrumSinkInput(true, m_spectrumStreamIndex); | ||||
|     updateSampleRateAndFrequency(); | ||||
| 
 | ||||
|     if (ui->streamLock->isChecked()) | ||||
|     { | ||||
|         ui->streamIndex->blockSignals(true); | ||||
|         ui->streamIndex->setCurrentIndex(index); | ||||
|         ui->streamIndex->blockSignals(false); | ||||
|         m_streamIndex = index; | ||||
|         updateFileRecordStatus(); | ||||
|         displaySettings(); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void TestMIGui::on_streamLock_toggled(bool checked) | ||||
| { | ||||
|     if (checked && (ui->streamIndex->currentIndex() != ui->spectrumSource->currentIndex())) { | ||||
|         ui->spectrumSource->setCurrentIndex(ui->streamIndex->currentIndex()); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void TestMIGui::on_centerFrequency_changed(quint64 value) | ||||
|  | ||||
| @ -85,6 +85,7 @@ private slots: | ||||
| 	void on_startStop_toggled(bool checked); | ||||
|     void on_streamIndex_currentIndexChanged(int index); | ||||
|     void on_spectrumSource_currentIndexChanged(int index); | ||||
|     void on_streamLock_toggled(bool checked); | ||||
|     void on_centerFrequency_changed(quint64 value); | ||||
|     void on_autoCorr_currentIndexChanged(int index); | ||||
|     void on_frequencyShift_changed(qint64 value); | ||||
|  | ||||
| @ -102,6 +102,24 @@ | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item> | ||||
|       <widget class="QToolButton" name="streamLock"> | ||||
|        <property name="toolTip"> | ||||
|         <string>Lock spectrum display to stream selection</string> | ||||
|        </property> | ||||
|        <property name="text"> | ||||
|         <string/> | ||||
|        </property> | ||||
|        <property name="icon"> | ||||
|         <iconset resource="../../../sdrgui/resources/res.qrc"> | ||||
|          <normaloff>:/unlocked.png</normaloff> | ||||
|          <normalon>:/locked.png</normalon>:/unlocked.png</iconset> | ||||
|        </property> | ||||
|        <property name="checkable"> | ||||
|         <bool>true</bool> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item> | ||||
|       <spacer name="horizontalSpacer_7"> | ||||
|        <property name="orientation"> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user