pyforms :: gui :: Controls :: ControlEventTimeline :: TimelineWidget :: TimelineWidget :: Class TimelineWidget
[hide private]
[frames] | no frames]

Class TimelineWidget

source code


Timeline widget definition to be used in the ControlEventTimeline

Instance Methods [hide private]
 
__init__(self, *args, **kwargs) source code
 
x2frame(self, x) source code
 
frame2x(self, frame) source code
 
removeSelected(self) source code
 
lockSelected(self) source code
 
selectDelta(self, x, y) source code
 
__drawTrackLines(self, painter, start, end) source code
 
__drawTrackLabels(self, painter) source code
 
importchart_csv(self, csvfileobject) source code
 
import_csv(self, csvfileobject)
Extracts info from a file object and stores it in memory in order to display it on the timeline.
source code
 
export_csv(self, csvfileobject)
Processes all timeline data in an arranged format to be written in a CSV file.
source code
 
cleanCharts(self) source code
 
clean(self) source code
 
cleanLine(self) source code
 
addPeriod(self, value, track=0, color=None)
Adds an annotated interval.
source code
 
_update_tracks_info(self)
This method updates the dict `_tracks_info` which contains all info stored in the timeline.
source code
 
__print_tracks_info(self)
Prints tracks info on screen.
source code
 
paintEvent(self, e) source code
 
mouseDoubleClickEvent(self, event) source code
 
keyReleaseEvent(self, event) source code
 
mousePressEvent(self, event) source code
 
mouseMoveEvent(self, event) source code
 
mouseReleaseEvent(self, event) source code
 
trackInPosition(self, x, y) source code
 
playVideoEvent(self) source code
 
fpsChangeEvent(self) source code
 
__checkPositionIsVisible(self, value) source code
 
scroll(self) source code
 
position(self, value) source code
 
scale(self, value) source code
 
color(self, value) source code
 
numberoftracks(self, value) source code
 
isPlaying(self) source code
 
fps(self, value) source code
Class Variables [hide private]
  _defautcolor = QtGui.QColor(100, 100, 255)
Method Details [hide private]

import_csv(self, csvfileobject)

source code 

Extracts info from a file object and stores it in memory in order to display it on the timeline.

Refer to the `export` method to learn about input file format and structure.

export_csv(self, csvfileobject)

source code 

Processes all timeline data in an arranged format to be written in a CSV file.

Current file structure:

--- CSV FILE BEGIN --- Track info line Event info line Event info line ... Empty line Track info line Event info line Event info line ... Empty line Track info line Event info line Event info line ... Empty line --- CSV FILE END ---

Track info line format:

| Id | Total # of events in this track | | | Color | Label |

Event info line format:

| Lock status | Begin frame | End frame | Comment | Color | |

_update_tracks_info(self)

source code 

This method updates the dict `_tracks_info` which contains all
info stored in the timeline.

Currently, this method is called is the following situations:
- Class initialization
- Event added by double clicking the timeline
- Everything is cleaned
- A line is cleaned
- After an event is removed/locked/unlocked
#TODO- After editing a timeline line entry
#TODO- After editing an event (TimelineDelta object)
- After importing from a file
- Before exporting to a file

This dictionary stores info in the format shown below:
{line_numer : [ line_label, line_color, [data] ] }

scroll(self)

source code 
Decorators:
  • @property

position(self, value)

source code 
Decorators:
  • @position.setter

scale(self, value)

source code 
Decorators:
  • @scale.setter

color(self, value)

source code 
Decorators:
  • @color.setter

numberoftracks(self, value)

source code 
Decorators:
  • @numberoftracks.setter

isPlaying(self)

source code 
Decorators:
  • @property

fps(self, value)

source code 
Decorators:
  • @fps.setter