Add a sample download dialog and upload sub-system

Samples are  downloaded from a  web server, currently the  SF download
server.   The samples  are  stored in  the  source controlled  samples
directory and the CMake script  there builds a suitable directory tree
for upload to the web  server under samples/web containing the samples
hierarchy and the  generated JSON contents database  file. The samples
CMake script also  defines an 'upload-samples' target  that uses rsync
to efficiently upload  the samples and the  accompanying contents JSON
database file.

Any directory structure under the samples directory may be created, to
add a new sample file simply add  the file to source control and amend
the list of sample files (SAMPLE_FILES) in samples/CMakeLists.txt.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6308 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2015-12-24 11:41:05 +00:00
parent 0ab5a28067
commit 924e20efa8
26 changed files with 1391 additions and 43 deletions
+12 -2
View File
@@ -47,6 +47,7 @@
#include "wsprnet.h"
#include "signalmeter.h"
#include "HelpTextWindow.hpp"
#include "SampleDownloader.hpp"
#include "ui_mainwindow.h"
#include "moc_mainwindow.cpp"
@@ -130,7 +131,8 @@ namespace
//--------------------------------------------------- MainWindow constructor
MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdmem,
unsigned downSampleFactor, QWidget *parent) :
unsigned downSampleFactor, QNetworkAccessManager * network_manager,
QWidget *parent) :
QMainWindow(parent),
m_dataDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)},
m_revision {revision ()},
@@ -327,6 +329,14 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
ui->actionInclude_averaging->setActionGroup(DepthGroup);
ui->actionInclude_correlation->setActionGroup(DepthGroup);
connect (ui->download_samples_action, &QAction::triggered, [this, network_manager] () {
if (!m_sampleDownloader)
{
m_sampleDownloader.reset (new SampleDownloader {m_settings, &m_config, network_manager, this});
}
m_sampleDownloader->show ();
});
QButtonGroup* txMsgButtonGroup = new QButtonGroup;
txMsgButtonGroup->addButton(ui->txrb1,1);
txMsgButtonGroup->addButton(ui->txrb2,2);
@@ -669,7 +679,7 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
progressBar->setMaximum(m_TRperiod);
m_modulator->setPeriod(m_TRperiod); // TODO - not thread safe
m_dialFreqRxWSPR=0;
wsprNet = new WSPRNet(this);
wsprNet = new WSPRNet(network_manager, this);
connect( wsprNet, SIGNAL(uploadStatus(QString)), this, SLOT(uploadResponse(QString)));
if(m_bFastMode) {
int ntr[]={5,10,15,30};