void WriteIncludes::acceptUI(DomUI *node) { m_scriptsActivated = false; m_laidOut = false; m_localIncludes.clear(); m_globalIncludes.clear(); m_knownClasses.clear(); m_includeBaseNames.clear(); if (node->elementIncludes()) acceptIncludes(node->elementIncludes()); if (node->elementCustomWidgets()) TreeWalker::acceptCustomWidgets(node->elementCustomWidgets()); add(QLatin1String("QApplication")); add(QLatin1String("QVariant")); add(QLatin1String("QAction")); add(QLatin1String("QButtonGroup")); // ### only if it is really necessary add(QLatin1String("QHeaderView")); TreeWalker::acceptUI(node); if (!m_uic->option().includeFile.isEmpty()) m_globalIncludes.insert(m_uic->option().includeFile, true); writeHeaders(m_globalIncludes, true); writeHeaders(m_localIncludes, false); m_output << QLatin1Char('\n'); }
void WriteIncludes::acceptUI(DomUI *node) { m_scriptsActivated = false; m_laidOut = false; m_localIncludes.clear(); m_globalIncludes.clear(); m_knownClasses.clear(); m_includeBaseNames.clear(); if (node->elementIncludes()) acceptIncludes(node->elementIncludes()); if (node->elementCustomWidgets()) TreeWalker::acceptCustomWidgets(node->elementCustomWidgets()); add(QLatin1String("QApplication")); add(QLatin1String("QVariant")); add(QLatin1String("QAction")); add(QLatin1String("QButtonGroup")); // ### only if it is really necessary add(QLatin1String("QHeaderView")); if (m_uic->hasExternalPixmap() && m_uic->pixmapFunction() == QLatin1String("qPixmapFromMimeSource")) { #ifdef QT_NO_QT3_SUPPORT qWarning("%s: Warning: The form file has external pixmaps or qPixmapFromMimeSource() set as a pixmap function. " "This requires Qt 3 support, which is disabled. The resulting code will not compile.", qPrintable(m_uic->option().messagePrefix())); #endif add(QLatin1String("Q3MimeSourceFactory")); } if (m_uic->databaseInfo()->connections().size()) { add(QLatin1String("QSqlDatabase")); add(QLatin1String("Q3SqlCursor")); add(QLatin1String("QSqlRecord")); add(QLatin1String("Q3SqlForm")); } TreeWalker::acceptUI(node); writeHeaders(m_globalIncludes, true); writeHeaders(m_localIncludes, false); m_output << QLatin1Char('\n'); }
void WriteIncludes::acceptUI(DomUI *node) { m_scriptsActivated = false; m_localIncludes.clear(); m_globalIncludes.clear(); m_knownClasses.clear(); m_includeBaseNames.clear(); if (node->elementIncludes()) acceptIncludes(node->elementIncludes()); if (node->elementCustomWidgets()) TreeWalker::acceptCustomWidgets(node->elementCustomWidgets()); add(QLatin1String("QApplication")); add(QLatin1String("QVariant")); add(QLatin1String("QAction")); add(QLatin1String("QButtonGroup")); // ### only if it is really necessary if (m_uic->hasExternalPixmap() && m_uic->pixmapFunction() == QLatin1String("qPixmapFromMimeSource")) add(QLatin1String("Q3MimeSourceFactory")); if (m_uic->databaseInfo()->connections().size()) { add(QLatin1String("QSqlDatabase")); add(QLatin1String("Q3SqlCursor")); add(QLatin1String("QSqlRecord")); add(QLatin1String("Q3SqlForm")); } TreeWalker::acceptUI(node); writeHeaders(m_globalIncludes, true); writeHeaders(m_localIncludes, false); m_output << QLatin1Char('\n'); }