Make the prepare viewmodule use WaitingWidget
This commit is contained in:
parent
8651b33843
commit
4d9f887c58
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user