Difference between revisions of "QOrbitermanager"

From LinuxMCE
Jump to: navigation, search
(Functions)
m (Added categories)
 
(19 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
[[Category:QOrbiter Skin Api]]
 +
[[Category:QOrbiter]]
 +
[[Category: Programmer's Guide]]
 
QOrbiter manager is what it sounds like. It manages the flow of operations in QOrbiter between the different context objects and the threaded dce side of the program. It can be accessed through 'manager'
 
QOrbiter manager is what it sounds like. It manages the flow of operations in QOrbiter between the different context objects and the threaded dce side of the program. It can be accessed through 'manager'
 +
 +
QorbiterManger is the Qt object responsible for managing the initial setup state of the orbiter, as well as containing some key properties and signals. It is also used and an intermediary object, emitting cross thread signals from the UI to prevent blocking operations.
 +
 +
Functions and Properties can be accessed via '''manager.function()''' or  '''manager.propertyName'''
 +
=Properties=
 +
 +
{| class="wikitable"
 +
|+ Properties are accessed by: dceTimecode.propertyname
 +
! Property Name
 +
! Property Type
 +
! Signal
 +
! Description
 +
! Example
 +
|-
 +
| '''appH'''
 +
| ''int''
 +
| ''orientationChanged''()
 +
| application window height
 +
|
 +
|-
 +
| '''appW'''
 +
| ''int''
 +
| ''orientationChanged''()
 +
| application window width
 +
|-
 +
| '''sPK_User'''
 +
| ''String''
 +
| ''userChanged''()
 +
| String of the current user assigned to this QOrbiter
 +
|-
 +
| '''currentRoom'''
 +
| ''String''
 +
| ''roomChanged''()
 +
| The current room or entertain area the QOrbiter is set to
 +
|-
 +
| '''dceResponse'''
 +
| ''string''
 +
|''dceResponseChanged''()
 +
| logging property cataloging responses from the router
 +
|-
 +
| '''debugMode'''
 +
| ''bool''
 +
| ''debugModeChanged''()
 +
| If Debug mode is enabled.
 +
|}
 +
 +
=Signals=
 +
Signals not related to specific properties, but internal functions of the class itself
 +
{| class="wikitable"
 +
! Signal
 +
! Params
 +
! Description
 +
|-
 +
| orbiterReady(bool)
 +
| bool
 +
| This signal is emitted when the local configuration file and the remote config files have been parsed.
 +
|-
 +
| orbiterClosing()
 +
|
 +
| This signal is emitted when the orbiter is exiting.
 +
|-
 +
| mediaScreenShotReady()
 +
|
 +
| This signal is emitted when the requested screen shot is available.
 +
|-
 +
| connectedStateChanged()
 +
|
 +
| This signal is emitted when the connection from QOrbiter to the LinuxMCE core changes.
 +
|}
 +
 +
=Signals=
  
 
=Functions=
 
=Functions=
[[Category:QOrbiter Skin Api]]
+
 
<table width="80%" border="0">
+
<table width="80%" border="1">
 
   <tr>
 
   <tr>
 
   <td colspan="3" bgcolor="#33CC00">''void'' '''getLiveTVPlaylist'''('''')</td>
 
   <td colspan="3" bgcolor="#33CC00">''void'' '''getLiveTVPlaylist'''('''')</td>
 
     </tr>
 
     </tr>
 
     <tr bgcolor="#999999">
 
     <tr bgcolor="#999999">
     <td>Params</td>
+
     <td width="25%">Params</td>
 
     <td>Description</td>
 
     <td>Description</td>
 
     <td>EX</td>
 
     <td>EX</td>
Line 19: Line 93:
 
</table>
 
</table>
  
<table width="80%" border="0">
+
<table width="80%" border="1">
 
   <tr>
 
   <tr>
 
   <td colspan="3" bgcolor="#33CC00">''void'' '''showFloorplan'''(''int floorplantype'')</td>
 
   <td colspan="3" bgcolor="#33CC00">''void'' '''showFloorplan'''(''int floorplantype'')</td>
 
     </tr>
 
     </tr>
 
     <tr bgcolor="#999999">
 
     <tr bgcolor="#999999">
     <td>Params</td>
+
     <td width="25%">Params</td>
 
     <td>Description</td>
 
     <td>Description</td>
     <td>Output</td>
+
     <td>Example</td>
 
   </tr>
 
   </tr>
 
   <tr>
 
   <tr>
Line 32: Line 106:
 
     <td>This function brings up the floorplan for the selected room and populates the devices there on the screenshot image</td>
 
     <td>This function brings up the floorplan for the selected room and populates the devices there on the screenshot image</td>
 
     <td></td>
 
     <td></td>
 +
  </tr>
 +
</table>
 +
 +
<table width="80%" border="1">
 +
  <tr>
 +
  <td colspan="3" bgcolor="#33CC00">''void'' '''saveScreenshot'''(''int attribute_number'')</td>
 +
    </tr>
 +
    <tr bgcolor="#999999">
 +
    <td width="25%">Params</td>
 +
    <td>Description</td>
 +
    <td>Example</td>
 +
  </tr>
 +
  <tr>
 +
    <td>int - The Attribute number of the attribute you want to associate with the screenshot.<br> It is provided in the ''screenshotAttributes'' listmodel that is prepared when grabbing a screeshot</td>
 +
    <td>Saves the current screenshot to the attribute image</td>
 +
    <td>
 +
Component
 +
    {
 +
        id:thumbdelegate
 +
        Rectangle{
 +
            id:attributedelegate
 +
            height: 50
 +
            width: parent.width-1
 +
            color: style.accentcolor
 +
            Text {
 +
                id: propertystring
 +
                text: attributeType
 +
            }
 +
            MouseArea{
 +
                anchors.fill: parent
 +
                hoverEnabled: true
 +
                onEntered: attributedelegate.color = "aliceblue"
 +
                onExited: attributedelegate.color = style.accentcolor
 +
                onClicked: {
 +
                    manager.saveScreenShot(attributeNo)
 +
                    manager.cleanupScreenie()
 +
                    assignscreenshot.destroy()
 +
                }
 +
            }
 +
        }
 +
    }
 +
</td>
 +
  </tr>
 +
</table>
 +
 +
<table width="80%" border="1">
 +
  <tr>
 +
  <td colspan="3" bgcolor="#33CC00">''void'' '''cleanupScreenie'''('''')</td>
 +
    </tr>
 +
    <tr bgcolor="#999999">
 +
    <td width="25%">Params</td>
 +
    <td width=%33>Description</td>
 +
    <td>Output</td>
 +
  </tr>
 +
  <tr>
 +
    <td>None</td>
 +
    <td>Destroys the last screenshot and empties the model. Depreciated and will be made automatic </td>
 +
    <td></td>
 +
  </tr>
 +
</table>
 +
 +
<table width="80%" border="1">
 +
  <tr>
 +
  <td colspan="3" bgcolor="#33CC00">''void'' '''resendCode'''(''int parentDevice'', ''int commandNumber'')</td>
 +
    </tr>
 +
    <tr bgcolor="#999999">
 +
  <td width="25%">Params</td>
 +
    <td>Description</td>
 +
    <td>Output</td>
 +
  </tr>
 +
  <tr>
 +
    <td> parentDevice - int - device number of the parent
 +
commandNumber- int - the number of the command you wish to resend
 +
</td>
 +
    <td>Resend and av control code. This function should be utilized within the ''device_commands'' model. The parameters are attributes of said mdel</td>
 +
    <td>
 +
ListView
 +
            {
 +
                id:device_command_list
 +
                height: parent.height
 +
                width: scaleX(10)
 +
                anchors.top: parent.top
 +
                anchors.left: codelist.right
 +
                anchors.leftMargin: scaleY(5)
 +
                clip: true
 +
                model: device_commands
 +
                delegate: Rectangle{
 +
                    id:device_box
 +
                    height: scaleY(8)
 +
                    width: scaleX(20)
 +
                    color: "slateblue"
 +
                    Column{
 +
                        spacing: scaleY(1)
 +
                        Text{
 +
                            id:command_label
 +
                            text:qs_command
 +
                            font.pixelSize: scaleY(2)
 +
                        }
 +
                    }
 +
                    MouseArea{
 +
                        anchors.fill: parent
 +
                        hoverEnabled: true
 +
                        onEntered: device_box.color = "white"
 +
                        onExited: device_box.color = "slateblue"
 +
                        '''onClicked: manager.resendCode(i_parentDevice, i_commandnum)'''
 +
                    }
 +
                }
 +
            }
 +
</td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>

Latest revision as of 19:48, 23 November 2012

QOrbiter manager is what it sounds like. It manages the flow of operations in QOrbiter between the different context objects and the threaded dce side of the program. It can be accessed through 'manager'

QorbiterManger is the Qt object responsible for managing the initial setup state of the orbiter, as well as containing some key properties and signals. It is also used and an intermediary object, emitting cross thread signals from the UI to prevent blocking operations.

Functions and Properties can be accessed via manager.function() or manager.propertyName

Properties

Properties are accessed by: dceTimecode.propertyname
Property Name Property Type Signal Description Example
appH int orientationChanged() application window height
appW int orientationChanged() application window width
sPK_User String userChanged() String of the current user assigned to this QOrbiter
currentRoom String roomChanged() The current room or entertain area the QOrbiter is set to
dceResponse string dceResponseChanged() logging property cataloging responses from the router
debugMode bool debugModeChanged() If Debug mode is enabled.

Signals

Signals not related to specific properties, but internal functions of the class itself

Signal Params Description
orbiterReady(bool) bool This signal is emitted when the local configuration file and the remote config files have been parsed.
orbiterClosing() This signal is emitted when the orbiter is exiting.
mediaScreenShotReady() This signal is emitted when the requested screen shot is available.
connectedStateChanged() This signal is emitted when the connection from QOrbiter to the LinuxMCE core changes.

Signals

Functions

void getLiveTVPlaylist(')
Params Description EX
No Params Calling this function will tell the router to populate the live tv playlist and return it to the playlist element. Calling it when no tv is playing has no result Component.onCompleted:manager.getLiveTVPlaylist()
void showFloorplan(int floorplantype)
Params Description Example
int - The type of floorplan you want to display This function brings up the floorplan for the selected room and populates the devices there on the screenshot image
void saveScreenshot(int attribute_number)
Params Description Example
int - The Attribute number of the attribute you want to associate with the screenshot.
It is provided in the screenshotAttributes listmodel that is prepared when grabbing a screeshot
Saves the current screenshot to the attribute image

Component

   {
       id:thumbdelegate
       Rectangle{
           id:attributedelegate
           height: 50
           width: parent.width-1
           color: style.accentcolor
           Text {
               id: propertystring
               text: attributeType
           }
           MouseArea{
               anchors.fill: parent
               hoverEnabled: true
               onEntered: attributedelegate.color = "aliceblue"
               onExited: attributedelegate.color = style.accentcolor
               onClicked: {
                    manager.saveScreenShot(attributeNo)
                   manager.cleanupScreenie()
                    assignscreenshot.destroy()
               }
           }
       }
   }
void cleanupScreenie(')
Params Description Output
None Destroys the last screenshot and empties the model. Depreciated and will be made automatic
void resendCode(int parentDevice, int commandNumber)
Params Description Output
parentDevice - int - device number of the parent

commandNumber- int - the number of the command you wish to resend

Resend and av control code. This function should be utilized within the device_commands model. The parameters are attributes of said mdel
ListView
           {
               id:device_command_list
               height: parent.height
               width: scaleX(10)
               anchors.top: parent.top
               anchors.left: codelist.right
               anchors.leftMargin: scaleY(5)
               clip: true
               model: device_commands
               delegate: Rectangle{
                   id:device_box
                   height: scaleY(8)
                   width: scaleX(20)
                   color: "slateblue"
                   Column{
                       spacing: scaleY(1)
                       Text{
                           id:command_label
                           text:qs_command
                           font.pixelSize: scaleY(2)
                       }
                   }
                   MouseArea{
                       anchors.fill: parent
                       hoverEnabled: true
                       onEntered: device_box.color = "white"
                       onExited: device_box.color = "slateblue"
                       onClicked: manager.resendCode(i_parentDevice, i_commandnum)
                   }
               }
           }