Ejemplo n.º 1
0
    ResultSet* Result::makeResultSet (POSFactory* posFactory) {
	ResultSet* ret = new ResultSet(posFactory);
	delete *ret->begin();
	ret->erase(ret->begin());
	ret->insert(ret->begin(), duplicate(ret, ret->begin()));
	return ret;
    }
Ejemplo n.º 2
0
    ResultSet* ResultSet::clone () {
	ResultSet* ret = new ResultSet(posFactory);
	delete *ret->begin();
	ret->erase(ret->begin());
	for (ResultSetIterator it = begin() ; it != end(); it++)
	    ret->insert(ret->begin(), (*it)->duplicate(ret, ret->end()));
	return ret;
    }
void StManagerStudyListComp::updateRecentExams ( const TableRow *row, const QString &prefix )
{
  ResultSet resultSet;
  loadRecentExams( resultSet, prefix );

  StudyFilter::filterDuplicates( &resultSet, row );

  resultSet.push_back( *row ); 
  if ( resultSet.size() > RECENT_EXAMS_NUMBER ) {
    resultSet.erase( resultSet.begin() );
  }

  QSettings settings;
  settings.beginWriteArray( prefix );
  
  for ( unsigned i = 0; i < resultSet.size(); i++ )
  {
    settings.setArrayIndex( i );
    updateRecentRow ( &resultSet[i], settings );  
  }

  settings.endArray();
}