Originally I intend to achieve it using only QML but did not find any easy way. So I created a custom QDeclarativeItem that uses QPainterPath and implement required functionality.

Well code it quite simple, but it required little hack so that I can use some QML element like PathQuad or PathLine into my c++ code.

So let's now move to code, I will try to explain as much as I can.

So let's begin with QML, what I want my QML code to look like. My QML has one rect item which act as circle and my custom QML element which act as curve.

I want my curve element to be drawn on screen and I also want circle to follow the curve. In code path is list which contain different kind of path element.

I was not able to intrepreat QML Path element into C++ class , so I end up creating my own path property. My curve also has pointAtPercentage function which provide point at certain progress on curve, which I use with timer to make dot follow that curve.

Now lets look at MyCurve, custom QDeclaraiveItem class, which holds the QPainterPath. MyCurve is quite simple class if we don't include code to interpret PathQuad or PathLine QML element. We could have populated QPainterPath directly in c++ class. But I choose not to do so, to make it more reusable and also that I can try my hands on QDeclarativeListProperty and can show how we can read property of QML element.

Usage of QDeclarativeListProperty(I am using it for first time), QDeclarativeListProperty is used to create list of property in QML. To operate on QDeclarativeListProperty, we need to provide static method which take pointer of list object and list item. appendItem is similar static method which add path element to our QPainterPath. To know more how other operation can be implemented on QDeclarativeListProperty, please visit this or this link.

In above code I am using metaObject to identify which QML Path element is being added by appendItem ( which is kind of dirty hack ) and after identifying element I am using property method to get its value and finally using those value to call appropriate QPainterPath method.

To be able to post on wall first you need to create facebook application. You can do the from here.

After creating application, you will get application id. We need this application id for authorization.

We need to use following url for authorization.

In below request client_id is your facebook application id, score is required permission to call facebook graph API. for posting on user's wall read_stream and publish_stream is enough. Here is full list of permission.

Now we have access token, Using this token we can submit post to facebook wall.
You can use following curl request to test your access token and post a message to your facebook wall.

If you see post you your wall then authorization process is successful. Here https://graph.facebook.com/me/feed, url is used to post message on logged in user's wall. If you want to post message on friends post then you need to replace me with that user's id.

In above code we are setting data source and then preparing mediaplayer then calling start to play media file. It can be paused by pause API and stopped by calling stop.

Now that I am able to play audio file, I tried to fetch its metadata file to show detais of Audio file to user. Fetching metadata was not as easy as playing file as its requied to use ContentResolver API and at first glance it looks quite strange to use it. After spending some time I managed to fetch metadata using following code.

To fetch metadata first we need to decide which attributes we are instrested in. Following are quite frequently used attributes.

Then we need to use ContentResolver to query audio content provider to fetch metadata. I am instrested in query metadata for perticular file. So I am using MediaStore.MediaColumns.DISPLAY_NAME (filename) as selection and then specifying instrested filename in values array.