本文整理汇总了C++中etl::handle::signal_changed方法的典型用法代码示例。如果您正苦于以下问题:C++ handle::signal_changed方法的具体用法?C++ handle::signal_changed怎么用?C++ handle::signal_changed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类etl::handle
的用法示例。
在下文中一共展示了handle::signal_changed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void studio::Widget_Preview::set_preview(etl::handle<Preview> prev)
{
disconnect_preview(preview.get());
preview = prev;
synfig::info("Setting preview");
//stop playing the mini animation...
pause();
if(preview)
{
//set the internal values
float rate = preview->get_fps();
jackdial->set_fps(rate);
jackdial->set_offset(preview->get_jack_offset());
synfig::info(" FPS = %f",rate);
if(rate)
{
float start = preview->get_begintime();
float end = preview->get_endtime();
rate = 1/rate;
adj_time_scrub->set_lower(start);
adj_time_scrub->set_upper(end);
adj_time_scrub->set_value(start);
adj_time_scrub->set_step_increment(rate);
adj_time_scrub->set_page_increment(10*rate);
//if the begin time and the end time are the same there is only a single frame
singleframe = end==start;
}else
{
adj_time_scrub->set_lower(0);
adj_time_scrub->set_upper(0);
adj_time_scrub->set_value(0);
adj_time_scrub->set_step_increment(0);
adj_time_scrub->set_page_increment(0);
singleframe = true;
}
preview->get_canvas()->fill_sound_processor(soundProcessor);
set_jack_enabled( preview && preview->get_canvasview()->get_jack_enabled_in_preview() );
//connect so future information will be found...
prevchanged = prev->signal_changed().connect(sigc::mem_fun(*this,&Widget_Preview::whenupdated));
prev->signal_destroyed().connect(sigc::mem_fun(*this,&Widget_Preview::disconnect_preview));
update();
//synfig::warning("Did update sp");
queue_draw();
}
}