本文整理汇总了C++中QDomText::isText方法的典型用法代码示例。如果您正苦于以下问题:C++ QDomText::isText方法的具体用法?C++ QDomText::isText怎么用?C++ QDomText::isText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDomText
的用法示例。
在下文中一共展示了QDomText::isText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: debuggingOutput
void K3b::VcdJob::slotParseVcdxBuildOutput( const QString& line )
{
QDomDocument xml_doc;
QDomElement xml_root;
QString str = line.trimmed();
emit debuggingOutput( "vcdxbuild", str );
xml_doc.setContent( QString( "<?xml version='1.0'?><vcdxbuild>" ) + str + "</vcdxbuild>" );
xml_root = xml_doc.documentElement();
// There should be only one... but ...
for ( QDomNode node = xml_root.firstChild(); !node.isNull(); node = node.nextSibling() ) {
QDomElement el = node.toElement();
if ( el.isNull() )
continue;
const QString tagName = el.tagName().toLower();
if ( tagName == "progress" ) {
const QString oper = el.attribute( "operation" ).toLower();
const unsigned long long pos = el.attribute( "position" ).toLong();
const long long size = el.attribute( "size" ).toLong();
if ( oper == "scan" ) {
// Scan Video Files
if ( m_stage == stageUnknown || pos < m_bytesFinished ) {
const uint index = el.attribute( "id" ).remove( QRegExp( "sequence-" ) ).toUInt();
m_currentWrittenTrack = m_doc->at( m_currentWrittenTrackNumber );
emit newSubTask( i18n( "Scanning video file %1 of %2 (%3)" , index + 1 , doc() ->numOfTracks() , m_currentWrittenTrack->fileName() ) );
m_bytesFinished = 0;
if ( !firstTrack ) {
m_bytesFinishedTracks += m_doc->at( m_currentWrittenTrackNumber ) ->size();
m_currentWrittenTrackNumber++;
} else
firstTrack = false;
}
emit subPercent( ( int ) ( 100.0 * ( double ) pos / ( double ) size ) );
emit processedSubSize( pos / 1024 / 1024, size / 1024 / 1024 );
// this is the first of three processes.
double relOverallWritten = ( ( double ) m_bytesFinishedTracks + ( double ) pos ) / ( double ) doc() ->size();
emit percent( ( int ) ( m_createimageonlypercent * relOverallWritten ) );
m_bytesFinished = pos;
m_stage = stageScan;
} else if ( oper == "write" ) {
emit subPercent( ( int ) ( 100.0 * ( double ) pos / ( double ) size ) );
emit processedSubSize( ( pos * 2048 ) / 1024 / 1024, ( size * 2048 ) / 1024 / 1024 );
emit percent( ( int ) ( m_createimageonlypercent + ( m_createimageonlypercent * ( double ) pos / ( double ) size ) ) );
m_stage = stageWrite;
} else {
return ;
}
} else if ( tagName == "log" ) {
QDomText tel = el.firstChild().toText();
const QString level = el.attribute( "level" ).toLower();
if ( tel.isText() ) {
const QString text = tel.data();
if ( m_stage == stageWrite && level == "information" )
qDebug() << QString( "(K3b::VcdJob) VcdxBuild information, %1" ).arg( text );
if ( ( text ).startsWith( "writing track" ) )
emit newSubTask( i18n( "Creating Image for track %1" , ( text ).mid( 14 ) ) );
else {
if ( level != "error" ) {
qDebug() << QString( "(K3b::VcdJob) vcdxbuild warning, %1" ).arg( text );
parseInformation( text );
} else {
qDebug() << QString( "(K3b::VcdJob) vcdxbuild error, %1" ).arg( text );
emit infoMessage( text, K3b::Job::MessageError );
}
}
}
}
}
}