2020-03-24 20:18:39 +01:00
|
|
|
#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:
|
2020-04-04 14:07:16 +02:00
|
|
|
void partClickedEvent() override;
|
2020-03-24 20:18:39 +01:00
|
|
|
|
|
|
|
bool m_toggleState = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TOGGLEBUTTON_H
|