Mercurial > octave
diff libgui/src/variable-editor.h @ 24758:09364b41ddb6
allow dynamic resizing of display rows and columns in variable editor
* variable-editor-model.h, variable-editor-model.cc
(ve_base_model::maybe_resize_rows, ve_base_model::maybe_resize_columns,
numeric_model::maybe_resize_rows, numeric_model::maybe_resize_columns,
cell_model::maybe_resize_rows, cell_model::maybe_resize_columns,
struct_vector_model::maybe_resize_rows,
struct_model::maybe_resize_rows, struct_model::maybe_resize_columns,
variable_editor_model::change_display_size): New functions.
(variable_editor_model::update_data): Call change_display_size if row
or column size changes.
(variable_editor_model::maybe_resize_rows,
variable_editor_model::maybe_resize_columns): New functions.
* variable-editor.h, variable-editor.cc
(variable_editor_tab::variable_editor_tab): Initialize all data
members.
(variable_editor_tab::keyPressEvent): New function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 14 Feb 2018 19:02:58 -0500 |
parents | 75090f34ffb1 |
children | ed2d9ef336a7 |
line wrap: on
line diff
--- a/libgui/src/variable-editor.h Wed Feb 14 16:21:53 2018 -0500 +++ b/libgui/src/variable-editor.h Wed Feb 14 19:02:58 2018 -0500 @@ -49,7 +49,8 @@ public: var_editor_tab (QStackedWidget *widget_stack, QWidget *p = nullptr) - : QWidget (p), m_widget_stack (widget_stack) + : QWidget (p), m_model (nullptr), m_widget_stack (widget_stack), + m_edit_view_idx (-1), m_disp_view_idx (-1) { } ~var_editor_tab (void) = default; @@ -73,6 +74,8 @@ bool has_focus (void) const; + void keyPressEvent (QKeyEvent *event); + public slots: void set_editable (bool);