Compare commits

...

2 Commits

7 changed files with 81 additions and 47 deletions

BIN
img/installer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
img/lubuntu-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
img/symbol.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -6,6 +6,7 @@
#include <QScreen>
#include <QMessageBox>
#include <QLineEdit>
#include <QGraphicsDropShadowEffect>
#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;
@ -67,11 +68,11 @@ bool InstallerPrompt::checkInternetConnection() {
void InstallerPrompt::updateConnectionStatus(bool online) {
if (online) {
connectionStatusLabel->setText(tr("Connected to the internet"));
connectWifiButton->setVisible(false);
ui->connectionStatusLabel->setText(tr("Connected to the internet"));
ui->connectWifiButton->setVisible(false);
} else {
connectionStatusLabel->setText(tr("Not connected to the internet"));
connectWifiButton->setVisible(true);
ui->connectionStatusLabel->setText(tr("Not connected to the internet"));
ui->connectWifiButton->setVisible(true);
}
}

View File

@ -21,13 +21,12 @@
</property>
<property name="styleSheet">
<string notr="true">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';
}</string>
color: #ffffff;
}
QLabel#logoLabel {
image: url(:/logo);
background-color: transparent;
}
</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="sizePolicy">
@ -107,7 +113,7 @@ QLabel {
</spacer>
</item>
<item>
<widget class="QLabel" name="title">
<widget class="QLabel" name="logoLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -117,7 +123,7 @@ QLabel {
<property name="minimumSize">
<size>
<width>750</width>
<height>64</height>
<height>100</height>
</size>
</property>
<property name="baseSize">
@ -129,7 +135,6 @@ QLabel {
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>25</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
@ -139,15 +144,10 @@ QLabel {
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">QLabel {
color : white;
font: 25pt &quot;Ubuntu&quot;;
background-color: rgba(0, 104, 200, 200);
border-radius: 15px;
}</string>
<string notr="true"/>
</property>
<property name="text">
<string>Lubuntu - Welcome to the Next Universe</string>
<string/>
</property>
<property name="textFormat">
<enum>Qt::MarkdownText</enum>
@ -207,7 +207,7 @@ QLabel {
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>20</pointsize>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
@ -221,7 +221,7 @@ QLabel {
<widget class="QComboBox" name="languageComboBox">
<property name="minimumSize">
<size>
<width>400</width>
<width>352</width>
<height>50</height>
</size>
</property>
@ -280,13 +280,13 @@ QLabel {
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>20</pointsize>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Select a WiFi Network:</string>
<string>Select a Wi-Fi Network:</string>
</property>
</widget>
</item>
@ -294,7 +294,7 @@ QLabel {
<widget class="QComboBox" name="networkComboBox">
<property name="minimumSize">
<size>
<width>400</width>
<width>352</width>
<height>50</height>
</size>
</property>
@ -311,18 +311,17 @@ QLabel {
<property name="minimumSize">
<size>
<width>100</width>
<height>50</height>
<height>65</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
<height>65</height>
</size>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
@ -366,7 +365,6 @@ QLabel {
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
@ -449,20 +447,22 @@ QLabel {
<widget class="QPushButton" name="tryLubuntu">
<property name="minimumSize">
<size>
<width>250</width>
<height>75</height>
<width>300</width>
<height>125</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>75</height>
<height>125</height>
</size>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>24</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip">
@ -482,6 +482,16 @@ QToolTip {
<property name="text">
<string> Try Lubuntu</string>
</property>
<property name="icon">
<iconset resource="resource.qrc">
<normaloff>:/symbol</normaloff>:/symbol</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
</widget>
</item>
<item>
@ -514,20 +524,22 @@ QToolTip {
<widget class="QPushButton" name="installLubuntu">
<property name="minimumSize">
<size>
<width>250</width>
<height>75</height>
<width>300</width>
<height>125</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>75</height>
<height>125</height>
</size>
</property>
<property name="font">
<font>
<family>Ubuntu</family>
<pointsize>24</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip">
@ -544,6 +556,16 @@ QToolTip {
<property name="text">
<string> Install Lubuntu</string>
</property>
<property name="icon">
<iconset resource="resource.qrc">
<normaloff>:/installer</normaloff>:/installer</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
</widget>
</item>
<item>
@ -658,7 +680,9 @@ QToolTip {
<widget class="QLabel" name="connectionStatusLabel">
<property name="font">
<font>
<pointsize>16</pointsize>
<pointsize>18</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
@ -699,6 +723,8 @@ QToolTip {
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<resources>
<include location="resource.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -5,22 +5,21 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QList<InstallerPrompt*> windows;
QList<InstallerPrompt*> 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);
}
}
}

8
src/resource.qrc Normal file
View File

@ -0,0 +1,8 @@
<RCC>
<qresource prefix="/">
<file alias="logo">../img/lubuntu-logo.png</file>
<file alias="background">../img/background.png</file>
<file alias="installer">../img/installer.png</file>
<file alias="symbol">../img/symbol.png</file>
</qresource>
</RCC>