Commit 56ec05f3 authored by Pino Toscano's avatar Pino Toscano

TileCreatorDialog: use QDialogButtonBox

parent 1f17361b
......@@ -14,6 +14,7 @@
#include "TileCreatorDialog.h"
// Qt
#include <QPushButton>
#include <QTimer>
// Marble
......@@ -44,7 +45,7 @@ TileCreatorDialog::TileCreatorDialog(TileCreator *creator, QWidget *parent)
connect( d->m_creator, SIGNAL(progress(int)),
this, SLOT(setProgress(int)), Qt::QueuedConnection );
connect( d->uiWidget.cancelButton, SIGNAL(clicked()),
connect( d->uiWidget.buttonBox, SIGNAL(reject()),
this, SLOT(cancelTileCreation()) );
// Start the creation process
......@@ -53,7 +54,7 @@ TileCreatorDialog::TileCreatorDialog(TileCreator *creator, QWidget *parent)
void TileCreatorDialog::cancelTileCreation()
{
d->uiWidget.cancelButton->setEnabled( false );
d->uiWidget.buttonBox->button(QDialogButtonBox::Cancel)->setEnabled( false );
/** @todo: Cancelling mostly crashes Marble. Fix that and uncomment below */
// d->m_creator->cancelTileCreation();
......
......@@ -532,31 +532,11 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel</set>
</property>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>131</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>&amp;Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
......
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