示例#1
0
文件: ewidget.cpp 项目: TitanNit/tdt
void eWidget::releaseFocus()
{
		// desktop shouldnt receive global focus
	ASSERT (parent);
		// childs shouldnt receive global focus
	ASSERT (!parent->parent);
	ASSERT (have_focus);

	if (have_focus)
	{
	 	--have_focus;
		if (!have_focus)
		{
			removeActionMap(&i_focusActions->map);
			if (currentFocus==this)	// if we don't have lost the focus, ...
			{
				currentFocus=oldTLfocus;	// give it back
				/*emit*/ globalFocusChanged(currentFocus);
			}
			else
				eFatal("someone has stolen the focus");
		}
 	}
}
示例#2
0
void eListBoxBase::removeFlags(int _flags)	
{
	flags &= ~_flags;	
	if (_flags == flagHasShortcuts)
		removeActionMap(&i_shortcutActions->map);
}