Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c6371cc151 | |||
| 678aeeba58 | |||
| 8009e357ed | 
| @@ -163,7 +163,6 @@ calamares_add_module_subdirectory( modules/basestrap LIST_SKIPPED_MODULES ) | ||||
| calamares_add_module_subdirectory( modules/services-artix LIST_SKIPPED_MODULES ) | ||||
| calamares_add_module_subdirectory( modules/postcfg LIST_SKIPPED_MODULES ) | ||||
| calamares_add_module_subdirectory( modules/packagechooser LIST_SKIPPED_MODULES ) | ||||
| calamares_add_module_subdirectory( modules/packagechooserq LIST_SKIPPED_MODULES ) | ||||
|  | ||||
| message(STATUS "Calamares extensions ${CALAMARES_EXTENSIONS_VERSION} for Calamares version ${Calamares_VERSION}") | ||||
|  | ||||
|   | ||||
| @@ -4,6 +4,8 @@ | ||||
| #   SPDX-License-Identifier: BSD-2-Clause | ||||
| # | ||||
| find_package(${qtname} COMPONENTS Core Gui Widgets REQUIRED) | ||||
| set(_extra_libraries "") | ||||
| set(_extra_src "") | ||||
|  | ||||
| ### OPTIONAL AppData XML support in PackageModel | ||||
| # | ||||
| @@ -11,6 +13,11 @@ find_package(${qtname} COMPONENTS Core Gui Widgets REQUIRED) | ||||
| option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF) | ||||
| if(BUILD_APPDATA) | ||||
|     find_package(${qtname} REQUIRED COMPONENTS Xml) | ||||
|     if(TARGET ${qtname}::Xml) | ||||
|         add_definitions(-DHAVE_APPDATA) | ||||
|         list(APPEND _extra_libraries ${qtname}::Xml) | ||||
|         list(APPEND _extra_src ItemAppData.cpp) | ||||
|     endif() | ||||
| endif() | ||||
|  | ||||
| ### OPTIONAL AppStream support in PackageModel | ||||
| @@ -26,27 +33,24 @@ calamares_add_plugin(packagechooser | ||||
|         PackageChooserPage.cpp | ||||
|         PackageChooserViewStep.cpp | ||||
|         PackageModel.cpp | ||||
|         ${_extra_src} | ||||
|     RESOURCES | ||||
|         packagechooser.qrc | ||||
|     UI | ||||
|         page_package.ui | ||||
|     LINK_PRIVATE_LIBRARIES | ||||
|         ${_extra_libraries} | ||||
|     SHARED_LIB | ||||
| ) | ||||
|  | ||||
| if(AppStreamQt_FOUND) | ||||
|     target_link_libraries(${packagechooser_TARGET} PRIVATE calamares::appstreamqt) | ||||
|     target_sources(${packagechooser_TARGET} PRIVATE ItemAppStream.cpp) | ||||
| endif() | ||||
|  | ||||
| if(BUILD_APPDATA AND TARGET ${qtname}::Xml) | ||||
|     target_compile_definitions(${packagechooser_TARGET} PRIVATE HAVE_APPDATA) | ||||
|     target_link_libraries(${packagechooser_TARGET} PRIVATE ${qtname}::Xml) | ||||
|     target_sources(${packagechooser_TARGET} PRIVATE ItemAppData.cpp) | ||||
|     target_link_libraries(calamares_viewmodule_packagechooser PRIVATE calamares::appstreamqt) | ||||
|     target_sources(calamares_viewmodule_packagechooser PRIVATE ItemAppStream.cpp) | ||||
| endif() | ||||
|  | ||||
| # calamares_add_test( | ||||
| #     packagechoosertest | ||||
| #     GUI | ||||
| #     SOURCES Tests.cpp | ||||
| #     LIBRARIES ${packagechooser_TARGET} | ||||
| #     LIBRARIES calamares_viewmodule_packagechooser ${_extra_libraries} | ||||
| # ) | ||||
|   | ||||
| @@ -16,7 +16,6 @@ | ||||
|  | ||||
| #ifdef HAVE_APPSTREAM_VERSION | ||||
| #include "ItemAppStream.h" | ||||
| #include <AppStreamQt/pool.h> | ||||
| #include <memory> | ||||
| #endif | ||||
|  | ||||
|   | ||||
| @@ -7,20 +7,16 @@ | ||||
|  * | ||||
|  */ | ||||
|  | ||||
| /** @brief Loading items from AppData XML files. | ||||
| /** @brief Loading items from AppStream database. | ||||
|  * | ||||
|  * Only used if QtXML is found, implements PackageItem::fromAppData(). | ||||
|  * Only used if AppStreamQt is found, implements PackageItem::fromAppStream(). | ||||
|  */ | ||||
| #include "PackageModel.h" | ||||
| #include "ItemAppStream.h" | ||||
|  | ||||
| #include "locale/TranslationsModel.h" | ||||
| #include "utils/Logger.h" | ||||
| #include "utils/Variant.h" | ||||
|  | ||||
| #include <AppStreamQt/image.h> | ||||
| #include <AppStreamQt/pool.h> | ||||
| #include <AppStreamQt/screenshot.h> | ||||
|  | ||||
| /// @brief Return number of pixels in a size, for < ordering purposes | ||||
| static inline quint64 | ||||
| sizeOrder( const QSize& size ) | ||||
|   | ||||
| @@ -12,10 +12,28 @@ | ||||
|  | ||||
| #include "PackageModel.h" | ||||
|  | ||||
| namespace AppStream | ||||
| { | ||||
| class Pool; | ||||
| }  // namespace AppStream | ||||
| /* | ||||
|  * This weird include mechanism is because an #include line is allowed | ||||
|  * to consist of preprocessor-tokens, which are expanded, and then | ||||
|  * the #include is *re*processed. But if it starts with < or ", then | ||||
|  * preprocessor tokens are not expanded. So we build up a #include <> | ||||
|  * style line with a suitable path -- if we are given a value for | ||||
|  * HAVE_APPSTREAM_HEADERS, that is the directory that the AppStreamQt | ||||
|  * headers live in. | ||||
|  */ | ||||
| #define CALAMARES_LT < | ||||
| #define CALAMARES_GT > | ||||
|  | ||||
| #ifndef HAVE_APPSTREAM_HEADERS | ||||
| #define HAVE_APPSTREAM_HEADERS AppStreamQt | ||||
| #endif | ||||
|  | ||||
| #include CALAMARES_LT HAVE_APPSTREAM_HEADERS/pool.h CALAMARES_GT | ||||
| #include CALAMARES_LT HAVE_APPSTREAM_HEADERS/image.h CALAMARES_GT | ||||
| #include CALAMARES_LT HAVE_APPSTREAM_HEADERS/screenshot.h CALAMARES_GT | ||||
|  | ||||
| #undef CALAMARES_LT | ||||
| #undef CALAMARES_GT | ||||
|  | ||||
| /** @brief Loads an item from AppStream data. | ||||
|  * | ||||
|   | ||||
| @@ -21,7 +21,7 @@ | ||||
|  | ||||
| #include <QtTest/QtTest> | ||||
|  | ||||
| QTEST_MAIN( PackageChooserTests ) | ||||
| QTEST_GUILESS_MAIN( PackageChooserTests ) | ||||
|  | ||||
| PackageChooserTests::PackageChooserTests() {} | ||||
|  | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								modules/packagechooser/images/calamares.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								modules/packagechooser/images/calamares.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 8.1 KiB | 
							
								
								
									
										2
									
								
								modules/packagechooser/images/calamares.png.license
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								modules/packagechooser/images/calamares.png.license
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> | ||||
| SPDX-License-Identifier: GPL-3.0-or-later | ||||
							
								
								
									
										
											BIN
										
									
								
								modules/packagechooser/images/no-selection.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								modules/packagechooser/images/no-selection.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.7 KiB | 
							
								
								
									
										2
									
								
								modules/packagechooser/images/no-selection.png.license
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								modules/packagechooser/images/no-selection.png.license
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| SPDX-FileCopyrightText: 2014 Uri Herrera <uri_herrera@nitrux.in> and others | ||||
| SPDX-License-Identifier:  LGPL-3.0-or-later | ||||
| @@ -1,56 +0,0 @@ | ||||
| # === 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(${qtname} ${QT_VERSION} CONFIG REQUIRED Core) | ||||
|  | ||||
| # include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser ) | ||||
| set(_packagechooser ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser) | ||||
|  | ||||
| ### OPTIONAL AppData XML support in PackageModel | ||||
| # | ||||
| # | ||||
| option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF) | ||||
| if(BUILD_APPDATA) | ||||
|     find_package(${qtname} REQUIRED COMPONENTS Xml) | ||||
| endif() | ||||
|  | ||||
| ### OPTIONAL AppStream support in PackageModel | ||||
| # | ||||
| # | ||||
| include(AppStreamHelper) | ||||
|  | ||||
| calamares_add_plugin(packagechooserq | ||||
|     TYPE viewmodule | ||||
|     EXPORT_MACRO PLUGINDLLEXPORT_PRO | ||||
|     SOURCES | ||||
|         PackageChooserQmlViewStep.cpp | ||||
|         ${_packagechooser}/Config.cpp | ||||
|         ${_packagechooser}/PackageModel.cpp | ||||
|         ${_extra_src} | ||||
|     RESOURCES | ||||
|         packagechooserq${QT_VERSION_SUFFIX}.qrc | ||||
|     LINK_PRIVATE_LIBRARIES | ||||
|         calamaresui | ||||
|         ${_extra_libraries} | ||||
|     SHARED_LIB | ||||
| ) | ||||
| target_include_directories(${packagechooserq_TARGET} PRIVATE ${_packagechooser}) | ||||
|  | ||||
| if(AppStreamQt_FOUND) | ||||
|     target_link_libraries(${packagechooserq_TARGET} PRIVATE calamares::appstreamqt) | ||||
|     target_sources(${packagechooserq_TARGET} PRIVATE ${_packagechooser}/ItemAppStream.cpp) | ||||
| endif() | ||||
|  | ||||
| if(BUILD_APPDATA AND TARGET ${qtname}::Xml) | ||||
|     target_compile_definitions(${packagechooserq_TARGET} PRIVATE HAVE_APPDATA) | ||||
|     target_link_libraries(${packagechooserq_TARGET} PRIVATE ${qtname}::Xml) | ||||
|     target_sources(${packagechooserq_TARGET} PRIVATE ${_packagechooser}/ItemAppData.cpp) | ||||
| endif() | ||||
| @@ -1,86 +0,0 @@ | ||||
| /* === 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/Logger.h" | ||||
| #include "utils/System.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 m_config->prettyName(); | ||||
| } | ||||
|  | ||||
| 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->updateGlobalStorage(); | ||||
| } | ||||
|  | ||||
| void | ||||
| PackageChooserQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) | ||||
| { | ||||
|     m_config->setDefaultId( moduleInstanceKey() ); | ||||
|     m_config->setConfigurationMap( configurationMap ); | ||||
|     Calamares::QmlViewStep::setConfigurationMap( configurationMap );  // call parent implementation last | ||||
| } | ||||
| @@ -1,58 +0,0 @@ | ||||
| /* === 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.
										
									
								
							| Before Width: | Height: | Size: 20 KiB | 
| @@ -1,2 +0,0 @@ | ||||
| SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com> | ||||
| SPDX-License-Identifier: GPL-3.0-or-later | ||||
| @@ -1,304 +0,0 @@ | ||||
| /* === 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 | ||||
| import QtQuick.Controls | ||||
| import QtQuick.Layouts | ||||
|  | ||||
| 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("OpenRC base system.<br/> | ||||
|                     Default option.") | ||||
|                     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("OpenRC") | ||||
|                     checked: true | ||||
|                     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 ) { | ||||
|                             config.packageChoice = "openrc" | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 Image { | ||||
|                     id: image1 | ||||
|                     x: 8 | ||||
|                     y: 25 | ||||
|                     height: 100 | ||||
|                     fillMode: Image.PreserveAspectFit | ||||
|                     source: "images/if.png" | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             Rectangle { | ||||
|                 width: 700 | ||||
|                 height: 150 | ||||
|                 radius: 10 | ||||
|                 border.width: 0 | ||||
|                 Text { | ||||
|                     width: 450 | ||||
|                     height: 104 | ||||
|                     anchors.centerIn: parent | ||||
|                     text: qsTr("Dinit base system.") | ||||
|                     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("Dinit") | ||||
|                     checked: false | ||||
|                     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 ? (element2.down ? "#3498db" : "#3498db") : "#999999" | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
|                     onCheckedChanged: { | ||||
|                         if ( checked ) { | ||||
|                             config.packageChoice = "dinit" | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 Image { | ||||
|                     id: image2 | ||||
|                     x: 8 | ||||
|                     y: 25 | ||||
|                     height: 100 | ||||
|                     fillMode: Image.PreserveAspectFit | ||||
|                     source: "images/if.png" | ||||
|                 } | ||||
|  | ||||
|             } | ||||
|  | ||||
|             Rectangle { | ||||
|                 width: 700 | ||||
|                 height: 150 | ||||
|                 color: "#ffffff" | ||||
|                 radius: 10 | ||||
|                 border.width: 0 | ||||
|                 Text { | ||||
|                     width: 450 | ||||
|                     height: 104 | ||||
|                     anchors.centerIn: parent | ||||
|                     text: qsTr("Runit base system.") | ||||
|                     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("Runit") | ||||
|                     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 ) { | ||||
|                             config.packageChoice = "runit" | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 Image { | ||||
|                     id: image3 | ||||
|                     x: 8 | ||||
|                     y: 25 | ||||
|                     height: 100 | ||||
|                     fillMode: Image.PreserveAspectFit | ||||
|                     source: "images/if.png" | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             Rectangle { | ||||
|                 width: 700 | ||||
|                 height: 150 | ||||
|                 color: "#ffffff" | ||||
|                 radius: 10 | ||||
|                 border.width: 0 | ||||
|                 Text { | ||||
|                     width: 450 | ||||
|                     height: 104 | ||||
|                     anchors.centerIn: parent | ||||
|                     text: qsTr("S6 base system.") | ||||
|                     font.pointSize: 10 | ||||
|                     anchors.verticalCenterOffset: -10 | ||||
|                     anchors.horizontalCenterOffset: 100 | ||||
|                     wrapMode: Text.WordWrap | ||||
|                 } | ||||
|  | ||||
|                 Switch { | ||||
|                     id: element4 | ||||
|                     x: 500 | ||||
|                     y: 110 | ||||
|                     width: 187 | ||||
|                     height: 14 | ||||
|                     text: qsTr("S6") | ||||
|                     checked: false | ||||
|                     hoverEnabled: true | ||||
|                     ButtonGroup.group: switchGroup | ||||
|  | ||||
|                     indicator: Rectangle { | ||||
|                         implicitWidth: 40 | ||||
|                         implicitHeight: 14 | ||||
|                         radius: 10 | ||||
|                         color: element4.checked ? "#3498db" : "#B9B9B9" | ||||
|                         border.color: element4.checked ? "#3498db" : "#cccccc" | ||||
|  | ||||
|                         Rectangle { | ||||
|                             x: element4.checked ? parent.width - width : 0 | ||||
|                             y: (parent.height - height) / 2 | ||||
|                             width: 20 | ||||
|                             height: 20 | ||||
|                             radius: 10 | ||||
|                             color: element4.down ? "#cccccc" : "#ffffff" | ||||
|                             border.color: element4.checked ? (element4.down ? "#3498db" : "#3498db") : "#999999" | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
|                     onCheckedChanged: { | ||||
|                         if ( checked ) { | ||||
|                             config.packageChoice = "s6" | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 Image { | ||||
|                     id: image4 | ||||
|                     x: 8 | ||||
|                     y: 25 | ||||
|                     height: 100 | ||||
|                     fillMode: Image.PreserveAspectFit | ||||
|                     source: "images/if.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: OpenRC.") | ||||
|                     font.pointSize: 10 | ||||
|                     wrapMode: Text.WordWrap | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -1,6 +0,0 @@ | ||||
| <RCC> | ||||
|     <qresource> | ||||
|         <file alias="packagechooserq.qml">packagechooserq-qt6.qml</file> | ||||
|         <file>images/if.png</file> | ||||
|     </qresource> | ||||
| </RCC> | ||||
| @@ -1,66 +0,0 @@ | ||||
| # SPDX-FileCopyrightText: no | ||||
| # SPDX-License-Identifier: CC0-1.0 | ||||
| # | ||||
| # Configuration for the low-density software chooser, QML implementation | ||||
| # | ||||
| # The example QML implementation uses single-selection, rather than | ||||
| # a model for the available packages. That makes it simpler: the | ||||
| # QML itself codes the available options, descriptions and images | ||||
| # -- after all, this is **low density** selection, so a custom UI | ||||
| # can make sense for the few choices that need to be made. | ||||
| # | ||||
| # | ||||
|  | ||||
| --- | ||||
| # 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>*. The module's | ||||
| #   instance name is used; see the *instances* section of `settings.conf`. | ||||
| #   If there is just one packagechooserq module, and no special instance is set, | ||||
| #   resulting GS key is probably *packagechooser_packagechooserq*. | ||||
| #   (Do note that the prefix of the GS key remains "packagechooser_") | ||||
| # | ||||
| #   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. | ||||
| # | ||||
| # 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 | ||||
|  | ||||
| # Human-visible strings in this module. These are all optional. | ||||
| # The following translated keys are used: | ||||
| #  - *step*, used in the overall progress view (left-hand pane) | ||||
| # | ||||
| # Each key can have a [locale] added to it, which is used as | ||||
| # the translated string for that locale. For the strings | ||||
| # associated with the "no-selection" item, see *items*, below | ||||
| # with the explicit item-*id* "". | ||||
| # | ||||
| labels: | ||||
|     step: "Packages" | ||||
|     step[nl]: "Pakketten" | ||||
|  | ||||
| # The *packageChoice* value is used for setting the default selection | ||||
| # in the QML view; this should match one of the keys used in the QML | ||||
| # module for package names. | ||||
| # | ||||
| # (e.g. the sample QML uses "no_office_suite", "minimal_install" and | ||||
| # "libreoffice" as possible choices). | ||||
| # | ||||
| packageChoice: libreoffice | ||||
|  | ||||
| @@ -1,304 +0,0 @@ | ||||
| /* === 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("OpenRC base system.<br/> | ||||
|                     Default option.") | ||||
|                     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("OpenRC") | ||||
|                     checked: true | ||||
|                     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 ) { | ||||
|                             config.packageChoice = "openrc" | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 Image { | ||||
|                     id: image1 | ||||
|                     x: 8 | ||||
|                     y: 25 | ||||
|                     height: 100 | ||||
|                     fillMode: Image.PreserveAspectFit | ||||
|                     source: "images/if.png" | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             Rectangle { | ||||
|                 width: 700 | ||||
|                 height: 150 | ||||
|                 radius: 10 | ||||
|                 border.width: 0 | ||||
|                 Text { | ||||
|                     width: 450 | ||||
|                     height: 104 | ||||
|                     anchors.centerIn: parent | ||||
|                     text: qsTr("Dinit base system.") | ||||
|                     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("Dinit") | ||||
|                     checked: false | ||||
|                     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 ? (element2.down ? "#3498db" : "#3498db") : "#999999" | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
|                     onCheckedChanged: { | ||||
|                         if ( checked ) { | ||||
|                             config.packageChoice = "dinit" | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 Image { | ||||
|                     id: image2 | ||||
|                     x: 8 | ||||
|                     y: 25 | ||||
|                     height: 100 | ||||
|                     fillMode: Image.PreserveAspectFit | ||||
|                     source: "images/if.png" | ||||
|                 } | ||||
|  | ||||
|             } | ||||
|  | ||||
|             Rectangle { | ||||
|                 width: 700 | ||||
|                 height: 150 | ||||
|                 color: "#ffffff" | ||||
|                 radius: 10 | ||||
|                 border.width: 0 | ||||
|                 Text { | ||||
|                     width: 450 | ||||
|                     height: 104 | ||||
|                     anchors.centerIn: parent | ||||
|                     text: qsTr("Runit base system.") | ||||
|                     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("Runit") | ||||
|                     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 ) { | ||||
|                             config.packageChoice = "runit" | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 Image { | ||||
|                     id: image3 | ||||
|                     x: 8 | ||||
|                     y: 25 | ||||
|                     height: 100 | ||||
|                     fillMode: Image.PreserveAspectFit | ||||
|                     source: "images/if.png" | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             Rectangle { | ||||
|                 width: 700 | ||||
|                 height: 150 | ||||
|                 color: "#ffffff" | ||||
|                 radius: 10 | ||||
|                 border.width: 0 | ||||
|                 Text { | ||||
|                     width: 450 | ||||
|                     height: 104 | ||||
|                     anchors.centerIn: parent | ||||
|                     text: qsTr("S6 base system.") | ||||
|                     font.pointSize: 10 | ||||
|                     anchors.verticalCenterOffset: -10 | ||||
|                     anchors.horizontalCenterOffset: 100 | ||||
|                     wrapMode: Text.WordWrap | ||||
|                 } | ||||
|  | ||||
|                 Switch { | ||||
|                     id: element4 | ||||
|                     x: 500 | ||||
|                     y: 110 | ||||
|                     width: 187 | ||||
|                     height: 14 | ||||
|                     text: qsTr("S6") | ||||
|                     checked: false | ||||
|                     hoverEnabled: true | ||||
|                     ButtonGroup.group: switchGroup | ||||
|  | ||||
|                     indicator: Rectangle { | ||||
|                         implicitWidth: 40 | ||||
|                         implicitHeight: 14 | ||||
|                         radius: 10 | ||||
|                         color: element4.checked ? "#3498db" : "#B9B9B9" | ||||
|                         border.color: element4.checked ? "#3498db" : "#cccccc" | ||||
|  | ||||
|                         Rectangle { | ||||
|                             x: element4.checked ? parent.width - width : 0 | ||||
|                             y: (parent.height - height) / 2 | ||||
|                             width: 20 | ||||
|                             height: 20 | ||||
|                             radius: 10 | ||||
|                             color: element4.down ? "#cccccc" : "#ffffff" | ||||
|                             border.color: element4.checked ? (element4.down ? "#3498db" : "#3498db") : "#999999" | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
|                     onCheckedChanged: { | ||||
|                         if ( checked ) { | ||||
|                             config.packageChoice = "s6" | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 Image { | ||||
|                     id: image4 | ||||
|                     x: 8 | ||||
|                     y: 25 | ||||
|                     height: 100 | ||||
|                     fillMode: Image.PreserveAspectFit | ||||
|                     source: "images/if.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: OpenRC.") | ||||
|                     font.pointSize: 10 | ||||
|                     wrapMode: Text.WordWrap | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -1,6 +0,0 @@ | ||||
| <RCC> | ||||
|     <qresource> | ||||
|         <file>packagechooserq.qml</file> | ||||
|         <file>images/if.png</file> | ||||
|     </qresource> | ||||
| </RCC> | ||||
		Reference in New Issue
	
	Block a user