Skip to content
Permalink
Browse files

more QGis -> QGis renames

git grep -l "QGis::" src/ | xargs perl -pe "s/QGis::/Qgis::/g" -i.bak
  • Loading branch information
jef-n committed Jul 22, 2016
1 parent aa0b94a commit 578962f3164d4bd8f4b16ec5a5fc76db5a0b1216
@@ -158,10 +158,10 @@ int QgsInterpolator::addVerticesToCache( const QgsGeometry *geom, bool zCoord, d
break;
}
#if 0
case QGis::WKBPolygon25D:
case Qgis::WKBPolygon25D:
hasZValue = true;
//intentional fall-through
case QGis::WKBPolygon:
case Qgis::WKBPolygon:
{
int nRings;
wkbPtr >> nRings;
@@ -203,10 +203,10 @@ int QgsInterpolator::addVerticesToCache( const QgsGeometry *geom, bool zCoord, d
}
break;
}
case QGis::WKBMultiPoint25D:
case Qgis::WKBMultiPoint25D:
hasZValue = true;
//intentional fall-through
case QGis::WKBMultiPoint:
case Qgis::WKBMultiPoint:
{
int nPoints;
wkbPtr >> nPoints;
@@ -228,10 +228,10 @@ int QgsInterpolator::addVerticesToCache( const QgsGeometry *geom, bool zCoord, d
}
break;
}
case QGis::WKBMultiLineString25D:
case Qgis::WKBMultiLineString25D:
hasZValue = true;
//intentional fall-through
case QGis::WKBMultiLineString:
case Qgis::WKBMultiLineString:
{
int nLines;
wkbPtr >> nLines;
@@ -274,10 +274,10 @@ int QgsInterpolator::addVerticesToCache( const QgsGeometry *geom, bool zCoord, d
}
break;
}
case QGis::WKBMultiPolygon25D:
case Qgis::WKBMultiPolygon25D:
hasZValue = true;
//intentional fall-through
case QGis::WKBMultiPolygon:
case Qgis::WKBMultiPolygon:
{
int nPolys;
wkbPtr >> nPolys;
@@ -597,7 +597,7 @@ QgsGeometry* QgsTransectSample::clipBufferLine( const QgsGeometry* stratumGeom,
//int verticesAfter = usedBaseline->asMultiPolyline().count();

//debug: write to file
/*QgsVectorFileWriter debugWriter( "/tmp/debug.shp", "utf-8", QgsFields(), QGis::WKBLineString, &( mStrataLayer->crs() ) );
/*QgsVectorFileWriter debugWriter( "/tmp/debug.shp", "utf-8", QgsFields(), Qgis::WKBLineString, &( mStrataLayer->crs() ) );
QgsFeature debugFeature; debugFeature.setGeometry( usedBaseline );
debugWriter.addFeature( debugFeature );*/
}
@@ -853,7 +853,7 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()
}

delete f;
} // layerWKBType == QGis::WKBPoint
} // layerWKBType == Qgis::WKBPoint
else // Line or poly
{
mNmea->disconnect( this, SLOT( displayGPSInformation( const QgsGPSInformation& ) ) );
@@ -932,14 +932,14 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()
}
}
// Should never get here, as preconditions should have removed any that aren't handled
else // layerWKBType == QGis::WKBPolygon - unknown type
else // layerWKBType == Qgis::WKBPolygon - unknown type
{
QMessageBox::critical( nullptr, tr( "Error" ), tr( "Cannot add feature. "
"Unknown WKB type. Choose a different layer and try again." ) );
connectGpsSlot();
delete f;
return; //unknown wkbtype
} // layerWKBType == QGis::WKBPolygon
} // layerWKBType == Qgis::WKBPolygon

QgsFeatureAction action( tr( "Feature added" ), *f, vlayer, -1, -1, this );
if ( action.addFeature() )
@@ -966,7 +966,7 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()

delete f;
connectGpsSlot();
} // layerWKBType == QGis::WKBPoint
} // layerWKBType == Qgis::WKBPoint
mpCanvas->refresh(); // NOTE: cancelling feature add refreshes canvas, OK does not; this may change, however, so do it anyway

