Make the prepare viewmodule use WaitingWidget
This commit is contained in:
parent
8651b33843
commit
4d9f887c58
@ -21,7 +21,7 @@
|
|||||||
#include "PreparePage.h"
|
#include "PreparePage.h"
|
||||||
#include "partman_devices.h"
|
#include "partman_devices.h"
|
||||||
|
|
||||||
#include "widgets/QtWaitingSpinner.h"
|
#include "widgets/WaitingWidget.h"
|
||||||
#include "utils/CalamaresUtilsGui.h"
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
@ -32,6 +32,7 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
PrepareViewStep::PrepareViewStep( QObject* parent )
|
PrepareViewStep::PrepareViewStep( QObject* parent )
|
||||||
: Calamares::ViewStep( parent )
|
: Calamares::ViewStep( parent )
|
||||||
@ -44,38 +45,8 @@ PrepareViewStep::PrepareViewStep( QObject* parent )
|
|||||||
m_widget->setLayout( mainLayout );
|
m_widget->setLayout( mainLayout );
|
||||||
CalamaresUtils::unmarginLayout( mainLayout );
|
CalamaresUtils::unmarginLayout( mainLayout );
|
||||||
|
|
||||||
QWidget* waitingWidget = new QWidget;
|
QWidget* waitingWidget = new WaitingWidget( tr( "Gathering system information..." ) );
|
||||||
{
|
mainLayout->addWidget( waitingWidget );
|
||||||
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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
QTimer* timer = new QTimer;
|
QTimer* timer = new QTimer;
|
||||||
timer->setSingleShot( true );
|
timer->setSingleShot( true );
|
||||||
|
Loading…
Reference in New Issue
Block a user