Difference between revisions of "TimeCodeManager"
From LinuxMCE
Langstonius (Talk | contribs) |
m (Added categories) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:QOrbiter Skin Api]] | ||
+ | [[Category:QOrbiter]] | ||
+ | [[Category: Programmer's Guide]] | ||
+ | |||
TimeCodeManager is the class responsible for processing timecode for '''external''' playing media. This means anything not playing locally in QOrbiter. It can be accessed as a property by "dcetimecode" | TimeCodeManager is the class responsible for processing timecode for '''external''' playing media. This means anything not playing locally in QOrbiter. It can be accessed as a property by "dcetimecode" | ||
Line 4: | Line 8: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |+ Properties are accessed by: | + | |+ Properties are accessed by: dceTimecode.propertyname |
! Property Name | ! Property Name | ||
! Property Type | ! Property Type | ||
! Signal | ! Signal | ||
! Description | ! Description | ||
+ | ! Example | ||
|- | |- | ||
| tcTotalTime | | tcTotalTime | ||
Line 14: | Line 19: | ||
| totalTimeChanged() | | totalTimeChanged() | ||
| the total time, in milliseconds of the current media | | the total time, in milliseconds of the current media | ||
+ | | Here i use the total time to calculate the time when dragging the seek bar back and forth | ||
+ | property int slidertimer: (scroll_tab.x / scroller_transit.width) * dceTimecode.tcTotalTime | ||
|- | |- | ||
| tcCurrentTime | | tcCurrentTime | ||
Line 23: | Line 30: | ||
| double | | double | ||
| positionChanged() | | positionChanged() | ||
− | | | + | | Used to constantly update the position of the seek bar as media advances |
+ | | By setting the x property to do a little math, I get the seek bar to advance across the transit as the media plays | ||
+ | x: ( dceTimecode.runningTimer / dceTimecode.tcTotalTime) * scroller.width | ||
|- | |- | ||
| dragTime | | dragTime | ||
Line 29: | Line 38: | ||
| dragTimeChanged() | | dragTimeChanged() | ||
| the time that the slider if implemented has been dragged to. | | the time that the slider if implemented has been dragged to. | ||
+ | | Here, it is utilized in a popup that shows when a user drags the seek bar | ||
+ | Text { | ||
+ | id: drag_label | ||
+ | text: dceTimecode.dragTime | ||
+ | anchors.centerIn: parent | ||
+ | } | ||
|- | |- | ||
| qsTotalTime | | qsTotalTime | ||
Line 66: | Line 81: | ||
===Functions=== | ===Functions=== | ||
This is a unique class with no external functions as it does its business internally. | This is a unique class with no external functions as it does its business internally. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 20:49, 23 November 2012
TimeCodeManager is the class responsible for processing timecode for external playing media. This means anything not playing locally in QOrbiter. It can be accessed as a property by "dcetimecode"
Properties
Property Name | Property Type | Signal | Description | Example |
---|---|---|---|---|
tcTotalTime | int | totalTimeChanged() | the total time, in milliseconds of the current media | Here i use the total time to calculate the time when dragging the seek bar back and forth
property int slidertimer: (scroll_tab.x / scroller_transit.width) * dceTimecode.tcTotalTime |
tcCurrentTime | int | timeChanged() | the current position, in milliseconds | |
runningTimer | double | positionChanged() | Used to constantly update the position of the seek bar as media advances | By setting the x property to do a little math, I get the seek bar to advance across the transit as the media plays
x: ( dceTimecode.runningTimer / dceTimecode.tcTotalTime) * scroller.width |
dragTime | String | dragTimeChanged() | the time that the slider if implemented has been dragged to. | Here, it is utilized in a popup that shows when a user drags the seek bar
Text { id: drag_label text: dceTimecode.dragTime anchors.centerIn: parent } |
qsTotalTime | String | totalStringTimeChanged() | Total time of media, formatted in HH::MM::SS - updated every second | |
qsCurrentTime | String | stringTimeChanged() | The current position of the media in HH:MM::SS - updated every second | |
stringPlaybackSpeed | string | sPlaybackSpeedChanged() | Playback speed in string format | |
playbackSpeed | int | playbackSpeedChanged() | Playback Speed in integer format |
Signals
Signals not related to specific properties, but internal functions of the class itself
Signal | Params | Description |
---|---|---|
seekToTime(QString) | String | This signal is emitted when the dragging stops on the seek bar and the time to jump to in the stream is calculated. The string contains the time to jump to in milliseconds. This signal is normally connected to the dce function setMediaPosition(QString) |
Functions
This is a unique class with no external functions as it does its business internally.