이 페이지에서

QSurfaceDataProxy Class

QSurfaceDataProxy 클래스는 3D 표면 그래프를 위한 데이터 프록시입니다. 더 보기...

헤더: #include <QSurfaceDataProxy>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
출시일: QtDataVisualization 1.0
QML에서: SurfaceDataProxy
상속: QAbstractDataProxy
상속받는 클래스:

QHeightMapSurfaceDataProxy 그리고 QItemModelSurfaceDataProxy

상태: 사용 중단됨

이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.

속성

공개 함수

QSurfaceDataProxy(QObject *parent = nullptr)
virtual ~QSurfaceDataProxy()
int addRow(QSurfaceDataRow *row)
int addRows(const QSurfaceDataArray &rows)
const QSurfaceDataArray *array() const
int columnCount() const
void insertRow(int rowIndex, QSurfaceDataRow *row)
void insertRows(int rowIndex, const QSurfaceDataArray &rows)
const QSurfaceDataItem *itemAt(const QPoint &position) const
const QSurfaceDataItem *itemAt(int rowIndex, int columnIndex) const
void removeRows(int rowIndex, int removeCount)
void resetArray(QSurfaceDataArray *newArray)
int rowCount() const
QSurface3DSeries *series() const
void setItem(const QPoint &position, const QSurfaceDataItem &item)
void setItem(int rowIndex, int columnIndex, const QSurfaceDataItem &item)
void setRow(int rowIndex, QSurfaceDataRow *row)
void setRows(int rowIndex, const QSurfaceDataArray &rows)

신호

void arrayReset()
void columnCountChanged(int count)
void itemChanged(int rowIndex, int columnIndex)
void rowCountChanged(int count)
void rowsAdded(int startIndex, int count)
void rowsChanged(int startIndex, int count)
void rowsInserted(int startIndex, int count)
void rowsRemoved(int startIndex, int count)
void seriesChanged(QSurface3DSeries *series)

상세 설명

표면 데이터 프록시는 표면 관련 데이터를 행 단위로 처리합니다. 이를 위해 QtDataVisualization::QSurfaceDataArray 및 QtDataVisualization::QSurfaceDataRow라는 두 가지 보조 typedef를 제공합니다. QSurfaceDataArray 는 행을 제어하는 QList 입니다. QSurfaceDataRow 는 QSurfaceDataItem 객체를 포함하는 QList 입니다. 프록시에 데이터를 전달하는 방법에 대한 자세한 내용은 Q3DSurface 문서의 샘플 코드를 참조하십시오.

모든 행은 동일한 수의 항목을 가져야 합니다.

QSurfaceDataProxy는 직접 전달되든 QSurfaceDataArray 컨테이너를 통해 전달되든 상관없이, 전달된 모든 QSurfaceDataRow 객체에 대한 소유권을 가져갑니다. 배열을 프록시에 추가한 후 서피스 데이터 행 포인터를 사용하여 데이터를 직접 수정하려면, 그래프를 업데이트하기 위해 적절한 신호를 발산해야 합니다.

합리적인 서피스를 만들기 위해서는 모든 행에서 연속되는 각 항목의 x값이 행 전체에 걸쳐 오름차순이거나 내림차순이어야 합니다. 마찬가지로, 모든 열에서 연속되는 각 항목의 z값이 열 전체에 걸쳐 오름차순이거나 내림차순이어야 합니다.

참고: 현재는 행과 열이 일정한 서피스의 경우에만 완전히 지원됩니다. 항목의 z값이 정확히 동일하지 않은 행이나, 항목의 x값이 정확히 동일하지 않은 열이 있는 경우, 전체 서피스가 가시 x축 또는 z축 범위에 완전히 들어가지 않으면 잘못 잘릴 수 있습니다.

참고: 행이나 열이 2개 미만인표면은 유효한 표면으로 간주되지 않으며 렌더링되지 않습니다.

참고: 일부환경에서는 가시적인 정점 수가 많은 서페이스가 그래픽 드라이버가 지원하는 드로잉당 정점 수를 초과하여 렌더링되지 않을 수 있습니다. 이는 주로 32비트 및 OpenGL ES2 플랫폼에서 발생하는 문제입니다.

Qt Data Visualization 데이터 처리항목도 참조하십시오 .

속성 설명서

[read-only] columnCount : int

이 속성은 데이터 배열의 열 수를 나타냅니다.

액세스 함수:

int columnCount() const

알림 신호:

void columnCountChanged(int count)

[read-only] rowCount : int

이 속성은 데이터 배열의 행 수를 나타냅니다.

액세스 함수:

int rowCount() const

알림 신호:

void rowCountChanged(int count)

[read-only] series : QSurface3DSeries*

이 속성은 이 프록시가 연결된 시리를 저장합니다.

액세스 함수:

QSurface3DSeries *series() const

알림 신호:

void seriesChanged(QSurface3DSeries *series)

멤버 함수 설명서

[explicit] QSurfaceDataProxy::QSurfaceDataProxy(QObject *parent = nullptr)

지정된 ` parent`을 사용하여 `QSurfaceDataProxy`를 생성합니다.

[virtual noexcept] QSurfaceDataProxy::~QSurfaceDataProxy()

표면 데이터 프록시를 삭제합니다.

int QSurfaceDataProxy::addRow(QSurfaceDataRow *row)

배열의 끝에 새로운 행 row 을 추가합니다. 새로운 행은 초기 배열의 행과 동일한 수의 열을 가져야 합니다.

추가된 행의 인덱스를 반환합니다.

int QSurfaceDataProxy::addRows(const QSurfaceDataArray &rows)

배열의 끝에 새로운 rows 를 추가합니다. 새로운 행은 초기 배열의 행과 동일한 열 수를 가져야 합니다.

추가된 첫 번째 행의 인덱스를 반환합니다.

const QSurfaceDataArray *QSurfaceDataProxy::array() const

데이터 배열에 대한 포인터를 반환합니다.

[signal] void QSurfaceDataProxy::arrayReset()

이 신호는 데이터 배열이 재설정될 때 발생합니다. resetArray()를 호출하지 않고 배열 전체의 내용을 변경한 경우, 그래프를 업데이트하기 위해 이 신호를 발생시켜야 합니다.

void QSurfaceDataProxy::insertRow(int rowIndex, QSurfaceDataRow *row)

rowIndex 에 새로운 행 row 을 삽입합니다. rowIndex 가 배열의 크기와 같을 경우, 행들은 배열의 끝에 추가됩니다. 새로운 행은 초기 배열의 행들과 동일한 열 수를 가져야 합니다.

void QSurfaceDataProxy::insertRows(int rowIndex, const QSurfaceDataArray &rows)

rowIndex 에 새로운 rows 를 삽입합니다. rowIndex 가 배열의 크기와 같을 경우, 행들은 배열의 끝에 추가됩니다. 새로운 rows 는 초기 배열의 행 수와 동일한 열 수를 가져야 합니다.

const QSurfaceDataItem *QSurfaceDataProxy::itemAt(const QPoint &position) const

position 위치에 있는 항목에 대한 포인터를 반환합니다. position 의 x 값은 행을, y 값은 열을 나타냅니다. 이 항목은 데이터를 수정하는 다음 호출이 이루어질 때까지만 유효함이 보장됩니다.

const QSurfaceDataItem *QSurfaceDataProxy::itemAt(int rowIndex, int columnIndex) const

rowIndex 및 columnIndex 로 지정된 위치에 있는 항목에 대한 포인터를 반환합니다. 이 포인터는 데이터를 수정하는 다음 호출이 이루어질 때까지만 유효함이 보장됩니다.

[signal] void QSurfaceDataProxy::itemChanged(int rowIndex, int columnIndex)

이 신호는 rowIndex 및 columnIndex 에서 지정한 위치에 있는 항목이 변경될 때 발생합니다. setItem()를 호출하지 않고 배열 내의 항목을 변경한 경우, 그래프를 업데이트하기 위해 이 신호를 발생시켜야 합니다.

