当前位置: 首页>>代码示例>>C++>>正文


C++ Controller::add_int_property方法代码示例

本文整理汇总了C++中Controller::add_int_property方法的典型用法代码示例。如果您正苦于以下问题:C++ Controller::add_int_property方法的具体用法?C++ Controller::add_int_property怎么用?C++ Controller::add_int_property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Controller的用法示例。


在下文中一共展示了Controller::add_int_property方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

/**
 * Graphical user interface for Toonloop. 
 *
 * Here we create the window and a Clutter stage with actors.
 *
 * Exits the application if OpenGL needs are not met.
 */
Gui::Gui(Application* owner) :
    video_input_width_(1),
    video_input_height_(1),
    owner_(owner),
    isFullscreen_(false),
    current_layout_(LAYOUT_SPLITSCREEN),
    onionskin_opacity_(50),
    onionskin_enabled_(false),
    enable_info_(false),
    enable_help_(false),
    crossfade_ratio_(0.0),
    fps_calculation_timer_(),
    number_of_frames_in_last_second_(0),
    rendering_fps_(0),
    info_window_(owner),
    is_shown_(false)
{
    Controller *controller = owner_->get_controller();
    controller->next_image_to_play_signal_.connect(boost::bind(&Gui::on_next_image_to_play, this, _1, _2, _3));
    controller->add_frame_signal_.connect(boost::bind(&Gui::on_frame_added, this, _1, _2));

    controller->save_clip_signal_.connect(boost::bind(&Gui::on_save_clip, this, _1, _2));
    controller->save_project_signal_.connect(boost::bind(&Gui::on_save_project, this, _1));
    //TODO: controller->no_image_to_play_signals_.connect(boost::bind(&Gui::on_no_image_to_play, this))

    // add properties:
    controller->add_int_property("blending_mode", 0)->value_changed_signal_.connect(boost::bind(&Gui::on_blending_mode_int_property_changed, this, _1, _2));
    controller->add_float_property("crossfade_ratio", 0.0)->value_changed_signal_.connect(boost::bind(&Gui::on_crossfade_ratio_changed, this, _1, _2));
    controller->add_int_property("livefeed_opacity", 255)->value_changed_signal_.connect(boost::bind(&Gui::on_livefeed_opacity_changed, this, _1, _2));
    controller->add_int_property("black_out", 0)->value_changed_signal_.connect(boost::bind(&Gui::on_black_out_changed, this, _1, _2));
    controller->add_int_property("black_out_opacity", 255)->value_changed_signal_.connect(boost::bind(&Gui::on_black_out_opacity_changed, this, _1, _2));
    controller->add_int_property("playback_opacity", 255)->value_changed_signal_.connect(boost::bind(&Gui::on_playback_opacity_changed, this, _1, _2));

    if (owner_->get_configuration()->get_shaders_enabled())
    {
        load_effects();
    }
}
开发者ID:AmineYaiche,项目名称:toonloop,代码行数:45,代码来源:gui.cpp


注:本文中的Controller::add_int_property方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。