Main Page | Class Hierarchy | Compound List | File List | Compound Members

SegmentSlider Class Reference

This class implements a slider widget for representing a video segment. More...

#include <SegmentSlider.hpp>

List of all members.

Public Slots

void editSegment ()
 Invoke an edit dialog on the video segment.

void removeSegment ()
 Remove the current video segment.

void segmentLevelChange (int level)
 The level spin box value changed.

void setSliderFromMediaTime (const MP7Time &time)
 Update the slider's position according to the current media time.

void updateSegmentDisplay ()
 Update display of markers and buddy labels according to the MP7VideoSegment.

void gotoPrevSibling ()
 Make the previous generalized sibling segment the current one (if available).

void gotoNextSibling ()
 Make the next generalized sibling segment the current one (if available).


Signals

void segmentChanged (MP7ListViewItem *segmentRoot)
 The current segment has changed.

void sliderMoved (const MP7Time &time)
 The slider was moved by the user.


Public Member Functions

 SegmentSlider (QWidget *parent, const char *name=NULL)
 Constructor.

 ~SegmentSlider ()
 Destructor.

void setSegment (const MP7VideoSegment &segment, bool emitSignal=true)
 Set the video segment represented by this slider and update the display accordingly.

MP7VideoSegment getSegment () const
 Return the video segment represented by this slider.

void setTitleLabel (QLabel *label)
 Set the segment title buddy label.

void setStartTimeLabel (QLabel *label)
 Set the segment start time buddy label.

void setEndTimeLabel (QLabel *label)
 Set the segment end time buddy label.

void setLevelSpinBox (QSpinBox *spinbox)
 Set the segment level spinbox buddy widget.

void setPrevSiblingButton (QButton *button)
 Set the previous sibling buddy button.

void setNextSiblingButton (QButton *button)
 Set the next sibling buddy button.

void enableSegmentZooming (bool on)
 Enable or disable segment zooming.


Protected Slots

void emitSliderMovedSignal ()
 Emit a sliderMoved(const MP7Time &) signal.


Protected Member Functions

void setMarker (const MP7VideoSegment &subsegment)
 Set a segment marker corresponding to the given subsegment.

void removeMarker (int value)
 Remove the segment marker at the position given by value.

void removeMarker (const MP7Time &time)
 Remove the segment marker at the given media time point.

void repositionMarkers ()
 Re-position segment markers and activate segment tool-tips.

int timeToValue (const MP7Time &time) const
 Convert time point to slider value.

MP7Time valueToTime (int value) const
 Convert slider value to time point.

int durationToValue (const MP7Time &time) const
 Convert duration to slider value.

virtual void resizeEvent (QResizeEvent *e)
 Resize event handler.

virtual void mouseDoubleClickEvent (QMouseEvent *e)
 Double-click event handler.


Detailed Description

This class implements a slider widget for representing a video segment.

It allows segment markers to be set in media time units.

Author:
Mario Taschwer
Version:
Id
SegmentSlider.hpp,v 1.4 2004/09/24 13:15:09 mtaschwer Exp


Constructor & Destructor Documentation

SegmentSlider::SegmentSlider QWidget *  parent,
const char *  name = NULL
 

Constructor.

Initializes this slider with horizontal orientation and range [0..100].


Member Function Documentation

void SegmentSlider::editSegment  )  [slot]
 

Invoke an edit dialog on the video segment.

A segmentChanged(MP7ListViewItem *) signal is emitted.

See also:
MP7VideoSegment::edit()

void SegmentSlider::enableSegmentZooming bool  on  ) 
 

Enable or disable segment zooming.

Per default, segment zooming is enabled.

See also:
mouseDoubleClickEvent(QMouseEvent *)

void SegmentSlider::gotoNextSibling  )  [slot]
 

Make the next generalized sibling segment the current one (if available).

Two nodes of a tree are generalized siblings if they have the same distance to the root node.

void SegmentSlider::gotoPrevSibling  )  [slot]
 

Make the previous generalized sibling segment the current one (if available).

Two nodes of a tree are generalized siblings if they have the same distance to the root node.

virtual void SegmentSlider::mouseDoubleClickEvent QMouseEvent *  e  )  [protected, virtual]
 

Double-click event handler.

If segment zooming is enabled, double-clicking this widget will zoom into the subsegment corresponding to the location of the double-click event.

See also:
enableSegmentZooming(bool)

void SegmentSlider::removeSegment  )  [slot]
 

Remove the current video segment.

The parent segment becomes the current one. The top-level segment cannot be removed.

void SegmentSlider::repositionMarkers  )  [protected]
 

Re-position segment markers and activate segment tool-tips.

The marker values are not modified.

void SegmentSlider::segmentChanged MP7ListViewItem segmentRoot  )  [signal]
 

The current segment has changed.

The root element of the new segment is emitted.

void SegmentSlider::segmentLevelChange int  level  )  [slot]
 

The level spin box value changed.

If the new value is less than the current segment level and segment zooming is enabled, this slider will zoom-out to the video segment of the specified level.

void SegmentSlider::setMarker const MP7VideoSegment subsegment  )  [protected]
 

Set a segment marker corresponding to the given subsegment.

The slider will show a tool-tip with the segment title in the area corresponding to the segment duration. You need to call repositionMarkers() afterwards to display the new marker.

void SegmentSlider::setSegment const MP7VideoSegment segment,
bool  emitSignal = true
 

Set the video segment represented by this slider and update the display accordingly.

If emitSignal is true and segment is not equal to the current segment, a segmentChanged(MP7ListViewItem *) signal will be emitted.

void SegmentSlider::sliderMoved const MP7Time time  )  [signal]
 

The slider was moved by the user.

The time represented by the new slider position is emitted.


The documentation for this class was generated from the following file:
Generated on Mon Sep 27 09:12:05 2004 for Muvino by doxygen 1.3.2