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 //! Whether to capture output for display when this action is run
bool capture() const; 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; bool showInAttributeTable() const;


//! Whether the action is runable on the current platform //! 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 /** Performs basic validity checks. Basically checking that columns referencing
* a table, references a specified table. Returns true if the validation is * a table, references a specified table. Returns true if the validation is
* succesful */ * successful */
bool doBasicValidationChecks( QString& errorMsgOut /Out/ ) const; bool doBasicValidationChecks( QString& errorMsgOut /Out/ ) const;


//! Returns root node of the statement. Root node is null is parsing has failed //! 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: 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. * All widgets will fire this event to notify of an internal change.
*/ */
void widgetChanged(); 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: 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. * All widgets will fire this event to notify of an internal change.
*/ */
void widgetChanged(); 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: 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. * All widgets will fire this event to notify of an internal change.
*/ */
void widgetChanged(); 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: 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. * All widgets will fire this event to notify of an internal change.
*/ */
void widgetChanged(); 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(); 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. * All widgets will fire this event to notify of an internal change.
*/ */
void widgetChanged(); 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(); 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. * All widgets will fire this event to notify of an internal change.
*/ */
void widgetChanged(); 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/|$//;') 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" 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 // We don't set the layer if the dock isn't open mainly to save
// the extra work if it's not needed // the extra work if it's not needed
if ( mMapStylingDock->isVisible() ) if ( mMapStylingDock->isVisible() )
{ {
mMapStyleWidget->setPageFactories( mMapStylePanelFactories ); mMapStyleWidget->setPageFactories( mMapStylePanelFactories );
mMapStyleWidget->setLayer( layer ); mMapStyleWidget->setLayer( layer );

}
}
} }


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


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


void QgisApp::unregisterMapStylePanelFactory(QgsMapStylePanelFactory *factory) void QgisApp::unregisterMapStylePanelFactory( QgsMapStylePanelFactory *factory )
{ {
mMapStylePanelFactories.removeAll( 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 ); 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 //! 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 ); QTableWidgetItem *nameItem = mFieldsList->item( row, column );
if ( !nameItem || if ( !nameItem ||
nameItem->text().isEmpty() || nameItem->text().isEmpty() ||
!mLayer->fields().exists( row ) || !mLayer->fields().exists( row ) ||
mLayer->fields().at( row ).name() == nameItem->text() ) mLayer->fields().at( row ).name() == nameItem->text() )
return; return;


mLayer->beginEditCommand( tr( "Rename attribute" ) ); 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 Q_OBJECT
public: public:
QgsMapStylingWidget(QgsMapCanvas *canvas, QList<QgsMapStylePanelFactory *> pages, QWidget *parent = 0 ); QgsMapStylingWidget( QgsMapCanvas *canvas, QList<QgsMapStylePanelFactory *> pages, QWidget *parent = 0 );
QgsMapLayer* layer() { return mCurrentLayer; } QgsMapLayer* layer() { return mCurrentLayer; }


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


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


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


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


#include <QWidget> #include <QWidget>
#include <QIcon> #include <QIcon>


#include "qgsmaplayer.h" #include "qgsmaplayer.h"


class QgsMapCanvas; class QgsMapCanvas;


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


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


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


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




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


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


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


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


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


/** /**
* @brief Factory fucntion to create the widget on demand as needed by the dock. * @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. * @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 layer The active layer in the dock.
* @param canvas The map canvas. * @param canvas The map canvas.
* @param parent The parent of the widget. * @param parent The parent of the widget.
* @return A new QgsMapStylePanel which is shown in the map style dock. * @return A new QgsMapStylePanel which is shown in the map style dock.
*/ */
virtual QgsMapStylePanel* createPanel( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget* parent ) = 0; virtual QgsMapStylePanel* createPanel( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget* parent ) = 0;
}; };




#endif // QGSMAPSTYLEPANEL_H #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() ) if ( it != mCache.end() )
{ {
f = it.value(); f = it.value();
return filterRect.isNull() || f.geometry()->intersects(filterRect); return filterRect.isNull() || f.geometry()->intersects( filterRect );
} }


// Determine attributes to fetch // 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]; f = mCache[id];
Q_ASSERT( f.isValid() ); Q_ASSERT( f.isValid() );
return filterRect.isNull() || f.geometry()->intersects(filterRect); return filterRect.isNull() || f.geometry()->intersects( filterRect );
} }


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

0 comments on commit 840022d

Please sign in to comment.