mirror of https://github.com/cutefishos/calamares
Merge branch 'extra_qml' into calamares
commit
d7767afe1b
@ -0,0 +1,69 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
if( NOT WITH_QML )
|
||||
calamares_skip_module( "packagechooserq (QML is not supported in this build)" )
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core )
|
||||
|
||||
# Add optional libraries here
|
||||
set( USER_EXTRA_LIB )
|
||||
|
||||
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
||||
set( _packagechooser ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
||||
include_directories( ${_packagechooser} )
|
||||
|
||||
### OPTIONAL AppData XML support in PackageModel
|
||||
#
|
||||
#
|
||||
# TODO:3.3:WITH->BUILD (this doesn't affect the ABI offered by Calamares)
|
||||
option( WITH_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON )
|
||||
if ( WITH_APPDATA )
|
||||
find_package(Qt5 COMPONENTS Xml)
|
||||
if ( Qt5Xml_FOUND )
|
||||
add_definitions( -DHAVE_APPDATA )
|
||||
list( APPEND _extra_libraries Qt5::Xml )
|
||||
list( APPEND _extra_src ItemAppData.cpp )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
### OPTIONAL AppStream support in PackageModel
|
||||
#
|
||||
#
|
||||
option( WITH_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON )
|
||||
if ( WITH_APPSTREAM )
|
||||
find_package(AppStreamQt)
|
||||
set_package_properties(
|
||||
AppStreamQt PROPERTIES
|
||||
DESCRIPTION "Support for AppStream (cache) data"
|
||||
URL "https://github.com/ximion/appstream"
|
||||
PURPOSE "AppStream provides package data"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if ( AppStreamQt_FOUND )
|
||||
add_definitions( -DHAVE_APPSTREAM )
|
||||
list( APPEND _extra_libraries AppStreamQt )
|
||||
list( APPEND _extra_src ItemAppStream.cpp )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
calamares_add_plugin( packagechooserq
|
||||
TYPE viewmodule
|
||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
||||
SOURCES
|
||||
PackageChooserQmlViewStep.cpp
|
||||
${_packagechooser}/Config.cpp
|
||||
${_packagechooser}/PackageModel.cpp
|
||||
${_packagechooser}/ItemAppData.cpp
|
||||
RESOURCES
|
||||
packagechooserq.qrc
|
||||
LINK_PRIVATE_LIBRARIES
|
||||
calamaresui
|
||||
${_extra_libraries}
|
||||
SHARED_LIB
|
||||
)
|
||||
@ -0,0 +1,86 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PackageChooserQmlViewStep.h"
|
||||
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
#include "locale/TranslatableConfiguration.h"
|
||||
#include "utils/CalamaresUtilsSystem.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Variant.h"
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( PackageChooserQmlViewStepFactory, registerPlugin< PackageChooserQmlViewStep >(); )
|
||||
|
||||
PackageChooserQmlViewStep::PackageChooserQmlViewStep( QObject* parent )
|
||||
: Calamares::QmlViewStep( parent )
|
||||
, m_config( new Config( this ) )
|
||||
{
|
||||
emit nextStatusChanged( true );
|
||||
}
|
||||
|
||||
QString
|
||||
PackageChooserQmlViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Packages" );
|
||||
}
|
||||
|
||||
QString
|
||||
PackageChooserQmlViewStep::prettyStatus() const
|
||||
{
|
||||
//QString option = m_pkgc;
|
||||
//return tr( "Install option: %1" ).arg( option );
|
||||
return m_config->prettyStatus();
|
||||
}
|
||||
|
||||
bool
|
||||
PackageChooserQmlViewStep::isNextEnabled() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PackageChooserQmlViewStep::isBackEnabled() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PackageChooserQmlViewStep::isAtBeginning() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PackageChooserQmlViewStep::isAtEnd() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Calamares::JobList
|
||||
PackageChooserQmlViewStep::jobs() const
|
||||
{
|
||||
Calamares::JobList l;
|
||||
return l;
|
||||
}
|
||||
|
||||
void
|
||||
PackageChooserQmlViewStep::onLeave()
|
||||
{
|
||||
m_config->fillGSSecondaryConfiguration();
|
||||
}
|
||||
|
||||
void
|
||||
PackageChooserQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
{
|
||||
m_config->setDefaultId( moduleInstanceKey() );
|
||||
m_config->setConfigurationMap( configurationMap );
|
||||
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PACKAGECHOOSERQMLVIEWSTEP_H
|
||||
#define PACKAGECHOOSERQMLVIEWSTEP_H
|
||||
|
||||
// Config from packagechooser module
|
||||
#include "Config.h"
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "locale/TranslatableConfiguration.h"
|
||||
#include "utils/PluginFactory.h"
|
||||
#include "viewpages/QmlViewStep.h"
|
||||
|
||||
#include <QVariantMap>
|
||||
|
||||
class Config;
|
||||
class PackageChooserPage;
|
||||
|
||||
class PLUGINDLLEXPORT PackageChooserQmlViewStep : public Calamares::QmlViewStep
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PackageChooserQmlViewStep( QObject* parent = nullptr );
|
||||
|
||||
QString prettyName() const override;
|
||||
QString prettyStatus() const override;
|
||||
|
||||
bool isNextEnabled() const override;
|
||||
bool isBackEnabled() const override;
|
||||
|
||||
bool isAtBeginning() const override;
|
||||
bool isAtEnd() const override;
|
||||
|
||||
//void onActivate() override;
|
||||
void onLeave() override;
|
||||
|
||||
Calamares::JobList jobs() const override;
|
||||
|
||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||
|
||||
QObject* getConfig() override { return m_config; }
|
||||
|
||||
private:
|
||||
Config* m_config;
|
||||
};
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( PackageChooserQmlViewStepFactory )
|
||||
|
||||
#endif // PACKAGECHOOSERQMLVIEWSTEP_H
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2021 pngegg <https://www.pngegg.com/>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
@ -0,0 +1,48 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Configuration for the low-density software chooser
|
||||
---
|
||||
# Software selection mode, to set whether the software packages
|
||||
# can be chosen singly, or multiply.
|
||||
#
|
||||
# Possible modes are "optional", "required" (for zero-or-one or exactly-one)
|
||||
# or "optionalmultiple", "requiredmultiple" (for zero-or-more
|
||||
# or one-or-more).
|
||||
mode: required
|
||||
|
||||
# Software installation method:
|
||||
#
|
||||
# - "legacy" or "custom" or "contextualprocess"
|
||||
# When set to "legacy", writes a GlobalStorage value for the choice that
|
||||
# has been made. The key is *packagechooser_<id>*. Normally, the module's
|
||||
# instance name is used; see the *instances* section of `settings.conf`.
|
||||
# If there is just one packagechooser module, and no special instance is set,
|
||||
# resulting GS key is probably *packagechooser@packagechooser*.
|
||||
# You can set *id* to change that, but it is not recommended.
|
||||
#
|
||||
# The GS value is a comma-separated list of the IDs of the selected
|
||||
# packages, or an empty string if none is selected.
|
||||
#
|
||||
# With "legacy" installation, you should have a contextualprocess or similar
|
||||
# module somewhere in the `exec` phase to process the GlobalStorage key
|
||||
# and actually **do** something for the packages.
|
||||
#
|
||||
# - "packages"
|
||||
# When set to "packages", writes GlobalStorage values suitable for
|
||||
# consumption by the *packages* module (which should appear later
|
||||
# in the `exec` section. These package settings will then be handed
|
||||
# off to whatever package manager is configured there.
|
||||
# The *id* key is not used.
|
||||
#
|
||||
# There is no need to put this module in the `exec` section. There
|
||||
# are no jobs that this module provides. You should put **other**
|
||||
# modules, either *contextualprocess* or *packages* or some custom
|
||||
# module, in the `exec` section to do the actual work.
|
||||
method: legacy
|
||||
# The *id* key is used only in "legacy" mode
|
||||
# id: ""
|
||||
|
||||
# The *pkgc* is used for setting the default selection in the QML view
|
||||
pkgc: libreoffice
|
||||
|
||||
@ -0,0 +1,254 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
import io.calamares.core 1.0
|
||||
import io.calamares.ui 1.0
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "#f2f2f2"
|
||||
|
||||
ButtonGroup {
|
||||
id: switchGroup
|
||||
}
|
||||
|
||||
Column {
|
||||
id: column
|
||||
anchors.centerIn: parent
|
||||
spacing: 5
|
||||
|
||||
Rectangle {
|
||||
//id: rectangle
|
||||
width: 700
|
||||
height: 150
|
||||
color: "#ffffff"
|
||||
radius: 10
|
||||
border.width: 0
|
||||
Text {
|
||||
width: 450
|
||||
height: 104
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("LibreOffice is a powerful and free office suite, used by millions of people around the world. It includes several applications that make it the most versatile Free and Open Source office suite on the market.<br/>
|
||||
Default option.")
|
||||
font.pointSize: 10
|
||||
anchors.verticalCenterOffset: -10
|
||||
anchors.horizontalCenterOffset: 100
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Switch {
|
||||
id: element2
|
||||
x: 500
|
||||
y: 110
|
||||
width: 187
|
||||
height: 14
|
||||
text: qsTr("LibreOffice")
|
||||
checked: true
|
||||
hoverEnabled: true
|
||||
ButtonGroup.group: switchGroup
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 40
|
||||
implicitHeight: 14
|
||||
radius: 10
|
||||
color: element2.checked ? "#3498db" : "#B9B9B9"
|
||||
border.color: element2.checked ? "#3498db" : "#cccccc"
|
||||
|
||||
Rectangle {
|
||||
x: element2.checked ? parent.width - width : 0
|
||||
y: (parent.height - height) / 2
|
||||
width: 20
|
||||
height: 20
|
||||
radius: 10
|
||||
color: element2.down ? "#cccccc" : "#ffffff"
|
||||
border.color: element2.checked ? (element1.down ? "#3498db" : "#3498db") : "#999999"
|
||||
}
|
||||
}
|
||||
|
||||
onCheckedChanged: {
|
||||
if ( ! checked ) {
|
||||
print("L not used")
|
||||
}
|
||||
else {
|
||||
config.pkgc = "libreoffice"
|
||||
print( config.pkgc )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image2
|
||||
x: 8
|
||||
y: 25
|
||||
height: 100
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "images/libreoffice.jpg"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 700
|
||||
height: 150
|
||||
radius: 10
|
||||
border.width: 0
|
||||
Text {
|
||||
width: 450
|
||||
height: 104
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("If you don't want to install an office suite, just select No Office Suite. You can always add one (or more) later on your installed system as the need arrives.")
|
||||
font.pointSize: 10
|
||||
anchors.verticalCenterOffset: -10
|
||||
anchors.horizontalCenterOffset: 100
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Switch {
|
||||
id: element1
|
||||
x: 500
|
||||
y: 110
|
||||
width: 187
|
||||
height: 14
|
||||
text: qsTr("No Office Suite")
|
||||
checked: false
|
||||
hoverEnabled: true
|
||||
ButtonGroup.group: switchGroup
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 40
|
||||
implicitHeight: 14
|
||||
radius: 10
|
||||
color: element1.checked ? "#3498db" : "#B9B9B9"
|
||||
border.color: element1.checked ? "#3498db" : "#cccccc"
|
||||
|
||||
Rectangle {
|
||||
x: element1.checked ? parent.width - width : 0
|
||||
y: (parent.height - height) / 2
|
||||
width: 20
|
||||
height: 20
|
||||
radius: 10
|
||||
color: element1.down ? "#cccccc" : "#ffffff"
|
||||
border.color: element1.checked ? (element1.down ? "#3498db" : "#3498db") : "#999999"
|
||||
}
|
||||
}
|
||||
|
||||
onCheckedChanged: {
|
||||
if ( ! checked ) {
|
||||
print("not used")
|
||||
//console.log("removed")
|
||||
}
|
||||
else {
|
||||
print("No Office Suite")
|
||||
config.pkgc = "no_office_suite"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image
|
||||
x: 8
|
||||
y: 25
|
||||
height: 100
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "images/no-selection.png"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 700
|
||||
height: 150
|
||||
color: "#ffffff"
|
||||
radius: 10
|
||||
border.width: 0
|
||||
Text {
|
||||
width: 450
|
||||
height: 104
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("Create a minimal Desktop install, remove all extra applications and decide later on what you would like to add to your system. Examples of what won't be on such an install, there will be no Office Suite, no media players, no image viewer or print support. It will be just a desktop, file browser, package manager, text editor and simple web-browser.")
|
||||
font.pointSize: 10
|
||||
anchors.verticalCenterOffset: -10
|
||||
anchors.horizontalCenterOffset: 100
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Switch {
|
||||
id: element3
|
||||
x: 500
|
||||
y: 110
|
||||
width: 187
|
||||
height: 14
|
||||
text: qsTr("Minimal Install")
|
||||
checked: false
|
||||
hoverEnabled: true
|
||||
ButtonGroup.group: switchGroup
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 40
|
||||
implicitHeight: 14
|
||||
radius: 10
|
||||
color: element3.checked ? "#3498db" : "#B9B9B9"
|
||||
border.color: element3.checked ? "#3498db" : "#cccccc"
|
||||
|
||||
Rectangle {
|
||||
x: element3.checked ? parent.width - width : 0
|
||||
y: (parent.height - height) / 2
|
||||
width: 20
|
||||
height: 20
|
||||
radius: 10
|
||||
color: element3.down ? "#cccccc" : "#ffffff"
|
||||
border.color: element3.checked ? (element3.down ? "#3498db" : "#3498db") : "#999999"
|
||||
}
|
||||
}
|
||||
|
||||
onCheckedChanged: {
|
||||
if ( ! checked ) {
|
||||
print("M not used")
|
||||
}
|
||||
else {
|
||||
print("minimal")
|
||||
config.pkgc = "minimal_install"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image3
|
||||
x: 8
|
||||
y: 25
|
||||
height: 100
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: "images/plasma.png"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 700
|
||||
height: 25
|
||||
color: "#f2f2f2"
|
||||
border.width: 0
|
||||
Text {
|
||||
height: 25
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("Please select an option for your install, or use the default: LibreOffice included.")
|
||||
font.pointSize: 10
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
<RCC>
|
||||
<qresource>
|
||||
<file>packagechooserq.qml</file>
|
||||
<file>images/libreoffice.jpg</file>
|
||||
<file>images/no-selection.png</file>
|
||||
<file>images/plasma.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@ -0,0 +1,127 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2020, Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "Settings.h"
|
||||
#include "ViewManager.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "viewpages/ExecutionViewStep.h"
|
||||
|
||||
SummaryModel::SummaryModel( QObject* parent )
|
||||
: QAbstractListModel( parent )
|
||||
{
|
||||
}
|
||||
|
||||
QHash< int, QByteArray >
|
||||
SummaryModel::roleNames() const
|
||||
{
|
||||
return { { Qt::DisplayRole, "title" }, { Qt::UserRole, "message" } };
|
||||
}
|
||||
|
||||
QVariant
|
||||
SummaryModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( !index.isValid() )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
const auto item = m_summary.at( index.row() );
|
||||
return role == Qt::DisplayRole ? item.title : item.message;
|
||||
}
|
||||
|
||||
int
|
||||
SummaryModel::rowCount( const QModelIndex& ) const
|
||||
{
|
||||
return m_summary.count();
|
||||
}
|
||||
|
||||
void
|
||||
SummaryModel::setSummaryList( const Calamares::ViewStepList& steps, bool withWidgets )
|
||||
{
|
||||
Q_EMIT beginResetModel();
|
||||
m_summary.clear();
|
||||
|
||||
for ( Calamares::ViewStep* step : steps )
|
||||
{
|
||||
QString text = step->prettyStatus();
|
||||
QWidget* widget = withWidgets ? step->createSummaryWidget() : nullptr;
|
||||
|
||||
if ( text.isEmpty() && !widget )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
m_summary << StepSummary { step->prettyName(), text, widget };
|
||||
}
|
||||
Q_EMIT endResetModel();
|
||||
}
|
||||
|
||||
Config::Config( QObject* parent )
|
||||
: QObject( parent )
|
||||
, m_summary( new SummaryModel( this ) )
|
||||
|
||||
{
|
||||
CALAMARES_RETRANSLATE_SLOT( &Config::retranslate );
|
||||
retranslate();
|
||||
}
|
||||
|
||||
void
|
||||
Config::retranslate()
|
||||
{
|
||||
m_title = tr( "Summary" );
|
||||
|
||||
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||
{
|
||||
m_message = tr( "This is an overview of what will happen once you start "
|
||||
"the setup procedure." );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_message = tr( "This is an overview of what will happen once you start "
|
||||
"the install procedure." );
|
||||
}
|
||||
Q_EMIT titleChanged( m_title );
|
||||
Q_EMIT messageChanged( m_message );
|
||||
}
|
||||
|
||||
void
|
||||
Config::collectSummaries( const Calamares::ViewStep* upToHere )
|
||||
{
|
||||
Calamares::ViewStepList steps;
|
||||
for ( Calamares::ViewStep* step : Calamares::ViewManager::instance()->viewSteps() )
|
||||
{
|
||||
// *Assume* that if there's an exec step in the sequence,
|
||||
// we don't need a summary for steps before it. This works in
|
||||
// practice if there's a summary step before each exec --
|
||||
// and in practice, there's only one of each.
|
||||
if ( qobject_cast< Calamares::ExecutionViewStep* >( step ) )
|
||||
{
|
||||
steps.clear();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Having reached the parent view-step of the Config object,
|
||||
// we know we're providing a summary of steps up until this
|
||||
// view step, so we now have steps since the previous exec, up
|
||||
// to this summary.
|
||||
if ( upToHere == step )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
steps.append( step );
|
||||
}
|
||||
|
||||
m_summary->setSummaryList( steps );
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2019-2020, Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020, Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SUMMARY_CONFIG_H
|
||||
#define SUMMARY_CONFIG_H
|
||||
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QObject>
|
||||
#include <QQmlParserStatus>
|
||||
|
||||
class Config;
|
||||
|
||||
/** @brief Data for one step
|
||||
*
|
||||
* A step generally has a text description, but **may** have a
|
||||
* QWidget. There is no ownership of the QWidget, that is assumed
|
||||
* to be handed off to some owning parent-widget.
|
||||
*/
|
||||
struct StepSummary
|
||||
{
|
||||
QString title;
|
||||
QString message;
|
||||
QWidget* widget = nullptr;
|
||||
};
|
||||
|
||||
class SummaryModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class Config;
|
||||
|
||||
public:
|
||||
explicit SummaryModel( QObject* parent = nullptr );
|
||||
int rowCount( const QModelIndex& = QModelIndex() ) const override;
|
||||
QVariant data( const QModelIndex& index, int role ) const override;
|
||||
|
||||
protected:
|
||||
QHash< int, QByteArray > roleNames() const override;
|
||||
|
||||
private:
|
||||
/** @brief Sets the model data from @p steps
|
||||
*
|
||||
* Replaces the list of summaries with summaries given by
|
||||
* the jobs and ViewSteps objects in @p steps. If @p withWidgets
|
||||
* is @c true, then also queries for widget summaries alongside
|
||||
* the text summaries for each step.
|
||||
*/
|
||||
void setSummaryList( const Calamares::ViewStepList& steps, bool withWidgets = false );
|
||||
|
||||
QVector< StepSummary > m_summary;
|
||||
};
|
||||
|
||||
class Config : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
///@brief Name of this summary (generally, "Summary")
|
||||
Q_PROPERTY( QString title READ title NOTIFY titleChanged )
|
||||
///@brief Description of what the summary means
|
||||
Q_PROPERTY( QString message READ message NOTIFY messageChanged )
|
||||
|
||||
Q_PROPERTY( QAbstractListModel* summaryModel READ summaryModel CONSTANT FINAL )
|
||||
|
||||
public:
|
||||
explicit Config( QObject* parent = nullptr );
|
||||
|
||||
///@brief Called later, to load the model once all viewsteps are there
|
||||
void collectSummaries( const Calamares::ViewStep* upToHere );
|
||||
|
||||
QAbstractListModel* summaryModel() const { return m_summary; }
|
||||
|
||||
QString title() const { return m_title; }
|
||||
QString message() const { return m_message; }
|
||||
|
||||
private:
|
||||
Calamares::ViewStepList stepsForSummary( const Calamares::ViewStepList& allSteps ) const;
|
||||
void retranslate();
|
||||
|
||||
SummaryModel* m_summary;
|
||||
|
||||
QString m_title;
|
||||
QString m_message;
|
||||
|
||||
Q_SIGNALS:
|
||||
void titleChanged( QString title );
|
||||
void messageChanged( QString message );
|
||||
};
|
||||
#endif
|
||||
@ -0,0 +1,21 @@
|
||||
if( NOT WITH_QML )
|
||||
calamares_skip_module( "summaryq (QML is not supported in this build)" )
|
||||
return()
|
||||
endif()
|
||||
|
||||
set( _summary ${CMAKE_CURRENT_SOURCE_DIR}/../summary )
|
||||
include_directories( ${_summary} )
|
||||
|
||||
calamares_add_plugin( summaryq
|
||||
TYPE viewmodule
|
||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
||||
SOURCES
|
||||
SummaryQmlViewStep.cpp
|
||||
${_summary}/Config.cpp
|
||||
UI
|
||||
RESOURCES
|
||||
summaryq.qrc
|
||||
LINK_PRIVATE_LIBRARIES
|
||||
calamaresui
|
||||
SHARED_LIB
|
||||
)
|
||||
@ -0,0 +1,73 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020, Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "SummaryQmlViewStep.h"
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( SummaryQmlViewStepFactory, registerPlugin< SummaryQmlViewStep >(); )
|
||||
|
||||
SummaryQmlViewStep::SummaryQmlViewStep( QObject* parent )
|
||||
: Calamares::QmlViewStep( parent )
|
||||
, m_config( new Config( this ) )
|
||||
{
|
||||
emit nextStatusChanged( true );
|
||||
}
|
||||
|
||||
|
||||
SummaryQmlViewStep::~SummaryQmlViewStep() {}
|
||||
|
||||
QString
|
||||
SummaryQmlViewStep::prettyName() const
|
||||
{
|
||||
return m_config->title();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SummaryQmlViewStep::isNextEnabled() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SummaryQmlViewStep::isBackEnabled() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SummaryQmlViewStep::isAtBeginning() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SummaryQmlViewStep::isAtEnd() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Calamares::JobList
|
||||
SummaryQmlViewStep::jobs() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SummaryQmlViewStep::onActivate()
|
||||
{
|
||||
// Collect the steps before this one: those need to have their
|
||||
// summary (text or widget) displayed.
|
||||
m_config->collectSummaries( this );
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020, Camilo Higuita <milo.h@aol.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SUMMARYQMLVIEWSTEP_H
|
||||
#define SUMMARYQMLVIEWSTEP_H
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "utils/PluginFactory.h"
|
||||
#include "viewpages/QmlViewStep.h"
|
||||
|
||||
class PLUGINDLLEXPORT SummaryQmlViewStep : public Calamares::QmlViewStep
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SummaryQmlViewStep( QObject* parent = nullptr );
|
||||
virtual ~SummaryQmlViewStep() override;
|
||||
|
||||
QString prettyName() const override;
|
||||
|
||||
|
||||
bool isNextEnabled() const override;
|
||||
bool isBackEnabled() const override;
|
||||
|
||||
bool isAtBeginning() const override;
|
||||
bool isAtEnd() const override;
|
||||
|
||||
Calamares::JobList jobs() const override;
|
||||
|
||||
void onActivate() override;
|
||||
|
||||
QObject* getConfig() override { return m_config; }
|
||||
|
||||
private:
|
||||
Config* m_config;
|
||||
};
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( SummaryQmlViewStepFactory )
|
||||
|
||||
#endif // SUMMARYQMLVIEWSTEP_H
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg width="64" version="1.1" xmlns="http://www.w3.org/2000/svg" height="64" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">
|
||||
<defs id="defs5455">
|
||||
<linearGradient inkscape:collect="always" id="linearGradient4876">
|
||||
<stop style="stop-color:#b0b8b8" id="stop4878"/>
|
||||
<stop offset="1" style="stop-color:#eff1f1" id="stop4880"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4876" id="linearGradient4185" y1="539.79797" y2="506.47214" x2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.81249961 0 0 0.88235295 76.6073 64.50563)"/>
|
||||
</defs>
|
||||
<metadata id="metadata5458"/>
|
||||
<g inkscape:label="Capa 1" inkscape:groupmode="layer" id="g4882" transform="matrix(1 0 0 1 -376.57144 -493.79798)">
|
||||
<rect width="52" x="382.57144" y="510.79797" height="30" style="fill:url(#linearGradient4185)" id="rect4177"/>
|
||||
<path style="fill:#334545" id="path4245" d="M 7 21 L 7 23 L 12 23 L 12 21 L 7 21 z M 13 21 L 13 23 L 17 23 L 17 21 L 13 21 z M 18 21 L 18 23 L 22 23 L 22 21 L 18 21 z M 23 21 L 23 23 L 27 23 L 27 21 L 23 21 z M 28 21 L 28 23 L 32 23 L 32 21 L 28 21 z M 33 21 L 33 23 L 37 23 L 37 21 L 33 21 z M 38 21 L 38 23 L 42 23 L 42 21 L 38 21 z M 43 21 L 43 23 L 47 23 L 47 21 L 43 21 z M 48 21 L 48 23 L 52 23 L 52 21 L 48 21 z M 53 21 L 53 23 L 57 23 L 57 21 L 53 21 z M 7 24 L 7 28 L 11 28 L 11 24 L 7 24 z M 12 24 L 12 28 L 16 28 L 16 24 L 12 24 z M 17 24 L 17 28 L 21 28 L 21 24 L 17 24 z M 22 24 L 22 28 L 26 28 L 26 24 L 22 24 z M 27 24 L 27 28 L 31 28 L 31 24 L 27 24 z M 32 24 L 32 28 L 36 28 L 36 24 L 32 24 z M 37 24 L 37 28 L 41 28 L 41 24 L 37 24 z M 42 24 L 42 28 L 46 28 L 46 24 L 42 24 z M 47 24 L 47 28 L 51 28 L 51 24 L 47 24 z M 52 24 L 52 28 L 57 28 L 57 24 L 52 24 z M 7 29 L 7 33 L 13 33 L 13 29 L 7 29 z M 14 29 L 14 33 L 18 33 L 18 29 L 14 29 z M 19 29 L 19 33 L 23 33 L 23 29 L 19 29 z M 24 29 L 24 33 L 28 33 L 28 29 L 24 29 z M 29 29 L 29 33 L 33 33 L 33 29 L 29 29 z M 34 29 L 34 33 L 38 33 L 38 29 L 34 29 z M 39 29 L 39 33 L 43 33 L 43 29 L 39 29 z M 44 29 L 44 33 L 48 33 L 48 29 L 44 29 z M 49 29 L 49 33 L 57 33 L 57 29 L 49 29 z M 7 34 L 7 38 L 17 38 L 17 34 L 7 34 z M 18 34 L 18 38 L 22 38 L 22 34 L 18 34 z M 23 34 L 23 38 L 27 38 L 27 34 L 23 34 z M 28 34 L 28 38 L 32 38 L 32 34 L 28 34 z M 33 34 L 33 38 L 37 38 L 37 34 L 33 34 z M 38 34 L 38 38 L 42 38 L 42 34 L 38 34 z M 43 34 L 43 38 L 47 38 L 47 34 L 43 34 z M 48 34 L 48 38 L 57 38 L 57 34 L 48 34 z M 7 39 L 7 43 L 13.099609 43 L 13.099609 39 L 7 39 z M 14 39 L 14 43 L 18 43 L 18 39 L 14 39 z M 19 39 L 19 43 L 37 43 L 37 39 L 19 39 z M 38 39 L 38 43 L 42 43 L 42 39 L 38 39 z M 48 39 L 48 43 L 52 43 L 52 39 L 48 39 z M 43 41 L 43 43 L 47 43 L 47 41 L 43 41 z M 53 41 L 53 43 L 57 43 L 57 41 L 53 41 z " transform="matrix(1 0 0 1 376.57144 493.79798)"/>
|
||||
<rect width="51.999973" x="382.57144" y="539.79797" height="1" style="fill:#909c9c" id="rect4187"/>
|
||||
<rect width="1" x="431.57141" y="511.79797" height="1" style="fill:#31c281" id="rect4462-0-90"/>
|
||||
<rect width="1" x="428.57135" y="511.79797" height="1" style="fill:#31c281" id="rect4975"/>
|
||||
<rect width="1" x="425.57141" y="511.79797" height="1" style="fill:#31c281" id="rect4977"/>
|
||||
<path style="fill:#172525" id="path4245-5" d="M 7 22 L 7 23 L 11 23 L 12 23 L 12 22 L 7 22 z M 13 22 L 13 23 L 16 23 L 17 23 L 17 22 L 13 22 z M 18 22 L 18 23 L 21 23 L 22 23 L 22 22 L 18 22 z M 23 22 L 23 23 L 26 23 L 27 23 L 27 22 L 23 22 z M 28 22 L 28 23 L 31 23 L 32 23 L 32 22 L 28 22 z M 33 22 L 33 23 L 36 23 L 37 23 L 37 22 L 33 22 z M 38 22 L 38 23 L 41 23 L 42 23 L 42 22 L 38 22 z M 43 22 L 43 23 L 46 23 L 47 23 L 47 22 L 43 22 z M 48 22 L 48 23 L 51 23 L 52 23 L 52 22 L 48 22 z M 53 22 L 53 23 L 57 23 L 57 22 L 53 22 z M 7 27 L 7 28 L 11 28 L 11 27 L 7 27 z M 12 27 L 12 28 L 13 28 L 14 28 L 16 28 L 16 27 L 12 27 z M 17 27 L 17 28 L 18 28 L 19 28 L 21 28 L 21 27 L 17 27 z M 22 27 L 22 28 L 23 28 L 24 28 L 26 28 L 26 27 L 22 27 z M 27 27 L 27 28 L 28 28 L 29 28 L 31 28 L 31 27 L 27 27 z M 32 27 L 32 28 L 33 28 L 34 28 L 36 28 L 36 27 L 32 27 z M 37 27 L 37 28 L 38 28 L 39 28 L 41 28 L 41 27 L 37 27 z M 42 27 L 42 28 L 43 28 L 44 28 L 46 28 L 46 27 L 42 27 z M 47 27 L 47 28 L 48 28 L 49 28 L 51 28 L 51 27 L 47 27 z M 52 27 L 52 28 L 57 28 L 57 27 L 52 27 z M 7 32 L 7 33 L 13 33 L 13 32 L 7 32 z M 14 32 L 14 33 L 17 33 L 18 33 L 18 32 L 14 32 z M 19 32 L 19 33 L 22 33 L 23 33 L 23 32 L 19 32 z M 24 32 L 24 33 L 27 33 L 28 33 L 28 32 L 24 32 z M 29 32 L 29 33 L 32 33 L 33 33 L 33 32 L 29 32 z M 34 32 L 34 33 L 37 33 L 38 33 L 38 32 L 34 32 z M 39 32 L 39 33 L 42 33 L 43 33 L 43 32 L 39 32 z M 44 32 L 44 33 L 47 33 L 48 33 L 48 32 L 44 32 z M 49 32 L 49 33 L 57 33 L 57 32 L 49 32 z M 7 37 L 7 38 L 13.099609 38 L 14 38 L 17 38 L 17 37 L 7 37 z M 18 37 L 18 38 L 19 38 L 22 38 L 22 37 L 18 37 z M 23 37 L 23 38 L 27 38 L 27 37 L 23 37 z M 28 37 L 28 38 L 32 38 L 32 37 L 28 37 z M 33 37 L 33 38 L 37 38 L 37 37 L 33 37 z M 38 37 L 38 38 L 42 38 L 42 37 L 38 37 z M 43 37 L 43 38 L 47 38 L 47 37 L 43 37 z M 48 37 L 48 38 L 52 38 L 57 38 L 57 37 L 48 37 z M 48 40 L 48 41 L 52 41 L 52 40 L 48 40 z M 7 42 L 7 43 L 13.099609 43 L 13.099609 42 L 7 42 z M 14 42 L 14 43 L 18 43 L 18 42 L 14 42 z M 19 42 L 19 43 L 37 43 L 37 42 L 19 42 z M 38 42 L 38 43 L 42 43 L 42 42 L 38 42 z M 43 42 L 43 43 L 47 43 L 47 42 L 43 42 z M 48 42 L 48 43 L 52 43 L 52 42 L 48 42 z M 53 42 L 53 43 L 57 43 L 57 42 L 53 42 z " transform="matrix(1 0 0 1 376.57144 493.79798)"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2021 KDE Visual Design Group <visual-design@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
@ -0,0 +1,39 @@
|
||||
<svg width="48" xmlns="http://www.w3.org/2000/svg" height="48" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<linearGradient id="a" y1="22" y2="8" x2="0" gradientUnits="userSpaceOnUse" gradientTransform="translate(429.57 508.8)">
|
||||
<stop stop-color="#2e3436"/>
|
||||
<stop offset="1" stop-color="#555753"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" y1="543.8" y2="502.66" gradientUnits="userSpaceOnUse" x2="0" gradientTransform="matrix(.66667 0 0 .63518 139.19 192.52)">
|
||||
<stop stop-color="#c6cdd1"/>
|
||||
<stop offset="1" stop-color="#e0e5e7"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="c" y1="529.8" x1="400.57" y2="548.8" gradientUnits="userSpaceOnUse" x2="418.57" gradientTransform="translate(11-6)">
|
||||
<stop/>
|
||||
<stop offset="1" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<linearGradient xlink:href="#b" id="d" y1="543.8" y2="502.66" gradientUnits="userSpaceOnUse" x2="0" gradientTransform="matrix(.66667 0 0 .63518 124.19 185.52)"/>
|
||||
<linearGradient xlink:href="#c" id="e" y1="523.8" x1="388.57" y2="538.8" gradientUnits="userSpaceOnUse" x2="400.57" gradientTransform="translate(11-7)"/>
|
||||
</defs>
|
||||
<g transform="translate(-384.57-499.8)">
|
||||
<rect width="20" x="392.57" y="504.8" fill="url(#d)" rx="0" height="28"/>
|
||||
<rect width="20" x="392.57" y="504.8" fill="#566069" height="4"/>
|
||||
<rect width="20" x="392.57" y="508.8" fill="#3daee9" height="1"/>
|
||||
<rect width="18" x="394.57" y="509.8" fill="#ffffff" height="21"/>
|
||||
<path fill="#464e55" d="m412.57 504.8l-5 7v4l5-7z"/>
|
||||
<g color-rendering="auto" color-interpolation-filters="linearRGB" shape-rendering="auto" image-rendering="auto" text-rendering="auto" color-interpolation="sRGB" color="#000000">
|
||||
<path fill="#1583bd" d="m412.57 508.8l-5 7v1l5-7z"/>
|
||||
<path fill="#a1aeb4" d="m412.57 509.8l-5 7v1l5-7z"/>
|
||||
</g>
|
||||
<rect width="20" x="407.57" y="511.8" fill="url(#b)" rx="0" height="28"/>
|
||||
<rect width="20" x="407.57" y="511.8" fill="#566069" height="4"/>
|
||||
<rect width="20" x="407.57" y="515.8" fill="#3daee9" height="1"/>
|
||||
<rect width="18" x="407.57" y="516.8" fill="#ffffff" height="21"/>
|
||||
<path opacity=".117" color-interpolation-filters="linearRGB" color="#000000" image-rendering="auto" color-rendering="auto" fill-rule="evenodd" d="m417.57 522.8l1 1h3l6 6v10l-5-.039-8.59-8.584 2.372-2.595-3.782-3.782 4-1z" color-interpolation="sRGB" text-rendering="auto" fill="url(#c)" shape-rendering="auto"/>
|
||||
<rect width="2" x="424.57" y="512.8" fill="#eff0f1" rx="1" height="2"/>
|
||||
<rect color-interpolation-filters="linearRGB" x="504.8" y="-392.57" color="#000000" image-rendering="auto" color-rendering="auto" width="41" color-interpolation="sRGB" text-rendering="auto" fill="url(#a)" height="2" shape-rendering="auto" transform="rotate(90)"/>
|
||||
<path fill="#555753" d="m416.57 522.8v1h-4v1h6.125v.25c0 .226-.141.768-.299 1.143-.174.414-.556.977-.926 1.365l-.307.32-.221-.24c-.302-.33-.752-1.01-.92-1.391l-.141-.314h-1.205l.125.303c.234.568.749 1.348 1.244 1.883.44.476.454.38-.113.801-.851.632-1.508 1.016-2.256 1.32l-.404.164.707.773.27-.135c.834-.417 1.801-1.031 2.488-1.578l.385-.305.293.238c.14.113.36.276.531.4.026.019.059.046.082.063.161.114.236.167.275.178.564.386 1.164.766 1.738 1.053l.283.141.369-.406.371-.404-.424-.172c-.682-.278-1.313-.652-2.049-1.174-.062-.051-.142-.114-.314-.236-.228-.162-.414-.311-.414-.332 0-.021.13-.181.291-.355.867-.942 1.39-1.902 1.535-2.814l.072-.537h1.807v-1h-4v-1z"/>
|
||||
<path opacity=".117" color-interpolation-filters="linearRGB" color="#000000" image-rendering="auto" color-rendering="auto" fill-rule="evenodd" d="m402.63 515.81l4.988 4.988-.05 12h-.254l-8.973-8.973 3.06-8.01z" color-interpolation="sRGB" text-rendering="auto" fill="url(#e)" shape-rendering="auto"/>
|
||||
<path fill="#555753" d="m402.02 516.88l-1.444 3.922h2.885zm-.612-1.068h1.229l3.055 8.01h-1.127l-.726-2.025-3.617.004-.73 2.02h-1.143z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: 2021 KDE Visual Design Group <visual-design@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
@ -0,0 +1,112 @@
|
||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
*
|
||||
*/
|
||||
|
||||
import io.calamares.core 1.0
|
||||
import io.calamares.ui 1.0
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.3
|
||||
import org.kde.kirigami 2.7 as Kirigami
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Window 2.3
|
||||
|
||||
Kirigami.ScrollablePage {
|
||||
width: 860 //parent.width //860
|
||||
height: 640 //parent.height //640
|
||||
|
||||
Kirigami.Theme.backgroundColor: "#EFF0F1"
|
||||
Kirigami.Theme.textColor: "#1F1F1F"
|
||||
|
||||
header: Kirigami.Heading {
|
||||
Layout.fillWidth: true
|
||||
height: 100
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
color: Kirigami.Theme.textColor
|
||||
font.weight: Font.Medium
|
||||
font.pointSize: 12
|
||||
text: config.message
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
|
||||
Component {
|
||||
id: _delegate
|
||||
|
||||
Rectangle {
|
||||
id: rect
|
||||
border.color: "#BDC3C7"
|
||||
width: parent.width - 80
|
||||
implicitHeight: message.implicitHeight + title.implicitHeight + 20
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Item {
|
||||
width: parent.width - 80
|
||||
implicitHeight: message.implicitHeight + title.implicitHeight + 20
|
||||
|
||||
Kirigami.FormLayout {
|
||||
|
||||
GridLayout {
|
||||
anchors {
|
||||
//left: parent.left
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
}
|
||||
rowSpacing: Kirigami.Units.largeSpacing
|
||||
columnSpacing: Kirigami.Units.largeSpacing
|
||||
columns: width > Kirigami.Units.gridUnit * 20 ? 4 : 2
|
||||
|
||||
Image {
|
||||
id: image
|
||||
Layout.maximumHeight: Kirigami.Units.iconSizes.huge
|
||||
Layout.preferredWidth: height
|
||||
Layout.alignment: Qt.AlignTop
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: index === 0 ? "img/lokalize.svg"
|
||||
: ( index === 1 ? "img/keyboard.svg"
|
||||
: ( index === 2 ? "qrc:/data/images/partition-manual.svg"
|
||||
: "qrc:/data/images/partition-partition.svg" ) )
|
||||
}
|
||||
ColumnLayout {
|
||||
|
||||
Label {
|
||||
id: title
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
text: model.title
|
||||
font.weight: Font.Medium
|
||||
font.pointSize: 16
|
||||
}
|
||||
Rectangle {
|
||||
height: 2
|
||||
width: 200
|
||||
border.color: "#BDC3C7"
|
||||
}
|
||||
Label {
|
||||
id: message
|
||||
Layout.fillWidth: true
|
||||
text: model.message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
anchors.fill: parent
|
||||
spacing: 20
|
||||
model: config.summaryModel
|
||||
delegate: _delegate
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<RCC>
|
||||
<qresource>
|
||||
<file>summaryq.qml</file>
|
||||
<file>img/keyboard.svg</file>
|
||||
<file>img/lokalize.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Loading…
Reference in New Issue