예제 #1
0
void Authors::initialize() {
    QFile file(":/authors.xml");
    if (!file.open(QIODevice::ReadOnly))
        throw Exception("Cannot fint embedded file 'authors.xml");
    reader->setDevice(&file);

    nextToken();
    if (!reader->isStartElement() && elementNameEquals("authors"))
        throw Exception(message("Expected <authors> element'"));

    nextToken();
    while (!reader->hasError() && reader->isStartElement()) {
        if (elementNameEquals("author")) {
            readAuthor();
        } else {
            throw Exception(message("Unexpected element: '" + elementName() + "'"));
        }
        if(!reader->isEndElement())
            throw Exception(message("Expected end element </author>"));
        nextToken();
    }

    //nextToken();
    if(!reader->isEndElement())
        throw Exception(message("Expected end element </authors>"));
}
예제 #2
0
void qt4encodeWnd::demarrerA( )
{
	cbKeep->setChecked( true );
	cbKeep->show();
	pbClose->show();
	setWindowTitle( "Authoring " );
	setModal( true );
	teAuthor->clear();
	connect( procEncode, SIGNAL(readyReadStderr()),
						this, SLOT(readAuthor()));
	connect( procEncode, SIGNAL(processExited()),
						this, SLOT(endAuthor()));
	exec();
}
예제 #3
0
void ModXReader::readAuthorGroup()
{
    while (!atEnd())
    {
        readNext();

        if (isEndElement())
        {
            break;
        }

        if (isStartElement())
        {
            if (name() == "author")
            {
                m_data->authorGroup << readAuthor();
            }
            else
            {
                readUnknownElement();
            }
        }
    }
}