29 lines
675 B
C
29 lines
675 B
C
|
#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
|