Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

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 for Embedded Linux should be configured with -no-gfx-qvfb in production libraries.

QVFb Skin Format

The files comprising a QVFb skin are placed in a directory with a .skin extension, for example devices/greenphone/Greenphone.skin/ in the Qt Extended source.

The file defining the skin has the same name as the directory containing it - Greenphone.skin in the above example.

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. If only two points are provided they are treated as opposite corners 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 "Down" image.

You can examine Trolltech-Keypad.skin and Trolltech-Touchscreen.skin in $QTDIR/tools/QVFb as examples.

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.

See Keypad Button Behavior for more detailed documentation for defaultbuttons.conf

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 Qt Extended 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 © 2009 Nokia Trademarks
Qt Extended 4.4.3