Skip to content
Permalink
Browse files

automatic indentation update (r10980-r11003)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11004 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Jul 1, 2009
1 parent 33c579c commit 238ba8e82b8111897c41c0e54304257baf362032
Showing with 933 additions and 933 deletions.
  1. +3 −3 src/app/attributetable/qgsattributetablemodel.cpp
  2. +3 −3 src/app/legend/qgslegendlayer.cpp
  3. +1 −1 src/app/qgsattributedialog.cpp
  4. +3 −3 src/app/qgscontinuouscolordialog.cpp
  5. +23 −23 src/app/qgsgraduatedsymboldialog.cpp
  6. +1 −1 src/app/qgsmaptoolidentify.cpp
  7. +6 −6 src/app/qgsuniquevaluedialog.cpp
  8. +10 −10 src/app/qgsvectorlayerproperties.cpp
  9. +1 −1 src/app/qgsvectorlayerproperties.h
  10. +1 −1 src/core/composer/qgslegendmodel.cpp
  11. +3 −3 src/core/qgsvectorlayer.h
  12. +28 −28 src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp
  13. +92 −92 src/plugins/evis/databaseconnection/evisdatabaseconnection.h
  14. +84 −84 src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp
  15. +16 −16 src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.h
  16. +15 −15 src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.cpp
  17. +22 −22 src/plugins/evis/databaseconnection/evisdatabaselayerfieldselectiongui.h
  18. +9 −9 src/plugins/evis/databaseconnection/evisquerydefinition.cpp
  19. +82 −82 src/plugins/evis/databaseconnection/evisquerydefinition.h
  20. +19 −19 src/plugins/evis/eventbrowser/evisconfiguration.cpp
  21. +17 −17 src/plugins/evis/eventbrowser/evisconfiguration.h
  22. +181 −181 src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
  23. +104 −104 src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.h
  24. +29 −29 src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp
  25. +75 −75 src/plugins/evis/eventbrowser/evisimagedisplaywidget.h
  26. +24 −24 src/plugins/evis/evis.cpp
  27. +43 −43 src/plugins/evis/evis.h
  28. +18 −18 src/plugins/evis/idtool/eviseventidtool.cpp
  29. +20 −20 src/plugins/evis/idtool/eviseventidtool.h
@@ -144,7 +144,7 @@ void QgsAttributeTableModel::layerModified( bool onlyGeometry )

loadLayer();
emit modelChanged();
emit headerDataChanged ( Qt::Horizontal, 0, columnCount());
emit headerDataChanged( Qt::Horizontal, 0, columnCount() );
}

void QgsAttributeTableModel::loadLayer()
@@ -274,12 +274,12 @@ QVariant QgsAttributeTableModel::headerData( int section, Qt::Orientation orient
else
{
QString attributeName = mLayer->attributeAlias( mAttributes[section] );
if(attributeName.isEmpty())
if ( attributeName.isEmpty() )
{
QgsField field = mLayer->pendingFields()[ mAttributes[section] ];
attributeName = field.name();
}
return QVariant(attributeName);
return QVariant( attributeName );
}
}
else return QVariant();
@@ -373,10 +373,10 @@ void QgsLegendLayer::vectorLayerSymbology( const QgsVectorLayer* layer, double w
const QgsFieldMap& fields = layer->pendingFields();
for ( QgsAttributeList::iterator it = classfieldlist.begin(); it != classfieldlist.end(); ++it )
{
QString classfieldname = layer->attributeAlias(*it);
if(classfieldname.isEmpty())
QString classfieldname = layer->attributeAlias( *it );
if ( classfieldname.isEmpty() )
{
classfieldname = fields[*it].name();
classfieldname = fields[*it].name();
}
itemList.push_front( std::make_pair( classfieldname, QPixmap() ) );
}
@@ -103,7 +103,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
const QgsField &field = theFieldMap[it.key()];

//show attribute alias if available
QString myFieldName = vl->attributeDisplayName(it.key());
QString myFieldName = vl->attributeDisplayName( it.key() );
int myFieldType = field.type();
QLabel * mypLabel = new QLabel();
mypInnerLayout->addWidget( mypLabel, index, 0 );
@@ -48,7 +48,7 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
QVariant::Type type = it->type();
if ( type == QVariant::Int || type == QVariant::Double )
{
displayName = mVectorLayer->attributeDisplayName(it.key());
displayName = mVectorLayer->attributeDisplayName( it.key() );
classificationComboBox->addItem( displayName, it.key() );
}
}
@@ -140,7 +140,7 @@ void QgsContinuousColorDialog::apply()

//create the render items for minimum and maximum value
QString minimumString;
if(minimum - floor(minimum) > 0)
if ( minimum - floor( minimum ) > 0 )
{
minimumString = QString::number( minimum, 'f' );
}
@@ -163,7 +163,7 @@ void QgsContinuousColorDialog::apply()
}

QString maximumString;
if(maximum - floor(maximum) > 0)
if ( maximum - floor( maximum ) > 0 )
{
maximumString = QString::number( maximum, 'f' );
}
@@ -40,15 +40,15 @@ QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QD
QString displayName;

for ( QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); ++it )
{
QVariant::Type type = ( *it ).type();
if ( type == QVariant::Int || type == QVariant::Double )
{
QVariant::Type type = ( *it ).type();
if ( type == QVariant::Int || type == QVariant::Double )
{
displayName = layer->attributeDisplayName(it.key());
classificationComboBox->addItem( displayName );
mFieldMap.insert( std::make_pair( displayName, it.key() ) );
}
displayName = layer->attributeDisplayName( it.key() );
classificationComboBox->addItem( displayName );
mFieldMap.insert( std::make_pair( displayName, it.key() ) );
}
}

//restore the correct settings
const QgsGraduatedSymbolRenderer* renderer = dynamic_cast < const QgsGraduatedSymbolRenderer * >( layer->renderer() );
@@ -345,25 +345,25 @@ void QgsGraduatedSymbolDialog::adjustClassification()
{
if ( last_it != quantileBorders.end() )
{
if(*last_it - floor(*last_it) > 0)
if ( *last_it - floor( *last_it ) > 0 )
{
lowerString = QString::number(*last_it, 'f');
lowerString = QString::number( *last_it, 'f' );
}
else
{
lowerString = QString::number(*last_it, 'f', 0);
lowerString = QString::number( *last_it, 'f', 0 );
}
( *symbol_it )->setLowerValue(lowerString);
( *symbol_it )->setLowerValue( lowerString );

if(*it - floor(*it) > 0)
if ( *it - floor( *it ) > 0 )
{
upperString = QString::number(*it, 'f');
upperString = QString::number( *it, 'f' );
}
else
{
upperString = QString::number(*it, 'f', 0);
upperString = QString::number( *it, 'f', 0 );
}
( *symbol_it )->setUpperValue(upperString);
( *symbol_it )->setUpperValue( upperString );


listBoxText = lowerString + " - " + upperString;
@@ -386,28 +386,28 @@ void QgsGraduatedSymbolDialog::adjustClassification()
double upper = minimum + ( maximum - minimum ) / numberofclassesspinbox->value() * ( i + 1 );

QString lowerString;
if(lower - floor(lower) > 0)
if ( lower - floor( lower ) > 0 )
{
lowerString = QString::number(lower, 'f');
lowerString = QString::number( lower, 'f' );
}
else
{
lowerString = QString::number(lower, 'f', 0);
lowerString = QString::number( lower, 'f', 0 );
}

( *symbol_it )->setLowerValue(lowerString);
( *symbol_it )->setLowerValue( lowerString );

QString upperString;
if(upper - floor(upper) > 0)
if ( upper - floor( upper ) > 0 )
{
upperString = QString::number(upper, 'f');
upperString = QString::number( upper, 'f' );
}
else
{
upperString = QString::number(upper, 'f', 0);
upperString = QString::number( upper, 'f', 0 );
}

( *symbol_it )->setUpperValue(upperString);
( *symbol_it )->setUpperValue( upperString );
listBoxText = lowerString + " - " + upperString;

QListWidgetItem * mypItem = new QListWidgetItem( listBoxText );
@@ -337,7 +337,7 @@ void QgsMapToolIdentify::identifyVectorLayer( const QgsPoint& point )
{
featureNode->setText( 1, it->toString() );
}
QString attributeName = layer->attributeDisplayName(it.key());
QString attributeName = layer->attributeDisplayName( it.key() );
mResults->addAttribute( featureNode, attributeName, it->isNull() ? "NULL" : it->toString() );
}

@@ -34,19 +34,19 @@ QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVe
setOrientation( Qt::Vertical );

//find out the fields of mVectorLayer
if(mVectorLayer)
if ( mVectorLayer )
{
//we cannot use unique values for not-commited fields because QgsVectorLayer has no 'unique values' method...
QgsVectorDataProvider* provider = mVectorLayer->dataProvider();
if(provider)
if ( provider )
{
const QgsFieldMap & fields = provider->fields();
QString str;

for ( QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); ++it )
{
str = ( *it ).name();
str = mVectorLayer->attributeDisplayName(it.key());
str = mVectorLayer->attributeDisplayName( it.key() );
mClassificationComboBox->addItem( str, it.key() );
}
}
@@ -57,14 +57,14 @@ QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVe
mClassListWidget->setEditTriggers( QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed );
mClassListWidget->setSortingEnabled( true );

if(mVectorLayer)
if ( mVectorLayer )
{
const QgsUniqueValueRenderer* renderer = dynamic_cast < const QgsUniqueValueRenderer * >( mVectorLayer->renderer() );

if ( renderer )
{
mClassListWidget->clear();
QString field = mVectorLayer->attributeDisplayName(renderer->classificationField());
QString field = mVectorLayer->attributeDisplayName( renderer->classificationField() );
mOldClassificationAttribute = field;
mClassificationComboBox->setCurrentIndex( mClassificationComboBox->findText( field ) );

@@ -291,7 +291,7 @@ void QgsUniqueValueDialog::changeClassificationAttribute()
QgsVectorDataProvider *provider = dynamic_cast<QgsVectorDataProvider *>( mVectorLayer->dataProvider() );
if ( provider )
{
int nr = mClassificationComboBox->itemData(mClassificationComboBox->currentIndex()).toInt();
int nr = mClassificationComboBox->itemData( mClassificationComboBox->currentIndex() ).toInt();
if ( nr == -1 )
{
return;
@@ -175,7 +175,7 @@ void QgsVectorLayerProperties::setRow( int row, int idx, const QgsField &field )
tblAttributes->setItem( row, 2, new QTableWidgetItem( field.typeName() ) );
tblAttributes->setItem( row, 3, new QTableWidgetItem( QString::number( field.length() ) ) );
tblAttributes->setItem( row, 4, new QTableWidgetItem( QString::number( field.precision() ) ) );
tblAttributes->setItem( row, 5, new QTableWidgetItem( field.comment() ) );
tblAttributes->setItem( row, 5, new QTableWidgetItem( field.comment() ) );

for ( int i = 0; i < 6; i++ )
tblAttributes->item( row, i )->setFlags( tblAttributes->item( row, i )->flags() & ~Qt::ItemIsEditable );
@@ -226,7 +226,7 @@ void QgsVectorLayerProperties::setRow( int row, int idx, const QgsField &field )
}

//set the alias for the attribute
tblAttributes->setItem( row, 8, new QTableWidgetItem(layer->attributeAlias(idx)));
tblAttributes->setItem( row, 8, new QTableWidgetItem( layer->attributeAlias( idx ) ) );
}


@@ -385,7 +385,7 @@ void QgsVectorLayerProperties::setDisplayField( QString name )
//! @note in raster props, this method is called sync()
void QgsVectorLayerProperties::reset( void )
{
QObject::disconnect(tblAttributes, SIGNAL(cellChanged(int, int)), this, SLOT(on_tblAttributes_cellChanged(int,int)));
QObject::disconnect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );

// populate the general information
txtDisplayName->setText( layer->name() );
@@ -493,7 +493,7 @@ void QgsVectorLayerProperties::reset( void )
sliderTransparency_valueChanged( 255 - layer->getTransparency() );

loadRows();
QObject::connect(tblAttributes, SIGNAL(cellChanged(int, int)), this, SLOT(on_tblAttributes_cellChanged(int,int)));
QObject::connect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
} // reset()


@@ -1073,23 +1073,23 @@ void QgsVectorLayerProperties::on_pbnSaveStyleAs_clicked()
}
}

