Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded

Customizing a Skin for QVFB

Introduction

This document explains how to customize the QVFB skin for a specific project.

The virtual framebuffer is located in $QTDIR/tools/qvfb.

QVFB is a development tool only. No security issues have been considered in the virtual framebuffer design. It should not be used in a production environment and QT_NO_QWS_VFB should always be defined in production libraries.

Understanding the .skin File

The .skin file consists of the following:

Coordinates

The coordinates are a list of at least 2 points in a clockwise order that define a shape for the button. Two points are treated as opposite edges of a rectangle. Any click inside the points will be treated as a click on that button. While pressed, the pixels for the button are redrawn from the "activated" skin.

You can examine SmartPhone.skin and SmartPhone2.skin in $QTDIR/tools/QVFB to get an idea of how it all works.

defaultbuttons.conf

You can also include a defaultbuttons.conf file. This file customizes the launch screen applications and the ordering of the soft keys. There are also input method hints in this file.

Specifying Screen Size Independent of Skin

QVFB allows the screen size to be specified independently of the skin. For example, you can use the SmartPhone.skin but specify a screen size of 240x320 pixels. The skin (if command-line arguments are used) or screen (if Configure is used) will be scaled accordingly. For example:

 QVFB -skin SmartPhone.skin -width 240 -height 320 -zoom 0.7 

The above example uses the SmartPhone.skin (screen area 176x208 skin pixels) but with a 240x320 pixel virtual framebuffer (ie. what Qtopia draws to). The screen is scaled down by 0.7 resulting in a display that is a smooth-scaled 168x224 pixels.

Note that the SmartPhone.skin is 176x208, not 3:4 which means that 3:4 pixel screens are slightly distorted (but still pixel-correct).


Copyright © 2001-2005 Trolltech Trademarks
Qtopia version 2.1.1