コード例 #1
0
bool ScissorRenderState::Enable(bool val)
{
	RETURN_FALSE_IF_EQUAL(mEnabled, val);
	mEnabled = val; 
	OnStateChanged();
	return true;
}
コード例 #2
0
ファイル: CosmoButton.cpp プロジェクト: georgerbr/cosmoscroll
CosmoButton::CosmoButton(gui::Menu* owner, const sf::String& text) :
	gui::Button(owner, text, BUTTON_WIDTH, BUTTON_HEIGHT),
	m_background(Resources::getTexture("gui/button.png"))
{
	m_background.setTextureRect(sf::IntRect(0, 0, BUTTON_WIDTH, BUTTON_HEIGHT));
	setString(text);
	OnStateChanged(GetState());
}
コード例 #3
0
QmitkStoreSCPLauncher::QmitkStoreSCPLauncher(QmitkStoreSCPLauncherBuilder* builder)
: m_StoreSCP(new QProcess())
{
    connect( m_StoreSCP, SIGNAL(error(QProcess::ProcessError)),this, SLOT(OnProcessError(QProcess::ProcessError)));
    connect( m_StoreSCP, SIGNAL(stateChanged(QProcess::ProcessState)),this, SLOT(OnStateChanged(QProcess::ProcessState)));
    connect( m_StoreSCP, SIGNAL(readyReadStandardOutput()),this, SLOT(OnReadyProcessOutput()));
    SetArgumentList(builder);
}
コード例 #4
0
ファイル: ConfigButton.cpp プロジェクト: HoekWax/cosmoscroll
void ConfigButton::setJoystickLabel()
{
	unsigned int button = Input::getButtonBinding(m_action);
	setString(Input::buttonToString(button));

	// Check for error and refresh label
	m_error = button == sf::Joystick::ButtonCount;
	OnStateChanged(GetState());
}
コード例 #5
0
QmitkStoreSCPLauncher::~QmitkStoreSCPLauncher()
{
    disconnect( m_StoreSCP, SIGNAL(error(QProcess::ProcessError)),this, SLOT(OnProcessError(QProcess::ProcessError)));
    disconnect( m_StoreSCP, SIGNAL(stateChanged(QProcess::ProcessState)),this, SLOT(OnStateChanged(QProcess::ProcessState)));
    disconnect( m_StoreSCP, SIGNAL(readyReadStandardOutput()),this, SLOT(OnReadyProcessOutput()));
    m_StoreSCP->close();
    m_StoreSCP->waitForFinished(1000);
    delete m_StoreSCP;
}
コード例 #6
0
void CLayoutSystem::TransitionToState( CTilegenState *pState )
{	
	CTilegenState *pOldState = m_pCurrentState;
	m_pCurrentState = pState;
	m_CurrentIterationState.m_bStopIteration = true;
	OnStateChanged( pOldState );
	Log_Msg( LOG_TilegenLayoutSystem, "Transitioning to state %s.\n", pState->GetStateName() );
	StopProcessingActions();
}
コード例 #7
0
bool ScissorRenderState::SetScissorBox(const Rect2F& val)
{
	RETURN_FALSE_IF_EQUAL(mScissorBox, val);

	mScissorBox = val; 
	OnStateChanged();
	return true;

}
コード例 #8
0
ファイル: ConfigButton.cpp プロジェクト: HoekWax/cosmoscroll
void ConfigButton::setKeyboardLabel()
{
	sf::Keyboard::Key key = Input::getKeyBinding(m_action);
	setString(Input::keyToString(key));

	// Check for error and refresh label
	m_error = key == sf::Keyboard::Unknown;
	OnStateChanged(GetState());
}
コード例 #9
0
/**
* Sets the state of an item in the list.
* @param index Index of the item whose state should be changed.
* @param toggleState The state to set
* @param notify Determines if the notification method OnStateChanged should
* be called. OnStateChanged will also not be called if the state has not changed.
*/
void ToggleListView::SetToggleState(int index, int toggleState, bool notify) {
	CListCtrl& list = GetListCtrl();
	assert(index >= 0 && index < list.GetItemCount());

	int oldState = GetToggleState(index);
	list.SetItemData(index, toggleState);

	if(notify && oldState != toggleState)
		OnStateChanged(index, toggleState);
}
コード例 #10
0
ファイル: ConfigButton.cpp プロジェクト: HoekWax/cosmoscroll
ConfigButton::ConfigButton(gui::Menu* owner, Action::ID action):
	gui::Button(owner, "", BUTTON_WIDTH, BUTTON_HEIGHT),
	m_action(action),
	m_error(false)
{
	m_background.setTexture(Resources::getTexture("gui/button-config.png"));
	m_background.setTextureRect(sf::IntRect(0, 0, BUTTON_WIDTH, BUTTON_HEIGHT));
	SetTextPadding(0, -2);
	SetAlign(gui::Align::CENTER);
	SetCallbackID(action);
	OnStateChanged(GetState());
}
コード例 #11
0
ファイル: DynamicWorldObject.cpp プロジェクト: Noxalus/YAPOG
  void DynamicWorldObject::SetState (const String& state)
  {
    const String& oldState = state_.GetName ();

    state_ = state;

    OnStateChanged (
      *this, ChangeEventArgs<const String&> (
        oldState,
        state_.GetName ()));

    HandleSetState (state);
  }
