equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the tools applications of the Qt Toolkit. |
7 ** This file is part of the tools applications of the Qt Toolkit. |
8 ** |
8 ** |
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 |