Ejemplo n.º 1
0
bool CQFunctionDM::insertRows(int position, int rows, const QModelIndex & parent)
{
  beginInsertRows(parent, position, position + rows - 1);

  for (int row = 0; row < rows; ++row)
    {
      CFunction *pFunc;
      QString Name = createNewName(mNewName, COL_NAME_FUNCTIONS);

      CRootContainer::getFunctionList()->add(pFunc = new CKinFunction(TO_UTF8(Name)), true);
      emit notifyGUI(ListViews::ObjectType::FUNCTION, ListViews::ADD, pFunc->getCN());
    }

  endInsertRows();

  mNewName = "function";

  return true;
}