}
m_routeStack->addStretch();
+ QStringList headers( QStringList() << "How" << "Time" << "Dist" << "Dep" << "Arr" );
m_routeDetailTable = new QTableWidget();
- m_routeDetailTable->setColumnCount(6);
- m_routeDetailTable->setHorizontalHeaderLabels(
- QStringList() << "How" << "Time" << "Dist" << "Dep" << "Arr" << "Line"
- );
+ m_routeDetailTable->setColumnCount( headers.count() );
+ m_routeDetailTable->setHorizontalHeaderLabels( headers );
m_routeDetailTable->resizeColumnsToContents();
+ m_routeDetailTable->setSelectionMode( QAbstractItemView::NoSelection );
QHBoxLayout *topLayout = new QHBoxLayout();
topLayout->addLayout( m_routeStack );
void UiController::changeDestination( int id )
{
- qDebug() << "Destination button "+QString::number(id)+" clicked";
-
bool destinationHasChanged = ( m_currentDestination != id );
qDebug() << "Destination has changed=" << destinationHasChanged;
if ( destinationHasChanged ) {
void UiController::changeRoute( int id )
{
- qDebug() << "Route button "+QString::number(id)+" clicked";
-
bool routeHasChanged = ( m_currentRoute != id );
if ( routeHasChanged ) {
displayRouteDetail( id );
int row=0;
foreach( LegData thisLegData, legDataList ) {
+ QString thisHow = thisLegData.m_how;
+
+ bool thisIsLine = ( thisHow == "LINE" );
+ if ( thisIsLine ) {
+ thisHow = thisLegData.m_lineCode;
+ }
QStringList tableStrings;
tableStrings
- << thisLegData.m_how
+ << thisHow
<< thisLegData.m_tripTime
<< thisLegData.m_tripDistance
<< thisLegData.m_departureTime
- << thisLegData.m_arrivalTime
- << thisLegData.m_lineCode;
+ << thisLegData.m_arrivalTime;
int col=0;
foreach( QString thisString, tableStrings ) {
#############################################################################
# Makefile for building: ut_gpscontroller
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Thu Apr 22 18:51:14 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri Apr 23 07:10:27 2010
# Project: ut_gpscontroller.pro
# Template: app
# Command: /usr/bin/qmake -unix -o Makefile ut_gpscontroller.pro