src/tools/uic3/ui3reader.h
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
--- a/src/tools/uic3/ui3reader.h	Fri Feb 19 23:40:16 2010 +0200
+++ b/src/tools/uic3/ui3reader.h	Fri Mar 12 15:46:37 2010 +0200
@@ -68,23 +68,24 @@
 class Ui3Reader
 {
 public:
-    Ui3Reader(QTextStream &stream);
+    enum Options { CustomWidgetForwardDeclarations = 0x1, ImplicitIncludes = 0x2, PreserveLayoutNames = 0x4 };
+
+    explicit Ui3Reader(QTextStream &stream, unsigned options);
     ~Ui3Reader();
 
     void computeDeps(const QDomElement &e, QStringList &globalIncludes, QStringList &localIncludes, bool impl = false);
-    void generateUi4(const QString &fn, const QString &outputFn, QDomDocument doc, bool implicitIncludes);
+    void generateUi4(const QString &fn, const QString &outputFn, QDomDocument doc);
 
     void generate(const QString &fn, const QString &outputFn,
          QDomDocument doc, bool decl, bool subcl, const QString &trm,
-         const QString& subclname, bool omitForwardDecls, bool implicitIncludes, const QString &convertedUiFile);
+         const QString& subclname, const QString &convertedUiFile);
 
     void embed(const char *project, const QStringList &images);
 
     void setTrMacro(const QString &trmacro);
-    void setForwardDeclarationsEnabled(bool b);
     void setOutputFileName(const QString &fileName);
 
-    void createFormDecl(const QDomElement &e, bool implicitIncludes);
+    void createFormDecl(const QDomElement &e);
     void createFormImpl(const QDomElement &e);
 
     void createWrapperDecl(const QDomElement &e, const QString &convertedUiFile);
@@ -125,7 +126,7 @@
     void errorInvalidSlot(const QString &slot, const QString &widgetName, const QString &widgetClass,
                           int line, int col);
 
-    DomUI *generateUi4(const QDomElement &e, bool implicitIncludes);
+    DomUI *generateUi4(const QDomElement &e);
     DomWidget *createWidget(const QDomElement &w, const QString &widgetClass = QString());
     void createProperties(const QDomElement &e, QList<DomProperty*> *properties, const QString &className);
     void createAttributes(const QDomElement &e, QList<DomProperty*> *properties, const QString &className);
@@ -145,6 +146,8 @@
 
     void fixLayoutMargin(DomLayout *ui_layout);
 
+    const unsigned m_options;
+
     QTextStream &out;
     QTextOStream trout;
     QString languageChangeBody;
@@ -157,7 +160,6 @@
     QString formName;
     QString lastItem;
     QString trmacro;
-    bool nofwd;
 
     struct Buddy
     {