Commit ba430a47 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Progress

parent a542e1e9
......@@ -17,3 +17,21 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
### Quick build guide
#### Qt Creator and Windows platform
The Qt Creator requires the paths to all libraries required, but they are not automatically added to the environment. Otherwise the program execution will immediately crash without any further useful information (the reason is: it can't locate runtime libraries).
A workaround:
1. Copy the `platform` folder from the Qt binaries into the `bin` folder of the project, usually a crypting name like `build-Redstart-Desktop_Qt_5_6_0_MSVC2013_64bit-Release` or similar.
2. Deploy VA with Visual Studio, you will find a folder called something like `dist/win32-x64.vc12/bin`. Add this diectory as PATH entry in Qt Creator > Project in the Build Environment section.
Do not forget to Build & Install VA in Visual Studio in case you modify the core! Copying DLLs is always dangerous during development ...
Now you can run the program from within Qt Creator. Repeat this for every kit you want to use.
#### Visual Studio and Windows platform
You can edit the UI with Qt Designer, but Visual Studio may fail to generate / modify the source code automatically, because modification detection is not perfect. In this case it is sometimes necessary to clean up the intermediate source files in the build folder. But generally, VS is able to run Qt specific compiler calls prior to compiling the application, cmake and qmake take care of this.
......@@ -14,9 +14,14 @@
#include "RedstartWindow.h"
#include <ui_RedstartWindow.h>
#include <VA.h>
#include <VACore.h>
#include <VANet.h>
RedstartWindow::RedstartWindow( QWidget* pParent )
: QMainWindow( pParent )
, ui( new Ui::RedstartWindow )
, m_pCoreInstance( NULL )
{
ui->setupUi( this );
......@@ -31,3 +36,83 @@ void RedstartWindow::on_actionQuit_triggered()
{
close();
}
void RedstartWindow::on_pushButton_start_stop_clicked()
{
ui->pushButton_start_stop->setEnabled( false );
try
{
if( m_pCoreInstance )
{
if( m_pCoreInstance->GetState() == IVAInterface::VA_CORESTATE_READY )
m_pCoreInstance->Finalize();
delete m_pCoreInstance;
m_pCoreInstance = nullptr;
ui->statusBar->showMessage( "VA core has been stopped." );
PostCoreStop();
}
else
{
CVAStruct oVAConfigArgs;
m_pCoreInstance = VACore::CreateCoreInstance( "../VACore/conf/VACore.ini" );
m_pCoreInstance->Initialize();
if( m_pCoreInstance->GetState() == IVAInterface::VA_CORESTATE_READY )
{
ui->statusBar->showMessage( "VA core successfully initialized" );
PostCoreStart();
}
else
{
ui->statusBar->showMessage( "VA core initialization failed." );
delete m_pCoreInstance;
m_pCoreInstance = NULL;
}
}
}
catch( const CVAException& ex )
{
ui->statusBar->showMessage( QString::fromStdString( ex.ToString() ) );
}
ui->pushButton_start_stop->setEnabled( true );
}
void RedstartWindow::PostCoreStart()
{
ui->pushButton_start_stop->setText( "Stop" );
// Switch UI elements enabled
ui->groupBox_redstart_vaserver_audio_iface->setEnabled( false );
ui->groupBox_redstart_network->setEnabled( false );
ui->groupBox_redstart_session->setEnabled( false );
ui->groupBox_core->setEnabled( true );
ui->groupBox_paths->setEnabled( true );
ui->groupBox_macros->setEnabled( true );
CVAVersionInfo oVersion;
m_pCoreInstance->GetVersionInfo( &oVersion );
ui->lineEdit_core_settings_version->setText( QString::fromStdString( oVersion.ToString() ) );
CVAStruct oArgs;
oArgs[ "getloglevel" ] = true;
const CVAStruct oReturn = m_pCoreInstance->CallModule( "VACore", oArgs );
const int iCurrentLogLevel = oReturn[ "loglevel" ];
ui->comboBox_core_settings_log_level->addItem( QString::fromStdString( m_pCoreInstance->GetLogLevelStr( iCurrentLogLevel ) ) );
}
void RedstartWindow::PostCoreStop()
{
ui->pushButton_start_stop->setText( "Start" );
// Switch UI elements enabled
ui->groupBox_redstart_vaserver_audio_iface->setEnabled( true );
ui->groupBox_redstart_network->setEnabled( true );
ui->groupBox_redstart_session->setEnabled( true );
ui->groupBox_core->setEnabled( false );
ui->groupBox_paths->setEnabled( false );
ui->groupBox_macros->setEnabled( false );
}
......@@ -22,6 +22,8 @@
#include <ITAJACKInterface.h>
#endif
class IVAInterface;
namespace Ui
{
class RedstartWindow;
......@@ -38,8 +40,15 @@ public:
private slots:
void on_actionQuit_triggered();
void on_pushButton_start_stop_clicked();
private:
void PostCoreStart();
void PostCoreStop();
private:
Ui::RedstartWindow* ui;
IVAInterface* m_pCoreInstance;
};
#endif // IW_REDSTART_WINDOW
......@@ -407,10 +407,13 @@
<item row="1" column="1">
<widget class="QDial" name="dial_core_control_output_gain">
<property name="minimum">
<number>0</number>
<number>-60</number>
</property>
<property name="maximum">
<number>99</number>
<number>9</number>
</property>
<property name="pageStep">
<number>3</number>
</property>
<property name="invertedAppearance">
<bool>false</bool>
......@@ -418,32 +421,68 @@
<property name="invertedControls">
<bool>false</bool>
</property>
<property name="notchTarget">
<double>3.000000000000000</double>
</property>
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QDial" name="dial_core_control_input_gain"/>
<widget class="QDial" name="dial_core_control_input_gain">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>-60</number>
</property>
<property name="maximum">
<number>9</number>
</property>
<property name="pageStep">
<number>3</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="sliderPosition">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="invertedControls">
<bool>false</bool>
</property>
<property name="notchTarget">
<double>3.000000000000000</double>
</property>
<property name="notchesVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<item row="4" column="0" colspan="2">
<widget class="QPushButton" name="pushButton_core_control_reset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QCheckBox" name="checkBox_core_control_input_mute">
<property name="text">
<string>Mute</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="checkBox_core_control_output_mute">
<property name="text">
<string>Mute</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_14">
<property name="text">
......@@ -454,7 +493,7 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -467,6 +506,63 @@
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBox_core_control_output_mute">
<property name="text">
<string>Mute</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_output_gain">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="showGroupSeparator" stdset="0">
<bool>false</bool>
</property>
<property name="suffix">
<string comment="dB" extracomment="Decibel"/>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-60.000000000000000</double>
</property>
<property name="maximum">
<double>9.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QDoubleSpinBox" name="doubleSpinBox_input_gain">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="showGroupSeparator" stdset="0">
<bool>false</bool>
</property>
<property name="suffix">
<string comment="dB" extracomment="Decibel"/>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-60.000000000000000</double>
</property>
<property name="maximum">
<double>9.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
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