--- /dev/null
+#!/usr/env/python
+
+from PySide import QtCore, QtGui, QtDeclarative
+from gotovienna.utils import *
+from gotovienna.realtime import *
+
+import urllib2
+import os
+import sys
+
+
+class Gui(QtCore.QObject):
+ @QtCore.Slot(str, str)
+ def search(self, line, station):
+ line = line.upper()
+ station = station.decode('utf-8')
+ print line, station
+
+ itip = ITipParser()
+ print itip.lines
+ if not line in itip.lines:
+ return "Invalid line"
+
+ try:
+ stations = sorted(itip.get_stations(line).items())
+ print stations
+ headers, stations = zip(*stations)
+ print headers
+ print stations
+ details = [(direction, name, url) for direction, stops in stations
+ for name, url in stops if match_station(station, name)]
+ print details
+ except urllib2.URLError as e:
+ print e.message
+ return e.message
+
+if __name__ == '__main__':
+ app = QtGui.QApplication(sys.argv)
+
+ view = QtDeclarative.QDeclarativeView()
+
+ # instantiate the Python object
+ itip = Gui()
+
+ # expose the object to QML
+ context = view.rootContext()
+ context.setContextProperty("itip", itip)
+
+ view.setSource(os.path.join(os.path.dirname(__file__), 'qml/main.qml'))
+ view.showFullScreen()
+
+ sys.exit(app.exec_())
+
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="80px" height="80px" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve">
-<g id="DO_NOT_EDIT_-_BOUNDING_BOX">
- <rect id="BOUNDING_BOX" fill="none" width="80" height="80"/>
-</g>
-<g id="PLACE_YOUR_BACKGROUND_HERE">
- <g id="INDIVIDUAL_BACKGROUND_1_">
- <defs>
- <path id="CLIPPING_PATH__x28_MASK_x29__2_" d="M79,40c0,28.893-10.105,39-39,39S1,68.893,1,40C1,11.106,11.105,1,40,1 S79,11.106,79,40z"/>
- </defs>
- <clipPath id="CLIPPING_PATH__x28_MASK_x29__1_">
- <use xlink:href="#CLIPPING_PATH__x28_MASK_x29__2_" overflow="visible"/>
- </clipPath>
- <rect id="INVISIVLE_PATH_2_" clip-path="url(#CLIPPING_PATH__x28_MASK_x29__1_)" fill="none" width="80" height="80"/>
- </g>
-</g>
-<g id="PLACE_YOUR_GLYPH_HERE">
-</g>
-<g id="DO_NOT_EDIT_-_FOCAL_ZONE_GUIDES">
-</g>
-<g id="DO_NOT_EDIT_-_HIGHLIGHT">
- <defs>
- <filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="1.023" y="1" width="77.953" height="78">
- <feFlood style="flood-color:white;flood-opacity:1" result="back"/>
- <feBlend in="SourceGraphic" in2="back" mode="normal"/>
- </filter>
- </defs>
- <mask maskUnits="userSpaceOnUse" x="1.023" y="1" width="77.953" height="78" id="OVERLAY_2_">
- <g filter="url(#Adobe_OpacityMaskFilter)">
- <defs>
- <filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="1.023" y="1" width="77.953" height="78">
- <feFlood style="flood-color:white;flood-opacity:1" result="back"/>
- <feBlend in="SourceGraphic" in2="back" mode="normal"/>
- </filter>
- </defs>
- <mask maskUnits="userSpaceOnUse" x="1.023" y="1" width="77.953" height="78" id="OVERLAY_2_">
- <g filter="url(#Adobe_OpacityMaskFilter_1_)">
- </g>
- </mask>
- <linearGradient id="OVERLAY_3_" gradientUnits="userSpaceOnUse" x1="39.9995" y1="5.1816" x2="39.9995" y2="58.8019">
- <stop offset="0" style="stop-color:#FFFFFF"/>
- <stop offset="1" style="stop-color:#D6D6D6"/>
- </linearGradient>
- <path id="OVERLAY_4_" mask="url(#OVERLAY_2_)" fill="url(#OVERLAY_3_)" d="M78.977,40c0,28.893-10.1,39-38.977,39 S1.023,68.893,1.023,40c0-28.894,10.1-39,38.977-39S78.977,11.106,78.977,40z"/>
- </g>
- </mask>
- <linearGradient id="OVERLAY_5_" gradientUnits="userSpaceOnUse" x1="39.9995" y1="5.1816" x2="39.9995" y2="58.8019">
- <stop offset="0" style="stop-color:#FFFFFF"/>
- <stop offset="1" style="stop-color:#000000"/>
- </linearGradient>
- <path id="OVERLAY_1_" opacity="0.5" fill="url(#OVERLAY_5_)" d="M78.977,40c0,28.893-10.1,39-38.977,39S1.023,68.893,1.023,40 c0-28.894,10.1-39,38.977-39S78.977,11.106,78.977,40z"/>
- <defs>
- <filter id="Adobe_OpacityMaskFilter_2_" filterUnits="userSpaceOnUse" x="1" y="1" width="78" height="78">
- <feFlood style="flood-color:white;flood-opacity:1" result="back"/>
- <feBlend in="SourceGraphic" in2="back" mode="normal"/>
- </filter>
- </defs>
- <mask maskUnits="userSpaceOnUse" x="1" y="1" width="78" height="78" id="HIGHLIGHT_2_">
- <g filter="url(#Adobe_OpacityMaskFilter_2_)">
- <defs>
- <filter id="Adobe_OpacityMaskFilter_3_" filterUnits="userSpaceOnUse" x="1" y="1" width="78" height="78">
- <feFlood style="flood-color:white;flood-opacity:1" result="back"/>
- <feBlend in="SourceGraphic" in2="back" mode="normal"/>
- </filter>
- </defs>
- <mask maskUnits="userSpaceOnUse" x="1" y="1" width="78" height="78" id="HIGHLIGHT_2_">
- <g filter="url(#Adobe_OpacityMaskFilter_3_)">
- </g>
- </mask>
- <linearGradient id="HIGHLIGHT_3_" gradientUnits="userSpaceOnUse" x1="39.9995" y1="1.2471" x2="39.9995" y2="78.5111">
- <stop offset="0" style="stop-color:#FFFFFF"/>
- <stop offset="1" style="stop-color:#000000"/>
- </linearGradient>
- <path id="HIGHLIGHT_4_" mask="url(#HIGHLIGHT_2_)" fill="url(#HIGHLIGHT_3_)" d="M39.999,1C11.105,1,1,11.106,1,40 c0,28.893,10.105,39,38.999,39C68.896,79,79,68.893,79,40C79,11.106,68.896,1,39.999,1z M39.999,78.025 C11.57,78.025,1.976,68.43,1.976,40c0-28.429,9.595-38.024,38.023-38.024c28.43,0,38.024,9.596,38.024,38.024 C78.023,68.43,68.429,78.025,39.999,78.025z"/>
- </g>
- </mask>
- <linearGradient id="HIGHLIGHT_5_" gradientUnits="userSpaceOnUse" x1="39.9995" y1="1.2471" x2="39.9995" y2="78.5111">
- <stop offset="0" style="stop-color:#FFFFFF"/>
- <stop offset="1" style="stop-color:#FFFFFF"/>
- </linearGradient>
- <path id="HIGHLIGHT_1_" opacity="0.25" fill="url(#HIGHLIGHT_5_)" d="M39.999,1C11.105,1,1,11.106,1,40 c0,28.893,10.105,39,38.999,39C68.896,79,79,68.893,79,40C79,11.106,68.896,1,39.999,1z M39.999,78.025 C11.57,78.025,1.976,68.43,1.976,40c0-28.429,9.595-38.024,38.023-38.024c28.43,0,38.024,9.596,38.024,38.024 C78.023,68.43,68.429,78.025,39.999,78.025z"/>
-</g>
-</svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="80"
- height="80"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.1 r9760"
- sodipodi:docname="gotovienna_qml.svg"
- inkscape:export-filename="/home/kelvan/workspace/python/pyqt/gotoVienna/gotovienna/gotovienna_qml/gotovienna_qml64.png"
- inkscape:export-xdpi="72"
- inkscape:export-ydpi="72">
- <defs
- id="defs4">
- <linearGradient
- inkscape:collect="always"
- xlink:href="#OVERLAY_5_"
- id="linearGradient3526"
- gradientUnits="userSpaceOnUse"
- x1="39.9995"
- y1="5.1816001"
- x2="39.9995"
- y2="58.801899" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#HIGHLIGHT_5_"
- id="linearGradient3528"
- gradientUnits="userSpaceOnUse"
- x1="39.9995"
- y1="1.2471"
- x2="39.9995"
- y2="78.511101" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="3.959798"
- inkscape:cx="-35.155313"
- inkscape:cy="17.438846"
- inkscape:document-units="px"
- inkscape:current-layer="layer2"
- showgrid="false"
- inkscape:window-width="1440"
- inkscape:window-height="843"
- inkscape:window-x="0"
- inkscape:window-y="26"
- inkscape:window-maximized="1"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- showguides="true"
- inkscape:guide-bbox="true" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-55.714287,-24.108724)">
- <g
- inkscape:groupmode="layer"
- id="layer2"
- inkscape:label="Layer">
- <g
- id="g3418"
- transform="translate(55.714287,24.108724)">
- <g
- id="DO_NOT_EDIT_-_HIGHLIGHT">
- <defs
- id="defs3346">
- <filter
- height="78"
- width="77.953003"
- y="1"
- x="1.023"
- filterUnits="userSpaceOnUse"
- id="Adobe_OpacityMaskFilter"
- color-interpolation-filters="sRGB">
- <feFlood
- id="feFlood3349"
- result="back" />
-
- <feBlend
- id="feBlend3351"
- mode="normal"
- in2="back"
- in="SourceGraphic" />
-
- </filter>
-
- </defs>
-
- <mask
- id="OVERLAY_2_"
- height="78"
- width="77.953"
- y="1"
- x="1.023"
- maskUnits="userSpaceOnUse">
- <g
- id="g3354"
- style="filter:url(#Adobe_OpacityMaskFilter)">
- <defs
- id="defs3356">
- <filter
- height="78"
- width="77.953003"
- y="1"
- x="1.023"
- filterUnits="userSpaceOnUse"
- id="Adobe_OpacityMaskFilter_1_"
- color-interpolation-filters="sRGB">
- <feFlood
- id="feFlood3359"
- result="back" />
-
- <feBlend
- id="feBlend3361"
- mode="normal"
- in2="back"
- in="SourceGraphic" />
-
- </filter>
-
- </defs>
-
- <mask
- id="mask3363"
- height="78"
- width="77.953"
- y="1"
- x="1.023"
- maskUnits="userSpaceOnUse">
- <g
- id="g3365"
- style="filter:url(#Adobe_OpacityMaskFilter_1_)">
- </g>
-
- </mask>
-
- <linearGradient
- y2="58.801899"
- x2="39.9995"
- y1="5.1816001"
- x1="39.9995"
- gradientUnits="userSpaceOnUse"
- id="OVERLAY_3_">
- <stop
- id="stop3368"
- style="stop-color:#FFFFFF"
- offset="0" />
-
- <stop
- id="stop3370"
- style="stop-color:#D6D6D6"
- offset="1" />
-
- </linearGradient>
-
- <path
- d="M 78.977,40 C 78.977,68.893 68.877,79 40,79 11.123,79 1.023,68.893 1.023,40 1.023,11.106 11.123,1 40,1 68.877,1 78.977,11.106 78.977,40 z"
- mask="url(#OVERLAY_2_)"
- id="OVERLAY_4_"
- inkscape:connector-curvature="0"
- style="fill:url(#OVERLAY_3_)" />
-
- </g>
-
- </mask>
-
- <linearGradient
- y2="58.801899"
- x2="39.9995"
- y1="5.1816001"
- x1="39.9995"
- gradientUnits="userSpaceOnUse"
- id="OVERLAY_5_">
- <stop
- id="stop3374"
- style="stop-color:#c8c8c8;stop-opacity:1;"
- offset="0" />
-
- <stop
- id="stop3376"
- style="stop-color:#000000;stop-opacity:1;"
- offset="1" />
-
- </linearGradient>
-
- <path
- d="M 78.977,40 C 78.977,68.893 68.877,79 40,79 11.123,79 1.023,68.893 1.023,40 1.023,11.106 11.123,1 40,1 68.877,1 78.977,11.106 78.977,40 z"
- id="OVERLAY_1_"
- inkscape:connector-curvature="0"
- style="opacity:0.5;fill:url(#linearGradient3526)" />
-
- <defs
- id="defs3379">
- <filter
- height="78"
- width="78"
- y="1"
- x="1"
- filterUnits="userSpaceOnUse"
- id="Adobe_OpacityMaskFilter_2_"
- color-interpolation-filters="sRGB">
- <feFlood
- id="feFlood3382"
- result="back" />
-
- <feBlend
- id="feBlend3384"
- mode="normal"
- in2="back"
- in="SourceGraphic" />
-
- </filter>
-
- </defs>
-
- <mask
- id="HIGHLIGHT_2_"
- height="78"
- width="78"
- y="1"
- x="1"
- maskUnits="userSpaceOnUse">
- <g
- id="g3387"
- style="filter:url(#Adobe_OpacityMaskFilter_2_)">
- <defs
- id="defs3389">
- <filter
- height="78"
- width="78"
- y="1"
- x="1"
- filterUnits="userSpaceOnUse"
- id="Adobe_OpacityMaskFilter_3_"
- color-interpolation-filters="sRGB">
- <feFlood
- id="feFlood3392"
- result="back" />
-
- <feBlend
- id="feBlend3394"
- mode="normal"
- in2="back"
- in="SourceGraphic" />
-
- </filter>
-
- </defs>
-
- <mask
- id="mask3396"
- height="78"
- width="78"
- y="1"
- x="1"
- maskUnits="userSpaceOnUse">
- <g
- id="g3398"
- style="filter:url(#Adobe_OpacityMaskFilter_3_)">
- </g>
-
- </mask>
-
- <linearGradient
- y2="78.511101"
- x2="39.9995"
- y1="1.2471"
- x1="39.9995"
- gradientUnits="userSpaceOnUse"
- id="HIGHLIGHT_3_">
- <stop
- id="stop3401"
- style="stop-color:#FFFFFF"
- offset="0" />
-
- <stop
- id="stop3403"
- style="stop-color:#000000"
- offset="1" />
-
- </linearGradient>
-
- <path
- d="M 39.999,1 C 11.105,1 1,11.106 1,40 1,68.893 11.105,79 39.999,79 68.896,79 79,68.893 79,40 79,11.106 68.896,1 39.999,1 z m 0,77.025 C 11.57,78.025 1.976,68.43 1.976,40 c 0,-28.429 9.595,-38.024 38.023,-38.024 28.43,0 38.024,9.596 38.024,38.024 0,28.43 -9.594,38.025 -38.024,38.025 z"
- mask="url(#HIGHLIGHT_2_)"
- id="HIGHLIGHT_4_"
- inkscape:connector-curvature="0"
- style="fill:url(#HIGHLIGHT_3_)" />
-
- </g>
-
- </mask>
-
- <linearGradient
- y2="78.511101"
- x2="39.9995"
- y1="1.2471"
- x1="39.9995"
- gradientUnits="userSpaceOnUse"
- id="HIGHLIGHT_5_">
- <stop
- id="stop3407"
- style="stop-color:#FFFFFF"
- offset="0" />
-
- <stop
- id="stop3409"
- style="stop-color:#FFFFFF"
- offset="1" />
-
- </linearGradient>
-
- <path
- d="M 39.999,1 C 11.105,1 1,11.106 1,40 1,68.893 11.105,79 39.999,79 68.896,79 79,68.893 79,40 79,11.106 68.896,1 39.999,1 z m 0,77.025 C 11.57,78.025 1.976,68.43 1.976,40 c 0,-28.429 9.595,-38.024 38.023,-38.024 28.43,0 38.024,9.596 38.024,38.024 0,28.43 -9.594,38.025 -38.024,38.025 z"
- id="HIGHLIGHT_1_"
- inkscape:connector-curvature="0"
- style="opacity:0.25;fill:url(#linearGradient3528)" />
-
-</g>
- <g
- id="DO_NOT_EDIT_-_BOUNDING_BOX">
- <rect
- height="80"
- width="80"
- id="BOUNDING_BOX"
- x="0"
- y="0"
- style="fill:none" />
-
-</g>
- <g
- id="PLACE_YOUR_BACKGROUND_HERE">
- <g
- id="INDIVIDUAL_BACKGROUND_1_">
- <defs
- id="defs3336">
- <path
- d="M 79,40 C 79,68.893 68.895,79 40,79 11.105,79 1,68.893 1,40 1,11.106 11.105,1 40,1 68.895,1 79,11.106 79,40 z"
- id="CLIPPING_PATH__x28_MASK_x29__2_"
- inkscape:connector-curvature="0" />
-
- </defs>
-
- <clipPath
- id="CLIPPING_PATH__x28_MASK_x29__1_">
- <use
- id="use3340"
- overflow="visible"
- xlink:href="#CLIPPING_PATH__x28_MASK_x29__2_"
- style="overflow:visible"
- x="0"
- y="0"
- width="1"
- height="1" />
-
- </clipPath>
-
- <rect
- height="80"
- width="80"
- clip-path="url(#CLIPPING_PATH__x28_MASK_x29__1_)"
- id="INVISIVLE_PATH_2_"
- x="0"
- y="0"
- style="fill:none" />
-
- </g>
-
-</g>
- <g
- id="PLACE_YOUR_GLYPH_HERE">
-</g>
- <g
- id="DO_NOT_EDIT_-_FOCAL_ZONE_GUIDES">
-</g>
- </g>
- </g>
- <text
- xml:space="preserve"
- style="font-size:24px;font-style:normal;font-weight:normal;line-height:69.99999881%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
- x="61.164482"
- y="66.636955"
- id="text2985"
- sodipodi:linespacing="69.999999%"><tspan
- sodipodi:role="line"
- id="tspan2987"
- x="61.164482"
- y="66.636955"
- dy="0 -5.48"
- dx="0 0"><tspan
- style="font-size:40px;line-height:69.99999881%;fill:#e30014;fill-opacity:0.94117647"
- id="tspan2989"
- dy="5.48"
- dx="0"
- rotate="0 0">g</tspan><tspan
- style="font-size:28px;fill:#ffffff;fill-opacity:1"
- id="tspan3267">oto</tspan></tspan><tspan
- sodipodi:role="line"
- x="61.164482"
- y="81.240646"
- dy="0 0 0 0 0 -0.02"
- dx="0 0 0 0 0 0"
- id="tspan3005"
- style="font-size:16px;line-height:69.99999881%"> </tspan></text>
- <text
- xml:space="preserve"
- style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
- x="84.401787"
- y="81.042397"
- id="text3263"
- sodipodi:linespacing="125%"><tspan
- sodipodi:role="line"
- id="tspan3265"
- x="84.401787"
- y="81.042397"
- style="font-size:14px;fill:#ffffff;fill-opacity:1">vienna</tspan></text>
- <text
- xml:space="preserve"
- style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
- x="41.289986"
- y="81.858124"
- id="text3269"
- sodipodi:linespacing="125%"><tspan
- sodipodi:role="line"
- id="tspan3271"
- x="41.289986"
- y="81.858124" /></text>
- </g>
-</svg>
+++ /dev/null
-#include <QtGui/QApplication>
-#include "qmlapplicationviewer.h"
-
-Q_DECL_EXPORT int main(int argc, char *argv[])
-{
- QScopedPointer<QApplication> app(createApplication(argc, argv));
- QScopedPointer<QmlApplicationViewer> viewer(QmlApplicationViewer::create());
-
- viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer->setMainQmlFile(QLatin1String("qml/gotovienna_qml/main.qml"));
- viewer->showExpanded();
-
- return app->exec();
-}
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-.pragma library
-
-/* Margins */
-var INDENT_DEFAULT = 16;
-var CORNER_MARGINS = 22;
-var MARGIN_DEFAULT = 0;
-var MARGIN_XLARGE = 16;
-
-// ListDelegate
-var LIST_ITEM_MARGIN = 18
-var LIST_ITEM_SPACING = 18
-var LIST_ITEM_HEIGHT = 88
-var LIST_ICON_SIZE = 64
-var LIST_TILE_SIZE = 26
-var LIST_TITLE_COLOR = "#282828"
-var LIST_TITLE_COLOR_INVERTED = "#ffffff"
-var LIST_SUBTILE_SIZE = 22
-var LIST_SUBTITLE_COLOR = "#505050"
-var LIST_SUBTITLE_COLOR_INVERTED = "#d2d2d2"
-
-/* Font properties */
-var FONT_FAMILY = "Nokia Pure Text";
-var FONT_FAMILY_BOLD = "Nokia Pure Text Bold";
-var FONT_FAMILY_LIGHT = "Nokia Pure Text Light";
-var FONT_DEFAULT_SIZE = 24;
-var FONT_LIGHT_SIZE = 22;
-
-/* TUMBLER properties */
-var TUMBLER_COLOR_TEXT = "#FFFFFF";
-var TUMBLER_COLOR_LABEL = "#8C8C8C";
-var TUMBLER_COLOR = "#000000";
-var TUMBLER_OPACITY_FULL = 1.0;
-var TUMBLER_OPACITY = 0.4;
-var TUMBLER_OPACITY_LOW = 0.1;
-var TUMBLER_FLICK_VELOCITY = 700;
-var TUMBLER_ROW_HEIGHT = 64;
-var TUMBLER_LABEL_HEIGHT = 54;
-var TUMBLER_MARGIN = 16;
-var TUMBLER_BORDER_MARGIN = 1;
-var TUMBLER_WIDTH = 344;
-var TUMBLER_HEIGHT_PORTRAIT = 256;
-var TUMBLER_HEIGHT_LANDSCAPE = 192;
-
-/* Button styles */
-// Normal
-var COLOR_BUTTON_FOREGROUND = "#191919"; // Text color
-var COLOR_BUTTON_SECONDARY_FOREGROUND = "#8c8c8c"; // Pressed
-var COLOR_BUTTON_DISABLED_FOREGROUND = "#b2b2b4"; // Disabled
-// Inverted
-var COLOR_BUTTON_INVERTED_FOREGROUND = "#FFFFFF";
-var COLOR_BUTTON_INVERTED_SECONDARY_FOREGROUND = "#8c8c8c"; // Pressed
-var COLOR_BUTTON_INVERTED_DISABLED_FOREGROUND = "#f5f5f5"; // Disabled
-
-var SIZE_BUTTON = 51;
-var SIZE_SMALL_BUTTON = 43;
-var WIDTH_SMALL_BUTTON = 122;
-var WIDTH_TUMBLER_BUTTON = 222;
-
-var FONT_BOLD_BUTTON = true;
-
-var INFO_BANNER_OPACITY = 0.9
-var INFO_BANNER_LETTER_SPACING = -1.2
+++ /dev/null
-import QtQuick 1.1
-import com.nokia.meego 1.0
-import "UIConstants.js" as UIConstants
-import "ExtrasConstants.js" as ExtrasConstants
-
-Page {
- tools: commonTools
-
- TextField {
- placeholderText: 'Line'
-
- id: gline
- anchors {
- top: parent.top
- left: parent.left
- topMargin: 20
- leftMargin: 10
- rightMargin: 10
- }
- width: parent.width - 20
-
- MouseArea {
- anchors.fill: parent
- drag.target: gline
- drag.axis: Drag.YAxis
- drag.minimumY: 0
- drag.maximumY: parent.height
- }
- }
-
- TextField {
- placeholderText: 'Station'
- id: gstation
- anchors {
- top: gline.bottom
- left: parent.left
- right: parent.right
- topMargin: 10
- leftMargin: 10
- rightMargin: 10
- }
- }
-
- ResultRealtime { id: resu }
-
- Button {
- id: btnSearch
- text: 'Search'
- anchors {
- top: gstation.bottom
- topMargin: 10
- horizontalCenter: parent.horizontalCenter
- }
- onClicked: {
- resu.gline = gline.text
- resu.gstation = gstation.text
- pageStack.push(resu)
- itip.search(gline.text, gstation.text)
- resu.busy = false
- }
- }
-}
-
+++ /dev/null
-import QtQuick 1.1
-import com.nokia.meego 1.0
-import com.nokia.extras 1.0
-import "UIConstants.js" as UIConstants
-import "ExtrasConstants.js" as ExtrasConstants
-
-Page {
- tools: commonTools
-
- property string gline : ""
- property string gstation : ""
- property bool busy : true
-
- Component {
- id: departureDelegate
-
- Item {
- width: parent.width
- height: 80
-
- BorderImage {
- anchors.fill: parent
- visible: mouseArea.pressed
- source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-pressed-vertical-center': 'image://theme/meegotouch-list-background-pressed-vertical-center'
- }
-
- Item {
- anchors.fill: parent
- anchors.margins: UIConstants.DEFAULT_MARGIN
-
- Row {
- Text {
- id: l
- text: line // <----
- anchors.verticalCenter: parent.verticalCenter
- width: 70
- font.pixelSize: UIConstants.FONT_XLARGE
- font.bold: true
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
- }
-
- Column {
- anchors.verticalCenter: parent.verticalCenter
-
- Text {
- id: s
- text: station // <----
- width: 75
- font.pixelSize: UIConstants.FONT_LARGE
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
- }
-
- Text {
- id: d
- text: destination // <----
- color: !theme.inverted ? UIConstants.COLOR_SECONDARY_FOREGROUND : UIConstants.COLOR_INVERTED_SECONDARY_FOREGROUND
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- font.pixelSize: UIConstants.FONT_LSMALL
- }
- }
- }
- }
-
- Column {
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- Text {
- id: dep
- // FIXME strange int float transformation appears
- text: departure
- anchors.right: parent.right
- anchors.rightMargin: UIConstants.DEFAULT_MARGIN
- font.bold: true
- font.pixelSize: UIConstants.FONT_XLARGE
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
- }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- console.debug("clicked: " + l.text)
- }
- }
- }
- }
-
- Component {
- id: heading
- Rectangle {
- width: parent.width
- height: childrenRect.height + 2*UIConstants.DEFAULT_MARGIN
- color: "lightsteelblue"
-
- Text {
- anchors {
- top: parent.top
- left: parent.left
- margins: UIConstants.DEFAULT_MARGIN
- }
-
- text: gstation + " [" + gline + "]"
- font.bold: true
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- font.pixelSize: UIConstants.FONT_LSMALL
- }
- }
- }
-
- ListView {
- id: list
- width: parent.width; height: parent.height
-
- header: heading
-
- model: ListModel {
- ListElement {
- line: "N60"
- station: "Schottentor"
- destination: "Maurer Hauptplatz"
- departure: 5
- }
- ListElement {
- line: "N38"
- station: "Schottentor"
- destination: "Grinzing"
- departure: 7
- }
- ListElement {
- line: "N25"
- station: "Schottentor"
- destination: "Großfeldsiedlung"
- departure: 8
- }
- ListElement {
- line: "N41"
- station: "Schottentor"
- destination: "Pötzleinsdorf"
- departure: 12
- }
- ListElement {
- line: "N43"
- station: "Schottentor"
- destination: "Neuwaldegg"
- departure: 12
- }
- ListElement {
- line: "N66"
- station: "Schottentor"
- destination: "Liesing S"
- departure: 20
- }
- ListElement {
- line: "N38"
- station: "Schottentor"
- destination: "Grinzing"
- departure: 22
- }
- ListElement {
- line: "N25"
- station: "Schottentor"
- destination: "Großfeldsiedlung"
- departure: 35
- }
- ListElement {
- line: "N60"
- station: "Schottentor"
- destination: "Maurer Hauptplatz"
- departure: 35
- }
- ListElement {
- line: "N38"
- station: "Schottentor"
- destination: "Grinzing"
- departure: 37
- }
- ListElement {
- line: "N41"
- station: "Schottentor"
- destination: "Pötzleinsdorf"
- departure: "03:12"
- }
- ListElement {
- line: "N43"
- station: "Schottentor"
- destination: "Neuwaldegg"
- departure: 42
- }
- ListElement {
- line: "N66"
- station: "Schottentor"
- destination: "Liesing S"
- departure: 50
- }
- ListElement {
- line: "N38"
- station: "Schottentor"
- destination: "Grinzing"
- departure: 52
- }
- }
- delegate: departureDelegate
- }
-
- ScrollDecorator {
- id: scrolldecorator
- flickableItem: list
- platformStyle: ScrollDecoratorStyle {}
- }
-
- BusyIndicator {
- id: busyIndicator
- visible: busy
- running: true
- platformStyle: BusyIndicatorStyle { size: 'large' }
- anchors.centerIn: parent
- }
-}
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-.pragma library
-
-var FONT_FAMILY = "Nokia Pure Text";
-var FONT_DEFAULT_SIZE = 24; // DEPRECATED
-
-var FONT_XLARGE = 32;
-var FONT_LARGE = 28;
-var FONT_SLARGE = 26;
-var FONT_DEFAULT = 24;
-var FONT_LSMALL = 22;
-var FONT_SMALL = 20;
-var FONT_XSMALL = 18;
-var FONT_XXSMALL = 16;
-
-var COLOR_FOREGROUND = "#191919"; // Text color
-var COLOR_SECONDARY_FOREGROUND = "#a6a8ab"; // Secondary text
-var COLOR_BACKGROUND = "#E0E1E2"; // Background
-var COLOR_SELECT = "#4591ff"; //Selected item background
-
-var COLOR_INVERTED_FOREGROUND = "#ffffff"; // Text color
-var COLOR_INVERTED_SECONDARY_FOREGROUND = "#8c8c8c"; // Secondary text
-var COLOR_INVERTED_BACKGROUND = "#000000"; // Background
-
-var COLOR_DISABLED_FOREGROUND = "#b2b2b4";
-
-var COLOR_BUTTON_FOREGROUND = "#000000" //text color
-var COLOR_BUTTON_INVERTED_FOREGROUND = "#ffffff" //inverted text color
-var COLOR_BUTTON_SECONDARY_FOREGROUND = "#8c8c8c" //secondary text
-var COLOR_BUTTON_DISABLED_FOREGROUND = "#B2B2B4" //disabled text
-var COLOR_BUTTON_BACKGROUND = "#000000" //background
-
-var SIZE_ICON_DEFAULT = 32;
-var SIZE_ICON_LARGE = 48;
-
-var CORNER_MARGINS = 22;
-
-var MARGIN_DEFAULT = 0;
-var MARGIN_XLARGE = 16;
-
-// Distance in pixels from the widget bounding box inside which a release
-// event would still be accepted and trigger the widget
-var RELEASE_MISS_DELTA = 30;
-
-var OPACITY_ENABLED = 1.0;
-var OPACITY_DISABLED = 0.5;
-var SIZE_BUTTON = 64;
-
-var PADDING_XSMALL = 2;
-var PADDING_SMALL = 4;
-var PADDING_MEDIUM = 6;
-var PADDING_LARGE = 8;
-var PADDING_DOUBLE = 12;
-var PADDING_XLARGE = 16;
-var PADDING_XXLARGE = 24;
-
-var SCROLLDECORATOR_SHORT_MARGIN = 8;
-var SCROLLDECORATOR_LONG_MARGIN = 4;
-
-var TOUCH_EXPANSION_MARGIN = -4;
-
-var BUTTON_WIDTH = 322;
-var BUTTON_HEIGHT = 51;
-var BUTTON_LABEL_MARGIN = 10;
-
-var FIELD_DEFAULT_HEIGHT = 52;
-
-//Common UI layouts
-var DEFAULT_MARGIN = 16;
-var BUTTON_SPACING = 6;
-var HEADER_DEFAULT_HEIGHT_PORTRAIT = 72;
-var HEADER_DEFAULT_HEIGHT_LANDSCAPE = 46;
-var HEADER_DEFAULT_TOP_SPACING_PORTRAIT = 20;
-var HEADER_DEFAULT_BOTTOM_SPACING_PORTRAIT = 20;
-var HEADER_DEFAULT_TOP_SPACING_LANDSCAPE = 16;
-var HEADER_DEFAULT_BOTTOM_SPACING_LANDSCAPE = 14;
-var LIST_ITEM_HEIGHT_SMALL = 64;
-var LIST_ITEM_HEIGHT_DEFAULT = 80;
-
-
+++ /dev/null
-import QtQuick 1.1
-import com.nokia.meego 1.0
-
-PageStackWindow {
- id: appWindow
-
- initialPage: mainPage
-
- MainPage {
- id: mainPage
- }
-
- ToolBarLayout {
- id: commonTools
- visible: true
- ToolIcon {
- platformIconId: "toolbar-view-menu"
- anchors.right: (parent === undefined) ? undefined : parent.right
- onClicked: (menu.status == DialogStatus.Closed) ? menu.open() : menu.close()
- }
- ToolIcon {
- enabled: appWindow.pageStack.depth > 1
- platformIconId: enabled ? "icon-m-toolbar-back" : "icon-m-toolbar-back-dimmed"
- anchors.left: parent.left
- onClicked: pageStack.pop()
- }
- }
-
- Menu {
- id: menu
- visualParent: pageStack
- MenuLayout {
- MenuItem { text: "Test"; onClicked: pageStack.push(Qt.resolvedUrl("test.qml")) }
- }
- }
-}
+++ /dev/null
-import QtQuick 1.1
-import com.nokia.meego 1.0
-import com.nokia.extras 1.0
-import "UIConstants.js" as UIConstants
-import "ExtrasConstants.js" as ExtrasConstants
-
-Page {
- tools: commonTools
-
- Component {
- id: departureDelegate
-
- Item {
- width: parent.width
- height: 80
-
- BorderImage {
- anchors.fill: parent
- visible: mouseArea.pressed
- source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-pressed-vertical-center': 'image://theme/meegotouch-list-background-pressed-vertical-center'
- }
-
- Item {
- anchors.fill: parent
- anchors.margins: UIConstants.DEFAULT_MARGIN
-
- Row {
- Text {
- id: l
- text: line // <----
- anchors.verticalCenter: parent.verticalCenter
- width: 70
- font.pixelSize: UIConstants.FONT_XLARGE
- font.bold: true
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
- }
-
- Column {
- anchors.verticalCenter: parent.verticalCenter
-
- Text {
- id: s
- text: station // <----
- width: 75
- font.pixelSize: UIConstants.FONT_LARGE
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
- }
-
- Text {
- id: d
- text: destination // <----
- color: !theme.inverted ? UIConstants.COLOR_SECONDARY_FOREGROUND : UIConstants.COLOR_INVERTED_SECONDARY_FOREGROUND
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- font.pixelSize: UIConstants.FONT_LSMALL
- }
- }
- }
- }
-
- Column {
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- Text {
- id: dep
- // FIXME strange int float transformation appears
- text: departure
- anchors.right: parent.right
- anchors.rightMargin: UIConstants.DEFAULT_MARGIN
- font.bold: true
- font.pixelSize: UIConstants.FONT_XLARGE
- font.family: ExtrasConstants.FONT_FAMILY_LIGHT
- color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
- }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- console.debug("clicked: " + l.text)
- }
- }
- }
- }
-
- ListView {
- id: list
- width: parent.width; height: parent.height
-
- model: ListModel {
- ListElement {
- line: "N60"
- station: "Schottentor"
- destination: "Maurer Hauptplatz"
- departure: 5
- }
- ListElement {
- line: "N38"
- station: "Schottentor"
- destination: "Grinzing"
- departure: 7
- }
- ListElement {
- line: "N25"
- station: "Schottentor"
- destination: "Großfeldsiedlung"
- departure: 8
- }
- ListElement {
- line: "N41"
- station: "Schottentor"
- destination: "Pötzleinsdorf"
- departure: 12
- }
- ListElement {
- line: "N43"
- station: "Schottentor"
- destination: "Neuwaldegg"
- departure: 12
- }
- ListElement {
- line: "N66"
- station: "Schottentor"
- destination: "Liesing S"
- departure: 20
- }
- ListElement {
- line: "N38"
- station: "Schottentor"
- destination: "Grinzing"
- departure: 22
- }
- ListElement {
- line: "N25"
- station: "Schottentor"
- destination: "Großfeldsiedlung"
- departure: 35
- }
- ListElement {
- line: "N60"
- station: "Schottentor"
- destination: "Maurer Hauptplatz"
- departure: 35
- }
- ListElement {
- line: "N38"
- station: "Schottentor"
- destination: "Grinzing"
- departure: 37
- }
- ListElement {
- line: "N41"
- station: "Schottentor"
- destination: "Pötzleinsdorf"
- departure: "03:12"
- }
- ListElement {
- line: "N43"
- station: "Schottentor"
- destination: "Neuwaldegg"
- departure: 42
- }
- ListElement {
- line: "N66"
- station: "Schottentor"
- destination: "Liesing S"
- departure: 50
- }
- ListElement {
- line: "N38"
- station: "Schottentor"
- destination: "Grinzing"
- departure: 52
- }
- }
- delegate: departureDelegate
- }
-
- ScrollDecorator {
- id: scrolldecorator
- flickableItem: list
- platformStyle: ScrollDecoratorStyle {}
- }
-
- BusyIndicator {
- id: busyIndicator
- visible: true
- running: true
- platformStyle: BusyIndicatorStyle { size: 'large' }
- anchors.centerIn: parent
- }
-}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="80px" height="80px" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve">
+<g id="DO_NOT_EDIT_-_BOUNDING_BOX">
+ <rect id="BOUNDING_BOX" fill="none" width="80" height="80"/>
+</g>
+<g id="PLACE_YOUR_BACKGROUND_HERE">
+ <g id="INDIVIDUAL_BACKGROUND_1_">
+ <defs>
+ <path id="CLIPPING_PATH__x28_MASK_x29__2_" d="M79,40c0,28.893-10.105,39-39,39S1,68.893,1,40C1,11.106,11.105,1,40,1 S79,11.106,79,40z"/>
+ </defs>
+ <clipPath id="CLIPPING_PATH__x28_MASK_x29__1_">
+ <use xlink:href="#CLIPPING_PATH__x28_MASK_x29__2_" overflow="visible"/>
+ </clipPath>
+ <rect id="INVISIVLE_PATH_2_" clip-path="url(#CLIPPING_PATH__x28_MASK_x29__1_)" fill="none" width="80" height="80"/>
+ </g>
+</g>
+<g id="PLACE_YOUR_GLYPH_HERE">
+</g>
+<g id="DO_NOT_EDIT_-_FOCAL_ZONE_GUIDES">
+</g>
+<g id="DO_NOT_EDIT_-_HIGHLIGHT">
+ <defs>
+ <filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="1.023" y="1" width="77.953" height="78">
+ <feFlood style="flood-color:white;flood-opacity:1" result="back"/>
+ <feBlend in="SourceGraphic" in2="back" mode="normal"/>
+ </filter>
+ </defs>
+ <mask maskUnits="userSpaceOnUse" x="1.023" y="1" width="77.953" height="78" id="OVERLAY_2_">
+ <g filter="url(#Adobe_OpacityMaskFilter)">
+ <defs>
+ <filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="1.023" y="1" width="77.953" height="78">
+ <feFlood style="flood-color:white;flood-opacity:1" result="back"/>
+ <feBlend in="SourceGraphic" in2="back" mode="normal"/>
+ </filter>
+ </defs>
+ <mask maskUnits="userSpaceOnUse" x="1.023" y="1" width="77.953" height="78" id="OVERLAY_2_">
+ <g filter="url(#Adobe_OpacityMaskFilter_1_)">
+ </g>
+ </mask>
+ <linearGradient id="OVERLAY_3_" gradientUnits="userSpaceOnUse" x1="39.9995" y1="5.1816" x2="39.9995" y2="58.8019">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#D6D6D6"/>
+ </linearGradient>
+ <path id="OVERLAY_4_" mask="url(#OVERLAY_2_)" fill="url(#OVERLAY_3_)" d="M78.977,40c0,28.893-10.1,39-38.977,39 S1.023,68.893,1.023,40c0-28.894,10.1-39,38.977-39S78.977,11.106,78.977,40z"/>
+ </g>
+ </mask>
+ <linearGradient id="OVERLAY_5_" gradientUnits="userSpaceOnUse" x1="39.9995" y1="5.1816" x2="39.9995" y2="58.8019">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#000000"/>
+ </linearGradient>
+ <path id="OVERLAY_1_" opacity="0.5" fill="url(#OVERLAY_5_)" d="M78.977,40c0,28.893-10.1,39-38.977,39S1.023,68.893,1.023,40 c0-28.894,10.1-39,38.977-39S78.977,11.106,78.977,40z"/>
+ <defs>
+ <filter id="Adobe_OpacityMaskFilter_2_" filterUnits="userSpaceOnUse" x="1" y="1" width="78" height="78">
+ <feFlood style="flood-color:white;flood-opacity:1" result="back"/>
+ <feBlend in="SourceGraphic" in2="back" mode="normal"/>
+ </filter>
+ </defs>
+ <mask maskUnits="userSpaceOnUse" x="1" y="1" width="78" height="78" id="HIGHLIGHT_2_">
+ <g filter="url(#Adobe_OpacityMaskFilter_2_)">
+ <defs>
+ <filter id="Adobe_OpacityMaskFilter_3_" filterUnits="userSpaceOnUse" x="1" y="1" width="78" height="78">
+ <feFlood style="flood-color:white;flood-opacity:1" result="back"/>
+ <feBlend in="SourceGraphic" in2="back" mode="normal"/>
+ </filter>
+ </defs>
+ <mask maskUnits="userSpaceOnUse" x="1" y="1" width="78" height="78" id="HIGHLIGHT_2_">
+ <g filter="url(#Adobe_OpacityMaskFilter_3_)">
+ </g>
+ </mask>
+ <linearGradient id="HIGHLIGHT_3_" gradientUnits="userSpaceOnUse" x1="39.9995" y1="1.2471" x2="39.9995" y2="78.5111">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#000000"/>
+ </linearGradient>
+ <path id="HIGHLIGHT_4_" mask="url(#HIGHLIGHT_2_)" fill="url(#HIGHLIGHT_3_)" d="M39.999,1C11.105,1,1,11.106,1,40 c0,28.893,10.105,39,38.999,39C68.896,79,79,68.893,79,40C79,11.106,68.896,1,39.999,1z M39.999,78.025 C11.57,78.025,1.976,68.43,1.976,40c0-28.429,9.595-38.024,38.023-38.024c28.43,0,38.024,9.596,38.024,38.024 C78.023,68.43,68.429,78.025,39.999,78.025z"/>
+ </g>
+ </mask>
+ <linearGradient id="HIGHLIGHT_5_" gradientUnits="userSpaceOnUse" x1="39.9995" y1="1.2471" x2="39.9995" y2="78.5111">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#FFFFFF"/>
+ </linearGradient>
+ <path id="HIGHLIGHT_1_" opacity="0.25" fill="url(#HIGHLIGHT_5_)" d="M39.999,1C11.105,1,1,11.106,1,40 c0,28.893,10.105,39,38.999,39C68.896,79,79,68.893,79,40C79,11.106,68.896,1,39.999,1z M39.999,78.025 C11.57,78.025,1.976,68.43,1.976,40c0-28.429,9.595-38.024,38.023-38.024c28.43,0,38.024,9.596,38.024,38.024 C78.023,68.43,68.429,78.025,39.999,78.025z"/>
+</g>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="80"
+ height="80"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="gotovienna_qml.svg"
+ inkscape:export-filename="/home/kelvan/workspace/python/pyqt/gotoVienna/gotovienna/gotovienna_qml/gotovienna_qml64.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72">
+ <defs
+ id="defs4">
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#OVERLAY_5_"
+ id="linearGradient3526"
+ gradientUnits="userSpaceOnUse"
+ x1="39.9995"
+ y1="5.1816001"
+ x2="39.9995"
+ y2="58.801899" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#HIGHLIGHT_5_"
+ id="linearGradient3528"
+ gradientUnits="userSpaceOnUse"
+ x1="39.9995"
+ y1="1.2471"
+ x2="39.9995"
+ y2="78.511101" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="3.959798"
+ inkscape:cx="-35.155313"
+ inkscape:cy="17.438846"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ inkscape:window-width="1440"
+ inkscape:window-height="843"
+ inkscape:window-x="0"
+ inkscape:window-y="26"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-55.714287,-24.108724)">
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Layer">
+ <g
+ id="g3418"
+ transform="translate(55.714287,24.108724)">
+ <g
+ id="DO_NOT_EDIT_-_HIGHLIGHT">
+ <defs
+ id="defs3346">
+ <filter
+ height="78"
+ width="77.953003"
+ y="1"
+ x="1.023"
+ filterUnits="userSpaceOnUse"
+ id="Adobe_OpacityMaskFilter"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ id="feFlood3349"
+ result="back" />
+
+ <feBlend
+ id="feBlend3351"
+ mode="normal"
+ in2="back"
+ in="SourceGraphic" />
+
+ </filter>
+
+ </defs>
+
+ <mask
+ id="OVERLAY_2_"
+ height="78"
+ width="77.953"
+ y="1"
+ x="1.023"
+ maskUnits="userSpaceOnUse">
+ <g
+ id="g3354"
+ style="filter:url(#Adobe_OpacityMaskFilter)">
+ <defs
+ id="defs3356">
+ <filter
+ height="78"
+ width="77.953003"
+ y="1"
+ x="1.023"
+ filterUnits="userSpaceOnUse"
+ id="Adobe_OpacityMaskFilter_1_"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ id="feFlood3359"
+ result="back" />
+
+ <feBlend
+ id="feBlend3361"
+ mode="normal"
+ in2="back"
+ in="SourceGraphic" />
+
+ </filter>
+
+ </defs>
+
+ <mask
+ id="mask3363"
+ height="78"
+ width="77.953"
+ y="1"
+ x="1.023"
+ maskUnits="userSpaceOnUse">
+ <g
+ id="g3365"
+ style="filter:url(#Adobe_OpacityMaskFilter_1_)">
+ </g>
+
+ </mask>
+
+ <linearGradient
+ y2="58.801899"
+ x2="39.9995"
+ y1="5.1816001"
+ x1="39.9995"
+ gradientUnits="userSpaceOnUse"
+ id="OVERLAY_3_">
+ <stop
+ id="stop3368"
+ style="stop-color:#FFFFFF"
+ offset="0" />
+
+ <stop
+ id="stop3370"
+ style="stop-color:#D6D6D6"
+ offset="1" />
+
+ </linearGradient>
+
+ <path
+ d="M 78.977,40 C 78.977,68.893 68.877,79 40,79 11.123,79 1.023,68.893 1.023,40 1.023,11.106 11.123,1 40,1 68.877,1 78.977,11.106 78.977,40 z"
+ mask="url(#OVERLAY_2_)"
+ id="OVERLAY_4_"
+ inkscape:connector-curvature="0"
+ style="fill:url(#OVERLAY_3_)" />
+
+ </g>
+
+ </mask>
+
+ <linearGradient
+ y2="58.801899"
+ x2="39.9995"
+ y1="5.1816001"
+ x1="39.9995"
+ gradientUnits="userSpaceOnUse"
+ id="OVERLAY_5_">
+ <stop
+ id="stop3374"
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0" />
+
+ <stop
+ id="stop3376"
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="1" />
+
+ </linearGradient>
+
+ <path
+ d="M 78.977,40 C 78.977,68.893 68.877,79 40,79 11.123,79 1.023,68.893 1.023,40 1.023,11.106 11.123,1 40,1 68.877,1 78.977,11.106 78.977,40 z"
+ id="OVERLAY_1_"
+ inkscape:connector-curvature="0"
+ style="opacity:0.5;fill:url(#linearGradient3526)" />
+
+ <defs
+ id="defs3379">
+ <filter
+ height="78"
+ width="78"
+ y="1"
+ x="1"
+ filterUnits="userSpaceOnUse"
+ id="Adobe_OpacityMaskFilter_2_"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ id="feFlood3382"
+ result="back" />
+
+ <feBlend
+ id="feBlend3384"
+ mode="normal"
+ in2="back"
+ in="SourceGraphic" />
+
+ </filter>
+
+ </defs>
+
+ <mask
+ id="HIGHLIGHT_2_"
+ height="78"
+ width="78"
+ y="1"
+ x="1"
+ maskUnits="userSpaceOnUse">
+ <g
+ id="g3387"
+ style="filter:url(#Adobe_OpacityMaskFilter_2_)">
+ <defs
+ id="defs3389">
+ <filter
+ height="78"
+ width="78"
+ y="1"
+ x="1"
+ filterUnits="userSpaceOnUse"
+ id="Adobe_OpacityMaskFilter_3_"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ id="feFlood3392"
+ result="back" />
+
+ <feBlend
+ id="feBlend3394"
+ mode="normal"
+ in2="back"
+ in="SourceGraphic" />
+
+ </filter>
+
+ </defs>
+
+ <mask
+ id="mask3396"
+ height="78"
+ width="78"
+ y="1"
+ x="1"
+ maskUnits="userSpaceOnUse">
+ <g
+ id="g3398"
+ style="filter:url(#Adobe_OpacityMaskFilter_3_)">
+ </g>
+
+ </mask>
+
+ <linearGradient
+ y2="78.511101"
+ x2="39.9995"
+ y1="1.2471"
+ x1="39.9995"
+ gradientUnits="userSpaceOnUse"
+ id="HIGHLIGHT_3_">
+ <stop
+ id="stop3401"
+ style="stop-color:#FFFFFF"
+ offset="0" />
+
+ <stop
+ id="stop3403"
+ style="stop-color:#000000"
+ offset="1" />
+
+ </linearGradient>
+
+ <path
+ d="M 39.999,1 C 11.105,1 1,11.106 1,40 1,68.893 11.105,79 39.999,79 68.896,79 79,68.893 79,40 79,11.106 68.896,1 39.999,1 z m 0,77.025 C 11.57,78.025 1.976,68.43 1.976,40 c 0,-28.429 9.595,-38.024 38.023,-38.024 28.43,0 38.024,9.596 38.024,38.024 0,28.43 -9.594,38.025 -38.024,38.025 z"
+ mask="url(#HIGHLIGHT_2_)"
+ id="HIGHLIGHT_4_"
+ inkscape:connector-curvature="0"
+ style="fill:url(#HIGHLIGHT_3_)" />
+
+ </g>
+
+ </mask>
+
+ <linearGradient
+ y2="78.511101"
+ x2="39.9995"
+ y1="1.2471"
+ x1="39.9995"
+ gradientUnits="userSpaceOnUse"
+ id="HIGHLIGHT_5_">
+ <stop
+ id="stop3407"
+ style="stop-color:#FFFFFF"
+ offset="0" />
+
+ <stop
+ id="stop3409"
+ style="stop-color:#FFFFFF"
+ offset="1" />
+
+ </linearGradient>
+
+ <path
+ d="M 39.999,1 C 11.105,1 1,11.106 1,40 1,68.893 11.105,79 39.999,79 68.896,79 79,68.893 79,40 79,11.106 68.896,1 39.999,1 z m 0,77.025 C 11.57,78.025 1.976,68.43 1.976,40 c 0,-28.429 9.595,-38.024 38.023,-38.024 28.43,0 38.024,9.596 38.024,38.024 0,28.43 -9.594,38.025 -38.024,38.025 z"
+ id="HIGHLIGHT_1_"
+ inkscape:connector-curvature="0"
+ style="opacity:0.25;fill:url(#linearGradient3528)" />
+
+</g>
+ <g
+ id="DO_NOT_EDIT_-_BOUNDING_BOX">
+ <rect
+ height="80"
+ width="80"
+ id="BOUNDING_BOX"
+ x="0"
+ y="0"
+ style="fill:none" />
+
+</g>
+ <g
+ id="PLACE_YOUR_BACKGROUND_HERE">
+ <g
+ id="INDIVIDUAL_BACKGROUND_1_">
+ <defs
+ id="defs3336">
+ <path
+ d="M 79,40 C 79,68.893 68.895,79 40,79 11.105,79 1,68.893 1,40 1,11.106 11.105,1 40,1 68.895,1 79,11.106 79,40 z"
+ id="CLIPPING_PATH__x28_MASK_x29__2_"
+ inkscape:connector-curvature="0" />
+
+ </defs>
+
+ <clipPath
+ id="CLIPPING_PATH__x28_MASK_x29__1_">
+ <use
+ id="use3340"
+ overflow="visible"
+ xlink:href="#CLIPPING_PATH__x28_MASK_x29__2_"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1" />
+
+ </clipPath>
+
+ <rect
+ height="80"
+ width="80"
+ clip-path="url(#CLIPPING_PATH__x28_MASK_x29__1_)"
+ id="INVISIVLE_PATH_2_"
+ x="0"
+ y="0"
+ style="fill:none" />
+
+ </g>
+
+</g>
+ <g
+ id="PLACE_YOUR_GLYPH_HERE">
+</g>
+ <g
+ id="DO_NOT_EDIT_-_FOCAL_ZONE_GUIDES">
+</g>
+ </g>
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;line-height:69.99999881%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="61.164482"
+ y="66.636955"
+ id="text2985"
+ sodipodi:linespacing="69.999999%"><tspan
+ sodipodi:role="line"
+ id="tspan2987"
+ x="61.164482"
+ y="66.636955"
+ dy="0 -5.48"
+ dx="0 0"><tspan
+ style="font-size:40px;line-height:69.99999881%;fill:#e30014;fill-opacity:0.94117647"
+ id="tspan2989"
+ dy="5.48"
+ dx="0"
+ rotate="0 0">g</tspan><tspan
+ style="font-size:28px;fill:#ffffff;fill-opacity:1"
+ id="tspan3267">oto</tspan></tspan><tspan
+ sodipodi:role="line"
+ x="61.164482"
+ y="81.240646"
+ dy="0 0 0 0 0 -0.02"
+ dx="0 0 0 0 0 0"
+ id="tspan3005"
+ style="font-size:16px;line-height:69.99999881%"> </tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="84.401787"
+ y="81.042397"
+ id="text3263"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3265"
+ x="84.401787"
+ y="81.042397"
+ style="font-size:14px;fill:#ffffff;fill-opacity:1">vienna</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="41.289986"
+ y="81.858124"
+ id="text3269"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3271"
+ x="41.289986"
+ y="81.858124" /></text>
+ </g>
+</svg>
+++ /dev/null
-#!/usr/env/python
-
-from PySide import QtCore, QtGui, QtDeclarative
-from gotovienna.utils import *
-from gotovienna.realtime import *
-import urllib2
-
-
-class Gui(QtCore.QObject):
- @QtCore.Slot(str, str)
- def search(self, line, station):
- line = line.upper()
- station = station.decode('utf-8')
- print line, station
-
- itip = ITipParser()
- print itip.lines
- if not line in itip.lines:
- return "Invalid line"
-
- try:
- stations = sorted(itip.get_stations(line).items())
- print stations
- headers, stations = zip(*stations)
- print headers
- print stations
- details = [(direction, name, url) for direction, stops in stations
- for name, url in stops if match_station(station, name)]
- print details
- except urllib2.URLError as e:
- print e.message
- return e.message
-
-if __name__ == '__main__':
- import sys
-
- app = QtGui.QApplication(sys.argv)
-
- view = QtDeclarative.QDeclarativeView()
-
- # instantiate the Python object
- itip = Gui()
-
- # expose the object to QML
- context = view.rootContext()
- context.setContextProperty("itip", itip)
-
- view.setSource(QtCore.QUrl('gotovienna/qml/main.qml'))
- view.show()
-
- sys.exit(app.exec_())
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Components project.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+.pragma library
+
+/* Margins */
+var INDENT_DEFAULT = 16;
+var CORNER_MARGINS = 22;
+var MARGIN_DEFAULT = 0;
+var MARGIN_XLARGE = 16;
+
+// ListDelegate
+var LIST_ITEM_MARGIN = 18
+var LIST_ITEM_SPACING = 18
+var LIST_ITEM_HEIGHT = 88
+var LIST_ICON_SIZE = 64
+var LIST_TILE_SIZE = 26
+var LIST_TITLE_COLOR = "#282828"
+var LIST_TITLE_COLOR_INVERTED = "#ffffff"
+var LIST_SUBTILE_SIZE = 22
+var LIST_SUBTITLE_COLOR = "#505050"
+var LIST_SUBTITLE_COLOR_INVERTED = "#d2d2d2"
+
+/* Font properties */
+var FONT_FAMILY = "Nokia Pure Text";
+var FONT_FAMILY_BOLD = "Nokia Pure Text Bold";
+var FONT_FAMILY_LIGHT = "Nokia Pure Text Light";
+var FONT_DEFAULT_SIZE = 24;
+var FONT_LIGHT_SIZE = 22;
+
+/* TUMBLER properties */
+var TUMBLER_COLOR_TEXT = "#FFFFFF";
+var TUMBLER_COLOR_LABEL = "#8C8C8C";
+var TUMBLER_COLOR = "#000000";
+var TUMBLER_OPACITY_FULL = 1.0;
+var TUMBLER_OPACITY = 0.4;
+var TUMBLER_OPACITY_LOW = 0.1;
+var TUMBLER_FLICK_VELOCITY = 700;
+var TUMBLER_ROW_HEIGHT = 64;
+var TUMBLER_LABEL_HEIGHT = 54;
+var TUMBLER_MARGIN = 16;
+var TUMBLER_BORDER_MARGIN = 1;
+var TUMBLER_WIDTH = 344;
+var TUMBLER_HEIGHT_PORTRAIT = 256;
+var TUMBLER_HEIGHT_LANDSCAPE = 192;
+
+/* Button styles */
+// Normal
+var COLOR_BUTTON_FOREGROUND = "#191919"; // Text color
+var COLOR_BUTTON_SECONDARY_FOREGROUND = "#8c8c8c"; // Pressed
+var COLOR_BUTTON_DISABLED_FOREGROUND = "#b2b2b4"; // Disabled
+// Inverted
+var COLOR_BUTTON_INVERTED_FOREGROUND = "#FFFFFF";
+var COLOR_BUTTON_INVERTED_SECONDARY_FOREGROUND = "#8c8c8c"; // Pressed
+var COLOR_BUTTON_INVERTED_DISABLED_FOREGROUND = "#f5f5f5"; // Disabled
+
+var SIZE_BUTTON = 51;
+var SIZE_SMALL_BUTTON = 43;
+var WIDTH_SMALL_BUTTON = 122;
+var WIDTH_TUMBLER_BUTTON = 222;
+
+var FONT_BOLD_BUTTON = true;
+
+var INFO_BANNER_OPACITY = 0.9
+var INFO_BANNER_LETTER_SPACING = -1.2
--- /dev/null
+import QtQuick 1.1
+import com.nokia.meego 1.0
+import "UIConstants.js" as UIConstants
+import "ExtrasConstants.js" as ExtrasConstants
+
+Page {
+ tools: commonTools
+
+ Image {
+ id: logo
+ source: 'logo.png'
+
+ anchors {
+ topMargin: 25
+ top: parent.top
+ horizontalCenter: parent.horizontalCenter
+ }
+ }
+
+ TextField {
+ placeholderText: 'Line'
+
+ id: gline
+ anchors {
+ top: logo.bottom
+ left: parent.left
+ topMargin: 20
+ leftMargin: 10
+ rightMargin: 10
+ }
+ width: parent.width - 20
+
+ MouseArea {
+ anchors.fill: parent
+ drag.target: gline
+ drag.axis: Drag.YAxis
+ drag.minimumY: 0
+ drag.maximumY: parent.height
+ }
+ }
+
+ TextField {
+ placeholderText: 'Station'
+ id: gstation
+ anchors {
+ top: gline.bottom
+ left: parent.left
+ right: parent.right
+ topMargin: 10
+ leftMargin: 10
+ rightMargin: 10
+ }
+ }
+
+ ResultRealtime { id: resu }
+
+ Button {
+ id: btnSearch
+ text: 'Search'
+ anchors {
+ top: gstation.bottom
+ topMargin: 10
+ horizontalCenter: parent.horizontalCenter
+ }
+ onClicked: {
+ resu.gline = gline.text
+ resu.gstation = gstation.text
+ pageStack.push(resu)
+ itip.search(gline.text, gstation.text)
+ resu.busy = false
+ }
+ }
+}
+
--- /dev/null
+import QtQuick 1.1
+import com.nokia.meego 1.0
+import com.nokia.extras 1.0
+import "UIConstants.js" as UIConstants
+import "ExtrasConstants.js" as ExtrasConstants
+
+Page {
+ tools: commonTools
+
+ property string gline : ""
+ property string gstation : ""
+ property bool busy : true
+
+ Component {
+ id: departureDelegate
+
+ Item {
+ width: parent.width
+ height: 80
+
+ BorderImage {
+ anchors.fill: parent
+ visible: mouseArea.pressed
+ source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-pressed-vertical-center': 'image://theme/meegotouch-list-background-pressed-vertical-center'
+ }
+
+ Item {
+ anchors.fill: parent
+ anchors.margins: UIConstants.DEFAULT_MARGIN
+
+ Row {
+ Text {
+ id: l
+ text: line // <----
+ anchors.verticalCenter: parent.verticalCenter
+ width: 70
+ font.pixelSize: UIConstants.FONT_XLARGE
+ font.bold: true
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
+ }
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+
+ Text {
+ id: s
+ text: station // <----
+ width: 75
+ font.pixelSize: UIConstants.FONT_LARGE
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
+ }
+
+ Text {
+ id: d
+ text: destination // <----
+ color: !theme.inverted ? UIConstants.COLOR_SECONDARY_FOREGROUND : UIConstants.COLOR_INVERTED_SECONDARY_FOREGROUND
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ font.pixelSize: UIConstants.FONT_LSMALL
+ }
+ }
+ }
+ }
+
+ Column {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ Text {
+ id: dep
+ // FIXME strange int float transformation appears
+ text: departure
+ anchors.right: parent.right
+ anchors.rightMargin: UIConstants.DEFAULT_MARGIN
+ font.bold: true
+ font.pixelSize: UIConstants.FONT_XLARGE
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: {
+ console.debug("clicked: " + l.text)
+ }
+ }
+ }
+ }
+
+ Component {
+ id: heading
+ Rectangle {
+ width: parent.width
+ height: childrenRect.height + 2*UIConstants.DEFAULT_MARGIN
+ color: "lightsteelblue"
+
+ Text {
+ anchors {
+ top: parent.top
+ left: parent.left
+ margins: UIConstants.DEFAULT_MARGIN
+ }
+
+ text: gstation + " [" + gline + "]"
+ font.bold: true
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ font.pixelSize: UIConstants.FONT_LSMALL
+ }
+ }
+ }
+
+ ListView {
+ id: list
+ width: parent.width; height: parent.height
+
+ header: heading
+
+ model: ListModel {
+ ListElement {
+ line: "N60"
+ station: "Schottentor"
+ destination: "Maurer Hauptplatz"
+ departure: 5
+ }
+ ListElement {
+ line: "N38"
+ station: "Schottentor"
+ destination: "Grinzing"
+ departure: 7
+ }
+ ListElement {
+ line: "N25"
+ station: "Schottentor"
+ destination: "Großfeldsiedlung"
+ departure: 8
+ }
+ ListElement {
+ line: "N41"
+ station: "Schottentor"
+ destination: "Pötzleinsdorf"
+ departure: 12
+ }
+ ListElement {
+ line: "N43"
+ station: "Schottentor"
+ destination: "Neuwaldegg"
+ departure: 12
+ }
+ ListElement {
+ line: "N66"
+ station: "Schottentor"
+ destination: "Liesing S"
+ departure: 20
+ }
+ ListElement {
+ line: "N38"
+ station: "Schottentor"
+ destination: "Grinzing"
+ departure: 22
+ }
+ ListElement {
+ line: "N25"
+ station: "Schottentor"
+ destination: "Großfeldsiedlung"
+ departure: 35
+ }
+ ListElement {
+ line: "N60"
+ station: "Schottentor"
+ destination: "Maurer Hauptplatz"
+ departure: 35
+ }
+ ListElement {
+ line: "N38"
+ station: "Schottentor"
+ destination: "Grinzing"
+ departure: 37
+ }
+ ListElement {
+ line: "N41"
+ station: "Schottentor"
+ destination: "Pötzleinsdorf"
+ departure: "03:12"
+ }
+ ListElement {
+ line: "N43"
+ station: "Schottentor"
+ destination: "Neuwaldegg"
+ departure: 42
+ }
+ ListElement {
+ line: "N66"
+ station: "Schottentor"
+ destination: "Liesing S"
+ departure: 50
+ }
+ ListElement {
+ line: "N38"
+ station: "Schottentor"
+ destination: "Grinzing"
+ departure: 52
+ }
+ }
+ delegate: departureDelegate
+ }
+
+ ScrollDecorator {
+ id: scrolldecorator
+ flickableItem: list
+ platformStyle: ScrollDecoratorStyle {}
+ }
+
+ BusyIndicator {
+ id: busyIndicator
+ visible: busy
+ running: true
+ platformStyle: BusyIndicatorStyle { size: 'large' }
+ anchors.centerIn: parent
+ }
+}
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Components project.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+.pragma library
+
+var FONT_FAMILY = "Nokia Pure Text";
+var FONT_DEFAULT_SIZE = 24; // DEPRECATED
+
+var FONT_XLARGE = 32;
+var FONT_LARGE = 28;
+var FONT_SLARGE = 26;
+var FONT_DEFAULT = 24;
+var FONT_LSMALL = 22;
+var FONT_SMALL = 20;
+var FONT_XSMALL = 18;
+var FONT_XXSMALL = 16;
+
+var COLOR_FOREGROUND = "#191919"; // Text color
+var COLOR_SECONDARY_FOREGROUND = "#a6a8ab"; // Secondary text
+var COLOR_BACKGROUND = "#E0E1E2"; // Background
+var COLOR_SELECT = "#4591ff"; //Selected item background
+
+var COLOR_INVERTED_FOREGROUND = "#ffffff"; // Text color
+var COLOR_INVERTED_SECONDARY_FOREGROUND = "#8c8c8c"; // Secondary text
+var COLOR_INVERTED_BACKGROUND = "#000000"; // Background
+
+var COLOR_DISABLED_FOREGROUND = "#b2b2b4";
+
+var COLOR_BUTTON_FOREGROUND = "#000000" //text color
+var COLOR_BUTTON_INVERTED_FOREGROUND = "#ffffff" //inverted text color
+var COLOR_BUTTON_SECONDARY_FOREGROUND = "#8c8c8c" //secondary text
+var COLOR_BUTTON_DISABLED_FOREGROUND = "#B2B2B4" //disabled text
+var COLOR_BUTTON_BACKGROUND = "#000000" //background
+
+var SIZE_ICON_DEFAULT = 32;
+var SIZE_ICON_LARGE = 48;
+
+var CORNER_MARGINS = 22;
+
+var MARGIN_DEFAULT = 0;
+var MARGIN_XLARGE = 16;
+
+// Distance in pixels from the widget bounding box inside which a release
+// event would still be accepted and trigger the widget
+var RELEASE_MISS_DELTA = 30;
+
+var OPACITY_ENABLED = 1.0;
+var OPACITY_DISABLED = 0.5;
+var SIZE_BUTTON = 64;
+
+var PADDING_XSMALL = 2;
+var PADDING_SMALL = 4;
+var PADDING_MEDIUM = 6;
+var PADDING_LARGE = 8;
+var PADDING_DOUBLE = 12;
+var PADDING_XLARGE = 16;
+var PADDING_XXLARGE = 24;
+
+var SCROLLDECORATOR_SHORT_MARGIN = 8;
+var SCROLLDECORATOR_LONG_MARGIN = 4;
+
+var TOUCH_EXPANSION_MARGIN = -4;
+
+var BUTTON_WIDTH = 322;
+var BUTTON_HEIGHT = 51;
+var BUTTON_LABEL_MARGIN = 10;
+
+var FIELD_DEFAULT_HEIGHT = 52;
+
+//Common UI layouts
+var DEFAULT_MARGIN = 16;
+var BUTTON_SPACING = 6;
+var HEADER_DEFAULT_HEIGHT_PORTRAIT = 72;
+var HEADER_DEFAULT_HEIGHT_LANDSCAPE = 46;
+var HEADER_DEFAULT_TOP_SPACING_PORTRAIT = 20;
+var HEADER_DEFAULT_BOTTOM_SPACING_PORTRAIT = 20;
+var HEADER_DEFAULT_TOP_SPACING_LANDSCAPE = 16;
+var HEADER_DEFAULT_BOTTOM_SPACING_LANDSCAPE = 14;
+var LIST_ITEM_HEIGHT_SMALL = 64;
+var LIST_ITEM_HEIGHT_DEFAULT = 80;
+
+
--- /dev/null
+import QtQuick 1.1
+import com.nokia.meego 1.0
+
+PageStackWindow {
+ id: appWindow
+
+ initialPage: mainPage
+
+ MainPage {
+ id: mainPage
+ }
+
+ ToolBarLayout {
+ id: commonTools
+ visible: true
+ ToolIcon {
+ platformIconId: "toolbar-view-menu"
+ anchors.right: (parent === undefined) ? undefined : parent.right
+ onClicked: (menu.status == DialogStatus.Closed) ? menu.open() : menu.close()
+ }
+ ToolIcon {
+ enabled: appWindow.pageStack.depth > 1
+ platformIconId: enabled ? "icon-m-toolbar-back" : "icon-m-toolbar-back-dimmed"
+ anchors.left: parent.left
+ onClicked: pageStack.pop()
+ }
+ }
+
+ Menu {
+ id: menu
+ visualParent: pageStack
+ MenuLayout {
+ MenuItem { text: "Test"; onClicked: pageStack.push(Qt.resolvedUrl("test.qml")) }
+ }
+ }
+}
--- /dev/null
+import QtQuick 1.1
+import com.nokia.meego 1.0
+import com.nokia.extras 1.0
+import "UIConstants.js" as UIConstants
+import "ExtrasConstants.js" as ExtrasConstants
+
+Page {
+ tools: commonTools
+
+ Component {
+ id: departureDelegate
+
+ Item {
+ width: parent.width
+ height: 80
+
+ BorderImage {
+ anchors.fill: parent
+ visible: mouseArea.pressed
+ source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-pressed-vertical-center': 'image://theme/meegotouch-list-background-pressed-vertical-center'
+ }
+
+ Item {
+ anchors.fill: parent
+ anchors.margins: UIConstants.DEFAULT_MARGIN
+
+ Row {
+ Text {
+ id: l
+ text: line // <----
+ anchors.verticalCenter: parent.verticalCenter
+ width: 70
+ font.pixelSize: UIConstants.FONT_XLARGE
+ font.bold: true
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
+ }
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+
+ Text {
+ id: s
+ text: station // <----
+ width: 75
+ font.pixelSize: UIConstants.FONT_LARGE
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
+ }
+
+ Text {
+ id: d
+ text: destination // <----
+ color: !theme.inverted ? UIConstants.COLOR_SECONDARY_FOREGROUND : UIConstants.COLOR_INVERTED_SECONDARY_FOREGROUND
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ font.pixelSize: UIConstants.FONT_LSMALL
+ }
+ }
+ }
+ }
+
+ Column {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ Text {
+ id: dep
+ // FIXME strange int float transformation appears
+ text: departure
+ anchors.right: parent.right
+ anchors.rightMargin: UIConstants.DEFAULT_MARGIN
+ font.bold: true
+ font.pixelSize: UIConstants.FONT_XLARGE
+ font.family: ExtrasConstants.FONT_FAMILY_LIGHT
+ color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: {
+ console.debug("clicked: " + l.text)
+ }
+ }
+ }
+ }
+
+ ListView {
+ id: list
+ width: parent.width; height: parent.height
+
+ model: ListModel {
+ ListElement {
+ line: "N60"
+ station: "Schottentor"
+ destination: "Maurer Hauptplatz"
+ departure: 5
+ }
+ ListElement {
+ line: "N38"
+ station: "Schottentor"
+ destination: "Grinzing"
+ departure: 7
+ }
+ ListElement {
+ line: "N25"
+ station: "Schottentor"
+ destination: "Großfeldsiedlung"
+ departure: 8
+ }
+ ListElement {
+ line: "N41"
+ station: "Schottentor"
+ destination: "Pötzleinsdorf"
+ departure: 12
+ }
+ ListElement {
+ line: "N43"
+ station: "Schottentor"
+ destination: "Neuwaldegg"
+ departure: 12
+ }
+ ListElement {
+ line: "N66"
+ station: "Schottentor"
+ destination: "Liesing S"
+ departure: 20
+ }
+ ListElement {
+ line: "N38"
+ station: "Schottentor"
+ destination: "Grinzing"
+ departure: 22
+ }
+ ListElement {
+ line: "N25"
+ station: "Schottentor"
+ destination: "Großfeldsiedlung"
+ departure: 35
+ }
+ ListElement {
+ line: "N60"
+ station: "Schottentor"
+ destination: "Maurer Hauptplatz"
+ departure: 35
+ }
+ ListElement {
+ line: "N38"
+ station: "Schottentor"
+ destination: "Grinzing"
+ departure: 37
+ }
+ ListElement {
+ line: "N41"
+ station: "Schottentor"
+ destination: "Pötzleinsdorf"
+ departure: "03:12"
+ }
+ ListElement {
+ line: "N43"
+ station: "Schottentor"
+ destination: "Neuwaldegg"
+ departure: 42
+ }
+ ListElement {
+ line: "N66"
+ station: "Schottentor"
+ destination: "Liesing S"
+ departure: 50
+ }
+ ListElement {
+ line: "N38"
+ station: "Schottentor"
+ destination: "Grinzing"
+ departure: 52
+ }
+ }
+ delegate: departureDelegate
+ }
+
+ ScrollDecorator {
+ id: scrolldecorator
+ flickableItem: list
+ platformStyle: ScrollDecoratorStyle {}
+ }
+
+ BusyIndicator {
+ id: busyIndicator
+ visible: true
+ running: true
+ platformStyle: BusyIndicatorStyle { size: 'large' }
+ anchors.centerIn: parent
+ }
+}