EditorialModel QML Type

에디토리얼모델 유형은 장소 에디토리얼의 모델을 제공합니다. 더 보기...

Import Statement: import QtLocation 6.8
Since: QtLocation 5.5

속성

상세 설명

EditorialModel은 Place 와 관련된 사설을 가져오는 데 사용되는 읽기 전용 모델입니다. EditorialModel::place 를 통해 Place 을 바인딩하면 사설의 초기 가져오기가 시작됩니다. 이 모델은 점진적으로 가져오기를 수행하며 ListView 과 같은 보기와 함께 사용하도록 되어 있습니다. 보기가 현재 모델에 있는 사설의 마지막에 도달하면 더 있는 경우 가져오기를 수행하여 더 가져옵니다. 사설이 수신되면 뷰가 자동으로 업데이트됩니다. 한 번에 가져오는 사설의 수는 batchSize 속성으로 지정됩니다. 사용 가능한 총 사설 수는 totalCount 속성을 통해 액세스할 수 있습니다.

이 모델은 다음 역할에 대한 데이터를 반환합니다:

역할유형설명
공급자supplier콘텐츠 공급자입니다.
사용자user콘텐츠를 제공한 사용자입니다.
속성문자열콘텐츠를 표시할 때 표시해야 하는 어트리뷰션 텍스트입니다.
urlurl이미지의 URL입니다.
imageId문자열이미지의 식별자입니다.
mimeType문자열이미지의 MIME 유형입니다.
text문자열장소에 대한 에디토리얼의 텍스트 설명입니다. 제공업체에 따라 리치(HTML 기반) 텍스트 또는 일반 텍스트가 될 수 있습니다.
title문자열에디토리얼의 제목입니다.
언어문자열사설이 작성된 언어입니다.
날짜/시간날짜/시간리뷰가 게시된 날짜와 시간입니다.
text문자열장소에 대한 리뷰의 텍스트 설명입니다. 제공업체에 따라 리치(HTML 기반) 텍스트 또는 일반 텍스트가 될 수 있습니다.
언어문자열리뷰가 작성된 언어입니다.
평점실제리뷰 작성자가 해당 장소에 부여한 평점입니다.
reviewId문자열리뷰의 식별자입니다.
title문자열리뷰의 제목입니다.

예제

다음 예는 장소에 대한 에디토리얼을 표시하는 방법을 보여줍니다:

import QtQuick
import QtPositioning
import QtLocation

EditorialModel {
    id: editorialModel
    batchSize: 3
    place: place
}

ListView {
    model: editorialModel
    delegate: Item {
        anchors.fill: parent

        Column {
            width: parent.width
            clip: true

            Text {
                text: title
                width: parent.width
                wrapMode: Text.WordWrap
                font.pixelSize: 24
            }

            Text {
                text: text
                width: parent.width
                wrapMode: Text.WordWrap
                font.pixelSize: 20
            }

            Row {
                Image {
                    width: 16
                    height: 16

                    source: supplier.icon.url(Qt.size(width, height), Icon.List)
                }

                Text {
                    text: "Provided by " + supplier.name
                    font.pixelSize: 16
                }
            }

            Text {
                text: "Contributed by " + user.name
                font.pixelSize: 16
            }

            Text {
                text: attribution
                font.pixelSize: 8
            }
        }
    }
}

속성 문서

batchSize : int

이 속성에는 더 많은 에디토리얼 항목을 가져올 때 사용할 배치 크기가 저장됩니다.


place : Place

이 속성에는 에디토리얼이 속한 장소가 저장됩니다.


totalCount : int

이 속성에는 해당 장소의 총 에디토리얼 항목 수가 저장됩니다.


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