From 1f55ffeef1201b7633addc14371eee32f1e07ce4 Mon Sep 17 00:00:00 2001
From: Jonathan Bauer
Date: Mon, 20 Jun 2011 16:57:52 +0200
Subject: new ui, loading external png's now
---
CMakeLists.txt | 19 ++++---
run.sh | 7 ++-
src/fbsplash.qrc | 5 ++
src/fbsplash.ui | 134 ++++++++++++++++++++++++++++++++---------------
src/img/openslx-left.png | Bin 0 -> 9187 bytes
5 files changed, 115 insertions(+), 50 deletions(-)
create mode 100644 src/fbsplash.qrc
create mode 100644 src/img/openslx-left.png
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8cf1160..98d9d3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,20 +9,23 @@ else(QT4_FOUND)
message(FATAL_ERROR "QT4 not found!")
endif(QT4_FOUND)
-file(GLOB_RECURSE fbsplash_SOURCES src/*.cpp)
-file(GLOB_RECURSE fbsplash_MOC_HEADERS src/*.h)
-file(GLOB_RECURSE fbsplash_UIS src/*.ui)
+file(GLOB_RECURSE FBSPLASH_SOURCES src/*.cpp)
+file(GLOB_RECURSE FBSPLASH_MOC_HEADERS src/*.h)
+file(GLOB_RECURSE FBSPLASH_UIS src/*.ui)
+file(GLOB_RECURSE FBSPLASH_RCS src/*.qrc)
include(${QT_USE_FILE})
add_definitions(${QT_DEFINITIONS})
-QT4_WRAP_UI(fbsplash_UI_HEADERS ${fbsplash_UIS})
-QT4_WRAP_CPP(fbsplash_MOC_SOURCES ${fbsplash_MOC_HEADERS})
+QT4_ADD_RESOURCES(FBSPLASH_RC_SOURCES ${FBSPLASH_RCS})
+QT4_WRAP_UI(FBSPLASH_UI_HEADERS ${FBSPLASH_UIS})
+QT4_WRAP_CPP(FBSPLASH_MOC_SOURCES ${FBSPLASH_MOC_HEADERS})
add_executable(fbsplash
- ${fbsplash_SOURCES}
- ${fbsplash_MOC_SOURCES}
- ${fbsplash_UI_HEADERS})
+ ${FBSPLASH_SOURCES}
+ ${FBSPLASH_MOC_SOURCES}
+ ${FBSPLASH_UI_HEADERS}
+ ${FBSPLASH_RC_SOURCES})
target_link_libraries(fbsplash ${QT_LIBRARIES})
diff --git a/run.sh b/run.sh
index 856da9e..a502a45 100755
--- a/run.sh
+++ b/run.sh
@@ -2,6 +2,11 @@
# set your QT version here
QT_VERSION=4.7.2
+# qvfb's width
+QVFB_WIDTH=640
+# qvfb's height
+QVFB_HEIGHT=480
+
# path to script (including script name)
script_path="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
@@ -12,7 +17,7 @@ working_path=`dirname "$script_path"`
display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}')
# Start QT's virtual framebuffer with proper display_id
-/usr/local/Trolltech/Qt-$QT_VERSION/bin/qvfb -width 1024 -height 768 -qwsdisplay :$display_id &
+/usr/local/Trolltech/Qt-$QT_VERSION/bin/qvfb -width $QVFB_WIDTH -height $QVFB_HEIGHT -qwsdisplay :$display_id &
# quick sleep to wait for qvfb loading
sleep 0.2
diff --git a/src/fbsplash.qrc b/src/fbsplash.qrc
new file mode 100644
index 0000000..96aa9f9
--- /dev/null
+++ b/src/fbsplash.qrc
@@ -0,0 +1,5 @@
+
+
+ img/openslx-left.png
+
+
diff --git a/src/fbsplash.ui b/src/fbsplash.ui
index bee2404..1d0b767 100644
--- a/src/fbsplash.ui
+++ b/src/fbsplash.ui
@@ -6,54 +6,106 @@
0
0
- 1024
- 768
+ 960
+ 567
Form
-
+ #fbsplash{
+background:black;
+}
-
-
-
- 390
- 300
- 201
- 61
-
-
-
-
- 20
-
-
-
-
-
-
- TextLabel
-
-
- Qt::AlignCenter
-
-
-
-
-
- 420
- 380
- 181
- 21
-
-
-
- 24
-
-
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
+ #progressBar{
+padding: 1px;
+border-style: solid;
+border: 2px solid gray;
+border-radius: 8px;
+}
+
+
+ 24
+
+
+
+
+
+
+ -
+
+
+
+
+
+ :/img/openslx-left.png
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
-
+
+
+
diff --git a/src/img/openslx-left.png b/src/img/openslx-left.png
new file mode 100644
index 0000000..900dd86
Binary files /dev/null and b/src/img/openslx-left.png differ
--
cgit v1.2.3-55-g7522