// force focus back to GPS window/ Add Feature button for ease of use by keyboard
@@ -11828,7 +11828,7 @@ LONG WINAPI QgisApp::qgisCrashDump( struct _EXCEPTION_POINTERS *ExceptionInfo )
.arg( QDateTime::currentDateTime().toString( "yyyyMMdd-hhmmss" ) )
.arg( GetCurrentProcessId() )
.arg( GetCurrentThreadId() )
.arg( QGis::QGIS_DEV_VERSION )
.arg( Qgis::QGIS_DEV_VERSION )
);

QString msg;
@@ -171,7 +171,7 @@ class CORE_EXPORT QgsGeometry
*/
Qgis::WkbType wkbType() const;

/** Returns type of the geometry as a QGis::GeometryType
/** Returns type of the geometry as a Qgis::GeometryType
* @see wkbType
*/
Qgis::GeometryType type() const;
@@ -92,14 +92,14 @@ double Qgis::SCALE_PRECISION = 0.9999999999;
// Order must match enum indices
const char* Qgis::qgisUnitTypes[] =
{
QT_TRANSLATE_NOOP( "QGis::UnitType", "meters" ),
QT_TRANSLATE_NOOP( "QGis::UnitType", "feet" ),
QT_TRANSLATE_NOOP( "QGis::UnitType", "degrees" ),
QT_TRANSLATE_NOOP( "QGis::UnitType", "<unknown>" ),
QT_TRANSLATE_NOOP( "QGis::UnitType", "degrees" ),
QT_TRANSLATE_NOOP( "QGis::UnitType", "degrees" ),
QT_TRANSLATE_NOOP( "QGis::UnitType", "degrees" ),
QT_TRANSLATE_NOOP( "QGis::UnitType", "nautical miles" )
QT_TRANSLATE_NOOP( "Qgis::UnitType", "meters" ),
QT_TRANSLATE_NOOP( "Qgis::UnitType", "feet" ),
QT_TRANSLATE_NOOP( "Qgis::UnitType", "degrees" ),
QT_TRANSLATE_NOOP( "Qgis::UnitType", "<unknown>" ),
QT_TRANSLATE_NOOP( "Qgis::UnitType", "degrees" ),
QT_TRANSLATE_NOOP( "Qgis::UnitType", "degrees" ),
QT_TRANSLATE_NOOP( "Qgis::UnitType", "degrees" ),
QT_TRANSLATE_NOOP( "Qgis::UnitType", "nautical miles" )
};

QgsWKBTypes::Type Qgis::fromOldWkbType( Qgis::WkbType type )
@@ -245,7 +245,7 @@ class CORE_EXPORT QgsDataSourceURI
bool mUseEstimatedMetadata;
//! Disable SelectAtId capability (eg. to trigger the attribute table memory model for expensive views)
bool mSelectAtIdDisabled;
//! geometry type (or QGis::WKBUnknown if not specified)
//! geometry type (or Qgis::WKBUnknown if not specified)
QgsWKBTypes::Type mWkbType;
//! SRID or a null string if not specified
QString mSrid;
@@ -36,7 +36,7 @@ class CORE_EXPORT QgsScaleCalculator
* Constructor
* @param dpi Monitor resolution in dots per inch
* @param mapUnits Units of the data on the map. Must match a value from the
* QGis::UnitType enum (Meters, Feet, Degrees)
* Qgis::UnitType enum (Meters, Feet, Degrees)
*/
QgsScaleCalculator( double dpi = 0,
Qgis::UnitType mapUnits = Qgis::Meters );
@@ -140,28 +140,28 @@ QString QgsUnitTypes::toString( Qgis::UnitType unit )
switch ( unit )
{
case Qgis::Meters:
return QCoreApplication::translate( "QGis::UnitType", "meters" );
return QCoreApplication::translate( "Qgis::UnitType", "meters" );

case Qgis::Kilometers:
return QCoreApplication::translate( "QGis::UnitType", "kilometers" );
return QCoreApplication::translate( "Qgis::UnitType", "kilometers" );

case Qgis::Feet:
return QCoreApplication::translate( "QGis::UnitType", "feet" );
return QCoreApplication::translate( "Qgis::UnitType", "feet" );

case Qgis::Yards:
return QCoreApplication::translate( "QGis::UnitType", "yards" );
return QCoreApplication::translate( "Qgis::UnitType", "yards" );

case Qgis::Miles:
return QCoreApplication::translate( "QGis::UnitType", "miles" );
return QCoreApplication::translate( "Qgis::UnitType", "miles" );

case Qgis::Degrees:
return QCoreApplication::translate( "QGis::UnitType", "degrees" );
return QCoreApplication::translate( "Qgis::UnitType", "degrees" );

case Qgis::UnknownUnit:
return QCoreApplication::translate( "QGis::UnitType", "<unknown>" );
return QCoreApplication::translate( "Qgis::UnitType", "<unknown>" );

case Qgis::NauticalMiles:
return QCoreApplication::translate( "QGis::UnitType", "nautical miles" );
return QCoreApplication::translate( "Qgis::UnitType", "nautical miles" );
}
return QString();
}
@@ -611,7 +611,7 @@ Qgis::GeometryType QgsVectorLayer::geometryType() const

