summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xbuild.sh11
-rw-r--r--src/fbsplash.cpp18
-rw-r--r--src/fbsplash.h2
-rw-r--r--src/fbsplash.ui2
5 files changed, 20 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 524b093..378eac2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
build
-core
diff --git a/build.sh b/build.sh
index dacc56e..9aa411d 100755
--- a/build.sh
+++ b/build.sh
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# fbsplash builder script for cmake
DIR=$(pwd)
BUILDDIR=build
-# if --clean, remove build dir
+# if -c option was given, remove build dir
if [ "$1" = "-c" ]
then
rm -rf $BUILDDIR
@@ -21,10 +21,7 @@ fi
[ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR
cd $BUILDDIR
-# use cmake to create Makefile
-echo "Invoking cmake ..."
-cmake "$DIR"
-echo "Invoking make ..."
-make
+
+cmake "$DIR" && make
cd $DIR
diff --git a/src/fbsplash.cpp b/src/fbsplash.cpp
index 7e97d91..292431c 100644
--- a/src/fbsplash.cpp
+++ b/src/fbsplash.cpp
@@ -1,15 +1,16 @@
-#include <QProgressBar>
#include "fbsplash.h"
#include "ui_fbsplash.h"
//-----------------------------------------------------------------------------
fbsplash::fbsplash(QWidget *parent) :
QWidget(parent), ui(new Ui::fbsplash) {
-
ui->setupUi(this);
createActions();
- //setupTheme();
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(increaseProgressBar()));
+ timer->start(100);
setWindowFlags(Qt::FramelessWindowHint);
showFullScreen();
@@ -21,8 +22,7 @@ fbsplash::~fbsplash() {
}
//-----------------------------------------------------------------------------
void fbsplash::setupTheme() {
- // TODO configurable per cmdline
- // TODO set per css
+ // TODO: set styles from config file (or default theme)
}
//-----------------------------------------------------------------------------
void fbsplash::createActions() {
@@ -33,3 +33,11 @@ void fbsplash::createActions() {
connect(_quit, SIGNAL(triggered()), this, SLOT(close()));
// per default, QT closes the app when the last widget is closed
}
+
+void fbsplash::increaseProgressBar() {
+ int currentValue = ui->progressBar->value();
+ if (currentValue < 100)
+ ui->progressBar->setValue(currentValue + 1);
+ else
+ ui->progressBar->setValue(0);
+}
diff --git a/src/fbsplash.h b/src/fbsplash.h
index 69ef69a..26b66b0 100644
--- a/src/fbsplash.h
+++ b/src/fbsplash.h
@@ -39,6 +39,8 @@ private:
// ** TESTING **
// ** TESTING **
+private slots:
+ void increaseProgressBar();
};
#endif // FBSPLASH_H
diff --git a/src/fbsplash.ui b/src/fbsplash.ui
index a5ed56b..0710b35 100644
--- a/src/fbsplash.ui
+++ b/src/fbsplash.ui
@@ -69,7 +69,7 @@ border-radius: 8px;
}</string>
</property>
<property name="value">
- <number>24</number>
+ <number>0</number>
</property>
<property name="format">
<string/>