summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.cproject141
-rw-r--r--src/.project88
-rw-r--r--src/Makefile.Debug179
-rw-r--r--src/Makefile.Release179
-rw-r--r--src/debug/fbbrowser.obin0 -> 229592 bytes
-rw-r--r--src/debug/main.obin0 -> 296420 bytes
-rw-r--r--src/debug/moc_fbbrowser.cpp69
-rw-r--r--src/debug/moc_fbbrowser.obin0 -> 237684 bytes
-rw-r--r--src/fbbrowser.cpp89
-rw-r--r--src/fbbrowser.h40
-rw-r--r--src/fbbrowser.ui19
-rw-r--r--src/fbgui.cpp83
-rw-r--r--src/fbgui.h28
-rw-r--r--src/fbgui.pro12
-rw-r--r--src/fbgui.qrc5
-rw-r--r--src/html/errorPage.html32
-rwxr-xr-xsrc/testApp.sh22
17 files changed, 986 insertions, 0 deletions
diff --git a/src/.cproject b/src/.cproject
new file mode 100644
index 0000000..08a2b7b
--- /dev/null
+++ b/src/.cproject
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="org.eclipse.cdt.core.default.config.1065718378">
+ <storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="org.eclipse.cdt.core.default.config.1065718378" moduleId="org.eclipse.cdt.core.settings" name="Configuration">
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+ <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="makefileGenerator">
+ <runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+ <buildOutputProvider>
+ <openAction enabled="true" filePath=""/>
+ <parser enabled="true"/>
+ </buildOutputProvider>
+ <scannerInfoProvider id="specsFile">
+ <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+ <parser enabled="true"/>
+ </scannerInfoProvider>
+ </profile>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
+ <buildTargets>
+ <target name="Qt Release Build" path="" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+ <buildCommand>make</buildCommand>
+ <buildArguments/>
+ <buildTarget>release</buildTarget>
+ <stopOnError>false</stopOnError>
+ <useDefaultCommand>false</useDefaultCommand>
+ <runAllBuilders>true</runAllBuilders>
+ </target>
+ <target name="Qt Debug Build" path="" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+ <buildCommand>make</buildCommand>
+ <buildArguments/>
+ <buildTarget>debug</buildTarget>
+ <stopOnError>false</stopOnError>
+ <useDefaultCommand>false</useDefaultCommand>
+ <runAllBuilders>true</runAllBuilders>
+ </target>
+ </buildTargets>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+ <storageModule moduleId="org.eclipse.cdt.core.pathentry">
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtNetwork" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtCore" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtXml" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtTest" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtDBus" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtSql" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtDeclarative" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtGui" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtScript" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtSvg" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtScriptTools" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtMultimedia" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtUiTools" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="Qt" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtWebKit" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtDesigner" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="Qt3Support" kind="inc" path="" system="true"/>
+ <pathentry base-path="/usr/local/Trolltech/QtEmbedded-4.7.1/include" include="QtHelp" kind="inc" path="" system="true"/>
+ </storageModule>
+ </cconfiguration>
+ </storageModule>
+</cproject>
diff --git a/src/.project b/src/.project
new file mode 100644
index 0000000..477155b
--- /dev/null
+++ b/src/.project
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>fbbrowser</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.trolltech.qtcppproject.QtMakefileGenerator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.make.core.makeBuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>org.eclipse.cdt.core.errorOutputParser</key>
+ <value>org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.MakeErrorParser;</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.build.arguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.build.command</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.build.target.auto</key>
+ <value>debug</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.build.target.clean</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.build.target.inc</key>
+ <value>debug</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.environment</key>
+ <value>PATH=/usr/local/Trolltech/QtEmbedded-4.7.1/bin:${env_var:PATH}:${env_var:PATH}|</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>false</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.make.core.makeNature</nature>
+ <nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
+ <nature>com.trolltech.qtcppproject.QtNature</nature>
+ </natures>
+</projectDescription>
diff --git a/src/Makefile.Debug b/src/Makefile.Debug
new file mode 100644
index 0000000..6758861
--- /dev/null
+++ b/src/Makefile.Debug
@@ -0,0 +1,179 @@
+#############################################################################
+# Makefile for building: fbbrowser
+# Generated by qmake (2.01a) (Qt 4.7.1) on: Wed Jan 12 12:12:05 2011
+# Project: fbbrowser.pro
+# Template: app
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH = -I/usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/qws/linux-x86-g++ -I. -I/usr/local/Trolltech/QtEmbedded-4.7.1/include/QtCore -I/usr/local/Trolltech/QtEmbedded-4.7.1/include/QtNetwork -I/usr/local/Trolltech/QtEmbedded-4.7.1/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.7.1/include -Idebug -I.
+LINK = g++
+LFLAGS = -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.7.1/lib
+LIBS = $(SUBLIBS) -L/usr/local/Trolltech/QtEmbedded-4.7.1/lib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.7.1/lib -lQtNetwork -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /usr/local/Trolltech/QtEmbedded-4.7.1/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP = strip
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = debug/
+
+####### Files
+
+SOURCES = main.cpp \
+ fbbrowser.cpp debug/moc_fbbrowser.cpp
+OBJECTS = debug/main.o \
+ debug/fbbrowser.o \
+ debug/moc_fbbrowser.o
+DIST = /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/common/g++.conf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/common/unix.conf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/common/linux.conf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/common/qws.conf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/qconfig.pri \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/modules/qt_webkit_version.pri \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/qt_functions.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/qt_config.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/default_pre.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/debug.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/debug_and_release.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/default_post.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/build_pass.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/warn_on.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/qt.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/unix/thread.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/moc.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/resources.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/uic.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/yacc.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/lex.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/include_source_dir.prf \
+ fbbrowser.pro
+QMAKE_TARGET = fbbrowser
+DESTDIR =
+TARGET = fbbrowser
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile.Debug $(TARGET)
+
+$(TARGET): ui_fbbrowser.h $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+qmake: FORCE
+ @$(QMAKE) CONFIG+=debug_and_release -o Makefile.Debug fbbrowser.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) debug/fbbrowser1.0.0 || $(MKDIR) debug/fbbrowser1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) debug/fbbrowser1.0.0/ && $(COPY_FILE) --parents fbbrowser.h debug/fbbrowser1.0.0/ && $(COPY_FILE) --parents main.cpp fbbrowser.cpp debug/fbbrowser1.0.0/ && $(COPY_FILE) --parents fbbrowser.ui debug/fbbrowser1.0.0/ && (cd `dirname debug/fbbrowser1.0.0` && $(TAR) fbbrowser1.0.0.tar fbbrowser1.0.0 && $(COMPRESS) fbbrowser1.0.0.tar) && $(MOVE) `dirname debug/fbbrowser1.0.0`/fbbrowser1.0.0.tar.gz . && $(DEL_FILE) -r debug/fbbrowser1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile.Debug
+
+
+check: first
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_moc_header_make_all: debug/moc_fbbrowser.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) debug/moc_fbbrowser.cpp
+debug/moc_fbbrowser.cpp: ui_fbbrowser.h \
+ fbbrowser.h
+ /usr/local/Trolltech/QtEmbedded-4.7.1/bin/moc $(DEFINES) $(INCPATH) fbbrowser.h -o debug/moc_fbbrowser.cpp
+
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_uic_make_all: ui_fbbrowser.h
+compiler_uic_clean:
+ -$(DEL_FILE) ui_fbbrowser.h
+ui_fbbrowser.h: fbbrowser.ui
+ /usr/local/Trolltech/QtEmbedded-4.7.1/bin/uic fbbrowser.ui -o ui_fbbrowser.h
+
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean compiler_uic_clean
+
+####### Compile
+
+debug/main.o: main.cpp fbbrowser.h \
+ ui_fbbrowser.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/main.o main.cpp
+
+debug/fbbrowser.o: fbbrowser.cpp fbbrowser.h \
+ ui_fbbrowser.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/fbbrowser.o fbbrowser.cpp
+
+debug/moc_fbbrowser.o: debug/moc_fbbrowser.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_fbbrowser.o debug/moc_fbbrowser.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
diff --git a/src/Makefile.Release b/src/Makefile.Release
new file mode 100644
index 0000000..cbe28a3
--- /dev/null
+++ b/src/Makefile.Release
@@ -0,0 +1,179 @@
+#############################################################################
+# Makefile for building: fbbrowser
+# Generated by qmake (2.01a) (Qt 4.7.1) on: Wed Jan 12 12:12:05 2011
+# Project: fbbrowser.pro
+# Template: app
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH = -I/usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/qws/linux-x86-g++ -I. -I/usr/local/Trolltech/QtEmbedded-4.7.1/include/QtCore -I/usr/local/Trolltech/QtEmbedded-4.7.1/include/QtNetwork -I/usr/local/Trolltech/QtEmbedded-4.7.1/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.7.1/include -Irelease -I.
+LINK = g++
+LFLAGS = -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.7.1/lib
+LIBS = $(SUBLIBS) -L/usr/local/Trolltech/QtEmbedded-4.7.1/lib -lQtGui -L/usr/local/Trolltech/QtEmbedded-4.7.1/lib -lQtNetwork -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /usr/local/Trolltech/QtEmbedded-4.7.1/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP = strip
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = release/
+
+####### Files
+
+SOURCES = main.cpp \
+ fbbrowser.cpp release/moc_fbbrowser.cpp
+OBJECTS = release/main.o \
+ release/fbbrowser.o \
+ release/moc_fbbrowser.o
+DIST = /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/common/g++.conf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/common/unix.conf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/common/linux.conf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/common/qws.conf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/qconfig.pri \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/modules/qt_webkit_version.pri \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/qt_functions.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/qt_config.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/exclusive_builds.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/default_pre.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/release.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/debug_and_release.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/default_post.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/build_pass.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/warn_on.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/qt.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/unix/thread.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/moc.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/resources.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/uic.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/yacc.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/lex.prf \
+ /usr/local/Trolltech/QtEmbedded-4.7.1/mkspecs/features/include_source_dir.prf \
+ fbbrowser.pro
+QMAKE_TARGET = fbbrowser
+DESTDIR =
+TARGET = fbbrowser
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile.Release $(TARGET)
+
+$(TARGET): ui_fbbrowser.h $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+qmake: FORCE
+ @$(QMAKE) CONFIG+=debug_and_release -o Makefile.Release fbbrowser.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) release/fbbrowser1.0.0 || $(MKDIR) release/fbbrowser1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) release/fbbrowser1.0.0/ && $(COPY_FILE) --parents fbbrowser.h release/fbbrowser1.0.0/ && $(COPY_FILE) --parents main.cpp fbbrowser.cpp release/fbbrowser1.0.0/ && $(COPY_FILE) --parents fbbrowser.ui release/fbbrowser1.0.0/ && (cd `dirname release/fbbrowser1.0.0` && $(TAR) fbbrowser1.0.0.tar fbbrowser1.0.0 && $(COMPRESS) fbbrowser1.0.0.tar) && $(MOVE) `dirname release/fbbrowser1.0.0`/fbbrowser1.0.0.tar.gz . && $(DEL_FILE) -r release/fbbrowser1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile.Release
+
+
+check: first
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_moc_header_make_all: release/moc_fbbrowser.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) release/moc_fbbrowser.cpp
+release/moc_fbbrowser.cpp: ui_fbbrowser.h \
+ fbbrowser.h
+ /usr/local/Trolltech/QtEmbedded-4.7.1/bin/moc $(DEFINES) $(INCPATH) fbbrowser.h -o release/moc_fbbrowser.cpp
+
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_uic_make_all: ui_fbbrowser.h
+compiler_uic_clean:
+ -$(DEL_FILE) ui_fbbrowser.h
+ui_fbbrowser.h: fbbrowser.ui
+ /usr/local/Trolltech/QtEmbedded-4.7.1/bin/uic fbbrowser.ui -o ui_fbbrowser.h
+
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean compiler_uic_clean
+
+####### Compile
+
+release/main.o: main.cpp fbbrowser.h \
+ ui_fbbrowser.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/main.o main.cpp
+
+release/fbbrowser.o: fbbrowser.cpp fbbrowser.h \
+ ui_fbbrowser.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/fbbrowser.o fbbrowser.cpp
+
+release/moc_fbbrowser.o: release/moc_fbbrowser.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_fbbrowser.o release/moc_fbbrowser.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
diff --git a/src/debug/fbbrowser.o b/src/debug/fbbrowser.o
new file mode 100644
index 0000000..82acc90
--- /dev/null
+++ b/src/debug/fbbrowser.o
Binary files differ
diff --git a/src/debug/main.o b/src/debug/main.o
new file mode 100644
index 0000000..dd2b6c9
--- /dev/null
+++ b/src/debug/main.o
Binary files differ
diff --git a/src/debug/moc_fbbrowser.cpp b/src/debug/moc_fbbrowser.cpp
new file mode 100644
index 0000000..0282b32
--- /dev/null
+++ b/src/debug/moc_fbbrowser.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+** Meta object code from reading C++ file 'fbbrowser.h'
+**
+** Created: Wed Jan 12 12:12:08 2011
+** by: The Qt Meta Object Compiler version 62 (Qt 4.7.1)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include "../fbbrowser.h"
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#error "The header file 'fbbrowser.h' doesn't include <QObject>."
+#elif Q_MOC_OUTPUT_REVISION != 62
+#error "This file was generated using the moc from 4.7.1. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+QT_BEGIN_MOC_NAMESPACE
+static const uint qt_meta_data_fbbrowser[] = {
+
+ // content:
+ 5, // revision
+ 0, // classname
+ 0, 0, // classinfo
+ 0, 0, // methods
+ 0, 0, // properties
+ 0, 0, // enums/sets
+ 0, 0, // constructors
+ 0, // flags
+ 0, // signalCount
+
+ 0 // eod
+};
+
+static const char qt_meta_stringdata_fbbrowser[] = {
+ "fbbrowser\0"
+};
+
+const QMetaObject fbbrowser::staticMetaObject = {
+ { &QWidget::staticMetaObject, qt_meta_stringdata_fbbrowser,
+ qt_meta_data_fbbrowser, 0 }
+};
+
+#ifdef Q_NO_DATA_RELOCATION
+const QMetaObject &fbbrowser::getStaticMetaObject() { return staticMetaObject; }
+#endif //Q_NO_DATA_RELOCATION
+
+const QMetaObject *fbbrowser::metaObject() const
+{
+ return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
+}
+
+void *fbbrowser::qt_metacast(const char *_clname)
+{
+ if (!_clname) return 0;
+ if (!strcmp(_clname, qt_meta_stringdata_fbbrowser))
+ return static_cast<void*>(const_cast< fbbrowser*>(this));
+ return QWidget::qt_metacast(_clname);
+}
+
+int fbbrowser::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+ _id = QWidget::qt_metacall(_c, _id, _a);
+ if (_id < 0)
+ return _id;
+ return _id;
+}
+QT_END_MOC_NAMESPACE
diff --git a/src/debug/moc_fbbrowser.o b/src/debug/moc_fbbrowser.o
new file mode 100644
index 0000000..55373e8
--- /dev/null
+++ b/src/debug/moc_fbbrowser.o
Binary files differ
diff --git a/src/fbbrowser.cpp b/src/fbbrowser.cpp
new file mode 100644
index 0000000..50fc86a
--- /dev/null
+++ b/src/fbbrowser.cpp
@@ -0,0 +1,89 @@
+#include "fbbrowser.h"
+#include <QtGui>
+#include <QtWebKit>
+#include <QApplication>
+
+void fbbrowser::httpReadyRead()
+{
+ // This slot listens to readyRead() signal from our QNetworkReply.
+ qDebug() << "readyRead() signal emmited!" << endl;
+ if(reply->error() == QNetworkReply::NoError)
+ {
+ qDebug() << "No error, loading given URL...";
+ view->load(url);
+ }
+}
+
+fbbrowser::fbbrowser(const QUrl & url)
+{
+ view = new QWebView(this);
+
+ // Create QNetworkAccessManager which is needed to send/receive requests.
+ manager = new QNetworkAccessManager(this);
+ // Create a QNetworkRequest object and set its URL.
+ // QNetworkRequest request;
+ request.setUrl(url);
+
+ // Check Internet connection
+ // Let the manager send the request and receive the reply.
+ // QNetworkReply *reply = manager->get(request);
+ *reply = manager->get(request);
+ connect(reply, SIGNAL(readyRead()), this, SLOT(httpReadyRead()));
+ //connect(reply, SIGNAL(finished()), this, SLOT());
+
+ // Check if the reply is an error message.
+ qDebug() << "QNetworkReply error code: " << reply->error();
+
+ // TODO: error differentiation
+ // reply->error() returns 0 even for invalid URL.
+ // A possibility to check for validity, is to listen to readyRead()
+ // signal, haven't found a better way yet ...
+ //if(reply->error() == QNetworkReply::NoError)
+ //{
+ // qDebug() << "No error, loading given URL...";
+ // view->load(url);
+ //}
+ //else
+ //{
+ // qDebug() << "Error occured, loading error page...";
+ // view->load(QUrl("qrc:/html/errorPage.html"));
+ //}
+
+ //remove the window decoration
+ this->setWindowFlags(Qt::SplashScreen);
+
+ //enable JavaScript access to qt objects
+ QObject::connect(view->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(addJSObject()));
+
+ //set form to fullscreen
+ this->showFullScreen();
+
+ setCentralWidget(view);
+}
+
+// Destructor
+fbbrowser::~fbbrowser()
+{
+}
+
+//
+void fbbrowser::addJSObject()
+{
+ view->page()->mainFrame()->addToJavaScriptWindowObject(QString("webkitTest"), this);
+}
+
+void fbbrowser::writeText(QString text)
+{
+ QFile file("out.txt");
+ if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
+ return;
+
+ QTextStream out(&file);
+ out << text << "\n";
+}
+
+// This function needed now ?
+void fbbrowser::quitAll()
+{
+ //emit lastWindowClosed();
+}
diff --git a/src/fbbrowser.h b/src/fbbrowser.h
new file mode 100644
index 0000000..c869197
--- /dev/null
+++ b/src/fbbrowser.h
@@ -0,0 +1,40 @@
+#ifndef FBBROWSER_H
+#define FBBROWSER_H
+
+#include <QtGui>
+#include "ui_fbbrowser.h"
+#include <QtNetwork>
+
+class QWebView;
+//QT_BEGIN_NAMESPACE
+//class QLineEdit;
+//QT_END_NAMESPACE
+
+class fbbrowser : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ fbbrowser(const QUrl& url);
+ ~fbbrowser();
+ void printusage();
+ Q_INVOKABLE void writeText(QString text); //used for writing web content into a file
+ Q_INVOKABLE void quitAll();
+
+private:
+ QUrl url;
+ QNetworkRequest request;
+ QNetworkReply *reply;
+ QWebView * view;
+ QNetworkAccessManager * manager;
+ //QApplication * app(int & argc, char ** argv);
+
+private slots:
+ void httpReadyRead();
+ void addJSObject();
+
+signals:
+ void signalQuitAll();
+};
+
+#endif // FBBROWSER_H
diff --git a/src/fbbrowser.ui b/src/fbbrowser.ui
new file mode 100644
index 0000000..a02b1ab
--- /dev/null
+++ b/src/fbbrowser.ui
@@ -0,0 +1,19 @@
+<ui version="4.0" >
+ <class>fbbrowserClass</class>
+ <widget class="QWidget" name="fbbrowserClass" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>fbbrowser</string>
+ </property>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
new file mode 100644
index 0000000..fe67b79
--- /dev/null
+++ b/src/fbgui.cpp
@@ -0,0 +1,83 @@
+#include "fbbrowser.h"
+
+#include <QtGui>
+#include <QApplication>
+#include <iostream>
+#include <getopt.h>
+#include <fbgui.h>
+
+
+void printUsage()
+{
+ // Prints usage information, incomplete.
+ // Q: How is the -qws option handled, mention it here or not?
+ QTextStream qout(stdout);
+ qout << QObject::tr("Usage: ./fbgui [OPTIONS] <URL>") << endl;
+ qout << QObject::tr("Options:") << endl;
+ qout << "-h or --help " << QObject::tr("Prints usage information.") << endl;
+ qout << "-qws " << QObject::tr("Set this application to also be the server application.") << endl;
+ qout << " " << QObject::tr("Skip this option if you have a QT server application") << endl;
+ exit(1);
+}
+
+QString getPath(const char* c)
+{
+ QString appPath = c;
+ // Locate last '/' in the full path and remove all the chars after it.
+ appPath.chop(appPath.length() - 1
+ - appPath.lastIndexOf("/", appPath.length()-1));
+ qDebug() << "Application path: " << appPath;
+ return appPath;
+}
+
+int main(int argc, char *argv[])
+{
+ // Parse command line arguments.
+ int opt = 0;
+ int longIndex = 0;
+ // Declare the short options as a char*, these have exactly one - followed by letter from optString.
+ // For example: ./fbbrowser -h
+ // Declare the long options in the const struct, these have two - followed by a string found in longOpts[].
+ // Same as: ./fbbrowser --help
+ // Note: I included 'qws' here to not have errors, when setting fbbrowser to be the server app aswell.
+ static const char *optString = "hqws";
+ static const struct option longOpts[] =
+ {
+ // If an option requires parameters, write this number instead of no_argument.
+ // The last argument, is the corresponding char to the option string.
+ {"help", no_argument, NULL, 'h'}
+ };
+ // getopt_long returns the index of the next argument to be read, -1 if there are no more arguments.
+ opt = getopt_long(argc, argv, optString, longOpts, &longIndex);
+ while (opt != -1)
+ {
+ switch(opt)
+ {
+ case 'h':
+ printUsage();
+ break;
+ }
+ opt = getopt_long(argc, argv, optString, longOpts, &longIndex);
+ }
+ // This is the main object of a QT Application.
+ QApplication a(argc, argv);
+ // Is this really needed, since we kill the app through the fbbrowser object?
+ QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
+ // Get the application path.
+ QString appPath = getPath(argv[0]);
+ // This part reads the URL to load from the arguments given through the commandline.
+ QUrl url;
+ if (argc > 1)
+ url = QUrl(argv[1]);
+ else //Default URL to load
+ url = QUrl("http://132.230.4.3/webkitTest.html");
+ // Create a new Framebuffer-Browser object for displaying the given URL.
+ fbbrowser *fbb = new fbbrowser(url);
+ // Listen to the signalQuitAll() Signal to kill the app from within the browser.
+ QObject::connect(fbb, SIGNAL(signalQuitAll()), &a, SLOT(quit()));
+ // Display the browser.
+ fbb->show();
+
+ // Exit the application.
+ return a.exec();
+}
diff --git a/src/fbgui.h b/src/fbgui.h
new file mode 100644
index 0000000..c65a31f
--- /dev/null
+++ b/src/fbgui.h
@@ -0,0 +1,28 @@
+#ifndef FBGUI_H
+#define FBGUI_H
+
+#include <QtGui>
+
+
+//QT_BEGIN_NAMESPACE
+//QT_END_NAMESPACE
+
+class fbgui : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ fbgui();
+ ~fbgui();
+ void printUsage();
+ QString getPath(const char* c);
+
+//private:
+
+//private slots:
+
+//signals:
+
+};
+
+#endif // FBGUI_H
diff --git a/src/fbgui.pro b/src/fbgui.pro
new file mode 100644
index 0000000..c1bcf82
--- /dev/null
+++ b/src/fbgui.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+TARGET = fbgui
+CONFIG += qt debug
+QT += core \
+ gui \
+ webkit \
+ network
+HEADERS += fbbrowser.h
+SOURCES += fbgui.cpp \
+ fbbrowser.cpp
+FORMS += fbbrowser.ui
+RESOURCES += fbgui.qrc
diff --git a/src/fbgui.qrc b/src/fbgui.qrc
new file mode 100644
index 0000000..da051a4
--- /dev/null
+++ b/src/fbgui.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>html/errorPage.html</file>
+ </qresource>
+ </RCC>
diff --git a/src/html/errorPage.html b/src/html/errorPage.html
new file mode 100644
index 0000000..271d9fe
--- /dev/null
+++ b/src/html/errorPage.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+
+<script type="text/javascript">
+function quitProgramm(){
+webkitTest.signalQuitAll();
+}
+
+</script>
+
+</head>
+<body>
+<h1>ERROR</h1>
+
+<p>
+No Internet Connection or Server is down.
+
+
+Please contact your Administrator.
+</p>
+
+<form name="formular">
+ <p>
+ <input type="button" name="quitProgramm_Button" value="quit programm"
+ onclick="quitProgramm()">
+ </p>
+</form>
+
+</body>
+</html>
diff --git a/src/testApp.sh b/src/testApp.sh
new file mode 100755
index 0000000..0995695
--- /dev/null
+++ b/src/testApp.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# This script now needs to have the URL to load as an argument.
+if [ $# = 0 ]; then
+ echo "No URL passed, exiting..."
+ exit
+fi
+# Start QT's virtual framebuffer
+/usr/local/Trolltech/Qt-4.7.1/bin/qvfb -width 800 -height 600 &
+# Wait for it to load (needed?)
+sleep 1
+# Start the fbbrowser app.
+# This requires the fbgui git repository to be in the user's home directory.
+export PATH=~/fbgui/fbbrowser/:$PATH
+fbgui -qws $1
+# Check if fbbrowser is not running, if so kill the qvfb.
+if [ $(ps aux | grep -v grep | grep -c fbgui) -eq 1 ]
+then
+ echo "fbgui is still running ..."
+else
+ echo "fbgui stopped running, killing qvfb ..."
+ killall qvfb
+fi