<commit_before>#include "QsLog.h"
#include "configuration.h"
#include <QMessageBox>
#include <QDesktopServices>
#include <QFile>
#include <QFileDialog>
#include <QTimer>
#include "DownloadRemoteParamsDialog.h"
#include "ui_DownloadRemoteParamsDialog.h"

DownloadRemoteParamsDialog::DownloadRemoteParamsDialog(QWidget *parent, bool overwriteFile) :
    QDialog(parent),
    ui(new Ui::DownloadRemoteParamsDialog),
    m_locationOfFrameParams("https://raw.github.com/diydrones/ardupilot/master/Tools/Frame_params/"),
    m_extension(".param"),
    m_version("?ref=master"),
    m_networkReply(NULL),
    m_overwriteFile(overwriteFile)
{
    QLOG_DEBUG() << "DownloadRemoteParamsDialog overwriteFile" << m_overwriteFile;
    ui->setupUi(this);

    connect(this, SIGNAL(canceled()), this, SLOT(cancelDownload()));
    connect(ui->downloadButton, SIGNAL(clicked()), this, SLOT(downloadButtonClicked()));
    connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(closeButtonClicked()));
    connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refreshParamList()));

    // [ToDo] For now just add a default list of parameter filenames
    // In future need to add a github rest API request.
    QStringList paramFiles;
    paramFiles << "Iris" << "Beginner" << "Intermediate" << "Advanced" << "CameraPlatform"
               << "3DR_Y6B_RTF" << "3DR_X8_RTF" << "3DR_QUAD_X4_RTF" << "3DR_Y6A_RTF";
    paramFiles.sort();

    foreach(QString paramFile, paramFiles){
    QListWidgetItem *item = new QListWidgetItem( paramFile, ui->listWidget);
        ui->listWidget->addItem(item);
        m_paramUrls.append( m_locationOfFrameParams + paramFile + m_extension + m_version );
    }

    // [TODO] stop hiding the refresh button used to donwload from GitHub.
    ui->refreshButton->setVisible(false);

}

DownloadRemoteParamsDialog::~DownloadRemoteParamsDialog()
{<commit_msg>Added new param files to download list<commit_after>#include "QsLog.h"
#include "configuration.h"
#include <QMessageBox>
#include <QDesktopServices>
#include <QFile>
#include <QFileDialog>
#include <QTimer>
#include "DownloadRemoteParamsDialog.h"
#include "ui_DownloadRemoteParamsDialog.h"

DownloadRemoteParamsDialog::DownloadRemoteParamsDialog(QWidget *parent, bool overwriteFile) :
    QDialog(parent),
    ui(new Ui::DownloadRemoteParamsDialog),
    m_locationOfFrameParams("https://raw.github.com/diydrones/ardupilot/master/Tools/Frame_params/"),
    m_extension(".param"),
    m_version("?ref=master"),
    m_networkReply(NULL),
    m_overwriteFile(overwriteFile)
{
    QLOG_DEBUG() << "DownloadRemoteParamsDialog overwriteFile" << m_overwriteFile;
    ui->setupUi(this);

    connect(this, SIGNAL(canceled()), this, SLOT(cancelDownload()));
    connect(ui->downloadButton, SIGNAL(clicked()), this, SLOT(downloadButtonClicked()));
    connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(closeButtonClicked()));
    connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refreshParamList()));

    // [ToDo] For now just add a default list of parameter filenames
    // In future need to add a github rest API request.
    QStringList paramFiles;
    paramFiles << "Iris" << "Beginner" << "Intermediate" << "Advanced" << "CameraPlatform"
               << "3DR_Y6B_RTF" << "3DR_X8_RTF" << "3DR_QUAD_X4_RTF" << "3DR_Y6A_RTF"
               << "3DR_Rover" << "3DR_Skywalker_RTF";
    paramFiles.sort();

    foreach(QString paramFile, paramFiles){
    QListWidgetItem *item = new QListWidgetItem( paramFile, ui->listWidget);
        ui->listWidget->addItem(item);
        m_paramUrls.append( m_locationOfFrameParams + paramFile + m_extension + m_version );
    }

    // [TODO] stop hiding the refresh button used to donwload from GitHub.
    ui->refreshButton->setVisible(false);

}

DownloadRemoteParamsDialog::~DownloadRemoteParamsDialog()
{
{'fraction_non_alphanumeric': 0.1353894406691061, 'fraction_numerical': 0.004704652378463147, 'mean_word_length': 5.113418530351438, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 31, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 23, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7178', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1201, 'n_words': 234}