当前位置: 首页>>代码示例>>C++>>正文


C++ DBGridIF::ValueString方法代码示例

本文整理汇总了C++中DBGridIF::ValueString方法的典型用法代码示例。如果您正苦于以下问题:C++ DBGridIF::ValueString方法的具体用法?C++ DBGridIF::ValueString怎么用?C++ DBGridIF::ValueString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DBGridIF的用法示例。


在下文中一共展示了DBGridIF::ValueString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Draw

void UIAttribView::Draw (DBObjRecord *record)

	{
	DBObjTableField *field;
	DBObjectLIST<DBObjTableField> *fields;
	UIXYGraphShell *graphCLS;

	if (record == (DBObjRecord *) NULL)
		{
		Cardinal i, numChildren;
		WidgetList rowCols;

		UIAuxSetLabelString (ItemNameWGT,(char *) "");
		XtVaGetValues (FieldsRowCol,XmNchildren,	&rowCols, XmNnumChildren,	&numChildren,NULL);
		for (i = 0;i < numChildren; ++i)
			XmTextFieldSetString (XtNameToWidget (rowCols [i],"UIAttribViewTextField"),(char *) "");
		return;
		}

	UIAuxSetLabelString (ItemNameWGT,record->Name ());
	switch (DataPTR->Type ())
		{
		case DBTypeVectorPoint:
		case DBTypeVectorLine:
		case DBTypeVectorPolygon:
		case DBTypeGridDiscrete:
			fields = ItemTable->Fields ();
			for (field = fields->First ();field != (DBObjTableField *) NULL;field = fields->Next ())
				if (DBTableFieldIsVisible (field) == true)	DrawField (field->Name (),field->String (record));
			break;
		case DBTypeGridContinuous:
			{
			DBCoordinate coord = *((DBCoordinate *) (record->Data ()));
			DBGridIF *gridIF = new DBGridIF (DataPTR);
			for (record = ItemTable->First ();record != (DBObjRecord *) NULL;record = ItemTable->Next ())
				DrawField (record->Name (),gridIF->ValueString (record,coord));
			delete gridIF;
			} break;
		case DBTypeNetwork:
			{
			DBObjTable *cellTable = DataPTR->Table (DBrNCells);
			DBObjTableField *basinFLD = cellTable->Field (DBrNBasin);
			DBObjRecord *basinRec;

			if ((basinRec =  ItemTable->Item (basinFLD->Int (record) - 1)) == (DBObjRecord *) NULL)
				{ CMmsgPrint (CMmsgAppError, "BasinID Error in:%s %d",__FILE__,__LINE__); return; }
			DrawField ((char *) "Basin Name",basinRec->Name ());
			fields = ItemTable->Fields ();
			for (field = fields->First ();field != (DBObjTableField *) NULL;field = fields->Next ())
				if (DBTableFieldIsVisible (field) == true)	DrawField (field->Name (),field->String (basinRec));

			fields = cellTable->Fields ();
			for (field = fields->First ();field != (DBObjTableField *) NULL;field = fields->Next ())
				if (DBTableFieldIsVisible (field) == true)	DrawField (field->Name (),field->String (record));
			} break;
		default:	break;
		}
	if ((graphCLS = (UIXYGraphShell *) DataPTR->Display (UIXYGraphShellStr)) != (UIXYGraphShell *) NULL)
		graphCLS->Configure (record);
	}
开发者ID:amiara,项目名称:RGIS,代码行数:60,代码来源:UIAttribView.C


注:本文中的DBGridIF::ValueString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。