diff --git a/CMakeLists.txt b/CMakeLists.txt index 97cc02b..7b79428 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,30 +2,32 @@ cmake_minimum_required(VERSION 3.22) project(lubuntu-installer-prompt VERSION 1.0.0 LANGUAGES CXX) -set(CMAKE_INCLUDE_CURRENT_DIR ON) +# Find the required Qt and KDE packages +find_package(ECM REQUIRED NO_MODULE) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) +find_package(Qt5 REQUIRED COMPONENTS Core Widgets Network) +find_package(KF5 REQUIRED COMPONENTS NetworkManagerQt Notifications) -set(CMAKE_AUTOUIC ON) +# Set the CMAKE variables for automatic code generation with Qt set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) - +set(CMAKE_AUTOUIC ON) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) -find_package(ECM REQUIRED NO_MODULE) -set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) -find_package(Qt5 REQUIRED COMPONENTS Core Widgets Network) -find_package(KF5 REQUIRED COMPONENTS NetworkManagerQt Notifications) - +# Specify project source files include_directories(${PROJECT_SOURCE_DIR}/src) - file(GLOB PROJECT_SOURCES "${PROJECT_SOURCE_DIR}/src/*.cpp" "${PROJECT_SOURCE_DIR}/src/*.h" "${PROJECT_SOURCE_DIR}/src/*.ui" ) -add_executable(lubuntu-installer-prompt ${PROJECT_SOURCES}) +# Add executable target with project source files +add_executable(lubuntu-installer-prompt ${PROJECT_SOURCES} src/resource.qrc) +# Link libraries with the executable target +target_link_libraries(lubuntu-installer-prompt Qt5::Widgets Qt5::Network KF5::NetworkManagerQt KF5::Notifications) target_link_libraries(lubuntu-installer-prompt Qt5::Widgets KF5::NetworkManagerQt KF5::Notifications) install(TARGETS lubuntu-installer-prompt DESTINATION bin) diff --git a/img/installer.png b/img/installer.png new file mode 100644 index 0000000..68dedae Binary files /dev/null and b/img/installer.png differ diff --git a/img/lubuntu-logo.png b/img/lubuntu-logo.png new file mode 100644 index 0000000..d3aaac7 Binary files /dev/null and b/img/lubuntu-logo.png differ diff --git a/img/symbol.png b/img/symbol.png new file mode 100644 index 0000000..5432078 Binary files /dev/null and b/img/symbol.png differ diff --git a/src/installerprompt.cpp b/src/installerprompt.cpp index e295268..2e24b33 100644 --- a/src/installerprompt.cpp +++ b/src/installerprompt.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "installerprompt.h" #include "./ui_installerprompt.h" @@ -15,7 +16,7 @@ InstallerPrompt::InstallerPrompt(QWidget *parent) ui->setupUi(this); // Set the background image and scale it - QPixmap bg("/usr/share/lubuntu/installer-prompt/background.png"); + QPixmap bg(":/background"); if (bg.isNull()) { QMessageBox::warning(this, tr("Error"), tr("Background image cannot be loaded.")); return; diff --git a/src/installerprompt.ui b/src/installerprompt.ui index a5850f4..66768e2 100644 --- a/src/installerprompt.ui +++ b/src/installerprompt.ui @@ -21,13 +21,12 @@ QWidget { - color: #000000; /* Set text color to black */ + color: #000000; } QPushButton { background-color: rgba(30, 144, 255, 0.8); color: #ffffff; - border: 2px solid #ffffff; border-radius: 15px; padding: 10px 20px; margin: 10px; @@ -53,7 +52,14 @@ QComboBox, QLineEdit { QLabel { qproperty-alignment: 'AlignCenter'; -} + color: #ffffff; +} + +QLabel#logoLabel { + image: url(:/logo); + background-color: transparent; +} + @@ -107,7 +113,7 @@ QLabel { - + 0 @@ -117,7 +123,7 @@ QLabel { 750 - 64 + 100 @@ -129,7 +135,6 @@ QLabel { Ubuntu - 25 50 false false @@ -139,15 +144,10 @@ QLabel { false - QLabel { - color : white; - font: 25pt "Ubuntu"; - background-color: rgba(0, 104, 200, 200); - border-radius: 15px; -} + - Lubuntu - Welcome to the Next Universe + Qt::MarkdownText @@ -207,7 +207,7 @@ QLabel { - 20 + 14 75 true @@ -221,7 +221,7 @@ QLabel { - 400 + 352 50 @@ -280,13 +280,13 @@ QLabel { - 20 + 14 75 true - Select a WiFi Network: + Select a Wi-Fi Network: @@ -294,7 +294,7 @@ QLabel { - 400 + 352 50 @@ -311,18 +311,17 @@ QLabel { 100 - 50 + 65 16777215 - 50 + 65 - 14 75 true @@ -366,7 +365,6 @@ QLabel { - 14 75 true @@ -449,20 +447,22 @@ QLabel { - 250 - 75 + 300 + 125 16777215 - 75 + 125 Ubuntu 24 + 75 + true @@ -480,7 +480,17 @@ QToolTip { } - Try Lubuntu + Try Lubuntu + + + + :/symbol:/symbol + + + + 64 + 64 + @@ -514,20 +524,22 @@ QToolTip { - 250 - 75 + 300 + 125 16777215 - 75 + 125 Ubuntu 24 + 75 + true @@ -542,7 +554,17 @@ QToolTip { } - Install Lubuntu + Install Lubuntu + + + + :/installer:/installer + + + + 64 + 64 + @@ -658,7 +680,9 @@ QToolTip { - 16 + 18 + 75 + true @@ -699,6 +723,8 @@ QToolTip { - + + + diff --git a/src/main.cpp b/src/main.cpp index 3694e7c..8ac796c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,22 +5,21 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - QList windows; + QList ws; // Iterate through all available screens for (QScreen *screen : QApplication::screens()) { - InstallerPrompt *window = new InstallerPrompt(); - window->setGeometry(screen->geometry()); - window->show(); - windows.append(window); + InstallerPrompt *w = new InstallerPrompt(); + w->setGeometry(screen->geometry()); + w->show(); + ws.append(w); } - // Connect signals and slots to synchronize state across windows - for (InstallerPrompt *window : windows) { - for (InstallerPrompt *otherWindow : windows) { - if (window != otherWindow) { + for (InstallerPrompt *w : ws) { + for (InstallerPrompt *otherWindow : ws) { + if (w != otherWindow) { // Connect signals and slots for synchronization - // Example: connect(window, &InstallerPrompt::someSignal, otherWindow, &InstallerPrompt::someSlot); + // Example: connect(ws.last(), &InstallerPrompt::someSignal, otherWindow, &InstallerPrompt::someSlot); } } } diff --git a/src/resource.qrc b/src/resource.qrc new file mode 100644 index 0000000..e430c81 --- /dev/null +++ b/src/resource.qrc @@ -0,0 +1,8 @@ + + + ../img/lubuntu-logo.png + ../img/background.png + ../img/installer.png + ../img/symbol.png + +