Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
Redstart
Commits
6c8d0ba1
Commit
6c8d0ba1
authored
Nov 15, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Adding more on_click methods
parent
c6b53b25
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/RedstartWindow.cpp
View file @
6c8d0ba1
...
...
@@ -24,10 +24,11 @@
#include
<VANet.h>
#include
<ITAAsioInterface.h>
#include
<ITAPortaudioInterface.h>
#include
<ITAException.h>
RedstartWindow
::
RedstartWindow
(
bool
bFailSafeMode
,
bool
bAutoStart
,
QWidget
*
pParent
)
RedstartWindow
::
RedstartWindow
(
bool
bFailSafeMode
,
bool
bAutoStart
,
bool
bSkipConfig
,
QWidget
*
pParent
)
:
QMainWindow
(
pParent
)
,
ui
(
new
Ui
::
RedstartWindow
)
,
m_pVAInterface
(
NULL
)
...
...
@@ -37,7 +38,14 @@ RedstartWindow::RedstartWindow( bool bFailSafeMode, bool bAutoStart, QWidget* pP
m_pVANetServer
=
IVANetServer
::
Create
();
m_pVANetClient
=
IVANetClient
::
Create
();
LoadConfiguration
();
ui
->
comboBox_audio_driver
->
addItem
(
"ASIO"
);
ui
->
comboBox_audio_driver
->
addItem
(
"Portaudio"
);
if
(
!
bSkipConfig
)
LoadConfiguration
();
if
(
ui
->
checkBox_redstart_network_connect_as_client
->
isChecked
()
)
ui
->
groupBox_redstart_audio_iface
->
setEnabled
(
false
);
if
(
(
ui
->
checkBox_redstart_auto_start
->
isChecked
()
||
bAutoStart
)
&&
!
bFailSafeMode
)
on_pushButton_start_stop_clicked
();
...
...
@@ -64,9 +72,6 @@ void RedstartWindow::LoadConfiguration()
{
RestoreWindowSize
();
ui
->
comboBox_audio_driver
->
addItem
(
"ASIO"
);
ui
->
comboBox_audio_driver
->
addItem
(
"Portaudio"
);
bool
bValOK
;
int
iAudioBackend
=
m_qSettings
.
value
(
"Redstart/audio/backend_idx"
).
toInt
(
&
bValOK
);
if
(
!
bValOK
)
...
...
@@ -152,21 +157,8 @@ void RedstartWindow::on_pushButton_start_stop_clicked()
CVAStruct
oVAConfigArgs
=
VACore
::
GetCoreConfigFromFile
(
"../VACore/conf/VACore.ini"
);
QHash
<
QString
,
QVariant
>
oHash
,
oHash2
;
oHash
[
QString
(
"test"
)
]
=
int
(
1
);
oHash
[
QString
(
"test2"
)
]
=
QHash
<
QString
,
QVariant
>
();
m_qSettings
.
setValue
(
"sessions_test"
,
oHash
);
m_qSettings
.
sync
();
oHash2
=
m_qSettings
.
value
(
"sessions_test"
).
toHash
();
int
c
=
oHash2
.
count
();
bool
bOK2
;
int
iTest
=
oHash
[
QString
(
"test"
)
].
toInt
(
&
bOK2
);
int
iTest2
=
oHash2
[
QString
(
"test"
)
].
toInt
(
&
bOK2
);
std
::
string
sBackend
,
sDevice
;
// Override configs
std
::
string
sBackend
,
sDevice
;
switch
(
ui
->
comboBox_audio_driver
->
currentIndex
()
)
{
case
AudioBackend
::
ASIO
:
...
...
@@ -442,3 +434,25 @@ void RedstartWindow::on_actionGet_help_triggered()
QUrl
urlVAWebsiteGetHelp
(
"http://www.virtualacoustics.org/work/help.html"
);
QDesktopServices
::
openUrl
(
urlVAWebsiteGetHelp
);
}
void
RedstartWindow
::
on_checkBox_redstart_network_connect_as_client_clicked
()
{
if
(
ui
->
checkBox_redstart_network_connect_as_client
->
isChecked
()
)
ui
->
groupBox_redstart_audio_iface
->
setEnabled
(
false
);
else
ui
->
groupBox_redstart_audio_iface
->
setEnabled
(
true
);
}
void
RedstartWindow
::
on_checkBox_portaudio_default_device_clicked
()
{
if
(
ui
->
checkBox_portaudio_default_device
->
isChecked
()
)
ui
->
comboBox_audio_iface_device
->
setEnabled
(
false
);
else
ui
->
comboBox_audio_iface_device
->
setEnabled
(
true
);
}
void
RedstartWindow
::
on_listView_redstart_session_list_clicked
(
const
QModelIndex
&
index
)
{
// m_pSessionManager->SetCurrentSession( index );
}
src/RedstartWindow.h
View file @
6c8d0ba1
...
...
@@ -37,7 +37,7 @@ class RedstartWindow : public QMainWindow
Q_OBJECT
public:
explicit
RedstartWindow
(
bool
bFailSafeMode
=
false
,
bool
bAutoStart
=
false
,
QWidget
*
pParent
=
0
);
explicit
RedstartWindow
(
bool
bFailSafeMode
=
false
,
bool
bAutoStart
=
false
,
bool
bSkipConfig
=
false
,
QWidget
*
pParent
=
0
);
~
RedstartWindow
();
enum
AudioBackend
...
...
@@ -93,6 +93,10 @@ private slots:
void
on_actionGet_help_triggered
();
void
on_checkBox_redstart_network_connect_as_client_clicked
();
void
on_checkBox_portaudio_default_device_clicked
();
void
on_listView_redstart_session_list_clicked
(
const
QModelIndex
&
index
);
private:
void
PostCoreStart
();
void
PostCoreStop
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment