48 QString qualifiedClassName = node->elementClass() + m_option.postfix;
49 QString className = qualifiedClassName;
53 QString exportMacro = node->elementExportMacro();
54 if (!exportMacro.isEmpty())
55 exportMacro.append(u' ');
57 QStringList namespaceList = qualifiedClassName.split(
"::"_L1);
58 if (!namespaceList.isEmpty()) {
59 className = namespaceList.last();
60 namespaceList.removeLast();
68 const bool needsMacro = m_option.qtNamespace &&
69 (namespaceList.isEmpty() || namespaceList.at(0) ==
"qdesigner_internal"_L1);
72 m_output <<
"QT_BEGIN_NAMESPACE\n\n";
74 openNameSpaces(namespaceList, m_output);
76 if (!namespaceList.isEmpty())
79 m_output <<
"class " << exportMacro << m_option.prefix << className <<
"\n"
83 const QStringList connections = m_uic->databaseInfo()->connections();
84 for (
const QString &connection : connections) {
85 if (connection !=
"(default)"_L1)
86 m_output << m_option.indent <<
"QSqlDatabase " << connection <<
"Connection;\n";
90 if (
const DomButtonGroups *domButtonGroups = node->elementButtonGroups())
99 closeNameSpaces(namespaceList, m_output);
101 if (!namespaceList.isEmpty())
105 namespaceList.append(
"Ui"_L1);
107 openNameSpaces(namespaceList, m_output);
109 m_output << m_option.indent <<
"class " << exportMacro << className <<
": public " << m_option.prefix << className <<
" {};\n";
111 closeNameSpaces(namespaceList, m_output);
113 if (!namespaceList.isEmpty())
118 m_output <<
"QT_END_NAMESPACE\n\n";