Commit e1c5f4d4 authored by Gavin Bisesi's avatar Gavin Bisesi
Browse files

Merge pull request #419 from ctrlaltca/oracle_url

Oracle: add button to restore default download url
parents 13f6da15 cb055055
...@@ -103,17 +103,21 @@ LoadSetsPage::LoadSetsPage(QWidget *parent) ...@@ -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() ...@@ -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: ...@@ -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: ...@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment