void QDeclarativeGalleryQueryModel::setFilter(QDeclarativeGalleryFilterBase *filter) { if (m_filter) disconnect(m_filter.data(), SIGNAL(filterChanged()), this, SLOT(deferredExecute())); m_filter = filter; if (m_filter) connect(m_filter.data(), SIGNAL(filterChanged()), this, SLOT(deferredExecute())); deferredExecute(); emit filterChanged(); }
void QDeclarativeGalleryQueryModel::setLimit(int limit) { if (m_request.limit() != limit) { m_request.setLimit(limit); deferredExecute(); emit limitChanged(); } }
void QDeclarativeGalleryQueryModel::setOffset(int offset) { if (m_request.offset() != offset) { m_request.setOffset(offset); deferredExecute(); emit offsetChanged(); } }
void QDeclarativeGalleryQueryModel::setRootItem(const QVariant &itemId) { if (m_request.rootItem() != itemId) { m_request.setRootItem(itemId); deferredExecute(); emit rootItemChanged(); } }
void QDeclarativeGalleryQueryModel::setScope(Scope scope) { if (m_request.scope() != QGalleryQueryRequest::Scope(scope)) { m_request.setScope(QGalleryQueryRequest::Scope(scope)); deferredExecute(); emit scopeChanged(); } }
void QDeclarativeGalleryQueryModel::setSortPropertyNames(const QStringList &names) { if (m_request.sortPropertyNames() != names) { m_request.setSortPropertyNames(names); deferredExecute(); emit sortPropertyNamesChanged(); } }
void QDeclarativeGalleryQueryModel::componentComplete() { m_updateStatus = NoUpdate; if (m_filter) { connect(m_filter.data(), SIGNAL(filterChanged()), this, SLOT(deferredExecute())); m_request.setFilter(m_filter.data()->filter()); } m_request.execute(); }
void QDeclarativeGalleryItem::setAutoUpdate(bool enabled) { if (m_request.autoUpdate() != enabled) { m_request.setAutoUpdate(enabled); if (enabled) deferredExecute(); else if (m_status == Idle) m_request.cancel(); emit autoUpdateChanged(); } }