qtosg viewer added gui thread functions