示例#1
0
void Task::execute(Time time)
{
	if (m_is_looping)
		m_next_execution += m_period;

	onExecute(time);
}
示例#2
0
void Cmd::execute(Context* ctx)
{
  ASSERT(m_state == State::NotExecuted);

  m_ctx = ctx;

  onExecute();
  onFireNotifications();

#if _DEBUG
  m_state = State::Executed;
#endif
}
示例#3
0
void Cmd::execute(Context* ctx)
{
  DLOG("Cmd: Executing cmd '%s'\n", typeid(*this).name());
  ASSERT(m_state == State::NotExecuted);

  m_ctx = ctx;

  onExecute();
  onFireNotifications();

#if _DEBUG
  m_state = State::Executed;
#endif
}
示例#4
0
CXUtilsWindow::CXUtilsWindow() :
    AXBaseWindow()
{
  setGroupNumber(101);
  mProcess = NULL;

  QVBoxLayout* centralLayout = new QVBoxLayout(this);
  centralLayout->setMargin(7);
  centralLayout->setSpacing(6);

  mTreeWidget = new QTreeWidget(this);
  mTreeWidget->setHeaderHidden(true);
  mTreeWidget->setRootIsDecorated(false);

  centralLayout->addWidget(mTreeWidget);
  /**/
  QHBoxLayout* buttonLayout = new QHBoxLayout;
  buttonLayout->setMargin(0);
  buttonLayout->setSpacing(6);

  buttonLayout->addStretch();

  CXTouchButton* executeButton = new CXTouchButton(trUtf8("Запустить"), this);
  buttonLayout->addWidget(executeButton);

  CXTouchButton* closeButton = new CXTouchButton(trUtf8("Закрыть"), this);
  closeButton->setObjectName("mCloseButton");
  buttonLayout->addWidget(closeButton);
  /**/
  centralLayout->addLayout(buttonLayout);

  connect(executeButton, SIGNAL(clicked()), this, SLOT(onExecute()));
  connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));

  registerManager();

  load("utils.xml");
}
示例#5
0
	void IJob::execute(Thread::IThread* t)
	{
		// note: \p t can be null

		// Reseting data
		// We will keep the state in `waiting` until we have properly set
		// all other values
		pThread = t;
		pCanceling = 0;
		pProgression = 0;

		// Here we go !
		pState = stateRunning;
		// Execute the specific implementation of the job
		onExecute();
		// The state must be reset to idle as soon as possible while the
		// other values are still valid.
		pState = stateIdle;

		// Other values
		pThread = nullptr;
		pProgression = 100;
	}
示例#6
0
void Command::execute(Context* context)
{
    onExecute(context);
}
示例#7
0
void Cmd::onRedo()
{
  // By default onRedo() uses onExecute() implementation
  onExecute();
}