DigitalCircuit/include/Component.hpp
2020-12-02 21:18:53 +01:00

29 lines
476 B
C++

#pragma once
#include <qframe.h>
namespace Ui {
class Component;
}
class Component : public QFrame
{
public:
explicit Component(QWidget* parent);
explicit Component(QWidget* parent, const QString& resource);
virtual void mouseMoveEvent(QMouseEvent* event) override;
QPoint CenterPos();
void Connect(Component* component);
const QString& Type();
virtual bool Action() = 0;
protected:
Ui::Component* ui;
QString type;
std::vector<Component*> connections;
};