Пример #1
0
void UVWFrameObject::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
	this->ip = ip;
	assert(ip);

	if (flags&BEGIN_EDIT_CREATE)	creating = TRUE;
	else							creating = FALSE;

	UVWFrameCD.BeginEditParams(ip, this, flags, prev);
	shelp_param_blk.SetUserDlgProc(new UVWFrameDlgProc(this));

	SetNodeName();
}
Пример #2
0
// TLTODO:	Implementar UNDO / REDO
BOOL UVWFrameObject::AddUVWMesh(INode *node)
	{
	if (node->TestForLoop(FOREVER,this)==REF_SUCCEED) {
		TimeValue t = ip->GetTime();

		ReplaceReference(UVW_MESH_REF,(RefTargetHandle)node);

		NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE);
		SetNodeName();
		return TRUE;
	} else {
		return FALSE;
		}
	}
Пример #3
0
/* construct system_manifest object and initialize it from manifest */
void SystemManifestCtor(struct NaClApp *nap)
{
  struct SystemManifest *policy;

  /* check for design errors */
  assert(nap != NULL);
  assert(nap->system_manifest != NULL);

  policy = nap->system_manifest;
  policy->syscallback = 0;

  /* get zerovm settings from manifest */
  policy->version = GetValueByKey("Version");
  policy->nexe_etag = GetValueByKey("NexeEtag");

  /* check mandatory manifest keys */
  ZLOGFAIL(nap->system_manifest->version == NULL, EFAULT,
      "the manifest version is not provided");
  ZLOGFAIL(STRCMP(nap->system_manifest->version, MANIFEST_VERSION),
      EFAULT, "manifest version not supported");
  SetTimeout(policy);

  /* user data (environment, command line) */
  policy->envp = NULL;
  SetCustomAttributes(policy);

  /* prepare command line arguments for nexe */
  policy->cmd_line = NULL;
  policy->cmd_line_size = 0;
  SetCommandLine(policy);

  /* get node name and id */
  SetNodeName(nap);

  /* construct and initialize all channels */
  ChannelsCtor(nap);

  /*
   * allocate "whole memory chunk" if specified. should be the last allocation
   * in raw because after chunk allocated there will be no free user memory
   * note: will set "heap_ptr"
   */
  GET_INT_BY_KEY(nap->heap_end, "MemMax");
  PreallocateUserMemory(nap);

  /* zerovm return code */
  nap->system_manifest->ret_code = OK_CODE;
}
Пример #4
0
bool model::DbContainerModel::setData(const QModelIndex& index, const QVariant& value, int role /*= Qt::EditRole*/)
{
	TreeNode* node = Index2Node(index);
	if (node != nullptr)
	{
		switch (role)
		{
		case ItemNameRole:
			SetNodeName(index, value.toString());
			break;
		default:
			return QAbstractItemModel::setData(index, value, role);
		}
		return true;
	}
	return false;
}