Commit b04f5bab authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Merging UI element rearrangement and output stream widget

parents e4118877 4cdd4370
......@@ -33,7 +33,7 @@ class RedstartCoreOutputPlainTextEdit : public QPlainTextEdit
virtual int_type overflow( int_type c )
{
if( c != EOF )
if( c != EOF && c != '\n' )
m_pParent->write( ( char ) c );
else
m_pParent->append();
......@@ -86,6 +86,7 @@ public:
inline void append()
{
appendPlainText( m_sLine );
m_sLine.clear();
};
inline void write( char c )
......
......@@ -238,6 +238,7 @@ void RedstartWindow::PostCoreStart()
ui->graphicsView_input_levels->setEnabled( true );
ui->graphicsView_output_levels->setEnabled( true );
ui->groupBox_global_am->setEnabled( true );
ui->groupBox_output->setEnabled( true );
CVAVersionInfo oVersion;
m_pVAInterface->GetVersionInfo( &oVersion );
......@@ -247,8 +248,18 @@ void RedstartWindow::PostCoreStart()
oArgs[ "getloglevel" ] = true;
const CVAStruct oReturn = m_pVAInterface->CallModule( "VACore", oArgs );
const int iCurrentLogLevel = oReturn[ "loglevel" ];
ui->comboBox_core_settings_log_level->setCurrentIndex( iCurrentLogLevel );
CVAStruct oSearchPaths = m_pVAInterface->GetSearchPaths();
QStringList sPathList;
CVAStruct::const_iterator cit = oSearchPaths.Begin();
while( cit != oSearchPaths.End() )
{
const CVAStructValue& oValue( cit++->second );
if( oValue.IsString() )
sPathList << std::string( oValue ).c_str();
}
ui->listView_paths; // @todo
}
void RedstartWindow::PostCoreStop()
......@@ -268,6 +279,21 @@ void RedstartWindow::PostCoreStop()
ui->graphicsView_input_levels->setEnabled( false );
ui->graphicsView_output_levels->setEnabled( false );
ui->groupBox_global_am->setEnabled( false );
ui->groupBox_output->setEnabled( false );
// Clear
ui->lineEdit_core_settings_version->clear();
ui->listView_paths->reset();
// Reset elements
bool bPreserveCoreControlValues = m_qSettings.value( "PreserveCoreControlValues", true ).toBool(); // @todo control this setting via preferences dialog
if( !bPreserveCoreControlValues )
{
emit InputSignalChangedDecibel( 0.0f );
emit OutputSignalChangedDecibel( 0.0f );
emit InputIsMutedChanged( false );
emit OutputIsMutedChanged( false );
}
}
void RedstartWindow::RestoreWindowSize()
......@@ -291,8 +317,8 @@ void RedstartWindow::HandleVAEvent( const CVAEvent* pEvent )
/* Don't handle events that have been triggered from this interface connection
if( pEvent->pSender == m_pVAInterface )
return;
*/
return;
*/
switch( pEvent->iEventType )
{
......@@ -517,11 +543,10 @@ void RedstartWindow::on_pushButton_start_stop_clicked()
oVAConfigArgs[ "Paths" ][ "redstart_data_dev" ] = "../VACore/data";
m_pVAInterface = VACore::CreateCoreInstance( oVAConfigArgs );
m_pVAInterface->Initialize();
m_pVAInterface->SetOutputStream( ui->plainTextEdit_core_output->GetOutputStream() );
m_pVAInterface->Initialize();
m_pVAInterface->AttachEventHandler( this );
m_pVAInterface->SetDebugStream( ui->plainTextEdit_core_output->GetOutputStream() );
m_pVANetServer->SetCoreInstance( m_pVAInterface );
bool bOK;
......@@ -961,5 +986,5 @@ void RedstartWindow::on_actionRunSimpleExample_triggered()
void RedstartWindow::on_pushButton_core_control_reset_clicked()
{
if( m_pVAInterface )
m_pVAInterface->Reset();
m_pVAInterface->Reset();
}
......@@ -71,8 +71,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1065</width>
<height>716</height>
<width>1024</width>
<height>768</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0">
......@@ -914,6 +914,7 @@ background-color: rgb(208, 255, 188);</string>
</property>
<addaction name="actionRunSimpleExample"/>
<addaction name="actionCirculating_source"/>
<addaction name="actionExperimental_BRIR_switching"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
......@@ -1130,7 +1131,7 @@ background-color: rgb(208, 255, 188);</string>
</action>
<action name="actionCirculating_source">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="text">
<string>Circulating source</string>
......@@ -1158,6 +1159,11 @@ background-color: rgb(208, 255, 188);</string>
<string>N, D</string>
</property>
</action>
<action name="actionExperimental_BRIR_switching">
<property name="text">
<string>Experimental BRIR switching</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