src/tools/uic3/form.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
equal deleted inserted replaced
4:3b1da2848fc7 5:d3bac044e0f0
    98 /*!
    98 /*!
    99   Creates a declaration (header file) for the form given in \a e
    99   Creates a declaration (header file) for the form given in \a e
   100 
   100 
   101   \sa createFormImpl()
   101   \sa createFormImpl()
   102 */
   102 */
   103 void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes)
   103 void Ui3Reader::createFormDecl(const QDomElement &e)
   104 {
   104 {
   105     QDomElement body = e;
   105     QDomElement body = e;
   106 
   106 
   107     QDomElement n;
   107     QDomElement n;
   108     QDomNodeList nl;
   108     QDomNodeList nl;
   136                     QString cl;
   136                     QString cl;
   137                     while (!n3.isNull()) {
   137                     while (!n3.isNull()) {
   138                         QString tagName = n3.tagName().toLower();
   138                         QString tagName = n3.tagName().toLower();
   139                         if (tagName == QLatin1String("class")) {
   139                         if (tagName == QLatin1String("class")) {
   140                             cl = n3.firstChild().toText().data();
   140                             cl = n3.firstChild().toText().data();
   141                             if (!nofwd)
   141                             if (m_options & CustomWidgetForwardDeclarations)
   142                                 forwardDecl << cl;
   142                                 forwardDecl << cl;
   143                             customWidgets.insert(cl, 0);
   143                             customWidgets.insert(cl, 0);
   144                         } else if (tagName == QLatin1String("header")) {
   144                         } else if (tagName == QLatin1String("header")) {
   145                             CustomInclude ci;
   145                             CustomInclude ci;
   146                             ci.header = n3.firstChild().toText().data();
   146                             ci.header = n3.firstChild().toText().data();
   255     Driver d;
   255     Driver d;
   256     d.option().headerProtection = false;
   256     d.option().headerProtection = false;
   257     d.option().copyrightHeader = false;
   257     d.option().copyrightHeader = false;
   258     d.option().extractImages = m_extractImages;
   258     d.option().extractImages = m_extractImages;
   259     d.option().qrcOutputFile = m_qrcOutputFile;
   259     d.option().qrcOutputFile = m_qrcOutputFile;
   260     d.option().implicitIncludes = implicitIncludes;
   260     d.option().implicitIncludes = (m_options & ImplicitIncludes) ? 1 : 0;
   261     if (trmacro.size())
   261     if (trmacro.size())
   262         d.option().translateFunction = trmacro;
   262         d.option().translateFunction = trmacro;
   263     DomUI *ui = generateUi4(e, implicitIncludes);
   263     DomUI *ui = generateUi4(e);
   264     d.uic(fileName, ui, &out);
   264     d.uic(fileName, ui, &out);
   265     delete ui;
   265     delete ui;
   266 
   266 
   267     createWrapperDeclContents(e);
   267     createWrapperDeclContents(e);
   268 
   268