|
|
@@ -14,6 +14,13 @@ namespace app { |
|
|
|
|
|
|
|
CableWidget::CableWidget() { |
|
|
|
color = color::BLACK_TRANSPARENT; |
|
|
|
} |
|
|
|
|
|
|
|
CableWidget::~CableWidget() { |
|
|
|
setCable(NULL); |
|
|
|
} |
|
|
|
|
|
|
|
void CableWidget::setNextCableColor() { |
|
|
|
if (!settings::cableColors.empty()) { |
|
|
|
int id = APP->scene->rack->nextCableColorId++; |
|
|
|
APP->scene->rack->nextCableColorId %= settings::cableColors.size(); |
|
|
@@ -21,10 +28,6 @@ CableWidget::CableWidget() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
CableWidget::~CableWidget() { |
|
|
|
setCable(NULL); |
|
|
|
} |
|
|
|
|
|
|
|
bool CableWidget::isComplete() { |
|
|
|
return outputPort && inputPort; |
|
|
|
} |
|
|
|