// We shouldn't get here, and if we have, other things are likely to
// go wrong. Code that uses the type() return value should be
// rewritten to cope with a value of QGis::Unknown. To make this
// rewritten to cope with a value of Qgis::Unknown. To make this
// need known, the following message is printed every time we get
// here.
QgsDebugMsg( "WARNING: This code should never be reached. Problems may occur..." );
@@ -186,7 +186,7 @@ int QgsBrightnessContrastFilter::adjustColorComponent( int colorComponent, int a
}
else
{
// Semi-transparent pixel. We need to adjust the math since we are using QGis::ARGB32_Premultiplied
// Semi-transparent pixel. We need to adjust the math since we are using Qgis::ARGB32_Premultiplied
// and color values have been premultiplied by alpha
double alphaFactor = alpha / 255.;
double adjustedColor = colorComponent / alphaFactor;
@@ -185,7 +185,7 @@ QgsRasterBlock * QgsHueSaturationFilter::block( int bandNo, QgsRectangle const
myColor.getRgb( &r, &g, &b );
if ( alpha != 255 )
{
// Semi-transparent pixel. We need to adjust the colors since we are using QGis::ARGB32_Premultiplied
// Semi-transparent pixel. We need to adjust the colors since we are using Qgis::ARGB32_Premultiplied
// and color values have been premultiplied by alpha
alphaFactor = alpha / 255.;
r /= alphaFactor;
@@ -151,7 +151,7 @@ class GUI_EXPORT QgsMapTool : public QObject

/** Get search radius in mm. Used by identify, tip etc.
* The values is currently set in identify tool options (move somewhere else?)
* and defaults to QGis::DEFAULT_SEARCH_RADIUS_MM.
* and defaults to Qgis::DEFAULT_SEARCH_RADIUS_MM.
* @note added in 2.3 */
static double searchRadiusMM();

@@ -65,12 +65,12 @@ class GUI_EXPORT QgsRubberBand: public QgsMapCanvasItem
/**
* Creates a new RubberBand.
* @param mapCanvas The map canvas to draw onto. It's CRS will be used map points onto screen coordinates.
* @param geometryType Defines how the data should be drawn onto the screen. (Use QGis::Line, QGis::Polygon or QGis::Point)
* @param geometryType Defines how the data should be drawn onto the screen. (Use Qgis::Line, Qgis::Polygon or Qgis::Point)
*/
QgsRubberBand( QgsMapCanvas* mapCanvas, Qgis::GeometryType geometryType = Qgis::Line );
/**
* Creates a new RubberBand.
* @deprecated Use the constructor which takes QGis::GeometryType as second argument instead
* @deprecated Use the constructor which takes Qgis::GeometryType as second argument instead
* @param mapCanvas The map canvas to draw onto. It's CRS will be used map points onto screen coordinates.
* @param isPolygon true: draw as (multi-)polygon, false draw as (multi-)linestring
*/
@@ -127,12 +127,12 @@ class GUI_EXPORT QgsRubberBand: public QgsMapCanvasItem
/**
* Clears all the geometries in this rubberband.
* Sets the representation type according to geometryType.
* @param geometryType Defines how the data should be drawn onto the screen. (Use QGis::Line, QGis::Polygon or QGis::Point)
* @param geometryType Defines how the data should be drawn onto the screen. (Use Qgis::Line, Qgis::Polygon or Qgis::Point)
*/
void reset( Qgis::GeometryType geometryType = Qgis::Line );

/**
* @deprecated Use the reset method which takes QGis::GeometryType as second argument instead
* @deprecated Use the reset method which takes Qgis::GeometryType as second argument instead
* Clears all the geometries in this rubberband.
* Sets the representation type according to isPolygon.
* @param isPolygon true: draw as (multi-)polygon, false draw as (multi-)linestring
@@ -925,9 +925,9 @@ void QgsRasterHistogramWidget::histoAction( const QString &actionName, bool acti
// TODO - fix gdal provider: changes data type when nodata value is not found
// this prevents us from getting proper min and max values here
minMaxValues[0] = QgsContrastEnhancement::minimumValuePossible(
( QGis::DataType ) mRasterLayer->dataProvider()->dataType( theBandNo ) );
( Qgis::DataType ) mRasterLayer->dataProvider()->dataType( theBandNo ) );
minMaxValues[1] = QgsContrastEnhancement::maximumValuePossible(
( QGis::DataType ) mRasterLayer->dataProvider()->dataType( theBandNo ) );
( Qgis::DataType ) mRasterLayer->dataProvider()->dataType( theBandNo ) );
}
else
{
@@ -1232,12 +1232,12 @@ QPair< QString, QString > QgsRasterHistogramWidget::rendererMinMax( int theBandN
}

// TODO - there are 2 definitions of raster data type that should be unified
// QgsRasterDataProvider::DataType and QGis::DataType
// QgsRasterDataProvider::DataType and Qgis::DataType
// TODO - fix gdal provider: changes data type when nodata value is not found
// this prevents us from getting proper min and max values here
// minStr = QString::number( QgsContrastEnhancement::minimumValuePossible( ( QGis::DataType )
// minStr = QString::number( QgsContrastEnhancement::minimumValuePossible( ( Qgis::DataType )
// mRasterLayer->dataProvider()->dataType( theBandNo ) ) );
// maxStr = QString::number( QgsContrastEnhancement::maximumValuePossible( ( QGis::DataType )
// maxStr = QString::number( QgsContrastEnhancement::maximumValuePossible( ( Qgis::DataType )
// mRasterLayer->dataProvider()->dataType( theBandNo ) ) );

// if we get an empty result, fill with default value (histo min/max)
@@ -161,7 +161,7 @@ short int QgsSpatialQuery::dimensionGeometry( Qgis::GeometryType geomType )
}
return dimGeom;

} // int QgsSpatialQuery::dimensionGeometry(QGis::GeometryType geomType)
} // int QgsSpatialQuery::dimensionGeometry(Qgis::GeometryType geomType)

void QgsSpatialQuery::setQuery( QgsVectorLayer *layerTarget, QgsVectorLayer *layerReference )
{
@@ -955,7 +955,7 @@ bool QgsDb2Provider::addFeatures( QgsFeatureList & flist )
// Don't really do anything with it at this point
#if 0
QgsGeometry *geom = it.geometry();
QGis::WkbType wkbType = geom->wkbType();
Qgis::WkbType wkbType = geom->wkbType();
QgsDebugMsg( QString( "wkbType: %1" ).arg( wkbType ) );
QgsDebugMsg( QString( "mWkbType: %1" ).arg( mWkbType ) );
#endif
@@ -2683,23 +2683,23 @@ void QgsGdalProvider::initBaseDataset()
double myInternalNoDataValue = 123;
switch ( srcDataType( i ) )
{
case QGis::Byte:
case Qgis::Byte:
myInternalNoDataValue = -32768.0;
myInternalGdalDataType = GDT_Int16;
break;
case QGis::Int16:
case Qgis::Int16:
myInternalNoDataValue = -2147483648.0;
myInternalGdalDataType = GDT_Int32;
break;
case QGis::UInt16:
case Qgis::UInt16:
myInternalNoDataValue = -2147483648.0;
myInternalGdalDataType = GDT_Int32;
break;
case QGis::Int32:
case Qgis::Int32:
// We believe that such values is no used in real data
myInternalNoDataValue = -2147483648.0;
break;
case QGis::UInt32:
case Qgis::UInt32:
// We believe that such values is no used in real data
myInternalNoDataValue = 4294967295.0;
break;
@@ -2761,7 +2761,7 @@ char** papszFromStringList( const QStringList& list )

#if 0
bool QgsGdalProvider::create( const QString& format, int nBands,
QGis::DataType type,
Qgis::DataType type,
int width, int height, double* geoTransform,
const QgsCoordinateReferenceSystem& crs,
QStringList createOptions )

1 comment on commit 578962f

@m-kuhn

This comment has been minimized.

Copy link
Member

@m-kuhn m-kuhn commented on 578962f Jul 22, 2016

Mmmmh... Rebasing again...
#3325

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