diff --git a/oracle/src/oraclewizard.cpp b/oracle/src/oraclewizard.cpp index 79ad5414..b9a13eee 100644 --- a/oracle/src/oraclewizard.cpp +++ b/oracle/src/oraclewizard.cpp @@ -103,17 +103,21 @@ LoadSetsPage::LoadSetsPage(QWidget *parent) 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); connect(fileButton, SIGNAL(clicked()), this, SLOT(actLoadSetsFile())); QGridLayout *layout = new QGridLayout(this); layout->addWidget(urlRadioButton, 0, 0); layout->addWidget(urlLineEdit, 0, 1); - layout->addWidget(fileRadioButton, 1, 0); - layout->addWidget(fileLineEdit, 1, 1); - layout->addWidget(fileButton, 2, 1, Qt::AlignRight); - layout->addWidget(progressLabel, 3, 0); - layout->addWidget(progressBar, 3, 1); + layout->addWidget(urlButton, 1, 1, Qt::AlignRight); + layout->addWidget(fileRadioButton, 2, 0); + layout->addWidget(fileLineEdit, 2, 1); + layout->addWidget(fileButton, 3, 1, Qt::AlignRight); + layout->addWidget(progressLabel, 4, 0); + layout->addWidget(progressBar, 4, 1); connect(&watcher, SIGNAL(finished()), this, SLOT(importFinished())); @@ -128,6 +132,11 @@ void LoadSetsPage::initializePage() progressBar->hide(); } +void LoadSetsPage::actRestoreDefaultUrl() +{ + urlLineEdit->setText(ALLSETS_URL); +} + void LoadSetsPage::actLoadSetsFile() { QFileDialog dialog(this, tr("Load sets file")); diff --git a/oracle/src/oraclewizard.h b/oracle/src/oraclewizard.h index 6e6a6ea8..f3255f8e 100644 --- a/oracle/src/oraclewizard.h +++ b/oracle/src/oraclewizard.h @@ -63,6 +63,7 @@ private: QRadioButton *fileRadioButton; QLineEdit *urlLineEdit; QLineEdit *fileLineEdit; + QPushButton *urlButton; QPushButton *fileButton; QLabel *progressLabel; QProgressBar * progressBar; @@ -72,6 +73,7 @@ private: QFuture future; private slots: void actLoadSetsFile(); + void actRestoreDefaultUrl(); void actDownloadProgressSetsFile(qint64 received, qint64 total); void actDownloadFinishedSetsFile(); void importFinished();