mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 12:23:37 -05:00
924e20efa8
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
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
#ifndef SAMPLE_DOWNLOADER_HPP__
|
|
#define SAMPLE_DOWNLOADER_HPP__
|
|
|
|
#include <QObject>
|
|
|
|
#include "pimpl_h.hpp"
|
|
|
|
class QSettings;
|
|
class QWidget;
|
|
class QNetworkAccessManager;
|
|
class Configuration;
|
|
|
|
//
|
|
// SampleDownloader - A Dialog to maintain sample files
|
|
//
|
|
// This uses a Qt Dialog window that contains a tree view of the
|
|
// available sample files on a web or ftp server. The files can be
|
|
// installed locally by ticking a check box or removed from the local
|
|
// machine by un-ticking the check boxes.
|
|
//
|
|
// The class requires a pointer to an open QSettings instance where it
|
|
// will save its persistent state, a pointer to a WSJT-X Configuration
|
|
// instance that is used to obtain configuration information like the
|
|
// current file save location and, a pointer to a
|
|
// QNetworkAccessManager instance which is used for network requests.
|
|
//
|
|
// An instance of SampleDownloader need not be destroyed after use,
|
|
// just call SampleDownloader::show() to make the dialog visible
|
|
// again.
|
|
//
|
|
class SampleDownloader final
|
|
: public QObject
|
|
{
|
|
Q_OBJECT;
|
|
|
|
public:
|
|
SampleDownloader (QSettings * settings
|
|
, Configuration const *
|
|
, QNetworkAccessManager *
|
|
, QWidget * parent = nullptr);
|
|
~SampleDownloader ();
|
|
|
|
Q_SLOT void show ();
|
|
|
|
private:
|
|
class impl;
|
|
pimpl<impl> m_;
|
|
};
|
|
|
|
#endif
|