mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 21:20:31 -05:00 
			
		
		
		
	Moved audio dialog in global Preferences menu. Check for DV Serial library and set flags
This commit is contained in:
		
							parent
							
								
									376e2c05b4
								
							
						
					
					
						commit
						ccca87477d
					
				@ -50,6 +50,11 @@ find_package(Boost)
 | 
				
			|||||||
find_package(FFTW3F)
 | 
					find_package(FFTW3F)
 | 
				
			||||||
find_package(LibDSDcc)
 | 
					find_package(LibDSDcc)
 | 
				
			||||||
find_package(LibMbe)
 | 
					find_package(LibMbe)
 | 
				
			||||||
 | 
					find_package(SerialDV)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (LIBSERIALDV_FOUND)
 | 
				
			||||||
 | 
					    add_definitions(-DDSD_USE_SERIALDV)
 | 
				
			||||||
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|x86")
 | 
					IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|x86")
 | 
				
			||||||
 SET(USE_SIMD "SSE2" CACHE STRING "Use SIMD instructions")
 | 
					 SET(USE_SIMD "SSE2" CACHE STRING "Use SIMD instructions")
 | 
				
			||||||
@ -127,7 +132,7 @@ set(sdrbase_SOURCES
 | 
				
			|||||||
	sdrbase/gui/glspectrumgui.cpp
 | 
						sdrbase/gui/glspectrumgui.cpp
 | 
				
			||||||
	sdrbase/gui/indicator.cpp
 | 
						sdrbase/gui/indicator.cpp
 | 
				
			||||||
	sdrbase/gui/pluginsdialog.cpp
 | 
						sdrbase/gui/pluginsdialog.cpp
 | 
				
			||||||
	sdrbase/gui/preferencesdialog.cpp
 | 
						sdrbase/gui/audiodialog.cpp
 | 
				
			||||||
	sdrbase/gui/presetitem.cpp
 | 
						sdrbase/gui/presetitem.cpp
 | 
				
			||||||
	sdrbase/gui/rollupwidget.cpp
 | 
						sdrbase/gui/rollupwidget.cpp
 | 
				
			||||||
	sdrbase/gui/scale.cpp
 | 
						sdrbase/gui/scale.cpp
 | 
				
			||||||
@ -212,7 +217,7 @@ set(sdrbase_HEADERS
 | 
				
			|||||||
	sdrbase/gui/indicator.h
 | 
						sdrbase/gui/indicator.h
 | 
				
			||||||
	sdrbase/gui/physicalunit.h
 | 
						sdrbase/gui/physicalunit.h
 | 
				
			||||||
	sdrbase/gui/pluginsdialog.h
 | 
						sdrbase/gui/pluginsdialog.h
 | 
				
			||||||
	sdrbase/gui/preferencesdialog.h
 | 
						sdrbase/gui/audiodialog.h
 | 
				
			||||||
	sdrbase/gui/presetitem.h
 | 
						sdrbase/gui/presetitem.h
 | 
				
			||||||
	sdrbase/gui/rollupwidget.h
 | 
						sdrbase/gui/rollupwidget.h
 | 
				
			||||||
	sdrbase/gui/scale.h
 | 
						sdrbase/gui/scale.h
 | 
				
			||||||
@ -256,7 +261,7 @@ set(sdrbase_FORMS
 | 
				
			|||||||
	sdrbase/gui/glscopegui.ui
 | 
						sdrbase/gui/glscopegui.ui
 | 
				
			||||||
	sdrbase/gui/glspectrumgui.ui
 | 
						sdrbase/gui/glspectrumgui.ui
 | 
				
			||||||
	sdrbase/gui/pluginsdialog.ui
 | 
						sdrbase/gui/pluginsdialog.ui
 | 
				
			||||||
	sdrbase/gui/preferencesdialog.ui
 | 
						sdrbase/gui/audiodialog.ui
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set(sdrbase_RESOURCES
 | 
					set(sdrbase_RESOURCES
 | 
				
			||||||
 | 
				
			|||||||
@ -1,11 +1,11 @@
 | 
				
			|||||||
 | 
					#include <gui/audiodialog.h>
 | 
				
			||||||
#include <QTreeWidgetItem>
 | 
					#include <QTreeWidgetItem>
 | 
				
			||||||
#include "gui/preferencesdialog.h"
 | 
					#include "ui_audiodialog.h"
 | 
				
			||||||
#include "ui_preferencesdialog.h"
 | 
					 | 
				
			||||||
#include "audio/audiodeviceinfo.h"
 | 
					#include "audio/audiodeviceinfo.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PreferencesDialog::PreferencesDialog(AudioDeviceInfo* audioDeviceInfo, QWidget* parent) :
 | 
					AudioDialog::AudioDialog(AudioDeviceInfo* audioDeviceInfo, QWidget* parent) :
 | 
				
			||||||
	QDialog(parent),
 | 
						QDialog(parent),
 | 
				
			||||||
	ui(new Ui::PreferencesDialog),
 | 
						ui(new Ui::AudioDialog),
 | 
				
			||||||
	m_audioDeviceInfo(audioDeviceInfo)
 | 
						m_audioDeviceInfo(audioDeviceInfo)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	ui->setupUi(this);
 | 
						ui->setupUi(this);
 | 
				
			||||||
@ -44,12 +44,12 @@ PreferencesDialog::PreferencesDialog(AudioDeviceInfo* audioDeviceInfo, QWidget*
 | 
				
			|||||||
	ui->tabWidget->setCurrentIndex(0);
 | 
						ui->tabWidget->setCurrentIndex(0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PreferencesDialog::~PreferencesDialog()
 | 
					AudioDialog::~AudioDialog()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	delete ui;
 | 
						delete ui;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void PreferencesDialog::accept()
 | 
					void AudioDialog::accept()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	QDialog::accept();
 | 
						QDialog::accept();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										34
									
								
								sdrbase/gui/audiodialog.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								sdrbase/gui/audiodialog.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					#ifndef INCLUDE_AUDIODIALOG_H
 | 
				
			||||||
 | 
					#define INCLUDE_AUDIODIALOG_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QDialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class AudioDeviceInfo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Ui {
 | 
				
			||||||
 | 
						class AudioDialog;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class AudioDialog : public QDialog {
 | 
				
			||||||
 | 
						Q_OBJECT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
						explicit AudioDialog(AudioDeviceInfo* audioDeviceInfo, QWidget* parent = NULL);
 | 
				
			||||||
 | 
						~AudioDialog();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private:
 | 
				
			||||||
 | 
						enum Audio {
 | 
				
			||||||
 | 
							ATDefault,
 | 
				
			||||||
 | 
							ATInterface,
 | 
				
			||||||
 | 
							ATDevice
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						Ui::AudioDialog* ui;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						AudioDeviceInfo* m_audioDeviceInfo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private slots:
 | 
				
			||||||
 | 
						void accept();
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // INCLUDE_AUDIODIALOG_H
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<ui version="4.0">
 | 
					<ui version="4.0">
 | 
				
			||||||
 <class>PreferencesDialog</class>
 | 
					 <class>AudioDialog</class>
 | 
				
			||||||
 <widget class="QDialog" name="PreferencesDialog">
 | 
					 <widget class="QDialog" name="AudioDialog">
 | 
				
			||||||
  <property name="geometry">
 | 
					  <property name="geometry">
 | 
				
			||||||
   <rect>
 | 
					   <rect>
 | 
				
			||||||
    <x>0</x>
 | 
					    <x>0</x>
 | 
				
			||||||
@ -65,7 +65,7 @@
 | 
				
			|||||||
  <connection>
 | 
					  <connection>
 | 
				
			||||||
   <sender>buttonBox</sender>
 | 
					   <sender>buttonBox</sender>
 | 
				
			||||||
   <signal>accepted()</signal>
 | 
					   <signal>accepted()</signal>
 | 
				
			||||||
   <receiver>PreferencesDialog</receiver>
 | 
					   <receiver>AudioDialog</receiver>
 | 
				
			||||||
   <slot>accept()</slot>
 | 
					   <slot>accept()</slot>
 | 
				
			||||||
   <hints>
 | 
					   <hints>
 | 
				
			||||||
    <hint type="sourcelabel">
 | 
					    <hint type="sourcelabel">
 | 
				
			||||||
@ -81,7 +81,7 @@
 | 
				
			|||||||
  <connection>
 | 
					  <connection>
 | 
				
			||||||
   <sender>buttonBox</sender>
 | 
					   <sender>buttonBox</sender>
 | 
				
			||||||
   <signal>rejected()</signal>
 | 
					   <signal>rejected()</signal>
 | 
				
			||||||
   <receiver>PreferencesDialog</receiver>
 | 
					   <receiver>AudioDialog</receiver>
 | 
				
			||||||
   <slot>reject()</slot>
 | 
					   <slot>reject()</slot>
 | 
				
			||||||
   <hints>
 | 
					   <hints>
 | 
				
			||||||
    <hint type="sourcelabel">
 | 
					    <hint type="sourcelabel">
 | 
				
			||||||
@ -1,34 +0,0 @@
 | 
				
			|||||||
#ifndef INCLUDE_PREFERENCESDIALOG_H
 | 
					 | 
				
			||||||
#define INCLUDE_PREFERENCESDIALOG_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <QDialog>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class AudioDeviceInfo;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Ui {
 | 
					 | 
				
			||||||
	class PreferencesDialog;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class PreferencesDialog : public QDialog {
 | 
					 | 
				
			||||||
	Q_OBJECT
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
	explicit PreferencesDialog(AudioDeviceInfo* audioDeviceInfo, QWidget* parent = NULL);
 | 
					 | 
				
			||||||
	~PreferencesDialog();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
private:
 | 
					 | 
				
			||||||
	enum Audio {
 | 
					 | 
				
			||||||
		ATDefault,
 | 
					 | 
				
			||||||
		ATInterface,
 | 
					 | 
				
			||||||
		ATDevice
 | 
					 | 
				
			||||||
	};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	Ui::PreferencesDialog* ui;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	AudioDeviceInfo* m_audioDeviceInfo;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
private slots:
 | 
					 | 
				
			||||||
	void accept();
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // INCLUDE_PREFERENCESDIALOG_H
 | 
					 | 
				
			||||||
@ -31,10 +31,10 @@
 | 
				
			|||||||
#include "gui/presetitem.h"
 | 
					#include "gui/presetitem.h"
 | 
				
			||||||
#include "gui/addpresetdialog.h"
 | 
					#include "gui/addpresetdialog.h"
 | 
				
			||||||
#include "gui/pluginsdialog.h"
 | 
					#include "gui/pluginsdialog.h"
 | 
				
			||||||
#include "gui/preferencesdialog.h"
 | 
					 | 
				
			||||||
#include "gui/aboutdialog.h"
 | 
					#include "gui/aboutdialog.h"
 | 
				
			||||||
#include "gui/rollupwidget.h"
 | 
					#include "gui/rollupwidget.h"
 | 
				
			||||||
#include "gui/channelwindow.h"
 | 
					#include "gui/channelwindow.h"
 | 
				
			||||||
 | 
					#include "gui/audiodialog.h"
 | 
				
			||||||
#include "dsp/dspengine.h"
 | 
					#include "dsp/dspengine.h"
 | 
				
			||||||
#include "dsp/spectrumvis.h"
 | 
					#include "dsp/spectrumvis.h"
 | 
				
			||||||
#include "dsp/filesink.h"
 | 
					#include "dsp/filesink.h"
 | 
				
			||||||
@ -681,11 +681,11 @@ void MainWindow::on_action_Loaded_Plugins_triggered()
 | 
				
			|||||||
	pluginsDialog.exec();
 | 
						pluginsDialog.exec();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void MainWindow::on_action_Preferences_triggered()
 | 
					void MainWindow::on_action_Audio_triggered()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	PreferencesDialog preferencesDialog(m_audioDeviceInfo, this);
 | 
						AudioDialog audioDialog(m_audioDeviceInfo, this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	preferencesDialog.exec();
 | 
						audioDialog.exec();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void MainWindow::on_sampleSource_currentIndexChanged(int index)
 | 
					void MainWindow::on_sampleSource_currentIndexChanged(int index)
 | 
				
			||||||
 | 
				
			|||||||
@ -152,7 +152,7 @@ private slots:
 | 
				
			|||||||
	void on_presetTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
 | 
						void on_presetTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
 | 
				
			||||||
	void on_presetTree_itemActivated(QTreeWidgetItem *item, int column);
 | 
						void on_presetTree_itemActivated(QTreeWidgetItem *item, int column);
 | 
				
			||||||
	void on_action_Loaded_Plugins_triggered();
 | 
						void on_action_Loaded_Plugins_triggered();
 | 
				
			||||||
	void on_action_Preferences_triggered();
 | 
						void on_action_Audio_triggered();
 | 
				
			||||||
	void on_sampleSource_currentIndexChanged(int index);
 | 
						void on_sampleSource_currentIndexChanged(int index);
 | 
				
			||||||
	void on_action_About_triggered();
 | 
						void on_action_About_triggered();
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -79,8 +79,6 @@
 | 
				
			|||||||
    <property name="title">
 | 
					    <property name="title">
 | 
				
			||||||
     <string>&File</string>
 | 
					     <string>&File</string>
 | 
				
			||||||
    </property>
 | 
					    </property>
 | 
				
			||||||
    <addaction name="action_Preferences"/>
 | 
					 | 
				
			||||||
    <addaction name="separator"/>
 | 
					 | 
				
			||||||
    <addaction name="action_Exit"/>
 | 
					    <addaction name="action_Exit"/>
 | 
				
			||||||
   </widget>
 | 
					   </widget>
 | 
				
			||||||
   <widget class="QMenu" name="menu_Acquisition">
 | 
					   <widget class="QMenu" name="menu_Acquisition">
 | 
				
			||||||
@ -147,11 +145,19 @@
 | 
				
			|||||||
     <string>&Window</string>
 | 
					     <string>&Window</string>
 | 
				
			||||||
    </property>
 | 
					    </property>
 | 
				
			||||||
   </widget>
 | 
					   </widget>
 | 
				
			||||||
 | 
					   <widget class="QMenu" name="menuPreferences">
 | 
				
			||||||
 | 
					    <property name="title">
 | 
				
			||||||
 | 
					     <string>&Preferences</string>
 | 
				
			||||||
 | 
					    </property>
 | 
				
			||||||
 | 
					    <addaction name="actionAudio"/>
 | 
				
			||||||
 | 
					    <addaction name="actionDV_Serial"/>
 | 
				
			||||||
 | 
					   </widget>
 | 
				
			||||||
   <addaction name="menu_File"/>
 | 
					   <addaction name="menu_File"/>
 | 
				
			||||||
   <addaction name="menu_View"/>
 | 
					   <addaction name="menu_View"/>
 | 
				
			||||||
   <addaction name="menu_Acquisition"/>
 | 
					   <addaction name="menu_Acquisition"/>
 | 
				
			||||||
   <addaction name="menu_Channels"/>
 | 
					   <addaction name="menu_Channels"/>
 | 
				
			||||||
   <addaction name="menu_Window"/>
 | 
					   <addaction name="menu_Window"/>
 | 
				
			||||||
 | 
					   <addaction name="menuPreferences"/>
 | 
				
			||||||
   <addaction name="menu_Help"/>
 | 
					   <addaction name="menu_Help"/>
 | 
				
			||||||
  </widget>
 | 
					  </widget>
 | 
				
			||||||
  <widget class="QStatusBar" name="statusBar">
 | 
					  <widget class="QStatusBar" name="statusBar">
 | 
				
			||||||
@ -564,6 +570,16 @@
 | 
				
			|||||||
    <string>F8</string>
 | 
					    <string>F8</string>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
  </action>
 | 
					  </action>
 | 
				
			||||||
 | 
					  <action name="actionAudio">
 | 
				
			||||||
 | 
					   <property name="text">
 | 
				
			||||||
 | 
					    <string>Audio</string>
 | 
				
			||||||
 | 
					   </property>
 | 
				
			||||||
 | 
					  </action>
 | 
				
			||||||
 | 
					  <action name="actionDV_Serial">
 | 
				
			||||||
 | 
					   <property name="text">
 | 
				
			||||||
 | 
					    <string>DV Serial</string>
 | 
				
			||||||
 | 
					   </property>
 | 
				
			||||||
 | 
					  </action>
 | 
				
			||||||
  <zorder>presetDock</zorder>
 | 
					  <zorder>presetDock</zorder>
 | 
				
			||||||
  <zorder>channelDock</zorder>
 | 
					  <zorder>channelDock</zorder>
 | 
				
			||||||
 </widget>
 | 
					 </widget>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user