comparison libgui/src/variable-editor-model.h @ 27247:9e5a825bb966

replace more explicit callback functions with lambda expressions * Canvas.h, Canvas.cc (Canvas::annotation_callback): Delete. Replace uses of callback functions with equivalent lambda expressions in calls to octave_link::post_event. * file-editor-tab.h, file-editor-tab.cc (file_editor_tab::add_breakpoint_event): New function. (file_editor_tab::add_breakpoint_callback, file_editor_tab::remove_breakpoint_callback, file_editor_tab::remove_all_breakpoints_callback): Delete. Replace uses of callback functions with equivalent lambda expressions in calls to octave_link::post_event. Use add_breakpoint_event to consolidate the calls to post_event for this action to a single function. * variable-editor-model.h, variable-editor-model.cc (variable_editor_model::eval_expr_event): New function. (variable_editor_model::init_from_oct): Eliminate unnecessary function parameter. (variable_editor_model::set_data_oct, variable_editor_model::eval_oct): Delete. Replace uses of callback functions with equivalent lambda expressions in calls to octave_link::post_event. Use eval_expr_event to consolidate the calls to post_event for this action to a single function.
author John W. Eaton <jwe@octave.org>
date Fri, 12 Jul 2019 19:26:55 -0400
parents 00f796120a6d
children 5f170ea12fa1
comparison
equal deleted inserted replaced
27246:7c778a102de8 27247:9e5a825bb966
297 297
298 private: 298 private:
299 299
300 base_ve_model *rep; 300 base_ve_model *rep;
301 301
302 void set_data_oct (const std::string& name, const std::string& expr, 302 void init_from_oct (void);
303 const QModelIndex&); 303
304 304 void eval_expr_event (const QString& expr);
305 void init_from_oct (const std::string& str);
306
307 void eval_oct (const std::string& name, const std::string& expr);
308 305
309 octave_value retrieve_variable (const std::string& name); 306 octave_value retrieve_variable (const std::string& name);
310 307
311 bool is_valid (void) const 308 bool is_valid (void) const
312 { 309 {