location GSM location information
The location module offers APIs to location information related services. Currently, the location has one function Retrieves GSM location information Mobile Country Code, Mobile Network Code, Location Area Code, and Cell ID. A location area normally consists of several base stations. It is the area where the terminal can move without notifying the network about its exact position. mcc and mnc together form a unique identification number of the network into which the phone is logged.
Basics of appuifw Module
Figure 5.2 shows the layout of a S60 application UI in the normal screen mode and a summary of how it relates to the services available at the appuifw API. For alternative layouts, see Figure 5.3. The main application window may be set up to be occupied by a UI control. A multi-view application can show the different views as tabs in the navigation pane and react as the users navigate between tabs. Dialogs always take precedence over the usual UI controls and appear on top of them. UI controls...
popupmenu
A dialog becomes visible as soon as the corresponding Python function has been called. The function returns with the eventual user input or information on the cancellation of the dialog. Form is an exception it is shown when its execute method is called. The softkeys are managed by the underlying S60 Platform. When no dialog is visible, the right softkey is bound to application exit and the left one represents an Options menu. Python for S60 offers an interface for manipulating the menu and for...
Concurrency Aspects
The thread that initializes the Python interpreter becomes the main Python thread. This is usually the main thread of a UI application. When an application written in Python launches, the Symbian platform infrastructure creates the main UI thread that starts the Python environment. If a Python program is started as a server with e32.start_server, then the Python main thread is not a UI thread. It is possible to launch new threads via the services of thread module. Examples of such situations...
float
The type of the optional initial value parameter and the returned input depend on the value of type For text fields, 'text', 'code' it is Unicode For number fields, it is numeric For date fields, it is seconds since epoch rounded down to the nearest local midnight A simple confirmation query and time query take no initial value and return True None and seconds since local midnight, correspondingly. All queries return None if the users cancel the dialog. For 'float' query the initial value...
Canvas
UI controls appear on the screen as soon as an instance of the corresponding Python type is created and set to the body field app.body of the current application UI. Form is a versatile dialog implemented as a type. The Content_handler type facilitates interfacing to other UI applications and common high-level UI components. It is based on the notion that designated handlers can reduce UI application interaction to operations on MIME-type content. The following dialogs are implemented as...
Highlightshadow
Only one highlight is allowed to be used at once. Therefore, it is possible to combine only one highlight with one or more text styles. These and other similar values and combinations are valid t.style appuifw.STYLE_BOLD t.style appuifw.STYLE_UNDERLINE t.style appuifw.STYLE_ITALIC t.style appuifw.STYLE_STRIKETHROUGH t.style appuifw.STYLE_BOLD appuifw.STYLE_ITALIC appuifw.STYLE_UNDERLINE t.style appuifw.HIGHLIGHT_STANDARD t.style appuifw.HIGHLIGHT_ROUNDED t.style appuifw.HIGHLIGHT_SHADOW This...
sysinfo Access to system information
The sysinfo module offers an API for checking the system information of a S60 mobile device. Note The method ring_type is not available for S60 1st Edition. The sysinfo module has the following functions battery Returns the current battery level ranging from 0 to 100, with 0 meaning that the battery is empty and 100 meaning that the battery is full. Devices based on Symbian 7.0 or earlies battery level is ranged from 0 to 7. If using an emulator, value 0 is always returned. Returns the width...
font
The font of the text. There are two possible ways to set this attribute Using a supported Unicode font, for example uLatin12. Trying to set a font which is not LatinPlainl2 blue C ior style bc d sty Je itoJfc underline Figure 5.5 Examples of the options available for Text type supported by the device has no effect. A list of supported fonts can be retrieved by using t.font ualbi17b sets font to Albi 17 bold t.font uLatinPlain12 sets font to Latin Plain 12 Using one of the default device fonts...
Form Type
Form implements a dynamically configurable, editable multi-field dialog. Form caters for advanced dialog use cases with requirements such as free selectability of the combination of fields, possibility of validating the user input, and automatically producing the contents of some dialog fields before allowing the closing of the dialog. Creates a Form instance. fields is a list of field descriptors label, type , value where label is a Unicode string type is one of the following strings 'text',...
savehook
This attribute can be set to a callable object that receives one argument and returns a Boolean value. It gets called every time the users want to save the contents of an executing Form dialog. A candidate list for new form content - a list representing the currently visible state of the UI - is given as an argument. The list can be modified by save_hook. If save_hook returns True, the candidate list is set as the new contents of the form. Otherwise, the form UI is reset to reflect the field...
multiselectionlist
Figure 5.1 Python for S60 UI environment overview Figure 5.1 Python for S60 UI environment overview Navigation pane apiHiifw.ii pp.ena ble ta acti vate_tab gt Main application window appuifw.app.boily 'Vi ppuif w.c lt lialog_fiMK ti oil gt Left softkey appuif w.app. menu 'Vi ppnifw.app.eHit_h iyjia inller Figure 5.2 The different parts of the screen when using the 'normal' layout T A Xifibc Python 2.2.2 ttO, Mar 23 2005, 14 01 19 C on symbian_s60 Type copyright, credits or license for more...


