annotate libgui/src/variable-editor.h @ 24812:ed9ba20d6ed3

Make the variable editor multi-panel via a QMainWindow layout (bug #53046) * main-window.h: Remove <QMdiArea> and <QMdiSubWindow> from header list. * octave-dock-widget.h (label_dock_widget): Added. New intermediate class that contains the features related only to the thin header for dock/undock and close. Namely m_icon_size, m_title_widget, m_dock_button, m_close_button, m_dock_action and m_close_action and member function set_title(). (octave_dock_widget): Removed some elements for label_dock_widget class and inherit that object. * octave-dock-widget.cc (label_dock_widget::label_dock_widget): Constructor of new class selecting a few initialization from octave_dock_widget related to thin header and no settings code and no connections at this level. Set the style sheet of the m_dock_button and m_close_button to transparent. (label_dock_widget::set_title): Moved from octave_dock_widget without modification. (octave_dock_widget::octave_dock_widget): Select code moved to label_dock_widget constructor. (octave_dock_widget::set_title): Moved to label_dock_widget class. * variable-editor-model.h: (variable_editor_model::edit_variable_signal): New signal for a model to launch a new variable_dock_widget if a sub-element needs it. (variable_editor_model::update_data): Changed from private to public. (variable_editor_model::update_data_cache): Ditto. (variable_editor_model::double_click): Moved here from variable_editor to make more modular. * variable-editor-model.cc (variable_editor_model::setData): Change the test on input variable for QString to be anything that can be converted to a QString, e.g., numbers. (variable_editor_model::update_data): Remove obsolete emitted signal maybe_resize_columns_signal(). (variable_editor_model::double_click): Moved from variable_editor. Remove the indirect reference to table then model. * variable-editor.h (var_editor_tab): Remove. A tab widget is no longer used. (variable_dock_widget): Added. A new class inherting label_dock_widget that is merely a container, holding the stack of editable (QTableView) and non-editable (QTextEdit) of variable views. (variable_dock_widget::variable_focused_signal): Added. New signal to let variable_editor know an object or its proxy has come into focus. (variable_dock_widget::handle_focus_change): Added. Slot to connect to QApplication::focusChanged(). (variable_dock_widget::closeEvent): Added. Override any intermediate class and go back to the base QDockWidget behavior. (variable_dock_widget::change_floating): Simple private routine changing the toggling the float state. (variable_dock_widget::change_existence): Simple private routine calling base routine close(). (variable_dock_widget::toplevel_change): Added. Private slot to respond to dock/undock signal. Changes the icon, restores focus, and also makes the first floated display magnified for fast viewing. (variable_editor_stack::variable_editor_stack): New class that holds and manages a variable_editor_model, variable_editor_view (QTableView) and a display view (QTextEdit). (variable_editor_stack::edit_view): Inline function that returns pointer to a variable_editor_view. (variable_editor_stack::disp_view): Inline function that returns pointer to a QTableView. (variable_editor_stack::set_editable): Moved here from var_editor_tab class. Set the view according to whether the variable can be put into table form. (variable_editor_stack::levelUp (void); Moved here from variable_editor class, where it was called up(). Open one higher level of octave value, e.g., cell array, structure. (variable_editor_stack::save (void): Moved here from variable_editor class. General save of variable not related to how it is viewed. (variable_editor_stack::make_disp_view): Moved here from variable_editor class. Only a few small configurations with no model input. (Done later.) (variable_edit_view::variable_edit_view): Added. New class derived from QTableView that holds the majority of functionality moved from the variable_editor class related to table copy, paste, etc. In the constructor is about half of what used to be in variable_editor::make_edit_view(). (variable_edit_view::setModel): Added. Override of the virtual function holding about half of what used to be in variable_editor::make_edit_view(). (variable_edit_view::command_signal): Added. Signal to connect to the variable_editor's mechanism for sending Octave command back to core. (variable_editor_view::range_selected): New method that provides a list of range values for the table used for constructing commands elsewhere. (variable_editor_view::selected_to_octave): Moved from variable_editor class and simplify by calling range_selected(). (variable_editor_view::selected_command_requested): Added. Like function command_requested(), but chooses just the selected data in the table. (variable_editor_view::delete_selected): Moved from variable_editor. Removes a level of indirection, but otherwise pretty much the same. (variable_editor_view::clearContent): Ditto. (variable_editor_view::cutClipboard): Ditto. (variable_editor_view::copyClipboard): Ditto. (variable_editor_view::pasteClipboard): Ditto. (variable_editor_view::pasteTableClipboard): Ditto. (variable_editor_view::handle_horizontal_scroll_action): Ditto. (variable_editor_view::handle_vertical_scroll_action): Ditto. (variable_editor_view::createContextMenu): Ditto. (variable_editor_view::createColumnMenu): Ditto. (variable_editor_view::createRowMenu): Ditto. (variable_editor_view::): Ditto. (variable_editor_view::): Ditto. (variable_editor_view::): Ditto. (variable_editor_view::): Ditto. (variable_editor_view::add_edit_actions): The similar portions of the various context menus that can be reused. (HoverToolButton): Very short class derived from QToolButton whose added feature is to capture the focused variable_dock_widget when the mouse is hovered over the button. (ReturnFocusToolButton): Similarly short class inherting HoverToolButton that adds the feature of restoring the focus before activating its associated action. (ReturnFocusMenu): Analogous to ReturnFocusToolButton, but based on QMenu. This is placed on a HoverToolButton. (variable_editor): Added QStrings m_current_focus_vname and m_hovered_focus_vname to keep track of variable that most recently focused. Removed m_close_action, m_close_others_action and m_close_all_action QActions since tab widget no longer used. Same for m_tab_widget, m_tab_bar. Change QWidget pointer m_container to QMainWindow pointer m_main. (variable_editor::has_focus): Removed. Using a proxy obviates this function. (variable_editor::edit_variable): Change from private to public. (variable_editor::variable_destroyed): New slot. Connect to variable_dock_widget to keep track of when to check if toolbar still valid. (variable_editor::variable_focused): New slot. Connect to variable_dock_widget() to keep track of most recent focused variable window. (variable_editor::record_hovered_focus_variable): New slot. Connect to variable_dock_widget toolbar's ReturnFocusToolButton and ReturnFocusMenu for when mouse cursor hovers. (variable_editor::restore_hovered_focus_variable): New slot. Connect to variable_dock_widget toolbar's ReturnFocusToolButton and ReturnFocusMenu for prior to acting in order to return to active window/focus when hovered. (variable_editor::request_close_tab): Removed. No longer needed. (variable_editor::request_close_other_tabs): Ditto. (variable_editor::request_close_all_tabs): Ditto. (variable_editor::close_tab): Ditto. (variable_editor::contextmenu_requested): Ditto. (variable_editor::columnmenu_requested): Ditto. (variable_editor::rowmenu_requested): Ditto. (variable_editor::double_click): Moved to variable_editor_model class. (variable_editor::up): Renamed levelUp and moved to variable_editor_view class. (variable_editor::clearContent): Moved to variable_dock_view class. (variable_editor::transposeContent): Ditto. (variable_editor::delete_selected): Ditto. (variable_editor::relay_command): Renamed to relay_selected_command() for clarity. (variable_editor::clear_content_signal): Added. New signal to broadcast to the variable_dock_widgets' associated slot. (variable_editor::copy_clipboard_signal): Ditto. (variable_editor::paste_clipboard_signal): Ditto. (variable_editor::paste_table_clipboard_signal): Ditto. (variable_editor::context_menu_signal): Ditto. (variable_editor::column_menu_signal): Ditto. (variable_editor::row_menu_signal): Ditto. (variable_editor::save_signal): Ditto. (variable_editor::delete_selected_signal): Ditto. (variable_editor::selected_command_signal): Ditto. (variable_editor::enable_actions): Removed. Too short of function otherwise. (variable_editor::octave_to_coords): Removed, no longer needed. (variable_editor::real_var_name): Removed, no more KDE problem in tab names because tab widget no longer used. Names stored in most QObject's objectName. (variable_editor::selected_to_octave): Moved to variable_editor_view class. (variable_editor::add_tool_bar_button): Convenience function for repetitive tool bar button construction. * variable-editor.cc: Add <QMdiArea> and <QScreen> to list of headers. Remove <QStackedWidget> from list. (make_plot_mapper): Added. Reusable, list-based convenience function. Adds a plot title that also uses the %1 argument. (variable_dock_widget::variable_dock_widget): Added. Constructor that sets a couple attributes and connects the header dock actions inherited from label_dock_widget to appropriate slots. (variable_dock_widget::handle_focus_change): Added. Connected to QApplication's focusChanged() to set/clear the blue background of the name label and keep track of most recent focused variable_dock_widget. (variable_dock_widget::change_floating): Added. New slot one line long. (variable_dock_widget::change_existence): Added. New slot that calls close() which is configurable by Qt::WA_DeleteOnClose parameter. For now, "close" means "hide". (variable_dock_widget::toplevel_change): Added. Changes the dock/undock icon, but also its tooltip. Also changes the focus to the new window. First time enlarged is very big to simulate "maximize", i.e., better temporary view of this variable. (variable_editor_stack::set_editable): Moved from var_editor_tab object and made more generic so that it can be put in any container. Ensure that the container has the active widget as its focus proxy. (variable_editor_view::closeEvent, etc.): See variable-editor.h for list of functions that are moved from variable_editor, often using findChild() or findChildren() for convenience rather than m_widget_stack or m_table_widget. (variable_editor::variable_editor): Call initializer QMainWindow() and QToolBar() similar to what it was once like. Also initialize m_current_focus_vname and m_hovered_focus_vname to "". Add toolbar to m_main. Use an MDI area for central widget of m_main. Remove all tab bar layout. Set the window's options to QMainWindow::AllowNestedDocks and QMainWindow::VerticalTabs. (variable_editor::edit_variable): Use findChild() to look for variable_dock_widget of requested name. If so, bring into focus and return. If continue, create new variable_dock_widget "page" and place in m_main. Set page's objectName to the variable name. Connect signals/slots to "page" for controlling the blue background of variable name. Remove extra layer of QVBoxLayout container, now replaced by creation of a variable_editor_stack object. Set stack widget's objectName to variable name. Get edit_view from variable_editor_stack's edit_view() method. Set edit_view's objectName to variable name. Make myriad connections to edit_view and variable_editor. Create a variable_edit_model and pass that on to variable_editor_view via setModel(). Make all the various connections amongst these objects. Supply a title to the label_dock_widget and set the text of that title to the variable's name. Use findChildren to enable the toolbar on the first variable, similar to the way it was previous. After creating variable_dock_widget, set its allowed areas to Qt::LeftDockWidgetArea and Qt::RightDockWidgetArea then place it in the main window's left dock area. (variable_editor::make_disp_view): Moved to variable_editor_stack class. (variable_editor::make_edit_view): Absorbed in variable_editor_view constructor and setModel() methods. (variable_editor::has_focus): Removed. Not needed, setting focus proxy appears to obviate this. (variable_editor::notice_settings): Took out shortcut_manager shortcuts because these tab actions no longer needed. Also, these shortcuts can possibly be handled via the QAction shortcut key. (variable_editor::add_tool_bar_button): Added. Mimic the m_tool_bar->addAction() construct used in construct_tool_bar(). (variable_editor::construct_tool_bar): Utilize make_plot_mapper(). Utilize add_tool_bar_button() to place ReturnFocusToolButton objects in the QToolbar. Give an example of adding a short-cut key to the Save QAction. Use a HoverToolButton with a ReturnFocusMenu object similar to existing construction. At the end, utilize findChildren() to loop through all the objects needing connections to slots rather than program individually.
author Daniel J Sebald <daniel.sebald@ieee.org>
date Mon, 19 Feb 2018 20:13:15 -0600
parents ed2d9ef336a7
children 0f6a261ab144
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
1 /*
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
2
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
3 Copyright (C) 2013-2017 John W. Eaton
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
4 Copyright (C) 2015 Michael Barnes
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
5 Copyright (C) 2013 RĂ¼diger Sonderfeld
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
6
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
7 This file is part of Octave.
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
8
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24029
diff changeset
9 Octave is free software: you can redistribute it and/or modify it
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
10 under the terms of the GNU General Public License as published by the
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24029
diff changeset
11 Free Software Foundation, either version 3 of the License, or (at your
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
12 option) any later version.
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
13
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
14 Octave is distributed in the hope that it will be useful, but WITHOUT
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
17 for more details.
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
18
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
20 along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24029
diff changeset
21 <https://www.gnu.org/licenses/>.
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
22
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
23 */
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
24
23978
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
25 #if ! defined (variable_editor_h)
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
26 #define variable_editor_h 1
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
27
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
28 #include <QHeaderView>
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
29 #include <QSettings>
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
30 #include <QStackedWidget>
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
31 #include <QTableView>
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
32
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
33 #include "octave-dock-widget.h"
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
34 #include "tab-bar.h"
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
35
24641
7d177be54c37 pass variable value to variable editor in addition to variable name
John W. Eaton <jwe@octave.org>
parents: 24633
diff changeset
36 class octave_value;
7d177be54c37 pass variable value to variable editor in addition to variable name
John W. Eaton <jwe@octave.org>
parents: 24633
diff changeset
37
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
38 class QModelIndex;
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
39 class QTextEdit;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
40 class QToolBar;
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
41
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
42 class variable_editor_model;
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
43 class variable_editor_view;
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
44
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
45 // The individual variable subwindow class
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
46
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
47 class variable_dock_widget : public label_dock_widget
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
48 {
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
49 Q_OBJECT
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
50
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
51 public:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
52
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
53 variable_dock_widget (QWidget *p = nullptr);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
54
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
55 signals:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
56
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
57 void variable_focused_signal (const QString& name);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
58
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
59 protected:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
60
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
61 virtual void closeEvent (QCloseEvent *e);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
62
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
63 public slots:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
64
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
65 void handle_focus_change (QWidget *old, QWidget *now);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
66
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
67 private slots:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
68
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
69 void change_floating (bool);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
70
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
71 void change_existence (bool);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
72
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
73 void toplevel_change (bool);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
74
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
75 protected:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
76
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
77 bool m_initial_float;
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
78 };
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
79
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
80 class variable_editor_stack : public QStackedWidget
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
81 {
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
82 Q_OBJECT
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
83
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
84 public:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
85
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
86 variable_editor_stack (QWidget *p = nullptr);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
87
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
88 variable_editor_view *edit_view (void) {return m_edit_view;};
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
89
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
90 QTextEdit *disp_view (void) {return m_disp_view;};
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
91
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
92 signals:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
93
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
94 void command_signal (const QString& cmd);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
95
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
96 void edit_variable_signal (const QString& name, const octave_value& val);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
97
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
98 public slots:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
99
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
100 void set_editable (bool editable);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
101
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
102 void levelUp (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
103
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
104 void save (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
105
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
106 private:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
107
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
108 QTextEdit *make_disp_view (QWidget *parent);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
109
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
110 variable_editor_view *m_edit_view;
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
111
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
112 QTextEdit *m_disp_view;
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
113 };
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
114
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
115
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
116 class variable_editor_view : public QTableView
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
117 {
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
118 Q_OBJECT
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
119
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
120 public:
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
121
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
122 variable_editor_view (QWidget *p = nullptr);
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
123
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
124 void setModel (QAbstractItemModel *model);
24708
75090f34ffb1 style fixes for varaible editor
John W. Eaton <jwe@octave.org>
parents: 24703
diff changeset
125
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
126 signals:
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
127
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
128 void command_signal (const QString& cmd);
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
129
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
130 void add_edit_actions_signal (QMenu *menu, const QString& qualifier_string);
24758
09364b41ddb6 allow dynamic resizing of display rows and columns in variable editor
John W. Eaton <jwe@octave.org>
parents: 24708
diff changeset
131
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
132 public slots:
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
133
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
134 void createVariable (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
135
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
136 void transposeContent (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
137
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
138 QList<int> range_selected (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
139
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
140 void delete_selected (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
141
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
142 void clearContent (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
143
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
144 void cutClipboard (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
145
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
146 void copyClipboard (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
147
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
148 void pasteClipboard (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
149
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
150 void pasteTableClipboard (void);
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
151
24762
ed2d9ef336a7 resize varible editor model on scrollbar actions
John W. Eaton <jwe@octave.org>
parents: 24758
diff changeset
152 void handle_horizontal_scroll_action (int action);
ed2d9ef336a7 resize varible editor model on scrollbar actions
John W. Eaton <jwe@octave.org>
parents: 24758
diff changeset
153
ed2d9ef336a7 resize varible editor model on scrollbar actions
John W. Eaton <jwe@octave.org>
parents: 24758
diff changeset
154 void handle_vertical_scroll_action (int action);
ed2d9ef336a7 resize varible editor model on scrollbar actions
John W. Eaton <jwe@octave.org>
parents: 24758
diff changeset
155
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
156 void createContextMenu (const QPoint& pt);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
157
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
158 void createColumnMenu (const QPoint& pt);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
159
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
160 void createRowMenu (const QPoint& pt);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
161
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
162 // Convert selection to an Octave expression.
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
163 QString selected_to_octave (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
164
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
165 void selected_command_requested (const QString& cmd);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
166
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
167 private:
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
168
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
169 void add_edit_actions (QMenu *menu, const QString& qualifier_string);
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
170
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
171 variable_editor_model *m_var_model;
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
172 };
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
173
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
174 // Gadgets to keep track and restore what variable window
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
175 // was in focus just prior to selecting something on the
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
176 // menu bar
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
177
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
178 class HoverToolButton : public QToolButton
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
179 {
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
180 Q_OBJECT
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
181
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
182 public:
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
183
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
184 HoverToolButton (QWidget *parent = nullptr);
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
185
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
186 signals:
24708
75090f34ffb1 style fixes for varaible editor
John W. Eaton <jwe@octave.org>
parents: 24703
diff changeset
187
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
188 void hovered_signal (void);
24708
75090f34ffb1 style fixes for varaible editor
John W. Eaton <jwe@octave.org>
parents: 24703
diff changeset
189
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
190 void popup_shown_signal (void);
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
191
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
192 protected:
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
193
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
194 bool eventFilter (QObject *obj, QEvent *ev);
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
195 };
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
196
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
197 class ReturnFocusToolButton : public HoverToolButton
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
198 {
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
199 Q_OBJECT
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
200
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
201 public:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
202
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
203 ReturnFocusToolButton (QWidget *parent = nullptr);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
204
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
205 signals:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
206
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
207 void about_to_activate (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
208
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
209 protected:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
210
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
211 bool eventFilter (QObject *obj, QEvent *ev);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
212 };
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
213
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
214 class ReturnFocusMenu : public QMenu
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
215 {
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
216 Q_OBJECT
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
217
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
218 public:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
219
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
220 ReturnFocusMenu (QWidget *parent = nullptr);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
221
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
222 signals:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
223
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
224 void about_to_activate (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
225
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
226 protected:
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
227
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
228 bool eventFilter (QObject *obj, QEvent *ev);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
229 };
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
230
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
231 // The variable editor class
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
232
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
233 class variable_editor : public octave_dock_widget
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
234 {
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
235 Q_OBJECT
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
236
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
237 public:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
238
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
239 variable_editor (QWidget *parent = nullptr);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
240
24693
fe9bc1129922 replace main window in variable editor by normal widget with layout
Torsten <mttl@mailbox.org>
parents: 24669
diff changeset
241 ~variable_editor (void) = default;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
242
24621
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
243 // No copying!
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
244
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
245 variable_editor (const variable_editor&) = delete;
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
246
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
247 variable_editor& operator = (const variable_editor&) = delete;
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
248
24633
428780eec08a improve behavior of variable editor
John W. Eaton <jwe@octave.org>
parents: 24621
diff changeset
249 void refresh (void);
428780eec08a improve behavior of variable editor
John W. Eaton <jwe@octave.org>
parents: 24621
diff changeset
250
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
251 static QList<QColor> default_colors (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
252
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
253 static QStringList color_names (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
254
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
255 public slots:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
256
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
257 void callUpdate (const QModelIndex&, const QModelIndex&);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
258
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
259 void notice_settings (const QSettings *);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
260
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
261 void edit_variable (const QString& name, const octave_value& val);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
262
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
263 void variable_destroyed (QObject *obj);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
264
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
265 void variable_focused (const QString& name);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
266
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
267 void record_hovered_focus_variable (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
268
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
269 void restore_hovered_focus_variable (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
270
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
271 protected slots:
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
272
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
273 void closeEvent (QCloseEvent *);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
274
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
275 void save (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
276
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
277 void cutClipboard (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
278
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
279 void copyClipboard (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
280
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
281 void pasteClipboard (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
282
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
283 void pasteTableClipboard (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
284
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
285 void levelUp (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
286
24029
1d184b55416a Use Octave conventions in variable editor code.
Rik <rik@octave.org>
parents: 24028
diff changeset
287 // Send command to Octave interpreter.
1d184b55416a Use Octave conventions in variable editor code.
Rik <rik@octave.org>
parents: 24028
diff changeset
288 // %1 in CMD is replaced with the value of selected_to_octave.
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
289 void relay_selected_command (const QString& cmd);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
290
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
291 signals:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
292
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
293 void updated (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
294
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
295 void finished (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
296
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
297 void command_signal (const QString& cmd);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
298
24697
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
299 void refresh_signal (void);
21d6d80ed427 refactor variable editor model internal representation (bug #53054)
John W. Eaton <jwe@octave.org>
parents: 24694
diff changeset
300
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
301 void clear_content_signal (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
302
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
303 void copy_clipboard_signal (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
304
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
305 void paste_clipboard_signal (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
306
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
307 void paste_table_clipboard_signal (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
308
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
309 void level_up_signal (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
310
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
311 void save_signal (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
312
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
313 void delete_selected_signal (void);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
314
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
315 void selected_command_signal (const QString& cmd);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
316
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
317 private:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
318
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
319 QAction * add_action (QMenu *menu, const QIcon& icon, const QString& text,
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
320 const char *member);
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
321
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
322 QMainWindow *m_main;
24694
9b4edcc62936 add contextmenu to the tab bar of the variable editor (part bug #53002)
Torsten <mttl@mailbox.org>
parents: 24693
diff changeset
323
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
324 QToolBar *m_tool_bar;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
325
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
326 int m_default_width;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
327
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
328 int m_default_height;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
329
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
330 int m_add_font_height;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
331
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
332 bool m_use_terminal_font;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
333
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
334 bool m_alternate_rows;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
335
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
336 QString m_stylesheet;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
337
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
338 QFont m_font;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
339
23978
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
340 // If use_terminal_font is true then this will be different since
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
341 // "font" will contain the terminal font.
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
342 QFont m_sel_font;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
343
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
344 QList<QColor> m_table_colors;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
345
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
346 void update_colors (void);
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
347
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
348 QAction *add_tool_bar_button (const QIcon &icon, const QString &text,
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
349 const QObject *receiver, const char *member);
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
350
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
351 void construct_tool_bar (void);
24812
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
352
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
353 QString m_current_focus_vname;
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
354
ed9ba20d6ed3 Make the variable editor multi-panel via a QMainWindow layout (bug #53046)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 24762
diff changeset
355 QString m_hovered_focus_vname;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
356 };
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
357
23978
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
358 #endif