Changes: Added column headers to route detail table
authorMax Waterman <david.waterman@nokia.com>
Fri, 23 Apr 2010 03:57:45 +0000 (06:57 +0300)
committerMax Waterman <david.waterman@nokia.com>
Fri, 23 Apr 2010 03:57:45 +0000 (06:57 +0300)
zouba/src/ui.cpp
zouba/src/uicontroller.cpp
zouba/tests/ut_gpscontroller/Makefile

index 4269013..4dc3c1a 100644 (file)
@@ -92,6 +92,10 @@ void Ui::setupUi( QMainWindow *mainWindow )
 
   m_routeDetailTable = new QTableWidget();
   m_routeDetailTable->setColumnCount(6);
+  m_routeDetailTable->setHorizontalHeaderLabels(
+      QStringList() << "How" << "Time" << "Dist" << "Dep" << "Arr" << "Line"
+      );
+  m_routeDetailTable->resizeColumnsToContents();
 
   QHBoxLayout *topLayout = new QHBoxLayout();
   topLayout->addLayout( m_routeStack );
index 4108d2d..a5440a3 100644 (file)
@@ -150,6 +150,7 @@ void UiController::displayRouteDetail( int id )
   } else {
     table->setRowCount( 0 );
   }
+
   table->resizeColumnsToContents();
 }
 
@@ -175,10 +176,14 @@ void UiController::displayRoute( const QList<RouteData> &routeData )
       button->setEnabled( false );
     }
 
+    if ( i==0 ) {
+      button->setChecked( true );
+    } else {
+      button->setChecked( false );
+    }
+
     button->setText( label );
   }
 
-  QTableWidget *table = m_ui->m_routeDetailTable;
-  table->setRowCount( 0 );
-  table->resizeColumnsToContents();
+  displayRouteDetail( 0 );
 }
index 0c74d29..d8f5c18 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: ut_gpscontroller
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Thu Apr 22 09:34:28 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Thu Apr 22 18:51:14 2010
 # Project:  ut_gpscontroller.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile ut_gpscontroller.pro