annotate libgui/src/variable-editor.h @ 24633:428780eec08a

improve behavior of variable editor * main-window.cc (main_window::refresh_variable_editor): Call variable_editor_window::refresh, not variable_editor_window::clear_data_cache. * variable-editor-model.cc (cell::cell): Use default argument to merge two constructors. (variable_editor_model::impl): Use C++11 syntax to disable copying and default constructor. (variable_editor_model::data): Set pending state before posting event. (variable_editor_model::setData): Avoid flicker issue by temporarily setting data to string user entered. (variable_editor_model::set_data_oct): Use try-catch block to handle parsing and evaluation errors. Don't emit signals. (variable_editor_model::set_data_oct, variable_editor_model::set_data_oct, variable_editor_model::init_from_oct, variable_editor_model::eval_oct, variable_editor_model::retrieve_variable): Tag as a function that must be evaluated in the interpreter thread. * variable-editor.cc (variable_editor::refresh): New function.
author John W. Eaton <jwe@octave.org>
date Sun, 21 Jan 2018 10:39:19 -0500
parents 2bb3f3de0b4e
children 7d177be54c37
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>
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
30
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
31 #include "octave-dock-widget.h"
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 class QTabWidget;
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
34 class QToolBar;
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
35 class QMainWindow;
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
36 class QTableView;
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
37 class QModelIndex;
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
38
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
39 class variable_editor : public octave_dock_widget
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
40 {
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
41 Q_OBJECT
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
42
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
43 public:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
44
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
45 variable_editor (QWidget *parent = nullptr);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
46
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
47 ~variable_editor (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
48
24621
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
49 // No copying!
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
50
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
51 variable_editor (const variable_editor&) = delete;
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
52
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
53 variable_editor& operator = (const variable_editor&) = delete;
2bb3f3de0b4e more style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24585
diff changeset
54
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
55 void edit_variable (const QString& name);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
56
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
57 // Clear all the models' data cache.
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
58 void clear_data_cache (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
59
24633
428780eec08a improve behavior of variable editor
John W. Eaton <jwe@octave.org>
parents: 24621
diff changeset
60 void refresh (void);
428780eec08a improve behavior of variable editor
John W. Eaton <jwe@octave.org>
parents: 24621
diff changeset
61
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
62 bool has_focus (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
63
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
64 static QList<QColor> default_colors (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
65
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
66 static QStringList color_names (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
67
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
68 public slots:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
69
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
70 void callUpdate (const QModelIndex&,const QModelIndex&);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
71
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
72 void notice_settings (const QSettings *);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
73
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
74 protected slots:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
75
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
76 void closeEvent (QCloseEvent *);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
77
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
78 void closeTab (int idx);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
79
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
80 void contextmenu_requested (const QPoint& pt);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
81
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
82 void columnmenu_requested (const QPoint& pt);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
83
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
84 void rowmenu_requested (const QPoint& pt);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
85
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
86 void double_click (const QModelIndex& idx);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
87
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
88 void save (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
89
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
90 void clearContent (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
91
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
92 void cutClipboard (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
93
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
94 void copyClipboard (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
95
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
96 void pasteClipboard (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
97
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
98 void pasteTableClipboard (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
99
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
100 void createVariable (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
101
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
102 void transposeContent (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
103
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
104 void up (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
105
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
106 void delete_selected (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
107
24029
1d184b55416a Use Octave conventions in variable editor code.
Rik <rik@octave.org>
parents: 24028
diff changeset
108 // Send command to Octave interpreter.
1d184b55416a Use Octave conventions in variable editor code.
Rik <rik@octave.org>
parents: 24028
diff changeset
109 // %1 in CMD is replaced with the value of selected_to_octave.
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
110 void relay_command (const QString& cmd);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
111
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
112 signals:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
113
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
114 void updated (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
115
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
116 void finished (void);
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
117
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
118 void command_requested (const QString& cmd);
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
119
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
120 private:
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
121
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
122 QMainWindow *m_main;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
123
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
124 QToolBar *m_tool_bar;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
125
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
126 QTabWidget *m_tab_widget;
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
127
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
128 int m_default_width;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
129
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
130 int m_default_height;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
131
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
132 int m_add_font_height;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
133
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
134 bool m_autofit;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
135
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
136 bool m_autofit_max;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
137
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
138 bool m_use_terminal_font;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
139
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
140 bool m_alternate_rows;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
141
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
142 QString m_stylesheet;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
143
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
144 QFont m_font;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
145
23978
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
146 // 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
147 // "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
148 QFont m_sel_font;
24585
8a4aedbb3e5a style fixes for variable editor
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
149
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
150 QList<QColor> m_table_colors;
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
151
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
152 QList<int> octave_to_coords (QString&);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
153
24028
ca4ab27152a9 variable editor: remove & when reading names from tabs (bugs #51851, #51905)
Torsten <mttl@mailbox.org>
parents: 24014
diff changeset
154 // Get the real variable name from the tab text
ca4ab27152a9 variable editor: remove & when reading names from tabs (bugs #51851, #51905)
Torsten <mttl@mailbox.org>
parents: 24014
diff changeset
155 QString real_var_name (int index);
ca4ab27152a9 variable editor: remove & when reading names from tabs (bugs #51851, #51905)
Torsten <mttl@mailbox.org>
parents: 24014
diff changeset
156
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
157 // Convert selection to an Octave expression.
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
158 QString selected_to_octave (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
159
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
160 void update_colors (void);
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
161
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23978
diff changeset
162 void construct_tool_bar (void);
23927
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
163 };
e3a36f84d01d provide variable-editor widget for the GUI
Michael Barnes <mjbcode@runbox.com>
parents:
diff changeset
164
23978
665507c3c29d Use Octave coding conventions for Variable Editor code.
Rik <rik@octave.org>
parents: 23927
diff changeset
165 #endif