mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 13:00:26 -04:00 
			
		
		
		
	RTLSDR GUI file record: right click to choose file
This commit is contained in:
		
							parent
							
								
									597633009c
								
							
						
					
					
						commit
						71e65c4e9c
					
				| @ -17,6 +17,7 @@ | ||||
| 
 | ||||
| #include <QDebug> | ||||
| #include <QMessageBox> | ||||
| #include <QFileDialog> | ||||
| 
 | ||||
| #include "rtlsdrgui.h" | ||||
| 
 | ||||
| @ -69,6 +70,9 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : | ||||
| 
 | ||||
|     CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); | ||||
|     connect(startStopRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &))); | ||||
| 
 | ||||
|     CRightClickEnabler *fileRecordRightClickEnabler = new CRightClickEnabler(ui->record); | ||||
|     connect(fileRecordRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(openFileRecordDialog(const QPoint &))); | ||||
| } | ||||
| 
 | ||||
| RTLSDRGui::~RTLSDRGui() | ||||
| @ -576,3 +580,29 @@ void RTLSDRGui::openDeviceSettingsDialog(const QPoint& p) | ||||
| 
 | ||||
|     sendSettings(); | ||||
| } | ||||
| 
 | ||||
| void RTLSDRGui::openFileRecordDialog(const QPoint& p) | ||||
| { | ||||
|     QFileDialog fileDialog( | ||||
|         this, | ||||
|         tr("Save I/Q record file"), | ||||
|         m_settings.m_fileRecordName, | ||||
|         tr("SDR I/Q Files (*.sdriq)") | ||||
|     ); | ||||
| 
 | ||||
|     fileDialog.setOptions(QFileDialog::DontUseNativeDialog); | ||||
|     fileDialog.setFileMode(QFileDialog::AnyFile); | ||||
|     fileDialog.move(p); | ||||
|     QStringList fileNames; | ||||
| 
 | ||||
|     if (fileDialog.exec()) | ||||
|     { | ||||
|         fileNames = fileDialog.selectedFiles(); | ||||
| 
 | ||||
|         if (fileNames.size() > 0) | ||||
|         { | ||||
|             m_settings.m_fileRecordName = fileNames.at(0); | ||||
|             sendSettings(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -98,6 +98,7 @@ private slots: | ||||
|     void on_transverter_clicked(); | ||||
|     void on_sampleRateMode_toggled(bool checked); | ||||
|     void openDeviceSettingsDialog(const QPoint& p); | ||||
|     void openFileRecordDialog(const QPoint& p); | ||||
| 	void updateHardware(); | ||||
| 	void updateStatus(); | ||||
| }; | ||||
|  | ||||
| @ -74,7 +74,7 @@ | ||||
|          <item> | ||||
|           <widget class="ButtonSwitch" name="record"> | ||||
|            <property name="toolTip"> | ||||
|             <string>Toggle record I/Q samples from device</string> | ||||
|             <string>Left: toggle record I/Q samples from device - Right: select output file</string> | ||||
|            </property> | ||||
|            <property name="text"> | ||||
|             <string/> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user