Example #1
0
void QgsAtlasComposition::nextFeature()
{
  mCurrentFeatureNo++;
  if ( mCurrentFeatureNo >= mFeatureIds.size() )
  {
    mCurrentFeatureNo = mFeatureIds.size() - 1;
  }

  prepareForFeature( mCurrentFeatureNo );
}
Example #2
0
void QgsAtlasComposition::prevFeature()
{
  mCurrentFeatureNo--;
  if ( mCurrentFeatureNo < 0 )
  {
    mCurrentFeatureNo = 0;
  }

  prepareForFeature( mCurrentFeatureNo );
}
Example #3
0
bool QgsLayoutAtlas::next()
{
  int newFeatureNo = mCurrentFeatureNo + 1;
  if ( newFeatureNo >= mFeatureIds.size() )
  {
    return false;
  }

  return prepareForFeature( newFeatureNo );
}
Example #4
0
void QgsAtlasComposition::nextFeature()
{
  int newFeatureNo = mCurrentFeatureNo + 1;
  if ( newFeatureNo >= mFeatureIds.size() )
  {
    newFeatureNo = mFeatureIds.size() - 1;
  }

  prepareForFeature( newFeatureNo );
}
Example #5
0
void QgsAtlasComposition::prevFeature()
{
  int newFeatureNo = mCurrentFeatureNo - 1;
  if ( newFeatureNo < 0 )
  {
    newFeatureNo = 0;
  }

  prepareForFeature( newFeatureNo );
}
Example #6
0
bool QgsLayoutAtlas::previous()
{
  int newFeatureNo = mCurrentFeatureNo - 1;
  if ( newFeatureNo < 0 )
  {
    return false;
  }

  return prepareForFeature( newFeatureNo );
}
Example #7
0
bool QgsAtlasComposition::prepareForFeature( const QgsFeature * feat )
{
  int featureI = mFeatureIds.indexOf( feat->id() );
  if ( featureI < 0 )
  {
    //feature not found
    return false;
  }

  return prepareForFeature( featureI );
}
Example #8
0
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 );
}
Example #9
0
void QgsAtlasComposition::firstFeature()
{
  mCurrentFeatureNo = 0;
  prepareForFeature( mCurrentFeatureNo );
}
Example #10
0
void QgsAtlasComposition::refreshFeature()
{
  prepareForFeature( mCurrentFeatureNo, false );
}
Example #11
0
void QgsAtlasComposition::lastFeature()
{
  prepareForFeature( mFeatureIds.size() - 1 );
}
Example #12
0
void QgsLayoutAtlas::refreshCurrentFeature()
{
  prepareForFeature( mCurrentFeatureNo );
}
Example #13
0
bool QgsLayoutAtlas::seekTo( int feature )
{
  return prepareForFeature( feature );
}
Example #14
0
bool QgsLayoutAtlas::last()
{
  return prepareForFeature( mFeatureIds.size() - 1 );
}
Example #15
0
bool QgsLayoutAtlas::first()
{
  return prepareForFeature( 0 );
}
Example #16
0
void QgsAtlasComposition::lastFeature()
{
  mCurrentFeatureNo = mFeatureIds.size() - 1;
  prepareForFeature( mCurrentFeatureNo );
}
Example #17
0
void QgsAtlasComposition::prepareForFeature( QgsFeature * feat )
{
  int featureI = mFeatureIds.indexOf( feat->id() );
  prepareForFeature( featureI );
}
Example #18
0
void QgsAtlasComposition::firstFeature()
{
  prepareForFeature( 0 );
}