Oracle: add button to restore default download url
Should avoid the problem explained in #414
This commit is contained in:
parent
8d2e5d3c43
commit
cb055055a9
2 changed files with 16 additions and 5 deletions
|
@ -103,17 +103,21 @@ LoadSetsPage::LoadSetsPage(QWidget *parent)
|
||||||
|
|
||||||
urlRadioButton->setChecked(true);
|
urlRadioButton->setChecked(true);
|
||||||
|
|
||||||
|
urlButton = new QPushButton(tr("Restore default url"), this);
|
||||||
|
connect(urlButton, SIGNAL(clicked()), this, SLOT(actRestoreDefaultUrl()));
|
||||||
|
|
||||||
fileButton = new QPushButton(tr("Choose file..."), this);
|
fileButton = new QPushButton(tr("Choose file..."), this);
|
||||||
connect(fileButton, SIGNAL(clicked()), this, SLOT(actLoadSetsFile()));
|
connect(fileButton, SIGNAL(clicked()), this, SLOT(actLoadSetsFile()));
|
||||||
|
|
||||||
QGridLayout *layout = new QGridLayout(this);
|
QGridLayout *layout = new QGridLayout(this);
|
||||||
layout->addWidget(urlRadioButton, 0, 0);
|
layout->addWidget(urlRadioButton, 0, 0);
|
||||||
layout->addWidget(urlLineEdit, 0, 1);
|
layout->addWidget(urlLineEdit, 0, 1);
|
||||||
layout->addWidget(fileRadioButton, 1, 0);
|
layout->addWidget(urlButton, 1, 1, Qt::AlignRight);
|
||||||
layout->addWidget(fileLineEdit, 1, 1);
|
layout->addWidget(fileRadioButton, 2, 0);
|
||||||
layout->addWidget(fileButton, 2, 1, Qt::AlignRight);
|
layout->addWidget(fileLineEdit, 2, 1);
|
||||||
layout->addWidget(progressLabel, 3, 0);
|
layout->addWidget(fileButton, 3, 1, Qt::AlignRight);
|
||||||
layout->addWidget(progressBar, 3, 1);
|
layout->addWidget(progressLabel, 4, 0);
|
||||||
|
layout->addWidget(progressBar, 4, 1);
|
||||||
|
|
||||||
connect(&watcher, SIGNAL(finished()), this, SLOT(importFinished()));
|
connect(&watcher, SIGNAL(finished()), this, SLOT(importFinished()));
|
||||||
|
|
||||||
|
@ -128,6 +132,11 @@ void LoadSetsPage::initializePage()
|
||||||
progressBar->hide();
|
progressBar->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadSetsPage::actRestoreDefaultUrl()
|
||||||
|
{
|
||||||
|
urlLineEdit->setText(ALLSETS_URL);
|
||||||
|
}
|
||||||
|
|
||||||
void LoadSetsPage::actLoadSetsFile()
|
void LoadSetsPage::actLoadSetsFile()
|
||||||
{
|
{
|
||||||
QFileDialog dialog(this, tr("Load sets file"));
|
QFileDialog dialog(this, tr("Load sets file"));
|
||||||
|
|
|
@ -63,6 +63,7 @@ private:
|
||||||
QRadioButton *fileRadioButton;
|
QRadioButton *fileRadioButton;
|
||||||
QLineEdit *urlLineEdit;
|
QLineEdit *urlLineEdit;
|
||||||
QLineEdit *fileLineEdit;
|
QLineEdit *fileLineEdit;
|
||||||
|
QPushButton *urlButton;
|
||||||
QPushButton *fileButton;
|
QPushButton *fileButton;
|
||||||
QLabel *progressLabel;
|
QLabel *progressLabel;
|
||||||
QProgressBar * progressBar;
|
QProgressBar * progressBar;
|
||||||
|
@ -72,6 +73,7 @@ private:
|
||||||
QFuture<bool> future;
|
QFuture<bool> future;
|
||||||
private slots:
|
private slots:
|
||||||
void actLoadSetsFile();
|
void actLoadSetsFile();
|
||||||
|
void actRestoreDefaultUrl();
|
||||||
void actDownloadProgressSetsFile(qint64 received, qint64 total);
|
void actDownloadProgressSetsFile(qint64 received, qint64 total);
|
||||||
void actDownloadFinishedSetsFile();
|
void actDownloadFinishedSetsFile();
|
||||||
void importFinished();
|
void importFinished();
|
||||||
|
|
Loading…
Reference in a new issue