×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    57

    QGalleryQueryRequest getting resultSet() values

    Hi all,

    I've got a resultSet from the code below that runs on my Nokia N8, it lists all podcasts on my phone, the resultSet's definitely populated as I can scroll around it using resultSet->fetchFirst() etc.

    How would I get the values for the currentIndex(), eg the QDocumentGallery::title/artist etc, I've gone completely code blind.

    Many thanks

    Code:
          documentGallery = new QDocumentGallery(this);
          queryRequest = new QGalleryQueryRequest(documentGallery, this);
          queryRequest->setRootType(QDocumentGallery::Audio);
          queryRequest->setFilter(QDocumentGallery::genre == "Podcast");
          queryRequest->setPropertyNames(QStringList()
                                         << QDocumentGallery::title
                                         << QDocumentGallery::artist
                                         << QDocumentGallery::albumTitle);
    
          queryRequest->execute();
          resultSet = queryRequest->resultSet();
    
          qDebug() << resultSet->metaData(0); //file:///e:/podcasts/naked_scientists/010_ans_10.06.11.mp3
          qDebug() << resultSet->metaData(1); //010_ans_10.06.11

  2. #2
    Registered User
    Join Date
    Jul 2011
    Posts
    57

    Re: QGalleryQueryRequest getting resultSet() values

    Ah .... I see how it works, you get the key from the resultSets propertyKey,

    Code:
    qDebug() << resultSet->propertyKey(QDocumentGallery::artist);
    qDebug() << resultSet->propertyKey(QDocumentGallery::albumTitle);
    qDebug() << resultSet->propertyKey(QDocumentGallery::title);
    and the value from the metadata using the key.

    Code:
    qDebug() << resultSet->metaData(14);
    qDebug() << resultSet->metaData(19);
    qDebug() << resultSet->metaData(6);
    and you can see if the query has finished using.

    Code:
    connect(queryRequest, SIGNAL(finished()), this, SLOT(TST()));

Similar Threads

  1. OfferKeyEventL getting unexpected values.
    By jeffbsmith in forum Symbian
    Replies: 3
    Last Post: 2009-07-01, 15:03
  2. not getting exact values???
    By arun09 in forum Symbian
    Replies: 0
    Last Post: 2009-06-19, 11:30
  3. getting cellID and RxQual values
    By xdeep in forum Mobile Java General
    Replies: 4
    Last Post: 2007-05-25, 18:41
  4. Replies: 1
    Last Post: 2002-11-13, 11:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×