void QgsAtlasComposition::nextFeature() { mCurrentFeatureNo++; if ( mCurrentFeatureNo >= mFeatureIds.size() ) { mCurrentFeatureNo = mFeatureIds.size() - 1; } prepareForFeature( mCurrentFeatureNo ); }
void QgsAtlasComposition::prevFeature() { mCurrentFeatureNo--; if ( mCurrentFeatureNo < 0 ) { mCurrentFeatureNo = 0; } prepareForFeature( mCurrentFeatureNo ); }
bool QgsLayoutAtlas::next() { int newFeatureNo = mCurrentFeatureNo + 1; if ( newFeatureNo >= mFeatureIds.size() ) { return false; } return prepareForFeature( newFeatureNo ); }
void QgsAtlasComposition::nextFeature() { int newFeatureNo = mCurrentFeatureNo + 1; if ( newFeatureNo >= mFeatureIds.size() ) { newFeatureNo = mFeatureIds.size() - 1; } prepareForFeature( newFeatureNo ); }
void QgsAtlasComposition::prevFeature() { int newFeatureNo = mCurrentFeatureNo - 1; if ( newFeatureNo < 0 ) { newFeatureNo = 0; } prepareForFeature( newFeatureNo ); }
bool QgsLayoutAtlas::previous() { int newFeatureNo = mCurrentFeatureNo - 1; if ( newFeatureNo < 0 ) { return false; } return prepareForFeature( newFeatureNo ); }
bool QgsAtlasComposition::prepareForFeature( const QgsFeature * feat ) { int featureI = mFeatureIds.indexOf( feat->id() ); if ( featureI < 0 ) { //feature not found return false; } return prepareForFeature( featureI ); }
bool QgsAtlasComposition::prepareForFeature( const QgsFeature * feat ) { int featureI = -1; QVector< QPair<QgsFeatureId, QString> >::const_iterator it = mFeatureIds.constBegin(); int currentIdx = 0; for ( ; it != mFeatureIds.constEnd(); ++it, ++currentIdx ) { if (( *it ).first == feat->id() ) { featureI = currentIdx; break; } } if ( featureI < 0 ) { //feature not found return false; } return prepareForFeature( featureI ); }
void QgsAtlasComposition::firstFeature() { mCurrentFeatureNo = 0; prepareForFeature( mCurrentFeatureNo ); }
void QgsAtlasComposition::refreshFeature() { prepareForFeature( mCurrentFeatureNo, false ); }
void QgsAtlasComposition::lastFeature() { prepareForFeature( mFeatureIds.size() - 1 ); }
void QgsLayoutAtlas::refreshCurrentFeature() { prepareForFeature( mCurrentFeatureNo ); }
bool QgsLayoutAtlas::seekTo( int feature ) { return prepareForFeature( feature ); }
bool QgsLayoutAtlas::last() { return prepareForFeature( mFeatureIds.size() - 1 ); }
bool QgsLayoutAtlas::first() { return prepareForFeature( 0 ); }
void QgsAtlasComposition::lastFeature() { mCurrentFeatureNo = mFeatureIds.size() - 1; prepareForFeature( mCurrentFeatureNo ); }
void QgsAtlasComposition::prepareForFeature( QgsFeature * feat ) { int featureI = mFeatureIds.indexOf( feat->id() ); prepareForFeature( featureI ); }
void QgsAtlasComposition::firstFeature() { prepareForFeature( 0 ); }