You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
883 B

#include <QGraphicsLineItem>
class Connector;
class Scene;
class Wire : private QGraphicsLineItem
friend class Connector;
friend class Scene;
friend class Logic;
friend class RemoveWire;
friend class MainWindow;
friend class FileHandler;
friend class CircuitBuffer;
// Assumes that the CircuitConnectors A and B each have a different orientation
Wire(Scene* scene, Connector *A, Connector *B);
void updateLine(); // Graphical update
void feedInput(); // Logical update (feeds input to output and updates state, also causes a graphical update)
Scene* m_scene;
Connector* m_connectorInput; // connector inputting to this wire
Connector* m_connectorOutput; // connector receiving output from this wire
bool m_state = false;