From: Max Waterman Date: Fri, 23 Apr 2010 03:57:45 +0000 (+0300) Subject: Changes: Added column headers to route detail table X-Git-Url: http://vcs.maemo.org/git/?p=ptas;a=commitdiff_plain;h=c7a5bb4f4a8fd6f14235cad5a7bbd9eee15d69a7 Changes: Added column headers to route detail table --- diff --git a/zouba/src/ui.cpp b/zouba/src/ui.cpp index 4269013..4dc3c1a 100644 --- a/zouba/src/ui.cpp +++ b/zouba/src/ui.cpp @@ -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 ); diff --git a/zouba/src/uicontroller.cpp b/zouba/src/uicontroller.cpp index 4108d2d..a5440a3 100644 --- a/zouba/src/uicontroller.cpp +++ b/zouba/src/uicontroller.cpp @@ -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 ) 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 ); } diff --git a/zouba/tests/ut_gpscontroller/Makefile b/zouba/tests/ut_gpscontroller/Makefile index 0c74d29..d8f5c18 100644 --- a/zouba/tests/ut_gpscontroller/Makefile +++ b/zouba/tests/ut_gpscontroller/Makefile @@ -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