examples/QtQuick/callinfo/qml/callinfo/main.qml

00001 import QtQuick 1.0
00002 import com.nokia.symbian 1.0
00003 
00004 // Main window of the example.
00005 ApplicationWindow {
00006     id:mainwindow
00007 
00008     ToolBarLayout {
00009         id: commonTools
00010         ToolButton {
00011             flat: true
00012             iconSource: "toolbar_back.svg"
00013             onClicked: Qt.quit()
00014         }
00015         ToolButton {
00016             flat: true
00017             iconSource: "toolbar_options.svg"
00018         }
00019     }
00020 
00021     Page{
00022         id: page
00023         tools: commonTools
00024         anchors.fill: parent
00025 
00026         // Call status and Call info windows are added in a row.
00027         Row{
00028             width: parent.width
00029             height: parent.height
00030             Rectangle{
00031                 width: parent.width/2
00032                 height: parent.height
00033                 color: "black"
00034 
00035                 // Label for call status.
00036                 Text{
00037                     width: 200
00038                     height: 50
00039                     text: "Call Status"
00040                     color: "white"
00041                 }
00042 
00043                 // List view to update the call status information.
00044                 ListView {
00045                     id: callStatusView
00046                     width: parent.width
00047                     height: parent.height
00048                     y:50
00049                     model: callStatusModel
00050                     delegate: Text { text: callStatus; color: "white" }
00051                     ListModel { id: callStatusModel }
00052                 }
00053             }
00054 
00055             Rectangle{
00056                 width: parent.width/2
00057                 height: parent.height
00058                 color: "black"
00059 
00060                 // Label for call info.
00061                 Text{
00062                     width: 200
00063                     height: 50
00064                     text: "Call Info"
00065                     color: "white"
00066                 }
00067 
00068                 // List view to update the call information.
00069                 ListView {
00070                     id: callInfoView
00071                     width: parent.width
00072                     height: parent.height
00073                     y:50
00074                     model: callInfoModel
00075                     delegate: Text { text: callInfo; color: "white" }
00076                     ListModel { id: callInfoModel }
00077                 }
00078             }
00079         }
00080 
00081     }
00082 
00083     Component.onCompleted: pageStack.push(page)
00084     // On receiving connections from callinfo object.
00085     Connections {
00086         target: callinfo
00087         onUpdateCallStatus: {
00088             callStatusModel.append({'callStatus': info})
00089         }
00090         onUpdateCallInfo: {
00091             callInfoModel.append({'callInfo': info})
00092         }
00093     }
00094 }
00095 
00096 

Generated by  doxygen 1.6.2