Design Docs Editing Widget
From PiTiViWiKi
Contents |
[edit]
Editing Widget Design Considerations
[edit]
Editing Widget needs to
[edit]
when initializng
- create all gui components (done)
- connect slider to playground
- register signal callbacks
- Done button callback (done)
- Cancel button callback (done)
- Start Trim buttons (done)
- End Trim buttons (done)
- Start/Stop seek buttons (done)
- playground callbacks
[edit]
when source is set
- check if source is editable (how?)
- remember the new source (done)
- create an editing FileSrcBin for current source(done)
- register thumbnail callback with FileSrcBin(done)
- set the timeline slider min/max values appropriately (done)
- update media_start and media_duration text displays(done)
- move slider to current source start(done)
[edit]
when trim buttons are clicked
- remember new start/duration times(done)
- remember new start/duration times(done)
- adjust controls (done)
- update labels (done)
- update thumnail pixmaps (done)
[edit]
when updating start/stop text displays
- use an appropriately large font(done)
- set start text to media_start(done)
- set end text to duration + media_start(done)
[edit]
when done button clicked, cancel button clicked, or close menu item selected
- perform cleanup operations
- unregister signal handlers
- if cancel button clicked
- return
- set source start/stop duration from temporary values
[edit]
SimpleSourceWidget needs to
[edit]
when source start/duration changes
- update thumbnails
[edit]
Thumbnail viewer needs to
[edit]
when thumbnail needs to be updated
- remember the new pixbuf(done)
- set update flag
[edit]
when drawing the widget
- if thumbnail needs to be updated
- redraw thumbnail
- force repaint
[edit]
Q/A
- How to check if current source should be edited?
- i.e. if source is a camera or blank, can't call setMediaStartDurationTime()
- How to extract pixmaps from source?
- create a thumbnailer (a pipeline with the source and a PixbufThumbnailSink)
- set thumbnailer's source
- connect to thumbnailer's thumbnail signal
- call thumbnailer.makeThumbnail
- signal handler callback gets a gtk.gdk.pixbuf

