이 페이지에서

QBarDataProxy Class

QBarDataProxy 클래스는 3D 막대 그래프를 위한 데이터 프록시입니다. 더 보기...

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

QItemModelBarDataProxy

상태: 사용 중단

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

속성

공개 함수

QBarDataProxy(QObject *parent = nullptr)
virtual ~QBarDataProxy()
int addRow(QBarDataRow *row)
int addRow(QBarDataRow *row, const QString &label)
int addRows(const QBarDataArray &rows)
int addRows(const QBarDataArray &rows, const QStringList &labels)
const QBarDataArray *array() const
QStringList columnLabels() const
void insertRow(int rowIndex, QBarDataRow *row)
void insertRow(int rowIndex, QBarDataRow *row, const QString &label)
void insertRows(int rowIndex, const QBarDataArray &rows)
void insertRows(int rowIndex, const QBarDataArray &rows, const QStringList &labels)
const QBarDataItem *itemAt(const QPoint &position) const
const QBarDataItem *itemAt(int rowIndex, int columnIndex) const
void removeRows(int rowIndex, int removeCount, bool removeLabels = true)
void resetArray()
void resetArray(QBarDataArray *newArray)
void resetArray(QBarDataArray *newArray, const QStringList &rowLabels, const QStringList &columnLabels)
const QBarDataRow *rowAt(int rowIndex) const
int rowCount() const
QStringList rowLabels() const
QBar3DSeries *series() const
void setColumnLabels(const QStringList &labels)
void setItem(const QPoint &position, const QBarDataItem &item)
void setItem(int rowIndex, int columnIndex, const QBarDataItem &item)
void setRow(int rowIndex, QBarDataRow *row)
void setRow(int rowIndex, QBarDataRow *row, const QString &label)
void setRowLabels(const QStringList &labels)
void setRows(int rowIndex, const QBarDataArray &rows)
void setRows(int rowIndex, const QBarDataArray &rows, const QStringList &labels)

신호

void arrayReset()
void columnLabelsChanged()
void itemChanged(int rowIndex, int columnIndex)
void rowCountChanged(int count)
void rowLabelsChanged()
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(QBar3DSeries *series)

상세 설명

막대형 데이터 프록시는 데이터 행의 추가, 삽입, 변경 및 제거를 처리합니다.

데이터 배열은 QBarDataItem 인스턴스의 벡터(행) 목록입니다. 각 행은 서로 다른 수의 항목을 포함할 수도 있고, 심지어 null일 수도 있습니다.

QBarDataProxy는 직접 전달되었든 QtDataVisualization::QBarDataArray 컨테이너를 통해 전달되었든 상관없이, 전달된 모든 QtDataVisualization::QBarDataRow 객체에 대한 소유권을 갖습니다. 배열을 프록시에 추가한 후 막대 데이터 행 포인터를 사용하여 데이터를 직접 수정하는 경우, 그래프를 업데이트하기 위해 적절한 신호를 발산해야 합니다.

QBarDataProxy는 선택적으로 행 및 열 레이블을 추적하며, QCategory3DAxis 는 이를 활용하여 축 레이블을 표시할 수 있습니다. 행 및 열 레이블은 데이터와 별도의 배열에 저장되며, 행 조작 메서드에는 행 레이블에 영향을 미치지 않는 대체 버전이 제공됩니다. 이를 통해 데이터 자체보다는 배열 내 데이터의 위치와 관련된 행 레이블을 사용할 수 있습니다.

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

속성 설명서

columnLabels : QStringList

이 속성은 배열에 대한 선택적 열 레이블을 저장합니다.

이 배열의 인덱스는 행의 열 인덱스와 일치합니다. 목록의 길이가 가장 긴 행보다 짧을 경우, 모든 열에 레이블이 지정되지는 않습니다.

액세스 함수:

QStringList columnLabels() const
void setColumnLabels(const QStringList &labels)

알림 신호:

void columnLabelsChanged()

[read-only] rowCount : int

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

액세스 함수:

int rowCount() const

알림 신호:

void rowCountChanged(int count)

rowLabels : QStringList

이 속성은 배열에 대한 선택적 행 레이블을 포함합니다.

이 배열의 인덱스는 데이터 배열의 행 인덱스와 일치합니다. 목록의 길이가 행 수보다 짧을 경우, 모든 행에 레이블이 지정되지는 않습니다.

액세스 함수:

QStringList rowLabels() const
void setRowLabels(const QStringList &labels)

알림 신호:

void rowLabelsChanged()

[read-only] series : QBar3DSeries*

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

액세스 함수:

QBar3DSeries *series() const

알림 신호:

void seriesChanged(QBar3DSeries *series)

멤버 함수 설명서

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

지정된 ` parent`를 사용하여 막대형 데이터 프록시를 생성합니다.

[virtual noexcept] QBarDataProxy::~QBarDataProxy()

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

int QBarDataProxy::addRow(QBarDataRow *row)

배열의 끝에 새로운 행 row 을 추가합니다. 기존 행 레이블에는 영향을 미치지 않습니다.

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

