+zouba (0.6) unstable; urgency=low
+
+ * Changed layout in preparation for multiple routes
+ * Changed the selection mode for the tables
+
+ -- Max Waterman <davidmaxwaterman@fastmail.co.uk> Mon, 19 Apr 2010 17:38:00 +0200
+
zouba (0.5) unstable; urgency=low
* Changed package description
#include <QMenuBar>
#include <QHBoxLayout>
#include <QVBoxLayout>
+#include <QGridLayout>
#include <QSizePolicy>
#include <QInputDialog>
#include <QDebug>
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") );
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();
QVBoxLayout *mainLayout = new QVBoxLayout();
mainLayout->addLayout( topLayout );
mainLayout->addWidget( messageTable );
+ mainLayout->addLayout( buttonLayout );
centralWidget->setLayout( mainLayout );
}
class MessageTable;
class QHBoxLayout;
class QVBoxLayout;
+class QGridLayout;
class QMenu;
class QAction;
class Location;
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;