- Qt 6.11
- Qt Graphs
- QML Types
- QtGraphs
- HeightMapSurfaceDataProxy
- Qt Graphs | Commercial or GPLv3

# HeightMapSurfaceDataProxy QML Type

Base proxy type for Surface3D. More...

Import Statement: | `import QtGraphs`
Inherits: | SurfaceDataProxy

- List of all members, including inherited members
- HeightMapSurfaceDataProxy is part of Qt Graphs QML Types for 3D.

## Properties

- autoScaleY : real
- heightMapFile : string
- maxXValue : real
- maxYValue : real
- maxZValue : real
- minXValue : real
- minYValue : real
- minZValue : real
- type : AbstractDataProxy.DataType

## Signals

- autoScaleYChanged(bool enabled)
- heightMapFileChanged(string filename)
- maxXValueChanged(real value)
- maxYValueChanged(real value)
- maxZValueChanged(real value)
- minXValueChanged(real value)
- minYValueChanged(real value)
- minZValueChanged(real value)

## Detailed Description

QHeightMapSurfaceDataProxy takes care of the processing of height map data related to surfaces. It provides the visualization of a height map as a surface plot.

For more complete description, see QHeightMapSurfaceDataProxy.

See also Qt Graphs Data Handling with 3D.

## Property Documentation

### autoScaleY : real

Scale height values to Y-axis. Defaults to `false`. When this property is set to `true`, the height values are scaled to fit on the Y-axis between `minYValue` and `maxYValue`.

### heightMapFile : string

A file with a height map image to be visualized. Setting this property replaces current data with height map data.

There are several formats the image file can be given in, but if it is not in a directly usable format, a conversion is made.

Note: If the result seems wrong, the automatic conversion failed and you should try converting the image yourself before setting it. Preferred format is QImage::Format_RGB32 in grayscale.

The height of the image is read from the red component of the pixels if the image is in grayscale. Otherwise, it is an average calculated from the red, green, and blue components of the pixels. Using grayscale images may improve data conversion speed for large images.

Since height maps do not contain values for X or Z axes, these values need to be given separately using the minXValue, maxXValue, minZValue, and maxZValue properties. The X-value corresponds to the image's horizontal direction, and the Z-value to the vertical. Setting any of these properties triggers an asynchronous re-resolution of any existing height map.

Not recommended formats: all mono formats (for example QImage::Format_Mono).

### maxXValue : real

The maximum X value for the generated surface points. Defaults to `10.0`. When setting this property the corresponding minimum value is adjusted if necessary, to ensure that the range remains valid.

### maxYValue : real

The maximum Y value for the generated surface points. Defaults to `10.0`. When setting this property the corresponding minimum value is adjusted if necessary, to ensure that the range remains valid.

### maxZValue : real

The maximum Z value for the generated surface points. Defaults to `10.0`. When setting this property the corresponding minimum value is adjusted if necessary, to ensure that the range remains valid.

### minXValue : real

The minimum X value for the generated surface points. Defaults to `0.0`. When setting this property the corresponding maximum value is adjusted if necessary, to ensure that the range remains valid.

### minYValue : real

The minimum Y value for the generated surface points. Defaults to `0.0`. When setting this property the corresponding maximum value is adjusted if necessary, to ensure that the range remains valid.

### minZValue : real

The minimum Z value for the generated surface points. Defaults to `0.0`. When setting this property the corresponding maximum value is adjusted if necessary, to ensure that the range remains valid.

### type : AbstractDataProxy.DataType

The type of the proxy. One of the QAbstractDataProxy::DataType values.

## Signal Documentation

### autoScaleYChanged(bool enabled)

This signal is emitted when autoScaleY changes to enabled.

Note: The corresponding handler is `onAutoScaleYChanged`.

### heightMapFileChanged(string filename)

This signal is emitted when heightMapFile changes to filename.

Note: The corresponding handler is `onHeightMapFileChanged`.

### maxXValueChanged(real value)

This signal is emitted when maxXValue changes to value.

Note: The corresponding handler is `onMaxXValueChanged`.

### maxYValueChanged(real value)

This signal is emitted when maxYValue changes to value.

Note: The corresponding handler is `onMaxYValueChanged`.

### maxZValueChanged(real value)

This signal is emitted when maxZValue changes to value.

Note: The corresponding handler is `onMaxZValueChanged`.

### minXValueChanged(real value)

This signal is emitted when minXValue changes to value.

Note: The corresponding handler is `onMinXValueChanged`.

### minYValueChanged(real value)

This signal is emitted when minYValue changes to value.

Note: The corresponding handler is `onMinYValueChanged`.

### minZValueChanged(real value)

This signal is emitted when minZValue changes to value.

Note: The corresponding handler is `onMinZValueChanged`.