mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
KoBox splash screen
Everything is finally taking place for v1.4/1.5
This commit is contained in:
parent
29349614f0
commit
3404337e29
5 changed files with 48 additions and 11 deletions
|
@ -22,6 +22,9 @@ namespace global {
|
||||||
inline bool skipOpenDialog;
|
inline bool skipOpenDialog;
|
||||||
inline bool startBatteryWatchdog;
|
inline bool startBatteryWatchdog;
|
||||||
}
|
}
|
||||||
|
namespace kobox {
|
||||||
|
inline bool showKoboxSplash;
|
||||||
|
}
|
||||||
namespace mainwindow {
|
namespace mainwindow {
|
||||||
namespace tabSwitcher {
|
namespace tabSwitcher {
|
||||||
inline bool repaint;
|
inline bool repaint;
|
||||||
|
|
|
@ -116,6 +116,15 @@ void koboxAppsDialog::on_launchBtn_clicked()
|
||||||
string_writeconfig("/external_root/tmp/X_dpi", dpiSetting);
|
string_writeconfig("/external_root/tmp/X_dpi", dpiSetting);
|
||||||
|
|
||||||
// Wheeee!
|
// Wheeee!
|
||||||
|
global::kobox::showKoboxSplash = true;
|
||||||
|
|
||||||
|
// Re-use USBMS splash window for KoBox splash, since it's pretty much the same layout
|
||||||
|
usbmsSplashWindow = new usbms_splash();
|
||||||
|
usbmsSplashWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
usbmsSplashWindow->setGeometry(QRect(QPoint(0,0), screen()->geometry ().size()));
|
||||||
|
usbmsSplashWindow->show();
|
||||||
|
QApplication::processEvents();
|
||||||
|
|
||||||
string_writeconfig("/opt/ibxd", "x_start_gui\n");
|
string_writeconfig("/opt/ibxd", "x_start_gui\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
|
|
||||||
|
#include "usbms_splash.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class koboxAppsDialog;
|
class koboxAppsDialog;
|
||||||
}
|
}
|
||||||
|
@ -30,6 +32,7 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::koboxAppsDialog *ui;
|
Ui::koboxAppsDialog *ui;
|
||||||
|
usbms_splash *usbmsSplashWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // KOBOXAPPSDIALOG_H
|
#endif // KOBOXAPPSDIALOG_H
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QScreen>
|
||||||
#include <cstdio>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -355,7 +354,8 @@ void settings::on_usbmsBtn_clicked()
|
||||||
|
|
||||||
usbmsWindow = new usbms_splash();
|
usbmsWindow = new usbms_splash();
|
||||||
usbmsWindow->setAttribute(Qt::WA_DeleteOnClose);
|
usbmsWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
usbmsWindow->showFullScreen();
|
usbmsWindow->setGeometry(QRect(QPoint(0,0), screen()->geometry ().size()));
|
||||||
|
usbmsWindow->show();
|
||||||
|
|
||||||
QTimer *usbms_t = new QTimer(this);
|
QTimer *usbms_t = new QTimer(this);
|
||||||
usbms_t->setInterval(1000);
|
usbms_t->setInterval(1000);
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
|
||||||
|
#include "functions.h"
|
||||||
|
|
||||||
usbms_splash::usbms_splash(QWidget *parent) :
|
usbms_splash::usbms_splash(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::usbms_splash)
|
ui(new Ui::usbms_splash)
|
||||||
|
@ -15,6 +17,25 @@ usbms_splash::usbms_splash(QWidget *parent) :
|
||||||
float sH = QGuiApplication::screens()[0]->size().height();
|
float sH = QGuiApplication::screens()[0]->size().height();
|
||||||
|
|
||||||
// Defining what the default icon size will be
|
// Defining what the default icon size will be
|
||||||
|
if(global::kobox::showKoboxSplash == true) {
|
||||||
|
float stdIconWidth = sW / 1.30;
|
||||||
|
float stdIconHeight = sH / 1.30;
|
||||||
|
|
||||||
|
// Stylesheet
|
||||||
|
QFile stylesheetFile(":/resources/eink.qss");
|
||||||
|
stylesheetFile.open(QFile::ReadOnly);
|
||||||
|
this->setStyleSheet(stylesheetFile.readAll());
|
||||||
|
stylesheetFile.close();
|
||||||
|
|
||||||
|
ui->label->setText("Launching KoBox subsystem");
|
||||||
|
ui->label_3->setText("Please wait, this could take a while.");
|
||||||
|
ui->label_3->setStyleSheet("font-size: 9pt");
|
||||||
|
|
||||||
|
QPixmap pixmap(":/resources/kobox-icon.png");
|
||||||
|
QPixmap scaledPixmap = pixmap.scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio);
|
||||||
|
ui->label_2->setPixmap(scaledPixmap);
|
||||||
|
}
|
||||||
|
else {
|
||||||
float stdIconWidth = sW / 1.15;
|
float stdIconWidth = sW / 1.15;
|
||||||
float stdIconHeight = sH / 1.15;
|
float stdIconHeight = sH / 1.15;
|
||||||
|
|
||||||
|
@ -26,6 +47,7 @@ usbms_splash::usbms_splash(QWidget *parent) :
|
||||||
QPixmap scaledPixmap = pixmap.scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio);
|
QPixmap scaledPixmap = pixmap.scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio);
|
||||||
ui->label_2->setPixmap(scaledPixmap);
|
ui->label_2->setPixmap(scaledPixmap);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
usbms_splash::~usbms_splash()
|
usbms_splash::~usbms_splash()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue