Skip to content

Commit

Permalink
fix indentation and some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 2, 2016
1 parent 5fd69fd commit 840022d
Show file tree
Hide file tree
Showing 16 changed files with 117 additions and 118 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsaction.sip
Expand Up @@ -90,7 +90,7 @@ class QgsAction
//! Whether to capture output for display when this action is run
bool capture() const;

//! Wheter this action should be shown on the attribute table
//! Whether this action should be shown on the attribute table
bool showInAttributeTable() const;

//! Whether the action is runable on the current platform
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgssqlstatement.sip
Expand Up @@ -18,7 +18,7 @@ class QgsSQLStatement

/** Performs basic validity checks. Basically checking that columns referencing
* a table, references a specified table. Returns true if the validation is
* succesful */
* successful */
bool doBasicValidationChecks( QString& errorMsgOut /Out/ ) const;

//! Returns root node of the statement. Root node is null is parsing has failed
Expand Down
2 changes: 1 addition & 1 deletion python/gui/raster/qgsrasterhistogramwidget.sip
Expand Up @@ -27,7 +27,7 @@ class QgsRasterHistogramWidget : QWidget

signals:
/**
* Emmited when something on the widget has changed.
* Emitted when something on the widget has changed.
* All widgets will fire this event to notify of an internal change.
*/
void widgetChanged();
Expand Down
2 changes: 1 addition & 1 deletion python/gui/raster/qgsrasterrendererwidget.sip
Expand Up @@ -30,7 +30,7 @@ class QgsRasterRendererWidget: QWidget

signals:
/**
* Emmited when something on the widget has changed.
* Emitted when something on the widget has changed.
* All widgets will fire this event to notify of an internal change.
*/
void widgetChanged();
Expand Down
2 changes: 1 addition & 1 deletion python/gui/raster/qgsrastertransparencywidget.sip
Expand Up @@ -15,7 +15,7 @@ class QgsRasterTransparencyWidget: QWidget

signals:
/**
* Emmited when something on the widget has changed.
* Emitted when something on the widget has changed.
* All widgets will fire this event to notify of an internal change.
*/
void widgetChanged();
Expand Down
2 changes: 1 addition & 1 deletion python/gui/raster/qgsrendererrasterpropertieswidget.sip
Expand Up @@ -23,7 +23,7 @@ class QgsRendererRasterPropertiesWidget : QWidget
signals:

/**
* Emmited when something on the widget has changed.
* Emitted when something on the widget has changed.
* All widgets will fire this event to notify of an internal change.
*/
void widgetChanged();
Expand Down
2 changes: 1 addition & 1 deletion python/gui/symbology-ng/qgsrendererv2propertiesdialog.sip
Expand Up @@ -24,7 +24,7 @@ class QgsRendererV2PropertiesDialog : QDialog
void layerVariablesChanged();

/**
* Emmited when something on the widget has changed.
* Emitted when something on the widget has changed.
* All widgets will fire this event to notify of an internal change.
*/
void widgetChanged();
Expand Down
2 changes: 1 addition & 1 deletion python/gui/symbology-ng/qgsrendererv2widget.sip
Expand Up @@ -48,7 +48,7 @@ class QgsRendererV2Widget : QWidget
void layerVariablesChanged();

/**
* Emmited when something on the widget has changed.
* Emitted when something on the widget has changed.
* All widgets will fire this event to notify of an internal change.
*/
void widgetChanged();
Expand Down
2 changes: 1 addition & 1 deletion scripts/chkspelling.sh
Expand Up @@ -17,6 +17,6 @@


RE=$(echo $(cut -d: -f1 scripts/spelling.dat | sed -e 's/^/\\</; s/$/\\>|/;') | sed -e 's/| /|/g; s/|$//;')
EX="\.(svn-base|tmp|xpm|ts|o)|spelling\.dat|Exception_to_GPL_for_Qt.txt|sqlite3.c|qgisstyle|LexerR.py|debian/build*|ms-windows/osgeo4w|ChangeLog|src/plugins/grass/qtermwidget|src/app/gps/qwtpolar-1.0|debian/tmp|src/plugins/dxf2shp_converter/dxflib|python/ext-libs"
EX="\.(svn-base|tmp|xpm|ts|o)|spelling\.dat|Exception_to_GPL_for_Qt.txt|sqlite3.c|qgisstyle|LexerR.py|debian/build*|ms-windows/osgeo4w|ChangeLog|src/plugins/grass/qtermwidget|src/app/gps/qwtpolar-|debian/tmp|src/plugins/dxf2shp_converter/dxflib|python/ext-libs|i18n/"

egrep --exclude=*.{png,svg,db,bz2,pdf,qgs,qml,api,pyc} --exclude-dir=.git --exclude-dir=debian/build* --color=always "$RE" -ir . | egrep -iv "$EX"
9 changes: 4 additions & 5 deletions src/app/qgisapp.cpp
Expand Up @@ -5711,11 +5711,10 @@ void QgisApp::setMapStyleDockLayer( QgsMapLayer* layer )
// We don't set the layer if the dock isn't open mainly to save
// the extra work if it's not needed
if ( mMapStylingDock->isVisible() )
{
{
mMapStyleWidget->setPageFactories( mMapStylePanelFactories );
mMapStyleWidget->setLayer( layer );

}
}
}

void QgisApp::mapStyleDock( bool enabled )
Expand Down Expand Up @@ -8952,12 +8951,12 @@ void QgisApp::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory*
mMapLayerPropertiesFactories.removeAll( factory );
}

void QgisApp::registerMapStylePanelFactory(QgsMapStylePanelFactory *factory)
void QgisApp::registerMapStylePanelFactory( QgsMapStylePanelFactory *factory )
{
mMapStylePanelFactories << factory;
}

void QgisApp::unregisterMapStylePanelFactory(QgsMapStylePanelFactory *factory)
void QgisApp::unregisterMapStylePanelFactory( QgsMapStylePanelFactory *factory )
{
mMapStylePanelFactories.removeAll( factory );
}
Expand Down
8 changes: 4 additions & 4 deletions src/app/qgisappinterface.cpp
Expand Up @@ -485,14 +485,14 @@ void QgisAppInterface::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertie
qgis->unregisterMapLayerPropertiesFactory( factory );
}

void QgisAppInterface::registerMapStylePanelFactory(QgsMapStylePanelFactory *factory)
void QgisAppInterface::registerMapStylePanelFactory( QgsMapStylePanelFactory *factory )
{
qgis->registerMapStylePanelFactory( factory );
qgis->registerMapStylePanelFactory( factory );
}

void QgisAppInterface::unregisterMapStylePanelFactory(QgsMapStylePanelFactory *factory)
void QgisAppInterface::unregisterMapStylePanelFactory( QgsMapStylePanelFactory *factory )
{
qgis->unregisterMapStylePanelFactory( factory );
qgis->unregisterMapStylePanelFactory( factory );
}

//! Menus
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsfieldsproperties.cpp
Expand Up @@ -751,9 +751,9 @@ void QgsFieldsProperties::attributesListCellChanged( int row, int column )
{
QTableWidgetItem *nameItem = mFieldsList->item( row, column );
if ( !nameItem ||
nameItem->text().isEmpty() ||
!mLayer->fields().exists( row ) ||
mLayer->fields().at( row ).name() == nameItem->text() )
nameItem->text().isEmpty() ||
!mLayer->fields().exists( row ) ||
mLayer->fields().at( row ).name() == nameItem->text() )
return;

