Basics to get xml from ytv server and parse the xml.
authorMax Waterman <davidmaxwaterman+maemogit@fastmail.co.uk>
Sun, 7 Feb 2010 16:53:26 +0000 (18:53 +0200)
committerMax Waterman <davidmaxwaterman+maemogit@fastmail.co.uk>
Sun, 7 Feb 2010 16:53:26 +0000 (18:53 +0200)
zouba/qt/httpclient.cpp [new file with mode: 0644]
zouba/qt/httpclient.h [new file with mode: 0644]
zouba/qt/main.cpp [new file with mode: 0644]
zouba/qt/output.xml [new file with mode: 0644]
zouba/qt/qt.pro [new file with mode: 0644]
zouba/qt/zouba.ui [new file with mode: 0644]

diff --git a/zouba/qt/httpclient.cpp b/zouba/qt/httpclient.cpp
new file mode 100644 (file)
index 0000000..8a66c95
--- /dev/null
@@ -0,0 +1,97 @@
+#include "httpclient.h"
+
+#include "ui_zouba.h"
+
+#include <QNetworkAccessManager>
+#include <QNetworkReply>
+#include <QUrl>
+#include <QObject>
+#include <QDebug>
+#include <QStringList>
+#include <QString>
+#include <QXmlStreamReader>
+
+namespace {
+  QUrl ytv( "http://api.reittiopas.fi/public-ytv/fi/api/" );
+  QString username( "zouba" );
+  QString password( "caf9r3ee" );
+
+  QString homeKey( "taivaanvuohentie%207%2Chelsinki" );
+  QString workKey( "it%E4merenkatu%2011%2Chelsinki" );
+
+  QString workX( "2551042" );
+  QString workY( "6672829" );
+  QString homeX( "2549183" );
+  QString homeY( "6672570" );
+}
+  
+HttpClient::HttpClient( Ui::MainWindow *ui ) :
+  manager( new QNetworkAccessManager(this) ),
+  ui( ui )
+{
+  connect( manager, SIGNAL( finished(QNetworkReply*) ), this, SLOT( replyFinished(QNetworkReply*) ) );
+}
+
+HttpClient::~HttpClient()
+{
+  delete manager;
+  manager = 0;
+}
+
+void HttpClient::get()
+{
+  QUrl fullUrl( ytv );
+
+  QStringList a;
+  a << workX << workY;
+  QStringList b;
+  b << homeX << homeY;
+
+  fullUrl.addQueryItem( "a", a.join(",") );
+  fullUrl.addQueryItem( "b", b.join(",") );
+  fullUrl.addQueryItem( "user", username );
+  fullUrl.addQueryItem( "pass", password );
+
+  manager->get( QNetworkRequest( fullUrl ) );
+}
+
+void HttpClient::replyFinished( QNetworkReply * reply )
+{
+  QXmlStreamReader xml( reply->readAll() );
+
+  bool inLine = false;
+  bool inStop = false;
+  while ( !xml.atEnd() ) {
+    xml.readNext();
+    //qDebug() << xml.name();
+    if ( xml.isStartElement() && xml.name() == "LINE" ) {
+      QString lineCode( xml.attributes().value("code").toString() );
+
+      qDebug() << "line code" << lineCode;
+      ui->BusNoDisplay->setText( lineCode );
+
+      inLine = true;
+    } else
+    if ( inLine && xml.name() == "STOP" ) {
+      inStop = true;
+    } else
+    if ( inLine && inStop && xml.name() == "ARRIVAL" ) {
+      QString arrivalTime( xml.attributes().value("time").toString() );
+
+      qDebug() << "arrival time" << arrivalTime;
+      ui->TimeDisplay->setText( arrivalTime );
+
+      inLine = false;
+    } else
+    if ( xml.isEndElement() && xml.name() == "STOP" ) {
+      inStop = false;
+    } else
+    if ( xml.isEndElement() && xml.name() == "LINE" ) {
+      inLine = false;
+    }
+  }
+
+  if ( xml.hasError() ) {
+    qDebug() << "xml error";
+  }
+}
diff --git a/zouba/qt/httpclient.h b/zouba/qt/httpclient.h
new file mode 100644 (file)
index 0000000..28aa9bf
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef HTTPCLIENT_H
+#define HTTPCLIENT_H
+
+#include "ui_zouba.h"
+
+#include <QObject>
+#include <QNetworkReply>
+#include <QNetworkAccessManager>
+
+class HttpClient: public QObject
+{
+  Q_OBJECT
+
+public:
+  HttpClient( Ui::MainWindow *ui );
+  ~HttpClient();
+
+  void get();
+
+public Q_SLOTS:
+  void replyFinished(QNetworkReply*);
+
+private:
+  QNetworkAccessManager *manager;
+  Ui::MainWindow *ui;
+};
+#endif // HTTPCLIENT_H
diff --git a/zouba/qt/main.cpp b/zouba/qt/main.cpp
new file mode 100644 (file)
index 0000000..8d3f976
--- /dev/null
@@ -0,0 +1,21 @@
+#include "httpclient.h"
+#include "ui_zouba.h"
+
+#include <QDebug>
+
+int main(int argc, char *argv[] )
+{
+  QApplication app(argc, argv);
+  QMainWindow *widget = new QMainWindow;
+  Ui::MainWindow ui;
+  ui.setupUi(widget);
+
+  HttpClient httpClient( &ui );
+
+  httpClient.get();
+
+  ui.TimeDisplay->setText( "HELLO" );
+
+  widget->show();
+  return app.exec();
+}
diff --git a/zouba/qt/output.xml b/zouba/qt/output.xml
new file mode 100644 (file)
index 0000000..1557ded
--- /dev/null
@@ -0,0 +1,330 @@
+"<?xml version="1.0" encoding="ISO-8859-1" ?>
+<MTRXML version="1.0">
+       <ROUTE from="start" to="dest">
+               <LENGTH time="14.411" dist="2510.063"/>
+               <POINT uid="start" x="2551042.0" y="6672829.0">
+                       <ARRIVAL date="20100207" time="1815"/>
+                       <DEPARTURE date="20100207" time="1815"/>
+               </POINT>
+               <WALK>
+                       <LENGTH time="4.475" dist="357.069"/>
+                       <POINT uid="start" x="2551042.0" y="6672829.0">
+                               <ARRIVAL date="20100207" time="1815"/>
+                               <DEPARTURE date="20100207" time="1815"/>
+                       </POINT>
+                       <MAPLOC x="2551034.9" y="6672875.6" type="7">
+                               <ARRIVAL date="20100207" time="1816"/>
+                               <DEPARTURE date="20100207" time="1816"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550977.7" y="6672869.1" type="15">
+                               <ARRIVAL date="20100207" time="1817"/>
+                               <DEPARTURE date="20100207" time="1817"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550949.3" y="6672867.5" type="7">
+                               <ARRIVAL date="20100207" time="1817"/>
+                               <DEPARTURE date="20100207" time="1817"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550817.2" y="6672859.3" type="7">
+                               <ARRIVAL date="20100207" time="1819"/>
+                               <DEPARTURE date="20100207" time="1819"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550808.5" y="6672889.3" type="11">
+                               <ARRIVAL date="20100207" time="1820"/>
+                               <DEPARTURE date="20100207" time="1820"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <STOP code="6:1201129" x="2550765.0" y="6672886.0" id="745">
+                               <ARRIVAL date="20100207" time="1820"/>
+                               <DEPARTURE date="20100207" time="1820"/>
+                               <NAME lang="1" val="Länsiväylä"/>
+                               <NAME lang="2" val="Västerleden"/>
+                       </STOP>
+               </WALK>
+               <LINE id="200" code="1065A 2" type="1" mobility="3">
+                       <LENGTH time="5.000" dist="1760.931"/>
+                       <STOP code="6:1201129" x="2550765.0" y="6672886.0" id="745" ord="30">
+                               <ARRIVAL date="20100207" time="1820"/>
+                               <DEPARTURE date="20100207" time="1820"/>
+                               <NAME lang="1" val="Länsiväylä"/>
+                               <NAME lang="2" val="Västerleden"/>
+                       </STOP>
+                       <STOP code="6:1201131" x="2550385.0" y="6672760.0" id="747">
+                               <ARRIVAL date="20100207" time="1821"/>
+                               <DEPARTURE date="20100207" time="1821"/>
+                               <NAME lang="1" val="Salmisaari"/>
+                               <NAME lang="2" val="Sundholmen"/>
+                       </STOP>
+                       <STOP code="6:1310101" x="2549608.0" y="6672522.0" id="1356">
+                               <ARRIVAL date="20100207" time="1824"/>
+                               <DEPARTURE date="20100207" time="1824"/>
+                               <NAME lang="1" val="Lauttasaaren silta"/>
+                               <NAME lang="2" val="Drumsö bro"/>
+                       </STOP>
+                       <STOP code="6:1310103" x="2549247.0" y="6672446.0" id="1358" ord="33">
+                               <ARRIVAL date="20100207" time="1825"/>
+                               <DEPARTURE date="20100207" time="1825"/>
+                               <NAME lang="1" val="Koillisväylä"/>
+                               <NAME lang="2" val="Nordostpassagen"/>
+                       </STOP>
+               </LINE>
+               <WALK>
+                       <LENGTH time="4.936" dist="392.062"/>
+                       <STOP code="6:1310103" x="2549247.0" y="6672446.0" id="1358">
+                               <ARRIVAL date="20100207" time="1825"/>
+                               <DEPARTURE date="20100207" time="1825"/>
+                               <NAME lang="1" val="Koillisväylä"/>
+                               <NAME lang="2" val="Nordostpassagen"/>
+                       </STOP>
+                       <MAPLOC x="2549200.4" y="6672433.4" type="0">
+                               <ARRIVAL date="20100207" time="1825"/>
+                               <DEPARTURE date="20100207" time="1825"/>
+                               <NAME lang="1" val="Taivaanvuohenkuja"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549151.2" y="6672527.3" type="0">
+                               <ARRIVAL date="20100207" time="1827"/>
+                               <DEPARTURE date="20100207" time="1827"/>
+                               <NAME lang="1" val="Taivaanvuohentie"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549105.4" y="6672573.6" type="0">
+                               <ARRIVAL date="20100207" time="1828"/>
+                               <DEPARTURE date="20100207" time="1828"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549115.4" y="6672595.1" type="0">
+                               <ARRIVAL date="20100207" time="1828"/>
+                               <DEPARTURE date="20100207" time="1828"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549162.6" y="6672633.1" type="0">
+                               <ARRIVAL date="20100207" time="1829"/>
+                               <DEPARTURE date="20100207" time="1829"/>
+                       </MAPLOC>
+                       <POINT uid="dest" x="2549183.0" y="6672570.0">
+                               <ARRIVAL date="20100207" time="1829"/>
+                               <DEPARTURE date="20100207" time="1829"/>
+                       </POINT>
+               </WALK>
+               <POINT uid="dest" x="2549183.0" y="6672570.0">
+                       <ARRIVAL date="20100207" time="1829"/>
+                       <DEPARTURE date="20100207" time="1829"/>
+               </POINT>
+       </ROUTE>
+       <ROUTE from="start" to="dest">
+               <LENGTH time="13.411" dist="2501.497"/>
+               <POINT uid="start" x="2551042.0" y="6672829.0">
+                       <ARRIVAL date="20100207" time="1821"/>
+                       <DEPARTURE date="20100207" time="1821"/>
+               </POINT>
+               <WALK>
+                       <LENGTH time="4.475" dist="357.069"/>
+                       <POINT uid="start" x="2551042.0" y="6672829.0">
+                               <ARRIVAL date="20100207" time="1821"/>
+                               <DEPARTURE date="20100207" time="1821"/>
+                       </POINT>
+                       <MAPLOC x="2551034.9" y="6672875.6" type="7">
+                               <ARRIVAL date="20100207" time="1822"/>
+                               <DEPARTURE date="20100207" time="1822"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550977.7" y="6672869.1" type="15">
+                               <ARRIVAL date="20100207" time="1823"/>
+                               <DEPARTURE date="20100207" time="1823"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550949.3" y="6672867.5" type="7">
+                               <ARRIVAL date="20100207" time="1823"/>
+                               <DEPARTURE date="20100207" time="1823"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550817.2" y="6672859.3" type="7">
+                               <ARRIVAL date="20100207" time="1825"/>
+                               <DEPARTURE date="20100207" time="1825"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550808.5" y="6672889.3" type="11">
+                               <ARRIVAL date="20100207" time="1826"/>
+                               <DEPARTURE date="20100207" time="1826"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <STOP code="6:1201227" x="2550765.0" y="6672886.0" id="755">
+                               <ARRIVAL date="20100207" time="1826"/>
+                               <DEPARTURE date="20100207" time="1826"/>
+                               <NAME lang="1" val="Länsiväylä"/>
+                               <NAME lang="2" val="Västerleden"/>
+                       </STOP>
+               </WALK>
+               <LINE id="579" code="2102T 1" type="5" mobility="3">
+                       <LENGTH time="4.000" dist="1751.582"/>
+                       <STOP code="6:1201227" x="2550765.0" y="6672886.0" id="755" ord="3">
+                               <ARRIVAL date="20100207" time="1826"/>
+                               <DEPARTURE date="20100207" time="1826"/>
+                               <NAME lang="1" val="Länsiväylä"/>
+                               <NAME lang="2" val="Västerleden"/>
+                       </STOP>
+                       <STOP code="6:1201231" x="2550387.0" y="6672761.0" id="759">
+                               <ARRIVAL date="20100207" time="1827"/>
+                               <DEPARTURE date="20100207" time="1827"/>
+                               <NAME lang="1" val="Salmisaari"/>
+                               <NAME lang="2" val="Sundholmen"/>
+                       </STOP>
+                       <STOP code="6:1310201" x="2549630.0" y="6672524.0" id="1402">
+                               <ARRIVAL date="20100207" time="1829"/>
+                               <DEPARTURE date="20100207" time="1829"/>
+                               <NAME lang="1" val="Lauttasaaren silta"/>
+                               <NAME lang="2" val="Drumsö bro"/>
+                       </STOP>
+                       <STOP code="6:1310203" x="2549248.0" y="6672446.0" id="1404" ord="6">
+                               <ARRIVAL date="20100207" time="1830"/>
+                               <DEPARTURE date="20100207" time="1830"/>
+                               <NAME lang="1" val="Koillisväylä"/>
+                               <NAME lang="2" val="Nordostpassagen"/>
+                       </STOP>
+               </LINE>
+               <WALK>
+                       <LENGTH time="4.936" dist="392.846"/>
+                       <STOP code="6:1310203" x="2549248.0" y="6672446.0" id="1404">
+                               <ARRIVAL date="20100207" time="1830"/>
+                               <DEPARTURE date="20100207" time="1830"/>
+                               <NAME lang="1" val="Koillisväylä"/>
+                               <NAME lang="2" val="Nordostpassagen"/>
+                       </STOP>
+                       <MAPLOC x="2549200.4" y="6672433.4" type="0">
+                               <ARRIVAL date="20100207" time="1830"/>
+                               <DEPARTURE date="20100207" time="1830"/>
+                               <NAME lang="1" val="Taivaanvuohenkuja"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549151.2" y="6672527.3" type="0">
+                               <ARRIVAL date="20100207" time="1832"/>
+                               <DEPARTURE date="20100207" time="1832"/>
+                               <NAME lang="1" val="Taivaanvuohentie"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549105.4" y="6672573.6" type="0">
+                               <ARRIVAL date="20100207" time="1833"/>
+                               <DEPARTURE date="20100207" time="1833"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549115.4" y="6672595.1" type="0">
+                               <ARRIVAL date="20100207" time="1833"/>
+                               <DEPARTURE date="20100207" time="1833"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549162.6" y="6672633.1" type="0">
+                               <ARRIVAL date="20100207" time="1834"/>
+                               <DEPARTURE date="20100207" time="1834"/>
+                       </MAPLOC>
+                       <POINT uid="dest" x="2549183.0" y="6672570.0">
+                               <ARRIVAL date="20100207" time="1834"/>
+                               <DEPARTURE date="20100207" time="1834"/>
+                       </POINT>
+               </WALK>
+               <POINT uid="dest" x="2549183.0" y="6672570.0">
+                       <ARRIVAL date="20100207" time="1834"/>
+                       <DEPARTURE date="20100207" time="1834"/>
+               </POINT>
+       </ROUTE>
+       <ROUTE from="start" to="dest">
+               <LENGTH time="13.411" dist="2501.497"/>
+               <POINT uid="start" x="2551042.0" y="6672829.0">
+                       <ARRIVAL date="20100207" time="1829"/>
+                       <DEPARTURE date="20100207" time="1829"/>
+               </POINT>
+               <WALK>
+                       <LENGTH time="4.475" dist="357.069"/>
+                       <POINT uid="start" x="2551042.0" y="6672829.0">
+                               <ARRIVAL date="20100207" time="1829"/>
+                               <DEPARTURE date="20100207" time="1829"/>
+                       </POINT>
+                       <MAPLOC x="2551034.9" y="6672875.6" type="7">
+                               <ARRIVAL date="20100207" time="1830"/>
+                               <DEPARTURE date="20100207" time="1830"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550977.7" y="6672869.1" type="15">
+                               <ARRIVAL date="20100207" time="1831"/>
+                               <DEPARTURE date="20100207" time="1831"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550949.3" y="6672867.5" type="7">
+                               <ARRIVAL date="20100207" time="1831"/>
+                               <DEPARTURE date="20100207" time="1831"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550817.2" y="6672859.3" type="7">
+                               <ARRIVAL date="20100207" time="1833"/>
+                               <DEPARTURE date="20100207" time="1833"/>
+                       </MAPLOC>
+                       <MAPLOC x="2550808.5" y="6672889.3" type="11">
+                               <ARRIVAL date="20100207" time="1834"/>
+                               <DEPARTURE date="20100207" time="1834"/>
+                               <NAME lang="1" val="Porkkalankatu"/>
+                       </MAPLOC>
+                       <STOP code="6:1201227" x="2550765.0" y="6672886.0" id="755">
+                               <ARRIVAL date="20100207" time="1834"/>
+                               <DEPARTURE date="20100207" time="1834"/>
+                               <NAME lang="1" val="Länsiväylä"/>
+                               <NAME lang="2" val="Västerleden"/>
+                       </STOP>
+               </WALK>
+               <LINE id="603" code="2110T 1" type="5" mobility="3">
+                       <LENGTH time="4.000" dist="1751.582"/>
+                       <STOP code="6:1201227" x="2550765.0" y="6672886.0" id="755" ord="3">
+                               <ARRIVAL date="20100207" time="1834"/>
+                               <DEPARTURE date="20100207" time="1834"/>
+                               <NAME lang="1" val="Länsiväylä"/>
+                               <NAME lang="2" val="Västerleden"/>
+                       </STOP>
+                       <STOP code="6:1201231" x="2550387.0" y="6672761.0" id="759">
+                               <ARRIVAL date="20100207" time="1835"/>
+                               <DEPARTURE date="20100207" time="1835"/>
+                               <NAME lang="1" val="Salmisaari"/>
+                               <NAME lang="2" val="Sundholmen"/>
+                       </STOP>
+                       <STOP code="6:1310201" x="2549630.0" y="6672524.0" id="1402">
+                               <ARRIVAL date="20100207" time="1837"/>
+                               <DEPARTURE date="20100207" time="1837"/>
+                               <NAME lang="1" val="Lauttasaaren silta"/>
+                               <NAME lang="2" val="Drumsö bro"/>
+                       </STOP>
+                       <STOP code="6:1310203" x="2549248.0" y="6672446.0" id="1404" ord="6">
+                               <ARRIVAL date="20100207" time="1838"/>
+                               <DEPARTURE date="20100207" time="1838"/>
+                               <NAME lang="1" val="Koillisväylä"/>
+                               <NAME lang="2" val="Nordostpassagen"/>
+                       </STOP>
+               </LINE>
+               <WALK>
+                       <LENGTH time="4.936" dist="392.846"/>
+                       <STOP code="6:1310203" x="2549248.0" y="6672446.0" id="1404">
+                               <ARRIVAL date="20100207" time="1838"/>
+                               <DEPARTURE date="20100207" time="1838"/>
+                               <NAME lang="1" val="Koillisväylä"/>
+                               <NAME lang="2" val="Nordostpassagen"/>
+                       </STOP>
+                       <MAPLOC x="2549200.4" y="6672433.4" type="0">
+                               <ARRIVAL date="20100207" time="1838"/>
+                               <DEPARTURE date="20100207" time="1838"/>
+                               <NAME lang="1" val="Taivaanvuohenkuja"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549151.2" y="6672527.3" type="0">
+                               <ARRIVAL date="20100207" time="1840"/>
+                               <DEPARTURE date="20100207" time="1840"/>
+                               <NAME lang="1" val="Taivaanvuohentie"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549105.4" y="6672573.6" type="0">
+                               <ARRIVAL date="20100207" time="1841"/>
+                               <DEPARTURE date="20100207" time="1841"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549115.4" y="6672595.1" type="0">
+                               <ARRIVAL date="20100207" time="1841"/>
+                               <DEPARTURE date="20100207" time="1841"/>
+                       </MAPLOC>
+                       <MAPLOC x="2549162.6" y="6672633.1" type="0">
+                               <ARRIVAL date="20100207" time="1842"/>
+                               <DEPARTURE date="20100207" time="1842"/>
+                       </MAPLOC>
+                       <POINT uid="dest" x="2549183.0" y="6672570.0">
+                               <ARRIVAL date="20100207" time="1842"/>
+                               <DEPARTURE date="20100207" time="1842"/>
+                       </POINT>
+               </WALK>
+               <POINT uid="dest" x="2549183.0" y="6672570.0">
+                       <ARRIVAL date="20100207" time="1842"/>
+                       <DEPARTURE date="20100207" time="1842"/>
+               </POINT>
+       </ROUTE>
+</MTRXML>" 
diff --git a/zouba/qt/qt.pro b/zouba/qt/qt.pro
new file mode 100644 (file)
index 0000000..48c03b7
--- /dev/null
@@ -0,0 +1,16 @@
+CONFIG += \
+  qt \
+
+QT += \
+  network \
+
+TEMPLATE = app
+FORMS    = zouba.ui
+
+SOURCES  = \
+  main.cpp \
+  httpclient.cpp \
+
+HEADERS += \
+  httpclient.h \
+
diff --git a/zouba/qt/zouba.ui b/zouba/qt/zouba.ui
new file mode 100644 (file)
index 0000000..6eaa8b6
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>640</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>ZuoBa</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QWidget" name="verticalLayoutWidget">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>0</y>
+      <width>230</width>
+      <height>82</height>
+     </rect>
+    </property>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <layout class="QFormLayout" name="formLayout">
+       <property name="fieldGrowthPolicy">
+        <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+       </property>
+       <item row="1" column="0">
+        <widget class="QLabel" name="TimeLabel">
+         <property name="text">
+          <string>Time</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1">
+        <widget class="QLabel" name="TimeDisplay">
+         <property name="text">
+          <string>TimeDisplay</string>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="0">
+        <widget class="QLabel" name="BusNoLabel">
+         <property name="text">
+          <string>BusNo</string>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1">
+        <widget class="QLabel" name="BusNoDisplay">
+         <property name="text">
+          <string>BusNoDisplay</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="0" colspan="2">
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QPushButton" name="pushButton_2">
+           <property name="text">
+            <string>Work</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButton">
+           <property name="text">
+            <string>Home</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>640</width>
+     <height>25</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>