Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TimelineZoomScale Class Reference

#include "gui/widget/timeline/timeline-zoom-scale.hpp"

Description

Definition at line 46 of file timeline-zoom-scale.hpp.

Public Member Functions

 TimelineZoomScale ()
 
void set_value (double val)
 
sigc::signal< void, double > signal_zoom ()
 
void wireTimelineState (shared_ptr< TimelineState > currentState, TimelineWidget::TimelineStateChangeSignal)
 

Private Member Functions

TimelineViewWindowgetViewWindow ()
 access current timeline state More...
 
void on_timeline_state_changed (shared_ptr< TimelineState > newState)
 Update the slider position when the timeline state is changed. More...
 
void on_zoom ()
 Event handler for when the adjustment value is changed. More...
 
void on_zoom_in_clicked ()
 Event handler for when the zoomIn Button is clicked. More...
 
void on_zoom_out_clicked ()
 Event handler for when the zoomIn Button is clicked. More...
 

Private Attributes

Glib::RefPtr< Gtk::Adjustment > adjustment
 
const double button_step_size
 
Gtk::HScale slider
 
shared_ptr< TimelineStatetimelineState
 
MiniButton zoomIn
 
MiniButton zoomOut
 
sigc::signal< void, double > zoomSignal
 

Constructor & Destructor Documentation

Todo:
The initial adjustment value needs to match what the TimelineViewWindow's actual timeScale Value is. TimelineViewWindow::get_time_scale() is currently a public method, but will soon be private. Maybe TimelineViewWindow can have a zoom_adjustment that gets passed to this widget's Constructor?
Todo:
actually there is a more involved problem. The TimelineWidget maintains a TimelineState, which in turn owns the TimelineViewWindow. Now, the problem is: when we switch to another Sequence (View), then this TimelineState gets switched too, causing also a entirely different TimelineViewWindow to become effective. Thus
  • how can we managed to be notified from that switch?
  • problem is: TimelineZoomScale widget is owned by the TimelinePannel. Likewise, TimelineWidget is owned by the TimelinePannel. But the state handling/switching logic is embedded within TimelineWidget
  • and finally: how can we translate the actual scale (in time units), as maintained within TimelineViewWindow, back into the adjustment used here (which uses a relative scale 0...1.0 ) S

Definition at line 66 of file timeline-zoom-scale.cpp.

References TimelineZoomScale::adjustment, TimelineZoomScale::on_zoom(), TimelineZoomScale::on_zoom_in_clicked(), TimelineZoomScale::on_zoom_out_clicked(), TimelineZoomScale::slider, TimelineZoomScale::zoomIn, and TimelineZoomScale::zoomOut.

+ Here is the call graph for this function:

Member Function Documentation

sigc::signal< void, double > signal_zoom ( )

Definition at line 145 of file timeline-zoom-scale.cpp.

References TimelineZoomScale::zoomSignal.

void set_value ( double  val)
inline

Definition at line 54 of file timeline-zoom-scale.hpp.

void wireTimelineState ( shared_ptr< TimelineState currentState,
TimelineWidget::TimelineStateChangeSignal  stateChangeSignal 
)

Definition at line 102 of file timeline-zoom-scale.cpp.

References TimelineZoomScale::on_timeline_state_changed().

+ Here is the call graph for this function:

void on_timeline_state_changed ( shared_ptr< TimelineState newState)
private

Update the slider position when the timeline state is changed.

Definition at line 112 of file timeline-zoom-scale.cpp.

References TimelineZoomScale::adjustment, TimelineZoomScale::getViewWindow(), and TimelineZoomScale::timelineState.

Referenced by TimelineZoomScale::wireTimelineState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void on_zoom_in_clicked ( )
private

Event handler for when the zoomIn Button is clicked.

Definition at line 122 of file timeline-zoom-scale.cpp.

References TimelineZoomScale::adjustment, and TimelineZoomScale::button_step_size.

Referenced by TimelineZoomScale::TimelineZoomScale().

+ Here is the caller graph for this function:

void on_zoom_out_clicked ( )
private

Event handler for when the zoomIn Button is clicked.

Definition at line 130 of file timeline-zoom-scale.cpp.

References TimelineZoomScale::adjustment, and TimelineZoomScale::button_step_size.

Referenced by TimelineZoomScale::TimelineZoomScale().

+ Here is the caller graph for this function:

void on_zoom ( )
private

Event handler for when the adjustment value is changed.

Definition at line 138 of file timeline-zoom-scale.cpp.

References TimelineZoomScale::adjustment, and TimelineZoomScale::zoomSignal.

Referenced by TimelineZoomScale::TimelineZoomScale().

+ Here is the caller graph for this function:

TimelineViewWindow & getViewWindow ( )
private

access current timeline state

Definition at line 152 of file timeline-zoom-scale.cpp.

References TimelineZoomScale::timelineState.

Referenced by TimelineZoomScale::on_timeline_state_changed().

+ Here is the caller graph for this function:

Member Data Documentation

Gtk::HScale slider
private

Definition at line 88 of file timeline-zoom-scale.hpp.

Referenced by TimelineZoomScale::TimelineZoomScale().

MiniButton zoomIn
private

Definition at line 89 of file timeline-zoom-scale.hpp.

Referenced by TimelineZoomScale::TimelineZoomScale().

MiniButton zoomOut
private

Definition at line 90 of file timeline-zoom-scale.hpp.

Referenced by TimelineZoomScale::TimelineZoomScale().

sigc::signal<void, double> zoomSignal
private
const double button_step_size
private
+ Inheritance diagram for TimelineZoomScale:
+ Collaboration diagram for TimelineZoomScale:

The documentation for this class was generated from the following files: