examples/QtQuick/qmlnetworkinfo/qml/qmlnetworkinfo/mainold.qml

00001 import QtQuick 1.0
00002 import com.nokia.symbian 1.0
00003 import QtMobility.systeminfo 1.1
00004 
00005 Window{
00006     id: window
00007     width: 360
00008     height: 640
00009 
00010     // Network details.
00011     property alias networkdetails:  displayInfo.text
00012 
00013     // Network Info element.
00014     NetworkInfo{
00015         id:myNetworkInfo
00016     }
00017 
00018     // Displays the details of the network information.
00019     TextArea{
00020         id: displayInfo
00021         anchors.topMargin: 10
00022         anchors.top: parent.top
00023         font.pointSize: 8
00024         anchors.left:parent.left
00025         anchors.leftMargin: 10
00026         width: 340
00027         height: 280
00028         readOnly: true
00029         text: {
00030             "Current MCC : " + myNetworkInfo.currentMobileCountryCode + "\n" +
00031              "Cell ID : " + myNetworkInfo.cellId + "\n" +
00032              "Current MNC : " + myNetworkInfo.currentMobileNetworkCode + "\n" +
00033              "Current Mode : " + myNetworkInfo.currentMode + "\n" +
00034              "Network name : " + myNetworkInfo.networkName + "\n" +
00035              "Home MCC : " + myNetworkInfo.homeMobileCountryCode + "\n" +
00036              "Home MNC : " + myNetworkInfo.homeMobileNetworkCode + "\n" +
00037              "Location Area Code : " + myNetworkInfo.locationAreaCode + "\n" +
00038              "Network Status : " + myNetworkInfo.networkStatus + "\n" +
00039              "Network Signal Strength : " + myNetworkInfo.networkSignalStrength
00040         }
00041     }
00042 
00043     // List of options, to send an Sms, setting the senders list of numbers.
00044     Column{
00045         id: optionsList
00046         anchors.top: parent.width > parent.height ? parent.top : displayInfo.bottom
00047         anchors.topMargin: 30
00048         spacing: 10
00049         anchors.left: parent.width > parent.height ? displayInfo.right : parent.left
00050         anchors.leftMargin: 20
00051         anchors.rightMargin: 20
00052         anchors.right: parent.right
00053 
00054         Button{
00055             id: sendSmS
00056             height: 70
00057             width:300
00058             text: "Send SMS"
00059             onClicked:{
00060                 mymessaging.sendMessage(networkdetails, settingWin.num1, settingWin.num2, settingWin.num3);
00061             }
00062         }
00063 
00064         Button{
00065             id: settings
00066             height: 70
00067             width:300
00068             text: "Settings"
00069             onClicked:{
00070                 settingWin.visible = true;
00071             }
00072         }
00073 
00074         Button{
00075             id: exit
00076             height: 70
00077             width:300
00078             text: "Exit"
00079             onClicked:{
00080                 Qt.quit();
00081             }
00082         }
00083     }
00084 
00085     // Message response for the state change of message.
00086     Text{
00087         id: msgResponse;
00088         anchors.bottom: parent.bottom
00089         width: 300
00090         height: 50
00091         visible: false
00092         color: "white"
00093     }
00094 
00095     // Settings window, which is used to enter the sender list numbers.
00096     Settings{ id: settingWin; visible: false; width: parent.width; height: parent.height; anchors.centerIn: parent}
00097 
00098     // Display the state change message for the message sent, when signal is emitted.
00099     Connections{
00100         target: mymessaging
00101         onMsgStatusReceived:{
00102             msgResponse.text = "Response : " + response;
00103             msgResponse.visible = true;
00104         }
00105     }
00106 }
00107 

Generated by  doxygen 1.6.2