Commit 1f17361b authored by Pino Toscano's avatar Pino Toscano

annotate: use standard Cancel button

QDialogButtonBox was already used, so not sure why Cancel was added
manually...
parent 85fa6774
......@@ -37,7 +37,6 @@ DownloadOsmDialog::DownloadOsmDialog(MarbleWidget *parent,AnnotatePlugin *annota
m_marbleWidget(parent),
m_latLonBoxWidget(new LatLonBoxWidget)
{
QPushButton *m_quitButton;
setupUi(this);
horizontalLayout->addWidget(m_latLonBoxWidget);
this->setWindowTitle("Download");
......@@ -49,14 +48,11 @@ DownloadOsmDialog::DownloadOsmDialog(MarbleWidget *parent,AnnotatePlugin *annota
m_downloadButton = new QPushButton(tr("Download"));
m_downloadButton->setDefault(true);
m_quitButton = new QPushButton(tr("Cancel"));
m_quitButton->setAutoDefault(false);
buttonBox->addButton(m_downloadButton,QDialogButtonBox::ActionRole);
buttonBox->addButton(m_quitButton,QDialogButtonBox::RejectRole);
connect( m_downloadButton, SIGNAL(clicked(bool)), this, SLOT(downloadFile()) );
connect( m_quitButton, SIGNAL(clicked(bool)), this, SLOT(close()) );
connect( buttonBox, SIGNAL(reject()), this, SLOT(close()) );
connect( this, SIGNAL(openFile(QString)), annotatePlugin, SLOT(openAnnotationFile(QString)) );
progressBar->hide();
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DownloadOsmDialog</class>
<class>DownloadOsmDialog</class>
<widget class="QDialog" name="DownloadOsmDialog">
<property name="geometry">
<rect>
......@@ -26,7 +26,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::NoButton</set>
<set>QDialogButtonBox::Cancel</set>
</property>
</widget>
<widget class="QProgressBar" name="progressBar">
......
Markdown is supported
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