Skip to content

Commit e7079ee

Browse files
committedMar 3, 2017
run astyle on src/gui
1 parent 40c056c commit e7079ee

File tree

599 files changed

+8575
-8571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

599 files changed

+8575
-8571
lines changed
 

‎src/gui/attributetable/qgsattributetabledelegate.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "qgsactionmanager.h"
3232

3333

34-
QgsVectorLayer* QgsAttributeTableDelegate::layer( const QAbstractItemModel *model )
34+
QgsVectorLayer *QgsAttributeTableDelegate::layer( const QAbstractItemModel *model )
3535
{
3636
const QgsAttributeTableModel *tm = qobject_cast<const QgsAttributeTableModel *>( model );
3737
if ( tm )
@@ -44,7 +44,7 @@ QgsVectorLayer* QgsAttributeTableDelegate::layer( const QAbstractItemModel *mode
4444
return nullptr;
4545
}
4646

47-
const QgsAttributeTableModel* QgsAttributeTableDelegate::masterModel( const QAbstractItemModel* model )
47+
const QgsAttributeTableModel *QgsAttributeTableDelegate::masterModel( const QAbstractItemModel *model )
4848
{
4949
const QgsAttributeTableModel *tm = qobject_cast<const QgsAttributeTableModel *>( model );
5050
if ( tm )
@@ -57,7 +57,7 @@ const QgsAttributeTableModel* QgsAttributeTableDelegate::masterModel( const QAbs
5757
return nullptr;
5858
}
5959

60-
QWidget* QgsAttributeTableDelegate::createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const
60+
QWidget *QgsAttributeTableDelegate::createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const
6161
{
6262
Q_UNUSED( option );
6363
QgsVectorLayer *vl = layer( index.model() );
@@ -67,8 +67,8 @@ QWidget* QgsAttributeTableDelegate::createEditor( QWidget *parent, const QStyleO
6767
int fieldIdx = index.model()->data( index, QgsAttributeTableModel::FieldIndexRole ).toInt();
6868

6969
QgsAttributeEditorContext context( masterModel( index.model() )->editorContext(), QgsAttributeEditorContext::Popup );
70-
QgsEditorWidgetWrapper* eww = QgsEditorWidgetRegistry::instance()->create( vl, fieldIdx, nullptr, parent, context );
71-
QWidget* w = eww->widget();
70+
QgsEditorWidgetWrapper *eww = QgsEditorWidgetRegistry::instance()->create( vl, fieldIdx, nullptr, parent, context );
71+
QWidget *w = eww->widget();
7272

7373
w->setAutoFillBackground( true );
7474
w->setFocusPolicy( Qt::StrongFocus ); // to make sure QMouseEvents are propagated to the editor widget
@@ -89,13 +89,13 @@ void QgsAttributeTableDelegate::setModelData( QWidget *editor, QAbstractItemMode
8989
QVariant oldValue = model->data( index, Qt::EditRole );
9090

9191
QVariant newValue;
92-
QgsEditorWidgetWrapper* eww = QgsEditorWidgetWrapper::fromWidget( editor );
92+
QgsEditorWidgetWrapper *eww = QgsEditorWidgetWrapper::fromWidget( editor );
9393
if ( !eww )
9494
return;
9595

9696
newValue = eww->value();
9797

98-
if (( oldValue != newValue && newValue.isValid() ) || oldValue.isNull() != newValue.isNull() )
98+
if ( ( oldValue != newValue && newValue.isValid() ) || oldValue.isNull() != newValue.isNull() )
9999
{
100100
vl->beginEditCommand( tr( "Attribute changed" ) );
101101
vl->changeAttributeValue( fid, fieldIdx, newValue, oldValue );
@@ -105,7 +105,7 @@ void QgsAttributeTableDelegate::setModelData( QWidget *editor, QAbstractItemMode
105105

106106
void QgsAttributeTableDelegate::setEditorData( QWidget *editor, const QModelIndex &index ) const
107107
{
108-
QgsEditorWidgetWrapper* eww = QgsEditorWidgetWrapper::fromWidget( editor );
108+
QgsEditorWidgetWrapper *eww = QgsEditorWidgetWrapper::fromWidget( editor );
109109
if ( !eww )
110110
return;
111111

@@ -117,7 +117,7 @@ void QgsAttributeTableDelegate::setFeatureSelectionModel( QgsFeatureSelectionMod
117117
mFeatureSelectionModel = featureSelectionModel;
118118
}
119119

120-
void QgsAttributeTableDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
120+
void QgsAttributeTableDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
121121
{
122122
QgsAttributeTableFilterModel::ColumnType columnType = static_cast<QgsAttributeTableFilterModel::ColumnType>( index.model()->data( index, QgsAttributeTableFilterModel::TypeRole ).toInt() );
123123

‎src/gui/attributetable/qgsattributetabledelegate.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,32 @@ class GUI_EXPORT QgsAttributeTableDelegate : public QItemDelegate
3434
{
3535
Q_OBJECT
3636

37-
static QgsVectorLayer* layer( const QAbstractItemModel* model );
38-
static const QgsAttributeTableModel* masterModel( const QAbstractItemModel* model );
37+
static QgsVectorLayer *layer( const QAbstractItemModel *model );
38+
static const QgsAttributeTableModel *masterModel( const QAbstractItemModel *model );
3939

4040
public:
4141

4242
/**
4343
* Constructor
4444
* @param parent parent object
4545
*/
46-
QgsAttributeTableDelegate( QObject* parent = nullptr )
47-
: QItemDelegate( parent )
48-
, mLayer( nullptr )
49-
, mFeatureSelectionModel( nullptr )
46+
QgsAttributeTableDelegate( QObject *parent = nullptr )
47+
: QItemDelegate( parent )
48+
, mLayer( nullptr )
49+
, mFeatureSelectionModel( nullptr )
5050
{
5151
}
5252

5353
/**
5454
* Used to create an editor for when the user tries to
5555
* change the contents of a cell
5656
*/
57-
QWidget * createEditor( QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index ) const override;
57+
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
5858

5959
/**
6060
* Overloads the paint method form the QItemDelegate base class
6161
*/
62-
void paint( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const override;
62+
void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
6363

6464
/**
6565
* Sets data from editor back to model. Overloads default method
@@ -76,7 +76,7 @@ class GUI_EXPORT QgsAttributeTableDelegate : public QItemDelegate
7676
*/
7777
void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
7878

79-
void setFeatureSelectionModel( QgsFeatureSelectionModel* featureSelectionModel );
79+
void setFeatureSelectionModel( QgsFeatureSelectionModel *featureSelectionModel );
8080

8181
signals:
8282

@@ -88,11 +88,11 @@ class GUI_EXPORT QgsAttributeTableDelegate : public QItemDelegate
8888
* It is the consumers responsibility to check if initialization has already
8989
* happened before.
9090
*/
91-
void actionColumnItemPainted( const QModelIndex& index ) const;
91+
void actionColumnItemPainted( const QModelIndex &index ) const;
9292

9393
private:
94-
QgsVectorLayer* mLayer = nullptr;
95-
QgsFeatureSelectionModel* mFeatureSelectionModel = nullptr;
94+
QgsVectorLayer *mLayer = nullptr;
95+
QgsFeatureSelectionModel *mFeatureSelectionModel = nullptr;
9696
};
9797

9898
#endif //QGSATTRIBUTETABLEDELEGATE_H

0 commit comments

Comments
 (0)
Please sign in to comment.