Add saveable labels for parts and connectors

This commit is contained in:
xypwn
2020-04-03 19:38:01 +02:00
parent de3d0823fb
commit 5340635389
26 changed files with 341 additions and 63 deletions

9
Part.h
View File

@@ -3,11 +3,13 @@
#include <QGraphicsItem>
#include <QList>
#include <QLineEdit>
#include "ePartType.h"
class Connector;
class Logic;
class Label;
class Part : protected QGraphicsItem
{
@@ -49,6 +51,9 @@ public:
QPointF getPos() const;
void setPos(QPointF pos);
void setLabel(QString text);
QString label() const;
void addInputs(int amount);
void addOutputs(int amount);
@@ -89,7 +94,9 @@ protected:
int m_widthFactor;
private:
// Updates all of the outputs using the inputs
// Updates all of the outputs using the inputs, called by Logic
void updateState();
Label* m_label;
};
#endif // CIRCUITITEM_H