diff options
author | Jonathan Bauer | 2011-06-17 16:07:54 +0200 |
---|---|---|
committer | Jonathan Bauer | 2011-06-17 16:07:54 +0200 |
commit | 8be33c4c7cd1b1b988bc9575492dc4516f1dd8d8 (patch) | |
tree | 2b06525e3221448d8cdaf098fbcbe44872441e07 | |
parent | the geometric way to layout label/progress bar, TODO proper central widget... (diff) | |
download | fbsplash-8be33c4c7cd1b1b988bc9575492dc4516f1dd8d8.tar.gz fbsplash-8be33c4c7cd1b1b988bc9575492dc4516f1dd8d8.tar.xz fbsplash-8be33c4c7cd1b1b988bc9575492dc4516f1dd8d8.zip |
README for build/run scripts & few comments..
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | src/fbsplash.cpp | 12 |
2 files changed, 17 insertions, 7 deletions
@@ -1,3 +1,15 @@ *************************************** Framebuffer BootSplash for OpenSLX *************************************** + +To create Makefile, use: + + ./build.sh + +(this will generate Makefile with cmake, under the build/ subdirectory) + +To run the program (on the qvfb), use: + + ./run.sh + +(this will start qvfb and launch fbsplash on it, similar to fbgui) diff --git a/src/fbsplash.cpp b/src/fbsplash.cpp index 0e84c5c..d22cbbc 100644 --- a/src/fbsplash.cpp +++ b/src/fbsplash.cpp @@ -12,24 +12,22 @@ fbsplash::fbsplash() : createActions(); setupTheme(); - _label = new QLabel("<font size=10 color='green'>OpenSLX</font>"); - _label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); - - - - qDebug() << "center x: " << center.x(); - qDebug() << "center y: " << center.y(); + // basic progress bar for now QProgressBar* pb = new QProgressBar(this); //pb->setFormat("Progress: %p%"); pb->setWindowFlags(Qt::FramelessWindowHint); pb->setRange(0, 100); pb->setValue(10); + // move the pb to the center, TODO proper margin QRect desktopRect = QApplication::desktop()->availableGeometry(this); QPoint center = desktopRect.center(); pb->move(center.x() - pb->width()*0.5 , center.y() - pb->height()*0.5 + 50); + // Label in the middle of the screen + _label = new QLabel("<font size=10 color='green'>OpenSLX</font>"); + _label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); setCentralWidget(_label); setAttribute(Qt::WA_QuitOnClose, true); |