コード例 #1
0
ファイル: wndobj.cpp プロジェクト: UIKit0/Chicken-Tournament
CWnd::~CWnd()
{
	if (childwindow)delete childwindow;
	DeleteChilds();
	SaveRelease(surf);
	free(title);
}
コード例 #2
0
void CServerPage::Execute(float elapsed)
{
	CPage::Execute(elapsed);

	lasttime+=elapsed;

	if (lasttime>1.5f)
	{
		lasttime=0.0f;
		if (game->IsServer)
		{
			if (mustsend)game->SendVariables();
			mustsend=FALSE;
		}else{
			int last=GetFocusedChild();
			DeleteChilds();
			Create();
			SetFocus(last);
		}
	}
}
コード例 #3
0
void ClassInfoModel::SetClassItem(const Class &cClass)
{
	const Class *pClass = &cClass;

	beginResetModel();

	DeleteChilds(m_pCommonCategory);
	DeleteChilds(m_pAttributeCategory);
	DeleteChilds(m_pSlotsCategory);
	DeleteChilds(m_pSignalsCategory);
	DeleteChilds(m_pPropertiesCategory);
	DeleteChilds(m_pConstructorsCategory);
	DeleteChilds(m_pMethodsCategory);

	// Add common information items
	new ClassListItem(pClass, NameRole, m_pCommonCategory);
	new ClassListItem(pClass, DescriptionRole, m_pCommonCategory);

	// Add attributes
	const List<VarDesc*> &attr = cClass.GetAttributes();
	for (uint32 i=0; i<attr.GetNumOfElements(); ++i) {
		VarDesc *pVarDesc = attr[i];
		new ClassInfoAttributeTreeItem(*pVarDesc, m_pAttributeCategory);
	}

	// Add slots
	const List<EventHandlerDesc*> &cSlots = cClass.GetSlots();
	for (uint32 i=0; i<cSlots.GetNumOfElements(); ++i) {
		EventHandlerDesc *pVarDesc = cSlots[i];
		new ClassInfoMemberWithSignatureDescTreeItem<EventHandlerDesc>(tr("Slot"), *pVarDesc, m_pSlotsCategory);
	}

	// Add signals
	const List<EventDesc*> &cSignals = cClass.GetSignals();
	for (uint32 i=0; i<cSignals.GetNumOfElements(); ++i) {
		EventDesc *pVarDesc = cSignals[i];
		new ClassInfoMemberWithSignatureDescTreeItem<EventDesc>(tr("Signal"), *pVarDesc, m_pSignalsCategory);
	}

	// Add properties
	const HashMap<String, String> &cProps = cClass.GetProperties();
	Iterator<String> cIterator = cProps.GetKeyIterator();
	while (cIterator.HasNext()) {
		const String sName  = cIterator.Next();
		const String sValue = cProps.Get(sName);
		new ClassInfoPropertyTreeItem(QtStringAdapter::PLToQt(sName), QtStringAdapter::PLToQt(sValue), m_pPropertiesCategory);
	}

	// Add constructors
	const List<ConstructorDesc*> &cConstructors = cClass.GetConstructors();
	for (uint32 i=0; i<cConstructors.GetNumOfElements(); ++i) {
		ConstructorDesc *pVarDesc = cConstructors[i];
		new ClassInfoMemberWithSignatureDescTreeItem<ConstructorDesc>(tr("Constructor"), *pVarDesc, m_pConstructorsCategory);
	}

	// Add methods
	const List<FuncDesc*> &cMethods = cClass.GetMethods();
	for (uint32 i=0; i<cMethods.GetNumOfElements(); ++i) {
		FuncDesc *pVarDesc = cMethods[i];
		new ClassInfoMemberWithSignatureDescTreeItem<FuncDesc>(tr("Method"), *pVarDesc, m_pMethodsCategory);
	}

	endResetModel();
}
コード例 #4
0
ファイル: DOM.cpp プロジェクト: gitter-badger/MPACK
		void DOM::Clear()
		{
			DeleteChilds();
			DeleteProperties();
			DeleteArray();
		}