Warning, /office/alkimia/plasma/applets/ForeignCurrencies/contents/ui/Okno.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick 2.0
0002 import QtQuick.Layouts 1.2
0003 
0004 ColumnLayout {
0005     Layout.minimumWidth:    units.gridUnit * 10
0006     Layout.minimumHeight:   units.gridUnit *  5
0007     Layout.preferredWidth:  units.gridUnit * 20
0008     Layout.preferredHeight: units.gridUnit * 50
0009 
0010     id: root
0011     anchors.fill: parent;
0012 
0013     Component.onCompleted: {
0014         createLines();
0015         }
0016 
0017     Connections {
0018         target: plasmoid.configuration;
0019         onCurrenciesChanged: { createLines(); }
0020         }
0021 
0022     function createLines() {
0023         for (var i=root.children.length-1; i >= 0; i--) {
0024             root.children[i].destroy();
0025             }
0026         var currencies = JSON.parse(plasmoid.configuration.currencies)
0027         currencies.forEach(function (line) {
0028             var component = Qt.createComponent("Currency.qml");
0029             var chart = component.createObject(root, { symbol: line.symbol });
0030             })
0031 
0032         }
0033 }
0034