16 const QString& lfchar,
const QString& lkupTag,
const QString& lkupAtt,
20 QStringList filter( lfchar +
"???????.xml" );
21 QStringList f_names = f.entryList( filter, QDir::Files, QDir::Name );
27 for (
int ii = 0; ii < f_names.size(); ii++ )
29 QString fname = f_names[ ii ];
31 if ( !guid.isEmpty() )
33 QFile m_file( path +
"/" + fname );
35 if ( ! m_file.open( QIODevice::ReadOnly | QIODevice::Text) )
continue;
37 QXmlStreamReader xml( &m_file );
39 while ( ! xml.atEnd() )
43 if ( xml.isStartElement() )
45 if ( xml.name() == lkupTag )
47 QXmlStreamAttributes a = xml.attributes();
49 if ( a.value( lkupAtt ).toString() == guid )
64 if ( ofname.isEmpty() )
66 int numCurr = fname.mid( 1, 7 ).toInt();
69 if ( numCurr > numFile )
70 ofname = lfchar + QString().sprintf(
"%07i", numFile ) +
".xml";
79 if ( ofname.isEmpty() )
81 if ( f_names.size() > 0 )
82 numFile = f_names.last().mid( 1, 7 ).toInt() + 1;
83 ofname = lfchar + QString().sprintf(
"%07i", numFile ) +
".xml";
86 return path +
"/" + ofname;
97 const QString& lfchar,
const QString& lkupTag,
const QString& lkupAtt )
100 return get_filename( path, guid, lfchar, lkupTag, lkupAtt, newf );