Difference between revisions of "New QOrbiter Setup"

From LinuxMCE
Jump to: navigation, search
(Properties)
(Properties)
Line 46: Line 46:
 
| ListModel
 
| ListModel
 
| window.showList()
 
| window.showList()
 +
| ListModel of existing orbiter. It gets populated after QOrbiter initially connects to the router.
 +
| To Utilize, set as the 'model' property for the ListModel you intend to show it in.
 +
Properties:
 +
*label - QOrbiter name
 +
*i_device_number - QObiter Device number
 +
  ListView{
 +
        id:existing_orbiters
 +
        height: scaleY(35)
 +
        width: scaleX(55)
 +
        clip: true
 +
        anchors.centerIn: rectangle2
 +
        model:'''orbiterList'''       
 +
     
 +
        delegate: Rectangle{
 +
            id:existing_orbiter_delegate
 +
            height: scaleY(5)
 +
            width: existing_orbiters.width
 +
            color: "slategrey"
 +
            border.color: "white"
 +
            border.width: 1
 +
            Column
 +
            {
 +
                height: childrenRect.height
 +
                width: childrenRect.width
 +
                anchors.centerIn: parent
 +
                Text {
 +
                    id: orbiter_label
 +
                    text: qsTr("Orbiter:")+ '''label'''
 +
                    font.pixelSize: 12
 +
                    wrapMode: Text.WrapAtWordBoundaryOrAnywhere                   
 +
                }
 +
                Text {
 +
                    id: dev_num                 
 +
                    text:qsTr("Device:")+ '''i_device_number'''
 +
                    font.pixelSize: 12
 +
                    font.italic: true
 +
                    wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 +
                }
 +
            }
 +
            MouseArea {
 +
                anchors.fill: parent
 +
                onClicked: window.qmlSetupLmce(i_device_number, routerip.text)
 +
            }
 +
        }
 +
    }
 +
|-
 +
| users
 +
| ListModel
 +
| none: see window.showSetup() function definition
 +
| ListModel of existing users. It is populated when the function showSetup() is called.
 +
| To Utilize, set as the 'model' property for the ListModel you intend to show it in.
 +
Properties:
 +
*dataTitle - Property containing the string value
 +
 +
  ListView{
 +
                id:usersView
 +
                height: 75
 +
                width: parent.width
 +
                orientation: ListView.Horizontal
 +
                spacing: 20
 +
                model:'''users'''
 +
                Component.onCompleted: currentIndex = -1
 +
                delegate:Rectangle{
 +
                    height:newOrbiterSetupContainer.height *.15
 +
                    width: newOrbiterSetupContainer.width *.09
 +
                    radius:10
 +
                    border.color:usersView.currentIndex === index ? midnightBlue : orangeRed
 +
                    color: usersView.currentIndex === index ? deYork : "white"
 +
                    Text {
 +
                        text: dataTitle
 +
                        font.pointSize: 12
 +
                        wrapMode: Text.WrapAtWordBoundaryOrAnywhere
 +
                        width: parent.width *.75
 +
                        anchors.centerIn: parent
 +
                    }
 +
                    MouseArea{
 +
                        anchors.fill: parent
 +
                        onClicked: {
 +
                            usersView.currentIndex = index
 +
                            selectedUser.text = "You Selected: "+ '''dataTitle'''
 +
                        }
 +
                        hoverEnabled: true
 +
                    }
 +
 +
                }
 +
            }
 +
|-
 +
| rooms
 +
| ListModel
 +
| window.showSetup()
 
| ListModel of existing orbiter. It gets populated after QOrbiter initially connects to the router.
 
| ListModel of existing orbiter. It gets populated after QOrbiter initially connects to the router.
 
| To Utilize, set as the 'model' property for the ListModel you intend to show it in.
 
| To Utilize, set as the 'model' property for the ListModel you intend to show it in.

Revision as of 18:36, 1 October 2012

In order to create a proper Splash / Setup screen, certain key things but be implemented. This is a guide to those functions and properties that must be set for a new QOrbiter to be created.

Properties

Properties present at startup
Property Name Property Type Signal Description Example
sRouterIP string none The internal router ip as read from the config.xml. Will be set to 192.168.80.1 Also accepts hostname instead of ip in string format This populates the TextInput element with the routerip
TextInput {
           id: routerip
           width: 80
           text: srouterip
           font.pixelSize: 10
           font.family: "Droid Sans"            
           fillColor: "grey"
           anchors.verticalCenter: parent.verticalCenter
       }
