wip: codegenerator, basic widget present for showing the generated code and specifying

parameters. Some code is also generated but it is not complete yet.

minimum still required
- field assignments
- properly format and escape the query string
This commit is contained in:
eelke 2018-09-18 11:53:19 +02:00
parent daf9536bed
commit f5145f36ed
19 changed files with 380 additions and 32 deletions

80
pglab/CodeGenerator.ui Normal file
View file

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CodeGenerator</class>
<widget class="QWidget" name="CodeGenerator">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1127</width>
<height>762</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSplitter" name="splitter">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QFormLayout" name="formLayout">
<item row="1" column="0">
<widget class="QLabel" name="structNameLabel">
<property name="text">
<string>Struct name:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="structNameEdit"/>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="updateCodeButton">
<property name="text">
<string>Update code</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Configuration</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBox"/>
</item>
</layout>
</widget>
<widget class="CodeEditor" name="generatedCodeEditor">
<property name="tabChangesFocus">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>CodeEditor</class>
<extends>QPlainTextEdit</extends>
<header>CodeEditor.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>