void OSItemSelectionController::addSelectedItem(OSListItem * item)
{
  OS_ASSERT(item);

  m_selectedItems.push_back(item);

  emitSelectionChanged();
}
Exemple #2
0
void StringSelector::newString() {
  QString stringName;
  DialogLauncher::self()->showStringDialog(stringName, 0, true);
  fillStrings();
  StringPtr string = kst_cast<String>(_store->retrieveObject(stringName));

  if (string) {
    setSelectedString(string);
    emitSelectionChanged();
  }
}
void OSItemSelectionController::removeSelectedItem(OSListItem * item)
{
  OS_ASSERT(item);

  std::vector<QPointer<OSListItem> >::iterator it = 
    std::find(m_selectedItems.begin(),m_selectedItems.end(),item);

  if( it != m_selectedItems.end() )
  {
    m_selectedItems.erase(it);

    emitSelectionChanged();
  }
}
void OSItemSelectionController::removeSelectedItem(OSListItem * item)
{
  OS_ASSERT(item);

  auto it = 
    std::find(m_selectedItems.begin(),m_selectedItems.end(),item);

  if( it != m_selectedItems.end() )
  {
    m_selectedItems.erase(it);

    emitSelectionChanged();
  }
}
Exemple #5
0
void VectorSelector::newVector() {
  QString newName;
  if (_isX) {
    newName = dialogDefaults().value("curve/xvectorfield","INDEX").toString();
  }
  DialogLauncher::self()->showVectorDialog(newName, 0, true);
  fillVectors();
  VectorPtr vector = kst_cast<Vector>(_store->retrieveObject(newName));

  if (vector) {
    setSelectedVector(vector);
    emitSelectionChanged();
    emit contentChanged();
  }
}