diff libgui/src/variable-editor.h @ 24641:7d177be54c37

pass variable value to variable editor in addition to variable name * main-window.h, main-window.cc (main_window::edit_variable): Also pass value. Change all uses. * octave-qt-link.h, octave-qt-link.cc (octave_qt_link::octave_qt_link): Call qRegisterMetaType for octave_value. (octave_qt_link::do_edit_variable): Rename from octave_qt_link::do_openvar. Change all uses. (edit_variable_signal): Rename from open_variable_signal. * variable-editor-model.h, variable-editor-model.cc (variable_editor_model::variable_editor_model): Also pass value. Change all uses. * variable-editor.h, variable-editor.cc (variable_editor::edit_variable): Also pass value. Change all uses. Align label at top of vbox layout. * octave-link.h, octave-link.cc (Fopenvar): Use DEFMETHOD. Get value from current scope and pass to octave_link::edit_variable. (octave_link::edit_variable): Rename from octave_link::openvar. Change all uses. (octave_link::do_edit_variable): Rename from octave_link::do_openvar. Change all uses.
author John W. Eaton <jwe@octave.org>
date Thu, 25 Jan 2018 23:59:57 -0500
parents 428780eec08a
children d58543eb53e9
line wrap: on
line diff
--- a/libgui/src/variable-editor.h	Tue Jan 23 14:36:00 2018 -0500
+++ b/libgui/src/variable-editor.h	Thu Jan 25 23:59:57 2018 -0500
@@ -30,6 +30,8 @@
 
 #include "octave-dock-widget.h"
 
+class octave_value;
+
 class QTabWidget;
 class QToolBar;
 class QMainWindow;
@@ -52,7 +54,7 @@
 
   variable_editor& operator = (const variable_editor&) = delete;
 
-  void edit_variable (const QString& name);
+  void edit_variable (const QString& name, const octave_value& val);
 
   // Clear all the models' data cache.
   void clear_data_cache (void);