Mercurial > octave
diff libinterp/octave-value/ov.h @ 24643:78aff6f14227
more variable editor improvements; allow more variable types to be edited
* ov.h (octave_value::edit_display): New function.
* ov-base.h (octave_base_value::edit_display): New virtual function.
* ov-base-mat.h, ov-base-mat.cc, ov-base-scalar.h, ov-base-scalar.cc,
ov-cell.h, ov-cell.cc: Overload edit_display function.
* variable-editor.cc (variable_editor::variable_editor): Increase
default width to 30.
* variable-editor-model.h, variable-editor-model.cc (make_label): Now
file-scope static function instead of member function.
(get_rows_and_columns): New file-scope static function.
Use to eliminate duplicated code.
(impl::cell::cell (const octave_value&, int, int)): New ctor.
(variable_editor_model::resize_columns_signal): New signal.
(variable_editor_model::update_data): Emit resize_columns_signal
when done.
(variable_editor_model::variable_editor_model):
Connect resize_columns_signal. Don't nest calls to insertRows and
insertColumns.
(variable_editor_model::type_is_editable) Allow all numeric types,
logical arrays, and cells to be edited. Include dimensions in error
message.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 26 Jan 2018 19:39:46 -0500 |
parents | ce2eb28e0a6d |
children | d4dd741b2794 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov.h Fri Jan 26 00:11:11 2018 -0500 +++ b/libinterp/octave-value/ov.h Fri Jan 26 19:39:46 2018 -0500 @@ -1275,6 +1275,11 @@ void short_disp (std::ostream& os) const { rep->short_disp (os); } + std::string edit_display (octave_idx_type i, octave_idx_type j) const + { + return rep->edit_display (i, j); + } + int type_id (void) const { return rep->type_id (); } std::string type_name (void) const { return rep->type_name (); }