コード例 #1
0
	void TrayComponent::HandleDockAction (QDockWidget *dw, bool visible)
	{
		QAction *act = dw->toggleViewAction ();
		if (!visible)
			RemoveAction (act);
		else
			AddActions ({ act }, ActionPos::Beginning);
	}
コード例 #2
0
void CSkeletonActionExpDlg::OnBnClickedActionRemove()
{
    POSITION pos = m_ctrlActionList.GetFirstSelectedItemPosition();
    int index = m_ctrlActionList.GetNextSelectedItem(pos);
    if(index >= 0 && index < (int)m_ActionList.size())
    {
        RemoveAction(index);
    }
}
コード例 #3
0
//-----------------------------------------------------------------------------
//! All items removed and refreshed when the menu is first shown
//-----------------------------------------------------------------------------
void tAutopilotSelectedDeviceMenu::MenuOpened()
{
    //Remove all devices (leaving the fixed items at the top)
    while( !m_SelectDeviceActGroup.isEmpty() )
    {
        tAction* pAction = m_SelectDeviceActGroup.first();
        RemoveAction( pAction );
        m_SelectDeviceActGroup.removeOne( pAction );
    }

    SelectItem( 0 );

    QTimer::singleShot( 0, this, SLOT( UpdateListOfDevices() ) );
    m_pTimer->start();
}
コード例 #4
0
		void AddAction(std::uint32_t multiplier, ImpulsedAction action, bool repeat) override {
			std::lock_guard<std::recursive_mutex> lock(m_mutex);
			RemoveAction(action);
			Record r{ multiplier, action };
			m_actions.push_back(r);
		}