summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2011-06-20 16:57:52 +0200
committerJonathan Bauer2011-06-20 16:57:52 +0200
commit1f55ffeef1201b7633addc14371eee32f1e07ce4 (patch)
tree717e0d23cb3ec9311701e2f59fe90a07e92558c1
parentminor changes (diff)
downloadfbsplash-1f55ffeef1201b7633addc14371eee32f1e07ce4.tar.gz
fbsplash-1f55ffeef1201b7633addc14371eee32f1e07ce4.tar.xz
fbsplash-1f55ffeef1201b7633addc14371eee32f1e07ce4.zip
new ui, loading external png's now
-rw-r--r--CMakeLists.txt19
-rwxr-xr-xrun.sh7
-rw-r--r--src/fbsplash.qrc5
-rw-r--r--src/fbsplash.ui134
-rw-r--r--src/img/openslx-left.pngbin0 -> 9187 bytes
5 files changed, 115 insertions, 50 deletions
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 @@
+<RCC>
+ <qresource prefix="/">
+ <file>img/openslx-left.png</file>
+ </qresource>
+</RCC>
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 @@
<rect>
<x>0</x>
<y>0</y>
- <width>1024</width>
- <height>768</height>
+ <width>960</width>
+ <height>567</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
- <string notr="true"/>
+ <string notr="true">#fbsplash{
+background:black;
+}</string>
</property>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>390</x>
- <y>300</y>
- <width>201</width>
- <height>61</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <pointsize>20</pointsize>
- </font>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>TextLabel</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- <widget class="QProgressBar" name="progressBar">
- <property name="geometry">
- <rect>
- <x>420</x>
- <y>380</y>
- <width>181</width>
- <height>21</height>
- </rect>
- </property>
- <property name="value">
- <number>24</number>
- </property>
- </widget>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="2" column="0">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="2">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="1">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="1">
+ <widget class="QProgressBar" name="progressBar">
+ <property name="styleSheet">
+ <string notr="true">#progressBar{
+padding: 1px;
+border-style: solid;
+border: 2px solid gray;
+border-radius: 8px;
+}</string>
+ </property>
+ <property name="value">
+ <number>24</number>
+ </property>
+ <property name="format">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="fbsplash.qrc">:/img/openslx-left.png</pixmap>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
</widget>
- <resources/>
+ <resources>
+ <include location="fbsplash.qrc"/>
+ </resources>
<connections/>
</ui>
diff --git a/src/img/openslx-left.png b/src/img/openslx-left.png
new file mode 100644
index 0000000..900dd86
--- /dev/null
+++ b/src/img/openslx-left.png
Binary files differ