diff libgui/src/module.mk @ 23927:e3a36f84d01d

provide variable-editor widget for the GUI This patch is the work of RĂ¼diger Sonderfeld <ruediger on savannah> Philip Nienhuis Michael Barnes <mjbcode@runbox.com> jwe * libgui/src/variable-editor.cc, libgui/src/variable-editor.h, libgui/src/variable-editor-model.cc, libgui/src/variable-editor-model.h:: New files. * libgui/src/module.mk: Update. * main-window.cc, main-window.h (main_window::main_window): Initialize variable_editor_window. (main_window::~main_window): Delete variable_editor_window. (main_window::connect_uiwidget_links): Connect variable window signals to octave_qt_link slots and callbacks. Add variable editor to menus. (main_window::variable_editor_callback, main_window::force_refresh_workspace, main_window::edit_variable, main_window::clear_variable_editor_cache): New functions. (main_window::configure_shortcuts): Also configure variable editor shortcuts. * resource-manager.cc, resource-manager.h (varedit_color_chars, varedit_color_names, varedit_default_colors): New functions. * settings-dialog.ui: New configuration info for variable editor. * settings-dialog.cc, settings-dialog.h (settings_dialog::read_varedit_colors, settings_dialog::write_varedit_colors): New functions. (settings_dialog::settings_dialog, settings_dialog::write_changed_settings): Also handle settings for variable editor. * workspace-model.h (workspace_model::prompt_variable_editor): New signal. * workspace-view.cc, workspace-view.h (workspace_view::workspace_view): Also connect eidt_variable_signal to edit_variable slot. (workspace_view::contextmenu_requested): Handle opening variabl in variable editor. (workspace_view::handle_contextmenu_edit): New function. (workspace_view::edit_variable_signal): New signal. * octave-link.cc, octave-link.h (Fopenvar): New function. (octave_link::post_event, octave_link::do_post_event): New variants for methods with two, three, or four arguments. (octave_link::set_workspace): New argument, update_variable_editor. (octave_link::openvar): New function. (octave_link::do_openvar): New pure virtual. * octave-qt-link.cc, octave-qt-link.h (octave_qt_link::do_set_workspace): New argument, update_variable_editor. (octave_qt_link::do_set_workspace): Optionally emit refresh_variable_editor signal (octave_qt_link::do_openvar): New function. (octave_qt_link::open_variable, octave_qt_link::refresh_variable_editor): New signals. * gui.txi: Document openvar. * variables.cc, variables.h (symbol_exist): New function. * action-container.h (action_container::method_arg2_elem, action_container::method_arg3_elem, action_container::method_arg4_elem): New classes. (action_container::add_method): New variants for two, three, or four arguments.
author Michael Barnes <mjbcode@runbox.com>
date Fri, 19 May 2017 18:15:48 +0200
parents 8308417aff1c
children a1801e80bb11
line wrap: on
line diff
--- a/libgui/src/module.mk	Mon Aug 21 17:22:28 2017 +0200
+++ b/libgui/src/module.mk	Fri May 19 18:15:48 2017 +0200
@@ -114,6 +114,8 @@
   %reldir%/moc-welcome-wizard.cc \
   %reldir%/moc-workspace-model.cc \
   %reldir%/moc-workspace-view.cc \
+  %reldir%/moc-variable-editor.cc \
+  %reldir%/moc-variable-editor-model.cc \
   %reldir%/moc-find-files-dialog.cc \
   %reldir%/moc-find-files-model.cc \
   %reldir%/qtinfo/moc-parser.cc \
@@ -170,7 +172,9 @@
   %reldir%/find-files-dialog.h \
   %reldir%/find-files-model.h \
   %reldir%/workspace-model.h \
-  %reldir%/workspace-view.h
+  %reldir%/workspace-view.h \
+  %reldir%/variable-editor.h \
+  %reldir%/variable-editor-model.h
 
 %canon_reldir%_%canon_reldir%_la_SOURCES = \
   %reldir%/dialog.cc \
@@ -201,7 +205,9 @@
   %reldir%/find-files-dialog.cc \
   %reldir%/find-files-model.cc \
   %reldir%/workspace-model.cc \
-  %reldir%/workspace-view.cc
+  %reldir%/workspace-view.cc \
+  %reldir%/variable-editor.cc \
+  %reldir%/variable-editor-model.cc
 
 nodist_%canon_reldir%_%canon_reldir%_la_SOURCES = \
   $(octave_gui_MOC) \