Warning, /office/alkimia/tests/qmlalkonlinequotetest-qt4.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 1.0 0002 import org.kde.alkimia 1.0 0003 0004 Item { 0005 width: 500 0006 height: 300 0007 0008 AlkOnlineQuote { 0009 id: quote 0010 onError: { 0011 console.log(s) 0012 errorLabel.text = s 0013 } 0014 onStatus: { 0015 console.log(s) 0016 statusLabel.text = s 0017 } 0018 onQuote: { 0019 statusLabel.text = "" 0020 dateLabel.text = "Date: " + date 0021 priceLabel.text = "Price: " + price 0022 } 0023 } 0024 0025 Text { 0026 id: symbolLabel 0027 y: 50 0028 x: 0 0029 text: "Enter Symbol:" 0030 } 0031 TextInput { 0032 y: 50 0033 x: 100 0034 id: symbol 0035 text: "CAD EUR" 0036 //placeholderText: qsTr("Symbol") 0037 } 0038 0039 Text { 0040 id: quoteLabel 0041 y: 80 0042 x: 0 0043 text: "Enter Quote:" 0044 } 0045 TextInput { 0046 y: 80 0047 x: 100 0048 id: source 0049 text: "Alkimia Currency" 0050 //placeholderText: qsTr("Source") 0051 } 0052 0053 Rectangle { 0054 width: 200 0055 height: 30 0056 y: 122 0057 x: 100 0058 color: "lightgray" 0059 MouseArea { 0060 id: mouseArea; 0061 anchors.fill: parent; 0062 0063 onClicked: { 0064 dateLabel.text = "" 0065 priceLabel.text = "" 0066 errorLabel.text = "" 0067 statusLabel.text = "" 0068 quote.launch(symbol.text, "", source.text) 0069 } 0070 } 0071 } 0072 0073 Text { 0074 id: fetchLabel 0075 y: 128 0076 x: 170 0077 text: "Fetch" 0078 } 0079 0080 Text { 0081 id: statusLabel 0082 y: 150 0083 x: 100 0084 } 0085 0086 Text { 0087 id: priceLabel 0088 y: 180 0089 x: 100 0090 } 0091 0092 Text { 0093 id: dateLabel 0094 y: 210 0095 x: 100 0096 } 0097 0098 Text { 0099 id: errorLabel 0100 y: 240 0101 x: 100 0102 } 0103 }