Skip to content
Snippets Groups Projects
Commit 4d9f887c authored by Teo Mrnjavac's avatar Teo Mrnjavac
Browse files

Make the prepare viewmodule use WaitingWidget

parent 8651b338
No related merge requests found
......@@ -21,7 +21,7 @@
#include "PreparePage.h"
#include "partman_devices.h"
#include "widgets/QtWaitingSpinner.h"
#include "widgets/WaitingWidget.h"
#include "utils/CalamaresUtilsGui.h"
#include "utils/Logger.h"
......@@ -32,6 +32,7 @@
#include <QFileInfo>
#include <QLabel>
#include <QProcess>
#include <QTimer>
PrepareViewStep::PrepareViewStep( QObject* parent )
: Calamares::ViewStep( parent )
......@@ -44,38 +45,8 @@ PrepareViewStep::PrepareViewStep( QObject* parent )
m_widget->setLayout( mainLayout );
CalamaresUtils::unmarginLayout( mainLayout );
QWidget* waitingWidget = new QWidget;
{
QBoxLayout* waitingLayout = new QVBoxLayout;
waitingWidget->setLayout( waitingLayout );
waitingLayout->addStretch();
QBoxLayout* pbLayout = new QHBoxLayout;
waitingLayout->addLayout( pbLayout );
pbLayout->addStretch();
QtWaitingSpinner* spnr = new QtWaitingSpinner();
pbLayout->addWidget( spnr );
pbLayout->addStretch();
QLabel* waitingLabel = new QLabel( "Gathering system information..." );
int spnrSize = waitingLabel->fontMetrics().height() * 4;
spnr->setFixedSize( spnrSize, spnrSize );
spnr->setRadius( spnrSize / 2 );
spnr->setLength( spnrSize / 2 );
spnr->setWidth( spnrSize / 8 );
spnr->start();
waitingLabel->setAlignment( Qt::AlignCenter);
waitingLayout->addSpacing( spnrSize / 2 );
waitingLayout->addWidget( waitingLabel );
waitingLayout->addStretch();
mainLayout->addWidget( waitingWidget );
CalamaresUtils::unmarginLayout( waitingLayout );
}
QWidget* waitingWidget = new WaitingWidget( tr( "Gathering system information..." ) );
mainLayout->addWidget( waitingWidget );
QTimer* timer = new QTimer;
timer->setSingleShot( true );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment