summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-06-25 20:30:58 +0930
committerDaniel Jones <admin@danieljon.es>2020-06-25 20:30:58 +0930
commita07c85b04f8bccd924dc020dcb9c6a32d2907e27 (patch)
treeadd31aa9bdc2a4eae84654fba59431f29b8829d3
parente94e0492774134f171cded42f03ebe4e892122b0 (diff)
downloadfoxlogicgates-a07c85b04f8bccd924dc020dcb9c6a32d2907e27.tar.gz
foxlogicgates-a07c85b04f8bccd924dc020dcb9c6a32d2907e27.zip
added example XML files for some gate tests
-rw-r--r--MainWindow.cpp4
-rw-r--r--examples/AND_OR.xml22
-rw-r--r--examples/test_all_gates.xml74
3 files changed, 98 insertions, 2 deletions
diff --git a/MainWindow.cpp b/MainWindow.cpp
index fe5f5c1..77a3b3d 100644
--- a/MainWindow.cpp
+++ b/MainWindow.cpp
@@ -137,9 +137,9 @@ MainWindow::create_ui()
new FXHorizontalSeparator(optionsFrame, SEPARATOR_RIDGE|LAYOUT_FILL_X);
/* save/load */
- new FXLabel(optionsFrame, "Save", NULL, JUSTIFY_CENTER_X);
+ new FXLabel(optionsFrame, "Save as XML", NULL, JUSTIFY_CENTER_X|LAYOUT_FILL_X);
new FXButton(optionsFrame, "Save", nullptr, this, MainWindow::ID_BUTTON_SAVE, BUTTON_NORMAL|LAYOUT_FILL_X);
- new FXLabel(optionsFrame, "Load", NULL, JUSTIFY_CENTER_X);
+ new FXLabel(optionsFrame, "Load from XML", NULL, JUSTIFY_CENTER_X|LAYOUT_FILL_X);
new FXButton(optionsFrame, "Load", nullptr, this, MainWindow::ID_BUTTON_LOAD, BUTTON_NORMAL|LAYOUT_FILL_X);
}
diff --git a/examples/AND_OR.xml b/examples/AND_OR.xml
new file mode 100644
index 0000000..f278ac0
--- /dev/null
+++ b/examples/AND_OR.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+<Meta>
+ <Info next_id="6" />
+</Meta>
+<Gates>
+ <Gate id="0" x="67" y="35" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="4" />
+ </Gate>
+ <Gate id="1" x="62" y="146" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="5" />
+ </Gate>
+ <Gate id="2" x="56" y="243" w="70" h="50" type="1" output_state="false">
+ <output_gate_id id="5" />
+ </Gate>
+ <Gate id="3" x="540" y="106" w="70" h="50" type="2" input1_id="4" output_state="true" />
+ <Gate id="4" x="380" y="106" w="70" h="50" type="3" input1_id="0" input2_id="5" output_state="true">
+ <output_gate_id id="3" />
+ </Gate>
+ <Gate id="5" x="199" y="178" w="70" h="50" type="4" input1_id="1" input2_id="2" output_state="true">
+ <output_gate_id id="4" />
+ </Gate>
+</Gates>
diff --git a/examples/test_all_gates.xml b/examples/test_all_gates.xml
new file mode 100644
index 0000000..1b77e82
--- /dev/null
+++ b/examples/test_all_gates.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+<Meta>
+ <Info next_id="34" />
+</Meta>
+<Gates>
+ <Gate id="6" x="34" y="20" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="7" />
+ </Gate>
+ <Gate id="7" x="209" y="47" w="70" h="50" type="3" input1_id="6" input2_id="8" output_state="true">
+ <output_gate_id id="9" />
+ </Gate>
+ <Gate id="8" x="32" y="95" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="7" />
+ </Gate>
+ <Gate id="9" x="389" y="43" w="70" h="50" type="2" input1_id="7" output_state="true" />
+ <Gate id="10" x="29" y="171" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="13" />
+ </Gate>
+ <Gate id="11" x="25" y="243" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="13" />
+ </Gate>
+ <Gate id="13" x="196" y="193" w="70" h="50" type="6" input1_id="10" input2_id="11" output_state="false">
+ <output_gate_id id="14" />
+ </Gate>
+ <Gate id="14" x="379" y="193" w="70" h="50" type="2" input1_id="13" output_state="false" />
+ <Gate id="15" x="29" y="318" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="17" />
+ </Gate>
+ <Gate id="16" x="26" y="393" w="70" h="50" type="1" output_state="false">
+ <output_gate_id id="17" />
+ </Gate>
+ <Gate id="17" x="190" y="345" w="70" h="50" type="4" input1_id="15" input2_id="16" output_state="true">
+ <output_gate_id id="18" />
+ </Gate>
+ <Gate id="18" x="367" y="341" w="70" h="50" type="2" input1_id="17" output_state="true" />
+ <Gate id="19" x="29" y="465" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="21" />
+ </Gate>
+ <Gate id="20" x="27" y="527" w="70" h="50" type="1" output_state="false">
+ <output_gate_id id="21" />
+ </Gate>
+ <Gate id="21" x="172" y="480" w="70" h="50" type="7" input1_id="19" input2_id="20" output_state="false">
+ <output_gate_id id="22" />
+ </Gate>
+ <Gate id="22" x="358" y="476" w="70" h="50" type="2" input1_id="21" output_state="false" />
+ <Gate id="23" x="22" y="603" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="25" />
+ </Gate>
+ <Gate id="24" x="18" y="675" w="70" h="50" type="1" output_state="false">
+ <output_gate_id id="25" />
+ </Gate>
+ <Gate id="25" x="171" y="623" w="70" h="50" type="8" input1_id="23" input2_id="24" output_state="true">
+ <output_gate_id id="26" />
+ </Gate>
+ <Gate id="26" x="358" y="614" w="70" h="50" type="2" input1_id="25" output_state="true" />
+ <Gate id="27" x="14" y="740" w="70" h="50" type="1" output_state="false">
+ <output_gate_id id="29" />
+ <output_gate_id id="30" />
+ </Gate>
+ <Gate id="28" x="10" y="823" w="70" h="50" type="1" output_state="false">
+ <output_gate_id id="30" />
+ </Gate>
+ <Gate id="29" x="349" y="762" w="70" h="50" type="2" input1_id="30" output_state="true" />
+ <Gate id="30" x="164" y="774" w="70" h="50" type="9" input1_id="27" input2_id="28" output_state="true">
+ <output_gate_id id="29" />
+ </Gate>
+ <Gate id="31" x="14" y="906" w="70" h="50" type="1" output_state="true">
+ <output_gate_id id="32" />
+ </Gate>
+ <Gate id="32" x="160" y="905" w="70" h="50" type="5" input1_id="31" output_state="false">
+ <output_gate_id id="33" />
+ </Gate>
+ <Gate id="33" x="339" y="905" w="70" h="50" type="2" input1_id="32" output_state="false" />
+</Gates>