Exemplo n.º 1
0
	QList<AMAction3*> findActionsWhereNameContains(AMAction3 *rootAction, const QString &searchString){
		QList<AMAction3*> retVal;
		AMListAction3 *castToListAction = qobject_cast<AMListAction3*>(rootAction);
		if(castToListAction){
			for(int x = 0; x < castToListAction->subActionCount(); x++){
				AMListAction3 *subActionToListAction = qobject_cast<AMListAction3*>(castToListAction->subActionAt(x));
				if(subActionToListAction && subActionToListAction->info()->shortDescription().contains(searchString))
					retVal.append(subActionToListAction);
				retVal.append((findActionsNamed(castToListAction->subActionAt(x), searchString)));
			}
		}
		return retVal;
	}
Exemplo n.º 2
0
	QList<AMAction3*> findActionsNamed(AMAction3 *rootAction, const QString &name){
		QList<AMAction3*> retVal;
		AMListAction3 *castToListAction = qobject_cast<AMListAction3*>(rootAction);
		if(castToListAction){
			for(int x = 0; x < castToListAction->subActionCount(); x++){
				AMListAction3 *subActionToListAction = qobject_cast<AMListAction3*>(castToListAction->subActionAt(x));
				if(subActionToListAction && subActionToListAction->info()->shortDescription() == name)
					retVal.append(subActionToListAction);
				retVal.append((findActionsNamed(castToListAction->subActionAt(x), name)));
			}
		}
		return retVal;
	}