void QSurfaceDataProxy::removeRows(int rowIndex, int removeCount)

` removeCount `로 지정된 개수의 행을 ` rowIndex` 위치부터 제거합니다. 배열의 끝을 넘어서는 행을 제거하려고 시도해도 아무런 동작이 일어나지 않습니다.

void QSurfaceDataProxy::resetArray(QSurfaceDataArray *newArray)

newArray 배열을 소유합니다. 새 배열이 기존 배열과 다를 경우 기존 배열을 지웁니다. 배열이 동일할 경우, 이 함수는 arrayReset() 신호를 트리거할 뿐입니다.

null 배열을 전달하면 기존 배열이 삭제되고 새로운 빈 배열이 생성됩니다. newArray 내의 모든 행은 동일한 길이를 가져야 합니다.

[signal] void QSurfaceDataProxy::rowsAdded(int startIndex, int count)

count 로 지정된 행 수가 startIndex 위치부터 추가되면 이 신호가 발생합니다. addRow() 또는 addRows()를 호출하지 않고 배열에 행을 추가한 경우, 그래프를 업데이트하기 위해 이 신호를 발생시켜야 합니다.

[signal] void QSurfaceDataProxy::rowsChanged(int startIndex, int count)

이 신호는 ` count `로 지정된 행 수가 ` startIndex` 위치부터 변경될 때 발생합니다. ` setRow()` 또는 ` setRows()`를 호출하지 않고 배열의 행을 변경한 경우, 그래프를 업데이트하기 위해 이 신호를 발생시켜야 합니다.

[signal] void QSurfaceDataProxy::rowsInserted(int startIndex, int count)

이 신호는 ` count `로 지정된 행 수가 ` startIndex` 위치에 삽입될 때 발생합니다.

insertRow() 또는 insertRows()를 호출하지 않고 배열에 행을 삽입하는 경우, 그래프를 업데이트하기 위해 이 신호를 발생시켜야 합니다.

[signal] void QSurfaceDataProxy::rowsRemoved(int startIndex, int count)

이 신호는 ` count `로 지정된 행 수만큼이 ` startIndex` 위치부터 제거될 때 발생합니다.

배열의 끝에서 행이 제거된 경우, 이 인덱스는 현재 배열의 크기입니다. removeRows()를 호출하지 않고 배열에서 행을 제거한 경우, 그래프를 업데이트하기 위해 이 신호를 발생시켜야 합니다.

void QSurfaceDataProxy::setItem(const QPoint &position, const QSurfaceDataItem &item)

position 위치에 있는 단일 항목을 item 항목으로 변경합니다. position 의 x 값은 행을, y 값은 열을 나타냅니다.

void QSurfaceDataProxy::setItem(int rowIndex, int columnIndex, const QSurfaceDataItem &item)

rowIndex 및 columnIndex 로 지정된 위치에 있는 단일 항목을 item 항목으로 변경합니다.

void QSurfaceDataProxy::setRow(int rowIndex, QSurfaceDataRow *row)

rowIndex 위치에 있는 행을 row 로 지정된 새 행으로 대체하여 기존 행을 변경합니다. 새 행은 rowIndex 에 이미 저장된 기존 행과 동일할 수 있습니다. 새 행은 대체할 행과 열 수가 동일해야 합니다.

void QSurfaceDataProxy::setRows(int rowIndex, const QSurfaceDataArray &rows)

rowIndex 위치부터 시작하는 행들을 rows 에 지정된 새 행들로 대체하여 기존 행들을 변경합니다. rows 배열에 포함된 행들은 rowIndex 에 이미 저장된 기존 행들과 동일할 수 있습니다. 새 행들은 대체할 행들과 동일한 열 수를 가져야 합니다.

관련 비회원

QSurfaceDataArray

QSurfaceDataRow 객체에 대한 포인터 목록입니다.

QSurfaceDataRow

QSurfaceDataItem 객체 목록입니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.