Add proper QResrouce system to libcalamaresui, finish up prepare checks

This also adds ImageRegistry, a SVG cache, a bunch of utility functions
for shared pixmaps in CalamaresUtilsGui and renames several qrc files
in viewmodules.
This commit is contained in:
Teo Mrnjavac 2014-08-26 15:18:30 +02:00
parent 0404413b05
commit d97bb47f09
26 changed files with 470 additions and 16 deletions

View file

@ -18,6 +18,10 @@
#include "PreparePage.h"
#include "PrepareCheckWidget.h"
#include "utils/CalamaresUtilsGui.h"
#include <QBoxLayout>
#include <QLabel>
@ -30,16 +34,25 @@ PreparePage::PreparePage( QWidget* parent )
QLabel* text = new QLabel( tr( "For best results, please ensure that this "
"computer:" ), this );
text->setAlignment( Qt::AlignCenter );
mainLayout->addStretch();
mainLayout->addWidget( text );
QHBoxLayout* spacerLayout = new QHBoxLayout;
mainLayout->addLayout( spacerLayout );
spacerLayout->addSpacing( CalamaresUtils::defaultFontHeight() * 2 );
m_entriesLayout = new QVBoxLayout;
spacerLayout->addLayout( m_entriesLayout );
CalamaresUtils::unmarginLayout( spacerLayout );
mainLayout->addStretch();
}
void
PreparePage::init()
PreparePage::init( const QList< QPair< QString, bool > > &checkEntries )
{
for ( const QPair< QString, bool >& entry : checkEntries )
{
PrepareCheckWidget* pcw = new PrepareCheckWidget( entry.first, entry.second );
m_entriesLayout->addWidget( pcw );
pcw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
}
}