extip string none The external router ip as read from the config.xml. Will be set to fill.me.in.com by default Also accepts hostname instead of ip in string format This populates the TextInput element with the extip
 TextInput {
           id: ext_routerip
           width: 80
           text: extip
           font.pixelSize: 10
           font.family: "Droid Sans"
           //  onTextChanged: setRouterIp(routerip.text)
           fillColor: "grey"
           anchors.verticalCenter: parent.verticalCenter
           visible: false
       }
orbiterList ListModel window.showList() ListModel of existing orbiter. It gets populated after QOrbiter initially connects to the router. To Utilize, set as the 'model' property for the ListModel you intend to show it in.

Properties:

  • label - QOrbiter name
  • i_device_number - QObiter Device number
 ListView{
       id:existing_orbiters
       height: scaleY(35)
       width: scaleX(55)
       clip: true
       anchors.centerIn: rectangle2
       model:orbiterList        
      
       delegate: Rectangle{
           id:existing_orbiter_delegate
           height: scaleY(5)
           width: existing_orbiters.width
           color: "slategrey"
           border.color: "white"
           border.width: 1
           Column
           {
               height: childrenRect.height
               width: childrenRect.width
               anchors.centerIn: parent
               Text {
                   id: orbiter_label
                   text: qsTr("Orbiter:")+ label
                   font.pixelSize: 12
                   wrapMode: Text.WrapAtWordBoundaryOrAnywhere                    
               }
               Text {
                   id: dev_num                  
                   text:qsTr("Device:")+ i_device_number
                   font.pixelSize: 12
                   font.italic: true
                   wrapMode: Text.WrapAtWordBoundaryOrAnywhere
               }
           }
           MouseArea {
               anchors.fill: parent
               onClicked: window.qmlSetupLmce(i_device_number, routerip.text)
           }
       }
   }
users ListModel none: see window.showSetup() function definition ListModel of existing users. It is populated when the function showSetup() is called. To Utilize, set as the 'model' property for the ListModel you intend to show it in.

Properties:

  • dataTitle - Property containing the string value
 ListView{
               id:usersView
               height: 75
               width: parent.width
               orientation: ListView.Horizontal
               spacing: 20
               model:users
               Component.onCompleted: currentIndex = -1
               delegate:Rectangle{
                   height:newOrbiterSetupContainer.height *.15
                   width: newOrbiterSetupContainer.width *.09
                   radius:10
                   border.color:usersView.currentIndex === index ? midnightBlue : orangeRed
                   color: usersView.currentIndex === index ? deYork : "white"
                   Text {
                       text: dataTitle
                       font.pointSize: 12
                       wrapMode: Text.WrapAtWordBoundaryOrAnywhere
                       width: parent.width *.75
                       anchors.centerIn: parent
                   }
                   MouseArea{
                       anchors.fill: parent
                       onClicked: {
                           usersView.currentIndex = index
                           selectedUser.text = "You Selected: "+ dataTitle
                       }
                       hoverEnabled: true
                   }
               }
           }
rooms ListModel window.showSetup() ListModel of existing orbiter. It gets populated after QOrbiter initially connects to the router. To Utilize, set as the 'model' property for the ListModel you intend to show it in.

Properties:

  • label - QOrbiter name
  • i_device_number - QObiter Device number
 ListView{
       id:existing_orbiters
       height: scaleY(35)
       width: scaleX(55)
       clip: true
       anchors.centerIn: rectangle2
       model:orbiterList        
      
       delegate: Rectangle{
           id:existing_orbiter_delegate
           height: scaleY(5)
           width: existing_orbiters.width
           color: "slategrey"
           border.color: "white"
           border.width: 1
           Column
           {
               height: childrenRect.height
               width: childrenRect.width
               anchors.centerIn: parent
               Text {
                   id: orbiter_label
                   text: qsTr("Orbiter:")+ label
                   font.pixelSize: 12
                   wrapMode: Text.WrapAtWordBoundaryOrAnywhere                    
               }
               Text {
                   id: dev_num                  
                   text:qsTr("Device:")+ i_device_number
                   font.pixelSize: 12
                   font.italic: true
                   wrapMode: Text.WrapAtWordBoundaryOrAnywhere
               }
           }
           MouseArea {
               anchors.fill: parent
               onClicked: window.qmlSetupLmce(i_device_number, routerip.text)
           }
       }
   }

Splash Page

This page is not the traditional Splash screen. Instead of it being a loading screen, it should contain the following

  • A loader to switch between the Connection Screen and the new QOrbiter setup screen
  • logic to change screens and anything else you want done in the the setup screens before connecting to the router.

Connection Screen

This screen should be the first loaded by the Splash.qml and contain the neccesary elements to establish a connection to thr router. This includes:

  • Text entry for device number
  • text entry from internal ip / hostname
  • text entry box for external ip / hostname.
  • Button to connect
  • Button to start new QOrbiter setup

New Orbiter Screen