Slight GUI extensions and slowing down circulating source

parent 17e62b46
......@@ -101,7 +101,13 @@ qt5_add_resources( VA_REDSTART_RESOURCES "res/QRedstart.qrc" OPTIONS -compress 3
include_directories( "src" )
add_executable( Redstart ${VA_REDSTART_RESOURCES} ${Redstart_Sources} ${Redstart_UIs} )
if( WIN32 )
# Hide console by using WIN32 application flag
add_executable( Redstart WIN32 ${VA_REDSTART_RESOURCES} ${Redstart_Sources} ${Redstart_UIs} )
else( )
add_executable( Redstart ${VA_REDSTART_RESOURCES} ${Redstart_Sources} ${Redstart_UIs} )
endif( )
target_link_libraries( Redstart ${VISTA_USE_PACKAGE_LIBRARIES} ${VISTAINTERPROCCOMM_ADDITIONAL_DEPENDENCIES} Qt5::Widgets )
install( TARGETS Redstart RUNTIME DESTINATION "bin" )
......
......@@ -39,8 +39,8 @@ RedstartRunCirculatingSourceDialog::RedstartRunCirculatingSourceDialog( QWidget
if( QDir( sLastBrowseFolder ).exists() )
m_oLastBasePath.setCurrent( sLastBrowseFolder );
m_dAzimuth = 0.0f;
m_dElevation = 0.0f;
m_dAzimuthDEG = 0.0f;
m_dElevationDEG = 0.0f;
m_qVAUpdateTimer = new QTimer( this );
......@@ -145,9 +145,9 @@ void RedstartRunCirculatingSourceDialog::DeleteScene()
void RedstartRunCirculatingSourceDialog::UpdateScene()
{
VAVec3 v3Pos;
v3Pos.x = -std::sin( grad2rad( m_dAzimuth ) ) * ui->doubleSpinBox_radius->value();
v3Pos.y = std::sin( grad2rad( m_dElevation ) ) * ui->doubleSpinBox_radius->value();
v3Pos.z = -std::cos( grad2rad( m_dAzimuth ) ) * ui->doubleSpinBox_radius->value();
v3Pos.x = -std::sin( grad2rad( m_dAzimuthDEG ) ) * ui->doubleSpinBox_radius->value();
v3Pos.y = std::sin( grad2rad( m_dElevationDEG ) ) * ui->doubleSpinBox_radius->value();
v3Pos.z = -std::cos( grad2rad( m_dAzimuthDEG ) ) * ui->doubleSpinBox_radius->value();
try
{
m_pVAInterface->SetSoundSourcePosition( m_iSourceID, v3Pos );
......@@ -157,8 +157,8 @@ void RedstartRunCirculatingSourceDialog::UpdateScene()
Stop();
}
m_dAzimuth += ui->doubleSpinBox_azi_inc->value();
m_dElevation += ui->doubleSpinBox_ele_inc->value();
m_dAzimuthDEG += ui->doubleSpinBox_azi_inc->value();
m_dElevationDEG += ui->doubleSpinBox_ele_inc->value();
m_dRuntime += ui->doubleSpinBox_timeout->value();
if( m_dRuntime > ui->doubleSpinBox_runtime->value() )
......@@ -178,8 +178,8 @@ void RedstartRunCirculatingSourceDialog::StopUpdateTimer()
{
m_qVAUpdateTimer->stop();
m_dRuntime = 0.0f;
m_dAzimuth = 0.0f;
m_dElevation = 0.0f;
m_dAzimuthDEG = 0.0f;
m_dElevationDEG = 0.0f;
try
{
......
......@@ -61,7 +61,7 @@ private:
int m_iSourceID, m_iReceiverID, m_iHRIRID;
QString m_sSignalID;
double m_dAzimuth, m_dElevation;
double m_dAzimuthDEG, m_dElevationDEG;
double m_dRuntime;
void StartUpdateTimer();
......
......@@ -1233,3 +1233,9 @@ void RedstartWindow::on_pushButton_core_control_reset_clicked()
if( m_pVAInterface )
m_pVAInterface->Reset();
}
void RedstartWindow::on_actionReset_triggered()
{
if( m_pVAInterface )
m_pVAInterface->Reset();
}
......@@ -181,6 +181,8 @@ public:
void SporadicTimeout();
void on_actionReset_triggered();
signals:
void InputSignalChangedDecibel( int );
void InputSignalChangedDecibel( double );
......
......@@ -133,14 +133,17 @@
<item row="7" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_timeout">
<property name="decimals">
<number>4</number>
<number>3</number>
</property>
<property name="minimum">
<double>0.010000000000000</double>
<double>0.001000000000000</double>
</property>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property>
<property name="value">
<double>0.010000000000000</double>
</property>
......@@ -182,6 +185,9 @@
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_azi_inc">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>-999999.000000000000000</double>
</property>
......@@ -192,12 +198,15 @@
<double>1.000000000000000</double>
</property>
<property name="value">
<double>3.600000000000000</double>
<double>0.360000000000000</double>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_ele_inc">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>-999999.000000000000000</double>
</property>
......
......@@ -91,9 +91,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-58</y>
<width>1071</width>
<height>788</height>
<y>0</y>
<width>1085</width>
<height>736</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,2">
......@@ -1026,6 +1026,7 @@ background-color: rgb(208, 255, 188);</string>
</property>
<addaction name="actionRunSimpleExample"/>
<addaction name="actionCirculating_source"/>
<addaction name="actionReset"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
......@@ -1275,6 +1276,14 @@ background-color: rgb(208, 255, 188);</string>
<string>Experimental BRIR switching</string>
</property>
</action>
<action name="actionReset">
<property name="text">
<string>Reset</string>
</property>
<property name="shortcut">
<string>R, R</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment