diff libgui/src/octave-qt-link.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 e9f7cfd40f85
children f61502510d08
line wrap: on
line diff
--- a/libgui/src/octave-qt-link.h	Tue Jan 23 14:36:00 2018 -0500
+++ b/libgui/src/octave-qt-link.h	Thu Jan 25 23:59:57 2018 -0500
@@ -40,6 +40,8 @@
 // Defined for purposes of sending QList<int> as part of signal.
 typedef QList<int> QIntList;
 
+class octave_value;
+
 //! Provides threadsafe access to octave.
 //! @author Jacob Dawid
 //!
@@ -138,7 +140,7 @@
 
   void do_show_doc (const std::string& file);
 
-  void do_openvar (const std::string &name);
+  void do_edit_variable (const std::string& name, const octave_value& val);
 
   void shutdown_confirmation (bool sd) { m_shutdown_confirm_result = sd; }
 
@@ -197,7 +199,7 @@
 
   void show_doc_signal (const QString& file);
 
-  void open_variable_signal (const QString &name);
+  void edit_variable_signal (const QString& name, const octave_value& val);
 
   void refresh_variable_editor_signal (void);