void DocumentPropertiesWidget::queryRequestFinished()
{
    if (queryRequest->seek(0)) {
        if (queryRequest->itemType() == QDocumentGallery::Audio)
            requestAudioProperties();
        else if (queryRequest->itemType() == QDocumentGallery::Video)
           requestVideoProperties();
        else if (queryRequest->itemType() == QDocumentGallery::Image)
            requestImageProperties();
        else if (queryRequest->itemType() == QDocumentGallery::Document)
            requestDocumentProperties();
    }
}
void DocumentPropertiesWidget::itemsInserted(int index, int count)
{
    resultSet->fetch(0);

    metaDataChanged(index, count, QList<int>());

    if (index == 0 && request->rootType() == QDocumentGallery::File) {
        QString itemType = resultSet->itemType();

        if (itemType == QDocumentGallery::Audio)
            QTimer::singleShot(0, this, SLOT(requestAudioProperties()));
        else if (itemType == QDocumentGallery::Document)
            QTimer::singleShot(0, this, SLOT(requestDocumentProperties()));
        else if (itemType == QDocumentGallery::Image)
            QTimer::singleShot(0, this, SLOT(requestImageProperties()));
        else if (itemType == QDocumentGallery::Video)
            QTimer::singleShot(0, this, SLOT(requestVideoProperties()));
    }
}