diff options
| author | Nippy <nippy@Beller-Mac-mini.lan> | 2026-11-08 13:54:38 +0100 |
|---|---|---|
| committer | Nippy <nippy@Beller-Mac-mini.lan> | 2026-11-08 13:54:38 +0100 |
| commit | 29e0e531d1dbee5a111f56be88494781aef300ff (patch) | |
| tree | 070e6e9a8f1be6f89ebfbe79a768521e2282bf48 /raveos-calamares-module | |
| parent | 875256df161190f256d1fc0766fe300df264f7d3 (diff) | |
| download | RaveOS-PKGBUILD-29e0e531d1dbee5a111f56be88494781aef300ff.tar.gz RaveOS-PKGBUILD-29e0e531d1dbee5a111f56be88494781aef300ff.zip | |
wifi fix
Diffstat (limited to 'raveos-calamares-module')
| -rw-r--r-- | raveos-calamares-module/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | raveos-calamares-module/PKGBUILD | 2 | ||||
| -rw-r--r-- | raveos-calamares-module/wifi-onallo/CMakeLists.txt | 37 | ||||
| -rw-r--r-- | raveos-calamares-module/wifi-onallo/main.cpp | 31 | ||||
| -rw-r--r-- | raveos-calamares-module/wifi-onallo/qml/Onallo.qml | 150 | ||||
| -rw-r--r-- | raveos-calamares-module/wifi-onallo/qml/io/calamares/ui/ViewManager.qml | 6 | ||||
| -rw-r--r-- | raveos-calamares-module/wifi-onallo/qml/io/calamares/ui/qmldir | 2 |
7 files changed, 228 insertions, 1 deletions
diff --git a/raveos-calamares-module/CMakeLists.txt b/raveos-calamares-module/CMakeLists.txt index bcec971..a11c1c1 100644 --- a/raveos-calamares-module/CMakeLists.txt +++ b/raveos-calamares-module/CMakeLists.txt @@ -5,6 +5,7 @@ find_package(KF6CoreAddons REQUIRED) find_package(Calamares REQUIRED) add_subdirectory(wifi) +add_subdirectory(wifi-onallo) add_subdirectory(welcome) add_subdirectory(desktopselect) add_subdirectory(raveusers) diff --git a/raveos-calamares-module/PKGBUILD b/raveos-calamares-module/PKGBUILD index b643713..18371e2 100644 --- a/raveos-calamares-module/PKGBUILD +++ b/raveos-calamares-module/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: nippy <nippy@tuta.io> pkgname=raveos-calamares-module pkgver=2.0.0 -pkgrel=40 +pkgrel=41 pkgdesc="RaveOS Calamares modules: Wi-Fi, Welcome, Desktop Selector, Users" arch=('x86_64') options=('!debug') diff --git a/raveos-calamares-module/wifi-onallo/CMakeLists.txt b/raveos-calamares-module/wifi-onallo/CMakeLists.txt new file mode 100644 index 0000000..0c23149 --- /dev/null +++ b/raveos-calamares-module/wifi-onallo/CMakeLists.txt @@ -0,0 +1,37 @@ +find_package(Qt6 REQUIRED COMPONENTS DBus Gui Qml Quick) + +set(RAVEOS_WIFI_QML_DIR "${CMAKE_INSTALL_PREFIX}/lib/raveos-wifi/qml") +set(RAVEOS_WIFI_UI_DIR "${CMAKE_INSTALL_PREFIX}/lib/calamares/modules/wifi/ui") + +add_executable(raveos-wifi + main.cpp + ../wifi/NetworkManager.cpp +) + +set_target_properties(raveos-wifi PROPERTIES AUTOMOC ON) + +target_compile_definitions(raveos-wifi PRIVATE + RAVEOS_WIFI_QML_DIR="${RAVEOS_WIFI_QML_DIR}" + RAVEOS_WIFI_UI_DIR="${RAVEOS_WIFI_UI_DIR}" +) + +target_link_libraries(raveos-wifi PRIVATE + Qt6::DBus + Qt6::Gui + Qt6::Qml + Qt6::Quick +) + +install(TARGETS raveos-wifi DESTINATION bin) + +install( + FILES qml/Onallo.qml + DESTINATION lib/raveos-wifi/qml +) + +install( + FILES + qml/io/calamares/ui/qmldir + qml/io/calamares/ui/ViewManager.qml + DESTINATION lib/raveos-wifi/qml/io/calamares/ui +) diff --git a/raveos-calamares-module/wifi-onallo/main.cpp b/raveos-calamares-module/wifi-onallo/main.cpp new file mode 100644 index 0000000..3fb6747 --- /dev/null +++ b/raveos-calamares-module/wifi-onallo/main.cpp @@ -0,0 +1,31 @@ +#include "../wifi/NetworkManager.h" + +#include <QGuiApplication> +#include <QLocale> +#include <QQmlApplicationEngine> +#include <QQmlContext> +#include <QUrl> + +int main(int argc, char* argv[]) +{ + QGuiApplication app(argc, argv); + app.setApplicationName(QStringLiteral("raveos-wifi")); + + NetworkManager nm; + + QQmlApplicationEngine engine; + engine.addImportPath(QStringLiteral(RAVEOS_WIFI_QML_DIR)); + engine.addImportPath(QStringLiteral("/etc/calamares/branding/raveos")); + engine.addImportPath(QStringLiteral(RAVEOS_WIFI_UI_DIR)); + engine.rootContext()->setContextProperty(QStringLiteral("nm"), &nm); + engine.rootContext()->setContextProperty(QStringLiteral("systemLocale"), QLocale::system().name()); + engine.rootContext()->setContextProperty(QStringLiteral("wifiOldal"), + QUrl::fromLocalFile(QStringLiteral(RAVEOS_WIFI_UI_DIR "/wifi.qml"))); + + QObject::connect( + &engine, &QQmlApplicationEngine::objectCreationFailed, &app, [] { QCoreApplication::exit(2); }, + Qt::QueuedConnection); + engine.load(QUrl::fromLocalFile(QStringLiteral(RAVEOS_WIFI_QML_DIR "/Onallo.qml"))); + + return app.exec(); +} diff --git a/raveos-calamares-module/wifi-onallo/qml/Onallo.qml b/raveos-calamares-module/wifi-onallo/qml/Onallo.qml new file mode 100644 index 0000000..eea0e79 --- /dev/null +++ b/raveos-calamares-module/wifi-onallo/qml/Onallo.qml @@ -0,0 +1,150 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import RaveOS 1.0 + +Window { + id: ablak + visible: true + x: 0 + y: 0 + width: Screen.width + height: Screen.height + visibility: Window.FullScreen + color: Stilus.hatter + title: "RaveOS Wi-Fi" + + readonly property bool magyar: systemLocale.startsWith("hu") + + function kilep(kod) { + Qt.exit(kod) + } + + Timer { + id: tovabbIdozito + interval: 1500 + onTriggered: ablak.kilep(0) + } + + Component.onCompleted: { + if (nm.connected) + tovabbIdozito.restart() + } + + Connections { + target: nm + function onConnectionChanged() { + if (nm.connected) + tovabbIdozito.restart() + else + tovabbIdozito.stop() + } + } + + Shortcut { + sequence: "Esc" + onActivated: ablak.kilep(1) + } + + component KeretesGomb: Button { + id: gomb + Layout.preferredHeight: 44 + leftPadding: 20 + rightPadding: 20 + background: Rectangle { + color: gomb.hovered ? Stilus.aktiv : "transparent" + border.width: 1 + border.color: Stilus.keretErosebb + } + contentItem: Text { + text: gomb.text + color: Stilus.szoveg + font.family: Stilus.font + font.pixelSize: 14 + font.weight: Font.Medium + verticalAlignment: Text.AlignVCenter + } + } + + component ZoldGomb: Button { + id: gomb + Layout.preferredHeight: 44 + leftPadding: 24 + rightPadding: 24 + background: Rectangle { + color: !gomb.enabled ? "transparent" : (gomb.hovered ? Stilus.zoldHover : Stilus.zold) + border.width: gomb.enabled ? 0 : 1 + border.color: Stilus.keret + } + contentItem: Text { + text: gomb.text + color: gomb.enabled ? Stilus.zoldonSzoveg : Stilus.szovegHalvany + font.family: Stilus.font + font.pixelSize: 14 + font.weight: Font.DemiBold + verticalAlignment: Text.AlignVCenter + } + } + + ColumnLayout { + anchors.fill: parent + spacing: 0 + + Loader { + Layout.fillWidth: true + Layout.fillHeight: true + source: wifiOldal + onStatusChanged: { + if (status === Loader.Error) + ablak.kilep(2) + } + } + + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: 73 + color: Stilus.hatter + + Rectangle { + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + height: 1 + color: Stilus.keret + } + + RowLayout { + anchors.fill: parent + anchors.topMargin: 15 + anchors.bottomMargin: 14 + anchors.leftMargin: 56 + anchors.rightMargin: 56 + spacing: 12 + + Text { + Layout.fillWidth: true + text: ablak.magyar + ? "A KAPCSOLAT UTÁN A TELEPÍTŐ FRISSÍTI MAGÁT" + : "THE INSTALLER UPDATES ITSELF ONCE CONNECTED" + elide: Text.ElideRight + color: Stilus.szovegHalvany + font.family: Stilus.mono + font.pixelSize: 12 + font.letterSpacing: 1 + } + + KeretesGomb { + text: ablak.magyar ? "Kihagyás" : "Skip" + onClicked: ablak.kilep(1) + } + + ZoldGomb { + text: ablak.magyar ? "Tovább" : "Continue" + enabled: nm.connected + onClicked: ablak.kilep(0) + } + } + } + } +} diff --git a/raveos-calamares-module/wifi-onallo/qml/io/calamares/ui/ViewManager.qml b/raveos-calamares-module/wifi-onallo/qml/io/calamares/ui/ViewManager.qml new file mode 100644 index 0000000..66fd4d7 --- /dev/null +++ b/raveos-calamares-module/wifi-onallo/qml/io/calamares/ui/ViewManager.qml @@ -0,0 +1,6 @@ +pragma Singleton +import QtQuick 2.15 + +QtObject { + readonly property int currentStepIndex: 1 +} diff --git a/raveos-calamares-module/wifi-onallo/qml/io/calamares/ui/qmldir b/raveos-calamares-module/wifi-onallo/qml/io/calamares/ui/qmldir new file mode 100644 index 0000000..43c37f8 --- /dev/null +++ b/raveos-calamares-module/wifi-onallo/qml/io/calamares/ui/qmldir @@ -0,0 +1,2 @@ +module io.calamares.ui +singleton ViewManager 1.0 ViewManager.qml |