コード例 #1
0
void QDeclarativeDocumentGalleryType::setItemType(QDeclarativeDocumentGallery::ItemType itemType)
{
    const QString type = QDeclarativeDocumentGallery::toString(itemType);

    if (type != m_request.itemType()) {
        m_request.setItemType(type);

        if (m_updateStatus != Incomplete) {
            if (!type.isEmpty())
                m_request.execute();
            else
                m_request.clear();
        }

        emit itemTypeChanged();
    }
}
コード例 #2
0
QDeclarativeDocumentGalleryItem::QDeclarativeDocumentGalleryItem(QObject *parent)
    : QDeclarativeGalleryItem(parent)
{
    connect(this, SIGNAL(availableChanged()), this, SIGNAL(itemTypeChanged()));
}