Skip to content
Permalink
Browse files

fix indentation

  • Loading branch information
3nids authored and nyalldawson committed Nov 29, 2017
1 parent aa65da4 commit fd3e85e744f35995f99117e13e6950a596a90c34
Showing with 30 additions and 21 deletions.
  1. +13 −13 src/app/qgsdatumtransformtablewidget.cpp
  2. +17 −8 src/app/qgsdatumtransformtablewidget.h
@@ -164,20 +164,20 @@ QVariant QgsDatumTransformTableModel::headerData( int section, Qt::Orientation o
}


QgsDatumTransformTableWidget::QgsDatumTransformTableWidget(QWidget *parent)
: QWidget(parent)
QgsDatumTransformTableWidget::QgsDatumTransformTableWidget( QWidget *parent )
: QWidget( parent )
{
setupUi(this);

mTableView->setModel( mModel );
mTableView->resizeColumnToContents( 0 );
mTableView->horizontalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
mTableView->horizontalHeader()->show();
mTableView->setSelectionMode( QAbstractItemView::SingleSelection );
mTableView->setSelectionBehavior( QAbstractItemView::SelectRows );
connect( mAddButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::addDatumTransform );
connect( mRemoveButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::removeDatumTransform );
connect( mEditButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::editDatumTransform );
setupUi( this );

mTableView->setModel( mModel );
mTableView->resizeColumnToContents( 0 );
mTableView->horizontalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
mTableView->horizontalHeader()->show();
mTableView->setSelectionMode( QAbstractItemView::SingleSelection );
mTableView->setSelectionBehavior( QAbstractItemView::SelectRows );
connect( mAddButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::addDatumTransform );
connect( mRemoveButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::removeDatumTransform );
connect( mEditButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::editDatumTransform );

}

@@ -47,7 +47,10 @@ class APP_EXPORT QgsDatumTransformTableModel : public QAbstractTableModel

void setTransformContext( QgsCoordinateTransformContext &context );

QgsCoordinateTransformContext transformContext() const {return mTransformContext;}
QgsCoordinateTransformContext transformContext() const
{
return mTransformContext;
}

/**
* remove the transformation at given indexes
@@ -69,15 +72,21 @@ class APP_EXPORT QgsDatumTransformTableWidget : public QWidget, private Ui::QgsD
{
Q_OBJECT

public:
explicit QgsDatumTransformTableWidget(QWidget *parent = 0);
public:
explicit QgsDatumTransformTableWidget( QWidget *parent = 0 );
~QgsDatumTransformTableWidget();

void setTransformContext( QgsCoordinateTransformContext &context ){ mModel->setTransformContext(context);}
void setTransformContext( QgsCoordinateTransformContext &context )
{
mModel->setTransformContext( context );
}

QgsCoordinateTransformContext transformContext() const {return mModel->transformContext();}
QgsCoordinateTransformContext transformContext() const
{
return mModel->transformContext();
}

public slots:
public slots:
//! add a new datum transform
void addDatumTransform();

@@ -87,8 +96,8 @@ public slots:
//! edit currently selected datum transform
void editDatumTransform();

private:
QgsDatumTransformTableModel *mModel = new QgsDatumTransformTableModel(this);
private:
QgsDatumTransformTableModel *mModel = new QgsDatumTransformTableModel( this );
};


0 comments on commit fd3e85e

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