예제 #1
0
파일: Input.cpp 프로젝트: emervark/omnidome
    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();
    }
예제 #2
0
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);
}
예제 #3
0
//------------------------------------------------------------------
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;
        }
    }
}