kopia lustrzana https://gitlab.com/eliggett/wfview
rodzic
9e87d35069
commit
d742c7564a
86
wfmain.cpp
86
wfmain.cpp
|
@ -953,14 +953,6 @@ void wfmain::setServerToPrefs()
|
||||||
|
|
||||||
// Start server if enabled in config
|
// Start server if enabled in config
|
||||||
ui->serverSetupGroup->setEnabled(serverConfig.enabled);
|
ui->serverSetupGroup->setEnabled(serverConfig.enabled);
|
||||||
if (serverThread != Q_NULLPTR) {
|
|
||||||
serverThread->quit();
|
|
||||||
serverThread->wait();
|
|
||||||
serverThread = Q_NULLPTR;
|
|
||||||
udp = Q_NULLPTR;
|
|
||||||
ui->statusBar->showMessage(QString("Server disabled"), 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (serverConfig.enabled) {
|
if (serverConfig.enabled) {
|
||||||
serverConfig.lan = prefs.enableLAN;
|
serverConfig.lan = prefs.enableLAN;
|
||||||
|
|
||||||
|
@ -982,7 +974,6 @@ void wfmain::setServerToPrefs()
|
||||||
emit initServer();
|
emit initServer();
|
||||||
|
|
||||||
connect(this, SIGNAL(sendRigCaps(rigCapabilities)), udp, SLOT(receiveRigCaps(rigCapabilities)));
|
connect(this, SIGNAL(sendRigCaps(rigCapabilities)), udp, SLOT(receiveRigCaps(rigCapabilities)));
|
||||||
ui->statusBar->showMessage(QString("Server enabled"), 1000);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1885,6 +1876,10 @@ void wfmain::saveSettings()
|
||||||
|
|
||||||
settings->beginGroup("Server");
|
settings->beginGroup("Server");
|
||||||
|
|
||||||
|
serverConfig.controlPort = ui->serverControlPortText->text().toInt();
|
||||||
|
serverConfig.civPort = ui->serverCivPortText->text().toInt();
|
||||||
|
serverConfig.audioPort = ui->serverAudioPortText->text().toInt();
|
||||||
|
|
||||||
settings->setValue("ServerEnabled", serverConfig.enabled);
|
settings->setValue("ServerEnabled", serverConfig.enabled);
|
||||||
settings->setValue("ServerControlPort", serverConfig.controlPort);
|
settings->setValue("ServerControlPort", serverConfig.controlPort);
|
||||||
settings->setValue("ServerCivPort", serverConfig.civPort);
|
settings->setValue("ServerCivPort", serverConfig.civPort);
|
||||||
|
@ -4556,6 +4551,35 @@ void wfmain::on_audioInputCombo_currentIndexChanged(int value)
|
||||||
qDebug(logGui()) << "Changed default audio input to:" << txSetup.name;
|
qDebug(logGui()) << "Changed default audio input to:" << txSetup.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wfmain::on_serverRXAudioInputCombo_currentIndexChanged(int value)
|
||||||
|
{
|
||||||
|
#if defined(RTAUDIO)
|
||||||
|
serverRxSetup.port = ui->serverRXAudioInputCombo->itemData(value).toInt();
|
||||||
|
#elif defined(PORTAUDIO)
|
||||||
|
serverRxSetup.port = ui->serverRXAudioInputCombo->itemData(value).toInt();
|
||||||
|
#else
|
||||||
|
QVariant v = ui->serverRXAudioInputCombo->itemData(value);
|
||||||
|
serverRxSetup.port = v.value<QAudioDeviceInfo>();
|
||||||
|
#endif
|
||||||
|
serverRxSetup.name = ui->serverRXAudioInputCombo->itemText(value);
|
||||||
|
qDebug(logGui()) << "Changed default server audio input to:" << serverRxSetup.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wfmain::on_serverTXAudioOutputCombo_currentIndexChanged(int value)
|
||||||
|
{
|
||||||
|
#if defined(RTAUDIO)
|
||||||
|
serverTxSetup.port = ui->serverTXAudioOutputCombo->itemData(value).toInt();
|
||||||
|
#elif defined(PORTAUDIO)
|
||||||
|
serverTxSetup.port = ui->serverTXAudioOutputCombo->itemData(value).toInt();
|
||||||
|
#else
|
||||||
|
QVariant v = ui->serverTXAudioOutputCombo->itemData(value);
|
||||||
|
serverTxSetup.port = v.value<QAudioDeviceInfo>();
|
||||||
|
#endif
|
||||||
|
serverTxSetup.name = ui->serverTXAudioOutputCombo->itemText(value);
|
||||||
|
qDebug(logGui()) << "Changed default server audio output to:" << serverTxSetup.name;
|
||||||
|
}
|
||||||
|
|
||||||
void wfmain::on_audioSampleRateCombo_currentIndexChanged(QString text)
|
void wfmain::on_audioSampleRateCombo_currentIndexChanged(QString text)
|
||||||
{
|
{
|
||||||
//udpPrefs.audioRXSampleRate = text.toInt();
|
//udpPrefs.audioRXSampleRate = text.toInt();
|
||||||
|
@ -5664,50 +5688,6 @@ void wfmain::on_serverEnableCheckbox_clicked(bool checked)
|
||||||
{
|
{
|
||||||
ui->serverSetupGroup->setEnabled(checked);
|
ui->serverSetupGroup->setEnabled(checked);
|
||||||
serverConfig.enabled = checked;
|
serverConfig.enabled = checked;
|
||||||
setServerToPrefs();
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_serverControlPortText_textChanged(QString text)
|
|
||||||
{
|
|
||||||
serverConfig.controlPort = ui->serverControlPortText->text().toInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_serverCivPortText_textChanged(QString text)
|
|
||||||
{
|
|
||||||
serverConfig.civPort = ui->serverCivPortText->text().toInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_serverAudioPortText_textChanged(QString text)
|
|
||||||
{
|
|
||||||
serverConfig.audioPort = ui->serverAudioPortText->text().toInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_serverRXAudioInputCombo_currentIndexChanged(int value)
|
|
||||||
{
|
|
||||||
#if defined(RTAUDIO)
|
|
||||||
serverRxSetup.port = ui->serverRXaudioInputCombo->itemData(value).toInt();
|
|
||||||
#elif defined(PORTAUDIO)
|
|
||||||
serverRxSetup.port = ui->serverRXaudioInputCombo->itemData(value).toInt();
|
|
||||||
#else
|
|
||||||
QVariant v = ui->serverRXAudioInputCombo->itemData(value);
|
|
||||||
serverRxSetup.port = v.value<QAudioDeviceInfo>();
|
|
||||||
#endif
|
|
||||||
serverRxSetup.name = ui->serverRXAudioInputCombo->itemText(value);
|
|
||||||
qDebug(logGui()) << "Changed default server audio input to:" << serverRxSetup.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_serverTXAudioOutputCombo_currentIndexChanged(int value)
|
|
||||||
{
|
|
||||||
#if defined(RTAUDIO)
|
|
||||||
serverTxSetup.port = ui->serverTXAudioOutputCombo->itemData(value).toInt();
|
|
||||||
#elif defined(PORTAUDIO)
|
|
||||||
serverTxSetup.port = ui->serverTXAudioOutputCombo->itemData(value).toInt();
|
|
||||||
#else
|
|
||||||
QVariant v = ui->serverTXAudioOutputCombo->itemData(value);
|
|
||||||
serverTxSetup.port = v.value<QAudioDeviceInfo>();
|
|
||||||
#endif
|
|
||||||
serverTxSetup.name = ui->serverTXAudioOutputCombo->itemText(value);
|
|
||||||
qDebug(logGui()) << "Changed default server audio output to:" << serverTxSetup.name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- DEBUG FUNCTION ---
|
// --- DEBUG FUNCTION ---
|
||||||
|
|
11
wfmain.h
11
wfmain.h
|
@ -385,6 +385,10 @@ private slots:
|
||||||
|
|
||||||
void on_audioInputCombo_currentIndexChanged(int value);
|
void on_audioInputCombo_currentIndexChanged(int value);
|
||||||
|
|
||||||
|
void on_serverTXAudioOutputCombo_currentIndexChanged(int value);
|
||||||
|
|
||||||
|
void on_serverRXAudioInputCombo_currentIndexChanged(int value);
|
||||||
|
|
||||||
void on_toFixedBtn_clicked();
|
void on_toFixedBtn_clicked();
|
||||||
|
|
||||||
void on_connectBtn_clicked();
|
void on_connectBtn_clicked();
|
||||||
|
@ -506,12 +510,9 @@ private slots:
|
||||||
void on_setClockBtn_clicked();
|
void on_setClockBtn_clicked();
|
||||||
|
|
||||||
void on_serverEnableCheckbox_clicked(bool checked);
|
void on_serverEnableCheckbox_clicked(bool checked);
|
||||||
|
|
||||||
void on_serverUsersTable_cellClicked(int row, int col);
|
void on_serverUsersTable_cellClicked(int row, int col);
|
||||||
void on_serverControlPortText_textChanged(QString text);
|
|
||||||
void on_serverCivPortText_textChanged(QString text);
|
|
||||||
void on_serverAudioPortText_textChanged(QString text);
|
|
||||||
void on_serverTXAudioOutputCombo_currentIndexChanged(int value);
|
|
||||||
void on_serverRXAudioInputCombo_currentIndexChanged(int value);
|
|
||||||
void onServerPasswordChanged();
|
void onServerPasswordChanged();
|
||||||
|
|
||||||
void on_useRTSforPTTchk_clicked(bool checked);
|
void on_useRTSforPTTchk_clicked(bool checked);
|
||||||
|
|
|
@ -120,6 +120,9 @@
|
||||||
<ClCompile Include="udpserver.cpp">
|
<ClCompile Include="udpserver.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="udpserversetup.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="wfmain.cpp">
|
<ClCompile Include="wfmain.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -200,6 +203,9 @@
|
||||||
<QtMoc Include="udpserver.h">
|
<QtMoc Include="udpserver.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</QtMoc>
|
</QtMoc>
|
||||||
|
<QtMoc Include="udpserversetup.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</QtMoc>
|
||||||
<ClInclude Include="ulaw.h">
|
<ClInclude Include="ulaw.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -369,6 +375,7 @@
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="resources\wfview.png" />
|
<None Include="resources\wfview.png" />
|
||||||
|
<None Include="resources\wfview.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="resources\install.sh">
|
<None Include="resources\install.sh">
|
||||||
|
@ -384,4 +391,9 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include=".\wfview_resource.rc" />
|
<ResourceCompile Include=".\wfview_resource.rc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="rigstate.h">
|
||||||
|
<Filter>Generated Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Ładowanie…
Reference in New Issue