Initial Commit
This commit is contained in:
24
Parts/ToggleButton.h
Normal file
24
Parts/ToggleButton.h
Normal 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
|
||||
Reference in New Issue
Block a user