Skip to content
Permalink
Browse files
automatic indentation update (r10594-r10876)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10877 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jun 2, 2009
1 parent e00f490 commit a72d11b
Show file tree
Hide file tree
Showing 44 changed files with 680 additions and 670 deletions.
@@ -22,10 +22,10 @@
#include "qgsattributetabledelegate.h"
#include "qgsvectordataprovider.h"

QWidget * QgsAttributeTableDelegate::createEditor(
QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const
QWidget * QgsAttributeTableDelegate::createEditor(
QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const
{
QWidget *editor = QItemDelegate::createEditor( parent, option, index );

@@ -51,9 +51,9 @@ QWidget * QgsAttributeTableDelegate::createEditor(
}


void QgsAttributeTableDelegate::paint( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
void QgsAttributeTableDelegate::paint( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
{
QItemDelegate::paint( painter, option, index );

@@ -25,22 +25,22 @@ class QPainter;

class QgsAttributeTableDelegate : public QItemDelegate
{
Q_OBJECT;
Q_OBJECT;
public:
/** Constructor */
QgsAttributeTableDelegate( QObject* parent = NULL ) :
QItemDelegate( parent ) {};
/** Used to create an editor for when the user tries to
QgsAttributeTableDelegate( QObject* parent = NULL ) :
QItemDelegate( parent ) {};
/** Used to create an editor for when the user tries to
* change the contents of a cell */
QWidget * createEditor(
QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const;
QWidget * createEditor(
QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const;
/** Overloads the paint method form the QItemDelegate bas class */
void paint(
QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const;
void paint(
QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const;
};

#endif //QGSATTRIBUTETABLEDELEGATE_H
@@ -425,19 +425,19 @@ void QgsAttributeTableDialog::doSearch( QString searchString )

QApplication::setOverrideCursor( Qt::WaitCursor );
mSelectedFeatures.clear();

if ( cbxSearchSelectedOnly->isChecked() )
{
QgsFeatureList selectedFeatures = mLayer->selectedFeatures();
for (QgsFeatureList::ConstIterator it = selectedFeatures.begin(); it != selectedFeatures.end(); ++it)
for ( QgsFeatureList::ConstIterator it = selectedFeatures.begin(); it != selectedFeatures.end(); ++it )
{
if ( searchTree->checkAgainst( mLayer->pendingFields(), it->attributeMap() ) )
mSelectedFeatures << it->id();

// check if there were errors during evaluating
if ( searchTree->hasError() )
break;
}
}
}
else
{
@@ -24,8 +24,8 @@
//QGIS Includes
#include "qgsfeature.h" //QgsAttributeMap
#include "qgsvectorlayer.h" //QgsAttributeList
#include "qgsattributetablemodel.h"
#include "qgsattributetableidcolumnpair.h"
#include "qgsattributetablemodel.h"
#include "qgsattributetableidcolumnpair.h"

class QgsAttributeTableMemoryModel: public QgsAttributeTableModel
{
@@ -24,7 +24,7 @@
//QGIS Includes
#include "qgsfeature.h" //QgsAttributeMap
#include "qgsvectorlayer.h" //QgsAttributeList
#include "qgsattributetableidcolumnpair.h"
#include "qgsattributetableidcolumnpair.h"

class QgsAttributeTableModel: public QAbstractTableModel
{
@@ -23,7 +23,7 @@ class QgsVectorLayer;

class QgsAttributeTableView: public QTableView
{
//private slots:
//private slots:
//void setRows(int rows);

public:
@@ -779,10 +779,10 @@ void QgsComposer::on_mActionSaveAsTemplate_activated( void )

QFileInfo saveFileInfo( saveFileName );
//check if suffix has been added
if(saveFileInfo.suffix().isEmpty())
if ( saveFileInfo.suffix().isEmpty() )
{
QString saveFileNameWithSuffix = saveFileName.append(".qpt");
saveFileInfo = QFileInfo(saveFileNameWithSuffix);
QString saveFileNameWithSuffix = saveFileName.append( ".qpt" );
saveFileInfo = QFileInfo( saveFileNameWithSuffix );
}
settings.setValue( "UI/LastComposerTemplateDir", saveFileInfo.absolutePath() );

@@ -156,17 +156,17 @@ void QgsComposerMapWidget::on_mSetToMapCanvasExtentButton_clicked()
double currentWidthHeightRatio = currentMapExtent.width() / currentMapExtent.height();
double newWidthHeightRatio = newExtent.width() / newExtent.height();

if(currentWidthHeightRatio < newWidthHeightRatio)
{
if ( currentWidthHeightRatio < newWidthHeightRatio )
{
//enlarge height of new extent
double newHeight = newExtent.width() / currentWidthHeightRatio;
newExtent.setYMinimum(newExtent.yMaximum() - newHeight);
}
else if(currentWidthHeightRatio > newWidthHeightRatio)
newExtent.setYMinimum( newExtent.yMaximum() - newHeight );
}
else if ( currentWidthHeightRatio > newWidthHeightRatio )
{
//enlarge width of new extent
double newWidth = currentWidthHeightRatio * newExtent.height();
newExtent.setXMaximum(newExtent.xMinimum() + newWidth);
newExtent.setXMaximum( newExtent.xMinimum() + newWidth );
}

//fill text into line edits
@@ -552,7 +552,7 @@ void QgisApp::createActions()
connect( mActionOpenProject, SIGNAL( triggered() ), this, SLOT( fileOpen() ) );

mActionSaveProject = new QAction( getThemeIcon( "mActionFileSave.png" ), tr( "&Save Project" ), this );
shortcuts->registerAction( mActionSaveProject, tr( "Ctrl+S", "Save Project" ));
shortcuts->registerAction( mActionSaveProject, tr( "Ctrl+S", "Save Project" ) );
mActionSaveProject->setStatusTip( tr( "Save Project" ) );
connect( mActionSaveProject, SIGNAL( triggered() ), this, SLOT( fileSave() ) );

0 comments on commit a72d11b

Please sign in to comment.