53 #include "ui_dialoglayoutprogress.h"
54 #include "../options.h"
55 #include "../core/vapplication.h"
57 #include <QMessageBox>
58 #include <QPushButton>
68 qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
71 ui->progressBar->setValue(0);
73 ui->labelMessage->setText(tr(
"Arranged workpieces: %1 from %2").arg(0).arg(count));
75 movie =
new QMovie(
"://icon/16x16/progress.gif");
76 ui->labelProgress->setMovie (
movie);
79 QPushButton *bCancel =
ui->buttonBox->button(QDialogButtonBox::Cancel);
81 connect(bCancel, &QPushButton::clicked,
this, [
this](){emit
Abort();});
84 this->setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
103 ui->progressBar->setValue(count);
104 ui->labelMessage->setText(tr(
"Arranged workpieces: %1 from %2").arg(count).arg(
maxCount));
115 qCritical() << tr(
"Couldn't prepare data for creation layout");
118 qCritical() << tr(
"One or more pattern pieces are bigger than the paper format you selected. Please select a bigger paper format.");
125 done(QDialog::Rejected);
131 done(QDialog::Accepted);
137 QDialog::showEvent( event );
138 if ( event->spontaneous() )
149 setMaximumSize(size());
150 setMinimumSize(size());
virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE
void Error(const LayoutErrors &state)
DialogLayoutProgress(int count, QWidget *parent=nullptr)
Ui::DialogLayoutProgress * ui