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