mLayer->beginEditCommand( tr( "Rename attribute" ) );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmapstylingwidget.h
Expand Up @@ -41,10 +41,10 @@ class APP_EXPORT QgsMapStylingWidget : public QWidget, private Ui::QgsMapStyling
{
Q_OBJECT
public:
QgsMapStylingWidget(QgsMapCanvas *canvas, QList<QgsMapStylePanelFactory *> pages, QWidget *parent = 0 );
QgsMapStylingWidget( QgsMapCanvas *canvas, QList<QgsMapStylePanelFactory *> pages, QWidget *parent = 0 );
QgsMapLayer* layer() { return mCurrentLayer; }

void setPageFactories( QList<QgsMapStylePanelFactory*> factories) { mPageFactories = factories; }
void setPageFactories( QList<QgsMapStylePanelFactory*> factories ) { mPageFactories = factories; }

signals:
void styleChanged( QgsMapLayer* layer );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapstylepanel.cpp
@@ -1,6 +1,6 @@
#include "qgsmapstylepanel.h"

QgsMapStylePanel::QgsMapStylePanel( QgsMapLayer * /*layer*/, QgsMapCanvas * /*canvas*/, QWidget *parent )
QgsMapStylePanel::QgsMapStylePanel( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent )
: QWidget( parent )
{

Expand Down
184 changes: 92 additions & 92 deletions src/gui/qgsmapstylepanel.h
@@ -1,92 +1,92 @@
#ifndef QGSMAPSTYLEPANEL_H
#define QGSMAPSTYLEPANEL_H

#include <QWidget>
#include <QIcon>

#include "qgsmaplayer.h"

class QgsMapCanvas;

/** \ingroup gui
* \class A panel widget that can be shown in the map style dock
* \note added in QGIS 2.16
*/
class GUI_EXPORT QgsMapStylePanel : public QWidget
{
Q_OBJECT
public:

/**
* @brief A panel widget that can be shown in the map style dock
* @param layer The layer active in the dock.
* @param canvas The canvas object.
* @param parent The parent of the widget.
* @note The widget is created each time the panel is selected in the dock.
* Keep the loading light as possible for speed in the UI.
*/
QgsMapStylePanel( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget *parent = 0 );

signals:
/**
* @brief Nofity the map style dock that something has changed and
* we need to update the map.
* You should emit this when any of the widgets are changed if live
* update is enabled apply() will get called to apply the changes to the layer.
*/
void widgetChanged();

public slots:
/**
* @brief Called when changes to the layer need to be made.
* Will be called when live update is enabled.
*/
virtual void apply() = 0;
};


/** \ingroup gui
* \class QgsMapStylePanelFactory
* \note added in QGIS 2.16
*/
class GUI_EXPORT QgsMapStylePanelFactory
{
public:
/** Constructor */
QgsMapStylePanelFactory();

/** Destructor */
virtual ~QgsMapStylePanelFactory();

/**
* @brief The icon that will be shown in the UI for the panel.
* @return A QIcon for the panel icon.
*/
virtual QIcon icon() = 0;

/**
* @brief The title of the panel..
* @note This may or may not be shown to the user.
* @return Title of the panel
*/
virtual QString title() = 0;

/**
* @brief Supported layer type for the widget.
* @return The layer type this widget is supported for.
*/
virtual QgsMapLayer::LayerType layerType() = 0;

/**
* @brief Factory fucntion to create the widget on demand as needed by the dock.
* @note This function is called each time the panel is selected. Keep it light for better UX.
* @param layer The active layer in the dock.
* @param canvas The map canvas.
* @param parent The parent of the widget.
* @return A new QgsMapStylePanel which is shown in the map style dock.
*/
virtual QgsMapStylePanel* createPanel( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget* parent ) = 0;
};


#endif // QGSMAPSTYLEPANEL_H
#ifndef QGSMAPSTYLEPANEL_H
#define QGSMAPSTYLEPANEL_H

#include <QWidget>
#include <QIcon>

#include "qgsmaplayer.h"

class QgsMapCanvas;

/** \ingroup gui
* \class A panel widget that can be shown in the map style dock
* \note added in QGIS 2.16
*/
class GUI_EXPORT QgsMapStylePanel : public QWidget
{
Q_OBJECT
public:

/**
* @brief A panel widget that can be shown in the map style dock
* @param layer The layer active in the dock.
* @param canvas The canvas object.
* @param parent The parent of the widget.
* @note The widget is created each time the panel is selected in the dock.
* Keep the loading light as possible for speed in the UI.
*/
QgsMapStylePanel( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget *parent = 0 );

signals:
/**
* @brief Nofity the map style dock that something has changed and
* we need to update the map.
* You should emit this when any of the widgets are changed if live
* update is enabled apply() will get called to apply the changes to the layer.
*/
void widgetChanged();

public slots:
/**
* @brief Called when changes to the layer need to be made.
* Will be called when live update is enabled.
*/
virtual void apply() = 0;
};


/** \ingroup gui
* \class QgsMapStylePanelFactory
* \note added in QGIS 2.16
*/
class GUI_EXPORT QgsMapStylePanelFactory
{
public:
/** Constructor */
QgsMapStylePanelFactory();

/** Destructor */
virtual ~QgsMapStylePanelFactory();

/**
* @brief The icon that will be shown in the UI for the panel.
* @return A QIcon for the panel icon.
*/
virtual QIcon icon() = 0;

/**
* @brief The title of the panel..
* @note This may or may not be shown to the user.
* @return Title of the panel
*/
virtual QString title() = 0;

/**
* @brief Supported layer type for the widget.
* @return The layer type this widget is supported for.
*/
virtual QgsMapLayer::LayerType layerType() = 0;

/**
* @brief Factory fucntion to create the widget on demand as needed by the dock.
* @note This function is called each time the panel is selected. Keep it light for better UX.
* @param layer The active layer in the dock.
* @param canvas The map canvas.
* @param parent The parent of the widget.
* @return A new QgsMapStylePanel which is shown in the map style dock.
*/
virtual QgsMapStylePanel* createPanel( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget* parent ) = 0;
};


#endif // QGSMAPSTYLEPANEL_H
4 changes: 2 additions & 2 deletions src/providers/arcgisrest/qgsafsprovider.cpp
Expand Up @@ -160,7 +160,7 @@ bool QgsAfsProvider::getFeature( const QgsFeatureId &id, QgsFeature &f, bool fet
if ( it != mCache.end() )
{
f = it.value();
return filterRect.isNull() || f.geometry()->intersects(filterRect);
return filterRect.isNull() || f.geometry()->intersects( filterRect );
}

// Determine attributes to fetch
Expand Down Expand Up @@ -243,7 +243,7 @@ bool QgsAfsProvider::getFeature( const QgsFeatureId &id, QgsFeature &f, bool fet
}
f = mCache[id];
Q_ASSERT( f.isValid() );
return filterRect.isNull() || f.geometry()->intersects(filterRect);
return filterRect.isNull() || f.geometry()->intersects( filterRect );
}

void QgsAfsProvider::setDataSourceUri( const QString &uri )
Expand Down

0 comments on commit 840022d

Please sign in to comment.