Exemplo n.º 1
0
void Uic::createMenuBarDecl( const QDomElement &e )
{
    if ( e.tagName() == "item" ) {
	out << "    " << "QPopupMenu *" << e.attribute( "name" ) << ";" << endl;
	createPopupMenuDecl( e );
    }
}
Exemplo n.º 2
0
void Uic::createPopupMenuDecl( const QDomElement &e ) {
  for ( QDomElement n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) {
    if ( n.tagName() == "action" || n.tagName() == "actiongroup" ) {
      QDomElement n2 = n.nextSibling().toElement();
      if ( n2.tagName() == "item" ) { // the action has a sub menu
        out << "    " << "QPopupMenu *" << n2.attribute( "name" ) << ";" << endl;
        createPopupMenuDecl( n2 );
        n = n2;
      }
    }
  }
}