Exemple #1
0
void checkDock::validate( ValidateType type )
{
  mErrorList.clear();

  QList<QgsRubberBand*>::const_iterator it;
  for ( it = mRbErrorMarkers.begin(); it != mRbErrorMarkers.end(); ++it )
  {
    QgsRubberBand* rb = *it;
    rb->reset();
    delete rb;
  }

  mRbErrorMarkers.clear();

  runTests( type );
  mComment->setText( tr( "%1 errors were found" ).arg( mErrorList.count() ) );

  mRBFeature1->reset();
  mRBFeature2->reset();
  mRBConflict->reset();
  clearVertexMarkers();

  mErrorTableView->resizeColumnsToContents();
  mToggleRubberband->setChecked( true );
}
checkDock::~checkDock()
{
  delete mConfigureDialog;
  delete mErrorListModel;

  QList<QgsRubberBand*>::const_iterator it;
  for ( it = mRbErrorMarkers.begin(); it != mRbErrorMarkers.end(); ++it )
  {
    QgsRubberBand* rb = *it;
    rb->reset();
    delete rb;
  }

  clearVertexMarkers();

  // delete errors in list
  deleteErrors();
}
Exemple #3
0
void checkDock::deleteErrors()
{
  QList<TopolError*>::Iterator it = mErrorList.begin();
  for ( ; it != mErrorList.end(); ++it )
    delete *it;

  mErrorList.clear();
  mErrorListModel->resetModel();

  QList<QgsRubberBand*>::const_iterator rit;

  for ( rit = mRbErrorMarkers.begin(); rit != mRbErrorMarkers.end(); ++rit )
  {
    QgsRubberBand* rb = *rit;
    rb->reset();
    delete rb;
  }
}