Initial Commit

This commit is contained in:
xypwn
2020-03-24 20:18:39 +01:00
commit dfeb7de33c
70 changed files with 4920 additions and 0 deletions

24
Parts/ToggleButton.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef TOGGLEBUTTON_H
#define TOGGLEBUTTON_H
#include "../Part.h"
class ToggleButton : public Part
{
public:
friend class IntegratedCircuit;
ToggleButton(Logic* logic);
QVector<bool> compute(QVector<bool> inputs) override;
QPainterPath symbolPainterPath(QRect limits) override;
private:
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
QPointF m_dragBeginPos;
bool m_toggleState = false;
};
#endif // TOGGLEBUTTON_H