void QgsVectorLayerProperties::on_tblAttributes_cellChanged(int row, int column)
void QgsVectorLayerProperties::on_tblAttributes_cellChanged( int row, int column )
{
if(column == 8 && layer) //only consider attribute aliases in this function
if ( column == 8 && layer ) //only consider attribute aliases in this function
{
const QgsFieldMap &fields = layer->pendingFields();
if(row >= fields.size())
if ( row >= fields.size() )
{
return; //index must be wrong
}

QgsFieldMap::const_iterator f_it = fields.constBegin();
f_it += row;
int index = f_it.key();
QTableWidgetItem* aliasItem = tblAttributes->item(row, column);
if(aliasItem)
QTableWidgetItem* aliasItem = tblAttributes->item( row, column );
if ( aliasItem )
{
layer->addAttributeAlias(index, aliasItem->text());
layer->addAttributeAlias( index, aliasItem->text() );
}
}
}
@@ -96,7 +96,7 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
void on_pbnSaveDefaultStyle_clicked();
void on_pbnLoadStyle_clicked();
void on_pbnSaveStyleAs_clicked();
void on_tblAttributes_cellChanged(int row, int column);
void on_tblAttributes_cellChanged( int row, int column );

void addAttribute();
void deleteAttribute();
@@ -110,7 +110,7 @@ int QgsLegendModel::addVectorLayerItems( QStandardItem* layerItem, QgsMapLayer*
QgsFieldMap::const_iterator fieldIt = layerFields.find( *att_it );
if ( fieldIt != layerFields.constEnd() )
{
QString attributeName = vectorLayer->attributeDisplayName(fieldIt.key());
QString attributeName = vectorLayer->attributeDisplayName( fieldIt.key() );
QStandardItem* attributeItem = new QStandardItem( attributeName );
layerItem->setChild( layerItem->rowCount(), 0, attributeItem );
}
@@ -403,15 +403,15 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer

/**Sets an alias (a display name) for attributes to display in dialogs
@note added in version 1.2*/
void addAttributeAlias(int attIndex, QString aliasString);
void addAttributeAlias( int attIndex, QString aliasString );

/**Returns the alias of an attribute name or an empty string if there is no alias
@note added in version 1.2*/
QString attributeAlias(int attributeIndex) const;
QString attributeAlias( int attributeIndex ) const;

/**Convenience function that returns the attribute alias if defined or the field name else
@note added in version 1.2*/
QString attributeDisplayName(int attributeIndex) const;
QString attributeDisplayName( int attributeIndex ) const;

/** delete an attribute field (but does not commit it) */
bool deleteAttribute( int attr );

0 comments on commit 238ba8e

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