SpeedsXml.qml Example File

qmlf1legends/qml/qmlf1legends/SpeedsXml.qml

  /****************************************************************************
  **
  ** Copyright (C) 2016 The Qt Company Ltd.
  ** Contact: https://www.qt.io/licensing/
  **
  ** This file is part of the Qt Charts module of the Qt Toolkit.
  **
  ** $QT_BEGIN_LICENSE:GPL$
  ** Commercial License Usage
  ** Licensees holding valid commercial Qt licenses may use this file in
  ** accordance with the commercial license agreement provided with the
  ** Software or, alternatively, in accordance with the terms contained in
  ** a written agreement between you and The Qt Company. For licensing terms
  ** and conditions see https://www.qt.io/terms-conditions. For further
  ** information use the contact form at https://www.qt.io/contact-us.
  **
  ** GNU General Public License Usage
  ** Alternatively, this file may be used under the terms of the GNU
  ** General Public License version 3 or (at your option) any later version
  ** approved by the KDE Free Qt Foundation. The licenses are as published by
  ** the Free Software Foundation and appearing in the file LICENSE.GPL3
  ** included in the packaging of this file. Please review the following
  ** information to ensure the GNU General Public License requirements will
  ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
  **
  ** $QT_END_LICENSE$
  **
  ****************************************************************************/

  import QtQuick.XmlListModel 2.0

  XmlListModel {
      // Hard-coded test data
      xml: "0Fittipaldi104.12"
          +"0Stewart106.12"
          +"0Hunt106.12"
          +"1Fittipaldi115.12"
          +"1Stewart114.12"
          +"1Hunt115.12"
          +"2Hunt165.23"
          +"2Fittipaldi175.23"
          +"2Stewart168.23"
          +"3Hunt104.87"
          +"3Fittipaldi104.43"
          +"3Stewart94.83"
          +"4Hunt107.87"
          +"4Fittipaldi111.84"
          +"4Stewart106.84"
          +"5Hunt94.87"
          +"5Stewart92.37"
          +"5Fittipaldi99.37"
          +"6Hunt52.87"
          +"6Fittipaldi42.87"
          +"6Stewart55.87"
          +"7Hunt77.87"
          +"7Fittipaldi72.87"
          +"7Stewart87.87"
          +"8Hunt94.17"
          +"8Fittipaldi98.17"
          +"8Stewart84.17"
          +"9Hunt91.87"
          +"9Fittipaldi71.87"
          +"9Stewart81.87"
          +"10Hunt104.87"
          +"10Fittipaldi115.87"
          +"10Stewart119.87"
          +"11Hunt162.87"
          +"11Fittipaldi155.84"
          +"11Stewart152.84"
          +"12Hunt181.87"
          +"12Fittipaldi161.85"
          +"12Stewart167.85"
          +"13Hunt155.87"
          +"13Fittipaldi154.87"
          +"13Stewart164.87"
          +"14Hunt197.57"
          +"14Fittipaldi187.54"
          +"14Stewart180.54"
          +"15Fittipaldi216.87"
          +"15Hunt207.87"
          +"15Stewart197.87"
          +"16Hunt82.87"
          +"16Fittipaldi79.37"
          +"16Stewart85.37"
          +"17Hunt153.87"
          +"17Fittipaldi143.87"
          +"17Stewart133.87"
          +"18Hunt89.87"
          +"18Fittipaldi95.85"
          +"18Stewart98.85"
          +"19Hunt169.87"
          +"19Stewart167.87"
          +"19Fittipaldi154.87"
          +""
      query: "/results/row"

      XmlRole { name: "speedTrap"; query: "speedTrap/string()" }
      XmlRole { name: "driver"; query: "driver/string()" }
      XmlRole { name: "speed"; query: "speed/string()" }
  }