Progress

parent a2087478
......@@ -58,6 +58,7 @@ set( Redstart_Sources
"src/RedstartUtils.h"
"src/RedstartSessionBinauralHeadphonesDialog.cpp"
"src/RedstartSessionBinauralHeadphonesDialog.h"
"src/RedstartSessionList.h"
)
set( Redstart_UIs
......@@ -75,6 +76,7 @@ include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ) # Qt UI form compiler gener
#cmake_policy( SET CMP0071 NEW )
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} )
target_link_libraries( Redstart ${VISTA_USE_PACKAGE_LIBRARIES} ${VISTAINTERPROCCOMM_ADDITIONAL_DEPENDENCIES} Qt5::Widgets )
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2017
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_REDSTART_SESSION_LIST
#define IW_REDSTART_SESSION_LIST
#include <QListView>
#include <QStringListModel>
class RedstartSessionListModel : public QStringListModel
{};
class RedstartSessionListView : public QListView
{
Q_OBJECT
public:
inline RedstartSessionListView( QWidget* pParent )
: QListView( pParent )
, m_pModel( NULL )
{
m_pModel = new RedstartSessionListModel();
this->setModel( m_pModel );
QStringList List;
List << "MyBinauralHeadphonesSession" << "MyExperimentalHeadphonesSession";
m_pModel->setStringList( List );
setEditTriggers( QAbstractItemView::NoEditTriggers );
setSelectionMode( QAbstractItemView::SingleSelection );
};
public slots :
private:
RedstartSessionListModel* m_pModel;
};
#endif // IW_REDSTART_SESSION_LIST
......@@ -39,6 +39,8 @@ RedstartWindow::RedstartWindow( bool bFailSafeMode, bool bAutoStart, bool bSkipC
{
ui->setupUi( this );
ui->statusBar->showMessage( "Welcome to VA." );
m_pVANetServer = IVANetServer::Create();
m_pVANetClient = IVANetClient::Create();
......@@ -52,7 +54,7 @@ RedstartWindow::RedstartWindow( bool bFailSafeMode, bool bAutoStart, bool bSkipC
ui->comboBox_audio_iface_buffer_size->addItem( "AUTO", AudioBufferSize::AUTO );
m_iPortaudioDefaultDevice = -1;
if( !bSkipConfig )
LoadConfiguration();
......@@ -553,7 +555,10 @@ void RedstartWindow::on_checkBox_portaudio_default_device_clicked()
void RedstartWindow::on_listView_redstart_session_list_clicked(const QModelIndex &index)
{
// m_pSessionManager->SetCurrentSession( index );
std::string sSessionName = ui->listView_redstart_session_list->model()->data( index ).toString().toStdString();
return;
}
void RedstartWindow::on_actionBinauralHeadphones_triggered()
......
......@@ -17,6 +17,8 @@
#include <QSettings>
#include <QStringList>
#include "RedstartSessionList.h"
#include <ITAPortaudioInterface.h>
#ifdef WIN32
#include <ITAAsioInterface.h>
......@@ -136,6 +138,7 @@ private slots:
void on_actionRunSimpleExample_triggered();
private:
void PostCoreStart();
void PostCoreStop();
......@@ -161,6 +164,8 @@ private:
void AcquireAsioDevices();
void AcquirePortaudioDevices();
RedstartSessionListView* pSessionListModel;
};
#endif // IW_REDSTART_WINDOW
......@@ -13,6 +13,9 @@
<property name="windowTitle">
<string>Redstart VA GUI</string>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(230,230, 230);</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
......@@ -20,6 +23,9 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="tabPosition">
<enum>QTabWidget::North</enum>
</property>
......@@ -33,7 +39,7 @@
<enum>Qt::ElideLeft</enum>
</property>
<property name="documentMode">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="tabsClosable">
<bool>false</bool>
......@@ -65,8 +71,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1025</width>
<height>658</height>
<width>1029</width>
<height>666</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="0,0,0,0,1">
......@@ -91,7 +97,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QListView" name="listView_redstart_session_list">
<widget class="RedstartSessionListView" name="listView_redstart_session_list">
<property name="styleSheet">
<string notr="true">alternate-background-color: rgb(255, 255, 255);
background-color: rgb(254, 228, 255);</string>
......@@ -791,7 +797,11 @@ background-color: rgb(208, 255, 188);</string>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<widget class="QStatusBar" name="statusBar">
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
......@@ -801,6 +811,9 @@ background-color: rgb(208, 255, 188);</string>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<widget class="QMenu" name="menuRedstart">
<property name="title">
<string>Redstart</string>
......@@ -1039,6 +1052,13 @@ background-color: rgb(208, 255, 188);</string>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>RedstartSessionListView</class>
<extends>QListView</extends>
<header location="global">RedstartSessionList.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
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