Skip to content
Permalink
Browse files

use alternate row colors and a slightly reduced font size in datum table

  • Loading branch information
3nids authored and nyalldawson committed Nov 30, 2017
1 parent 8ab658c commit 5c5830402c2a03f054bbd8ce259aa24dbaa8f761
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/app/qgsdatumtransformtablewidget.cpp
@@ -94,11 +94,19 @@ QVariant QgsDatumTransformTableModel::data( const QModelIndex &index, int role )

switch ( role )
{
case Qt::FontRole:
{
QFont font;
font.setPointSize( font.pointSize() - 1 );
return font;
break;
}
case Qt::DisplayRole:
switch ( index.column() )
{
case SourceCrsColumn:
return sourceCrs;
break;
case SourceTransformColumn:
if ( sourceTransform != -1 )
{
@@ -107,6 +115,7 @@ QVariant QgsDatumTransformTableModel::data( const QModelIndex &index, int role )
break;
case DestinationCrsColumn:
return destinationCrs;
break;
case DestinationTransformColumn:
if ( destinationTransform != -1 )
{
@@ -122,11 +131,14 @@ QVariant QgsDatumTransformTableModel::data( const QModelIndex &index, int role )
{
case SourceTransformColumn:
return sourceTransform;
break;
case DestinationTransformColumn:
return destinationTransform;
break;
default:
break;
}
break;
default:
break;
}
@@ -175,10 +187,10 @@ QgsDatumTransformTableWidget::QgsDatumTransformTableWidget( QWidget *parent )
mTableView->horizontalHeader()->show();
mTableView->setSelectionMode( QAbstractItemView::SingleSelection );
mTableView->setSelectionBehavior( QAbstractItemView::SelectRows );
mTableView->setAlternatingRowColors( true );
connect( mAddButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::addDatumTransform );
connect( mRemoveButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::removeDatumTransform );
connect( mEditButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::editDatumTransform );

}

QgsDatumTransformTableWidget::~QgsDatumTransformTableWidget()

0 comments on commit 5c58304

Please sign in to comment.
You can’t perform that action at this time.