Add Mobile GPS to ircDDB Gateway Config GUI.

This commit is contained in:
Jonathan Naylor 2018-11-11 22:40:37 +00:00
parent baeee75cfd
commit e57faf2418
7 changed files with 197 additions and 9 deletions

View file

@ -65,6 +65,7 @@ m_starNet3(NULL),
m_starNet4(NULL),
m_starNet5(NULL),
m_remote(NULL),
m_mobileGPS(NULL),
m_miscellaneous(NULL)
{
SetMenuBar(createMenuBar());
@ -314,6 +315,14 @@ m_miscellaneous(NULL)
m_remote = new CRemoteSet(noteBook, -1, APPLICATION_NAME, remoteEnabled, remotePassword, remotePort);
noteBook->AddPage(m_remote, wxT("Remote"), false);
bool mobileGPSEnabled;
wxString mobileGPSAddress;
unsigned int mobileGPSPort;
m_config->getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort);
m_mobileGPS = new CMobileGPSSet(noteBook, -1, APPLICATION_NAME, mobileGPSEnabled, mobileGPSAddress, mobileGPSPort);
noteBook->AddPage(m_mobileGPS, wxT("Mobile GPS"), false);
TEXT_LANG language;
bool infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled;
m_config->getMiscellaneous(language, infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled);
@ -321,15 +330,15 @@ m_miscellaneous(NULL)
m_miscellaneous = new CIRCDDBGatewayConfigMiscellaneousSet(noteBook, -1, APPLICATION_NAME, language, infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled);
noteBook->AddPage(m_miscellaneous, wxT("Misc"), false);
sizer->Add(noteBook, 0, wxEXPAND | wxALL, BORDER_SIZE);
sizer->Add(noteBook, 0, wxEXPAND | wxALL, BORDER_SIZE);
panel->SetSizer(sizer);
panel->SetSizer(sizer);
mainSizer->Add(panel, 0, wxEXPAND | wxALL, BORDER_SIZE);
mainSizer->Add(panel, 0, wxEXPAND | wxALL, BORDER_SIZE);
mainSizer->SetSizeHints(this);
mainSizer->SetSizeHints(this);
SetSizer(mainSizer);
SetSizer(mainSizer);
}
CIRCDDBGatewayConfigFrame::~CIRCDDBGatewayConfigFrame()
@ -371,7 +380,7 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&)
!m_repeaterInfo4->Validate() ||
!m_ircDDB->Validate() || !m_ircDDB2->Validate() || !m_ircDDB3->Validate() || !m_ircDDB4->Validate() || !m_dprs->Validate() || !m_dplus->Validate() || !m_dcs->Validate() || !m_xlx->Validate() ||
!m_starNet1->Validate() || !m_starNet2->Validate() || !m_starNet3->Validate() || !m_starNet4->Validate() ||
!m_starNet5->Validate() || !m_remote->Validate() || !m_miscellaneous->Validate())
!m_starNet5->Validate() || !m_remote->Validate() || !m_mobileGPS->Validate() || !m_miscellaneous->Validate())
return;
GATEWAY_TYPE gatewayType = m_gateway->getType();
@ -606,6 +615,11 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&)
unsigned int remotePort = m_remote->getPort();
m_config->setRemote(remoteEnabled, remotePassword, remotePort);
bool mobileGPSEnabled = m_mobileGPS->getEnabled();
wxString mobileGPSAddress = m_mobileGPS->getAddress();
unsigned int mobileGPSPort = m_mobileGPS->getPort();
m_config->setMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort);
TEXT_LANG language = m_miscellaneous->getLanguage();
bool infoEnabled = m_miscellaneous->getInfoEnabled();
bool echoEnabled = m_miscellaneous->getEchoEnabled();

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2014 by Jonathan Naylor G4KLX
* Copyright (C) 2010-2014,2018 by Jonathan Naylor G4KLX
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,6 +25,7 @@
#include "IRCDDBGatewayConfig.h"
#include "RepeaterInfoSet.h"
#include "RepeaterDataSet.h"
#include "MobileGPSSet.h"
#include "StarNetSet.h"
#include "RemoteSet.h"
#include "DExtraSet.h"
@ -65,13 +66,14 @@ private:
CDExtraSet* m_dextra;
CDPlusSet* m_dplus;
CDCSSet* m_dcs;
CXLXSet* m_xlx;
CXLXSet* m_xlx;
CStarNetSet* m_starNet1;
CStarNetSet* m_starNet2;
CStarNetSet* m_starNet3;
CStarNetSet* m_starNet4;
CStarNetSet* m_starNet5;
CRemoteSet* m_remote;
CMobileGPSSet* m_mobileGPS;
CIRCDDBGatewayConfigMiscellaneousSet* m_miscellaneous;
DECLARE_EVENT_TABLE()