mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Update indentation
This commit is contained in:
parent
3703bf7396
commit
65e2dda468
@ -99,9 +99,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
|
||||
" which can be found in the tab <strong>%2</strong>."
|
||||
" The other move tool ( <img src=\":/images/themes/default/mActionMoveItemContent.svg\"/> )"
|
||||
" allows you to move the map content within a map frame." )
|
||||
.arg( tr( "Position and Size" ) )
|
||||
.arg( tr( "Item Properties" ) )
|
||||
);
|
||||
.arg( tr( "Position and Size" ) )
|
||||
.arg( tr( "Item Properties" ) )
|
||||
);
|
||||
addGuiTip( myTip );
|
||||
addGuiTip( myTip );
|
||||
// This tip contributed by Andreas Neumann
|
||||
@ -125,9 +125,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
|
||||
" checkbox and selecting a map frame. Whenever you change the rotation"
|
||||
" value of a linked map, the north arrow will now automatically adjust"
|
||||
" its rotation." )
|
||||
.arg( tr( "Add Image" ) )
|
||||
.arg( tr( "Sync with map" ) )
|
||||
);
|
||||
.arg( tr( "Add Image" ) )
|
||||
.arg( tr( "Sync with map" ) )
|
||||
);
|
||||
addGuiTip( myTip );
|
||||
addGuiTip( myTip );
|
||||
// This tip contributed by Andreas Neumann
|
||||
@ -144,9 +144,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
|
||||
" out and pan the map. Scroll forwards to zoom in, scroll backwards to"
|
||||
" zoom out and press and hold the scroll wheel down to pan the map. You"
|
||||
" can configure the zoom scale factor in the <strong> %1 -> %2 </strong> panel." )
|
||||
.arg( tr( "Options" ) )
|
||||
.arg( tr( "Map tools" ) )
|
||||
);
|
||||
.arg( tr( "Options" ) )
|
||||
.arg( tr( "Map tools" ) )
|
||||
);
|
||||
addGuiTip( myTip );
|
||||
addGuiTip( myTip );
|
||||
// by Tim
|
||||
@ -196,9 +196,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
|
||||
" contributed by the user community that can be"
|
||||
" installed via this same menu. Don't miss out on all QGIS has to offer!"
|
||||
" Check out the plugins and see what they can do for you." )
|
||||
.arg( tr( "Plugins" ) )
|
||||
.arg( tr( "Manage and Install Plugins..." ) )
|
||||
);
|
||||
.arg( tr( "Plugins" ) )
|
||||
.arg( tr( "Manage and Install Plugins..." ) )
|
||||
);
|
||||
addGuiTip( myTip );
|
||||
addGenericTip( myTip );
|
||||
// by yjacolin
|
||||
@ -232,11 +232,11 @@ QgsTipFactory::QgsTipFactory() : QObject()
|
||||
myTip.setContent( tr( "If you have a number of aerial photos spread across a wide area, instead of "
|
||||
"loading each file as a separate layer you can treat them all as a single layer "
|
||||
"by using a .vrt file. "
|
||||
"To create a .vrt, go to <strong> %1 -> %2 -> %3</strong>.")
|
||||
.arg( tr( "Raster" ) )
|
||||
.arg( tr( "Miscellaneous" ) )
|
||||
.arg( tr( "Build Virtual Raster (Catalog)" ) )
|
||||
);
|
||||
"To create a .vrt, go to <strong> %1 -> %2 -> %3</strong>." )
|
||||
.arg( tr( "Raster" ) )
|
||||
.arg( tr( "Miscellaneous" ) )
|
||||
.arg( tr( "Build Virtual Raster (Catalog)" ) )
|
||||
);
|
||||
addGuiTip( myTip );
|
||||
// by Harrissou Sant-anna
|
||||
myTip.setTitle( tr( "Switch quickly between different styles of the layer" ) );
|
||||
@ -245,17 +245,17 @@ QgsTipFactory::QgsTipFactory() : QObject()
|
||||
" diagram, fields form, actions...) as you want. Then, simply switch between styles"
|
||||
" from the context menu of the layer in <strong>%1</strong> to automatically"
|
||||
" get different custom representations of your data." )
|
||||
.arg( tr( "Layers Panel" ) )
|
||||
);
|
||||
.arg( tr( "Layers Panel" ) )
|
||||
);
|
||||
addGuiTip( myTip );
|
||||
// by Harrissou Sant-anna
|
||||
myTip.setTitle( tr( "Live update rendering" ) );
|
||||
myTip.setContent( tr( "Press F7 to activate the <strong>%1</strong> panel from which you can"
|
||||
" easily and quickly configure the layer rendering. Check the <strong>%2</strong>"
|
||||
" option to automatically apply to the map canvas each of your modifications." )
|
||||
.arg( tr( "Layer Styling" ) )
|
||||
.arg( tr( "Live update" ) )
|
||||
);
|
||||
.arg( tr( "Layer Styling" ) )
|
||||
.arg( tr( "Live update" ) )
|
||||
);
|
||||
addGuiTip( myTip );
|
||||
// by Harrissou Sant-anna
|
||||
myTip.setTitle( tr( "Print or export a specific feature from an atlas composition" ) );
|
||||
@ -278,9 +278,9 @@ QgsTipFactory::QgsTipFactory() : QObject()
|
||||
myTip.setContent( tr( "QGIS provides you with a list of predefined shortcuts you can use to speed"
|
||||
" your workflow. These are available under <strong> %1 -> %2 </strong>"
|
||||
" menu and can be extended and customized for any dialog or tool." )
|
||||
.arg( tr( "Settings" ) )
|
||||
.arg( tr( "Keyboard Shortcuts" ) )
|
||||
);
|
||||
.arg( tr( "Settings" ) )
|
||||
.arg( tr( "Keyboard Shortcuts" ) )
|
||||
);
|
||||
addGuiTip( myTip );
|
||||
|
||||
/* Template for adding more tips
|
||||
|
@ -819,29 +819,29 @@ QStringList QgsGeometryUtils::wktGetChildBlocks( const QString &wkt, const QStri
|
||||
return blocks;
|
||||
}
|
||||
|
||||
QgsPointV2 QgsGeometryUtils::midpoint(const QgsPointV2 &pt1, const QgsPointV2 &pt2)
|
||||
QgsPointV2 QgsGeometryUtils::midpoint( const QgsPointV2 &pt1, const QgsPointV2 &pt2 )
|
||||
{
|
||||
QgsWkbTypes::Type pType( QgsWkbTypes::Point );
|
||||
QgsWkbTypes::Type pType( QgsWkbTypes::Point );
|
||||
|
||||
|
||||
double x = ( pt1.x() + pt2.x() ) / 2.0;
|
||||
double y = ( pt1.y() + pt2.y() ) / 2.0;
|
||||
double z = 0.0;
|
||||
double m = 0.0;
|
||||
double x = ( pt1.x() + pt2.x() ) / 2.0;
|
||||
double y = ( pt1.y() + pt2.y() ) / 2.0;
|
||||
double z = 0.0;
|
||||
double m = 0.0;
|
||||
|
||||
if ( pt1.is3D() || pt2.is3D() )
|
||||
{
|
||||
pType = QgsWkbTypes::addZ( pType );
|
||||
z = ( pt1.z() + pt2.z()) / 2.0;
|
||||
}
|
||||
if ( pt1.is3D() || pt2.is3D() )
|
||||
{
|
||||
pType = QgsWkbTypes::addZ( pType );
|
||||
z = ( pt1.z() + pt2.z() ) / 2.0;
|
||||
}
|
||||
|
||||
if ( pt1.isMeasure() || pt2.isMeasure() )
|
||||
{
|
||||
pType = QgsWkbTypes::addM( pType );
|
||||
m = ( pt1.m() + pt2.m()) / 2.0;
|
||||
}
|
||||
if ( pt1.isMeasure() || pt2.isMeasure() )
|
||||
{
|
||||
pType = QgsWkbTypes::addM( pType );
|
||||
m = ( pt1.m() + pt2.m() ) / 2.0;
|
||||
}
|
||||
|
||||
return QgsPointV2( pType, x, y, z, m );
|
||||
return QgsPointV2( pType, x, y, z, m );
|
||||
}
|
||||
|
||||
double QgsGeometryUtils::lineAngle( double x1, double y1, double x2, double y2 )
|
||||
|
@ -438,12 +438,12 @@ QPointF QgsPointV2::toQPointF() const
|
||||
|
||||
double QgsPointV2::distance( double x, double y ) const
|
||||
{
|
||||
return sqrt( ( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) );
|
||||
return sqrt(( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) );
|
||||
}
|
||||
|
||||
double QgsPointV2::distance( const QgsPointV2& other ) const
|
||||
{
|
||||
return sqrt( ( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) );
|
||||
return sqrt(( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) );
|
||||
}
|
||||
|
||||
double QgsPointV2::distanceSquared( double x, double y ) const
|
||||
@ -451,19 +451,19 @@ double QgsPointV2::distanceSquared( double x, double y ) const
|
||||
return ( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y );
|
||||
}
|
||||
|
||||
double QgsPointV2::distanceSquared( const QgsPointV2& other) const
|
||||
double QgsPointV2::distanceSquared( const QgsPointV2& other ) const
|
||||
{
|
||||
return ( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) ;
|
||||
}
|
||||
|
||||
double QgsPointV2::distance3D( double x, double y, double z ) const
|
||||
{
|
||||
return sqrt( ( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) + ( mZ - z ) * ( mZ - z ) );
|
||||
return sqrt(( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) + ( mZ - z ) * ( mZ - z ) );
|
||||
}
|
||||
|
||||
double QgsPointV2::distance3D( const QgsPointV2& other ) const
|
||||
{
|
||||
return sqrt( ( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) + ( mZ - other.z() ) * ( mZ - other.z() ) );
|
||||
return sqrt(( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) + ( mZ - other.z() ) * ( mZ - other.z() ) );
|
||||
}
|
||||
|
||||
double QgsPointV2::distanceSquared3D( double x, double y, double z ) const
|
||||
@ -471,7 +471,7 @@ double QgsPointV2::distanceSquared3D( double x, double y, double z ) const
|
||||
return ( mX - x ) * ( mX - x ) + ( mY - y ) * ( mY - y ) + ( mZ - z ) * ( mZ - z );
|
||||
}
|
||||
|
||||
double QgsPointV2::distanceSquared3D( const QgsPointV2& other) const
|
||||
double QgsPointV2::distanceSquared3D( const QgsPointV2& other ) const
|
||||
{
|
||||
return ( mX - other.x() ) * ( mX - other.x() ) + ( mY - other.y() ) * ( mY - other.y() ) + ( mZ - other.z() ) * ( mZ - other.z() );
|
||||
}
|
||||
|
@ -819,23 +819,23 @@ void TestQgsGeometry::point()
|
||||
QCOMPARE( QgsPointV2( 1, -2 ).distanceSquared( 1, -4 ), 4.0 );
|
||||
|
||||
// distance 3D
|
||||
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( QgsPointV2( 1, 1 )), 2.0 );
|
||||
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( 1, 1, 0 ), 2.0 );
|
||||
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( QgsPointV2 ( QgsWkbTypes::PointZ, 2, 2, 2, 0 )), 12.0 );
|
||||
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( 2, 2, 2 ), 12.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ).distanceSquared3D( QgsPointV2( 1, 1 )), 6.0 );
|
||||
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( QgsPointV2( 1, 1 ) ), 2.0 );
|
||||
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( 1, 1, 0 ), 2.0 );
|
||||
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ) ), 12.0 );
|
||||
QCOMPARE( QgsPointV2( 0, 0 ).distanceSquared3D( 2, 2, 2 ), 12.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ).distanceSquared3D( QgsPointV2( 1, 1 ) ), 6.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ).distanceSquared3D( 1, 1, 0 ), 6.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( QgsPointV2( 0, 0 )), 12.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( 0, 0, 0 ), 12.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 )), 48.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( QgsPointV2( 0, 0 ) ), 12.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( 0, 0, 0 ), 12.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2, 0 ) ), 48.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, -2, -2, -2, 0 ).distanceSquared3D( 2, 2, 2 ), 48.0 );
|
||||
|
||||
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 3, 2, 0 )), 2.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 3, 2, 0 ) ), 2.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( 1, 3, 2 ), 2.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 4, 0 )), 2.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 4, 0 ) ), 2.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, 2, 0 ).distance3D( 1, 1, 4 ), 2.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -4, 0 )), 2.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -2, 0 ).distance3D( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -4, 0 ) ), 2.0 );
|
||||
QCOMPARE( QgsPointV2( QgsWkbTypes::PointZ, 1, 1, -2, 0 ).distance3D( 1, 1, -4 ), 2.0 );
|
||||
|
||||
// azimuth
|
||||
|
@ -542,11 +542,11 @@ void TestQgsGeometryUtils::testAngleThreePoints()
|
||||
|
||||
void TestQgsGeometryUtils::testMidPoint()
|
||||
{
|
||||
QgsPointV2 p1( 4, 6 );
|
||||
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( 2, 2 ) ), QgsPointV2( 3, 4 ) );
|
||||
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2 ) ), QgsPointV2( QgsWkbTypes::PointZ, 3, 4, 1 ) );
|
||||
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointM, 2, 2, 0, 2 ) ), QgsPointV2( QgsWkbTypes::PointM, 3, 4, 0, 1 ) );
|
||||
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointZM, 2, 2, 2, 2 ) ), QgsPointV2( QgsWkbTypes::PointZM, 3, 4, 1, 1 ) );
|
||||
QgsPointV2 p1( 4, 6 );
|
||||
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( 2, 2 ) ), QgsPointV2( 3, 4 ) );
|
||||
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointZ, 2, 2, 2 ) ), QgsPointV2( QgsWkbTypes::PointZ, 3, 4, 1 ) );
|
||||
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointM, 2, 2, 0, 2 ) ), QgsPointV2( QgsWkbTypes::PointM, 3, 4, 0, 1 ) );
|
||||
QCOMPARE( QgsGeometryUtils::midpoint( p1, QgsPointV2( QgsWkbTypes::PointZM, 2, 2, 2, 2 ) ), QgsPointV2( QgsWkbTypes::PointZM, 3, 4, 1, 1 ) );
|
||||
}
|
||||
|
||||
QGSTEST_MAIN( TestQgsGeometryUtils )
|
||||
|
Loading…
x
Reference in New Issue
Block a user