예제 #1
0
Mantid::API::IFunction_sptr ConvFitModel::getFittingFunction() const {
  auto function = shallowCopy(IndirectFittingModel::getFittingFunction());
  auto composite = boost::dynamic_pointer_cast<CompositeFunction>(function);

  IFunction_sptr background(nullptr);
  if (composite && m_backgroundIndex)
    background = removeFunction(composite, *m_backgroundIndex);
  return createConvolutionFitModel(function, background, m_temperature);
}
예제 #2
0
    static void as(int s, int, BS &b) {
	if (poke(b,s).contains("AttractedTo")) {
	    int seducer = poke(b,s)["AttractedTo"].toInt();
	    if (poke(b,seducer).contains("Attracted") && poke(b,seducer)["Attracted"].toInt() == s) {
		b.sendItemMessage(7,s);
		removeFunction(poke(b,s), "DetermineAttackPossible", "Attract");
		poke(b,s).remove("AttractedTo");
		b.disposeItem(s);
	    }
	}
    }
예제 #3
0
bool CFunctionDB::removeFunction(const std::string &key)
{
  CEvaluationTree* func = dynamic_cast< CEvaluationTree * >(CCopasiRootContainer::getKeyFactory()->get(key));

  if (!func) return false;

  unsigned C_INT32 index =
    mLoadedFunctions.CCopasiVector<CEvaluationTree>::getIndex(func);

  if (index == C_INVALID_INDEX) return false;

  return removeFunction(index);
}
예제 #4
0
/**
 * Create and connect actions
 */
void FunctionBrowser::createActions()
{
  m_actionAddFunction = new QAction("Add function",this);
  connect(m_actionAddFunction,SIGNAL(triggered()),this,SLOT(addFunction()));

  m_actionRemoveFunction = new QAction("Remove function",this);
  connect(m_actionRemoveFunction,SIGNAL(triggered()),this,SLOT(removeFunction()));

  m_actionFixParameter = new QAction("Fix",this);
  connect(m_actionFixParameter,SIGNAL(triggered()),this,SLOT(fixParameter()));

  m_actionRemoveTie = new QAction("Remove tie",this);
  connect(m_actionRemoveTie,SIGNAL(triggered()),this,SLOT(removeTie()));

  m_actionAddTie = new QAction("Add tie",this);
  connect(m_actionAddTie,SIGNAL(triggered()),this,SLOT(addTie()));

  m_actionFromClipboard = new QAction("Copy from clipboard",this);
  connect(m_actionFromClipboard,SIGNAL(triggered()),this,SLOT(copyFromClipboard()));

  m_actionToClipboard = new QAction("Copy to clipboard",this);
  connect(m_actionToClipboard,SIGNAL(triggered()),this,SLOT(copyToClipboard()));

  m_actionConstraints = new QAction("Custom",this);
  connect(m_actionConstraints,SIGNAL(triggered()),this,SLOT(addConstraints()));

  m_actionConstraints10 = new QAction("10%",this);
  connect(m_actionConstraints10,SIGNAL(triggered()),this,SLOT(addConstraints10()));

  m_actionConstraints50 = new QAction("50%",this);
  connect(m_actionConstraints50,SIGNAL(triggered()),this,SLOT(addConstraints50()));

  m_actionRemoveConstraints = new QAction("Remove constraints",this);
  connect(m_actionRemoveConstraints,SIGNAL(triggered()),this,SLOT(removeConstraints()));

  m_actionRemoveConstraint = new QAction("Remove",this);
  connect(m_actionRemoveConstraint,SIGNAL(triggered()),this,SLOT(removeConstraint()));
}
예제 #5
0
 static void as(int s, int, BS &b) {
     bool used = false;
     if (poke(b,s).contains("AttractedTo")) {
         int seducer = poke(b,s)["AttractedTo"].toInt();
         if (poke(b,seducer).contains("Attracted") && poke(b,seducer)["Attracted"].toInt() == s) {
             removeFunction(poke(b,s), "DetermineAttackPossible", "Attract");
             poke(b,s).remove("AttractedTo");
             used = true;
         }
     }
     if (b.gen() >= 5) {
         if (poke(b,s).contains("Tormented")) {
             removeFunction(poke(b,s), "MovesPossible", "Torment");
             poke(b,s).remove("Tormented");
             used = true;
         }
         if (b.counters(s).hasCounter(BC::Taunt)) {
             removeFunction(poke(b,s), "MovesPossible", "Taunt");
             removeFunction(poke(b,s), "MovePossible", "Taunt");
             b.removeEndTurnEffect(BS::PokeEffect, s, "Taunt");
             used = true;
         }
         if (b.counters(s).hasCounter(BC::Encore)) {
             removeFunction(poke(b,s), "MovesPossible", "Encore");
             b.removeEndTurnEffect(BS::PokeEffect, s, "Encore");
             used = true;
         }
         if (b.counters(s).hasCounter(BC::Disable)) {
             removeFunction(poke(b,s), "MovesPossible", "Disable");
             removeFunction(poke(b,s), "MovePossible", "Disable");
             b.removeEndTurnEffect(BS::PokeEffect, s, "Disable");
             used = true;
         }
         b.counters(s).clear();
     }
     if (used) {
         b.sendItemMessage(7,s);
         b.disposeItem(s);
     }
 }
예제 #6
0
void FunctionCallScheduler::clearInterval( int id )
{
	removeFunction( id );
}
예제 #7
0
void FunctionCallScheduler::clearTimeout( int id )
{
	removeFunction( id );
}
예제 #8
0
void Collection::slotFunctionRemoved(quint32 fid)
{
    removeFunction(fid);
}