aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/BootSplash.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-21 09:17:34 -0400
committerKen Moore <ken@pcbsd.org>2015-05-21 09:17:34 -0400
commit1f07d073bb276dfaa7442036760621912b8d200c (patch)
tree1b434cd7253d3a9d351e2df9cea68d016462d214 /lumina-desktop/BootSplash.cpp
parentOops, forgot to include the process exit status comparison before changing th... (diff)
downloadlumina-1f07d073bb276dfaa7442036760621912b8d200c.tar.gz
lumina-1f07d073bb276dfaa7442036760621912b8d200c.tar.bz2
lumina-1f07d073bb276dfaa7442036760621912b8d200c.zip
Add a new boot splash screen to be used during the Lumina initialization phase. This is *not* a QSplashScreen, so we avoid the issues with VirtualBox/3D acceleration and it loads/updates much faster (almost no change in the startup time on my system).
Diffstat (limited to 'lumina-desktop/BootSplash.cpp')
-rw-r--r--lumina-desktop/BootSplash.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/lumina-desktop/BootSplash.cpp b/lumina-desktop/BootSplash.cpp
new file mode 100644
index 00000000..93180e5b
--- /dev/null
+++ b/lumina-desktop/BootSplash.cpp
@@ -0,0 +1,55 @@
+#include "BootSplash.h"
+#include "ui_BootSplash.h"
+
+#include <LuminaXDG.h>
+
+BootSplash::BootSplash() : QWidget(0, Qt::SplashScreen | Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint | Qt::WindowDoesNotAcceptFocus), ui(new Ui::BootSplash){
+ ui->setupUi(this);
+ this->setObjectName("LuminaBootSplash"); //for theme styling
+ //Center the window on the primary screen
+ QPoint ctr = QApplication::desktop()->screenGeometry().center();
+ this->move( ctr.x()-(this->width()/2), ctr.y()-(this->height()/2) );
+}
+
+void BootSplash::showScreen(QString loading){ //update icon, text, and progress
+ QString txt, icon;
+ int per = 0;
+ if(loading=="init"){
+ txt = tr("Initializing Session..."); per = 11;
+ icon = "preferences-system-login";
+ }else if(loading=="settings"){
+ txt = tr("Loading Settings..."); per = 22;
+ icon = "user-home";
+ }else if(loading=="user"){
+ txt = tr("Checking User Settings..."); per = 33;
+ icon = "preferences-desktop-user";
+ }else if(loading=="systray"){
+ txt = tr("Registering System Tray..."); per = 44;
+ icon = "preferences-plugin";
+ }else if(loading=="wm"){
+ txt = tr("Starting Window Manager..."); per = 55;
+ icon = "preferences-system-windows-actions";
+ }else if(loading=="desktop"){
+ txt = tr("Initializing Desktop(s)..."); per = 66;
+ icon = "preferences-desktop-wallpaper";
+ }else if(loading=="menus"){
+ txt = tr("Initializing System Menu(s)..."); per = 77;
+ icon = "preferences-system-windows";
+ }else if(loading=="final"){
+ txt = tr("Performing Final Checks..."); per = 90;
+ icon = "pcbsd";
+ }
+ ui->progressBar->setValue(per);
+ ui->label_text->setText(txt);
+ ui->label_icon->setPixmap( LXDG::findIcon(icon, "Lumina-DE").pixmap(64,64) );
+ this->show();
+ this->update();
+ QApplication::processEvents();
+}
+
+void BootSplash::showText(QString txt){ //will only update the text, not the icon/progress
+ ui->label_text->setText(txt);
+ this->show();
+ this->update();
+ QApplication::processEvents();
+} \ No newline at end of file
bgstack15