2009/09/06

Python appuifw Module - Python Programming

The appuifw module establishes an interface to the Series 60 user interface (UI).

Stucture and Example of Python UI (normal screen)

Different types of the screen

There exist three different screen types, namely:
  • Normal
  • Large
  • Full
import appuifw
appuifw.app.screen='full' 
import appuifw
appuifw.app.screen='normal'
import appuifw
appuifw.app.screen='large' 

Normal/Large/Full

Dialog Query

Single field dialog as query (user interaction requested). The different types of query refer to the expected input value. Following queries exist.
  • text
  • code
  • number
  • date
  • time
  • query
import appuifw
data = appuifw.query(u"Insert a word:", "text")
import appuifw
data = appuifw.query(u"number", "number")
import appuifw
data = appuifw.query(u"date", "date")
import appuifw
data = appuifw.query(u"time", "time")
import appuifw
data = appuifw.query(u"code", "code")
import appuifw
data = appuifw.query(u"query", "query")



text/code/number


date/time/query

Dialog Note

In contrast to the query, the dialog just prompt information on the screen, without that user interaction is needed. The following dialogs are supported:
  • error
  • info
  • conf
Syntax:
appuifw.note(text in the note, type of note)
Examples:
import appuifw
appuifw.note(u"info", "info")
import appuifw
appuifw.note(u"error", "error") 
import appuifw
appuifw.note(u"conf", "conf")

error/info/conf


No comments:

Post a Comment

Share post using share buttons or leave a comment