From: Max Waterman Date: Mon, 19 Apr 2010 14:47:31 +0000 (+0300) Subject: Changes: layout change ready for multiple routes; change table selection modes X-Git-Url: http://vcs.maemo.org/git/?p=ptas;a=commitdiff_plain;h=9c66cc1fe4fe688c3b25b7236a01633763217a90 Changes: layout change ready for multiple routes; change table selection modes --- diff --git a/zouba/debian/changelog b/zouba/debian/changelog index c694d2c..81a5e73 100644 --- a/zouba/debian/changelog +++ b/zouba/debian/changelog @@ -1,3 +1,10 @@ +zouba (0.6) unstable; urgency=low + + * Changed layout in preparation for multiple routes + * Changed the selection mode for the tables + + -- Max Waterman Mon, 19 Apr 2010 17:38:00 +0200 + zouba (0.5) unstable; urgency=low * Changed package description diff --git a/zouba/debian/files b/zouba/debian/files index b584481..7f196be 100644 --- a/zouba/debian/files +++ b/zouba/debian/files @@ -1 +1 @@ -zouba_0.5_armel.deb user/navigation extra +zouba_0.6_armel.deb user/navigation extra diff --git a/zouba/src/messagetable.cpp b/zouba/src/messagetable.cpp index 032bcd2..8d0fa38 100644 --- a/zouba/src/messagetable.cpp +++ b/zouba/src/messagetable.cpp @@ -11,6 +11,7 @@ MessageTable::MessageTable( QWidget *parent ) : { setHorizontalHeaderLabels( QStringList() << "Messages" ); verticalHeader()->hide(); + setSelectionMode( QAbstractItemView::NoSelection ); for ( int row=0; row #include #include +#include #include #include #include @@ -77,7 +78,6 @@ void Ui::setupUi( QMainWindow *mainWindow ) homeButton->setObjectName( QString::fromUtf8("homeButton") ); homeButton->setText( "GPS->HOME" ); homeButton->setEnabled(false); - homeButton->setFixedSize( QSize( ButtonWidth, ButtonHeight ) ); QRadioButton *workButton = new QRadioButton(); workButton->setObjectName( QString::fromUtf8("workButton") ); @@ -89,21 +89,20 @@ void Ui::setupUi( QMainWindow *mainWindow ) destinationButtons->addButton( workButton, WorkButtonId ); destinationButtons->setExclusive( true ); - buttonLayout = new QVBoxLayout(); - buttonLayout->addWidget( homeButton ); - buttonLayout->addWidget( workButton ); - buttonLayout->addStretch(); - routeTable = new QTableWidget( 1, 2 ); QStringList columnHeaders; columnHeaders << "Time" << "Bus"; routeTable->setHorizontalHeaderLabels( columnHeaders ); routeTable->verticalHeader()->hide(); + routeTable->setSelectionMode( QAbstractItemView::SingleSelection ); QHBoxLayout *topLayout = new QHBoxLayout(); - topLayout->addLayout( buttonLayout ); topLayout->addWidget( routeTable ); + buttonLayout = new QGridLayout(); + buttonLayout->addWidget( homeButton, 0, 0 ); + buttonLayout->addWidget( workButton, 0, 1 ); + messageTable = new MessageTable(); messageTable->setObjectName( QString::fromUtf8("messageTable") ); messageTable->hide(); @@ -111,6 +110,7 @@ void Ui::setupUi( QMainWindow *mainWindow ) QVBoxLayout *mainLayout = new QVBoxLayout(); mainLayout->addLayout( topLayout ); mainLayout->addWidget( messageTable ); + mainLayout->addLayout( buttonLayout ); centralWidget->setLayout( mainLayout ); } diff --git a/zouba/src/ui.h b/zouba/src/ui.h index ecaee4f..318ceb1 100644 --- a/zouba/src/ui.h +++ b/zouba/src/ui.h @@ -10,6 +10,7 @@ class QButtonGroup; class MessageTable; class QHBoxLayout; class QVBoxLayout; +class QGridLayout; class QMenu; class QAction; class Location; @@ -32,18 +33,13 @@ public: ScreenWidth=800, ScreenHeight=480 }; - enum { - ButtonWidth=300, - ButtonHeight=70 - }; - QWidget *centralWidget; QButtonGroup *destinationButtons; QTableWidget *routeTable; static MessageTable *messageTable; QHBoxLayout *mainLayout; - QVBoxLayout *buttonLayout; + QGridLayout *buttonLayout; QMenu *menu; QAction *toggleMessagesAction; QAction *toggleFakeGpsAction;