Beispiel #1
0
void QgsDelimitedTextFile::setTypeCSV( QString delim, QString quote, QString escape )
{
  resetDefinition();
  mType = DelimTypeCSV;
  mDelimChars = decodeChars( delim );
  mQuoteChar = decodeChars( quote );
  mEscapeChar = decodeChars( escape );
  mParser = &QgsDelimitedTextFile::parseQuoted;
  mDefinitionValid = mDelimChars.size() > 0;
  if ( ! mDefinitionValid )
  {
    QgsDebugMsg( "Invalid empty delimiter defined for text file delimiter" );
  }
}
Beispiel #2
0
void QgsDelimitedTextFile::setTypeCSV( const QString &delim, const QString &quote, const QString &escape )
{
  resetDefinition();
  mType = DelimTypeCSV;
  mDelimChars = decodeChars( delim );
  mQuoteChar = decodeChars( quote );
  mEscapeChar = decodeChars( escape );
  mParser = &QgsDelimitedTextFile::parseQuoted;
  mDefinitionValid = !mDelimChars.isEmpty();
  if ( ! mDefinitionValid )
  {
    QgsDebugMsg( "Invalid empty delimiter defined for text file delimiter" );
  }
}