mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 11:25:48 -05:00
[libcalamaresui] Rename m_slideShow -> m_qmlShow
- It could be any QML, so it's not a slideshow per se. - Minor prep-work for fixing up loading times.
This commit is contained in:
parent
8506949ecd
commit
cbe14bbf03
2 changed files with 11 additions and 14 deletions
|
@ -36,10 +36,9 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QtQuickWidgets/QQuickWidget>
|
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
|
#include <QQuickWidget>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
@ -54,21 +53,21 @@ ExecutionViewStep::ExecutionViewStep( QObject* parent )
|
||||||
QVBoxLayout* layout = new QVBoxLayout( m_widget );
|
QVBoxLayout* layout = new QVBoxLayout( m_widget );
|
||||||
QVBoxLayout* innerLayout = new QVBoxLayout;
|
QVBoxLayout* innerLayout = new QVBoxLayout;
|
||||||
|
|
||||||
m_slideShow = new QQuickWidget;
|
m_qmlShow = new QQuickWidget;
|
||||||
layout->addWidget( m_slideShow );
|
layout->addWidget( m_qmlShow );
|
||||||
CalamaresUtils::unmarginLayout( layout );
|
CalamaresUtils::unmarginLayout( layout );
|
||||||
|
|
||||||
layout->addLayout( innerLayout );
|
layout->addLayout( innerLayout );
|
||||||
m_slideShow->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
m_qmlShow->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||||
m_slideShow->setResizeMode( QQuickWidget::SizeRootObjectToView );
|
m_qmlShow->setResizeMode( QQuickWidget::SizeRootObjectToView );
|
||||||
|
|
||||||
m_slideShow->engine()->addImportPath( CalamaresUtils::qmlModulesDir().absolutePath() );
|
m_qmlShow->engine()->addImportPath( CalamaresUtils::qmlModulesDir().absolutePath() );
|
||||||
|
|
||||||
innerLayout->addSpacing( CalamaresUtils::defaultFontHeight() / 2 );
|
innerLayout->addSpacing( CalamaresUtils::defaultFontHeight() / 2 );
|
||||||
innerLayout->addWidget( m_progressBar );
|
innerLayout->addWidget( m_progressBar );
|
||||||
innerLayout->addWidget( m_label );
|
innerLayout->addWidget( m_label );
|
||||||
|
|
||||||
cDebug() << "QML import paths:" << Logger::DebugList( m_slideShow->engine()->importPathList() );
|
cDebug() << "QML import paths:" << Logger::DebugList( m_qmlShow->engine()->importPathList() );
|
||||||
|
|
||||||
connect( JobQueue::instance(), &JobQueue::progress,
|
connect( JobQueue::instance(), &JobQueue::progress,
|
||||||
this, &ExecutionViewStep::updateFromJobQueue );
|
this, &ExecutionViewStep::updateFromJobQueue );
|
||||||
|
@ -136,16 +135,14 @@ ExecutionViewStep::onActivate()
|
||||||
{
|
{
|
||||||
CALAMARES_RETRANSLATE_WIDGET( m_widget,
|
CALAMARES_RETRANSLATE_WIDGET( m_widget,
|
||||||
if ( !Calamares::Branding::instance()->slideshowPath().isEmpty() )
|
if ( !Calamares::Branding::instance()->slideshowPath().isEmpty() )
|
||||||
m_slideShow->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()
|
m_qmlShow->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()
|
||||||
->slideshowPath() ) );
|
->slideshowPath() ) );
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
JobQueue* queue = JobQueue::instance();
|
JobQueue* queue = JobQueue::instance();
|
||||||
foreach ( const QString& instanceKey, m_jobInstanceKeys )
|
foreach ( const QString& instanceKey, m_jobInstanceKeys )
|
||||||
{
|
{
|
||||||
Calamares::Module* module = Calamares::ModuleManager::instance()
|
Calamares::Module* module = Calamares::ModuleManager::instance()->moduleInstance( instanceKey );
|
||||||
->moduleInstance( instanceKey );
|
|
||||||
if ( module )
|
if ( module )
|
||||||
{
|
{
|
||||||
auto jl = module->jobs();
|
auto jl = module->jobs();
|
||||||
|
|
|
@ -60,7 +60,7 @@ private:
|
||||||
QWidget* m_widget;
|
QWidget* m_widget;
|
||||||
QProgressBar* m_progressBar;
|
QProgressBar* m_progressBar;
|
||||||
QLabel* m_label;
|
QLabel* m_label;
|
||||||
QQuickWidget* m_slideShow;
|
QQuickWidget* m_qmlShow;
|
||||||
|
|
||||||
QStringList m_jobInstanceKeys;
|
QStringList m_jobInstanceKeys;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue