void Input::removeSelection() { if (dataModel()->inputs().empty()) return; int _row = ui_->inputList->currentIndex().row(); if (_row < 1 || _row > dataModel()->inputs().numberOfChildren()) return; auto* _item = model_->item(_row); if (!_item) return; dataModel()->inputs().removeInput(_item->text()); model_->removeRows(_row,1); this->removeParameterWidget(widget()); changeSelection(model_->index(_row,0)); emit inputRemoved(); }
void Stage::removeInput(AbstractSlot * input) { // Find input auto it = std::find(m_inputs.begin(), m_inputs.end(), input); if (it != m_inputs.end()) { cppassist::debug(2, "gloperate") << input->qualifiedName() << ": remove input from stage"; // Remove input m_inputs.erase(it); m_inputsMap.erase(input->name()); // Emit signal inputRemoved(input); } // Remove property removeProperty(input); }
//------------------------------------------------------------------ void ImageOutput::removeInput(int inputId_){ for(std::vector<ImageOutput*>::iterator it = input.begin(); it != input.end(); it++ ){ if((*it)->getId() == inputId_){ input.erase(it); input[input.size()] = NULL; if (input.size() == 0) { drawNoInputs = true; resetSizeToNoInputs(); } else { resetSizeBasedOnInput(input[0]); } inputRemoved(inputId_); break; } } }