本文整理汇总了C++中model_type::observer_set方法的典型用法代码示例。如果您正苦于以下问题:C++ model_type::observer_set方法的具体用法?C++ model_type::observer_set怎么用?C++ model_type::observer_set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model_type
的用法示例。
在下文中一共展示了model_type::observer_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: set_message_observers
void set_message_observers(
const command_set_type& command_set,
diagram_view_type& diagram_view,
timetable_view_type& timetable_down_view,
timetable_view_type& timetable_up_view,
main_window_type& main_window,
const message_catalog_type& message_catalog
)
{
m_model.observer_set().reset().connect(
model_reset_observer_type{ m_model, diagram_view, timetable_down_view, timetable_up_view, main_window }
);
m_model.observer_set().changed().connect(
model_changed_observer_type{
m_model, diagram_view, timetable_down_view, timetable_up_view, main_window
}
);
set_diagram_view_message_observers(diagram_view, main_window, message_catalog);
set_timetable_view_message_observers(
timetable_down_view, main_window.get_timetable_down_view_picture_box()
);
set_timetable_view_message_observers(timetable_up_view, main_window.get_timetable_up_view_picture_box());
main_window.size_observer_set().resized().connect(
main_window_window_resized_observer_type{
diagram_view,
timetable_down_view,
timetable_up_view,
main_window,
main_window.get_tab_frame(),
main_window.get_diagram_view_picture_box(),
main_window.get_timetable_down_view_picture_box(),
main_window.get_timetable_up_view_picture_box(),
main_window.get_property_bar()
}
);
main_window.file_drop_observer_set().file_dropped().connect(
main_window_file_dropped_observer_type{ command_set, m_model, main_window }
);
}