Example #1
0
void ShVarItem::setCurrentValue(int key0, int key1)
{
	if (key0 >= 0 && key1 >= 0 && data(DF_WATCHED).toBool()) {
		if (data(DF_DATA_PIXELBOX).value<void*>() != NULL) {
			PixelBox *fb = getPixelBoxPointer();
			if (fb) {
				QVariant value;
				bool validValue = fb->getDataValue(key0, key1, &value);
				if (validValue) {
					setData(DF_DEBUG_SELECTED_VALUE, value.toString());
					return;
				}
			}
		}
		setData(DF_DEBUG_SELECTED_VALUE, "?");
		return;
	}
	setData(DF_DEBUG_SELECTED_VALUE, QVariant());
}