×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    1,169

    I am working for a Qt Live Tv application whose UI should be in 3 pages .

    The UI should be like


    In this I have dynamicaly parsed the contents in the xml.aspx uisng XmlListModel Qt application


    XmlListModel {
    id: feedModel
    source: "http://www.yupptv.com/mobile/symbianxml.aspx"
    query: "/root/channel" // flickr and tedtv


    XmlRole { name: "name"; query: "name/string()" }
    XmlRole { name: "id"; query: "id/string()" }
    XmlRole { name: "type"; query: "type/string()" }
    XmlRole { name: "language"; query: "language/string()" }
    XmlRole { name: "image"; query: "image/string()" }
    XmlRole { name: "link"; query: "link/string()" }
    XmlRole { name: "bandwidth"; query: "bandwidth/string()" }
    XmlRole { name: "cellnapid"; query: "cellnapid/string()" }

    }

    Presently Iam able to parse the contents in xml.aspx and show my channel images list in a vertical row manner and able to play the video also.


    I want few more changes in the UI.

    1st View languages list will be displayed

    ln the following sequence:

    English

    Hindi

    Tamil

    Telugu

    Malayalam

    Kannada

    Punjabi



    2 nd View when a language is selected, TV channels related to it are displayed

    3.nd view When clicked on TV channel video will be played.


    Please guide How shall I proced to achieve my targets.
    You can understand my project by downloading the below symbian app which I want the same in Qt




    "http://store.ovi.com/content/202150?clickSource=search&pos=1"]

  2. #2
    Registered User
    Join Date
    Nov 2007
    Location
    Espoo, Finland
    Posts
    25

    Re: I am working for a Qt Live Tv application whose UI should be in 3 pages .

    If I understood correctly you want to know how to create multi page application?
    If you are using Qt Quick Components for Symbian. then it is wery easy to do what you want. Qt Quick Components is part of the Qt SDK, make sure it is installed. Qt Quick Components documentation is included in Qt SDK, read that documentation. You should especially read about QML elements called Window, PageStack, PageStackWindow, StatusBar, ToolBar, ToolBarLayout and ToolButton.

    The line below imports Qt Quick Components for Symbian. If your .qml file uses some components from Qt Quick Components then you need to add that line to .qml file.

    import com.nokia.symbian 1.1
    The easiest way to create page paged UI is by using QML components called Page and PageStackWindow. Eg. your main.qml could have something like this:

    in file main.qml:

    import QtQuick 1.1
    import com.nokia.symbian 1.1

    PageStackWindow {
    ...
    }
    Then you can create several Pages like this:

    eg. in file MainPage.qml

    import QtQuick 1.1
    import com.nokia.symbian 1.1

    Page {
    ...
    }
    When you want to show a new page, you push it to pageStack. Eg. like this:

    pageStack.push(Qt.resolvedUrl("MainPage.qml"))
    When you are pushing page to pageStack you can also pass parameters to page. Read about it in QML PageStack component documentation. Here is an example:

    pageStack.push(Qt.resolvedUrl("ChannelPage.qml", { languageName: language, languageIndex: index }))
    That example pushes ChannelPage to pageStack and also sets ChannelPage's properties languageName and languageIndex. This example could be used eg. in list delegate's onClicked signal handler.

    So in that case ChannelPage.qml needs to have something like:

    Page {
    ...
    property int languageIndex: -1
    property string languageName: ""
    ...
    }
    You could also eg. pass a model as a parameter, you just need to add property for it in ChannelPage. Read more from PageStack documentation.

    When you are returning to previous view the currently visible page is popped out of the pageStack. Eg. like this:

    pageStack.pop()
    When you are popping page from pageStack it is an good idea to check if pageStack contains one or more pages. If the pageStack contains just one page, the one you are going to pop out, then you probably want to make application exit instead of just pop the page from pageStack. Here is how yopu can do that:

    pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
    In QML element Page and PageStack documentation you can find more information about what else you can do. You can eg. push and pop several pages at one go and eg. replace current page with some other page etc.
    Last edited by miksuh; 2012-09-09 at 04:08.

Similar Threads

  1. Live Stockquote Application
    By nilohitha in forum Symbian
    Replies: 1
    Last Post: 2009-06-08, 13:02
  2. how to retrieve saved pages (.wml pages)
    By karen_cat in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2005-01-30, 22:23

Posting Permissions

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