int QBarDataProxy::addRow(QBarDataRow *row, const QString &label)

배열의 맨 끝에 ‘ label ’라는 레이블이 붙은 새로운 행 ‘ row ’을 추가합니다.

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

int QBarDataProxy::addRows(const QBarDataArray &rows)

배열의 끝에 새로운 행 레이블( rows )을 추가합니다. 기존 행 레이블에는 영향을 미치지 않습니다.

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

int QBarDataProxy::addRows(const QBarDataArray &rows, const QStringList &labels)

labels 를 가진 새로운 rows 를 배열의 끝에 추가합니다.

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

const QBarDataArray *QBarDataProxy::array() const

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

[signal] void QBarDataProxy::arrayReset()

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

void QBarDataProxy::insertRow(int rowIndex, QBarDataRow *row)

rowIndex 에 새로운 행 row 을 삽입합니다. rowIndex 이 배열의 크기와 같을 경우, 행들은 배열의 끝에 추가됩니다. 기존 행 레이블은 변경되지 않습니다.

참고: 삽입된 행보다 뒤에 레이블이 지정된 행이 있는 경우, 이 호출 후에는 행 레이블 배열이 행 배열과 동기화되지 않게 됩니다.

void QBarDataProxy::insertRow(int rowIndex, QBarDataRow *row, const QString &label)

rowIndex 에 레이블이 label 인 새 행 row 을 삽입합니다. rowIndex 가 배열의 크기와 같을 경우, 행은 배열의 끝에 추가됩니다.

void QBarDataProxy::insertRows(int rowIndex, const QBarDataArray &rows)

rowIndex 에 새로운 rows 를 삽입합니다. rowIndex 가 배열의 크기와 같을 경우, 행들은 배열의 끝에 추가됩니다. 기존 행 레이블에는 영향을 미치지 않습니다.

참고: 삽입된 행보다 뒤에 레이블이 지정된 행이 있는 경우, 이 호출 후 행 레이블 배열은 행 배열과 동기화되지 않게 됩니다.

void QBarDataProxy::insertRows(int rowIndex, const QBarDataArray &rows, const QStringList &labels)

labels 를 포함하는 새로운 rows 를 rowIndex 에 삽입합니다. rowIndex 가 배열의 크기와 같을 경우, 행들은 배열의 끝에 추가됩니다.

const QBarDataItem *QBarDataProxy::itemAt(const QPoint &position) const

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

const QBarDataItem *QBarDataProxy::itemAt(int rowIndex, int columnIndex) const

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

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

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

void QBarDataProxy::removeRows(int rowIndex, int removeCount, bool removeLabels = true)

` removeCount `로 지정된 개수의 행을 ` rowIndex` 위치부터 제거합니다. 배열 끝을 넘어가는 행을 제거하려고 시도해도 아무런 동작이 일어나지 않습니다. ` removeLabels `가 ` true`인 경우, 해당 행 레이블도 함께 제거됩니다. 그렇지 않은 경우, 행 레이블은 영향을 받지 않습니다.

참고: removeLabels 가 false 인경우 , 제거된 행보다 뒤에 레이블이 지정된 행이 있다면 행 레이블 배열은 행 배열과 동기화되지 않게 됩니다.

void QBarDataProxy::resetArray()

기존 배열과 행 및 열 레이블을 지웁니다.

void QBarDataProxy::resetArray(QBarDataArray *newArray)

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

null 배열을 전달하면 기존 배열이 삭제되고 새로운 빈 배열이 생성됩니다. 행 및 열 레이블은 영향을 받지 않습니다.

void QBarDataProxy::resetArray(QBarDataArray *newArray, const QStringList &rowLabels, const QStringList &columnLabels)

newArray 배열을 인수로 받아들입니다. 새 배열이 기존 배열과 다를 경우 기존 배열을 지웁니다. 두 배열이 동일할 경우, 이 함수는 arrayReset() 신호를 트리거하기만 합니다.

null 배열을 전달하면 기존 배열이 삭제되고 새로운 빈 배열이 생성됩니다.

rowLabels 및 columnLabels 목록은 행과 열에 대한 새로운 레이블을 지정합니다.

const QBarDataRow *QBarDataProxy::rowAt(int rowIndex) const

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

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

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

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

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

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

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

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

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

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

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

void QBarDataProxy::setItem(const QPoint &position, const QBarDataItem &item)

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

void QBarDataProxy::setItem(int rowIndex, int columnIndex, const QBarDataItem &item)

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

void QBarDataProxy::setRow(int rowIndex, QBarDataRow *row)

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

void QBarDataProxy::setRow(int rowIndex, QBarDataRow *row, const QString &label)

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

void QBarDataProxy::setRows(int rowIndex, const QBarDataArray &rows)

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

void QBarDataProxy::setRows(int rowIndex, const QBarDataArray &rows, const QStringList &labels)

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

관련 비회원

QBarDataArray

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

QBarDataRow

QBarDataItem 객체 목록입니다.

© 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.