Added more logic gates and fixed placement issues
This commit is contained in:
parent
96f2cffbcc
commit
79c5d147a3
10 changed files with 157 additions and 19 deletions
101
ui/Window.ui
101
ui/Window.ui
|
@ -30,8 +30,13 @@
|
|||
</attribute>
|
||||
<addaction name="actionStart"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionAddNOT"/>
|
||||
<addaction name="actionAddAND"/>
|
||||
<addaction name="actionAddNAND"/>
|
||||
<addaction name="actionAddOR"/>
|
||||
<addaction name="actionAddNOR"/>
|
||||
<addaction name="actionAddXOR"/>
|
||||
<addaction name="actionAddXNOR"/>
|
||||
</widget>
|
||||
<action name="actionStart">
|
||||
<property name="icon">
|
||||
|
@ -53,7 +58,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="assets/resources.qrc">
|
||||
|
@ -66,7 +71,7 @@
|
|||
<string>Create an AND gate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>1</string>
|
||||
<string>2</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddOR">
|
||||
|
@ -85,7 +90,97 @@
|
|||
<string>Create an OR gate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>2</string>
|
||||
<string>4</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddNOT">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="assets/resources.qrc">
|
||||
<normaloff>:/components/not.png</normaloff>:/components/not.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>AddNOT</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Create a NOT gate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddNAND">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="assets/resources.qrc">
|
||||
<normaloff>:/components/nand.png</normaloff>:/components/nand.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>AddNAND</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Create a NAND gate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddNOR">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="assets/resources.qrc">
|
||||
<normaloff>:/components/nor.png</normaloff>:/components/nor.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>AddNOR</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Create a NOR gate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddXOR">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="assets/resources.qrc">
|
||||
<normaloff>:/components/xor.png</normaloff>:/components/xor.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>AddXOR</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Create an XOR gate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddXNOR">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="assets/resources.qrc">
|
||||
<normaloff>:/components/xnor.png</normaloff>:/components/xnor.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>AddXNOR</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Create an XNOR gate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
Start/Stop icons taken from https://iconsmind.com/ (modified)
|
||||
|
||||
Logic Gates taken from Wikimedia Commons. The authors are
|
||||
* jjbeard (AND, OR)
|
||||
Logic Gates taken from Wikimedia Commons. https://commons.wikimedia.org/wiki/Logic_gates_unified_symbols
|
||||
|
||||
The Wikimedia icons are part of the public domain
|
BIN
ui/assets/nand.png
Normal file
BIN
ui/assets/nand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 813 B |
BIN
ui/assets/nor.png
Normal file
BIN
ui/assets/nor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
BIN
ui/assets/not.png
Normal file
BIN
ui/assets/not.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 800 B |
|
@ -6,5 +6,10 @@
|
|||
<qresource prefix="/components">
|
||||
<file>and.png</file>
|
||||
<file>or.png</file>
|
||||
<file>nand.png</file>
|
||||
<file>nor.png</file>
|
||||
<file>not.png</file>
|
||||
<file>xnor.png</file>
|
||||
<file>xor.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
ui/assets/xnor.png
Normal file
BIN
ui/assets/xnor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
ui/assets/xor.png
Normal file
BIN
ui/assets/xor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Add table
Add a link
Reference in a new issue