コード例 #12
0
ファイル: State.cpp プロジェクト: chenbk85/tphProjects
void IStateMachine::ChangeState( IState* nextState,CARCportEngine* pEngine )
{
	//
	if(m_curState)
	{
		m_curState->Exit(pEngine);
	}
	cpputil::autoPtrReset(m_curState,nextState);
	OnStateChanged();
	if(m_curState)
	{
		m_curState->Entry(pEngine);
	}
}
コード例 #13
0
ファイル: CheatsManager.cpp プロジェクト: dolphin-emu/dolphin
CheatsManager::CheatsManager(QWidget* parent) : QDialog(parent)
{
  setWindowTitle(tr("Cheats Manager"));
  setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

  connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
          &CheatsManager::OnStateChanged);

  OnStateChanged(Core::GetState());

  CreateWidgets();
  ConnectWidgets();
  Reset();
  Update();
}
コード例 #14
0
ファイル: perflog.cpp プロジェクト: PanjiNamjaElf/vsfiltermod
ULONG
WINAPI
PerflogCallback(
    WMIDPREQUESTCODE RequestCode,
    __in PVOID Context,
    __out ULONG* BufferSize,
    __in PVOID Buffer
)
{
    ULONG status;

    UNREFERENCED_PARAMETER(Context);

    ASSERT(EventTracingAvailable);

    status = ERROR_SUCCESS;

    switch(RequestCode)
    {

    case WMI_ENABLE_EVENTS:
        PerflogTraceHandle = _GetTraceLoggerHandle(Buffer);
        PerflogEnableFlags = _GetTraceEnableFlags(PerflogTraceHandle);
        PerflogEnableLevel = _GetTraceEnableLevel(PerflogTraceHandle);
        break;

    case WMI_DISABLE_EVENTS:
        PerflogTraceHandle = NULL;
        PerflogEnableFlags = 0;
        PerflogEnableLevel = 0;
        break;

    default:
        status = ERROR_INVALID_PARAMETER;
    }

    if(OnStateChanged != NULL)
    {
        OnStateChanged();
    }

    *BufferSize = 0;
    return status;
}
コード例 #15
0
already_AddRefed<Promise>
AudioContext::StartRendering(ErrorResult& aRv)
{
  nsCOMPtr<nsIGlobalObject> parentObject = do_QueryInterface(GetParentObject());

  MOZ_ASSERT(mIsOffline, "This should only be called on OfflineAudioContext");
  if (mIsStarted) {
    aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
    return nullptr;
  }

  mIsStarted = true;
  RefPtr<Promise> promise = Promise::Create(parentObject, aRv);
  mDestination->StartRendering(promise);

  OnStateChanged(nullptr, AudioContextState::Running);

  return promise.forget();
}
コード例 #16
0
void CWidgetSearchTemplate::StartSearch(CQuery* pQuery)
{
	if ( m_pSearch && m_pSearch->m_pQuery != pQuery )
	{
		delete m_pSearch;
		m_pSearch = 0;
	}

	if ( !m_pSearch )
	{
		m_pSearch = new CManagedSearch( pQuery );
		connect( m_pSearch, SIGNAL( OnHit( QueryHitSharedPtr) ), m_pSearchModel, SLOT( addQueryHit( QueryHitSharedPtr ) ) );
		connect( m_pSearch, SIGNAL( StatsUpdated() ), this, SLOT( OnStatsUpdated() ) );
		connect( m_pSearch, SIGNAL( StateChanged() ), this, SLOT( OnStateChanged() ) );
	}

	m_searchState = SearchState::Searching;
	m_pSearch->start();
	m_sSearchString = m_pSearch->m_pQuery->descriptiveName();
}
コード例 #17
0
ファイル: GraphMapper.cpp プロジェクト: pimms/higai2
void GraphMapper::OnKeyDown(int key)
{
    State nstate = NONE;

    switch (key) {
    /* STATE ALTERING KEYS */
    case 'p':
        nstate = PATHFIND;
        break;
    case 'w':
        nstate = ADD_WALL;
        break;

    /* NON-STATE ALTERING KEYS
     * Keys which alter the mode of operation without
     * changing the GraphMapper-state are handled here.
     */
    case 'g':
    case 't':
        _searchType = _searchType == AStar::GRAPH
                      ? AStar::TREE
                      : AStar::GRAPH;
        printf("Search tye: %s\n",
               _searchType==AStar::GRAPH?"GRAPH":"TREE");
        _pathcreator.FindPath(_searchType);
        break;

    case 'd':
        _drawProgress = !_drawProgress;
        printf("Draw progress: %s\n", _drawProgress?"true":"false");
        _pathcreator.SetProgressRendering(_drawProgress);
    }

    if (nstate != NONE && _state != nstate) {
        _state = nstate;
        OnStateChanged();
    }
}