[welcome] Show progress during requirements checking
This commit is contained in:
parent
b169281b69
commit
c508e3ed4d
@ -48,6 +48,7 @@ WelcomePage::WelcomePage( QWidget* parent )
|
|||||||
{
|
{
|
||||||
connect( Calamares::ModuleManager::instance(), &Calamares::ModuleManager::requirementsResult, m_checkingWidget, &CheckerContainer::requirementsChecked );
|
connect( Calamares::ModuleManager::instance(), &Calamares::ModuleManager::requirementsResult, m_checkingWidget, &CheckerContainer::requirementsChecked );
|
||||||
connect( Calamares::ModuleManager::instance(), &Calamares::ModuleManager::requirementsComplete, m_checkingWidget, &CheckerContainer::requirementsComplete );
|
connect( Calamares::ModuleManager::instance(), &Calamares::ModuleManager::requirementsComplete, m_checkingWidget, &CheckerContainer::requirementsComplete );
|
||||||
|
connect( Calamares::ModuleManager::instance(), &Calamares::ModuleManager::requirementsProgress, m_checkingWidget, &CheckerContainer::requirementsProgress );
|
||||||
ui->setupUi( this );
|
ui->setupUi( this );
|
||||||
|
|
||||||
ui->verticalLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() * 2 );
|
ui->verticalLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() * 2 );
|
||||||
|
@ -54,7 +54,7 @@ void CheckerContainer::requirementsComplete( bool ok )
|
|||||||
m_checkerWidget->init( m_requirements );
|
m_checkerWidget->init( m_requirements );
|
||||||
layout()->removeWidget( m_waitingWidget );
|
layout()->removeWidget( m_waitingWidget );
|
||||||
m_waitingWidget->deleteLater();
|
m_waitingWidget->deleteLater();
|
||||||
m_waitingWidget = nullptr; // Don't delete in constructor
|
m_waitingWidget = nullptr; // Don't delete in destructor
|
||||||
m_checkerWidget->setParent( this );
|
m_checkerWidget->setParent( this );
|
||||||
layout()->addWidget( m_checkerWidget );
|
layout()->addWidget( m_checkerWidget );
|
||||||
|
|
||||||
@ -66,6 +66,12 @@ void CheckerContainer::requirementsChecked(const Calamares::RequirementsList& l)
|
|||||||
m_requirements.append( l );
|
m_requirements.append( l );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CheckerContainer::requirementsProgress(const QString& message)
|
||||||
|
{
|
||||||
|
if ( m_waitingWidget )
|
||||||
|
m_waitingWidget->setText( message );
|
||||||
|
}
|
||||||
|
|
||||||
bool CheckerContainer::verdict() const
|
bool CheckerContainer::verdict() const
|
||||||
{
|
{
|
||||||
return m_verdict;
|
return m_verdict;
|
||||||
|
@ -51,6 +51,8 @@ public slots:
|
|||||||
/** @brief All the requirements are complete, switch to list view */
|
/** @brief All the requirements are complete, switch to list view */
|
||||||
void requirementsComplete( bool );
|
void requirementsComplete( bool );
|
||||||
|
|
||||||
|
void requirementsProgress( const QString& message );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
WaitingWidget *m_waitingWidget;
|
WaitingWidget *m_waitingWidget;
|
||||||
CheckerWidget *m_checkerWidget;
|
CheckerWidget *m_checkerWidget;
|
||||||
|
Loading…
Reference in New Issue
Block a user