

Definition at line 57 of file quiloader.cpp.
typedef QFormBuilder FormBuilderPrivate::ParentClass [private] |
Definition at line 61 of file quiloader.cpp.
| FormBuilderPrivate::FormBuilderPrivate | ( | ) | [inline] |
| QWidget* FormBuilderPrivate::defaultCreateWidget | ( | const QString & | className, | |
| QWidget * | parent, | |||
| const QString & | name | |||
| ) | [inline] |
Definition at line 68 of file quiloader.cpp.
References name.
00069 { 00070 return ParentClass::createWidget(className, parent, name); 00071 }
| QLayout* FormBuilderPrivate::defaultCreateLayout | ( | const QString & | className, | |
| QObject * | parent, | |||
| const QString & | name | |||
| ) | [inline] |
Definition at line 73 of file quiloader.cpp.
References name.
00074 { 00075 return ParentClass::createLayout(className, parent, name); 00076 }
| QAction* FormBuilderPrivate::defaultCreateAction | ( | QObject * | parent, | |
| const QString & | name | |||
| ) | [inline] |
Definition at line 78 of file quiloader.cpp.
References name.
00079 { 00080 return ParentClass::createAction(parent, name); 00081 }
| QActionGroup* FormBuilderPrivate::defaultCreateActionGroup | ( | QObject * | parent, | |
| const QString & | name | |||
| ) | [inline] |
Definition at line 83 of file quiloader.cpp.
References name.
00084 { 00085 return ParentClass::createActionGroup(parent, name); 00086 }
| virtual QWidget* FormBuilderPrivate::createWidget | ( | const QString & | className, | |
| QWidget * | parent, | |||
| const QString & | name | |||
| ) | [inline, virtual] |
Reimplemented from QFormBuilder.
Definition at line 88 of file quiloader.cpp.
References name.
00089 { 00090 if (QWidget *widget = loader->createWidget(className, parent, name)) { 00091 widget->setObjectName(name); 00092 return widget; 00093 } 00094 00095 return 0; 00096 }
| virtual QLayout* FormBuilderPrivate::createLayout | ( | const QString & | className, | |
| QObject * | parent, | |||
| const QString & | name | |||
| ) | [inline, virtual] |
Reimplemented from QFormBuilder.
Definition at line 98 of file quiloader.cpp.
00099 { 00100 if (QLayout *layout = loader->createLayout(className, parent, name)) { 00101 layout->setObjectName(name); 00102 return layout; 00103 } 00104 00105 return 0; 00106 }
| virtual QActionGroup* FormBuilderPrivate::createActionGroup | ( | QObject * | parent, | |
| const QString & | name | |||
| ) | [inline, virtual] |
Reimplemented from QAbstractFormBuilder.
Definition at line 108 of file quiloader.cpp.
References name.
00109 { 00110 if (QActionGroup *actionGroup = loader->createActionGroup(parent, name)) { 00111 actionGroup->setObjectName(name); 00112 return actionGroup; 00113 } 00114 00115 return 0; 00116 }
| virtual QAction* FormBuilderPrivate::createAction | ( | QObject * | parent, | |
| const QString & | name | |||
| ) | [inline, virtual] |
Reimplemented from QAbstractFormBuilder.
Definition at line 118 of file quiloader.cpp.
References name.
00119 { 00120 if (QAction *action = loader->createAction(parent, name)) { 00121 action->setObjectName(name); 00122 return action; 00123 } 00124 00125 return 0; 00126 }
| void FormBuilderPrivate::applyProperties | ( | QObject * | o, | |
| const QList< DomProperty * > & | properties | |||
| ) | [virtual] |
Reimplemented from QFormBuilder.
Definition at line 136 of file quiloader.cpp.
References QFormBuilder::applyProperties(), DomString::attributeComment(), DomString::attributeNotr(), DomString::hasAttributeNotr(), m_class, name, o, p, properties, QVariant::String, DomProperty::String, QVariant::toString(), QString::toUtf8(), QCoreApplication::translate(), QVariant::type(), and QCoreApplication::UnicodeUTF8.
00137 { 00138 QFormBuilder::applyProperties(o, properties); 00139 00140 // translate string properties 00141 foreach (DomProperty *p, properties) { 00142 if (p->kind() != DomProperty::String) 00143 continue; 00144 DomString *dom_str = p->elementString(); 00145 if (dom_str->hasAttributeNotr()) { 00146 QString notr = dom_str->attributeNotr(); 00147 if (notr == QLatin1String("yes") || notr == QLatin1String("true")) 00148 continue; 00149 } 00150 QByteArray name = p->attributeName().toUtf8(); 00151 QVariant v = o->property(name); 00152 if (v.type() != QVariant::String) 00153 continue; 00154 QString text = QApplication::translate(m_class.toUtf8(), 00155 v.toString().toUtf8(), 00156 dom_str->attributeComment().toUtf8(), 00157 QCoreApplication::UnicodeUTF8); 00158 o->setProperty(name, text); 00159 } 00160 }
Here is the call graph for this function:

Reimplemented from QFormBuilder.
Definition at line 162 of file quiloader.cpp.
References QFormBuilder::create(), DomUI::elementClass(), and m_class.
00163 { 00164 m_class = ui->elementClass(); 00165 return QFormBuilder::create(ui, parentWidget); 00166 }
Here is the call graph for this function:

Reimplemented from QFormBuilder.
Definition at line 184 of file quiloader.cpp.
References QString::count(), QFormBuilder::create(), i, j, m_class, recursiveTranslate(), QString::toUtf8(), QCoreApplication::translate(), QCoreApplication::UnicodeUTF8, and w.
00185 { 00186 QWidget *w = QFormBuilder::create(ui_widget, parentWidget); 00187 if (w == 0) 00188 return 0; 00189 00190 if (QTabWidget *tabw = qobject_cast<QTabWidget*>(w)) { 00191 int cnt = tabw->count(); 00192 for (int i = 0; i < cnt; ++i) { 00193 QString text = QApplication::translate(m_class.toUtf8(), 00194 tabw->tabText(i).toUtf8(), 00195 "", 00196 QCoreApplication::UnicodeUTF8); 00197 00198 tabw->setTabText(i, text); 00199 } 00200 } else if (QListWidget *listw = qobject_cast<QListWidget*>(w)) { 00201 int cnt = listw->count(); 00202 for (int i = 0; i < cnt; ++i) { 00203 QListWidgetItem *item = listw->item(i); 00204 QString text = QApplication::translate(m_class.toUtf8(), 00205 item->text().toUtf8(), 00206 "", 00207 QCoreApplication::UnicodeUTF8); 00208 item->setText(text); 00209 } 00210 } else if (QTreeWidget *treew = qobject_cast<QTreeWidget*>(w)) { 00211 int cnt = treew->topLevelItemCount(); 00212 for (int i = 0; i < cnt; ++i) { 00213 QTreeWidgetItem *item = treew->topLevelItem(i); 00214 recursiveTranslate(item, m_class); 00215 } 00216 } else if (QTableWidget *tablew = qobject_cast<QTableWidget*>(w)) { 00217 int row_cnt = tablew->rowCount(); 00218 int col_cnt = tablew->columnCount(); 00219 for (int i = 0; i < row_cnt; ++i) { 00220 for (int j = 0; j < col_cnt; ++j) { 00221 QTableWidgetItem *item = tablew->item(i, j); 00222 if (item == 0) 00223 continue; 00224 QString text = QApplication::translate(m_class.toUtf8(), 00225 item->text().toUtf8(), 00226 "", 00227 QCoreApplication::UnicodeUTF8); 00228 item->setText(text); 00229 } 00230 } 00231 } else if (QComboBox *combow = qobject_cast<QComboBox*>(w)) { 00232 if (!qobject_cast<QFontComboBox*>(w)) { 00233 int cnt = combow->count(); 00234 for (int i = 0; i < cnt; ++i) { 00235 QString text = QApplication::translate(m_class.toUtf8(), 00236 combow->itemText(i).toUtf8(), 00237 "", 00238 QCoreApplication::UnicodeUTF8); 00239 combow->setItemText(i, text); 00240 } 00241 } 00242 } else if (QToolBox *toolw = qobject_cast<QToolBox*>(w)) { 00243 int cnt = toolw->count(); 00244 for (int i = 0; i < cnt; ++i) { 00245 QString text = QApplication::translate(m_class.toUtf8(), 00246 toolw->itemText(i).toUtf8(), 00247 "", 00248 QCoreApplication::UnicodeUTF8); 00249 toolw->setItemText(i, text); 00250 } 00251 } 00252 00253 return w; 00254 }
Here is the call graph for this function:

friend class ::QUiLoader [friend] |
Definition at line 59 of file quiloader.cpp.
friend class ::QUiLoaderPrivate [friend] |
Definition at line 60 of file quiloader.cpp.
Definition at line 64 of file quiloader.cpp.
QString FormBuilderPrivate::m_class [private] |
1.5.1