Browse Source

big ui improvements

Nicolas Winkler 5 years ago
parent
commit
3c3b24344a
12 changed files with 435 additions and 257 deletions
  1. 90 8
      Almond.cpp
  2. 19 3
      Almond.h
  3. 3 0
      Almond.pro
  4. 9 27
      Almond.ui
  5. 7 0
      MandelWidget.cpp
  6. 1 0
      MandelWidget.h
  7. 3 71
      choosegenerators.cpp
  8. 0 10
      choosegenerators.h
  9. 2 138
      choosegenerators.ui
  10. 62 0
      customgenerator.cpp
  11. 42 0
      customgenerator.h
  12. 197 0
      customgenerator.ui

+ 90 - 8
Almond.cpp

@@ -15,13 +15,16 @@ Almond::Almond(QWidget* parent) :
     mw = std::make_unique<MandelWidget>(mandelContext,
                                         &mandelContext.getDefaultGenerator(),
                                         ui.centralWidget);
+    customGeneratorDialog = std::make_unique<CustomGenerator>(mandelContext);
+    customGenerator = nullptr;
+    customViewSave = mnd::MandelViewport::centerView();
 
     on_maxIterations_editingFinished();
     mw->setSmoothColoring(ui.smooth->isChecked());
 
 
     currentView = MANDELBROT;
-    mandelGeneratorSave = &mandelContext.getDefaultGenerator();
+    mandelGenerator = &mandelContext.getDefaultGenerator();
     mandelViewSave = mw->getViewport();
 
     QObject::connect(mw.get(), &MandelWidget::pointSelected, this, &Almond::pointSelected);
@@ -151,7 +154,12 @@ void Almond::on_exportImage_clicked()
 
 void Almond::on_resetZoom_clicked()
 {
-    mw->setViewport(mnd::MandelViewport::standardView());
+    if (currentView == MANDELBROT) {
+        mw->setViewport(mnd::MandelViewport::standardView());
+    }
+    else {
+        mw->setViewport(mnd::MandelViewport::centerView());
+    }
 }
 
 
@@ -168,17 +176,18 @@ void Almond::on_chooseGenerator_clicked()
     generatorsDialog->exec();
 
     if (generatorsDialog->getChosenGenerator()) {
-        mandelGeneratorSave = generatorsDialog->getChosenGenerator();
+        mandelGenerator = generatorsDialog->getChosenGenerator();
     }
     else {
-        mandelGeneratorSave = &mandelContext.getDefaultGenerator();
+        mandelGenerator = &mandelContext.getDefaultGenerator();
     }
     //this->currentView = MANDELBROT;
-    this->mw->setGenerator(mandelGeneratorSave);
+    this->mw->setGenerator(mandelGenerator);
     //this->mw->getMandelInfo().julia = false;
     //printf("dialog executed\n"); fflush(stdout);
 }
 
+
 void Almond::on_selectPoint_clicked()
 {
     if (currentView == MANDELBROT) {
@@ -190,9 +199,7 @@ void Almond::on_selectPoint_clicked()
 void Almond::pointSelected(mnd::Real x, mnd::Real y)
 {
     if (currentView != JULIA) {
-        //auto& gen = mandelContext.getJuliaGenerator();
-        mandelViewSave = mw->getViewport();
-        //this->mw->setGenerator(&gen);
+        saveView();
         this->mw->setViewport(mnd::MandelViewport::centerView());
         this->mw->setJuliaPos(x, y);
         this->mw->getMandelInfo().julia = true;
@@ -211,3 +218,78 @@ void Almond::on_viewMandelbrot_clicked()
         currentView = MANDELBROT;
     }
 }
+
+void Almond::on_groupBox_toggled(bool arg1)
+{
+    printf("arg1: %i\n", int(arg1)); fflush(stdout);
+}
+
+void Almond::on_wMandel_clicked()
+{
+
+}
+
+
+void Almond::saveView()
+{
+    if (currentView == MANDELBROT)
+        mandelViewSave = mw->getViewport();
+    else if (currentView == CUSTOM)
+        customViewSave = mw->getViewport();
+}
+
+
+void Almond::on_wMandel_toggled(bool checked)
+{
+    saveView();
+    if (checked) {
+        currentGenerator = mandelGenerator;
+        emit this->mw->stopSelectingPoint();
+        this->mw->setViewport(mandelViewSave);
+        this->mw->setGenerator(currentGenerator);
+        this->mw->getMandelInfo().julia = false;
+        this->mw->clearAll();
+        currentView = MANDELBROT;
+    }
+}
+
+void Almond::on_radioButton_toggled(bool checked)
+{
+    saveView();
+    if (checked) {
+        if (currentView == MANDELBROT) {
+            emit this->mw->selectPoint();
+        }
+        else {
+            currentView = MANDELBROT;
+            currentGenerator = mandelGenerator;
+            this->mw->setGenerator(currentGenerator);
+            this->mw->setViewport(mandelViewSave);
+            this->mw->getMandelInfo().julia = false;
+            this->mw->clearAll();
+            emit this->mw->selectPoint();
+        }
+    }
+}
+
+void Almond::on_radioButton_2_toggled(bool checked)
+{
+    saveView();
+    if (checked) {
+        if (customGenerator == nullptr) {
+            customGeneratorDialog->exec();
+            if (auto* frac = customGeneratorDialog->getLastCompiled()) {
+                customGenerator = frac->gc.cpuGenerators[0].get();
+            }
+        }
+        if (customGenerator != nullptr) {
+            currentGenerator = customGenerator;
+            this->mw->setGenerator(currentGenerator);
+            emit this->mw->stopSelectingPoint();
+            this->mw->setViewport(customViewSave);
+            this->mw->getMandelInfo().julia = false;
+            this->mw->clearAll();
+            currentView = CUSTOM;
+        }
+    }
+}

+ 19 - 3
Almond.h

@@ -9,6 +9,7 @@
 #include "exportdialogs.h"
 #include "gradientchoosedialog.h"
 #include "choosegenerators.h"
+#include "customgenerator.h"
 //#include "benchmarkdialog.h"
 
 #include <memory>
@@ -23,7 +24,8 @@ struct ViewState
 enum ViewType
 {
     MANDELBROT,
-    JULIA
+    JULIA,
+    CUSTOM,
 };
 
 
@@ -35,14 +37,16 @@ private:
     std::unique_ptr<MandelWidget> mw;
     //std::unique_ptr<BenchmarkDialog> benchmarkDialog;
     std::unique_ptr<ChooseGenerators> generatorsDialog;
+    std::unique_ptr<CustomGenerator> customGeneratorDialog;
     GradientChooseDialog gcd;
 
     std::vector<std::unique_ptr<mnd::MandelGenerator>> compiledGenerators;
 
     ViewType currentView;
     mnd::MandelViewport mandelViewSave;
-    mnd::MandelGenerator* mandelGeneratorSave;
-
+    mnd::MandelViewport customViewSave;
+    mnd::MandelGenerator* mandelGenerator;
+    mnd::MandelGenerator* customGenerator;
     mnd::MandelGenerator* currentGenerator;
 public:
     Almond(QWidget *parent = Q_NULLPTR);
@@ -71,6 +75,18 @@ private slots:
 
     void on_viewMandelbrot_clicked();
 
+    void on_wMandel_toggled(bool checked);
+
+    void on_groupBox_toggled(bool arg1);
+
+    void saveView(void);
+
+    void on_wMandel_clicked();
+
+    void on_radioButton_toggled(bool checked);
+
+    void on_radioButton_2_toggled(bool checked);
+
 private:
     Ui::AlmondClass ui;
 };

+ 3 - 0
Almond.pro

@@ -37,6 +37,7 @@ SOURCES += \
         MandelWidget.cpp \
         VideoStream.cpp \
         choosegenerators.cpp \
+        customgenerator.cpp \
         exportdialogs.cpp \
         gradientchoosedialog.cpp \
         main.cpp
@@ -53,12 +54,14 @@ HEADERS += \
         MandelWidget.h \
         VideoStream.h \
         choosegenerators.h \
+        customgenerator.h \
         exportdialogs.h \
         gradientchoosedialog.h
 
 FORMS += \
         Almond.ui \
         choosegenerators.ui \
+        customgenerator.ui \
         exportimagedialog.ui \
         exportvideodialog.ui \
         gradientchooser.ui

+ 9 - 27
Almond.ui

@@ -163,23 +163,9 @@
         </spacer>
        </item>
        <item>
-        <widget class="QPushButton" name="selectPoint">
-         <property name="text">
-          <string>View Julia Set</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QPushButton" name="viewMandelbrot">
-         <property name="text">
-          <string>View Mandelbrot Set</string>
-         </property>
-        </widget>
-       </item>
-       <item>
         <widget class="QGroupBox" name="groupBox">
          <property name="title">
-          <string>GroupBox</string>
+          <string>Fractal</string>
          </property>
          <layout class="QVBoxLayout" name="verticalLayout">
           <item>
@@ -187,6 +173,9 @@
             <property name="text">
              <string>Mandelbrot Set</string>
             </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
            </widget>
           </item>
           <item>
@@ -201,22 +190,15 @@
             <item>
              <widget class="QRadioButton" name="radioButton_2">
               <property name="text">
-               <string>RadioButton</string>
+               <string>Custom Formula</string>
               </property>
              </widget>
             </item>
             <item>
-             <widget class="QComboBox" name="comboBox">
-              <item>
-               <property name="text">
-                <string>a</string>
-               </property>
-              </item>
-              <item>
-               <property name="text">
-                <string>b</string>
-               </property>
-              </item>
+             <widget class="QPushButton" name="createCustom">
+              <property name="text">
+               <string>Create</string>
+              </property>
              </widget>
             </item>
            </layout>

+ 7 - 0
MandelWidget.cpp

@@ -847,6 +847,13 @@ void MandelWidget::selectPoint(void)
 }
 
 
+void MandelWidget::stopSelectingPoint(void)
+{
+    this->selectingPoint = false;
+    this->setMouseTracking(false);
+}
+
+
 void MandelWidget::requestRecalc()
 {
     emit update();

+ 1 - 0
MandelWidget.h

@@ -340,6 +340,7 @@ public:
     void zoom(float scale, float x = 0.5f, float y = 0.5f);
     void setViewport(const mnd::MandelViewport& viewport);
     void selectPoint(void);
+    void stopSelectingPoint(void);
 
     void requestRecalc(void);
 

+ 3 - 71
choosegenerators.cpp

@@ -138,10 +138,6 @@ ChooseGenerators::ChooseGenerators(mnd::MandelContext& mndCtxt, Almond& owner) :
     QFont f("unexistent");
     f.setStyleHint(QFont::Monospace);
     f.setPointSize(12);
-    ui->formula->setFont(f);
-    ui->label_2->setFont(f);
-    ui->initialFormula->setFont(f);
-    ui->label_5->setFont(f);
 
     QRegExp floatingpoint{ "^[-+]?(\\d*\\.?\\d+|\\d+\\.?\\d*)([eE][-+]\\d+)?$" };
     floatValidator = std::make_unique<QRegExpValidator>(floatingpoint, this);
@@ -249,7 +245,7 @@ void ChooseGenerators::setBenchmarkResult(int row, float percentage, double resu
 void ChooseGenerators::on_buttonBox_accepted()
 {
     //if (!chosenGenerator)
-    auto adGen = std::make_unique<mnd::AdaptiveGenerator>();
+    static auto adGen = std::make_unique<mnd::AdaptiveGenerator>();
     //createdGenerator->clear();
     try {
         for (size_t i = 0; i < tableContent.size(); i++) {
@@ -266,7 +262,7 @@ void ChooseGenerators::on_buttonBox_accepted()
         // TODO
         adGen = nullptr;
     }
-    //chosenGenerator = std::move(adGen);
+    chosenGenerator = adGen.get();
 }
 
 
@@ -306,75 +302,11 @@ void ChooseGenerators::on_generatorTable_cellDoubleClicked(int row, int column)
 
 void ChooseGenerators::on_compile_clicked()
 {
-    QString formula = this->ui->formula->text();
-    QString z0formula = this->ui->initialFormula->text();
-    mnd::IterationFormula zi{ mnd::parse(formula.toStdString()), { "c", "z" } };
-    mnd::IterationFormula z0{ mnd::parse(z0formula.toStdString()), { "c" } };
-    //zi.optimize();
-    //z0.optimize();
-
-    mnd::GeneratorCollection cr;
-
-    try {
-        //std::cout << mnd::toString(*z0.expr) << std::endl;
-        //std::cout << mnd::toString(*zi.expr) << std::endl;
-        cr = mnd::compileFormula(mndCtxt, z0, zi);
-    }
-    catch(const mnd::ParseError& pe) {
-        printf("Parse error: %s\n", pe.what());
-        return;
-    }
-    catch(const std::string& e) {
-        printf("error: %s\n", e.c_str());
-        return;
-    }
-    /*catch(const char* e) {
-        printf("error: %s\n", e);
-        return;
-    }*/
-    fflush(stdout);
-    fractalDefs.push_back(FractalDef {
-                "name",
-                z0formula,
-                formula,
-                std::move(cr)
-    });
-    //chosenGenerator = std::move(cpuGenerators[0]);
-    chosenGenerator = fractalDefs[fractalDefs.size() - 1].gc.clGenerators[0].get();
-    return;
-
-    std::string expr = mnd::toString(*zi.expr);
-    printf("zi := %s\n", expr.c_str()); fflush(stdout);
-    expr = mnd::toString(*z0.expr);
-    printf("z0 := %s\n", expr.c_str()); fflush(stdout);
-    //chosenGenerator = std::make_unique<mnd::NaiveGenerator>(std::move(itf), std::move(z0), mnd::getPrecision<double>());
-    //return;
-    mnd::ir::Formula irform = mnd::expand(z0, zi);
-    printf("%s\n", irform.toString().c_str()); fflush(stdout);
-    irform.constantPropagation();
-    printf("%s\n", irform.toString().c_str()); fflush(stdout);
-    auto cg = std::make_unique<mnd::CompiledGenerator>(mnd::compile(irform));
-    std::string asmCode = cg->dump();
-    printf("%s\n", asmCode.c_str()); fflush(stdout);
-    /*QMessageBox msgBox(nullptr);
-    msgBox.setText(QString::fromStdString(asmCode));
-    msgBox.exec();*/
-    //chosenGenerator = std::move(cg);
-    try {
-        //chosenGenerator = mnd::compileCl(irform, dev);
-    }
-    catch(const std::string& msg) {
-        printf("error compiling: %s", msg.c_str());
-    }
 }
 
+
 void ChooseGenerators::on_benchmark_clicked()
 {
-    if (!chosenGenerator)
-        return;
-    Benchmarker bm(mndCtxt, *chosenGenerator, 0, 0.0f);
-    double mips = bm.benchmarkResult(*chosenGenerator);
-    this->ui->compBenchResult->setText(QString::number(mips));
 }
 
 

+ 0 - 10
choosegenerators.h

@@ -57,14 +57,6 @@ signals:
 };
 
 
-struct FractalDef
-{
-    QString name;
-    QString z0;
-    QString zi;
-    mnd::GeneratorCollection gc;
-};
-
 class ChooseGenerators : public QDialog
 {
     Q_OBJECT
@@ -80,8 +72,6 @@ private:
     mnd::MandelGenerator* chosenGenerator;
     std::vector<mnd::MandelGenerator*> actualGenerators;
 
-    std::vector<FractalDef> fractalDefs;
-
     QThreadPool benchmarker;
 public:
     ChooseGenerators(mnd::MandelContext& mndCtxt, Almond& owner);

+ 2 - 138
choosegenerators.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>911</width>
-    <height>653</height>
+    <width>1095</width>
+    <height>703</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -23,142 +23,6 @@
          <property name="currentIndex">
           <number>0</number>
          </property>
-         <widget class="QWidget" name="Iteration">
-          <attribute name="title">
-           <string>Iterations</string>
-          </attribute>
-          <layout class="QHBoxLayout" name="horizontalLayout_4">
-           <item>
-            <widget class="QLabel" name="label_3">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Formula Editor&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <layout class="QVBoxLayout" name="verticalLayout_5">
-             <item>
-              <layout class="QFormLayout" name="formLayout">
-               <item row="3" column="0">
-                <widget class="QLabel" name="label_2">
-                 <property name="font">
-                  <font>
-                   <pointsize>12</pointsize>
-                  </font>
-                 </property>
-                 <property name="text">
-                  <string>z := </string>
-                 </property>
-                </widget>
-               </item>
-               <item row="3" column="1">
-                <widget class="QLineEdit" name="formula">
-                 <property name="font">
-                  <font>
-                   <pointsize>12</pointsize>
-                  </font>
-                 </property>
-                 <property name="text">
-                  <string>z^2+c</string>
-                 </property>
-                </widget>
-               </item>
-               <item row="5" column="0">
-                <widget class="QPushButton" name="benchmark">
-                 <property name="text">
-                  <string>Benchmark</string>
-                 </property>
-                </widget>
-               </item>
-               <item row="5" column="1">
-                <widget class="QLineEdit" name="compBenchResult"/>
-               </item>
-               <item row="0" column="0" colspan="2">
-                <widget class="QLabel" name="descriptionInitial">
-                 <property name="font">
-                  <font>
-                   <pointsize>12</pointsize>
-                  </font>
-                 </property>
-                 <property name="text">
-                  <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Initial Iteration Value&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;Specify the initial value for z depending on c.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                 </property>
-                 <property name="textFormat">
-                  <enum>Qt::RichText</enum>
-                 </property>
-                </widget>
-               </item>
-               <item row="1" column="0">
-                <widget class="QLabel" name="label_5">
-                 <property name="font">
-                  <font>
-                   <pointsize>12</pointsize>
-                  </font>
-                 </property>
-                 <property name="text">
-                  <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;z&lt;span style=&quot; vertical-align:sub;&quot;&gt;0&lt;/span&gt; = &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                 </property>
-                 <property name="textFormat">
-                  <enum>Qt::RichText</enum>
-                 </property>
-                </widget>
-               </item>
-               <item row="1" column="1">
-                <widget class="QLineEdit" name="initialFormula">
-                 <property name="font">
-                  <font>
-                   <pointsize>12</pointsize>
-                  </font>
-                 </property>
-                 <property name="text">
-                  <string>0</string>
-                 </property>
-                </widget>
-               </item>
-               <item row="2" column="0" colspan="2">
-                <widget class="QLabel" name="label_4">
-                 <property name="font">
-                  <font>
-                   <pointsize>12</pointsize>
-                  </font>
-                 </property>
-                 <property name="text">
-                  <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Iteration Formula&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;Specify the iteration formula in terms of z and c.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-                 </property>
-                </widget>
-               </item>
-               <item row="4" column="1">
-                <spacer name="verticalSpacer">
-                 <property name="orientation">
-                  <enum>Qt::Vertical</enum>
-                 </property>
-                 <property name="sizeHint" stdset="0">
-                  <size>
-                   <width>20</width>
-                   <height>40</height>
-                  </size>
-                 </property>
-                </spacer>
-               </item>
-              </layout>
-             </item>
-             <item>
-              <widget class="QPushButton" name="compile">
-               <property name="text">
-                <string>Compile</string>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-          </layout>
-         </widget>
          <widget class="QWidget" name="tab">
           <attribute name="title">
            <string>Measure Performance</string>

+ 62 - 0
customgenerator.cpp

@@ -0,0 +1,62 @@
+#include "customgenerator.h"
+#include "ui_customgenerator.h"
+
+
+#include <IterationCompiler.h>
+
+CustomGenerator::CustomGenerator(mnd::MandelContext& mndCtxt, QWidget *parent) :
+    QDialog{ parent },
+    mndCtxt{ mndCtxt },
+    ui{ new Ui::CustomGenerator }
+{
+    ui->setupUi(this);
+}
+
+CustomGenerator::~CustomGenerator()
+{
+    delete ui;
+}
+
+void CustomGenerator::on_compile_clicked()
+{
+    QString z0formula = this->ui->formula_z0->text();
+    QString ziformula = this->ui->formula_zi->text();
+    mnd::IterationFormula zi{ mnd::parse(ziformula.toStdString()), { "c", "z" } };
+    mnd::IterationFormula z0{ mnd::parse(z0formula.toStdString()), { "c" } };
+
+    mnd::GeneratorCollection cr;
+
+    try {
+        //std::cout << mnd::toString(*z0.expr) << std::endl;
+        //std::cout << mnd::toString(*zi.expr) << std::endl;
+        cr = mnd::compileFormula(mndCtxt, z0, zi);
+    }
+    catch(const mnd::ParseError& pe) {
+        printf("Parse error: %s\n", pe.what());
+        return;
+    }
+    catch(const std::string& e) {
+        printf("error: %s\n", e.c_str());
+        return;
+    }
+    /*catch(const char* e) {
+        printf("error: %s\n", e);
+        return;
+    }*/
+    fflush(stdout);
+    fractalDefs.push_back(FractalDef {
+                "name",
+                z0formula,
+                ziformula,
+                std::move(cr)
+    });
+}
+
+
+FractalDef* CustomGenerator::getLastCompiled(void)
+{
+    if (!fractalDefs.empty())
+        return &fractalDefs[fractalDefs.size() - 1];
+    else
+        return nullptr;
+}

+ 42 - 0
customgenerator.h

@@ -0,0 +1,42 @@
+#ifndef CUSTOMGENERATOR_H
+#define CUSTOMGENERATOR_H
+
+#include <QDialog>
+
+#include <Mandel.h>
+#include <IterationCompiler.h>
+
+
+struct FractalDef
+{
+    QString name;
+    QString z0;
+    QString zi;
+    mnd::GeneratorCollection gc;
+};
+
+
+namespace Ui {
+class CustomGenerator;
+}
+
+class CustomGenerator : public QDialog
+{
+    Q_OBJECT
+
+    mnd::MandelContext& mndCtxt;
+    std::vector<FractalDef> fractalDefs;
+public:
+    explicit CustomGenerator(mnd::MandelContext& mndCtxt, QWidget *parent = nullptr);
+    ~CustomGenerator();
+
+    FractalDef* getLastCompiled(void);
+
+private slots:
+    void on_compile_clicked();
+
+private:
+    Ui::CustomGenerator *ui;
+};
+
+#endif // CUSTOMGENERATOR_H

+ 197 - 0
customgenerator.ui

@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CustomGenerator</class>
+ <widget class="QDialog" name="CustomGenerator">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>892</width>
+    <height>556</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_4">
+     <item>
+      <widget class="QLabel" name="label_3">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Formula Editor&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" name="verticalLayout_5">
+       <item>
+        <layout class="QFormLayout" name="formLayout">
+         <item row="3" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="font">
+            <font>
+             <pointsize>12</pointsize>
+            </font>
+           </property>
+           <property name="text">
+            <string>z := </string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="formula_zi">
+           <property name="font">
+            <font>
+             <pointsize>12</pointsize>
+            </font>
+           </property>
+           <property name="text">
+            <string>z^2+c</string>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="0">
+          <widget class="QPushButton" name="benchmark">
+           <property name="text">
+            <string>Benchmark</string>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="1">
+          <widget class="QLineEdit" name="compBenchResult"/>
+         </item>
+         <item row="0" column="0" colspan="2">
+          <widget class="QLabel" name="descriptionInitial">
+           <property name="font">
+            <font>
+             <pointsize>12</pointsize>
+            </font>
+           </property>
+           <property name="text">
+            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Initial Iteration Value&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;Specify the initial value for z depending on c.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <property name="textFormat">
+            <enum>Qt::RichText</enum>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_5">
+           <property name="font">
+            <font>
+             <pointsize>12</pointsize>
+            </font>
+           </property>
+           <property name="text">
+            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;z&lt;span style=&quot; vertical-align:sub;&quot;&gt;0&lt;/span&gt; = &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <property name="textFormat">
+            <enum>Qt::RichText</enum>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="formula_z0">
+           <property name="font">
+            <font>
+             <pointsize>12</pointsize>
+            </font>
+           </property>
+           <property name="text">
+            <string>0</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0" colspan="2">
+          <widget class="QLabel" name="label_4">
+           <property name="font">
+            <font>
+             <pointsize>12</pointsize>
+            </font>
+           </property>
+           <property name="text">
+            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Iteration Formula&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;Specify the iteration formula in terms of z and c.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <spacer name="verticalSpacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QPushButton" name="compile">
+         <property name="text">
+          <string>Compile</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>CustomGenerator</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>CustomGenerator</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>