schema_editor/comdel/display/component_display.h

29 lines
675 B
C
Raw Normal View History

2022-04-07 22:21:23 +00:00
#ifndef DISPLAY_COMPONENT_H
#define DISPLAY_COMPONENT_H
#include <comdel/domain/instance.h>
#include <comdel/domain/wireinstance.h>
#include <QGraphicsItemGroup>
namespace display {
class Component: public QGraphicsItemGroup
{
public:
static Component *ofComponent(domain::ComponentInstance *instance);
static Component *ofBus(domain::BusInstance *instance);
static Component *ofWire(domain::WireInstance *wire);
void redraw();
private:
domain::ComponentInstance *componentInstance = nullptr;
domain::BusInstance *busInstance = nullptr;
domain::WireInstance *wireInstance = nullptr;
};
} // namespace display
#endif // DISPLAY_COMPONENT_H