View Single Post
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#20
Thank you zeta, your input has helped a great deal and it now basically works as I wanted it, now to duplicate this on the homescreen, shouldn't be too hard to do!

Only modifying WeatherDetailsHeader.qml by adding the following;

Code:
        
        DetailItem {
            id: windDirection
            //% "WindDirection"
            label: qsTrId("Wind direction")
            value: {
                if      (model.windDirection==0)    'N'
                else if (model.windDirection==45)   'NE'
                else if (model.windDirection==90)   'E'
                else if (model.windDirection==135)  'SE'
                else if (model.windDirection==180)  'S'
                else if (model.windDirection==225)  'SW'
                else if (model.windDirection==270)  'W'
                else if (model.windDirection==315)  'NW'
            }
        }
Which yields...
Attached Images
   
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..

Last edited by Markkyboy; 2018-04-10 at 15:47.
 

The Following 3 Users Say Thank You to Markkyboy For This Useful Post: